Initialization Sets the First Signal Scale
Seed and inspect the model before its first update. Relate parameter scale to residuals, attention scores, logits, uniform-loss baseline, and gradients without treating one tested scale as universal.
Before the first optimizer step, initialization determines the magnitudes of token records, attention scores, residual updates, logits, loss, and gradients. The model is structurally correct at many possible scales, but not every scale is equally easy to optimize.
The frozen experiment uses:
- model seed 7;
- zero-mean normal weights with standard deviation ;
- zero linear biases;
- LayerNorm scales initialized to 1 and offsets to 0;
- zero dropout.
These are one tested toy configuration, not general Transformer defaults.
Seed before Constructing the Model
Setting the seed after construction cannot reproduce parameters that have already been sampled. Data sampling and batch order use separate generators so changing one does not silently change the others.
Audit Distributions, Not One Convenient Number
For every parameter group, record at least shape, minimum, maximum, mean, and standard deviation. Then run one batch without updating and inspect:
| Quantity | Failure signal |
|---|---|
| embedding and position records | all zero, non-finite, or dominated by one table |
| attention scores | nearly identical everywhere or extremely separated |
| residual norms by block | collapse or rapid growth with depth |
| logits | almost exact ties or extreme magnitudes |
| initial loss | non-finite or suspiciously near zero |
| gradient norms | zero, non-finite, or dominated by one tensor |
With eight vocabulary entries, uniform next-token probabilities give nats. The verified model begins near this value: 2.1898 on the sampled training corpus and 2.1918 on validation. Near-uniform initial predictions explain those values; the numbers do not prove that every internal scale is healthy.
Compare Scale while Holding Everything Else Fixed
An initialization ablation should change only the standard deviation. Keep the model seed, corpus, batch order, optimizer, and number of updates fixed. Measure initial logits, loss, residual norms, gradients, and later loss.
- Very small weights can produce weak distinctions and small updates in some paths.
- Very large weights can produce extreme scores, saturated probabilities, or unstable residual and gradient scales.
- Normalization can reduce some scale problems without making initialization irrelevant.
Do not describe one successful standard deviation as universally optimal.
Q1. Interpret an initial loss
The vocabulary has eight tokens and all logits in every row are equal. What is the mean cross-entropy per target in natural-log units?
Compute it first, then check your number.
Hint
Solution
Initialization Is the First Recorded Experiment State
Store the initialization rule and model seed in the configuration. A checkpoint can later preserve trained weights, but it cannot explain how an unrecorded run began.