現代トランスフォーマーアーキテクチャにおける残留ストリーム双対性
Residual Stream Duality in Modern Transformer Architectures
March 17, 2026
著者: Yifan Zhang
cs.AI
要旨
近年の研究により、残差経路は単なる最適化のための配管ではなく、モデルの表現機構の一部であることが明らかになってきました。我々もこれに同意しますが、この設計空間を整理する最も明確な方法は、Transformerを2軸の視点で捉えることだと主張します。デコーダは、系列位置と層深度という2つの順序付けられた次元に沿って情報を進化させます。自己注意機構は既に系列軸に沿った適応的な混合を提供しますが、残差ストリームは通常、深度軸に沿った固定加算を実行します。トークン位置を固定し、層インデックスを順序変数として扱う場合、因果的深度方向残差注意読み取りは、系列方向ではなく深度方向に記述される点を除けば、因果的短縮スライディングウィンドウ注意(ShortSWA)と全く同じ局所演算子となります。これがTransformer^2の背後にある核心的な残差ストリーム双対性です。
この視点は最近の研究動向も明確にします。ELC-BERTとDenseFormerは既に、深度にわたる学習済み集約が均一な残差累積を凌駕し得ることを示しています。一方、Vertical Attention、DeepCrossAttention(DCA)、MUDDFormer、Attention Residualsは、より初期の層に対する明示的な注意ベースのルーティングへとさらに進んでいます。しかし重要な点は、演算子レベルの双対性がシステムレベルの対称性を意味するわけではないことです。大規模自己回帰モデルでは、系列軸のShortSWAは、トークン側のスライディングウィンドウカーネル、KVキャッシュのレイアウト、チャンク化された実行を再利用できるため、通常よりハードウェアフレンドリーな配置となります。目的がショートカットそのものを変更することであるならば、Deep Delta Learning(DDL)は、別個の層間検索経路を追加するのではなく、残差演算子を直接修正するため、より明確な介入手法となります。したがって、我々の提言は単純です:関心の対象がショートカット自体である場合はDDLを、局所的な適応的混合が目的である場合は系列軸のShortSWAを使用することです。
English
Recent work has made clear that the residual pathway is not mere optimization plumbing; it is part of the model's representational machinery. We agree, but argue that the cleanest way to organize this design space is through a two-axis view of the Transformer. A decoder evolves information along two ordered dimensions: sequence position and layer depth. Self-attention already provides adaptive mixing along the sequence axis, whereas the residual stream usually performs fixed addition along the depth axis. If we fix a token position and treat layer index as the ordered variable, then a causal depth-wise residual attention read is exactly the same local operator as causal short sliding-window attention (ShortSWA), except written over depth rather than over sequence. This is the core residual stream duality behind Transformer^2. This perspective also clarifies the recent literature. ELC-BERT and DenseFormer already show that learned aggregation over depth can outperform uniform residual accumulation, while Vertical Attention, DeepCrossAttention (DCA), MUDDFormer, and Attention Residuals move further toward explicit attention-based routing over earlier layers. The key point, however, is that operator-level duality does not imply systems-level symmetry. For large-scale autoregressive models, sequence-axis ShortSWA is usually the more hardware-friendly placement because it reuses token-side sliding-window kernels, KV-cache layouts, and chunked execution. If the goal is instead to change the shortcut itself, Deep Delta Learning (DDL) is the cleaner intervention because it modifies the residual operator directly rather than adding a separate cross-layer retrieval path. Our recommendation is therefore simple: use DDL when the shortcut is the object of interest, and use sequence-axis ShortSWA when the goal is local adaptive mixing.