The Validation Gap: A Mechanistic Analysis of How Language Models Compute Arithmetic but Fail to Validate It
DISI, University of Trento(特伦托大学DISI中心);MaiNLP, Center for Information and Language Processing, LMU Munich(慕尼黑大学信息与语言处理中心);Munich Center for Machine Learning (MCML), Munich, Germany(慕尼黑机器学习中心);Free University of Bozen-Bolzano, Italy(博兹纳自由大学)
Leonardo Bertolazzi, Philipp Mondorf, Barbara Plank, Raffaella Bernardi
The ability of large language models (LLMs) to validate their output and identify potential errors is crucial for ensuring robustness and reliability. However, current research indicates that LLMs struggle with self-correction, encountering significant challenges in detecting errors. While studies have explored methods to enhance self-correction in LLMs, relatively little attention has been given to understanding the models' internal mechanisms underlying error detection. In this paper, we present a mechanistic analysis of error detection in LLMs, focusing on simple arithmetic problems. Through circuit analysis, we identify the computational subgraphs responsible for detecting arithmetic errors across four smaller-sized LLMs. Our findings reveal that all models heavily rely on $\textit{consistency heads}$--attention heads that assess surface-level alignment of numerical values in arithmetic solutions. Moreover, we observe that the models' internal arithmetic computation primarily occurs in higher layers, whereas validation takes place in middle layers, before the final arithmetic results are fully encoded. This structural dissociation between arithmetic computation and validation seems to explain why smaller-sized LLMs struggle to detect even simple arithmetic errors.
Bandung Fe Institute & Adjunct Science Fellow in InaAI(巴旦格Fe研究所及InaAI兼职科学研究员);AI Research Center IT Del & Bandung Fe Institute(IT Del人工智能研究中心及巴旦格Fe研究所)
Mechanistic Evidence for Faithfulness Decay in Chain-of-Thought Reasoning
Fordham University(福特汉姆大学);Algoverse AI Research(Algoverse AI研究);Rice University(稻子大学);UC San Diego(圣地亚哥大学);Santa Clara University(圣克拉拉大学);LMU Munich(慕尼黑路德维希-马克西米利安大学)
Weight Patching: Toward Source-Level Mechanistic Localization in LLMs
Key Laboratory of Ministry of Education for Brain Inspired Intelligent Perception and Cognition, University of Science and Technology of China(教育部脑科学与智能感知认知重点实验室,中国科学技术大学)
Shattered Compositionality: Counterintuitive Learning Dynamics of Transformers for Arithmetic
University of Wisconsin–Madison(威斯康星大学麦迪逊分校);Department of Computer Sciences, University of Wisconsin–Madison(威斯康星大学麦迪逊分校计算机科学系);Department of Statistics, University of Wisconsin–Madison(威斯康星大学麦迪逊分校统计学系)
Mathematical Reasoning for Unmanned Aerial Vehicles: A RAG-Based Approach for Complex Arithmetic Reasoning
Department of Computer Science(计算机科学系);Institute For Artificial Intelligence(人工智能研究所);Hamm-Lippstadt University of Applied Sciences(哈姆-利普施塔特应用科学大学);University of Stuttgart(斯图加特大学)
Language Models Learn Universal Representations of Numbers and Here's Why You Should Care
R&D Centre for Large Language Models, National Institute of Informatics, Japan(日本信息处理国家研究所大型语言模型研发中心);University of Helsinki(赫尔辛基大学);IT University of Copenhagen(哥本哈根IT大学);Kempelen Instutite of Information Technology(凯普莱恩信息科技研究所);IECL-ATILF, Université de Lorraine - ICANS Strasbourg(洛林大学IECL-ATILF - 斯特拉斯堡ICANS);MaiNLP, Center for Information and Language Processing, LMU Munich(慕尼黑技术大学MaiNLP,信息与语言处理中心);Munich Center for Machine Learning (MCML)(慕尼黑机器学习中心(MCML));University College London(伦敦大学学院)
StreetMath: Study of LLMs' Approximation Behaviors
LuxMuse AI(LuxMuse人工智能公司);Department of Electrical and Computer Engineering, North Carolina State University(北卡罗来纳州立大学电气与计算机工程系);Department of Mathematics, University of Waterloo(滑铁卢大学数学系);Vokram Group(Vokram集团);Department of Computer Science, Saint Louis University(圣路易斯大学计算机科学系)
National University of Singapore(新加坡国立大学);SAP Asia Pte Ltd(SAP亚洲私人有限公司);Nanyang Technological University(南洋理工大学);Singapore Institute of Technology(新加坡理工大学)