A mini-batch gradient averages gradients of several sampled components of a finite-sum objective. For and batch indices ,With independent uniform draws at fixed , it is an unbiased stochastic gradient: . Its covariance matrix is , where is the covariance of one sampled gradient. The factor follows because centered independent cross terms have expectation zero.
If the indices are sampled uniformly without replacement, the covariance is instead for , when uses the uniform-population normalization. At this gives the exact full gradient. Larger batches reduce sampling variance but require more component evaluations per update; biased sampling or data dependence requires its own analysis.
New to topics? Read the docs here!