Separators Make Carry Propagation Learnable:The Geometry of Latent Carry in a Multiplication Transformer

📄 arXiv: 2610.06605v1 📥 PDF

作者: Sama Satariyan, Raphael Cousin, G{é}rard Biau

分类: cs.LG

发布日期: 2026-10-05


💡 一句话要点

提出分隔符使得乘法变换器中的进位传播可学习

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 变换器 进位传播 多位数字乘法 深度学习 自然语言处理 模型训练 激活补丁 算术运算

📋 核心要点

  1. 现有的变换器模型在处理多位数字乘法时表现不佳,常常依赖输入范围启发式而非明确的进位机制。
  2. 论文提出通过在数字之间插入分隔符来改善模型的学习效果,使得进位信息能够被有效编码和传播。
  3. 实验结果显示,插入空格符后模型的准确率从1%提升至89%,并且进位信息的传递在模型内部得到了验证。

📝 摘要(中文)

在这篇论文中,作者探讨了变换器在单次前向传播中处理多位数字乘法时的失败现象,并指出预训练语言模型在算术运算中依赖输入范围启发式而非明确的进位。通过从头训练小型Llama风格的变换器,作者发现数字之间插入空格符显著提高了准确率,从1%提升至89%。模型内部的分隔符令牌编码了进位信息,并通过激活补丁技术验证了这一状态在最后一层之前的因果使用。

🔬 方法详解

问题定义:论文要解决的问题是变换器在处理多位数字乘法时的失败,现有方法往往依赖输入范围启发式而非明确的进位机制,导致准确率低下。

核心思路:论文的核心思路是通过在数字之间插入分隔符来改善模型的学习效果,使得进位信息能够被有效编码和传播,进而提高乘法运算的准确性。

技术框架:整体架构包括一个小型Llama风格的变换器,模型通过训练学习数字之间的关系,分隔符令牌用于编码进位信息,激活补丁技术用于验证信息的传递。

关键创新:最重要的技术创新点在于引入了分隔符令牌,使得进位信息能够在模型内部以角度的形式编码,从而实现可学习的进位传播,这与现有方法的显著区别在于其明确的进位处理机制。

关键设计:在模型设计中,分隔符令牌的设置至关重要,预测每个数字的预测槽编码了进位信息,且模型的训练过程中采用了特定的损失函数和网络结构,以确保进位信息的有效传递。

🖼️ 关键图片

img_0
img_1
img_2

📊 实验亮点

实验结果显示,插入空格符后,模型在4x4乘法任务上的准确率从1%提升至89%。此外,通过激活补丁技术,模型在传递进位信息方面的有效性得到了验证,最高可达84%的成功率,显示出该方法在处理长距离依赖时的优势。

🎯 应用场景

该研究的潜在应用领域包括教育技术、自动化计算和自然语言处理等。通过改进变换器在算术运算中的表现,可以为智能计算工具的开发提供更强的基础,提升其在实际应用中的准确性和可靠性。未来,这一研究可能推动更复杂的算术运算和逻辑推理能力的实现。

📄 摘要(原文)

Transformers asked to multiply multi-digit numbers in a single forward pass often fail, and interpretability studies of pretrained language models find arithmetic solved by input-range heuristics rather than by an explicit carry. We train small Llama-style transformers from scratch on 4x4 multiplication without chain of thought and find that the input format is decisive: inserting a space token between digits raises exact-match accuracy from 1% to 89%. Output positions are learned in carry-chain order, with the middle digits, which have the longest-range dependencies, learned last. Inside the model, the separator token that predicts each digit (its prediction slot) encodes the carry-in as an angle on a ring in the residual stream; examples with more distinct carry values fill more of the ring. Activation patching between examples matched on the column sum shows that this state is causally used before the last layer: patching the prediction slot alone transfers the source carry in up to 84% of cases after block 4 for one middle column of our best model, while for other columns the carry is first assembled at the neighboring answer slot before reaching its own. Remaining errors are almost always off by one, consistent with a small error on the carry or on the circular digit code.