双流变压器:用于可解释语言模型的通道化架构
The Dual-Stream Transformer: Channelized Architecture for Interpretable Language Modeling
AI总结:
双流变压器通过分解残差流为两个功能组件,实现可解释性与性能之间的权衡,适用于可解释语言模型。
摘要:
标准变压器将所有计算集中在单一残差流中,模糊了各组件执行的功能。我们引入了双流变压器,将残差流分解为两个功能不同的组件:由注意力更新的标记流和由前馈网络更新的上下文流。注意力头之间的信息流动通过多级混合策略进行控制,从完全独立(最大可解释性)到密集(标准变压器行为)。这种设计暴露了一个可调节的可解释性与性能之间的权衡。我们在2900万参数的语言建模任务上测量了这种权衡。完全独立的头混合相对于密集基线增加了8%的验证损失。推荐的Kronecker混合策略,允许头之间进行标量通信同时保持头内结构,仅导致2.5%的损失。所有配置在注意力放大(推理时通过因子高达16缩放对数几率)下保持功能生成,退化范围从16%到27%。这种鲁棒性表明架构学习了独立于软概率混合的离散算法。该架构为可解释语言模型提供了基础,其中内部结构是通过设计暴露的。
英文摘要:
Standard transformers entangle all computation in a single residual stream, obscuring which components perform which functions. We introduce the Dual-Stream Transformer, which decomposes the residual stream into two functionally distinct components: a token stream updated by attention and a context stream updated by feed-forward networks. Information flow between attention heads is controlled through a hierarchy of mixing strategies, from fully independent (maximum interpretability) to dense (standard transformer behavior). This design exposes a tunable tradeoff between interpretability and performance. We measure this tradeoff on language modeling tasks at 29M parameters. Fully independent head mixing increases validation loss by 8\% relative to dense baselines. The recommended Kronecker mixing strategy, which permits scalar communication between heads while preserving within-head structure, costs only 2.5\%. All configurations maintain functional generation under attention amplification (scaling logits by factors up to 16 at inference time), with degradation ranging from 16\% to 27\%. This robustness suggests the architectures learn discrete algorithms that operate independently of soft probabilistic mixing. The architecture provides a foundation for interpretable language models where internal structure is exposed by design. \footnote{This work was partially supported by DARPA Contract HR001125C0302.}
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。