Mathematical reasoning in large language models (LMs) has garnered significant attention in recent work, but there is a limited understanding of how these models process and store information related to arithmetic tasks within their architecture. In order to improve our understanding of this aspect of language models, we present a mechanistic interpretation of Transformer-based LMs on arithmetic questions using a causal mediation analysis framework. By intervening on the activations of specific model components and measuring the resulting changes in predicted probabilities, we identify the subset of parameters responsible for specific predictions. This provides insights into how information related to arithmetic is processed by LMs. Our experimental results indicate that LMs process the input by transmitting the information relevant to the query from mid-sequence early layers to the final token using the attention mechanism. Then, this information is processed by a set of MLP modules, which generate result-related information that is incorporated into the residual stream. To assess the specificity of the observed activation dynamics, we compare the effects of different model components on arithmetic queries with other tasks, including number retrieval from prompts and factual knowledge questions.(1)
机构:
Williams Coll, Dept Math & Stat, Williamstown, MA 01267 USAWilliams Coll, Dept Math & Stat, Williamstown, MA 01267 USA
Cai, Xizhen
Zhu, Yeying
论文数: 0引用数: 0
h-index: 0
机构:
Univ Waterloo, Dept Stat & Actuarial Sci, Waterloo, ON N2L 3G1, CanadaWilliams Coll, Dept Math & Stat, Williamstown, MA 01267 USA
Zhu, Yeying
Huang, Yuan
论文数: 0引用数: 0
h-index: 0
机构:
Yale Sch Publ Hlth, Dept Biostat, New Haven, CT 06511 USA
Sre 815,60 Coll St, New Haven, CT 06520 USAWilliams Coll, Dept Math & Stat, Williamstown, MA 01267 USA
Huang, Yuan
Ghosh, Debashis
论文数: 0引用数: 0
h-index: 0
机构:
Colorado Sch Publ Hlth, Dept Biostat & Informat, Aurora, CO 80045 USAWilliams Coll, Dept Math & Stat, Williamstown, MA 01267 USA
机构:
Weill Cornell Med, Dept Pathol & Lab Med, 525 E 68th St,F707, New York, NY 10065 USAWeill Cornell Med, Dept Pathol & Lab Med, 525 E 68th St,F707, New York, NY 10065 USA
Yang, He S.
Li, Jieli
论文数: 0引用数: 0
h-index: 0
机构:
Ohio State Univ, Wexner Med Ctr, Dept Pathol, Columbus, OH USAWeill Cornell Med, Dept Pathol & Lab Med, 525 E 68th St,F707, New York, NY 10065 USA
Li, Jieli
Yi, Xin
论文数: 0引用数: 0
h-index: 0
机构:
Weill Cornell Med, Dept Pathol & Lab Med, 525 E 68th St,F707, New York, NY 10065 USA
Houston Methodist Hosp, Dept Pathol & Genom Med, Houston, TX USAWeill Cornell Med, Dept Pathol & Lab Med, 525 E 68th St,F707, New York, NY 10065 USA
Yi, Xin
Wang, Fei
论文数: 0引用数: 0
h-index: 0
机构:
Weill Cornell Med, Dept Populat Hlth Sci, New York, NY USAWeill Cornell Med, Dept Pathol & Lab Med, 525 E 68th St,F707, New York, NY 10065 USA