arXiv:2603.18029cs.LGcs.AI2026-03

通过分层监督让Transformer模型具备可验证的模块化结构。

Engineering Verifiable Modularity in Transformers via Per-Layer Supervision

  • 采用分层监督与门控注意力,使每一层获得独立梯度信号。
  • 消融实验效果提升5到23倍,行为控制力增强4倍。
  • 适合追求模型可解释性与可控性的研究者使用。

Transformer 模型难以实现精确控制:关键注意力头被移除后,行为变化微小,因分布式冗余补偿了损伤。这种‘九头蛇效应’使可解释性成为空谈。本文提出通过双流处理分离标记与上下文表示、分层监督提供各层独立梯度信号、门控注意力引导离散激活模式等架构干预,暴露隐藏的模块性。在分层监督训练下,模型的消融效应比对照组大5至23倍;对特定注意力头进行缩放时,输出变化平滑且可预测,控制力提升4倍。关键发现是:无分层监督时,消融效应方差极低(标准差0.63%),而有分层监督时方差显著上升至6.32%,揭示出依赖于特定电路的预测。该差异并非噪声,而是未遮蔽模块性的标志。通过三方面验证:捕捉计算动态而非词汇结构的特征(与原始激活聚类相关性近零)、支持模块化正向控制的架构设计,以及因果实验证明不同任务通过不同注意力头路由。这为将可解释性从被动观察转向主动控制提供了方法论。

原文摘要 · Abstract (English)

Transformers resist surgical control. Ablating an attention head identified as critical for capitalization produces minimal behavioral change because distributed redundancy compensates for damage. This Hydra effect renders interpretability illusory: we may identify components through correlation, but cannot predict or control their causal role. We demonstrate that architectural interventions can expose hidden modularity. Our approach combines dual-stream processing separating token and contextual representations, per-layer supervision providing independent gradient signal at each depth, and gated attention regularizing toward discrete activation patterns. When trained with per-layer supervision, models produce ablation effects 5 to 23 times larger than architecturally identical controls trained with standard objectives. This enables 4 times greater control leverage on targeted behaviors: scaling identified attention heads produces smooth, predictable changes in model output. The key finding is architectural. Without per-layer supervision, ablation damage concentrates near zero with low variance (Winograd standard deviation 0.63%). With per-layer supervision, effects spread widely (standard deviation 6.32%), revealing which predictions depend on which circuits. The larger variance is not measurement noise but the signature of unmasked modularity. We validate our approach through three components: engineered features that capture computational dynamics rather than vocabulary structure (validated by near-zero correlation with raw activation clustering), an architecture providing positive control for modularity, and causal experiments demonstrating functional reorganization where different tasks route through different attention heads. This es tablishes a methodology for transforming interpretability from passive observation to active control.

模块化可解释性Transformer控制

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