Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit Emergence
Authors: Gouki Minegishi
Hiroki Furuta
Shohei Taniguchi
Yusuke Iwasawa
Yutaka Matsuo
Venue: ICML 2025 poster (2025)
Keywords: In Context Learning
Mechanistic Interpretability
Induction Head
Circuits
Primary area: social_aspects->accountability_transparency_and_interpretability
TL;DR: We uncover how Transformers gain meta-learning capabilities by analyzing their internal circuits in an extended copy task, revealing multiple distinct phase transitions that explain in-context learning beyond simple copying.

Abstract: Transformer-based language models exhibit In-Context Learning (ICL), where predictions are made adaptively based on context. 
While prior work links induction heads to ICL through a sudden jump in accuracy, this can only account for ICL when the answer is included within the context.
However, an important property of practical ICL in large language models is the ability to meta-learn how to solve tasks from context, rather than just copying answers from context; how such an ability is obtained during training is largely unexplored.
In this paper, we experimentally clarify how such meta-learning ability is acquired by analyzing the dynamics of the model's circuit during training. 
Specifically, we extend the copy task from previous research into an In-Context Meta Learning setting, where models must infer a task from examples to answer queries.
Interestingly, in this setting, we find that there are multiple phases in the process of acquiring such abilities, and that a unique circuit emerges in each phase, contrasting with the single-phases change in induction heads. 
The emergence of such circuits can be related to several phenomena known in large language models, and our analysis lead to a deeper understanding of the source of the transformer's ICL ability.

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit Emergence
Gouki Minegishi' Hiroki Furuta
Shohei Taniguchi Yusuke Iwasawa' Yutaka Matsuo
Abstract
learning in which only small number of examples in the context guide the model's response to a new query. Due to its unique capability, ICL has gained a lot of attention in the research community, and there have been several approaches such as Bayesian inference (Xie et al., 2021) and meta-gradiens descent (Von Oswald al., 2023) to uncover its underlying mechanisms.
Transformer-based language models exhibit In- Context Learning (ICL), where predictions are made adaptively based context. While prior work links induction heads to ICL through sud- den jump in accuracy, this can only account for ICL when the answer is included within the con- text. However, an important property of practical ICL in large language models is the ability to meta-learn how solve tasks from context, rather than just copying answers from context; how such ability is obtained during training is largely un- explored. In this paper, we experimentally clarify how such meta-learning ability is acquired by ana- lyzing the dynamics of the model's circuit during training. Specifically, we extend the copy task from previous research into an In-Context Meta Learning setting, where models must infer a task from examples answer queries. Interestingly, in this setting, we find that there are multiple phases in the process of acquiring such abilities, and that a unique circuit emerges in each phase, contrast- ing with the single-phases change in induction heads. The emergence of such circuits can be related to several phenomena known in large lan- guage models, and analysis lead deeper understanding of the source of the transformer's ICL ability.
One of the popular approaches to understanding ICL is mechanistic interpretability: reverse-engee engineering the com- putations performed by models (Elhage et al., 2021). A key focus within this framework is the study of circuits, sub- graphs with distinct functionality that serve as fundamental building blocks of neural network behavior (Wang al., 2022; Conmy et al., 2023a). Notably, Olsson et al. (2022) uncovered induction heads, specific circuit mechanism that plays crucial role in enabling ICL. Induction heads recognize the repeating pattern [A] [B] [A] within the context and predict [B] as the next token through a match-and-copy operation (Figure 1-(a)). The existence of induction heads is further investigated under more complex tasks, such as performing semantic matching (Ren al., 2024), serving subcomponents of circuits for natural lan- guage tasks within LLMs (Wang et al., 2022; Merullo et al., 2024), and engaging in intricate interactions with multi-head attention (Singh et al., 2024).
However, the copy mechanism as described in the induc- tion head explains only fraction of the few-shot ICL. Let consider, for instance, the following ICL scenario in Country-to-Capity task, based on Hendel et al. (2023):
1. Introduction
France
Paris,
Spain -> Madrid,
Japan
Transformer-baat language models (Vaswani et al., 2017) show an intriguing ability to perform In-Context Learning (ICL) (Brown et al., 2020; Xie et al., 2021; Garg et al., 2022; Dong et al., 2024). ICL is the ability to predict the response query based on context without any additional weight updates. A widely adopted application of ICL is few-shot
example
query prediction
It is well known that ICL can enhance performance this scenario however, this improvement cannot be explained merely by retrieving similar examples through induction heads. A straightforward way to explain this ability is to assume that the model infers the task from the examples and then uses this inferred task to make predictions. For example, Hendel et al. (2023); Todd et al. (2024) demon- strates that tasks are internally represented as vectors (i.e., task vectors) within the L.M., This task inference ability
"qqual contribution 'The University of Tokyo. Correspondence to: Gouki Minegishi <minegishi @ wtw.bb....tooo..c.......
Proceedings of the ndnd International Conference Machine Learning. Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s).

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit Emergence
recognized as a form of meta-learning (Min et al., 2022a). However, it remains unclear exactly what kind of circuit implements this meta-learning or how the circuit is acquired.
2. Related Works
2.1. In-Context Learning
Brown et al. (2020) demonstrated with GPT-3 the remark- able ability of LLMs to perform a wide range of tasks using only a few examples provided in the input prompt. Few-shot ICL is the ability of LLMs solve new tasks by examin- ing a sequence of (input, label) pairs that share a common concept within the context. Rather than updating their internal parameters, these models rely solely on the contextual examples to deduce the task's rules.
In this study, our goal is to elucidate how such meta- meta-learning capability is acquired. To that end, we extend the copy task from previous research (Reddy, 2023) to a problem setting, which we call In- mn-Context Meta-Learnigg (ICML) setting, that requires task inference. We then train simplified trans- former on this extended setting, and analyze changes in its internal circuits during the training process. In this setting, as shown in Figure I-(a), there exists a set of multiple tasks, and the answers differ from task to task, so the model needs to infer the task from the examples to answer the query. Interestingly, we observe that learning dynamics emerge in this setting that differ significantly from the case of simple copying tasks. First, we find that the model undergoes learn- ing phase while acquiring meta-learning capabillitis,, unlike the single phase typically observed in copying tasks. More specifically, we find that in the first phase, a bigram-type circuit emerges that focuses solely on the query, ignoring the context and relying only on the model's weights. In the second phase, circuit emerges that pays attention only to the labels in the context. Finally, circuit emerges that chunks each example pair into a single token.
In general, ability to learn from few-shot examples asso- ciated with meta-learning (Wang et al., 2020; Hospedales et al., 2021), and success of the ICL demonstrate the strong ability of LLM to meta-learn. In effective ICL, the model infers the underlying task from the examples provided and refines its predictions based on the inferred task. Although this meta-learning-baat based ability is widely used, the under- lying mechanisms enabling L.LMs to perform these tasks remain poorly understood, and some puzzling results have been observed. For example, Min et al. (2022b) demon- strated that even when the labels in the examples are ran- domized, the accuracy improves. Additionally, Chan et al. (2022) have demonstrated that data distributional properties significantly influence ICL performance.
We introduce novel metries to measure these three circuits and show that the abrupt change of these metrics aligns closely with the sudden jumps in accuracy. Notably, the label-focused circuit that emerges in the second phase sug- gests that during acquiring meta-learning capabilities, the model may initially learn to identify tasks by examining only the set of labels, without considering the correspon- dence between classes and labels. The existence of the label-focused circuit also corresponds to the phenomenon in previous studies (Min et al., 2022b) that LLMSs maintain high ICL performance even under random label assignments, which is one explanation for the unique nature of LLMs.
To understand ICL, various approaches have been proposed. For example, Von Oswald et al. (2023); Dai al. (2023) demonstrated that transformers can solve linear regression problems within the context by leveraging meta- veta-gradients. Based on this, analytical methods have been applied to study the ability of transformers to handle a range of tasks, includ- ing discrete functions (Bhattamishra et al., 2023), nonlinear functions (Kim & Suzuki, 2024), and classification prob- lems (von Oswald et al., 2023).
2.2. Mechanistic Interpretability
We also examine the case of multi-head model, which is more practical setting; sudden jumps in accuracy become less apparent, and different heads can still specialize in par- allel for instance, one head may converge on particular circuit, while another becomes a different one. Although this parallel specialization leads to smoother accuracy im- provements, our circuit-level metrics uncover hidden circuit emergence, revealing that even though learning phases re- main invisible in the accuracy curve, the underlying circuits still change abruptly. This observation suggests that even when a clear phase changes are not observed on the loss curve, as in the case of LLM training, abrupt changes can oc- cur on the cireuits, which leads to bridging the gap between toy experiments in the study of mechanistic interpretability and practical scenarios.
One promising approach to understanding ICL is mechanis- tie interpretability (MI), which seeks uncover the internal mechanisms of models (Olah et al., 2020; Elhage al., 2021). A key focus of MI is the study of circuits, which are subgraphs with distinct functionality that serve as funda- mental building blocks of neural network behavior (Wang et al., 2022; Conmy et al., 2023b; Merullo et al., 2024).
One such circuit studied in the context of ICL is the in- duction head (Olsson et al., 2022). The induction heads are two-layer structure; in particular, the latter layer is commonly called the induction head, and the earlier layer is referred to as the previous token head. Previous token head attends to and copies the preceding token into the current token. When few-shot examples are present in the context, it chunks each (a, E) pair into single token. Induction heads then perform a match-and-com operation, matching a query
2

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phass Circuit Emergence
Copy Task
copy
MLP
fz
AG
Classes
J. Labels
match
In-Context Meta Learning (Ours)
Alleniio22
Task1
Tasi?
Task
AS
e
%
Classes
Alleniont
DOA-O
:
infer
Labels
predict
(a) Task Structure
(b) Network Structure
Figure 1. (a) Task Structure: Previous studies focused on a copying-task setup, where the query's 's answer remains unchanged by context, allowing the model to either memorize pairs or match and copy from context. In contrast, this work explores more practical scenario where (z, () pairs vary by task, requiring the model to infer the task from examples and prediet the query's answer. (b) Network Structure: mainly use two layers of attention followed token-wisc MLP layer. The task is consistent within the context.
derived from the current token with a key derived from the previous token head's output. For more details on the in- duction head, see Appendix Further research has shown that induction heads can perform soft matching (Crosbie & Shutova, 2024), emerge naturally in multi-heate attention settings (Singh et al., 2024), and are present in LLMs (Cho et al., 2024).
examples, the network needs to infer the task т, instead of simply copying a label, from the context.
Following Reddy (2023), we represent each item and label l in a (P + dimmenssia space. Of these dimensions, P is dedicated to positional information via one-hot encoding (with P = 65 across all experiments), while D captures the content. To encourage translation-invarianl operations, each input sequence is randomly placed within a window size (2N + 1) spanning the range [0, P - 1]. Each class is associated with a D-dimensional mean vector 14k, whose entries drawn independently from (V 1/D). For an item r; assigned class k. we add noise 17 (sampled from the same distribution) scaled by giving where e governs within-class variation and the denominator ensures || ~ 1. Finally, each class is linked to one of L labels, with L S K. To control the proportion to which a query can be solved by copying from the context, the same item as the query included in the context with probability
Despite these advancements of induction heads, these stud- ies have primarily focused on tasks where the context explic- itly includes the label be copied, such as direct copying tasks. Therefore, induction heads alone cannot fully explain the meta-learning capabilities in more practical scenarios.
= pa+en /1+22*
3. Experimental Setup
3.1. In-Context Meta Learning
To analyze the meta-lcarning capabilities of ICL, building on prior works (Chan al., 2022; Reddy, 2023), we de- sign simple experimental setting named the In-Context Meta-Learning (ICML!) described in Figure I-(a). Unlike previous approaches, where copying labels or memorizing (z, f) pairs was sufficient to predict the answer, our setting instead requires the model to meta-learn the underlying task (r) from (x. E) context pairs. The network is trained to predict the label of a target 2g given an alternating sequence
PB. We use T = 3, K = 64, = 32, N = 4, D 63, E 0.1, PB = O, unless otherwise specified. In our ICML setup, we can reproduce the standard match-and-copy induction head mechanism from Reddy (2023) by setting T= 1, Pn = 1,, For detailed results, see Appendix A.
3.2. Network Structure
of N items and N labels:
Following prior research (Reddy, 2023), a two-layer attention-only transformer shown in Figure 1-(b), where each layer μ comprises m heads (indexed by h), and a causal mask ensures position i attends only to positions j S i. A two-layer MLP classifier then produces the label probabili- ties. For the complete set of equations and hyperparameter details, see Appendix B. In this architecture, each head h in layer μ computes attention weights (p/y.h)), quantifying how strongly position (query) attends to position j (key). These outputs are aggregated across heads and passed to the MLP, which makes the final label predictions.
31 12, Cz
EN
EN
Dgg
examples
query
prediction
Here, T represents the task, where each task defines a unique (x, E) pair with labels randomly assigned items æ. The total number of tasks is denoted T. and the context pre- sented to the model consistently corresponds to the same task. Since the query xg may not be appeared the in-context
'Code is available gouki5 51 wwwp///nnnnnttttteeeeee Metetttt-eeetaeeeeeeeieee
httpp:///ght hatpa:///ithhb.coom
3

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phan Circuit Emergence
Phase
Phase 2
Phase
Accuracy
Loss
L.00
0.75
0.50
0.24
Bigram
Label Attention
Bigram
Chunk Example
Label Attention
0.0
10'
10
16' Optimizttion Steps
10"
Opemisotion Sizpe
Phase
Phase
Phase
MM
1-layrr
2-layer
2-layer
1-layer
2-
Figure 2. (left) Changes in accuracy and loss across three distinct phases during training, with lighter-shaded curves indicating different random seeds. Each phase is highlighted with a different background color: Phase 1 (yellow), Phase 2 (orange), and Phase 3 (red). (right) Visualization of the attention maps (circuits) corresponding to each phase. with characteristic attention patterns indicated by red arrows and their circuits displayed above. Specific attention types, such as Bigram, Label Attention, and Chunk Example, emerge at different phases, reflecting the model's adaptation to the task. Quantitative results for these attention maps are provided in Figure 4.
Dela Accuracy (Aenft + At) Arn(t))
where t denotes the optimization step and we set At = 100. In Figure 3, we plot this quantity along with the model's ac- curacy, marking vertical lines steps where AAccuracy > 0.025. These lines serve boundaries between the three observed phases. Based on this threshold, we partition the model's behavior into Phase 1, Phase 2, and Phase 3 throughout the remainder of this paper.
Accuracy Delta Accuracyl
1.0
0.15
0.8
Delta Acouracy
0.10
0.6
0.4
0.85
0.2
0.0
On the right side of Figure 2, we visualize the attention maps from the two layers of the model during each phase. The attention patterns emerging during the learning process can be categorized into the following three types:
10
10
10
Stop
Figure 3. Accuracy (blue) and Accuracy (green) functions of the training step. Here, AAccuracy = Acc(t + At) Ace(t) with At 100. Vertical dashed lines indicate where AAccurac exceeds 0.025, marking the transition points between the three observed phases (Phase 1, Phase 2, Phase 3).
1. Bigram: Strong attention is focused on the token in the context that corresponds to the query token (z,,).
Label Attention: Strong attention is focused on the label tokens of the (ar, E) pair within the context.
The classifier is a two-layer MLP with ReLU activations, followed by a softmax layer producing probabilities over L. labels. We train this network classify the query item xy into one of the I, labels using cross-entropy loss. Both the query/key dimension and the MLP hidden layer dimension are set to 128. We use a batch size of 128 and optimize with vanilla stochastic gradient descent at a learning rate of 0.01.
3. Chunk Example: Attention aggregates the (s, E) token pair in the context into single token, similar to the induction head's 's previous token head.
As visualized on the right side of Figure 2, the combinations of these attention types differ between the first and second layers across the three phases:
Phase 1 (Non-Context Circuit; NCC): Both layers bigram attention, ignoring the context and relying solely on the model's 's weights. At this stage, the model predict label base on only query, limiting accuracy to around 1/T. In this case, the accuracy stagnates at around 30-40%.
4. Abrupt Learning and Emergent Circuits
4.1. Three-Phase Dynamies and Circuit Overview
We conducted experiments under the ICML setting with three tasks (i.c.,77 T 3). As shown on the left side of Fig- ure 2, the results reveal three distinct phases of accuracy changes, each accompanied by corresponding drop in loss. The observed dynamics are as follows: the first accuracy plateau occurs at around 30-40%, the second at approxi- mately 75%, and the final phase reaches 100%. To clearly these three phases, we define the following metric:
The first layer exhibits label attention, while the second layer focuses on the query token (bigram attention). The model not only leverages weights memory but also attends to label tokens (i.e., half of the context), in the context to infer possible answers, resulting in improved accuracy of around 75%.
Phase (Semi-Context Circuit; SCC):
Phase (Full-Context Circuit; FCC): The first layer ag- gregates the (ar E) pair into a single token (chunk example),
A Accuracy Accuracy(1 At) Accuracy(t),

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit Emergence
Table I. Summary of circuits, accuracy, and layer-wise attention.
Table 2. Formulas of the three attention metrics.
Circuit
Accuracy (T = 3)
Layer 1
Layer 2
Metric
Formula
NCC
30-40%
Bigram
Bigram
Bigram
u.h P2N+ 21
SCC
775%
Label Attention
Bigram
Label Attention
Σx= u.h
22N+1,2k
FCC
100%
Chunk Example
Label Attention
Chunk Example
Ex=1 22k.2k-1
N
Bigram
Label Attention
Chunk Example
1.00
1.00
Label Lubel Allettioon
Chunk Example
0.75
0.8
Bigram
Accuncy
Accumcy
..75
0.50
0.50
0.25
0.25
0.5
0.00
0.60
0.0
0.00
10'
10'
10
10'
10'
10
10"
10"
10'
10'
10'
10*
Steps
Steps
Steps
Accuracy
Layerl Metries
Layer2 Metries
Figure 4. Evolution of the three attention metrics (Bigram, Lahel Attention, and Chunk Example) across optimization steps for the first (green) and second (red) layers. The shaded regions represent the three learning phases: Phase 1 (yellow), Phase 2 (orange), and Phase (red), defined by AAccuracy (Figure 3). Each metric shifts cleanly at the phase boundaries, demonstrating a close correspondence between accuracy improvements and circuit-level transformations.
while the second layer focuses on these aggregated tokens (label attention) to predict label, resulting in using the entire context. Through this abstraction of the pairwise relation- ship (i.e., task inference), the model can produce correct answers for the query. Once the model learns this circuit, it achieves 100% accuracy.
the chunk example metrics in the first layer increase, and the label attention metrics in the second layer also become high, resulting in the formation of the FCC. Importantly, these metric transitions align closely with the corresponding jumps in model accuracy, supporting the view that these metries provide valid and quantitative perspective on the circuit changes observed during the three phases, as depicted in the right side of Figure 2.
The relationship between each circuit and its corresponding attention pattern is summarized in Table 1.
4.3. Deeper Look at the Semi-Context Circuit
4.2. Quantifying Circuit Emergence
How SCC Drives Accuracy In Phase 2, the model forms the SCC, using label information from the context in addi- tion to the query. We provide a theoretical analysis of why this leads to improved accuracy and empirically validate our thcory through controlled experiments. To clarify SCC's behavior, we tested the following simplified conditions:
To quantitatively measure these circuits, we propose three metrics based on the attention maps of each layer. Let pf represent the attention from token j to token i in the h-th head of the y-th layer. Let the context length be 2/V + 1 (in this case, N = 4). We define three primary attention-based metrics, with precise formulas provided in Table 2. Here, we briefly describe what each metric represents: (1) Bigram Metrics capture the attention from the query token to itself; (2) Label Attention Metrics measure the total attention from the query token to the label tokens within the context; (3) Chunk Example Metrics assess the attention from x to within each (x, 2) pair.
1. The number of classes (K) equals the number of labels (L), with no duplication.
2. The input context (including the query) contains no du- plicate classes
3. The number of tasks (I') is set to 2, and there are no common (z, E) pairs shared across tasks.
The plots in Figure 4 illustrate how these metries evolve in the first and second layers across the three phases. For the Bigram Metrics, both the first and second layers show high values at the moment of the initial jump in accuracy, marking the formation of the NCC. Then, at the beginning of Phase 2, the bigram metrics in the first layer decrease significantly while those in the second layer remain high, and label attention in the first layer rises- together lead- ing to the formation of the SCC. At the start of Phase 3,
4. To specifically focus on SCC, mask is applied to circuits associated with SCC during training (details are provided in the Appendix C).
In Phase 1, since there are two tasks, the model has 50% chance of predicting correctly by random guessing. In other words, the model's 's prediction reduces to a binary choice for each input query (zz). Once label information becomes usable, the binary choice can potentially be narrowed fur-
5

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phas. Circuit Emergence
1.0
1.0
Traning Accuracy
0.8
0.8
Random-Label Accuracy (RLA)
Accuracy
0.6
Accuracy
0.6
K-8
0.4
K=16
0.4
0.2
K-32
0.2
Theoretical Accuracy
0.0
10"
10
10
0.0
10"
10"
10"
Steps
Steps
Figure 5. Comparison of theoretical accuracy (dashed lines) and model accuracy for different class counts (K). The close alignment between theoretical predictions and experimental results confirms the validity of the theoretical analysis.
Figure 6. Comparison training accuracy and random-label ac- curacy (RLA). The plot demonstrates the rise in both metrics, with RLA following a trend similar to emergence Phase 2. This indicates that SCC acquired in Phase contributes to improved accuracy even with shuffled labels.
ther. This occurs when one of the labels corresponding to the two options is present in the context. In this scenario, the label in the context is definitively not the correct answer for the query, as per the defined conditions. Thus, the an- swer becomes uniquely determinable, increasing accuracy. Following the derivation in Appendix D, the probability of one of the labels appearing in the context
model's accuracy under these shuffled labels, we obtain the Random-Label-Accuree (RLA). In the Figure 6, we compare this RLA with the training accuracy. Similar to the rise observed in Phase 2, when SCC is acquired, the RLA also increases. This suggests that the reason for the improved performance with random labels, as seen in Min et al. (2022b), is the existence of circuits similar to SCC within LLMs.
K
p = 1
Therefore, the theoretical accuracy achievable with SCC can be expressed as:
4.4. Effects of Data Property Circuits Emergence
Previous studies have indicated that certain properties of the training data, such as burstiness, can influence the emergence of ICL (Chan et al., 2022) and induction heads (Reddy, 2023). In this work, we explore how these data propertics affect the development of circuits in our ICML setting, with the aim of advancing our understand- ing of the multi-phase emergence of these circuits. As mentioned in Section 3, the variables capturing the char- acteristics of the data include the number of tasks T, the number of classes K, the noise magnitude e. In addition, and following Chan et al. (2022), we adopt rank-frequency distributions over both classes and tasks: f(k) ~ k a and f(T) --8, which follow a power-law form commonly known as Zipf's law (Zipf, 1949) (see Appendix E for de- tails). The default values are T
Theoretical Accuracy = p- 1 (1 pp) 0.5.
Figure shows the theoretical accuracy alongside the accu- racy achieved by model trained with only Phase 2 attention circuits remaining. The class/label counts were varied as K = {8, 16, 32). The near- near-perfect agreement between the theoretical and empirical results confirms both the validity of our derivation and the role of SCC in boosting accuracy.
Random-Land -Laell Robustness of SCC We focus on the ten- dency of SCC to make predictions "based solely on labels and query." We hypothesize that this circuit explains the puzzling phenomenon that the improvement in ICL. perfor- mance observed even when using random labels, as noted in Min et al. (2022b). Min et al. (2022b) has demonstrated that replacing labels randomly within examples results in only marginal performance drop, suggesting that ICL does not rely heavily (a, f) pairs. To investigate this phe- (OOD) evalu-
K 64, 0.1, 0, and 3 = 0. The results of varying these parameters are shown in the Figure 7. For results obtained by varying PB. see Appendix F.
nomenon, define ation where the labels in each context pair are randomly permuted. Specifically, we consider:
In Figure 7-(a), we present the results of varying the number of tasks T. As T increases, Phase accuracy decreases (approximately proportional 1/2). When T 1, the setup aligns with previous studies (see Figure 1), where the model's accuracy increases in single phase rather than un- dergoing multiple phases. Conversely, for T 2 2, the model consistently exhibits three distinct phases. This indicates that the multi phase phenomenon is robust to the number of tasks, and that introducing additional tasks in the ICL
21, ((())) T2, G IN, GaM) Fqg query prediction
examples
Here, i is a random permutation on {1. 2........ N). meaning that fr (0)) replaces the original label f.. By measuring the
6

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phan Circuit Emergence
x- r.0.75 1=1
0:75
1.25
Sage
Step
Skop
Skap
(a) The nunber of Tasks T
(b) The number of classes K
(c) Within-class variation
(d) Class-rank frequency exponent o
Average
T=1
7-2 2
7
3
F-0
A-0
B-0
f-0
p.22.5
B.0.25
0.0.25
0.5
6.6
18'
Stpps
Steps
Stops
Steps
(c) Task-rank frequency exponent |
Figure 7. The relationship between learning phase dynamics and data distribution properties is explored by varying key parameters: the number of tasks (T), the number of classes (K), , the noise magnitude (c), the sampling bias for classes (A""), and the sampling bias for tasks (r 9). Default values are T = 3. K 64. = 0.1. a = 0, and 3 = 0. The plots show how these variations influence accuracy and the emergence of learning phases.
setting can provide new empirical insights.
forming FCC. Additional results for larger values of T and varying context length (N) are provided in Appendix and Appendix J, respectively.
In Figure 7-(b), when K is small (e.g.. K= 32), the model tends to skip Phase 1 and transition directly to Phase 2. In contrast, when K is large (e.g., K 128, 256), the model skips Phase 2 and jumps directly from Phase Phase 3. This be explained by the theoretical values derived in Section 4.3, where increasing the number of classes brings the accuracy in Phase 2 closer to that in Phase 1, effectively making Phase 2 unobservable for large K.
5. Multi-Head Enhances Circuit Discovery
5.1. Parallel Circuit Exploration
To investigate more practical scenario, we extend our anal- ysis to multi-head attention. Figure 8 compares the accuracy changes for models with two heads and one head. In the left panel of Figure 8, we observe that learning phases become less pronounced when using multi-head attention. A closer examination of the attention maps for each head (as shown in the right panel of Figure 8) reveals that different heads specialize in distinet functions. Specifically, one head learns circuits resembling NCC, while another head becomes FCC. This parallel specialization provides smoother trajectory of accuracy improvement, in contrast to the multi-lcarning phase observed in single-head models.
In Figure 7-(c), increasing e (the within-class variation) leads to skipping Phase 2. Moreover, when is 1, Phase also skipped. Following the results of Chan et al. (2022). higher values of make it more difficult for the model to memorize the (Ir, ()) pairs in its weights, and thus it shifts its focus toward leveraging the context. The observation that NCC is skipped entirely when = 1 aligns with this trend. Although SCC is a circuit that uses the context, it inherits the nature of NCC, causing it to be skipped as increases. In Figure 7-(d), we see that increasing a likewise tends to skip Phase 1 or Phase 2. The heightened sampling bias makes it more challenging memorize pairs in the weights, so the model more readily exploits context-basee based information. As a result, the NCC or SCC does not emerge. In summary, the results suggest that when the model finds difficult to memorize (ar, é) pairs (larger e or a) neither NCC nor SCC emerges.
These findings suggest that multi-head attention allows for parallel exploration of circuits, improving the efficiency of circuit discovery. As a result, the multiple phase char- acteristic of single-head models are absent in multi-head configurations. This behavior aligns with observations in LLMs, where multi-head attention enables different heads to serve distinct functions, leading to smoother accuracy im- provements, as seen in Figure 8. Results for larger number of heads are provided in the Appendix G.
In Figure 7-(e), we examine how varying the task sampling bias B affects both the average accuracy across tasks and the accuracy of each individual task. While changing 3 leads to only minor differences in the overall average trend, the accuracy on a per-task basis varies considerably with B. In particular, when 3 is high (e.g., 3 = 1). the model tends to memorize the most frequent task (i.e.. - = 0) first, causing the remaining tasks to skip NCC and progress directly to
5.2. Hidden Circuit Emergence
In Figure 8, we observe multiple attention heads lead to smoothing the accuracy improvement. To gain deeper in- sights into this phenomenon, analyze how the internal circuits evolve by using the circuit metrics summarized
7

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi- Phase Circuit Emergence
Bigron (Heod (2)
Head #2 Layer2
Singl bead Matti head
Might
Accuracy
W
of
Atterin (laad P2)
Steps
Head #2 Layer1
Figure& 8. Comparison of accuracy dynamics between single-head (blue) and multi-head (orange) attention models (left). The multi- head model exhibits smoother accuracy improvements, without the distinct learning phases observed in single-head model. On the right, the attention maps for the two heads in the multi-head model are visualized. Head specializes in NCC, while Head 2 adopts circuits resembling FCC. These findings indicate that multi-head attention allows parallel circuit discovery, enhancing the efficiency of the learning process.
Figure 9. Circuit metrics (left) and attention maps (right) for Bi- gram (Head 2) and Label Attention (Head 2) in multi head setting. The left plots depict the progression of Accuracy (blue), Layer I Metrics (green), and Layer 2 Metrics (red) over training steps. The attention maps on the right correspond to the model's behavior 30,000 training steps, as indicated by the vertical dashed line.
in Table 2. In Figure (left), we present the circuit met- rics for Bigram and Label Attention in Head 2. Notably, around the 30,000th training step, the Bigram metric ex- hibits pronounced increase in the second layer, whereas the Label Attention metric is notably larger in the first layer. The right panel displays the corresponding attention maps, which clearly demonstrate an SCC-like pattern, illustrating how the model's attention shifts between bigram-driven and label-focused mechanisms. The attention maps on the Fig- ure 9 (right) correspond to the model's behavior at 30,000 training steps, as indicated by the vertical dashed line. A complete set of metrics is provided in Appendix H.
align with findings in LLMs. These results connect small- scale experiments to practical LLMs, clarifying ICL mecha- nisms. Additional related work is presented in Appendix K.
Relationship to Prior Internal-Circufe Research Pre- vious investigations taking an internal-cireui approach to ICL have largely focused on induction heads, which em- ploy a match-and-copp mechanism (Ren et al., 2024; Cho et al., 2024). In contrast, by adopting a more practical meta- learning perspective, our study reveals multi-phase circuits that initially memorize examples and then evolve to infer the underlying task, which differs from the single-learning phase commonly observed in induction heads. While both induction heads and our Full-Context Circuits (FCC) chunk contextual (z, pairs into a single token in the first layer, the second layer diverges: induction heads retrieve only a label, whereas FCC further aggregates (Chunk Example + Label Attention in Table 1). This shared mechanism in the first layer implies that even simple copy task contributes to meta-leariing ICL capabilities. In addition, consistent with carlier findings (Chan et al.. 2022: Singh et al., 2023; Reddy, 2023), these results highlight the key role of dataset characteristics in circuit formation and ICL performance.
These results suggest that, even though we do not observe abrupt learning in accuracy under the multi-head config- uration, hidden circuit emerge within the model's inter- nal mechanisms. This hidden phenomenon implies that, in more practical scenarios (such as large-scale language model where the loss typically decreases in smooth fash- ion), the model's internal circuits may still undergo signifi- cant emergent shifts.
6. Discussion
We introduced controlled experimental called In-Context Meta-Learning (ICML), designed to move beyond simple copy tasks by requiring task inference. We then investigate how a 2-layer, attention-only transformer acquires ICL abili- ties, inspired by induction head research (Olsson et al., 2022: Reddy, 2023). Although our model is much smaller than those used in large-scale interpretability research (Wang et al., 2022; Merullo et al., 2024; Templeton et al., 2024; Gao et al., 2024), this controlled design revealed novel in- sights, including multi-learning phases that illuminate how the model's 's internal circuits evolve. Moreover, the observed random- label robustness (Section 4.3) and multi-head be- haviors, where the loss decreases smoothly (Section 5), both
Implication for LLMs Our analysis links circuits to the established concept of task vectors (Hendel et al., 2023; Todd et al., 2024). A task vector represents the abstracted representation a model forms from examples, and although such vectors have been recognized, the internal circuit-based mechanisms that produce them remain poorly understood. Our findings offers step toward elucidating these mecha- nisms. In addition, we examine multi-head attentions. Prior work (Singh et al., 2024) has identified redundancy in in- duction heads under multi-heal architectures. Our findings indicate that, rather than mere redundancy, multiple distinct circuits emerge in parallel in the multi-head setting, resulting
8

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit Emergence
Bigram
Label Attention
Chunk Example
0.012
0.12
0.08
Metrics
0.10
Metrics
Metrics
0.010
0.08
0.06
0.008
0.06
0.04
0.006
0.02
0.02
0.004
Layer
Layer
Layer
Figure 10. Layer-wise analysis of Bigram, Label Attention, and Chunk Example metrics in a pretrained LLM (GPT2-XI.). We observe that chunk example scores peak in earlier layers while label attention scores are higher in middle later layers, consistent with the final circuit (FCC) behavior in our 2-layer attention-oni only model, where the first layer emphasizes chunk example and the second layer specializes in label attention.
in smoother performance gains. This observation bridges the discontinuous concept of circuits with the continuous performance improvements seen in L.MMs.
Figure 10 shows that the Chunk Example metric is higher in early layers, while Label Attention dominates later lay- ers-mmiroring our two-layer model's progression from chunk example label focus. This pattern aligns with our earlier findings in small Transformers, suggesting these circuits generalize to LLMs.
To test whether the circuits observe in controlled toy setting also appear in real-world pretrained models, con- duct an additional analysis using a standard sentiment clas- sification task. Specifically, we use the SST2² dataset from the GLUE benchmark, consisting 872 centiment-labelee samples. We use GPT2-XI.3 (48-layer decoder transformer, pretrained). Each prompt contains two labeled examples followed by query example without its label, in 2-shot setup. The prompt format is follows:
We further investigate circuit behaviors in more standard Transformer architectures (see Appendix L), under next- token prediction objectives (see Appendix M), and in mod-
els deeper than two layers (see Appendix O). In all these cases, we observe consistent structural patterns, supporting the robustness and generality of our circuit- based interpreta- tion.
Review: (text) |nSent [label} Review: (text) inenttmentt {label}
7. Conclusion
Review: (text) ) nSentt
We introduced In-Context Meta-Learning (ICML), con- trolled setting for analyzing how attention-only transform- acquire in-context learning abilities. Unlike simpler induction-head settings limited to match-and-copy circuits, our approach allowed us to explore how internal circuits function in a more practical task-inference context. Our analysis revealed a muuli-phasse learning process, where early layers bind example pairs (chunk example) and later layers abstract task-relevant patterns (label attention). These circuits proved robust to random labels and benefited from multi-head attention, resulting in smoother learning dynam- ies. We further showed similar circuit patterns emerging in pretrained models, such as GPT2-XL, on real-world natural language tasks, suggesting our findings generalize beyond toy settings. While our work is still far from fully cap- turing the complexity of real LLM behaviors, connecting controlled experiments in mechanistic interpretability realistic use-cases of LLMs is becoming increasingly impor- tant. Such efforts will help advance interpretability research and play crucial role in the development of safer Al sys- tems.
An actual example of such prompt is provided in Ap- pendix N. As the model is fully trained, we cannot observe circuit formation over training; instead, we analyze atten- tion patterns across layers in response to the fixed prompts. We define three crcentionbbasee metrics, using raw attention probabilities p(i.j) j) from token j to token i, averaged over all heads in each layer:
1. Bigram Attention:
p(query, query)
Measures the self- celf-attention of the final token (query).
2. Label Attention: A Ek p(query, label,)
Measures how much the query attends to each of the
K 2 label tokens.
3. Chunk Example Attention: # >k En pllabele rexte..) Σ, texta..
Measures how strongly each label token attends to the corresponding review tokens.

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit Emergence
Impact Statement
D' Angelo, F,, Croce, F,, and Flammarion, N. Selective induction heads: How transformers select causal struc- tures in context. In The Thirteenth International Confer- ence on Learning Representations, 2025. URL https: / / //openrevil ew net/ forum? wewrummid=bnjggeo.. d=b..gzAAJJ...
This paper presents work whose goal is to advance the field of Machine Learning. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here.
Dong, Q., Li, L., Dai, D., Zheng, C., Ma, J., Li, R., Xia, H., Xu, J., Wu, Z., Chang, B., Sun, X., Li, L., and Sui, Z. A survey on in-context learning. arXiv preprint arXiv:2301.00334, 2024.
Acknowledgements
HF was supported by JSPS KAKENHI Grant Number JP22121582.
Edelman, E., Tsilivis, N., Edelman, B. L., Malach, E., and Goel, S. The evolution of statistical induction heads: In-context learning markov chains. In Globerson, A., Mackey, L., Belgrave, D., Fan, A., Paquet, U., Tomczak, J., and Zhang, C. (eds.), Advances in Neural Informa- tion Processing Systems, volume 37, pp. 64273 64311. Curran Associates, Inc., 2024.
References
Bhattamishra, S., Patel, A., Blunsom, P., and Kanade, V. Understanding in-context learning in transformers and IIms by learning learn discrete functions. arXiv preprint arXiv: 10.03016, 2023.
Elhage, N., Nanda, N., Olsson, C., Henighan, T., Joseph, N., Mann, B., Askell, A., Bai, Y., Chen, A., Conerly, T., DasSarma, N., Drain, D., Ganguli, D., Hatfield- Dodds, Z., Hernandez, D., Jones, A., Kernion, J., Lovitt, L.. Ndousse, K., Amodei, D., Brown, T., Clark, J., Kaplan, J., McCandlish, S., and Olah, C. A math- ematical framework for transformer circuits. Trans- former Circuits Thread, 2021. https://trnssfrmmer- hieutssppb220//ffrawwwommmmm
Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., Agarwal, S., Herbert- Voss, A., Krueger, G., Henighan, T., Child, R., Ramesh, A., Ziegler, D. M., Wu, J., Winter, C., Hesse, C., Chen, M., Sigler, E., Litwin, M., Gray, S., Chess, B., Clark, J., Berner, C., McCan- dlish, S., Radford, A., Sutskever, I., and Amodei, D. Language models are few-shot learners. arXiv preprint arXiv:2005. 14165, 2020.
Furuta, H., Minegishi, G., Iwasawa, Y., and Matsuo, Y. Towards empirical interpretation of internal cir- cuits and properties in grokked transformers on mod- ular polynomials. Transactions on Machine Learn- ing Research, 2024. ISSN 2835-8856. URL https: / //openreview net wod.ooiiddeeeeeeeeiiiie
Chan, S. C. Y., Santoro, A., Lampinen, A. K., Wang, J. X., Singh. A., Richemond, P. H., McClelland, J., and Hill, F. Data distributional properties drive emer- gent in-context learning in transformers. arXiv preprint arXiv:2205.00 05055.. 2022.
Cho, H., Kato, M., Sakai, Y., and Inoue, N. Revisiting in-context learning inference circuit in large language models. arXiv preprint arXhv:2410.04468, 2024.
Gao, L., Ia Tour, D., Tillman, H., Goh, G., Troll, R., Radford, A., Sutskever, I., Leike, J., and Wu, Scaling and evaluating sparse autoencoders, 2024. URL https: //arxiv. wwwp:ii...rr/o.oooooo...ooooo abs / 20002 04093.
Conmy, A., Mavor-Parked A. N., Lynch, A., Heimersheim, S., and Garriga-Alonso, A. Towards automated circuit discovery for mechanistic interpretability. arXiv preprint arXiv:2304. /4997, 2023a.
Garg, S., Tsipras, D., Liang, P. S., and Valiant, G. What can transformers learn in-context? case study of simple function classes. In Advances in Neural Information Processing Systems, volume 35, pp. 30583-30598, 2022.
Conmy, A., Mavor-Parker, A. N., Lynch, A., Heimersheim, S., and Garriga-Alonso, A. Towards automated circuit discovery for mechanistic interpretabillity 2023b. URL https: //axxiv wttg////////aeo 14997.
He, T., Doshi, D., Das, A., and Gromov, A. Learning to grok: Emergence of in-context learning and skill composition in modular arithmetic tasks. In The Thirty-eighth Annual Conference Neural Information Processing Systems, 2024. URL https: //ppnreeie/eeeeeeee/ net forum? id-aVh9KRZdRk.
Crosbie, J. and Shutova, E. Induction heads as essential mechanism for pattern matching in in-context learning. arXiv preprint arXiv:2407.07011 2024.
Dai, D., Sun, Y., Dong, L., Hao, Y., Ma, S., Sui, Z., and Wei, F. Why can GPT learn in-context? language models secretly perform gradient descent as meta-optimizers. In Findings of the Association for Computational Linguis- ties: ACI. 2023, pp. 4005 0005-4019, 2023.
Hendel, R., Geva, M., and Globerson, A. In-context learn- ing creates task vectors. In The 2023 Conference on Empirical Methods in Natural Language Processing, 2023. URL https: https:://ppeeeeiieetts //ppeneviiiwwe net forum? i id=QYvFU1F1 9n.
10

---

Nanda, N., Chan, I.,, Lieberum, T., Smith, J., and Stein- hardt, J. Progress measures for grokking via mechanistic interpretabilityy arXiv preprint arXiv:2301 07 2023. Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit Emergence
Hoogland, J., Wang, G., Farrugia-Roberts, M., Carroll, L., Wei, S., and Murfet, D. Loss landscape degener- acy drives stagewise development in transformers, 2025. URL htt.s: /tap::///rraa aaaii.iiiiii/...a//aaaaaaaaaavva org/ abs/ 2402. 023
Park, C. F., Lubana, E. S., and Tanaka, H. Competition dynamics shape algorithmic phases of in-context learning. In The Thirteenth International Conference on Learning Representations, 2025. URL https: /wwp//eeee.....eeeeeeeeeee net / forum? d Xx wwC.ggHWHHHSS wfHSX8.
Hospedales, T., Antoniou, A., Micaelli, P., and Storkey, A. Meta-learning in neural networks: A survey. IEEE transactions on pattern analysis and machine intelligence, 44(9):514--5199, 2021.
Raventos, A., Paul, M., Chen, F,, and Ganguli, S. Pretrain- ing task diversity and the emergence of non-bayesian in-context learning for regression. In Thirty-sevnnth Conference on Neural Information Processing Systems, 2023. URL https:: Utt.ht.tps:///penreeeee /tppnreviewweeeeeeeeeeeeeee.e.we net/ forum? id=BtAz 4xDg..
Kim, J. and Suzuki, T. Transformers learn nonlinear fea- tures in context: Nonconvex mean-field dynamics on the attention landscape. arXiv preprint arXiv:2402.01258, 2024.
Reddy, G.
The mechanistic basis of data dependence and abrupt learning in an in- in-context classification task. arXiv preprint arXiv:2312.0000
Merullo, J., Eickhoff, C., and Pavlick, E. Circuit component reuse across tasks in transformer language models. arXiv preprint arXiv:2310.005: 0880444,, 2024.
2023.
Ren, J., Guo, Q., Yan, H., Liu, D., Zhang, Q. Qiu, X., and Lin, D. Identifying semantic induction heads to understand in-context learning. arXiv preprint arXi::2402.1300 2024.
Min, S., Lewis, M., Zettlemoyer, L.,, and Hajishirzi, H. MetaICL: Learning learn in context. In Carpuat, M., de Mameffe, M.-.,, and Meza Ruiz, I. V. (eds.), Pro- ceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 2791-2809, Seat- tle. United States, July 2022a. Association for Compu- tational Linguistics. doi: 10. 10.188653/11220222maadd 201. URL https: /t//cclannnn att.aaaalaacoooo..ooo/oo wrg/g/2..r2222 naacl ma in. 201/.
Singh, A. K., Chan, S. C. Y., Moskovitz, T., Grant, E., Saxe, A. M., and Hill, F. The transient nature of emer- gent in-context learning in transformers. arXiv preprint arXiv:2311.08366 2023.
Singh, A. K., Moskovitz, T., Hill, F., Chan, S. C.,, and Saxe, A. M. What needs to go right for induction head? a mechanistic study of in-context learning cir- cuits and their formation. In Forty-first International Conference on Machine Learning, 2024. https: / /ooenreview net / forum? Pecrum?id=O08 ddm00rrx1011115
Min, S., Lyu, X., Holtzman, A., Artetxe, M., Lewis, M., Hajishirzi, H., and Zettlemoyer, L. Rethinking the role of demonstrations: What makes in-context learning work? arXiv preprint arOiv:2202. 0002222.22838. /2837, 2022b.
Templeton, A., Conerly, T., Marcus, J., Lindsey, J., Bricken, T., Chen, B., Pearce, A., Citro, C., Ameisen, E.. Jones, A., Cunningham, H., Turner, N. L.,, McDougall, C., MacDiarmid, M., Freeman, C. D., Sumers, T. R., Rees, E., Batson, J., Jermyn, A., Carter, S., Olah, C., and Henighan, T. Scaling monosemanticity: Ex- tracting interpretable features from claude 3 sonnet. Transformer Circuits Thread, 2024. URL https:
Minegishi, G., Iwasawa, Y., and Matsuo, Y. Bridging lottery ticket and grokking: Understanding grokking from inner structure of networks. Transactions on Machine Learning Research, 2025. ISSN 2835-8856. URL. https:// openreview net forum ( deeexmyppe.
/ hrw.oo/nrrrrccccuutts..pppa/aaaa www.gaggooooeeennniict//eeeeee html.
Olah, C., Cammarata, N., Schubert, L., Goh, G., Petrov, M., and Carter, Zoom in: An introduction to circuits. Distill, 2020. URL https:: htttp:://distillll http:///diiii1.uu/2200000. circuits zoom-in.
Todd, E., Li, M., Sharma, A. S., Mueller, A., Wallace, B. C., and Bau, D. Function vectors in large language models. In The Twelfth International Conference on Learning Representations, 2024. URL net fort/forum?22
Olsson, C., Elhage, N., Nanda, N., Joseph, N., DasSarma, N., Henighan, T., Mann, B., Askell, A., Bai, Y., Chen, A., Conerly, T., Drain, D., Ganguli, D., Hatfiel--Dode Z., Hernandez, D., Johnston, S., Jones, A., Kernion, J. Lovitt, L., Ndousse, K. Amodei, D., Brown, T., Clark, J., Kaplan, J., McCandlish, S., and Olah, C. In- context learning and induction heads. arXiv preprint arXiv:2209. / 1895, 2022.
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L.., Gomez, A. N., Kaiser, L. u., and Polosukhin, I. Attention is all you need. In Guyon, I., Luxburg, U. V., Bengio, S., Wallach, H., Fergus, R., Vishwanathan, S., and Garnett, R. (eds.), Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc.,

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phas. Circuit Emergence
2017. URL https:/pproceeding..rerree
cc /ttpppeee__lllllepppprr//////112
#ffe Paper. pdf.
Von Oswald, Niklasson, E., Randazzo, E., Sacramento, a., Mordvintsev, A., Zhmoginov, A., and Vladymyrov, M. Transformers learn in-context by gradient descent. In Proceedings of the 40th International Conference on Machine Learning, ICML'22, Jor.. 2023.
voN Oswald, J., Niklasson, E., Schlegel, M., Kobayashi, S., Zucchet, N., Scherrer, N., Miller, N., Sandler, M., Arcas, B. A., Vladymyrov, M., Pascanu, R., and Sacra- mento, J. Uncovering mesa-optimization algorithms in transformers. arXiv preprint 230.Xv::300008855, 2023.
Wang, K., Variengien, A., Conmy, A., Shlegeris, B., and Steinhardt, J. Interpretability in the wild: circuit for indirect object identification in gpt-2 small. arXiv preprint arXiv:2211.00559, 2022.
Wang, Y., Yao, Q., Kwok, J. T., and Ni, L. M. Generalizing from a few examples: A survey on few-shot learning. ACM computing surveys (csur), 53(3): 2020.
Xie, S. M., Raghunathan, A., Liang, P., and Ma, An explanation of in-context learning as implicit bayesian inference. arXiv preprint arXiv:2111.0000 2021.
Zipf, G. K. Human Behavior and the Principle of Least Effort. Addison- Addison-Wesley, Cambridge, MA, 1949.
12

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phas. Circuit Emergence
A. Induction Head
Figure illustrates an induction circuit consisting of previous token head in Layer an induction head in Layer After Layer the side-by-side and tokens are chunked into single token. Layer 2, operations occur: matching of a via queries and keys (in purple) and copying of é (in red).
MLP
pr
copy
match
X1
X
x
x
x
Figure The circuit consists of previous token head Layer and an induction head Layer 2. After Layerl, the side-by-side l tokens are chunked into single token. In Layer 2, we highlight two operations: matching of x vai queries and keys (in purple), and copying of red).
When sample is drawn with probability PB. the burstiness parameter B introduced by Chan et al. (2022); Reddy (2023) becomes relevant, determining how many times items from the query class appear in an input sequence (where N is a multiple of B). In our ICML setup, we specifically examine the case with = 1, PB = 1, and B 1, as shown in Figure 12. observe that the first attention layer encodes each (ar E) pair into a single token, while the second layer strongly attends one of these pairs, effectively implementing the match-and-copy mechanism characteristic of an induction head. Notably, setting thus subsumes the standard induction head experiments proposed in Reddy (2023).
MLP
1.0
0.8
Accuracy
0.6
0.4
0.2
10
10
Steps
Layer1
Layer2
Figure 12. (left) The emergence of induction heads observed as single-learning phase. (right) The attention maps on the right illustrate the circuit mechanism, where Layer groups (z, E) pairs into single-token representations, and Layer then copics this label.
13

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit Emergence
B. Model Details
B.1. Network Architecture
Our model features two layers of multi-head attention with a causal mask, followed by a two-layer MLP classifier. Each attention layer μ {1, 2] has m heads, labeled by Let (U1,.... un) be the input sequence (subject to a causal mask ensuring i can only attend to < i). The outputs of the first layer are (v:}: those of the second layer are {w;)
Attention Computation.
Within layer μa, head h computes attention weights
eXp((K) (1) uz)) (Q Eneo exp( (K
(h) u.)
(a.h)
Pij
(h) us) (Q/ (h) u:))
(1)
where / and K sum of the talue-transformed inputs:
(h) are the learnable query and key matrices for head h in layer μ. Next, each head outputs a weighted
Head (u.A)
Σ p!f (1.h) (V/(h) uz).
(2)
where vy(h) is the corresponding value matrix.
Multi-Head Aggregation. The outputs of all heads in layer μ are concatenated and projected by a trainable matrix Wo,. yielding
V; Uj Wo W3 2 + 3 Head (2.1) ....: Head (2,m)
Head (1,1)
(11)) .... ... Head (emd)). (1.m)
(3)
(4)
Here, [...] indicates concatenation over the head outputs, and each Wo, is learnable linear projection.
The two-layer MLP receives the final attention outputs {wi) } (e.g., specifically w., if indexes the query token). A hidden layer with ReLU activation is followed by softmax that produces label probabilities.
Classifier.
B.2. Training Details
Table 3. Training and Model Configuration
Hyperparameter
Value
Loss Function
Cross-entropy Vanilla SGD
Optimizer
Learning Rate
0.01
Batch Size
128
Dimension of query/key/value
128
MLP Hidden Layer Dimension
128
Causal Mask
Restrict sums to j S
14

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit Emergence
C. Controlled Circuit Pruning Experiments
To validate the relationship between the identified circuits and model performance, we conducted controlled pruning experiments. In these experiments, all components except the circuits corresponding to a specific phase were pruned initialization, isolating the contribution of each circuit. For comparison, we also trained a fully trainable model, referred the full model, which could attend to all identified attention patterns.
As shown in Figure 13, networks trained with only the circuits from particular phase plateaued at accuracies corresponding to that phase. This result provides strong evidence that the circuits identified in each phase are directly responsible for the observed performance.
Interestingly, when the Phase 3 circuit was provided from the beginning (pink curve in Figure 13), the model achieved 100% accuracy in single step. In contrast, the full model exhibited a more gradual improvement, sequentially discovering and leveraging the circuits corresponding each phase. This highlights the dynamic nature of the full model's training process, where it incrementally constructs and refines the required circuits during training.
Acourncy
Phase Circnit
Phase Circait
Phase Circuit
Full Model
0.6
0.2
10
10"
10
10
Optimization Steps
Figure 13. Controlled pruning experiments validate the relationship between identified circuits and model performance. Networks trained with only the circuits from a specific phase plateaued at accuracies corresponding to that phase (yellow: Phase 1, orange: Phase 2, pink: Phase 3). This demonstrates that the identified circuits directly responsible for the observed performance in each phase.
D. Derivation of the Theoretical Accuracy In the main text, we define
p 1
4
(5)
4
and use it to obtain the "Theoretical Accuracy" as
Theoretical Accuracy = p + (1-p) 0.5.
(6)
This appendix provides a more detailed derivation of these formulas, along with the underlying conditions.
Task Conditions.
The number of classes (K) equals the number of labels (T.), with no duplication.
2. The input context (including the query) contains no duplicate classes.
3. Only two tasks are considered (T 2).
4. There are no common (x, E) pairs shared between different tasks.
To focus on SCC, mask is applied to circuits associated with SCC during training.
15

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit Emergence
Excluding Both L1 and Lz- We interested in the probability that the context does not contain L1 L2-
The total number ways to choose distinct classes from the K 1 classes (excluding the query's 's class) is (K-1)
To exclude both 1, and 122 we must choose all classes from the remaining K classes, leading to 4 ways to form the context with neither L1 nor Le present.
(K (K-2)
possible
Hence, the probability that neither L1 nor L2 is in the context is
K
K
Probability and the Accuracy Calculation. context:
We denote by p the probability that at least one of L1 or L2 appears in the
R-2
==
Under the task rules, at least one of these two labels appears the context, it cannot the label for the query, so the other one must correct. This yields 100% accuracy in that scenario. Conversely, neither L, nor L2 found in the context (probability 1 p), the model is forced to guess between two equally likely options, resulting 50% accuracy. Therefore,
Theoretical Accuracy = p 1 (1 p) 0.5,
as stated the main text.
16

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit Emergence
E. Rank-Frequency
In natural language processing and other real-world domains, both data instances and task distributions often follow a power-law structure, commonly referred as Zipf's law (Zipf, 1949). This law states that the frequency of item task inversely proportional its rank, meaning that a small number of elements occur frequently, while the majority appear rarely. Formally, this is expressed as:
f(k) x k
where & denotes the rank of an item, and a controls the degree skewness. Figure 14 illustrates how increasing a leads to more imbalanced distribution, with steep drop in frequency beyond the highest-ranked elements.
Rank- Frequency Distributions for Different a Values (f(k) = km
1.0
a=0
0.25
0.8
= 0.5
a = 0.75
0.6
1.0
a = 1.25
0.4
0.2
0.0
20
60
80
100
Rank k
Figure 14. Rank Rank-frequeng, frequency distributions for different values of the power- law exponent following the Zipfian distribution f(k) = k- As a increases, the distribution becomes more skewed, with a few high-frequency items dominating while majority appear infrequently.
In our setting, not only data but also task sampling follows similar Zipfian distribution:
[(T) ~
(8)
where 3 determines the skewness of the task distribution.
17

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phas. Circuit Emergence
F. Effects of Birstiness on Circuit Emergence
When sample is drawn with probability pB. the burstiness parameter B introduced by Chan et al. (2022); Reddy (2023) becomes relevant, determining how many times items from the query class appear in an input sequence (where is multiple of B). Figure 15 examines the impact of burstiness B and probability pg. The left panel shows accuracy curves for different values of B at a fixed pø 0.25. As B increases, Phase 1, where NCC memorizes pairs through weight updates tends to be skipped. The right panel presents accuracy curves for different values of pn while keeping B = 1 fixed. As increases, the model's accuracy improves more smoothly. and distinct learning phases become less pronounced. These results align with previous studies showing that increased burstiness tends to shift the model away from weight-based solutions and toward context-dependent reasoning (Chan et al., 2022; Reddy, 2023).
1.00
1.00
B=1
Pş =
Pş = 0.25
Accuracy
0.75
B-2
Accuracy
0.75
Р3 = 0.5
0.50
0.50
P3 0.75
P3
0.25
0.25
10"
10"
10
10'
10*
10
Steps
Steps
Birstiness (B)
(b) PB
Figure (Left) Accuracy curves different values of at a fixed ps = 0.25. Increasing tends skip Phase I, where NCC memorizes pairs through weights. (Right) Accuracy curves for different values of with B = 1. As pa increases, the learning process becomes smoother, reducing the occurrence of distinct learning phases.
G. Multi-Heads Experiments
Figure 16 (Left) shows accuracy curves over training steps for different numbers attention heads (1, 2, 4, 8, and 16). Models with multiple heads exhibit a smooth increase in accuracy, whereas the single-head configuration undergoes multi-learning phases, where accuracy improves distinct jumps
jumps rather than gradually.
Figure 16 (Right) visualizes attention patterns in a 4-head attention model across layers. The four heads naturally divide into two functional roles: two heads focus on NCC, while the other two heads focus FCC.
4 head Attention
heads
0.8
heads
Accuracy
0.6
heads
8 heads
16 heads
0.2
0000
10
10¹
10'
10"
layer1
layer2
Steps
Figure 16. (Ieft) Accuracy curves over training steps for different numbers of attention heads (1, 2, 4, 8, and 16). Models with multiple heads exhibit a smooth increase accuracy, whereas the single-head configuration shows multi-learning phases. (Right) Visualization attention patterns in 4-head attention model, separated by layer. Two heads focus NCC, while the other two focus FCC. Red squares highlight key attention positions indicative of cach role.
18

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit Emergence
H. Circuit Metrics in Multi-head Attention
Figure 17 presents circuit metrics for each attention head, analyzed by layer in a two-head attention model. Head consistently maintains high bigram values across both Layer and Layer 2. This indicates that it primarily performs token-level copying operations, forming an NCC. In contrast, Head 2 exhibits a different pattern. As training progresses, the chunk example metric increases in Layer while the label attention metric becomes dominant in Layer 2, forming an FCC.
These findings reinforce the idea that multi-head attention facilitates specialization, allowing different heads to develop distinct computational circuits that enhance the model's meta-learning capabilities.
Bigram Headl
Label Attention Head!
Chunk Example Head!
Anteston
Ascumas
Chunk
18'
18
18
10
Bigram Head2
Label Atlention Head2
Chunk Example Head2
1.00
0.500
8.74
Acuuas
Dignttm
10'
x8'
16'
18
18
Accuracy
Layer1 Metries
Layer2 Metries
Figure 17. Circuit metrics for each attention head. analyzed by layer in two heads attentions. Head maintains high bigram values across both Layer and Layer indicating formation NCC. contrast, Head exhibits increasing chunk example values Layer and high label attention values in Layer 2, suggesting the formation of an FCC.
19

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit Emergence
I. Impact of Increasing Task Numbers (T)
Figure 18 shows accuracy (left) and loss (right) for models trained with increasing numbers of tasks (T' 3, 6, 9, 12, 15, 18). Even with higher T, models exhibit sudden accuracy jumps. As T increases, initial accuracy decreases, and it takes longer for models to achieve sharp accuracy improvements, highlighting the challenges of training under more realistic conditions.
Accuracy
Loss
1.00
T=3
3
T=3
0.75
T=6
T-6
Accuracy
T=9
2
T=9
0.50
T=12
T=12
T=15
0.25
T=15
T=18
T-18
0.00
10º
10
10
10
10
10
Optimization Steps
Optimization Steps
Figure Left: Accuracy, Right: Loss, for increasing numbers of tasks (T) to 3, 6, 9, 12, 15, and 18, bringing the setup closer real-world conditions. Even with higher I', the model still exhibits sudden jump in accuracy. As ' increases, the accuracy in the first phase (around 1/1')) decreases, and takes longer to reach next sharp jump accuracy.
J. Impact of Increasing Context Length (N)
Figure 19-(a) presents accuracy curves when increasing the number of few-shot examples (N), resulting in a longer total context. Multiple learning phases are visible for contexts up to N = 8. For N > 16, the model quickly achieves perfect accuracy, indicating easier learning with more context. Figure 19-(b) shows attention maps at 16 (context length=33) with clear chunk-example attention patterns in layer 1 and label-attention patterns in layer 2, consistent with behaviors observed at lower contexts.
Accuracy
1.00
N=2
0.75
N-4
Accurscy
N-8
0.50
N-16
N=32
0.25
64
0.00
30
1111 M
10
10 Optimization Steps
10a
layer
layer 2
(a) Accuracy
(b) Attention Maps
Figure (a) Accuracy curves when increasing number of few-shot examples (N) the context, making the total context length 2N + 1. Up to about N = 8, multiple learning phases are visible.For N > 16, the model exhibits only a single learning phase before accuracy. This behavior suggests that having larger context makes much easier the model leam circuit that leverages the context, eliminating the need for intermediate phases. (b) Attention maps of two-layer, attention-only Transformer with N 16 (context length 33) at 100% accuracy. The first layer (left) shows a chunk example attention pattern, whereas the second layer (right) focuses on label attention. These observations are consistent with the circuits seen N 4.
reaching
20

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit Emergence
K. Extended Related Work
Our study relates closely to multiple strands literature on in-context learning (ICL) and multi-phase emergence, Here, we elaborate on these connections and highlight distinct aspects of our approach.
Previous studies on in-context learning frequently employ linear regression frameworks (Von Oswald al., 2023; Raventos al., 2023), offering analytically tractable models for theoretical analysis. While these approaches use identical tasks across context examples, they typically optimize for mean squared error (MSE), diverging from the conditions encountered in real-world in-context scenarios. In contrast, our experimental design closely mirrors practical applications of LLMs, emphasizing realistic task settings and diverse few-shot contexts.
In-Context Learning Literature Beyond Copy Tasks
Several works (D' Angelo et al., 2025; Edelman et al., 2024; Park et al., 2025) have examined in-context learning in the context of Markov chain tasks, highlighting meta-learning phenomena. Although the meta-learning dynamics studied are related ours, these Markov chain settings differ significantly from the typical few-shot example-pan format that characterizes standard LLM usage. Our research specifically targets these conventional scenarios, aiming for greater ecological validity in interpreting LLM behavior.
Research (He et al., 2024) exploring in-context learning modular arithmetic tasks (Nanda et al., 2023; Furuta et al., 2024; Minegishi et al., 2025) investigates phenomena like -iittr--iittiitti generalization and the role of attention mechanisms at convergence. While extending beyond simpler tasks, such studies typically do not focus on tracking the dynamic acquisition of internal cireuits throughout training. Our work uniquely captures these acquisition dynamies, directly linking them to observed behaviors like random-label accuracy emergence and multi-head smoothing.
Multi-Phase Emergence Literature Prior investigations into multi-phase emergence (Edelman al., 2024) have shown transformers acquiring functional capabilities via discrete phase transitions. This finding aligns closely with observations. However, whereas previous studies utilized Markov chain prediction tasks-progressing through uniform, unigram, and bigram phases-out our experiments examine a more practically relevant progression: from Bigram to Semi- Comi-Context, and eventually Full-Context circuits. This advancement better reflects complexities observed realistic few-shot learning scenarios.
Several developmental interpretability studies (Hoogland al., 2025) also highlight multi-phase transitions, primarily by analyzing geometric properties of loss landscapes, such as the Local Learning Coefficient (LLC). Our analysis diverges by explicitly characterizing the mechanistic circuits underlying these transitions. An exciting avenue for future research could involve bridging these LL.C-based geometric perspectives with our mechanistic circuit analyses to enrich interpretability methodologies.
21

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phass Circuit Emergence
L. Experiment on Standard Transformer
Figure 20 shows accuracy and attention maps for standard transformer (with attention and MLP layers) trained on the same task the simpler 2-layer attention-only model from the main text. At 50k steps, the model shows clear label-attention and bigram patterns similar to the simpler model. At 400k steps, more complex circuits emerge: chunk-example pattern is visible in layer 1, and clearer label-attention develops in layer (red arrows highlight these patterns). These results confirm that insights from the simpler model apply to standard transformers.
400k steps
Chunk example
Label Attention
1.0
50k steps
0.8
Bigram
layer1
layer2
0.0
0.4
0,1
layer1
layer2
10'
10'
Optinizat Steps
Figure 20. Accuracy and attention map visualizations (left: at 50k steps, right: at 400k steps) from training standard Transformer rather than 2-layer attention-only model. The label-attention & bigram circuit and chunk-example & label-attention circuit emerge here, same in the 2-yayer attention-only Transformer experiments.
M. Experiment with Next Token Prediction
Figure 21 shows accuracy curves for two conditions: predicting only the final label token (Last Label Only) and predicting every label token (All Labels). Both conditions show clear learning phases, but the All Labels setting does not reach perfect accuracy due to the need for contextual information. The attention patterns (right) indicate that even when predicting all labels, the model develops the same final circuit (chunk example attention in Layer and label attention in Layer 2) as in the simpler scenario.
Chunk example
Label | Attention
Accuracy
1.00
Last Label Only
0.75
All Labels
Accuracy
0.50
0.25
layer1
layer2
10
10
10
Optimization Steps
Figure 21. Accuracy curves for two conditions: (1) predicting only the final label token ("Last Label Only," blue) and (2) predicting every label token in the context ("All Labels," red). In both settings, still observe learning phases. Because the task requires contextual information for correct label predictions, the "All Labels" setting never reaches 100% accuracy. The attention patterss (right) show that when predicting label tokens, the model learns the same eircuit (FCC), combining chunk example Layer and label attention in Layer 2.
22

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit Emergence
N. Prompt Examples of LLM Experiment
Review: hide new secretions from the parental units
Seatiment: Negative
Review: that loves its characters and communicates something rather
beautiful about human nature
Sentiment: Positive
Review: remains utterly satisfied to remain the same throughout Sentiment:
O. Accuracy and Attention Patterns across Model Depths
Figure 22 shows accuracy curves of attention-only Transformers with layers. Clear multiple learning phases are observed in the 2- and 3-layer models, whereas the 4- and 5-layer models exhibit smoother transitions without distinet phases. Figure 23 presents attention maps from models achieving 100% accuracy. Regardless of the total number of layers, the core circuit (FCC) consistently emerges in the first two layers: the first layer captures chunk-related information, and the second layer focuses attention on labels.
Accuracy
1.00
Layer2
Layer3
0.75
Accuracy
Layer4
0.50
Layer5
0.25
0.00
10"
10
10"
Optimization Steps
Figure 22. Accuracy curves attention-only Transformers with 2, 3, 4, and 5 layers. The 2-layer model shows three clear learning phases, and the 3-layer model also exhibits multiple transitions. For 4- and 5-layer models, no distinct multiple learning phases visible the accuracy curves.
23

---

Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phass Circuit Emergence
Chunk example
Attention
Bigram
layer1
layer2
Layer3
(a) layer Attention
Chunk example
Label Attention
Bigram
Label Attention
1
layer1
layer 2
layer
layer4
(b) 4 layer Attention
Chunk example
labbllAttttion
Bigram
Bigram
Bigram
layer1
layer2
layer3
layer4
layer5
(c) 5 layer Attention Figure 23. Attention maps 3-layer (top), 4-layer (middle), and 5-layer (bottom) models 100% accuracy. In each model, the first layer displays chunk example pattern, and the second layer exhibits label attention. This suggests that the core circuit (FCC) for achieving 100% accuracy formed the first two layers, regardless of the total number of layers.
24


Reviews:
[{"review_id": "bQ6fWoDV8q", "reviewer": "Reviewer_kgDv", "summary": "The paper investigates how transformers acquire in-context learning (ICL) abilities by extending a simple copy task into an In-Context Meta Learning (ICML) setting that requires task inference rather than simply copying from the context. The authors train a two‐layer, attention-only transformer on a synthetic task where the model must infer the underlying task from (input, label) pairs and predict the answer for a query. A key contribution is the identification of three distinct learning phases—named the Non-Context Circuit (NCC), Semi-Context Circuit (SCC), and Full-Context Circuit (FCC)—each characterized by unique attention patterns (measured by metrics such as Bigram, Label Attention, and Chunk Example). The work further extends the analysis to multi-head settings and controlled pruning experiments, linking the observed circuit transitions to abrupt improvements in accuracy. Overall, the paper suggests that these emergent circuits underpin the meta-learning abilities observed in transformer-based language models.", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for your detailed review. \nWe revised the figures and added experiments (notably Figures 17, 18, 19, 20 and 21) in the following website: https://sites.google.com/view/in-context-meta-learning. \n\n**> W1** \n> attention maps in Figure 2, it is not simple to identify the circuits.\n\nPlease see **Figure 17**, and refer to W1 from Reviewer bYju for more details.\n\n**> W2** \n> Is the accuracy calculated on test data?\n\nWe focus on training dynamics and internal circuits in a practical task rather than OOD behavior as in [1]. Hence, we do not strictly separate train and test sets, although section 4.3 examines OOD behavior via random labels. For completeness, **Figure 18** presents test accuracy, confirming that phase transitions also manifest.\n\n[1] “The mechanistic basis of data dependence and abrupt learning in an in-context classification task”\n\n**> W3** \n> The considered architecture is peculiar. \n\nUsing a two-layer standard Transformer, interleaving attention and MLP blocks, we still see phase transitions in accuracy and observe similar circuits (SCC,FCC) in **Figure 19**. However, the transitions are less distinct. We adopted a two-layer, attention-only Transformer to focus on self-attention, whose architecture is widely used in prior works analysing in-context learning [1,2,3]. The minimal models clearly simulates in-context behaviors such as induction heads [4], and can be useful for clearer phase-transition and circuit-level analysis.\n\n[2] “What needs to go right for an induction head? A mechanistic study of in-context learning circuits and their formation”    \n[3] “Differential learning kinetics govern the transition from memorization to generalization during in-context learning”   \n[4] “In-context Learning and Induction Heads”\n\n**> W4** \n> some metrics present some overlap which are not discussed in depth.\n\nWe address why Chunk Example and Bigram remain high outside their respective phases:\n\n---\n1. Chunk Example   \nUsing the chunk-example metric (Table 2), the initial value is $\\frac{1}{4}(\\frac{1}{2}+\\frac{1}{4}+\\frac{1}{6}+\\frac{1}{8})\\approx 0.26,$which we treat as the baseline.\n- In **Phase 1**, both Layer 1 and 2 stay near this baseline.\n- In **Phase 2**, the metric increases in Layer 2 but does not affect the final output because the loss is only computed on the last token.\n- In **Phase 3**, the metric in Layer 1 exceeds the baseline and influences the final output, showing that the chunk-example circuit is forming and impacting the last token’s prediction.\n\n---\n2. Bigram    \n- In **Phase 2**, due to row-wise softmax normalization, strong attention to label tokens in Layer 1 diminishes Bigram attention. \n- In **Phase 3**, in contrast, Layer 1’s chunk example pattern does not compete with Bigram, allowing the Bigram metric to recover relative to its Phase 2 level.\n\nWe will add this explanation in the revised version. \n\n**> W5** \n> what happens when T grows larger\n\nWe tested $T=3,6,9,12,15,18$ (see **Figure 20**) and found that phase transitions still occur for larger $T$. Increasing $T$ reduces Phase 1 accuracy (around $1/T$) and delays the transition to the next phase.\n\n**> W6** \n> section 3.1 would benefit from a clearer explanation\n\nPlease see **W2** from Reviewer bYju.\n\n**> W7** \n> more standard architectures and in larger models.\n\nFor standard Transformer results, please see **W3**.    \nWe tested whether our identified circuits appear in LLMs by evaluating a pretrained GPT2-XL (48 layers) on [SST2](https://huggingface.co/datasets/stanfordnlp/sst2) (872 samples). We used a 2-shot prompt: two labeled examples (`Review: {text}\\nSentiment: {label}`) and a third, unlabeled query. Since the model is already trained, we observe each layer’s behavior on these prompts.\n\nWe measure 3 metrics by averaging attention $p(i,j)$ across all heads in each layer, where $p(i,j)$ denotes the attention from the $j$-th token to the $i$-th token:\n\n1. **Bigram**  $p(\\text{query}, \\text{query})$   \n   Here, query refers to the final token, and this metric measures a query token’s attention to itself.\n2. **Label Attention**  $\\frac{1}{K}\\sum_{k=1}^{K} p(\\text{query}, \\text{label}_k)$    \n   Where $K$ is the number of shots, and $\\text{label}_k$ is the label token in the $k$-th example. This captures how strongly the query token attends to label tokens.\n3. **Chunk Example**  $\\frac{1}{K}\\sum_{k=1}^{K} \\frac{\\sum_i p(\\mathrm{label}_k, \\mathrm{text}_k^i)}{n_k}$   \n   Here, $n_k$ is the number of text (non-label) tokens in the $k$-th example, and $\\mathrm{text}_k^i$ represents the $i$-th such token. This metric reflects how strongly each label token attends to the text tokens in its corresponding example.\n\n**Figure 21** shows that the Chunk Example metric is higher in early layers, while Label Attention dominates later layers—mirroring our two-layer model’s progression from chunk example to label focus. This pattern aligns with our earlier findings in small Transformers, suggesting these circuits generalize to LLMs.", "claims_and_evidence": "**Claims**\n\n- In-context meta-learning emerges via multi-phase transitions in the transformer’s internal circuitry.\n- Each phase corresponds to a different circuit (NCC, SCC,FCC) which can be quantitatively tracked using specific attention-based metrics.\n- These circuit transitions explain phenomena such as the model’s robustness to random label shuffling and the smoother improvement observed in multi-head settings.\n\n**Evidence**\n\n- Several experiments are performed on a simple transformer architecture which indeed exhibits the aforementioned transitions (fig 2, fig 4).\n- The simple theoretical derivations (4.3), which yield predictions in line with empirical curves (fig. 5), support their interpretation of the circuits.\n\n\nSome aspects (for example, the extension to practical large-scale LLMs) might benefit from further empirical validation beyond the synthetic setup as the considered architecture is a drastic simplification compared to modern LLMs.", "methods_and_evaluation_criteria": "The authors use mainly 4 metrics for their experiments: 1) accuracy and differential accuracy (as defined in 4.1), 2) bigram, 3) label attention, 4) Chunk example. The first is standard and its differential version makes sense to better illustrate  phase transitions in the dynamics, the others are specifically tailored to highlight the emergence of the identified circuits.", "theoretical_claims": "The paper includes a derivation of a theoretical accuracy formula for the SCC based on the probability that certain labels appear in the context (proof in Appendix D). Fig 5. empirically validates the theoretical result.", "experimental_designs_or_analyses": "The experiments are extensive and aimed at showing that indeed the identified circuits emerge during training. I have a couple of questions:\n\n1. Looking at the attention maps in Figure 2, it is not simple to identify the circuits. According to which criteria did the authors draw red squared in the attention maps? For example, it is not clear that in Phase 2, such squares actually highlight the entries of the matrix with high intensity. Also the figures are not very visible and in my opinion they should be made more visible and clear.\n2. Is the accuracy calculated on test data?\n3. The considered architecture is peculiar. Why did the authors choose to use 2 consecutive attention blocks followed by an MLP layer, rather than the classical transformer architecture interleaving attention and MLP blocks?\n4. Figure 4. shows the evolution of the proposed metrics. These metrics follow to some extent the interpretation given by the authors. However, some metrics present some overlap which are not discussed in depth. For example, Chunk Example seems to be pretty high even in phases different from last one. Similarly, Bigram (layer 1) remains quite high in the phase. Do the authors have an explanation for that?\n5. While the number of tasks is ablated in figure 7, it would be interesting to see what happens when T grows larger, a setting more in line with real world settings.", "relation_to_broader_scientific_literature": "The paper builds upon prior work in in-context learning, notably studies on induction heads and mechanistic interpretability in transformers (e.g., Olsson et al., 2022; Reddy, 2023).", "essential_references_not_discussed": "From the best of the reviewer knowledge, the related literature is adequately covered.", "other_strengths_and_weaknesses": "**Strengths**\n\n- Overall, the paper presents an interesting empirical analysis to investigate the phenomenon of in-context learning in transformer-based architectures.\n- The learning dynamics revealed by the experiments is peculiar and novel from the best of reviewer knowledge.\n\n**Weaknesses**\n\n- Some experimental results should be more carefully discussed (see Experimental Designs Or Analyses).\n- Some parts of the paper could be written more clearly, for example section 3.1 would benefit from a clearer explanation of the way the data is represented.\n- It would be very interesting to see if the circuits found in the paper manifest themselves even in more standard architectures and in larger models.", "other_comments_or_suggestions": "post rebuttal, raising my score to weak accept.", "questions_for_authors": "See Strengths And Weaknesses and Experimental Designs Or Analyses.", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "eZtxSvccCe", "reviewer": "Reviewer_d11A", "summary": "The main contributions of this paper are the following.\n\n1. A novel synthetic in-context sequence modelling data set, based on identifying which of a number of classification rules are active and using it to predict the label of the query.\n2. Demonstrating through analysis of the loss and attention mechanisms that\n   when a small transformer is trained on this task, it progressively\n   implements three different solutions of increasing accuracy over training.\n\nFurther experiments contribute additional findings, namely:\n\n* One of the three solutions is a novel label-based prediction method, the\n  paper studies this solution in more detail.\n* The paper experiments with varying some data-distributional properties,\n  cataloguing their effect on the sequence of solutions.\n* The paper experiments with multi-head attention, showing that different heads\n  specialise to different solutions at the same time in this case, and the loss\n  trends are smoothed out.\n\n**Summary of my review:** Overall, I think this is a strong paper that makes a\nvaluable contribution. However, I have recommended 'weak reject' based on\nsome missing discussion of important related work. If the authors can amend\nthis I would be pleased to change my recommendation to 'accept'.\n\n**Update:** The rebuttal show adequate summary of the relationship to prior work. I am changing my recommendation to 'accept' in the understanding that these comparisons would be included in the final version. See my follow-up comment for some minor further discussion.", "questions": "", "limitations": "", "rating": 4, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We appreciate the reviewers’ insights and address each point below.\n\n**> W1** \n>  It seems to me that the RLA should be higher during SCC than during FCC.\n\nRandom Label Accuracy (RLA) can increase whenever label information is incorporated into the final token’s prediction. Even if the model uses a chunked example circuit (FCC), it can still leverage label information for that final prediction, which can maintain RLA. We do not claim that RLA must necessarily drop in the FCC phase or that RLA is definitively higher in SCC than in FCC.\n\n**> W2** \n> The main weakness is incomplete discussion of prior work\n\nWe acknowledge that our study is related to multiple lines of research on in-context learning, multi-phase emergence. Below, we outline the connections and highlight where our approach differs.\n\n---\n1. ICL Literature Beyond Copy Tasks\n- **Linear Regression Approaches**  \n  Prior studies on in-context learning often adopt linear regression [1,2], which provides a tractable theoretical framework. Although they set a common task across context examples, they typically rely on MSE loss—differing from real-world in-context use. Our setup more closely aligns with practical LLM applications.\n\n- **Markov Chain–Based Tasks**  \n  Other works [3,4,5] focus on in-context learning with Markov chain tasks. While the meta-learning aspect is similar to our setting, these tasks differ from the few-shot pairs format that is standard in LLM applications.\n\n- **Modular Arithmetic**  \nResearch on in-context modular arithmetic [6] studies out-of-distribution behavior and final attention maps. Although it extends beyond simple copy tasks, it does not track the circuit acquisition dynamics during training or directly link them to phenomena like random-label accuracy or multi-head smoothing—key aspects of our work.\n\n---\n2. Multi-Phase Emergence Literature  \n- **Phase Transitions**  \n  Prior work [4] shows transformers acquiring functionalities in discrete “phase transitions,” which aligns with our observations. However, the task there (Markov chains) is different from our few-shot setup, which is more akin to real-world LLM usage. Also, while [4] studies a progression from `uniform prediction → unigram → bigram`, we analyze more complex `Bigram → Semi-Context → Full-Context` circuits.\n\n- **Developmental Interpretability**  \n  Studies like [7,8] also note multi-phase transitions in in-context learning. However, they mainly focus on the loss landscape’s geometry (e.g., local learning coefficient, or LLC) rather than the mechanistic circuits we analyze. Bridging LLC-based approaches with an internal-circuit perspective could be an exciting future direction.\n\nWe will include those discussions and citations in the revision.\n\n[1] Transformers Learn In-Context by Gradient Descent.   \n[2] Pretraining task diversity and the emergence of non-Bayesian in-context learning for regression.   \n[3] Selective induction Heads: How Transformers Select Causal Structures in Context.   \n[4] The Evolution of Statistical Induction Heads: In-Context Learning Markov Chains.   \n[5] Competition Dynamics Shape Algorithmic Phases of In-Context Learning.   \n[6] Learning to grok: Emergence of in-context learning and skill composition in modular arithmetic tasks.   \n[7] The Developmental Landscape of In-Context Learning.    \n[8] Loss Landscape Degeneracy Drives Stagewise Development in Transformers.   \n\n**> W3** \n> I invite the authors to consider a different title for this section to avoid possible confusion.\n\nWe will rename that section to “Multi-Head Attention Facilitates the Emergence of Distinct Circuits” to avoid conflating our focus on circuit formation dynamics with mechanistic-interpretability efforts on circuit discovery.\n\n**> W4** \n> While I generally agree with the framing that meta-learning is an important element of ICL, I didn't find this example compelling.\n\nWe agree that induction heads can perform pattern matching at a more abstract level, as described in the original induction heads paper (Argument 4 in Olsson et al.). However, consider a scenario where the token “Tokyo” does not appear in the context: if the model only performs a (possibly abstract) copy operation, it cannot generate “Tokyo” from the context itself. In other words, merely copying from the examples—whether literally or via a higher-level “abstract match”—is insufficient for a task like “Find the capital of Japan” unless “Tokyo” is explicitly present in the context.\n\nThus, our central motivation remains unchanged: while induction heads can extract answers that are already present in the context, they do not fully explain the ability of LLMs to infer a shared task (like a country-to-capital mapping) and then apply it to a query whose answer is not directly provided in the context. Numerous studies (including research on task vectors) suggest that LLMs can learn and apply such tasks in-context beyond the scope of mere copy-based or induction-head operations.", "claims_and_evidence": "The empirical claims are supported by clear and convincing evidence for the most part.\n\nI didn't quite follow figure 6's discussion of random label accuracy. In particular, RLA is as high in the SCC phase as in the FCC phase. In the latter, the transformer is meant to be using a circuit that depends on the pairs rather than just the labels. It seems to me that the RLA should be higher during SCC than during FCC.", "methods_and_evaluation_criteria": "The synthetic data setting is well-designed and captures the intended features of a 'meta-learning' style task.", "theoretical_claims": "N/A", "experimental_designs_or_analyses": "N/A", "relation_to_broader_scientific_literature": "Understanding the emergence of in-context learning abilities in large-scale\ntransformer models is an important objective of the science of deep learning.\nMany recent works have studied simplified synthetic sequence modelling settings\nwhere the emergence of in-context learning can be elicited and understood in\ndetail (in terms of both the emergent mechanistic structure and also the\ntraining-dynamical mechanisms governing its emergence).\n\nIn this context, this paper's main contributions represent a well-designed and\nnovel synthetic in-context classification task that captures a meta-learning\nchallenge, exhibits a third intermediary 'semi-contextual' solution, leads to a\nparticularly crisp example of a progression of emergent learning mechanisms.\nThis setting would be a good basis for future work studying the emergence of\nthese transitions in detail.", "essential_references_not_discussed": "**Synthetic in-context learning tasks that capture meta-learning.**\n\nThe paper acknowledges and discusses prior work on what they call 'copy tasks'\nand the emergence of induction heads. They adequately compare their setting and\nfindings to this part of the literature on synthetic examples of the emergence\nof in-context learning.\n\nHowever, the 'copy task' setting is only a small part of a much broader\nliterature that has developed over the last couple of years, that is not\nadequately discussed in the paper. There are by now dozens of different\nsynthetic in-context learning settings, many of which do not have the same\nlimitations as a simple 'copy task,' and are require more general requirement\nof identifying a 'task vector' as discussed by the authors in the \"implications\nfor LLMs\" paragraph (starting line 424(right)). A non-exhaustive list of other\nsettings includes:\n\n* In-context linear regression, which involves identifying a latent task\n  vector, rather than just copying previous labels. The paper cites some work\n  in this space but does not discuss it as an example of moving beyond the a\n  'copy task.'\n* In-context Markovian sequence modelling [1].\n* In-context modular arithmetic [2].\n* Many other similar settings.\n\nIn-context linear regression and Markovian sequence modelling involve\n'implicitly' identifying a task vector. However within these settings there are\nalso variants more similar to the paper's setting where the transformer must\nselect from a finite set of tasks, namely [3, 4].\n\nTo be clear, the specific multi-task classification setting considered in this\npaper is novel to my knowledge. However, since the paper frames this setting as\na core contribution and motivates it as an attempt to capture the challenge of\nmeta-learning, in my opinion related settings clearly represents related work\nthat should definitely be cited and ideally should be discussed in greater\ndetail.\n\n**Multi-phase emergence.**\n\nThe other core empirical finding of the paper is that solutions arise in a\nsequence of multiple phase transitions. While the analysis of this setting is\noriginal (to my knowledge), a qualitatively similar finding has already been\npublished in the settings of Markovian sequence modelling [1], in-context\nlinear regression [5], language modelling [5], and plausibly other settings. I\nbelieve this is highly-related work that should be cited and discussed in the\npaper.\n\n---\n\n* [1] https://arxiv.org/abs/2402.11004\n* [2] https://arxiv.org/abs/2406.02550\n* [3] https://arxiv.org/abs/2306.15063\n* [4] https://arxiv.org/abs/2412.01003\n* [5] https://arxiv.org/abs/2402.02364", "other_strengths_and_weaknesses": "**Strengths.**\n\nIn my opinion, this is a strong paper overall. The results are very clear. The\npresentation is very clear. I believe the paper makes a valuable contribution\nto the literature, as discussed.\n\n**Weaknesses.**\n\nThe main weakness is incomplete discussion of prior work, as outlined in the\nprevious section. To my knowledge, the setting proposed in the paper and the\nspecific results within this setting are novel, but as an alternative\ndemonstration of the same kinds of findings that I am already aware of based on\nother work in different settings. I still think the paper is valuable and\nwell-done, but this prior work needs to be acknowledged and discussed.", "other_comments_or_suggestions": "Small typos I noticed:\n\n* Line 335: \"nunber\"\n* Line 825: \"Birstiness\"\n\nOther notes:\n\n* The title of section 5, \"multi-head enhances circuit discovery\", was\n  confusing while I read it. \"Circuit discovery\" to me suggests the mechanistic\n  interpretability problem of finding circuits in a learned model. Importantly,\n  it's mechanistic interpretability practitioners that are doing the\n  discovering. However, this section appears to talk about the discovery of the\n  circuits *by the model, during learning.* That is, multi-head attention makes\n  it easier for different circuits to emerge. I invite the authors to consider\n  a different title for this section to avoid possible confusion.\n\n* On page 1, the paper uses a country-to-capital task to motivate moving past\n  copy tasks and induction heads. While I generally agree with the framing that\n  meta-learning is an important element of ICL, I didn't find this example\n  compelling.\n  \n    Arguably, in a large-scale example, an induction head could be an important\n  part of a mechanistic explanation of an LLM's ability to perform such a task.\n  If by some intermediate layer the tokens `France`, `Spain`, and `Japan` have\n  a representation involving that they are countries, and `Paris` and `Madrid`\n  have a representation have a representation involving that they are capitals\n  of the preceding country, then in this dimension the task becomes a copy\n  task. The original induction heads paper already identifies and discusses\n  similar 'abstract' induction heads in their small scale language modelling\n  experiments (see the section 'Argument 4' in Olsson et al.).", "questions_for_authors": "My overall assessment of 'weak reject' is based on the incomplete discussion of prior work. Do the authors agree that this work is related? If so, I invite the authors to clarify the distinction from this prior work in their revision, in which case I would be pleased to increase my recommendation to 'accept.'", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "RDOtGPtrYh", "reviewer": "Reviewer_bYju", "summary": "The paper proposes a problem setting named In-Context Meta-Learning (ICML) with multiple tasks.\nFor the same query, the answer would be different from task to task, so the model needs to infer the task to make a prediction.\nTrained on this setting, the paper found that the model training has multiple phases: (i) predict simply based on query, (ii) predict based on labels of example and query, (iii) predict based on all.\nThe paper further shows multi-head attention may make this abrupt transition on loss not apparent, but such abrupt transition can still happen internally.", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for your detailed review. \nWe revised the figures and added experiments (notably Figures 17 and 22) in the following website: https://sites.google.com/view/in-context-meta-learning. \n\n**> W1** \n> The red block potentially make it even more hard to observe\n\nWe replaced the red squares with red arrows in **Figure 17** and highlighted the updated caption in purple. Strong attention stands for entries that exhibit relatively high intensity in the row-wise softmax-normalized attention map. Note that the last query token often shows strong attention because it’s crucial for prediction.\n\nFigure 2 is intended to illustrate the three distinct training phases (based on accuracy and loss) \"qualitatively\". This intuition from attention patterns motivates deeper analyses in the later sections. A more quantitative and rigorous analysis of attention maps appears in Figure 4 of the main paper.\n\n**> W2** \n>  K is not clear to me based on Sec. 3.1.\n\nWe will include the following table, which outlines the key hyperparameters and their default values, as well as a brief description of each parameter. We believe this format clarifies how the data is generated and represented in our experiments.\n\n| **Parameter** | **Description**| **Default Value** |\n|---|---|---|\n| $T$           | Number of tasks (types of $\\tau$).  | 3 |\n| $K$           | Number of classes (types of $k$).  | 64 |\n| $L$           | Number of labels (types of $\\ell$).  | 32 |\n| $N$           | Number of $(x, \\ell)$ context pairs.  | 4 |\n| $\\epsilon$    | Noise magnitude controlling intra-class variation.  | 0.1 |\n| $p_B$         | Probability that the query item $x_q$ appears identically within the in-context examples. | 0 |\n| $\\alpha$   | Exponent for the power-law (Zipf) rank-frequency distribution over classes.  | 0  |\n| $\\beta$       | Exponent for the power-law (Zipf) rank-frequency distribution over tasks.  | 0    |\n\n**> W3** \n> Missing a very related work\n\nThank you for noting [1]. Their results in pretrained models align with ours, especially regarding how label tokens gather context for deeper layers. Similar chunk-example attentions have also been noted in LLMs [2].\n\nUnlike [1] and [2], we run controlled experiments to observe circuit formation during training.   \nWe will clarify this connection and highlight how our dynamic analysis complements their findings.\n\n[1] Label Words are Anchors: An Information Flow Perspective for Understanding In-Context Learning.   \n[2] Revisiting In-context Learning Inference Circuit in Large Language Models.    \n\n**> W4** \n> the author constantly observe no transition happens on the accuracy curve.\n\nIn **Figure 22**, we show four training runs (seeds 0, 1, 2, and 3) of a 2-head attention model. Consistently, across all seeds, the accuracy curve does not exhibit clear, discrete phase transitions, supporting our observation that multi-head configurations tend to smooth out in accuracy.\n\n**> W5** \n> I got confused here since the word \"multi-head\" suddenly jumped to me.\n\n> I went to appendix B but it does not tell me how many heads are used.\n\nWe will clarify that our default setting uses a single-head attention model. We then introduce the multi-head extension later to examine how additional heads affect phase transitions and circuit formation. \n\n**> W6** \n> we do not know which phase real-world LLMs are in\n\nWe agree that it is difficult to conclusively determine which “phase” might dominate within a real-world LLM. However, our point is that the label-attention circuit seen in Phase 2 of our toy model—one that yields higher accuracy on random labels—may also be present (at least in part) in large-scale models. We do not claim LLMs remain in phase2, only that phse2 circuit likely contributes to their observed behavior on random-label prompts.\n\n**> W7** \n> What is the gap between toy and practical settings?\n\nIn our toy setup, we observe abrupt phase transitions (e.g., a sudden drop in loss), whereas large-scale LLM training typically does not exhibit such discrete transitions in practice. When we introduce multiple heads, these abrupt transitions become smoothed out, making our toy model’s behavior more akin to real-world LLMs—thus “bridging the gap” between the simplified setting and practical scenarios.\n\n**> W8** \n> Why the author sets L<K?\n\nPlease see  **W2** for our detailed revisions to Section 3.1. \nWe set $L<K$ following prior studies [1], which introduce a notion of synonymous classes: multiple tokens can represent the same label. For example, the words “Happy” and “Glad” might both map to the same sentiment label. This design reflects more realistic linguistic variability.\n  \n[1] Data Distributional Properties Drive Emergent In-Context Learning in Transformers \n\n**> W9** \n> The author could consider use \\bm{\\mu} for P3 col2 line130 since that's a vector.\n\nWe will modify the latter usage to indicate it is a vector, ensuring clarity in the notation.", "claims_and_evidence": "Claim: The model has multiple phase transitions: (i) predict simply based on query, (ii) predict based on labels of example and query, (iii) predict based on all.\n\nEvidence: Almost all the experiments in the paper srtongly supports the claim.\n\nQuestion: I believe Fig. 2 is used to support such claim. But the pattern is not obvious. The red block potentially make it even more hard to observe. I feel that label attention and bigram give the same visualizetion. (The case might be \"this is just the truth\". In that case, the author could consider draw the difference between the two visualizations of phase 1 and phase 2, or figure out another setting.)", "methods_and_evaluation_criteria": "Yes. The experiments make sense except for the Fig. 2, where the attention visualization is not well supporting the claim.", "theoretical_claims": "There is no theory.", "experimental_designs_or_analyses": "Yes, I read the full paper so I checked the experimental design. I believe the paper should provide better writing to introduce the setting of the experiments. Based on my experience, I believe there is no issue in the experimental design and experimental results.", "relation_to_broader_scientific_literature": "The paper provides a deeper understanding of ICL beyond prior finding of induction head and a deeper understanding of the training dynamic of ICL beyond [I cannot provide more detail here since I'm not sure about what is the SOTA understanding of ICL's training dynamic].", "essential_references_not_discussed": "Missing a very related work: Label Words are Anchors: An Information Flow Perspective for Understanding In-Context Learning. The paper empirically shows a very similar information flow: The label in the shadow layers collect information from the (x,y) pairs, and then deep layer processed those summarized information.", "other_strengths_and_weaknesses": "Strength:\n\n(1) The experiment of random-label robustness of SCC is a good connection to existing work, which is a plus to me. This is a strong evidence of the difference between phase 2 and 3.\n\n(2) The experiment design is good to me. Starting from single attention and extend to multi-head attention\n\n(3) Overall the experiments make the training dynamic and interpretation very clear.\n\nWeakness:\n\n(0) The author could show multiple run on experiments with multiple attention heads in Fig. 8. My training (multi-head) on ICL (different tasks) encounter diverse transition. The multiple plateaus may occur and may not. So I'm curious on whether the author constantly observe no transition happens on the accuracy curve.\n\n(1) There are some minor issues in the flow of introduction:\n(a) P1 col2 line051 \"we train a simplified transformer\", P2 col1 line101 \"we also examine the case of multi-head model\". I got confused here since the word \"multi-head\" suddenly jumped to me. I'll guess the conclusions before \"multi-head\" are based on a single-head model, then I'll guess whether the author means \"single-head\" as \"simplified transformer\";\n(b) P2 col1 line101 \"The existence .... nature of LLMs\": The sentence is a statement but I think the statement may not be true since the paper found in the second phase the Transformer will predict based on examples' label (and query), while we do not know which phase real-world LLMs are in.\n(c) P2 col2 line075 \"phase transition can ... practical scenarios\": this sentence says \"bridging the gap\". What is the gap between toy and practical settings? \n\n(2) There is a redundancy in the related work:\n(a) The first and second sentences aim to introduce the same thing “ICL”. I think the author forgets to delete one of them. (These duplicated sentences are potentially generated from LLMs, The author may need to do more proof reading.)\n\n(3) There are some writing issue in the experimental setup:\n(a) The notation $K$ is used in P3 col2 line 136 but not introduced before using. This issue introduces huge issue for me to understanding the paper. What is $K$? Why the author sets $L<K$? Is the $K=64$ the number of classes? Maybe not, since we only have $L=32$ labels? Such confusion from the issue costs lots of reading energy of me. The author should clarify in Sec. 3.1 rather than requiring the reader to remember the paper define $K$ in Fig. 1.\n(b) $\\mu$ is used in P3 col2 line130. It's used again in P3 col2 line149 for another meaning. The author could consider use \\bm{\\mu} for P3 col2 line130 since that's a vector.\n\n(4) Experimental setting is not clear:\n(a) Sec. 3.2 said there are $m$ heads, and more details in Appendix B. I went to appendix B but it does not tell me how many heads are used. I have this question because I want to know whether the results in Fig. 2 comes from 1 attention head or multiple attention heads. But I cannot find it. The question remains in my mind until I read the title of Sec. 5.\n(b) P5 Col1 line253, \"µ\"-th layer.\n\n\nI will rate 3.75 if purely based on experiments and ideas. The score goes to 3.25 because of the writing issues. (The qualities of idea and experiments are beyond acceptance line but the quality of writing is below acceptance line)", "other_comments_or_suggestions": "N/A", "questions_for_authors": "N/A", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "EtiGuLwndS", "reviewer": "Reviewer_CGRe", "summary": "This paper extends the toy model and task setup of [Reddy 2023] to the multi-task case, which requires models to infer tasks from in-context learning to label the last token. \nTheir main findings show that in this setup there are three phases in learning, where each phase is associated with the transition of an attention pattern/circuit in each of the two layers. This contrasts with the single phase for a single task as in [Reddy 2023]. \n\nThey further investigate these findings and demonstrate:\n- The three phases of learning persist across varying numbers of tasks, other than T=1 which results in only the first and last phase as in [Reddy 2023]. \n- The second phase circuit is unique to the T>1 IC-ML setup, and is associated with models’ improved accuracy by integrating label information to predictions. This circuit’s accuracy coincides with the accuracy of a model on tasks with random labels, suggesting that the reason model performance does not degrade fully on random labels is due to circuits such as this one.\n- The phases are not pronounced with multi-head attention (as opposed to the single head setup), as the phased circuits form in parallel rather than in sequence.\n\n## update after rebuttal\n\npost rebuttal, raising my score to weak accept.", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for your detailed review. \nWe added experiments (notably Figures 21, 23, 24, 25, 26 and 27), in the following website: https://sites.google.com/view/in-context-meta-learning. \n\n**> W1** \n> Experiment training with data of varying context lengths and next token prediction\n\nWe conducted additional experiments to address the concerns regarding generalizability.\n\n- Context Length:   \nIn **Figure 23**, we tested varied context lengths (N=2 to 64). While longer contexts accelerate convergence to the FCC, the phase transitions remain observable up to N=8. In **Figure 24**, we show the circuit learned for N=16, which structurally align with the FCC reported in the main text. \n\n- All-Label Prediction:  \nIn **Figure 25**, we experimented with predicting \"all\" labels in context. Phase transitions were still observed, and the final learned circuit again resembles the main FCC. \n\nThese results demonstrate that the key phenomena—phase transitions and FCC formation—are robust to variations in context length and prediction objective.\n\n**> W2** \n> Experiments with more layers than two\n\n**Figure 26** shows experiments extending from 2-layer models to 3, 4, and 5-layer models. For the 2-layer and 3-layer models, we observe a phase transition in accuracy; however, when increasing to 4 or 5 layers, any phase transition in accuracy becomes less pronounced.  \nAdditionally, **Figure 27** visualizes the final circuits in the 3, 4, and 5-layer models. In all cases, the first two layers form a circuit resembling an FCC-like structure.\n\nOur results show that even with 3, 4, and 5 layers, the key circuit still forms, though phase transitions in accuracy become less distinct. This demonstrates that our findings extend beyond a mere two-layer “toy” setup, indicating a robust mechanism likely relevant to larger-scale models. \n\n**> W3** \n> Experiment with pre-trained foundation models\n\nPlease see **W7** from Reviewer kgDv, where we show that a pretrained GPT2-XL exhibits chunk-example attention in its early layers and label-attention patterns in its middle-to-late layers on natural language data (see **Figure 21**). These findings align with our two-layer attention-only model and suggest that these circuits generalize to LLMs.\n\n**> W4** \n> the paper extends the results of Reddy et al to the multi-task setup, which detracts from the overall novelty and significance.\n\nWe believe analyzing how Transformers operate in a more realistic few-shot in-context learning scenario is crucial, as few-shot performance is central to many practical LLM applications. \nWhile much of the existing circuit-focused research on in-context learning (e.g., induction heads) remains limited to copy tasks that are not seen in a practical LLM usage, our work explores circuit formation under a broader few-shot setup, offering a novel perspective. \nFurthermore, unlike the single-head approach in Reddy et al., we investigate multi-head architectures, shedding new light on how circuits differ in this setting. \nFinally, we also provide additional experiments with standard Transformers (see **W3** from Reviewer kgDv) and pretrained-LLMs (see **W3**), underscoring the broader relevance and novelty of our analysis.\n\n**> W5** \n> What are the 3 Tasks in T?\n\nAs explained in Section 3.1, each task $\\tau$ defines a unique assignment of labels $\\ell$ to items $x$. While the underlying classes and mean vectors remain the same, the labels are randomly reassigned from one task to another. Thus, the 3 tasks in $T$ are simply 3 different ways of pairing each class (and its mean vector) with a label, giving rise to three distinct label assignments under the same class/feature space.\n\n**> W6** \n> Appendix C does not explain the pruning/masking of circuits used.\n\nWe believe the pruning/masking procedure is described in Appendix C, where we state:\n```all components except for the circuit corresponding to a specific phase were pruned at initialization, thereby isolating the contribution of each circuit.```\n\nIn Figure 12, the legends Phase1 Circuit, Phase2 Circuit, and Phase3 Circuit each refer to an experiment where only the circuit from the respective phase was retained from the initial weights, ensuring that only that circuit contributed to the predictions. Due to the limited space in the response, we will provide additional details on the exact pruning process for each circuit in the revised paper.\n\n**> W7** \n> Does this rely on the model having memorized the two possible labels that can apply to xq\n\nIt is clearly the case that the model memorizes the two possible labels corresponding to xq. As explained in Section 4.1:\n```Phase 1 (Non-Context Circuit; NCC): Both layers use bigram attention, ignoring the context and relying solely on the model’s weights. ```\nDuring Phase 1, the model does not utilize any contextual information, indicating that the model’s weights have memorized the two possible labels for xq.", "claims_and_evidence": "Yes they justify their experimental claims.", "methods_and_evaluation_criteria": "If the focus is answering questions about their fixed setup, then I think the experiments/metric/evaluations make sense. However, the largest issue with the paper is that this toy task and model setup, which although reworked from prior art with [Reddy 2023], does not necessarily shed much light on in context meta learning in usual LLMs and transformers. \n- The two layer, attention only models, and the last-token-only classification loss, require some leap of faith to infer meaning outside the toy setup to usual LLM’s trained with next token prediction. If the goal was to gain insight about LLMs outside this particular setup, there should have been other experiments carried out\n    - Experiment training with data of varying context lengths and next token prediction, or at least label prediction at all $x$ tokens. Do the same circuits and phases form?\n    - Experiments with more layers than two, and in a usual (single head architecture). Do the phases exist? What circuits arise?\n    - Experiment with pre-trained foundation models performance on such a task, and perhaps ablate some of these circuits from all layers/attention heads.", "theoretical_claims": "There was just one calculation, which determined the probability in the “Deeper Look at the Semi-Context Circuit” section. I checked it and do not find any issues.", "experimental_designs_or_analyses": "Yes, all checked. The numerical metrics used for the particular attention circuits are self explanatory and appropriate.", "relation_to_broader_scientific_literature": "This would be most related to their referenced papers like [Reddy 2023], [Min et al 2022]", "essential_references_not_discussed": "Not to my knowledge", "other_strengths_and_weaknesses": "In addition to the weaknesses outlined in my answer to “Methods And Evaluation Criteria”, the paper extends the results of Reddy et al to the multi task setup, which detracts from the overall novelty and significance. \n\nThe strength of the paper is that the results they claim for their setup, are experimentally justified and well investigated. \nOther than some under specified aspects of the setup, the clarity of the paper is good.", "other_comments_or_suggestions": "post rebuttal, raising my score to weak accept.", "questions_for_authors": "- What are the 3 Tasks in T? I assumed it is a reassignment of labels and mean vectors for each class, but it could also be just a reassignment of labels, it is unclear.\n- Appendix C does not explain the pruning/masking of circuits used.\n- The setup is also not very clear for the “Deeper Look at the Semi-Context Circuit” section. Eg. “In Phase 1, since there are two tasks, the model has a 50% chance of predicting correctly by random guessing. In other words, the model’s prediction reduces to a binary choice for each input query $(x_q )$” Does this rely on the model having memorized the two possible labels that can apply to $x_q$ or does the input context contain all other classes so that possible 2 labels for $x_q$ can be decided by the two labels not used in the context? Can you clarify this section?", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Meta-review: This paper investigates how mechanistic circuits emerge during the training of transformer models on in-context meta-learning tasks. By analyzing a synthetic task, the authors identify multiple training phases, each characterized by the emergence of distinct attention-based circuits that support increasingly complex forms of generalization. The work is situated within the growing literature on mechanistic interpretability and in-context learning, and reviewers appreciated the empirical care and conceptual clarity of the circuit dissection—particularly the use of pruning and phase-specific interventions.

The main strength of the paper is its detailed, empirical account of circuit emergence in a controlled setting. While the analysis is task-specific by design, reviewers noted that it raises interesting questions about the dynamics of learning and representational shifts in broader settings. The paper does not attempt to establish generality, nor should it be expected to—but it would be helpful in the final version to explicitly discuss how future work might test the robustness of these findings across architectures or training setups.

One point of concern is the use of the term “phase transition.” While the training dynamics described are interesting and exhibit sharp shifts, referring to them as phase transitions is misleading. The observed changes occur in small models and finite settings, without the kind of asymptotic, large-scale behavior associated with non-analiticities of free energies that would justify such terminology. More neutral language such as training phase, or learning stage would more accurately reflect the empirical findings and avoid confusion. Clarifying this would strengthen the paper’s framing without diminishing its core contributions.

Overall, the paper offers a valuable empirical perspective on learning dynamics in in-context models. With clearer conceptual language, it makes a solid contribution to the interpretability literature and merits acceptance.
Decision: Accept (poster)