For intra-batch “per sample contributions”, no, there isn’t a way in general, though there are some tricks 32  you could try 12.
For inter-batch statistics, you can do that similar to what the Adam optimizer (and other similar optimizers like LAMB) do, which essentially is one of the Welford-style online algorithms for the variance 23 with more or less sophistication around subtracting the mean.
Best regards
Thomas