arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.20936cs.CLcs.AI
收藏

在词级上比较变换器和混合模型

Comparing Transformers and Hybrid Models at the Token Level

Allen Institute for AI(艾伦人工智能研究所)

Yanhong Li, William Merrill

AI总结:

本文通过对比混合模型与纯变换器在词级上的表现,揭示了混合模型在处理开放类词汇时的优势,以及在语义状态利用和n-gram复制任务中的不同表现。

摘要:

混合语言模型结合了注意力机制和循环层,已显示出潜力:理论上,循环层可以缓解纯变换器在状态跟踪上的局限,经验上,混合模型在损失和下游评估中优于纯变换器。然而,尚不清楚哪些数据或能力推动了这些收益,以及这些收益在多大程度上反映了混合模型理论优势。我们利用Olmo 3和Olmo Hybrid的开放权重进行研究:我们比较了匹配变换器和混合模型在相同目标词上的损失,按自然词标签、复制特征、分隔符结构和受控合成探针进行分层分析。混合模型在大多数标签家族上具有较低的损失,但收益并不均匀:开放类内容词的收益最大,而许多闭合类功能词的收益较小。在散文、代码和标记中,混合模型在打开分隔符上的损失优势大于对应关闭分隔符,而在重复n-gram上几乎消失。合成探针显示了相同的结果:混合模型在代词记忆和实体跟踪任务中占优,而变换器在需要选择关闭分隔符的括号匹配任务中占优。这些模式表明,混合模型中的循环层提高了利用文档语义状态的预测,而注意力机制则帮助预测可由n-gram复制或语法括号匹配预测的词。我们最后通过概念验证的过滤评估展示了词级分解如何增强混合架构的预训练诊断。

英文摘要:

Hybrid language models that mix attention and recurrent layers have shown promise: theoretically, recurrent layers ameliorate the limitations of pure transformers on state tracking, and empirically, hybrids can outperform pure transformers in loss and downstream evaluations \citep{waleffe2024empirical,merrill2026olmohybrid}. Yet it remains unclear which data or capabilities drive these gains, and to what degree they reflect the theoretical advantages motivating hybrid models. We address this question using the open weights from Olmo 3 \citep{olmo2025olmo3} and Olmo Hybrid \citep{merrill2026olmohybrid}: we compare the loss of a matched transformer and hybrid at the same target tokens under the same prefixes, stratifying the results by natural token tags, copy features, delimiter structure, and controlled synthetic probes. The hybrid has lower loss on most tag families, but the gains are not uniform: they are largest for open-class content words and smaller for many closed-class function words. Across prose, code, and markup, the hybrid's loss advantage is larger on opening delimiters than on the corresponding closing delimiters, and nearly vanishes on repeated $n$-grams. Synthetic probes show the same split: the hybrid is favored on pronoun-memory and entity-tracking tasks, whereas the transformer is favored on bracket-matching tasks that require choosing closing delimiters. These patterns suggest that the recurrent layers in hybrids improve predictions that leverage the semantic state of a document, whereas attention helps on tokens predictable by $n$-gram copying or syntactic bracket matching. We conclude with proof-of-concept filtered evaluations showing how token-level decompositions can sharpen pretraining diagnostics for hybrid architectures.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑