arXiv:2608.22117cs.LGcs.CL2026-08

用跨标记门控机制统一注意力与前馈,提升语言建模性能。

TANGO: Token-Aggregated Nonlinear Gating Operators for Natural and Formal Language Modeling

  • 用门控加权聚合源标记信息,统一处理自注意力与前馈网络
  • 在多个数据集上优于同类模型,尤其在长序列任务中表现突出
  • 适合追求高效长序列建模的开发者,尤其关注计算复杂度优化

标准Transformer将跨标记交互与独立位置的非线性前馈网络分离。本文提出TANGO(Token-Aggregated Nonlinear Gating Operators)模型,以单一跨标记门控残差更新替代上述两个子层。每个源标记生成一个SwiGLU门控向量,通过查询-键相似性加权平均得到目标标记的门控信号,进而调节目标特征投影。TANGO对每个因果可见的源分配独立权重,序列长度复杂度为二次。WANGO模型(Windowed Aggregation of Nonlinear Gating Operators)在固定窗口内保留原始得分,并对旧标记使用正特征映射前缀统计,实现固定维度下序列长度的线性复杂度。所有模型参数量约44.3M,经三轮匹配训练。TANGO、WANGO与递归Transformer++各使用一次共享块四次;其余架构采用四个独立块。TANGO在FineWeb-Edu、Lean和DeepMind Mathematics数据集上取得最低平均验证负对数似然,尽管其前向传播操作次数最多。WANGO在所有线性复杂度模型中,于FineWeb-Edu上表现最佳,且在几乎相同计算量下超越递归Transformer++。

原文摘要 · Abstract (English)

A standard Transformer block separates cross-token interaction in self-attention from a nonlinear feed-forward network applied independently at each position. We introduce the TANGO model (Token-Aggregated Nonlinear Gating Operators), which replaces these two sublayers with one cross-token gated residual update. Each source token produces a SwiGLU gate vector. Query-key similarities determine a weighted average of source gates for each destination, and the resulting gate rescales projected destination features. TANGO assigns a separate weight to every causally visible source and is quadratic in sequence length. The WANGO model (Windowed Aggregation of Nonlinear Gating Operators) retains the same unnormalized scores within a recent window and uses positive feature-map prefix statistics for older sources, giving linear sequence-length complexity for fixed window and feature dimensions. We compare TANGO and WANGO with Recurrent and Untied Transformer++, full-attention GAU, and FLASH. All models have approximately 44.3M nonembedding parameters and are trained in three matched runs. TANGO, WANGO, and Recurrent Transformer++ apply one shared block four times; the other architectures use four independent blocks. TANGO obtains the lowest mean validation negative log-likelihood on FineWeb-Edu, Lean, and DeepMind Mathematics, although it has the largest analytical forward-pass operation count. WANGO obtains the lowest mean FineWeb-Edu NLL among the architectures with computation linear in sequence length and outperforms Recurrent Transformer++ at nearly the same analytical forward-pass multiply-accumulate count.

语言建模Transformer改进门控机制长序列处理

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