Choose independently and uniformly from . Starting from any , the projected stochastic gradient descent iteration is
Conditional on , , so is an unbiased stochastic gradient. The metric projection onto a closed convex set keeps every iterate in . For a fixed step size, return the Cesàro average .
The discrete base factors in the displayed construction inherit their variational parameters. Accordingly write , not a parameter-independent , for the joint base probability mass function or probability density function. The continuous noise factors can be parameter independent while the discrete factors are dependent. Calling the entire base law parameterless while retaining its nonzero score function would be inconsistent.
Let push the base law forward to , and define
Use a fixed base measure , with counting measure for discrete coordinates and Lebesgue measure for continuous coordinates. Assume locally parameter-independent support, differentiability and an integrable domination permitting differentiation under the integral sign. A valid reparameterization gradient gives
Apply the product rule before simplifying:
This is the required combined score and pathwise gradient estimator. A sample from and the integrand on the last line give an unbiased stochastic gradient under the stated regularity conditions. Its first term is a score-function gradient estimator contribution; the remaining terms differentiate the sampled objective along the continuous transformation. The same separation appears in the general stochastic computation graph construction.[ref]
All derivatives inside the expectation hold fixed. They still include both explicit parameter dependence and dependence through . For a continuous coordinate ,
The model joint density is fixed as changes, but its composition with need not be constant. Discrete coordinates are not differentiated as real-valued paths; their changing probabilities enter through the score function. Moving supports or parameter-dependent branch boundaries require additional care and are not justified merely by formally interchanging a derivative and an integral.
Condition on , and set , and . Since the sampled index is independent of and has the discrete uniform distribution, is an unbiased stochastic gradient:
Write . Expanding and using the zero conditional mean of proves the stochastic gradient second-moment identity
The stochastic gradient descent update is . Expanding the squared Euclidean distance and using the preceding identities gives
The subgradient inequality for the differentiable convex function gives . Combining this with (3),
Removing the temporary notation for the conditioning point yields
The noise contributes twice in this argument: once in the supplied bound (3), and once in converting the expected squared step into the squared gradient. Each contribution is at most .
For an unbiased stochastic gradient at with finite conditional second moment, expand in the squared Euclidean norm. The cross term has zero conditional expectation, which proves the displayed identity. It separates the squared true gradient from the total conditional variance of its random estimate.
Target: gradient-descent.bigb, under Stochastic gradient descent.