Dropout and Stacking Preserve the Interface
Inverted dropout changes branch values during training but becomes the identity at evaluation. Stacked blocks preserve model width while ordinarily using distinct parameters at each depth.
Dropout changes values during training without changing tensor shape. Stacking then passes the model-width output of one block to the next block. These two facts preserve the interface , but they do not make repeated blocks identical.
Training and Evaluation Calculate Different Functions
Under inverted dropout with drop probability , each branch coordinate uses
during training. During evaluation, dropout returns unchanged. The factor keeps the training-time expectation equal to under the mask distribution.
For , , and mask , training returns . Evaluation returns .
Place Dropout Precisely
One explicit pre-norm residual branch is
Moving dropout before , after the residual addition, or into attention weights defines another computation. A reproducible account names the exact placement and the training/evaluation mode.
A Stack Reuses Shapes, Not Parameters
If each block maps to the same shape, blocks can be composed:
Ordinary Transformer stacks use different learned parameters at different depths. Sharing parameters across layers is possible, but it is a separate architectural choice.
Reproducible Dropout Checks
- Fix a random seed when comparing exact training outputs.
- Test evaluation mode separately and expect deterministic values.
- Verify that dropout changes no dimensions.
- Compare averages over many masks when testing the expectation, not one mask.
- Record probability and placement with the architecture.
Q1. Apply inverted dropout
With , input coordinate , and retained mask value , what training-time value is returned?
Compute it first, then check your number.