工作日早上 7 点读 AI,周日早上 8 点读周报订阅邮件

METAL LAB

The Loss Does Not See the Basis, but Adam Does

arXiv:2608.051362026-08-04

梯度下降和Adam会不知不觉地收敛到不同的解 —— 原因是损失函数看不见的一种对称性

当模型权重被写成W=UV^T这种分解形式训练时,梯度下降往往会收敛到简单的低秩解,而从相同的小幅初始化出发的Adam却不会。作者将这一差异归结为损失函数的'规范对称性'——同时用同一个正交矩阵旋转U和V不会改变损失——并据此把九种常见优化器分成两类,分别在矩阵恢复任务、Transformer注意力机制和真实高光谱图像数据上验证了这一分类带来的实际性能差异。

METAL LAB 解读图

规范对称性如何把优化器分成两类

证据状态已报告实测结果

  1. 规范对称性在W=UV^T中用同一个正交矩阵Q旋转U和V,W和损失保持不变
  2. 等变类优化器梯度下降、动量法、共享标量Adam、Muon、Shampoo——无论从哪个旋转坐标出发,训练轨迹都保持一致
  3. 逐坐标类优化器Adam、RMSProp、signSGD、Lion——分别处理每个坐标,因此轨迹会依赖于起始坐标基
  4. 矩阵恢复与注意力实验两类方法在恢复误差和注意力头内部量的最终差异上表现出清晰的分离
  5. 真实数据验证在高光谱图像补全任务中,等变方法(梯度下降)在相同训练损失下取得比Adam更低的保留集误差
这是 METAL LAB 制作的解读图,并非论文作者提供的原图。

他们做了什么

  1. 把模型写成分解形式W=UV^T时,若同时用同一个正交矩阵Q去旋转U和V(变成UQ、VQ),结果矩阵W和损失都不会改变,这种不变性被称为规范对称性。
  2. 按照优化器的更新规则是否尊重这种对称性('规范等变性')来分类,梯度下降、动量法、'共享标量'版Adam、Muon和Shampoo属于等变的一类,而标准Adam、RMSProp等逐坐标处理的方法则不属于。
  3. 在一个受控的矩阵感知恢复实验中(从欠定观测中恢复一个隐藏的3阶40x40矩阵),九种优化器都被训练到训练损失基本消失后再比较恢复误差:等变类方法的误差最高只有0.286,而逐坐标类方法的误差全部超过0.42,两类之间没有重叠。
  4. 通过一个可调参数,把更新规则从标准Adam的逐坐标分母平滑过渡到单一共享标量,实验显示随着逐坐标处理程度增强,恢复效果和有效秩单调变差,由此确认'各坐标处理方式不同'正是导致差异的原因。
  5. 在一个小型Transformer中,把计算功能完全相同、但用不同(旋转过的)坐标基表示的两个模型副本分别训练:Adam从第一步更新起就让两个副本产生分歧,最终注意力头内部量(WQ^T WK)相差56%,而等变类优化器始终保持在浮点精度误差范围内。
Figure 1: Equivariance structures the set of available optimizers under a fixed computational budget. Ground-truth recovery for nine optimizer rules (eight standard rules plus a shared-scalar Adam as a baseline) on an underdetermined matrix sensing task without weight decay. All are run until the training residuals vanish (interpolation), which rules out any performance difference due to residual training error. The four gauge-equivariant methods (blue) maintain the low-rank bias while the five coordinate-wise approaches (vermilion) do not: on this task and at this budget, recovery error is at most 0.286 for every equivariant method and above 0.42 for every coordinate-wise one, leaving the space between the two unoccupied. That qualifier matters, as one of the coordinate-wise methods eventually reaches similar performance beyond the 2×104-step budget used here (Appendix D.10). Muon’s label reads 6.8×10−6, the unrounded value of the 0.0000 entry in Table 2.
Figure 1: Equivariance structures the set of available optimizers under a fixed computational budget. Ground-truth recovery for nine optimizer rules (eight standard rules plus a shared-scalar Adam as a baseline) on an underdetermined matrix sensing task without weight decay. All are run until the training residuals vanish (interpolation), which rules out any performance difference due to residual training error. The four gauge-equivariant methods (blue) maintain the low-rank bias while the five coordinate-wise approaches (vermilion) do not: on this task and at this budget, recovery error is at most 0.286 for every equivariant method and above 0.42 for every coordinate-wise one, leaving the space between the two unoccupied. That qualifier matters, as one of the coordinate-wise methods eventually reaches similar performance beyond the 2×104-step budget used here (Appendix D.10). Muon’s label reads 6.8×10−6, the unrounded value of the 0.0000 entry in Table 2.
Table 1: Closest prior and concurrent work. The recurring distinction is whether an update respects a relevant orthogonal symmetry; we ask what it predicts for interpolant selection in factored models at matched training loss.
worksetting and resultrelation to this paper
VectorAdam; Xie et al. 2025Examine ambient rotations of vector parameters under general loss functions. Show Adam is sensitive to such rotations, whereas shared scalar updates restore equivariance.We focus instead on an internal factorization gauge and connect the same principle to solution selection among interpolants, rather than optimization speed.
LoRA-RITE; DePavia et al. 2025Study transformations of LoRA factors and rotations in data or feature space. Demonstrate improved optimization through invariance and altered implicit bias in Adam under rotations.We isolate the intrinsic gauge of the factorization itself and evaluate recovery performance at matched training loss across a range of optimizers.
Silverstein et al. 2026; Zhang 2026Analyze per-head query–key (QK) rotations and Schur multiplicity bases. Highlight that optimizer design can intentionally break or preserve symmetry.We maintain the gauge structure intact and use it to analyze solutions chosen by standard, deployed optimizers.
Lau & Su 2026; Shirodkar 2026Investigate architectural symmetry groups and construct optimizers that exactly respect equivariance.These works support symmetry-aware design; we instead assess the practical consequences of preserving or violating such symmetry.
Kang et al. 2026; Dragutinović et al. 2026Study Muon’s spectral dynamics and its impact on simplicity bias.We extend this by mapping conditions under which uniform spectral growth helps or harms performance as the target develops a spectral tail.
Figure 2: Adam is basis-dependent in attention, shown here by the relative logit distance between twins in the gauge and noise experiments. In the former the two copies are initialized as the same function, while in the latter they differ by a small (10−7) perturbation in the same basis. Adam’s gauge twins (solid vermilion line) split structurally in one step, to a value four orders of magnitude greater than its own noise twin (dotted line), and then saturate. The same is not observed for SGD (heavy-ball momentum 0.9) or scalar-Adam, whose gauge twins remain at float noise. For Muon the gauge and noise twins trace the same curve, indicating that its separation is numerical chaos stemming from msign, not basis dependence.
Figure 2: Adam is basis-dependent in attention, shown here by the relative logit distance between twins in the gauge and noise experiments. In the former the two copies are initialized as the same function, while in the latter they differ by a small (10−7) perturbation in the same basis. Adam’s gauge twins (solid vermilion line) split structurally in one step, to a value four orders of magnitude greater than its own noise twin (dotted line), and then saturate. The same is not observed for SGD (heavy-ball momentum 0.9) or scalar-Adam, whose gauge twins remain at float noise. For Muon the gauge and noise twins trace the same curve, indicating that its separation is numerical chaos stemming from msign, not basis dependence.
Table 2: The optimizer-zoo map. Matrix sensing, 40×40, rank​ 3 ground truth, m=2×dof, no weight decay, three paired random seeds, all nine optimizer runs continued until interpolation (final training loss reported). Recovery is measured as ‖W−X∗‖F/‖X∗‖F (lower is better); erank is effective rank; bal is ‖U⊤​U−V⊤​V‖F; the notes column names the theoretical framework each row falls under—Gunasekar et al. 2017 for gradient descent (GD) and Wilson et al. 2017 for Adam. (cosine) marks the four methods that need cosine annealing to interpolate; the first row is a convex baseline, not an optimizer, recovering the minimum-nuclear-norm solution of the same measurements (both are unpacked in the text above). All values are means over the three seeds, with no dispersion quoted.
methodrecovery ↓erankbaltrain lossnotes
min-nuclear-norm0.03353.30convex reference, not an optimizer
equivariantMuon (cosine)0.00002.951.655.7×10−8near-exact (6.8×10−6 unrounded)
GD0.13124.510.066.5×10−8Gunasekar anchor
scalar-Adam (p=0)0.20105.430.143.5×10−8equivariant; flow proxy
Shampoo0.28566.951.474.5×10−8
coord.-wiseLion (cosine)0.424810.587.358.0×10−8
signum (cosine)0.44547.831.796.5×10−8low-rank-but-wrong
RMSProp (cosine)0.526612.804.746.0×10−8needs decay; Appendix D.7
Adafactor0.543010.723.405.6×10−8factored diag. still breaks
Adam0.573414.375.371.2×10−11Wilson anchor
Figure 4: The spectral-tail phase diagram. Recovery vs. the target’s tail-amplitude parameter τ (the tail carries τ2 of the target’s energy). Adam has the worst recovery error at every τ plotted. Within the equivariant class, Muon’s aggressive equal-rate schedule is exact at τ=0 and crosses over to GD near τ∗≈0.2. At the largest τ, all methods are near the measurement-determined floor set by the unidentifiable tail, and GD and Shampoo are within seed noise, so the ordering there is uninformative. Bands show ±1 s.d. over 10 seeds. The boundary is unchanged when every method is given the identical cosine schedule (Appendix D).
Figure 4: The spectral-tail phase diagram. Recovery vs. the target’s tail-amplitude parameter τ (the tail carries τ2 of the target’s energy). Adam has the worst recovery error at every τ plotted. Within the equivariant class, Muon’s aggressive equal-rate schedule is exact at τ=0 and crosses over to GD near τ∗≈0.2. At the largest τ, all methods are near the measurement-determined floor set by the unidentifiable tail, and GD and Shampoo are within seed noise, so the ordering there is uninformative. Bands show ±1 s.d. over 10 seeds. The boundary is unchanged when every method is given the identical cosine schedule (Appendix D).
Table 3: Adam is basis-dependent in attention, and the noise twin separates structure from chaos. The values are relative logit distances between twins on validation inputs for the same task; multi-seed statistics are shown in Appendix D.5. At the harness’s default CPU precision, the baseline rounding threshold is the step-0 column (≈2×10−7, i.e. one function evaluated across two bases); the equivariant methods reach this floor at step 1, and their later nonzero entries result from numerical noise, not from gauge-symmetry violations—Muon’s split in particular, as per Proposition 4.2. These discrepancies are reduced, if not eliminated, in GPU float64, where the step-1 values fall within 2.8×10−16–1.1×10−15 over the three methods and four configurations; Table 9 carries the worst case in each.
optimizertwin typestep 0step 1step 100step 1500 (final)
Adamgauge1.8×10−73.6×𝟏𝟎−𝟑6.5×10−17.7×10−1
AdamA=I0000
Adamnoise (10−7)2.6×10−72.9×10−71.7×10−51.6×10−5
SGDgauge1.8×10−72.9×10−73.7×10−52.0×10−5
scalar-Adamgauge1.8×10−71.6×10−74.1×10−64.3×10−6
Muongauge1.8×10−72.2×10−72.3×10−28.5×10−1
Muonnoise (10−7)2.6×10−72.9×10−74.0×10−28.7×10−1
Figure 5: Performance as a function of training loss on real data (Indian Pines, m/dof≈1.15, 4 random seeds, GPU float64; learning rates chosen via the train-only rule in Appendix D.6). This is the corresponding row of Table 5, read along its whole path rather than at its endpoint alone. Gradient descent (GD) sits below Adam at every matched training loss beyond the shared starting point, and the two are compared only at equal training loss, so no fitted run is ever set against an unfitted one. Left panel: held-out error; bands are ±1 s.d. over the 4 seeds, hidden inside the line width wherever the seeds agree—the whole path for GD—and opening up only where they do not, as Adam’s do once overfitting begins. Right panel: effective rank. GD settles between 5.6 and 13.2; Adam climbs to 28, against the scene’s intrinsic rank of 24; Muon tracks the rank cap until convergence, then drops sharply.
Figure 5: Performance as a function of training loss on real data (Indian Pines, m/dof≈1.15, 4 random seeds, GPU float64; learning rates chosen via the train-only rule in Appendix D.6). This is the corresponding row of Table 5, read along its whole path rather than at its endpoint alone. Gradient descent (GD) sits below Adam at every matched training loss beyond the shared starting point, and the two are compared only at equal training loss, so no fitted run is ever set against an unfitted one. Left panel: held-out error; bands are ±1 s.d. over the 4 seeds, hidden inside the line width wherever the seeds agree—the whole path for GD—and opening up only where they do not, as Adam’s do once overfitting begins. Right panel: effective rank. GD settles between 5.6 and 13.2; Adam climbs to 28, against the scene’s intrinsic rank of 24; Muon tracks the rank cap until convergence, then drops sharply.
Table 4: Spectral-tail phase diagram (recovery; 10 seeds, float64). Muon is exact at τ=0, degrades fastest as tail energy grows, and cedes to GD in a crossover region near τ∗≈0.2 (≈4% tail energy). Bold marks each row’s best recovery, with both members of a within-noise tie bolded; the seed dispersions behind those ties are the ±1 s.d. bands of Figure 4, omitted here for space. Decay-symmetrized rows in Appendix D.
τGDAdamMuonShampooregime
0.000.1120.5420.0000.334Muon exact
0.050.1500.5430.0950.343Muon
0.100.2140.5550.1910.375Muon
0.200.3510.5970.3540.449boundary (≈4% tail); Muon cedes
0.350.5490.6850.5800.576GD
0.500.7270.7760.7520.723tail regime; GD/Shampoo within noise
Table 5: Matched-loss recovery on two hyperspectral datasets (held-out RMSE ×10−2, mean ± standard deviation over 4 random seeds, evaluated at matched training loss ≤10−5, GPU float64; learning rates as in Appendix D.6). The reduction column reports the percent improvement of GD over Adam, as (Adam−GD)/Adam using mean performance over seeds; gradient descent (GD) outperforms Adam in every individual seed of every entry. In parentheses, Muon’s effective rank at the deepest point in the fit (after the collapse typical of the late stages), given a model capacity of 48.
datasetm/dof24GDAdamRMSE reductionMuon (rank)
Indian Pines1.151.481±0.0132.600±0.047+43.0%3.397±0.082 (36)
1.91.244±0.0121.718±0.035+27.6%3.210±0.122 (35)
Pavia Univ.1.150.819±0.0261.458±0.123+43.8%1.260±0.121 (10)
1.90.615±0.0100.798±0.023+22.9%0.770±0.017 0(8)
Table 6: Recovery under three schedules (3 seeds, best-recovery lr per cell) for five reference methods: the equivariant anchors GD, scalar-Adam, and Shampoo, the coordinate-wise anchor Adam, and the constant-norm case Muon. The split does not move; under a single uniform cosine schedule the complete nine-method classification is again 9/9 (selection-rule test, Appendix D.3).
methodconstantcosinecosine, full horizon
GD0.13120.13120.1312
Adam0.57340.57340.5764
scalar-Adam0.20100.20100.2010
Muon(0.0084†)0.00000.0000
Shampoo0.28560.28560.2856
Table 7: Recovery versus learning rate for the five reference methods, averaged over three random seeds. For each method the results occupy two rows: the top row gives the learning-rate grid used (of varying length, since Adam has five rates while the rest have four), and the second row the corresponding recovery, so a method’s row simply ends where its grid does. “→fl” signifies the lowest learning rate at which interpolation still succeeds, the flow-limit-aligned column; n/i = does not interpolate; div = diverges.
methodlearning-rate grid
GDlr0.003→fl0.010.030.1
recovery0.1130.1310.437div
Adamlr0.0003→fl0.0010.0030.010.03
recovery0.5600.5760.5700.5730.581
scalar-Adamlr0.0003→fl0.0010.0030.01
recovery0.1650.2010.2560.357
Muon (cosine)lr0.0030.010.030.1
recovery0.9150.7480.0000.000
Shampoolr0.010.030.10.3
recovery(0.881 n/i)0.286divdiv
Table 8: Recovery vs. initialization scale (3 seeds). The split holds at 10−3 (the paper’s setting) and 3×10−3; at 10−2 the small-init bias fades for every method except Muon, which remains exact, marking its bias as schedule- rather than init-driven.
initGDAdamscalar-AdamMuonShampoo
10−30.1310.5730.2010.0000.286
3×10−30.2030.5750.2600.0000.352
10−20.3180.5840.3580.0000.575
Table 9: Twin drift measured at scale and on real text, in GPU float64 precision. For each configuration, Adam runs 6 init×draw gauge pairs while each equivariant method runs 2; the A=I determinism twin is evaluated for Adam at every configuration and is exactly 0 throughout. “eq. step 1” is the maximum (worst) gauge drift across the three equivariant methods (SGD, scalar-Adam, Muon) at step 1, all at machine precision; “ratio” is the onset ratio defined above. The character-level language model twins use the same deterministic minibatch stream and reach comparable validation losses (1.579 vs. 1.585).
configAdam gauge, step 1eq., step 1Adam, finalratio (step 1)
mod-47, 2L, d=644.0–5.7×10−35.4×10−160.69–0.7893×
mod-97, 4L, d=1288.2–11×10−37.3×10−160.66–0.75158×
mod-97, 6L, d=2566.5–7.2×10−31.1×10−150.61–0.6494×
text (char-LM), 6L, d=2562.2–2.4×10−38.0×10−160.36–0.3739×
Table 10: FlowAdam-p=0 recovery along a trajectory aligned by training loss (extended 1.2×105-step budget, 3 seeds). The mean at the 10−7 threshold (0.1691) matches the original 3×104-step result exactly and improves upon the dial-only baseline (0.2010) by +15.9%. Its effective rank (4.8–5.4) is the closest of any Adam variant in this study to gradient descent’s (4.51).
train loss ≤10−410−53×10−610−610−7erank
seed 420.14040.14010.14010.14010.14014.77
seed 1230.15580.15560.15550.15550.15554.84
seed 4560.21200.21170.21170.21170.21175.41
mean0.16940.16910.16910.16910.16915.01
Table 11: Optimization algorithms on the Zoo recovery task, across problem sizes (10-seed averages; float64, H100 GPU, 4×104 steps). The ranking is consistent across scales: gradient descent (GD), scalar-Adam (p=0), and Muon significantly outperform coordinate-wise Adam, RMSProp, Lion, and Adafactor, with Adam-type methods at 1.7–4.3× GD’s error at every size and Muon almost exact (error <10−5 for all seeds) up to n=256. The errors of GD and scalar-Adam are limited by the step-size choice (Remark A.5), so the relative ordering, not the absolute value, is the conclusion.
equivariantcoordinate-wise
nGDsc-AdamMuonShampoo†AdamRMSPropLionAdafactorsignum‡
640.1430.1950.0000.6460.5740.5960.4830.6120.000
960.2020.2790.0000.5950.6090.615§0.5480.6870.000
1280.2480.3450.0000.6590.6430.6170.6020.7450.000
1920.3460.4680.0000.8380.6960.6690.7600.8170.000
2560.4100.5480.0000.9180.7410.7080.8950.8670.000

研究结果

  • 在矩阵感知恢复实验中,规范等变类优化器(梯度下降、共享标量Adam、Muon、Shampoo)的恢复误差最高为0.286,而逐坐标类优化器(Adam、RMSProp等)的误差全部在0.42以上,该结果基于2x10^4步的固定训练预算。
  • 将更新规则从共享标量(等变)逐渐调整为完全逐坐标处理的实验显示,随着逐坐标程度增加,恢复误差和有效秩均单调变差。
  • 改变目标矩阵的谱尾比例tau后发现,Muon在tau=0时恢复精确,但在tau*≈0.2(约4%的尾部能量)附近被梯度下降反超。
  • 在两个规范等价的Transformer副本中,Adam在第一步训练更新就使二者产生分歧,最终注意力头内部量(WQ^T WK)相差56%,而梯度下降和共享标量Adam始终保持在浮点精度水平上的一致。
  • 在两个真实高光谱图像数据集(Indian Pines、Pavia University)上,在训练损失相同的条件下比较,梯度下降在采样密度最低时相比Adam将保留集误差降低了43%到44%,同时有效秩也更低。

可应用场景

  • 在训练包含分解结构的模型时(例如低维嵌入,或注意力机制中查询-键的乘积),值得考虑优化器的选择不仅影响训练速度,还可能影响最终收敛解的复杂度。
  • 在从部分观测中恢复矩阵或图像的欠定补全任务中,梯度下降类优化器可能在不需要显式正则化的情况下找到更简单的解。
  • 在调试或复现Transformer注意力机制行为时,值得注意Adam可能会把坐标基上极其微小的差异放大为注意力头内部表示从第一步更新起就出现的巨大分歧。

局限与待验证事项

  • 实验局限于一个合成的40x40矩阵恢复任务、一个小型Transformer(2层、4个注意力头)以及两个高光谱图像数据集,尚未在大规模真实模型上验证同等程度的效应。
  • 作者指出这种低秩偏好效果较为温和,在真正需要更强正则化或需要Adam逐坐标自适应能力的任务上,它并不占优势。
  • 部分情况(如未调参的Shampoo、长退火的signum)被报告为严格两类划分的例外,而在超过n=256的更大规模问题上的一致性依赖于附录中的单独结果。
  • 有一种逐坐标方法(signSGD)在训练预算远超主实验所用的2x10^4步之后被报告最终能达到相近性能,说明'无法接近'更准确的说法应是'接近得更慢',而非彻底做不到。
  • 梯度下降和共享标量Adam的绝对误差数值受限于所选的学习率(步长),因此作者强调的是方法之间的相对排序,而非绝对数值本身。

为什么重要

模型内部坐标如何表示通常被当作无关紧要的实现细节,但这项研究表明,这一选择实际上决定了优化器最终收敛到众多同样能拟合数据的解中的哪一个。这对只根据训练损失来挑选优化器的人有实际意义,因为训练损失相同并不代表最终解的复杂度或泛化性相同。

本文术语

  • 规范对称性(gauge symmetry) · 在W=UV^T中同时用同一个正交矩阵旋转U和V,模型输出和损失都保持不变的性质
  • 规范等变性(gauge-equivariance) · 优化器的更新规则尊重上述旋转对称性,从旋转后的坐标出发也会得到相应旋转的训练轨迹
  • 低秩偏好(low-rank bias) · 在欠定问题中,训练倾向于收敛到更简单(秩更低)的解,而不是任意能拟合数据的解
  • 有效秩(effective rank) · 基于奇异值分布熵定义的指标,衡量一个矩阵实际上有多复杂
  • 谱尾(spectral tail) · 目标矩阵中位于低秩部分之外、剩余能量所占的比例

论文原文摘要(英文)

Gradient descent on a factored model W = UV^top is implicitly biased toward low-rank solutions, while Adam, starting from the same small initialization, is not. We trace the difference to the gauge symmetry of the loss, its invariance under (U, V) mapsto (UQ, VQ). Gradient flow's low-rank mechanism is available to an optimizer only if that optimizer is gauge-equivariant, a condition necessary for the transfer but not sufficient for low-rank recovery. Gradient descent, momentum, "shared-scalar" Adam, Muon, and Shampoo satisfy it. Adam, RMSProp, and the other coordinate-wise methods do not. A structure theorem characterizes the memoryless equivariant rules as exactly the Gram-determined left preconditioners, and a transfer theorem carries gradient flow's pathwise properties to common-scalar flows. We then sort nine update rules on underdetermined matrix sensing by recovery error against the planted ground truth. A one-parameter family from coordinate-wise to shared-scalar preconditioning restores the bias monotonically, isolating anisotropy as the cause. A "spectral schedule" reconciles two opposing reports about Muon: equal-rate updates recover exactly low-rank targets but lose their edge as the spectral tail grows. In transformers, Adam separates two gauge-equivalent initializations at the first step, where the equivariant optimizers stay at float precision, and ends with the per-head invariants W_Q^top W_K 56% apart in relative Frobenius distance, a gap no per-head rotation can close. On two hyperspectral datasets at matched training loss, gradient descent cuts held-out error by 43-44% at the lowest sampling density, and at lower effective rank. Basis choice is therefore not a tuning detail but a decision about which interpolant the optimizer selects.

作者 · Devender Singh

在 arXiv 阅读

最新论文

全部论文 →

METAL LAB 最新报道

图片来源: Devender Singh et al., arXiv:2608.05136, CC BY 4.0