“Frozen” has to be true in the optimizer, not just in the training plan. Suppose a custom loop includes base parameters in an AdamW parameter group and forcibly sets their gradients to zero to prevent learning. A zero tensor is still a gradient value. AdamW's decoupled weight decay can shrink a parameter on an optimizer step even when the data gradient is zero. Existing optimizer moments may also move it. By contrast, in PyTorch's implementation, parameters with grad is None are omitted from the step. You can see that selection in the Adam optimizer source, and the AdamW documentation specifies decoupled weight decay.

This is a conditional failure, not a claim that ordinary PEFT training changes frozen base weights. If base parameters have requires_grad=False, are absent from optimizer groups and never acquire gradients, they should stay fixed. A careless optimizer rebuild after checkpoint restore, an adapter wrapper that leaves some base parameters trainable, or a hook replacing None gradients with zeros can break that invariant.

I would take an immutable digest of selected base tensors before the first step and after a small known number of steps. List the optimizer parameter groups by stable parameter name, requires-grad flag, gradient state and weight-decay value. Compare both grad is None and all-zero gradients under one optimizer step in a minimal reproduction. If the base changes, distinguish weight decay from a real backprop gradient, an EMA swap, mixed-precision copy, or a checkpoint/load mismatch.

The fix is to construct the optimizer from the intended trainable adapter parameters and any explicitly allowed extra modules. Assert that the intersection with the frozen base set is empty, then check the base hash at intervals. Setting weight decay to zero for accidentally included base weights may stop one route to drift but leaves the wrong ownership boundary in place.

If the interviewer says the loss still improves, that proves nothing about which weights changed. A small unintended base update can even help the training metric while invalidating the cost, reproducibility and serving contract for a LoRA-only artifact.

For a hypothetical scalar weight 1, learning rate 0.01 and decoupled weight decay 0.1, the decay-only multiplication is 1-0.01×0.1=0.999. Even with a zero data gradient, the weight becomes 0.999 when that parameter participates in the step. If a nonzero first moment was restored, the optimizer can also apply an adaptive update from that history. An all-zero gradient is therefore not an instruction to remove the parameter from optimization.

A minimal fixture should start with identical parameters and fresh optimizer state, then run one step with an explicit zero gradient in one branch and None in the other. A second fixture seeds nonzero moments to isolate the historical-state path. In the PyTorch behavior described above, the None branch is skipped. This is an implementation-specific observation to verify for another optimizer, rather than a universal definition of freezing.

After fixing parameter selection, test the restore path too. Save and reload the intended adapter-only optimizer groups by stable model identity, then assert that no base parameter was introduced by a wrapper or rebuilt configuration. Clear stale gradients when changing trainability mid-run. If the base was already modified, recover the correct base checkpoint and determine whether the adapter must be retrained. Shipping a small adapter next to a different base silently changes the inference artifact even when the adapter file itself is valid.