通过逐层监督在Transformer中工程化可验证的模ularity
Engineering Verifiable Modularity in Transformers via Per-Layer Supervision
AI总结:
本文通过逐层监督和双流处理,揭示Transformer内部隐藏的模块化结构,实现对模型行为的更精确控制。
摘要:
Transformer模型难以实现精确的控制。移除被识别为关键的注意力头后,行为变化较小,因为分布式冗余能够补偿损伤。这种Hydra效应使可解释性变得虚幻:我们可以通过相关性识别组件,但无法预测或控制其因果作用。我们证明了架构干预可以揭示隐藏的模块化结构。我们的方法结合了双流处理,将标记和上下文表示分开,逐层监督提供每层独立的梯度信号,以及门控注意力正则化,使其趋向于离散的激活模式。当使用逐层监督训练时,模型产生的移除效果比用标准目标训练的架构相同对照组大5到23倍。这使在目标行为上获得4倍更大的控制能力:扩展识别的注意力头会产生平滑、可预测的模型输出变化。关键发现是架构性的。没有逐层监督,移除损伤集中在零附近,方差较低(Winograd标准差0.63%)。有逐层监督时,效果广泛分布(标准差6.32%),揭示了哪些预测依赖于哪些电路。更大的方差不是测量噪声,而是未遮蔽模块化的特征。我们通过三个组成部分验证了我们的方法:工程化特征,捕捉计算动态而非词汇结构(通过接近零的相关性与原始激活聚类验证),提供模块化正控的架构,以及因果实验,展示不同任务通过不同注意力头重新组织功能。这建立了一种将可解释性从被动观察转变为主动控制的方法。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。