Interpreting Affine Recurrence Learning in GPT-style Transformers
Not on the map. Why?
Abstract (arXiv)
Understanding the internal mechanisms of GPT-style transformers, particularly their capacity to perform in-context learning (ICL), is critical for advancing AI alignment and interpretability. In-context learning allows transformers to generalize during inference without modifying their weights, yet the precise operations driving this capability remain largely opaque. This paper presents an investigation into the mechanistic interpretability of these transformers, focusing specifically on their ability to learn and predict affine recurrences as an ICL task. To address this, we trained a custom three-layer transformer to predict affine recurrences and analyzed the model's internal operations using both empirical and theoretical approaches. Our findings reveal that the model forms an initial estimate of the target sequence using a copying mechanism in the zeroth layer, which is subsequently refined through negative similarity heads in the second layer. These insights contribute to a deeper understanding of transformer behaviors in recursive tasks and offer potential avenues for improving AI alignment through mechanistic interpretability. Finally, we discuss the implications of our results for future work, including extensions to higher-dimensional recurrences and the exploration of polynomial sequences.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 6 of its 12 references that are in the map. First posted on arXiv 22 Oct 2024.
Builds on
6 of 12 references.
References · 6
- 2023A Survey of Large Language Modelscited by 2,537
- 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
- 2023Towards Automated Circuit Discovery for Mechanistic Interpretabilitycited by 700
- 2021Pretrained Language Models for Text Generation: A Surveycited by 95
- 2024Thousands of AI Authors on the Future of AIcited by 48
Built on by
Not cited yet.