arXiv:2610.18085cs.LGOct 2026

Manuscript Offprint

arXiv:2610.18085

Same Function, Different Trajectory: No Standard Optimizer Is Equivariant to Transformer Reparameterization

Bum Jun Kim

Abstract

We show that two Transformers representing the same function can follow different training trajectories. For example, doubling a query matrix and halving its key matrix preserves the model's function but changes the gradient scales seen by the optimizer. Our theoretical analysis establishes that standard block-local first-order optimizers fail to scale updates with parameters under a shared learning rate. For AdamW, transforming the first-and second-moment estimates alone does not correct the mismatch between parameter and update scales. To make runs restarted from equivalent checkpoints follow the same trajectory, we balance matrix pairs and transform their moment estimates together, bringing distinct but equivalent training states to the same starting point. To correct scale imbalance between paired Transformer matrices without changing predictions, we propose Symmetry-Aware Gradient Geometry Stabilization (SAGGS), which periodically equalizes the Frobenius norms of exact symmetry pairs, and its damped variant, Soft SAGGS. SAGGS reduces perplexity (PPL) by 0.374±0.0260.374 \pm 0.026 at 101M parameters on WikiText-103, and Soft SAGGS reduces PPL by 0.780±0.0400.780 \pm 0.040 in a 31M modern-architecture replication, both under scale imbalance. In a 123.8M checkpoint-resume experiment, reciprocally rescaling matrix pairs barely changes validation loss at restart but increases final PPL by 3.78±0.423.78 \pm 0.42; hard and soft rebalancing recover to within 0.02 PPL of the control.

1 INTRODUCTION

Transformers (Vaswani et al., 2017) serve as the standard architecture for large language models (Radford et al., 2019; Touvron et al., 2023). Each Transformer layer consists of a multi-head self-attention block and a multi-layer perceptron (MLP). The attention block is built from query, key, value, and output projections, and the MLP is based on rectified linear units (ReLU) or Swish-gated linear units (SwiGLU) (Shazeer, 2020).

Several of these weight matrices form pairs whose scales can be traded against each other without changing the output. For example, attention compares queries and keys through the product (WQ)⊤WK(W^{Q})^{\top}W^{K} of the query and key matrices, so replacing (WQ,WK)(W^{Q}, W^{K}) with (cWQ,c−1WK)(cW^{Q}, c^{-1}W^{K}) for any c>0c > 0 leaves every attention score, and hence every prediction, unchanged. We call a pair of matrices (A,B)(A, B) an exact symmetry pair when replacing the pair with (cA,c−1B)(cA, c^{-1}B) preserves the model's function for every c>0c > 0. Rescaling the exact symmetry pairs of a model in this way yields a whole set of parameterizations that all compute the same function, which we call a symmetry orbit.

These parameterizations represent the same function but lead to different training trajectories. The reason is that the gradients scale inversely to the weights: Multiplying A by c multiplies its gradient by c−1c^{-1}, and multiplying B by c−1c^{-1} multiplies its gradient by c. A gradient-descent step moves the enlarged matrix c2c^2 times less, relative to its size, than in the original model and its shrunken partner c2c^2 times more, so the two models no longer compute the same function after the step. Figure 1 illustrates this effect.

Concretely, symmetry orbits in a Transformer arise from attention query-key (Q-K) and value-output (V-O) pairs, ReLU up-down projections, and the linear value-output path of SwiGLU (Sec. 2). This inverse gradient-scaling law holds for all of these pairs and follows from the chain rule (Dinh et al., 2017, Theorem 3). We use this law to determine how a rescaling distorts

∗^{*}Corresponding author

Figure

Figure 1: Same function, different trajectory. (1) Multiplying A by c and dividing its partner B by c leaves every prediction unchanged. The rectangle's sides are the Frobenius norms of A and B, so the rectangle changes shape but keeps its area. (2) The same numerical update causes unequal relative changes in the two blocks. (3) Resuming training from the rescaled checkpoint, whose pair norms are imbalanced but whose function is unchanged, ends with much worse perplexity (PPL) than resuming from the original. (4) Hard and Soft SAGGS rebalance the pairs without changing the current function and recover from this degradation.

the optimizer’s updates and what is needed for rescaled models to train identically.

Standard optimizers already include mechanisms such as adaptive gradient normalization, but these mechanisms still do not remove this dependence on the parameterization. Adam normalizes gradients using moving averages of gradients and squared gradients (Kingma and Ba, 2015), which cancels constant-factor scaling of the gradients: Both models receive the same numerical update (Figure 1(2)). To keep the two models equivalent, however, the update of the enlarged matrix would have to be c times larger and the update of its shrunken partner c times smaller. The same update is too small for the enlarged matrix and too large for its shrunken partner. Transforming Adam's moment estimates along with the weights does not fix this mismatch, because both models still use the same learning rate (Sec. 3). Appendix A discusses in detail how this work relates to and differs from prior studies of rescaling-aware optimization, weight balancing, and symmetry-induced learning dynamics (Neyshabur et al., 2015; Stock et al., 2019; Kunin et al., 2021).

To remove the scale imbalance between paired matrices without changing the function, we introduce Symmetry-Aware Gradient Geometry Stabilization (SAGGS), which periodically rescales each exact symmetry pair so that its two matrices have equal Frobenius norms (Sec. 4). To avoid disrupting optimizer state that has adapted to imbalanced scales, Soft SAGGS applies only a fraction of this correction at each rebalancing step. Both operations leave the current function unchanged and only rebalance the weights from which training continues. SAGGS also gives an exact restart procedure: Applied together with a matching transformation of the moment estimates, SAGGS moves any two checkpoints on the same symmetry orbit to the same balanced state, from which training follows the same trajectory (Corollary 4). We evaluate both variants in deliberate rescaling tests, which rescale the pairs of layer ℓ\ell by cℓ=eλℓc_{\ell} = e^{\lambda\ell} to impose pair-scale imbalance without changing the function, as well as in checkpoint-resume workflows and in training without such rescaling (Sec. 5). In our seven-seed comparisons, rebalancing restores near-baseline PPL after an imposed rescaling, including a checkpoint edit, and leaves PPL nearly unchanged when no imbalance is imposed.

Our contributions are fourfold.

• We identify exact symmetry orbits in Transformer architectures (Sec. 2) and show their effect on training.

• Our theoretical analysis proves that, under a shared learning rate, no standard optimizer, including gradient descent, AdamW, and Lion, keeps two equivalent models equivalent during training (Theorem 5). Even with correctly transformed moment estimates, AdamW does so only if its learning rate, ϵ\epsilon, and weight decay are also rescaled coordinate by coordinate (Theorem 2 and Example 3). We further prove that canonicalizing both weights and moments at restart makes the training resumed from any two checkpoints on the same symmetry orbit identical (Corollary 4).

  • We propose SAGGS, which periodically moves each exact symmetry pair to the unique point on its orbit where the two matrices have equal Frobenius norms, regardless of where on the orbit the pair starts (Proposition 1). Its damped variant, Soft SAGGS, moves each pair only part of the way there, shrinking the log ratio of the two norms by a constant factor at each rebalancing step (Sec. 4.2).

  • Under deliberate rescaling, seven-seed paired comparisons show consistent PPL reductions from rebalancing, of 0.374±0.0260.374\pm 0.026 for a 101M WikiText-103 model and of 0.780±0.0400.780\pm 0.040 for a 31M modern-architecture replication, and also for training with Lion (Sec. 5.2). In a 123.8M checkpoint-resume workflow, an edit that barely changes validation loss at restart increases final PPL by 3.78±0.423.78\pm 0.42, and both rebalancing variants recover to within 0.02 PPL of the control (Sec. 5.3).