paper-with-me

홈 › Papers

Assign and Add: A Mechanistic Study of Compositional Arithmetic

2026-05-29 · Brady Exoo, Alberto Bietti, John Sous arxiv

Large language models are able to compose skills in order to perform complex tasks, many of which might not have been seen during training. The details of how exactly this composition occurs remain elusive. In this paper, we study a mechanism for compositional generalization in transformers by considering a simple controlled setting involving variable assignment and modular addition. By partitioning our training data into disjoint sets, we observe that small transformers are able to generalize to previously unseen combinations of variables and numbers. Our mechanistic analysis shows that the same ``modular addition'' MLP module is used whether the inputs are given directly or indirectly through a separate variable assignment mechanism. We also analyze the training dynamics from an empirical lens, which reveals three phases of learning: first, modular addition is learned, then the structure required for variable assignment, and finally a refinement phase where the model generalizes to some hard sequences not seen in training. Finally, we provide a theoretical framework to explain how compositionality emerges from training dynamics. These results suggest that compositional generalization can be a natural consequence of the compositionality of internal mechanisms in~transformers.

📄 PDF Abstract BibTeX arXiv:2605.31497

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Early-Warning Signals of Grokking via Loss-Landscape Geometry

2026-02-19 · Yongzhong Xu arxiv

Grokking -- the abrupt transition from memorization to generalization after prolonged training -- has been linked to confinement on low-dimensional execution manifolds in modular arithmetic. Whether this mechanism extend…

Do Deep Neural Networks Capture Compositionality in Arithmetic Reasoning?

2023-02-15 · Keito Kudo, Yoichi Aoki, Tatsuki Kuribayashi, Ana Brassard 외

Compositionality is a pivotal property of symbolic reasoning. However, how well recent neural models capture compositionality remains underexplored in the symbolic reasoning tasks. This study empirically addresses this q…

Arithmetic Reasoning

Do VLMs Have Bad Eyes? Diagnosing Compositional Failures via Mechanistic Interpretability

2025-08-20 · Ashwath Vaithinathan Aravindan, Abha Jha, Mihir Kulkarni arxiv

Vision-Language Models (VLMs) have shown remarkable performance in integrating visual and textual information for tasks such as image captioning and visual question answering. However, these models struggle with composit…

Visual Question AnsweringImage Captioning

The Validation Gap: A Mechanistic Analysis of How Language Models Compute Arithmetic but Fail to Validate It

2025-02-17 · 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-corr…

From Mechanistic to Compositional Interpretability

2026-05-09 · Ward Gauderis, Thomas Dooms, Steven T. Homer, Kola Ayonrinde 외 arxiv

Mechanistic interpretability aims to explain neural model behaviour by reverse-engineering learned computational structure into human-understandable components. Without a formal framework, however, mechanistic explanatio…