acceptodds
Under review as a conference paper at ICLR 2027

Language models use both proactive and retroactive mechanisms to make compositional inferences

Abstract

One of the most powerful features of modern language models (LMs) is their ability to generalize about novel in-context information. A fundamental component of this ability is compositional inference: the capacity to combine multiple new relations such as 'Tom's father is Steve' and 'Jim's father is Tom' in order to arrive at an unstated inference such as 'Jim's grandfather is Steve'. In this work, we study how LMs make these kinds of inferences. Using a variety of causal interventions on Llama 3.1 405B Instruct, we first demonstrate that 405B Instruct uses two functionally independent mechanisms to do so: a proactive mechanism that makes generalizations as soon as information is available in-context, and a retroactive mechanism that reasons about what is in-context only when it is necessary for predicting the immediate next token. We then consider why 405B Instruct uses two different mechanisms to make compositional inferences. We find that 405B Instruct uses contextual information to choose when to use the proactive mechanism, and that the proactive mechanism enables it to make deeper inferences than what the retroactive mechanism supports on its own.

Primary area:
interpretability and explainable AI
Keywords:
compositional inference, binding, multi hop reasoning, world models, mechanistic interpretability, language models

Reviews

Among:
Shape:
1234this paper, Top 30%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.67 over 3 reviews, above 70% of the others.
Reviewer_dFA4OpenReview ↗
Rating
3
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper investigates how language models perform compositional inference by identifying two distinct mechanisms: proactive reasoning, which precomputes relational representations, and retroactive reasoning, which composes relations on demand. Through causal interventions and activation patching on Llama 3.1 405B Instruct, the authors demonstrate the functional independence of these mechanisms and provide evidence for their hypothesized intermediate computations. Further experiments suggest that proactive reasoning is sensitive to contextual cues about future tasks and facilitates deeper multi-hop inference.

Critical strengths
  • The paper addresses a fundamental question in mechanistic interpretability by investigating how language models internally compose relational information, rather than merely evaluating their reasoning performance.
  • The causal intervention framework is carefully designed to distinguish proactive and retroactive mechanisms, providing stronger mechanistic evidence than correlational activation analyses.
  • The intermediate-variable interventions offer compelling evidence for the proposed computational pathways, with layer-wise prediction changes closely matching the hypothesized causal models.
  • The experiments examining contextual cues and inference depth provide meaningful insights into the functional advantages of proactive computation.
Critical weaknesses
  • The primary mechanistic findings rely heavily on Llama 3.1 405B Instruct, while the proactive mechanism is substantially less pronounced in smaller models. This limits the generalizability of the proposed dual-mechanism account across model architectures and scales.
  • The evaluation largely relies on synthetic relational reasoning tasks with highly structured prompts. The extent to which these mechanisms generalize to more realistic, linguistically diverse, and less constrained reasoning scenarios remains unclear.
  • Although the activation patching results support the proposed causal models, they do not uniquely establish the hypothesized intermediate representations or exclude alternative computational explanations.
  • The claim that proactive reasoning enables deeper inference is primarily supported by a controlled 3-hop experiment. More systematic evaluations across increasing reasoning depths and computational demands are needed to substantiate this broader conclusion.
Questions for authors

See above

2 comments

We thank the reviewer for their positive and constructive feedback. Below we address each of their concerns.

1. The primary mechanistic findings rely heavily on Llama 3.1 405B Instruct.

The reviewer expresses concern that our work relies too heavily on a single model, Llama 3.1 405B Instruct, to make its claim. In response to this concern, we have added new results for Gemma 4 31B Instruct, GPT-OSS 20B, Qwen 3.5 397B A17B, Qwen 3.5 35B A3B, Seed-OSS 36B Instruct, and Olmo 3.1 32B Instruct. This is in addition to our existing results for Llama 3.1 8B Instruct and Llama 3.1 70B Instruct. We reproduce figure 2 on each of these models and find that we can replicate the core elements of the proactive and retroactive patch-in experiments with each of these models. Consistent with our existing experiments with Llama 3.1 70B Instruct and 8B Instruct, some of these effects are more subtle than they are for Llama 3.1 405B Instruct, but clear evidence for the existence of the proactive and retroactive mechanisms can nevertheless be found across these other LMs. These results can be found in Appendix A.3.2 and are illustrated in Figure 7.

2. The evaluation largely relies on synthetic relational reasoning tasks with highly structured prompts

We accept that this is an inherent weakness of our approach, although we counter that the main grandfather inference task that we study is a common type of inference that people and LMs alike tend to make, and that we also present results for a range of other tasks in the appendix. We also agree that because our activation patching experiments require structured prompt templates that support precise interventions, it is difficult to capture a great degree of linguistic diversity in our experiments. That being said, we believe that we have captured about as much linguistic diversity as other classic interchange intervention works such as Feng and Steinhardt (2023), Prakash et al. (2026), and Gur-Arieh et al. (2026). Thus, our use of a synthetic relational reasoning task is with strong precedent, and we hope that the reviewer can reconsider whether this weakness is truly critical. Extending causal abstraction techniques for naturally occurring, linguistically diverse inputs is an exciting area for future direction.

3. Alternative computational explanations

We consider and provide evidence against one alternative explanation, which we refer to as the ‘attribute enrichment hypothesis’, in Appendix A.3.4. We also acknowledge that it is entirely possible for there to be other mechanisms that also support the ability of LMs to make compositional inferences. We do not mean to claim that the proactive and retroactive mechanisms are universal, or that they uniquely enable compositional inferences, and we have softened our language so as to avoid implying that this may be our claim.

4. More systematic evaluations across increasing reasoning depths are needed

We agree that more systematic evaluations are needed to make this claim, and we are excited to pursue future work that considers this idea in more detail. We have softened the language in our paper to avoid making a strong conclusion about reasoning depth when our aim is to instead present some exploratory evidence. In particular, we have changed the subsection header ‘4.2 proactive representations make deeper tasks possible’ to ‘4.2 proactive representations can make deeper tasks possible’. We further emphasize here that our conclusion in line 444 is already hedged – we claim that ‘...one function of the proactive mechanism may be that it allows LMs to make deeper inferences…’.

Dear reviewer dFA4,

As we approach the end of the discussion period, we would like to gently follow up on our rebuttal.

In response to your feedback, we have included new results that reproduce our experiment across 6 new open weight models in the 20B to 400B parameter range. These results demonstrate that both the proactive and retroactive mechanisms can be found in a wide variety of different models. We have also revised the manuscript such that the scope, intentions, and limitations of our work are stated more precisely. Overall, we believe that these changes now provide strong evidence for the generality of the identified mechanisms.

We have sincerely appreciated your feedback, and we believe that addressing it has strengthened our paper. If you feel that our response resolves your concerns, we would be grateful for a brief acknowledgment and, should you judge it warranted, an updated score. If any questions remain, we would be very happy to clarify them before the deadline.

Reviewer_uVQAOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

Interpretability on Llama 3.1 405B Instruct for in-context two-hop questions ("Tom's father is Steve. Jim's father is Tom. Who is Jim's grandfather?"). Two causal models: proactive (the relation "Jim's grandfather is Steve" is composed early, at the second mention of the middle entity) and retroactive (the final ":" chains two lookups). Evidence by activation patching with interchange intervention accuracy (IIA): a patch at the third "male 1" token into an uninformative target makes the model output the answer (layer ~42), and a patch at two positions with everything else frozen gives IIA ~0.94 (layer 43), so each is sufficient alone. Swapped-premise source/target prompts with a "grandmother" query give a layer-wise sequence of answers matching predictions, and double-source patching separates the variables. Why proactive? A hint preamble raises the proactive patch effect (cross-layer IIA 0.82→0.98), a distractor lowers it (→0.56), retroactive stays ~0.9; and in a 3-hop great-grandfather prompt only the proactive patch works. Appendix: 70B shows only retroactive, 8B fits neither; four other tasks work on 405B.

Critical strengths
  • The causal models make specific predictions about where and when interventions should work, and the experiments isolate each mechanism (freeze all but the last position; patch into a target with no information). The predicted answer sequence across layers is a nontrivial test that is passed. Main reason I don't reject.
  • Goes beyond "here is a circuit" and reports where it fails (8B, 70B, spacing of premises) on a 405B model.
Critical weaknesses
  • Generality is overclaimed. "Language models" in the title, but the full story holds for one model on a tightly controlled template, and the paper's own 70B/8B results show it is not universal. Fixed premise order and perturbation position matter, per the appendix, yet the main text says the mechanisms "generalize".
  • The "why" half is speculation with thin evidence. Three preambles for "rational" use and one 3-hop variant for "depth", without ruling out simpler explanations (the distractor just disrupts attention to the premise; the retroactive patch design is just unsuited to 3 hops). The abstract states these as findings.
Questions for authors
  1. What happens to accuracy of unpatched 405B when the proactive position is ablated or its attention blocked? How much of normal behaviour does each mechanism actually explain?
  2. How often is each mechanism used with irrelevant premises between the relevant ones, or other orders?
  3. Can the 3-hop retroactive patch be redesigned (more positions) so it works? If yes the capacity claim is gone.
3 comments

We thank the reviewer for their constructive feedback. We are glad they recognize the strength of using specific causal interventions to isolate the proactive and retroactive mechanisms. Below we address their highlighted weaknesses and questions.

Weaknesses

1. Generality is overclaimed

The reviewer is rightfully concerned about the generality of the proactive and retroactive mechanisms to other models beyond Llama 3.1 405B Instruct. In response to this concern, we have added new results for Gemma 4 31B Instruct, GPT-OSS 20B, Qwen 3.5 397B A17B, Qwen 3.5 35B A3B, Seed-OSS 36B Instruct, and Olmo 3.1 32B Instruct. We reproduce figure 2 on each of these models and find that we can replicate the core elements of the proactive and retroactive patch-in experiments. Consistent with our existing experiments with Llama 3.1 70B Instruct and 8B Instruct, some of these effects are more subtle than they are for Llama 3.1 405B Instruct, but clear evidence for the existence of the proactive and retroactive mechanisms can nevertheless be found across these other LMs. These results can be found in Appendix A.3.2 and are illustrated in Figure 7.

We recognize that this issue can also be addressed by softening some of our claims. As the reviewer mentions as well, it is not our intention to claim that the proactive and retroactive mechanisms are universal – rather, our goal is to demonstrate that they exist and can drive behavior for at least some LMs. To address this issue, we have changed ‘[we] demonstrate that LMs use two functionally independent mechanisms’ on line 83 to ‘[we] provide evidence for two functionally independent mechanisms that LMs can use’. We have also modified line 113 to include an acknowledgement in the main text that there are limits to how far reaching the proactive mechanism is: ‘In Appendix A.3.2 we demonstrate that our mechanisms and experiments generalize to other tasks, and we also discuss their limits.’. We are grateful for the opportunity to clarify this point.

2. The ‘why’ half is speculation with thin evidence

We thank the reviewer for this feedback. Broadly, it was not our intention to take an overly strong stance on the answer to the ‘why’ question, and so we have taken care to soften some of our claims here as well. For example, we have changed ‘to answer this question’ on line 370 to ‘to explore one potential answer to this question.’. We have also changed ‘these experiments demonstrate’ on line 377 to ‘these experiments suggest’. In other places, such as the abstract, we believe that our phrasing is already consistent with our stance that the ‘why’ section is intended as a consideration of a possible hypothesis, and not as a definitive answer.

Response to questions

1A. What happens to the accuracy of unpatched 405B when the proactive position is ablated or its attention blocked?

In response to this question, we ran an additional experiment where the attention from the proactive token position (token position 46, the final {male_1} token in prompt template (1)) to some set of previous token positions was masked at every layer. We find that: A) if attention to all previous token positions is masked, then model accuracy drops to 1%, B) if the proactive position is only allowed to attend to itself and to the tokens within its premise statement, then model accuracy drops to 0%, and C) if the proactive position is only allowed to attend to previous instances of the same {male_1} token and to tokens within its premise statement, then model accuracy remains at 100%.

Each of these results is consistent with the predictions of our proactive and retroactive mechanisms. Ablation (A) and (B) collapse model performance because both mechanisms require that the proactive token forms the same position ID as its previous occurrences. Ablation (C) allows the model to maintain performance because it supports this as well as the formation of either the proactive representation or the representation of the first hop in the grandfather inference.

1B. How much of normal behavior does each mechanism actually explain?

The claim of this paper is that the proactive and retroactive mechanisms each exist and are functionally independent – that is, that each can allow the model to make compositional inferences without the other. We do not have a strong sense of how the two mechanisms trade off against one another when they are both active or when they might disagree. This is an interesting question for future exploration, but we treat it as out of scope for our current goal of describing and providing evidence for the existence of the two mechanisms. Answering this question would interface with other research frameworks, such as competition/coordination between circuits, and we are excited about this direction for future work!

2. How often is each mechanism used with irrelevant premises between the relevant ones, or other ones?

Consider a setting where the prompt is as follows:

‘{male_1}’s mother is {female_0}. {male_1}’s father is {male_2}. {distractor premises}. {male_0}’s father is {male_1}. Who is {male_0}’s grandfather?’

Here, {distractor premises} is a sequence of between one and three distractor premises, each of the form ‘{male_n}’s father is {male_m}.’

Adding any number of distractor premises will degrade IIA for the experiment where we patch the proactive representation at the final {male_1} position. Overall IIA of {male_2} (the correct answer) drops from over 80% to 13% when there is one distractor, 7% when there are two distractors, and 10% when there are three distractors.

One explanation for these results is that they activate different mechanisms that are not as active in our main analysis, and that we did not intend to study in that analysis. For example, when there are two or three distractors, the proactive patch-in experiment pushes the model to answer {female_0} over any other token. In fact, IIA of {male_2} relative to other male name tokens is a fair bit higher than that of its overall IIA, at 23% when there is one distractor, 30% when there are two, and 35% when there are three. This suggests that the setting with intermediate distractor premises may differ meaningfully from the setting that we study in our work.

It is also important to note that these results are not at all at odds with our analysis. In Section 4 we suggest that the proactive mechanism may be formed on the basis of its expected utility, and in line 803 of the Appendix we state that ‘it seems plausible that by separating the two premises, we also reduce the LM’s expectation that it will be asked a question that requires it to connect them.’ Our work seeks to characterize the proactive and retroactive mechanisms, but it does not claim that either mechanism is active 100% of the time.

3. Can the 3-hop retroactive patch be redesigned so it works?

The set of token positions chosen for the 3-hop retroactive patch is close to the largest possible set of token positions that could be patched before proactive representations start coming into play as well. Expanding the set of patched token positions to include the positions between the two that we highlight in blue in Figure 4B does not produce a stronger IIA effect.

Dear reviewer uVQA,

As we approach the end of the discussion period, we would like to gently follow up on our rebuttal.

In response to your feedback, we have included new results that reproduce our experiment across 6 new open weight models in the 20B to 400B parameter range. These results demonstrate that both the proactive and retroactive mechanisms can be found in a wide variety of different models. We have also revised the manuscript such that the scope, intentions, and limitations of our work are stated more precisely. Overall, we believe that these changes now provide strong evidence for the generality of the identified mechanisms.

We have sincerely appreciated your feedback, and we believe that addressing it has strengthened our paper. If you feel that our response resolves your concerns, we would be grateful for a brief acknowledgment and, should you judge it warranted, an updated score. If any questions remain, we would be very happy to clarify them before the deadline.

Reviewer_DVNnOpenReview ↗
Rating
3
Confidence
2
Informativeness
2
Presentation
3
Soundness
3(+1)
Read review
Paper summary

The paper argues that language models make compositional inferences both proactively, by deriving unstated relations while reading the premises, and retroactively, by chaining relations when answering a question. The authors conduct causal interventions and show that the models use both mechanisms and an inferred relation can be reused in a longer inference. The authors further argue that proactive computation reflects expected usefulness and helps overcome limits on reasoning at a single token position.

Critical strengths
  1. High significance. Understanding how language models reason over new information provided in context is an important research question. The authors provide convincing causal evidence that language models use two distinct mechanisms for compositional inference.

  2. Interesting finding about proactive inference. I find the proactive mechanism particularly surprising. It is relatively intuitive that a model can combine relations when it receives a question that requires them (retroactive inference). However, the authors show that the model can also derive an unstated relation while reading the context, before the question is given (proactive inference). The finding that this inferred relation can later be used for further reasoning makes the result more interesting. The authors also provide detailed causal evidence to eliminate confounds, such as the model retrieving the original relations when answering the question.

Critical weaknesses

1. Limited novelty relative to prior work.

I feel that there are similar (but not same) mechanisms that have been identified in prior work. [1] show sequential retrieval for multi-hop inference, while [2] identify both eager and lazy mechanisms. Although the construction and reuse of unstated relations is interesting, I am not convinced that the paper sufficiently distinguishes its contribution from these existing findings.

2. Limited generalization across models. The experiments focus primarily on Llama 3.1 405B Instruct. Although the authors provide convincing evidence for proactive and retroactive inference in this model, it remains unclear whether the same mechanisms are used by other language models. Given that the paper aims to explain how language models perform compositional inference in general, I think experiments across different model families and scales would strengthen the contribution.

[1] Guo et al. (2025). How Do LLMs Perform Two-Hop Reasoning in Context? arXiv:2502.13913. [2] Sen Sharma et al. (2026). LLMs Process Lists with General Filter Heads. ICLR 2026.

Questions for authors

See weaknesses

2 comments

We thank the reviewer for their thoughtful feedback. We are glad to hear that they find our work to be interesting and of high significance. Below we address their highlighted weaknesses.

1. Limited novelty relative to prior work

The reviewer expresses concern that our paper does not sufficiently distinguish its contribution from two existing papers: Guo et al. (2025) and Sen Sharma et al. (2026).

First, we agree that both of these papers are highly relevant to our work. Indeed, this is what motivated our discussion of both papers in our related work section, on line 461. We are glad to clarify how our submission differs from these two related works here and in the revised paper.

Difference from Guo et al. (2025): it is true that Guo et al. consider a very similar question and task setting. However, a key difference between their work and ours is that they study compositional inference using a small LM (Llama 2 7b base) and a toy three-layer transformer. In comparison, we study compositional inference using a range of large LMs at the 30B to 400B scale. This difference in model selection leads to fundamental differences in the hypothesis space, methodology, conclusions, and broader applicability of our work and theirs. In studying smaller and less capable models, Guo et al. arrive at the conclusion that ‘pretrained LLMs collapse to random guessing’ on compositional inference tasks, and that a three-layer Transformer is therefore necessary to reveal how model layers ‘contribute to the emergence of reasoning ability through structured attention patterns’. In studying much larger and more capable models, we begin with the premise that pretrained LLMs can perform these inference tasks at a level far above that of random guessing, and we apply a broad set of casual intervention experiments to uncover how they do so during inference rather than training. Thus, although our work begins with a similar high level motivation as Guo et al., it is completely distinct from Guo et al. with virtually no overlap beyond the task setting.

Difference from Sen Sharma et al. (2026): Sen Sharma et al. study a task that is completely different from ours – list processing (picking an item from a predefined list) rather than compositional inference. Sen Sharma et al. do make a similar point that their list processing mechanism can be eager or lazy, but importantly their analysis relies on two different prompt designs for the mechanism to be eager or lazy, while our work demonstrates how both the proactive and retroactive mechanisms can be active for a single prompt design. More broadly, our work engages in causal abstraction that differs from Sen Sharma et al.’s approach of circuit tracing. While Sen Sharma et al.’s work is a natural complement to ours, it does not displace the novelty of our work.

2. Limited generalization across models

The reviewer rightfully suggests that our work should present results from a broader range of LMs in order to demonstrate the generality of the proactive and retroactive mechanisms. In response to this suggestion, we have added new results for Gemma 4 31B Instruct, GPT-OSS 20B, Qwen 3.5 397B A17B, Qwen 3.5 35B A3B, Seed-OSS 36B Instruct, and Olmo 3.1 32B Instruct. We reproduce figure 2 on each of these models and find that we can replicate the core elements of the proactive and retroactive patch-in experiments. Consistent with our existing experiments with Llama 3.1 70B Instruct and 8B Instruct, some of these effects are more subtle than they are for Llama 3.1 405B Instruct, but clear evidence for the existence of the proactive and retroactive mechanisms can nevertheless be found across these other LMs. These results can be found in Appendix A.3.2 and are illustrated in Figure 7.

We also recognize that this issue can be addressed in part by softening some of our claims. For example, on line 83 we have changed ‘[we] demonstrate that LMs use two functionally independent mechanisms’ to ‘[we] provide evidence for two functionally independent mechanisms that LMs can use’. It is not our intention to claim that all LMs universally rely on these mechanisms, and we are grateful for the opportunity to clarify this point.

I am sorry for my late response.

Thank you for the extensive rebuttal. Frankly, I am surprised by the scale of the additional models evaluated. These experiments address my concern about generalization across models, and I have therefore increased my soundness score (2 => 3).

However, I still feel that the novelty relative to prior work is not sufficiently clear. Although the authors have clarified some differences, I do not find the additional contribution convincing enough to raise my rating from weak acceptance to strong acceptance. Therefore, I maintain my positive score (3).

Comments on the paper

1 comment
AuthorsOpenReview ↗

Summary of concerns and responses

We thank all reviewers for their constructive feedback. Here we summarize the concerns that reviewers had with our paper and how we have addressed them.

 

  • Limited evidence for generalization to other models: all three reviewers suggested that we should present results from a broader range of LMs in order to demonstrate that the proactive and retroactive mechanisms generalize to models other than Llama 3.1 405B Instruct
    • We have added new results for 6 additional models: Gemma 4 31B Instruct, GPT-OSS 20B, Qwen 3.5 397B A17B, Qwen 3.5 35B A3B, Seed-OSS 36B Instruct, and Olmo 3.1 32B Instruct.
    • We reproduce figure 2 on each of these models and produce clear evidence for the existence of the proactive and retroactive mechanisms across these other models.

 

  • Overly strong conclusions and more evidence needed for Section 4: reviewer uVQA expressed concern that our ‘why’ section takes an overly strong stance, and reviewer dFA4 suggested that more evaluations are needed to substantiate a broader conclusion about why models use a proactive mechanism
    • We have softened some of the language in the ‘why’ section so that it is more clear that this section is a consideration of a hypothesis rather than a presentation of a definitive answer.

 

  • Limited novelty relative to two existing papers: reviewer DVNn expressed concern that our work is not sufficiently different from two existing works.
    • We have further clarified how our work differs from these two papers in our related work section
    • We maintain the position that our work is related to but ultimately completely different from both papers.
      • One of the papers (Guo et al., 2025) studies a similar task but with a single 7B model and with specially trained toy transformers. The authors of that paper find that the 7B model approaches the task by randomly guessing, and they apply attention analysis to understand how the toy transformer solves the task over the course of training. Our work differs completely from this: we study large models that are more than capable of accomplishing this task and find using causal abstraction that they use two internal mechanisms to do so.
      • The other paper (Sen Sharma et al., 2026) studies list processing, a task completely different from ours. They find a completely different mechanism for this task using a methodology that is also different from ours. The overlap between our paper and theirs is very small.

 

  • Synthetic task: reviewer dFA4 expressed concern that our study relies on highly structured prompts and is not linguistically diverse enough
    • In Appendix A.3.3 we consider four other tasks that reproduce our main experiment, demonstrating that the proactive and retroactive mechanisms are active across task settings
    • Although we acknowledge that the necessity for structured prompts is a limitation of our work, we also believe that there is a strong precedent for the use of structured prompts to study causal abstractions in language models – in particular, we extend the entity binding line of work (e.g. Feng and Steinhardt (2024), Prakash et al. (2026), Gur-Arieh et al. (2026)) for which templatic tasks are standard.

 

  • Alternative explanations: reviewer dFA4 expressed concern that our work does not establish our hypothesized mechanisms as being uniquely true
    • In Appendix A.3.5 we consider evidence for why a strong alternate hypothesis is likely false
    • We have also softened our language to avoid implying that the proactive and retroactive mechanisms are universal or that they uniquely enable compositional reasoning

 

We once again thank all reviewers for their engagement. We believe that it has allowed us to strengthen the paper significantly. In particular, we have now added very clear evidence that our identified mechanisms exist across many different models, which was the central concern of our reviews. Our responses to the other concerns have also allowed us to make our paper more clear and precise.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.