arXiv:2602.22600cs.LGcs.AI2026-02

发现Transformer模型共有的核心算法结构,揭示其深层计算规律。

Transformers converge to invariant algorithmic cores

  • 通过提取跨模型重复出现的紧凑算法子空间,揭示本质计算机制。
  • 不同规模语言模型中语法一致性由单一可操控轴控制,翻转即改变语法规则。
  • 发现泛化加速的反向缩放规律,为理解模型学习路径提供新视角。

训练选择的是行为而非电路结构:多个权重配置可实现相同功能。研究单一训练后的神经网络可能仅反映某次训练的偶然结果,而非计算本身。本文转向关注Transformer必须完成的任务,提出算法核心提取(ACE)方法,以隔离必要且充分的紧凑子空间,并在合成任务到大规模预训练模型中因果验证其存在与功能。马尔可夫链Transformer在近正交子空间中嵌入三维核心,但恢复相同的转移谱;模块加法模型在‘悟解’阶段形成紧凑循环核心,随后在持续正则化下膨胀,冗余分布相同计算至多个等效模式。该功能冗余被发现能加速从记忆到泛化的转变,产生反向缩放的悟解时间规律。在六种语言模型(从GPT-2 Small/Medium/Large到LLaMA-3.1、Gemma-2、Qwen2.5,跨越两个数量级规模)中,主谓一致由单一可调节轴控制,各架构间对齐显著。翻转该轴即可在开放式生成中反转语法数。这些结果表明,训练后Transformer表层复杂性之下存在更简单、共享的计算结构,而聚焦不变量而非参数化或可为机制理解与控制提供更可行路径。代码:https://github.com/joshseth/cores

原文摘要 · Abstract (English)

Training selects for behavior, not circuitry: many weight configurations can implement the same function. Studying any single trained neural network thus risks describing accidents of one training run rather than the computation itself. This work shifts focus from what transformers happen to do to what they must do by extracting algorithmic cores, compact subspaces that are necessary and sufficient for a task and that recur across independently trained models. Here, Algorithmic Core Extraction (ACE) is introduced to isolate these subspaces, causally validate them, and recover the algorithms they implement across settings ranging from synthetic tasks to large-scale pretrained models. Markov-chain transformers embed three-dimensional cores in nearly orthogonal subspaces yet recover identical transition spectra. Modular-addition transformers form compact cyclic cores at grokking that later inflate under continued regularization, redundantly distributing the same computation across many functionally equivalent modes. This functional redundancy is found to accelerate the transition from memorization to generalization, yielding an inverse scaling law for grokking time. In six language models spanning more than two orders of magnitude in scale (GPT-2 Small/Medium/Large, LLaMA-3.1, Gemma-2, and Qwen2.5), subject-verb agreement is governed by a single, steerable axis that aligns across architectures. Flipping this axis inverts grammatical number throughout open-ended generation. Together these results suggest that beneath the apparent complexity of trained transformers lies a simpler, shared computational structure, and that targeting invariants rather than parameterizations may offer a more tractable path to mechanistic understanding and control. Code: https://github.com/joshseth/cores

Transformer算法核心泛化机制可解释性

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。