A mean-preserving mask does not preserve a prediction
probability▲▲△Exact expressions first; four decimal places unless stated otherwise.
STATEMENT
Compute dropout’s distribution exactly, rather than estimating it by sampling. Use the result to test the claim that deterministic inference is the exact average of the masked networks.
GIVEN
A fixed activation , independent keep probability , inverted dropout , and a downstream function .
FIND
The mean and variance of the masked activation, the expected squared output, and the deterministic inference prediction. Then derive the general formulas for fixed and .
STRATEGY
Enumerate the two mask outcomes. Keep separate from .
SOLUTION
| Mask | Probability | ||
|---|---|---|---|
The first moment is . The second moment is . Subtracting the square of the first moment gives variance .
At inference inverted dropout leaves unchanged, so the squared output is . But averaging the masked predictions gives . The discrepancy is the activation variance, not a sampling error.
For arbitrary fixed , the outcomes are zero and :
Therefore , as in (I.8.8). For an affine downstream map , expectation does commute with the map. The square gives a concrete case where it does not.
For independent masks on several fixed activations, the dropout-induced off-diagonal covariances are zero. This is conditional on the activations. It does not claim that the activations themselves are independent across data.
Answer
Mean , variance , expected masked squared output , and deterministic squared output . Inverted dropout preserves the activation mean and does not, in general, preserve the expected downstream prediction.
Check — sanity
At both paths coincide and the variance is zero. For fixed nonzero , the variance grows without bound as tends to zero. The operation is not defined at by the formula used here.
Where this breaks
This arithmetic is not a claim about the test accuracy of dropout. It shows exactly what the scaling guarantees and what it does not. Correlated masks, such as dropping a whole channel together, produce a different covariance structure even when the marginal mean formula still holds.
Variation
Let or replace the square with an affine function. Explain why the counterexample disappears without establishing the general equality.