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

理解Transformer中的加法

Understanding Addition in Transformers

Apart Research(阿帕特研究所);University of Oxford(牛津大学)

Philip Quirke, Fazl Barez

AI总结:

本文全面分析了执行n位整数加法的一层Transformer模型,发现其将任务分解为针对不同数位位置的并行算法流,并解释了高损失罕见场景,为模型可解释性提供了新见解。

摘要:

理解像Transformer这样的机器学习模型的内部机制对于其安全与合乎伦理的使用至关重要。本文对训练用于执行n位整数加法的一层Transformer模型进行了全面分析。研究结果表明,该模型将任务分解为专用于各个数位的并行流,并采用针对数字内不同位置量身定制的各种算法。此外,我们识别出一种以高损失为特征的罕见场景,并对此进行了解释。通过彻底阐明模型的算法,我们为其运作机制提供了新见解。这些发现通过严格的测试和数学建模得到了验证,从而为模型理解和可解释性等更广泛领域做出了贡献。我们的方法为分析更复杂的任务和多层Transformer模型打开了大门。

英文摘要:

Understanding the inner workings of machine learning models like Transformers is vital for their safe and ethical use. This paper provides a comprehensive analysis of a one-layer Transformer model trained to perform n-digit integer addition. Our findings suggest that the model dissects the task into parallel streams dedicated to individual digits, employing varied algorithms tailored to different positions within the digits. Furthermore, we identify a rare scenario characterized by high loss, which we explain. By thoroughly elucidating the model's algorithm, we provide new insights into its functioning. These findings are validated through rigorous testing and mathematical modeling, thereby contributing to the broader fields of model understanding and interpretability. Our approach opens the door for analyzing more complex tasks and multi-layer Transformer models.

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

↑