On the Similarity of Circuits across Languages: a Case Study on the Subject-verb Agreement Task
Javier Ferrando, Marta R.Costa-juss\`a

TL;DR
This study reveals that language models use highly consistent, language-independent circuits for subject-verb agreement across English and Spanish, with a causal influence demonstrated through interventions on the model's internal representations.
Contribution
It uncovers the universal and causal nature of circuits for subject-verb agreement in language models across multiple languages and model families.
Findings
Circuits are highly consistent across languages.
Subject number signal is represented as a direction in residual space.
Intervening on this direction can flip predicted verb number.
Abstract
Several algorithms implemented by language models have recently been successfully reversed-engineered. However, these findings have been concentrated on specific tasks and models, leaving it unclear how universal circuits are across different settings. In this paper, we study the circuits implemented by Gemma 2B for solving the subject-verb agreement task across two different languages, English and Spanish. We discover that both circuits are highly consistent, being mainly driven by a particular attention head writing a `subject number' signal to the last residual stream, which is read by a small set of neurons in the final MLPs. Notably, this subject number signal is represented as a direction in the residual stream space, and is language-independent. We demonstrate that this direction has a causal effect on the model predictions, effectively flipping the Spanish predicted verb number…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
Taxonomy
TopicsNatural Language Processing Techniques
MethodsSoftmax · Attention Is All You Need · Sparse Evolutionary Training
