Transformer训练的谱生命周期:瞬态压缩波、持久谱梯度以及Q/K--V不对称性
The Spectral Lifecycle of Transformer Training: Transient Compression Waves, Persistent Spectral Gradients, and the Q/K--V Asymmetry
AI总结:
本文系统研究了Transformer预训练过程中权重矩阵奇异值谱,发现瞬态压缩波、持久谱梯度和Q/K--V不对称性现象,并提出了双时间尺度动态模型和缩放定律。
摘要:
我们首次系统研究了Transformer预训练过程中权重矩阵奇异值谱,追踪了三个模型规模(30M-285M参数)中每种权重矩阵在25步间隔内的完整SVD分解。我们发现三种现象:(1)瞬态压缩波:稳定秩压缩作为从早期到晚期层的行波传播,产生剧烈梯度,早期峰值后反转——晚期层最终过度压缩超过早期层。(2)持久谱梯度:功率律指数α形成永久深度梯度,在更深模型中形成非单调倒U形,峰值随深度增加向早期层移动。(3)Q/K--V功能不对称性:值/输出投影均匀压缩,而查询/键投影承载完整的深度依赖动态。瞬态压缩与持久谱形状的分离揭示了秩和谱形状编码了关于训练的不同基本信息。我们将其形式化为双时间尺度动态模型,并推导出缩放定律(Δα∝L^{0.26}, R²=0.99)。我们验证了九个模型在三个家族(自定义、GPT-2、Pythia;30M-1B参数;8-36层)上的结果,证明α预测层重要性(ρ=0.69-0.84,p<0.02),并展示谱引导剪枝在两个家族(GPT-2 124M-774M,Pythia 160M-1B)的七种模型中优于Last-N启发法,剪枝效果提升1.1倍至3.6倍,最差与最佳差距达23.7倍,确认了谱结构的因果作用。
英文摘要:
We present the first systematic study of weight matrix singular value spectra \emph{during} transformer pretraining, tracking full SVD decompositions of every weight matrix at 25-step intervals across three model scales (30M--285M parameters). We discover three phenomena: \textbf{(1)~Transient Compression Waves:} stable rank compression propagates as a traveling wave from early to late layers, creating a dramatic gradient that peaks early then \emph{reverses} -- late layers eventually over-compress past early layers. \textbf{(2)~Persistent Spectral Gradients:} the power-law exponent~$α$ develops a permanent depth gradient forming a non-monotonic inverted-U in deeper models, with peaks shifting toward earlier layers as depth increases. \textbf{(3)~Q/K--V Functional Asymmetry:} value/output projections compress uniformly while query/key projections carry the full depth-dependent dynamics. The dissociation between transient compression and persistent spectral shape reveals that \emph{rank and spectral shape encode fundamentally different information about training}. We formalize this as a two-timescale dynamical model and derive scaling laws ($Δα\propto L^{0.26}$, $R^2{=}0.99$). We validate on nine models across three families (custom, GPT-2, Pythia; 30M--1B parameters; 8--36 layers), demonstrate that $α$ predicts layer importance ($ρ{=}0.69$--$0.84$, $p{<}0.02$), and show that spectral-guided pruning outperforms Last-N heuristics by $1.1{\times}$--$3.6{\times}$ across seven models in two families (GPT-2 124M--774M, Pythia 160M--1B), with worst-vs-best gaps up to $23.7{\times}$ confirming the causal role of spectral structure.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。