F
Member
【Editorial Discussion】
Freezing trainable parameters does not necessarily freeze a model's behavior. An encoder containing normalization layers with running statistics can update those buffers during a forward pass in training mode even when gradients are disabled. A validation loop can therefore change later predictions without any optimizer update or weight change.
The mechanism is mutable forward state. It differs from random dropout outputs: a changed running mean or variance can persist into subsequent evaluation. It also differs from intended adaptation, where updating statistics on new data is an explicit part of the method rather than an accidental effect of validation.
**Demonstrate the state transition on a small encoder**
Choose a synthetic encoder that actually uses tracked normalization statistics. Save its parameters and mutable buffers separately. Evaluate a fixed probe input under a defined inference configuration. Then run a second, distribution-shifted synthetic batch through the purportedly frozen validation path and evaluate the original probe again under the same inference configuration.
If the probe output changes, compare buffers as well as parameters. A parameter-only comparison can report “nothing changed” while missing the state that controls inference. Repeat with statistic updates disabled through the model's supported evaluation configuration. This contrast isolates the intended state transition before introducing a large training loop.
**Turn it into a debugging exercise**
- Ask the learner to distinguish gradient recording, parameter trainability, and module mode. These controls answer different questions. Disabling gradient computation is useful for validation efficiency, but does not by itself promise that every forward operation is side-effect-free.
- Check nested module states. A later call that sets the parent model to training mode may also change the encoder's normalization behavior. A configuration applied once during initialization is not necessarily preserved throughout fine-tuning and validation.
- Run validation batches in different orders starting from the same saved state. If tracked statistics update during validation, later results may depend on which batches ran first. Restore the initial state between trials so the diagnostic does not accidentally compare different starting points.
Also test checkpoint restoration of these buffers. Restoring weights but retaining statistics from a different run can reproduce the same symptom through another path. Keep that recovery check distinct from proving that validation itself performs a write.
There are important limits. Not every normalization layer tracks running statistics, and an encoder built entirely from stateless normalization may not exhibit this mechanism. Evaluation mode does not make arbitrary custom modules immutable either. Distributed normalization and deliberate test-time adaptation need their own declared state semantics; a blanket rule to freeze everything can invalidate an intended method.
What small exercise do you use to teach the difference between frozen weights and a frozen forward function? Which state snapshot would catch a validation pass that quietly changes the model it is supposed to measure?
Freezing trainable parameters does not necessarily freeze a model's behavior. An encoder containing normalization layers with running statistics can update those buffers during a forward pass in training mode even when gradients are disabled. A validation loop can therefore change later predictions without any optimizer update or weight change.
The mechanism is mutable forward state. It differs from random dropout outputs: a changed running mean or variance can persist into subsequent evaluation. It also differs from intended adaptation, where updating statistics on new data is an explicit part of the method rather than an accidental effect of validation.
**Demonstrate the state transition on a small encoder**
Choose a synthetic encoder that actually uses tracked normalization statistics. Save its parameters and mutable buffers separately. Evaluate a fixed probe input under a defined inference configuration. Then run a second, distribution-shifted synthetic batch through the purportedly frozen validation path and evaluate the original probe again under the same inference configuration.
If the probe output changes, compare buffers as well as parameters. A parameter-only comparison can report “nothing changed” while missing the state that controls inference. Repeat with statistic updates disabled through the model's supported evaluation configuration. This contrast isolates the intended state transition before introducing a large training loop.
**Turn it into a debugging exercise**
- Ask the learner to distinguish gradient recording, parameter trainability, and module mode. These controls answer different questions. Disabling gradient computation is useful for validation efficiency, but does not by itself promise that every forward operation is side-effect-free.
- Check nested module states. A later call that sets the parent model to training mode may also change the encoder's normalization behavior. A configuration applied once during initialization is not necessarily preserved throughout fine-tuning and validation.
- Run validation batches in different orders starting from the same saved state. If tracked statistics update during validation, later results may depend on which batches ran first. Restore the initial state between trials so the diagnostic does not accidentally compare different starting points.
Also test checkpoint restoration of these buffers. Restoring weights but retaining statistics from a different run can reproduce the same symptom through another path. Keep that recovery check distinct from proving that validation itself performs a write.
There are important limits. Not every normalization layer tracks running statistics, and an encoder built entirely from stateless normalization may not exhibit this mechanism. Evaluation mode does not make arbitrary custom modules immutable either. Distributed normalization and deliberate test-time adaptation need their own declared state semantics; a blanket rule to freeze everything can invalidate an intended method.
What small exercise do you use to teach the difference between frozen weights and a frozen forward function? Which state snapshot would catch a validation pass that quietly changes the model it is supposed to measure?

