potentialpaper

How Do Language Models Compose Functions?

Apoorv Khandelwal, Ellie Pavlick

Mech Interp @ ICML 2026

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

TL;DR. We find two different mechanisms in LLMs solving two-hop tasks and find that embedding space geometry is predictive of the mechanism invoked.

Abstract. While large language models (LLMs) appear to be increasingly capable of solving compositional tasks, it is an open question whether they do so using compositional mechanisms. In this work, we investigate how feedforward LLMs solve two-hop factual recall tasks, which can be expressed compositionally as g(f(x))g(f(x)). We first confirm that modern LLMs continue to suffer from the "compositionality gap", i.e. their ability to compute both z=f(x)z = f(x) and y=g(z)y = g(z) does not entail their ability to compute the composition y=g(f(x))y = g(f(x)). We then decode residual stream representations and identify two processing mechanisms: one which solves tasks compositionally, computing f(x)f(x) along the way to g(f(x))g(f(x)), and one which solves them directly, without any detectable signature of the intermediate variable f(x)f(x). Finally, we find that embedding space geometry is strongly related to which mechanism is employed, where the idiomatic mechanism is dominant when tasks are represented by translations from xx to g(f(x))g(f(x)) in the embedding spaces.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

FromAToBDateVersionSubmitted toPDFEvidence
19 Sep 2025ICLR 2026submittedICLR 2026Rejected—[1]
1 May 2026NeurIPS 2026submittedNeurIPS 2026Accept (poster)reviews ↓[1]PDF[1]
8 May 2026Mech Interp @ ICML 2026submittedMech Interp @ ICML 2026Accepted—[1]
Their titles, abstracts and, where both have a PDF, the text.Missing a version?

NeurIPS 2026

Accept (poster) · 3 reviews · OpenReview

Updated 25 Nov 2026, 03:47 UTC.

Program Chairs · DecisionOpenReview ↗
Decision
Accept (poster)
Read decision
Meta-review

(a) Scientific claims and findings

This paper studies whether language models answer two-hop factual queries by composing functions or by relying on a direct association. Its strongest finding is a robust compositionality gap across relations and models. It further uses probing, activation interventions, and embedding geometry to characterize when an intermediate representation is detectable. The response clarifies the intended scope of these analyses: they provide evidence about representational signatures associated with composition, not a complete identification of a unique causal mechanism.

(b) Main strengths

The question is fundamental and the empirical core is unusually informative. The dataset, cross-model analysis, and attention to internal representations go beyond accuracy-only evaluation. Reviewer EMSk found the residual-stream progression and interventions compelling, while Reviewer KLvy regarded the compositionality-gap result as particularly strong. The response improves the paper by distinguishing predictive evidence from stronger causal claims and by addressing the requested controls and methodological details.

(c) Main weaknesses

The decoded rank of an intermediate fact is not itself a definitive test of compositional computation: presence may reflect knowledge rather than use, and absence may reflect decoder limitations. Likewise, the geometry analysis is strongest as a predictor of the observed signature, not as proof of causal mechanism selection. Reviewer GFE1 also raises reasonable cautions about what patching transfers. These are important limitations, but they constrain the interpretation more than the empirical finding itself.

(d) Assessment of the author response

The response substantially resolves the decision-critical issues by clarifying the construct being measured, providing or discussing selectivity and intervention controls, and narrowing causal language where the evidence is correlational. It also makes the lens, steering construction, and relation between geometry and the decoded signature clearer. I find this sufficient for acceptance provided that these qualifications and controls are incorporated prominently in the revision.

(e) Reviewer discussion and response

The reviewers agree that the compositionality-gap observation is valuable. Reviewer EMSk remained positive, while Reviewers GFE1 and KLvy appropriately pressed on construct validity and causal interpretation. After the response, the record supports a bounded interpretation of the mechanistic analyses rather than rejection of the paper's main empirical contribution.

Final justification

I recommend acceptance as a poster. The paper offers a well-motivated and carefully studied empirical contribution to understanding composition in language models. The response addresses the main risks of overclaiming; remaining concerns should be handled through precise language and transparent presentation, rather than by discounting the core result.

Area Chair ZWby · Meta-reviewOpenReview ↗
Read meta-review
Meta-review

(a) Scientific claims and findings

This paper studies whether language models answer two-hop factual queries by composing functions or by relying on a direct association. Its strongest finding is a robust compositionality gap across relations and models. It further uses probing, activation interventions, and embedding geometry to characterize when an intermediate representation is detectable. The response clarifies the intended scope of these analyses: they provide evidence about representational signatures associated with composition, not a complete identification of a unique causal mechanism.

(b) Main strengths

The question is fundamental and the empirical core is unusually informative. The dataset, cross-model analysis, and attention to internal representations go beyond accuracy-only evaluation. Reviewer EMSk found the residual-stream progression and interventions compelling, while Reviewer KLvy regarded the compositionality-gap result as particularly strong. The response improves the paper by distinguishing predictive evidence from stronger causal claims and by addressing the requested controls and methodological details.

(c) Main weaknesses

The decoded rank of an intermediate fact is not itself a definitive test of compositional computation: presence may reflect knowledge rather than use, and absence may reflect decoder limitations. Likewise, the geometry analysis is strongest as a predictor of the observed signature, not as proof of causal mechanism selection. Reviewer GFE1 also raises reasonable cautions about what patching transfers. These are important limitations, but they constrain the interpretation more than the empirical finding itself.

(d) Assessment of the author response

The response substantially resolves the decision-critical issues by clarifying the construct being measured, providing or discussing selectivity and intervention controls, and narrowing causal language where the evidence is correlational. It also makes the lens, steering construction, and relation between geometry and the decoded signature clearer. I find this sufficient for acceptance provided that these qualifications and controls are incorporated prominently in the revision.

(e) Reviewer discussion and response

The reviewers agree that the compositionality-gap observation is valuable. Reviewer EMSk remained positive, while Reviewers GFE1 and KLvy appropriately pressed on construct validity and causal interpretation. After the response, the record supports a bounded interpretation of the mechanistic analyses rather than rejection of the paper's main empirical contribution.

Final justification

I recommend acceptance as a poster. The paper offers a well-motivated and carefully studied empirical contribution to understanding composition in language models. The response addresses the main risks of overclaiming; remaining concerns should be handled through precise language and transparent presentation, rather than by discounting the core result.

Reviewer GFE1OpenReview ↗
Rating
4/6
Confidence
4/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

The paper studies the mechanism by which LLMs solve multi-hop questions of the form g(f(x)), for which two strategies exist: 1. "Idiomatic" prediction, where the LLM directly memorizes g(f(x)); 2. Compositional, where the model computes f(x) and then applies g. The authors apply the logit lens to quantify a "signature" of the first step of the compositional solution, f(x). The authors compose a dataset including different types of compositional questions, such as the Spanish translation of an antonym, the birth year of the singer of a given song, etc. It is demonstrated that the ability to solve the individual questions f(x) and g(x) does not correlate with the ability to solve the composition (compositional gap). Then, the paper analyzes the mechanism of the solution with the logit lens. It is demonstrated that in some of the examples there is a signature of the compositional solution in the form of a high reciprocal rank of f(x). Finally, it is shown that there is a medium-strong negative correlation between the existence of a steering vector mapping the subject to the final answer and the proxy for the compositional solution.

Strengths and weaknesses

The paper studies a very interesting question that has implications for the practicalities of LLM usage, as compositional solutions are presumably more generalizing (although this is not directly tested in the paper). Beyond the practical uses, there is scientific interest in understanding LLMs' factual recall as a model of human factual recall, and in identifying whether a symbolic, compositional solution is necessary for an agent that shows high linguistic competence. The experimental design is mostly clear, and the new compositional dataset is clearly described and used. The findings, particularly the lack of correlation between performance and compositionality and the representational evidence, are interesting.

I think, however, that there are several issues that should be addressed. First, the writing seems hasty at times, with some of the experimental details not clearly stated (e.g., how exactly the steering vectors are calculated).

More importantly, I am not convinced by the construct validity of the evaluation, i.e., whether it actually measures what it aims to measure. The goal is to quantify compositional behavior, but in practice the main metric being used is the maximum reciprocal rank of the first answer f(x). It's not clear whether this is indeed a good metric of a compositional solution. First, f(x) can appear in the representation even if the model directly computes g(f(x)). I'm not quite sure that the causal intervention experiments in the appendix mitigate this concern, as the representation being patched might contain features necessary for the identification of x (which is required to compute the answer regardless of whether the model computes compositionally or not). Second, the experiments do not control for different confounds.

The experimental pipeline constructs ICL examples with a mapping x→g(f(x)) for particular g, f, and then presents the model with a test example. For the logit lens of f(x) to be regarded as a signature of a compositional solution, it is necessary to show that f(x) selectively appears when the model is queried with examples showing the f() relation, and not with others. The null hypothesis that is not tested is that f() always appears in the logit projection for particular xs, even if the model is asked to solve the zero-shot ("the birth year of the author of X is…"), or that f(x) appears even when the model is queried with f'≠f. It seems to me that f(x) appearing in the projection can be interpreted as evidence that the model knows f(x) at all, which is presumably a prerequisite for a compositional solution. More broadly, it is not so clear to me why the paper focuses on the ICL setting, as opposed to directly querying the model with the 2-hop question.

The causal experiments in appendix J are hard to interpret: in addition to the methodological issue I mentioned above, it seems the causal effect is stronger when the solution is NOT compositional, according to the proxy metric. Isn't this the opposite of what we expect to see?

Questions

Regarding the representational finding in Figure 4, the correlation is interesting, though I am curious about the interpretaiton of the authors to this finding. For the antonym-translation composition, do you really belief that this solution is not computed compositionally? it seems to me hard to believe that the model stores in its parameters tens of thousands of such compositions, which rarely appear in the training data.

Regarding figure 1, in an about third of the examples the orange bar > the yellow bar, i.e., the model supposedly solves the composition without solving the individual questions. These are examples that cannot be compositional, right? do you indeed see near-zero reciprocal rank for f(x)? It's also seem a bit suspicious that the model can, e.g., solve the antonym-german question without being able to solve the individual questions...

Limitations

yes

Final justification

the author response mitigates most of my concerns, but I still think the causal experiment I described is worth running, and the writing should improve. I increase my score to weak accept.

Formatting concerns

no

4 comments
Authors · CommentOpenReview ↗

Dear [GFE1], thank you for your review and thoughtful feedback!

We appreciate your suggestions and have conducted additional tests for causality and controls with respect to our representation of f(x)f(x).

Causality: Here, we conduct activation patching experiments and generally extract patches from the location corresponding to maximal logit lens signal for f(x)f(x), as described in App. J.

  1. We can patch from x′→f(x′)x' \to f(x') or x′→f′(x′)x' \to f'(x') into the computation for x→g(f(x))x \to g(f(x)).

    We conduct this experiment with the park-country-capital and landmark-country-capital tasks. E.g. for park-country-capital, ff is park-country and f′f' is landmark-country.

    Example: from "Mount Rushmore →\to United States" into "Yellow Mountains →\to Beijing", measuring the causal effect on predicting "Washington DC" instead.

    Compositional Direct
    Δ\DeltaRR (mean) + 0.13 -0.05

    These interventions result in a positive causal effect for g(f(x′))g(f(x')) when patching examples with compositional signatures at early layers (similar to backpatching [1]), but not for examples with direct signatures (at any layer).

  2. We can patch from x′→g(f(x′))x' \to g(f(x')) into x→g(f(x))x \to g(f(x)), i.e. a different input for the same compositional task. We only use patched activations which do not decode g(f(x′))g(f(x')) via logit lens.

    We conduct this experiment with all tasks. Example (movie-director-birthyear): from "Cape Fear →\to 1942" into "Finding Nemo →\to 1965", measuring the causal effect on predicting "1942" instead.

    Compositional Direct
    Δ\DeltaRR (mean) +0.14 -0.03

    These interventions result in a positive causal effect for g(f(x′))g(f(x')) in examples with compositional signatures, but not direct signatures. If we patch activations regardless of whether they decode g(f(x′))g(f(x')), we see causal effects of +0.02-0.40 Δ\DeltaRR, likely implying copying of g(f(x′))g(f(x')) from the patch.

  3. We can patch from x′→g(f′(x′))x' \to g(f'(x')) into x→g(f(x))x \to g(f(x)).

    We specifically use two direct-signature tasks (movie-director-birthyear and book-author-birthyear) where the people f(x)f(x) are both directors and authors. For example, we can patch from "Sleepless in Seattle →\to 1941" (movie) to "Weaveworld →\to 1952" (book), and measure the causal effect on predicting 19411941.

    Direct
    Δ\DeltaRR (mean) +0.00

    We observe no such causal effect on predicting g(f′(x′))g(f'(x')), supporting the hypothesis that the model does not operate on intermediate variable representations in these direct signature tasks.

Controls: The following tests control for confounders and measure the selective appearance of f(x)f(x) in certain contexts. Here, we typically measure differences in logit lens decoding signals of intermediate representations, also by reciprocal rank (RR).

  1. For compositional tasks, we measure how often f(x)f(x) appears in the residual stream for x→g(x)x \to g(x) (5 tasks) and x→xx \to x (9 tasks). We find that this measurement is substantially lower (median: -0.68 RR) in x→g(x)x \to g(x) than in x→g(f(x))x \to g(f(x)). We find that it is also lower (median: -0.54 RR) in x→xx \to x for tasks besides park-country-capital and product-company-hq, where it is more modest (-0.06 RR). In those cases, latent representations for countries/companies do appear to coincide with parks/products, although this doesn't necessarily imply lack of use. In direct tasks, we generally find low measurements (0.0-0.2 RR) for f(x)f(x) in x→xx \to x and x→g(x)x \to g(x).

  2. For 8 of our 9 compositional tasks, we find low logit lens signals (mean: 0.07 RR, 95th percentile: 0.10 RR) for f(x′)f(x') corresponding to 50 other values of x′x' in x→g(f(x))x \to g(f(x)). word-int-times-two is an exception (mean: 0.56 RR, 95p: 0.67 RR), but f(x)f(x) is still represented most strongly (0.92 RR). Direct tasks yield similarly low signals for f′(x)f'(x) (mean: 0.03 RR, 95p: 0.06 RR).

  3. Patching from x′→x′x' \to x' to x→g(f(x))x \to g(f(x)) does not result in change in predicting g(f(x′))g(f(x')) (+0.00 RR). For example: patching from "Mount Rushmore →\to Mount Rushmore" into "Yellow Mountains →\to Beijing", doesn't cause prediction of "Washington DC". This signifies that, for compositional tasks, models don't causally operate on representations for xx at the layers we patch.

Authors · CommentOpenReview ↗

Clarifications & discussion:

  • We explain how we construct steering vectors in L175-176. We basically train a vector to produce the unembedding for the first token of g(f(x))g(f(x)) when added to the mean embedding of xx.

  • Higher values of our reciprocal rank metric suggest more compositional processing. Thus, we indeed believe antonym-translation is computed compositionally and we actually find stronger causal effects of our experiments in Appendix J in tasks/examples with compositional signatures (compositional examples in Fig. 19 vs direct examples in Fig. 20).

  • In Fig. 1, the yellow bar reflects P(model solves all hops) and the orange bar reflects P(model solves composition | model solves all hops). So the orange bar is a strict subset of the yellow bar. E.g. in the antonym-german task, the model is able to solve all hops for ~10% of examples (240 examples). For ~80% of those (192 examples), the model is additionally able to solve the composition. The model can solve all hops in the examples you highlight, so these examples could plausibly be solved compositionally. That's actually one of our controls in Sec. 4 and 5: we only analyze examples where models can solve all requisite hops (L137, L180-181).

  • We use an ICL setting since we are interested in whether models solve compositional tasks with compositional solutions, and part of the task involves inferring a program from the prompt. Task instructions could explicitly bias the model towards a compositional program (Footnote 4). But we have now repeated our logit lens analysis with zero-shot prompts for the 2-hop tasks. For compositional tasks, we find the resulting decoding signals for f(x)f(x) are closely related with those for the 10-shot ICL setting (median delta: -0.04 RR). For book-author-birthyear and plus-100-times-2 (direct tasks), we find that these zero-shot instructions actually result in stronger (+0.33 RR) signals for f(x)f(x). As we expected, the model now demonstrates the 2-hop signature in all cases besides movie-director-birthyear (only +0.03 RR).

  • You raise an interesting question about whether LLMs memorize rare relations in weights. Perhaps these 2-hop relations occur sufficiently in the training data. We counted the co-occurrences of xx and g(f(x))g(f(x)) pairs in 20% of Olmo's training data and, for example, the median pair in antonym-spanish or movie-director-birthyear might occur 1,200+ times in the dataset (assuming linear extrapolation). According to [2], this passes the threshold necessary for models to form linear representations of relational data. Whether this (or other data distributional factors) is the cause and why we only find representations for certain tasks are certainly open questions worthy of future investigation.

Additional findings:

  • We now also use Jacobian lens [3] to decode signals for variables from representations. Both the patchscope (App. I) and Jacobian lens strongly correlate with the measurements from logit lens (r2r^2 is 0.68 and 0.95 respectively). Neither method indicates presence of f(x)f(x) where logit lens suggests absence.

  • We design a task "nonce-country-capital" where we provide a mapping (from 40 nonce words to countries) in the prompt, followed by ICL for (nonce, capital) pairs. In other words, ff is an in-context lookup task (not stored in-weights; motivated by [2]). To produce the correct answer, gg (country-capital) must be applied to the representation for f(x)f(x). We find a very strong logit lens signal (0.94) for f(x)f(x) in this task.

  • When constructing our steering vectors, if we actually use the mean unembedding across all answer tokens (rather than just the first token), the correlation grows further to r2=0.77r^2 = 0.77.

Citations:

  1. Biran 2024. "Hopping too late: Exploring the limitations of large language models on multi-hop queries."
  2. Merullo 2025. "On linear representations and pretraining data frequency in language models."
  3. Gurnee 2026. "Verbalizable Representations Form a Global Workspace in Language Models".
Reviewer GFE1 · CommentOpenReview ↗

Thank you for the detailed response and for running a substantial number of new experiments during the discussion period. It was not so clear for me to understand which of my claims you are responding to, but I tried my best.

Your response clarified several places where I was wrong:

  1. I had the direction of the RR metric backwards in my question about antonym-translation

  2. Fig. 1: I did not register that the orange bar is a conditional rate

  3. Appendix J: I read L572 as comparing compositional against direct instances, when it compares those two tasks against the antonym tasks.

On the more substantive points, the new experiments move things forward, particularly the causal claims. I remain concerned about the following:

The mismatched f′ control. Your selectivity test, where f(x) decoding far more weakly in the f(x) and g(x) computations than in g(f(x)), is closer to what I asked for and the 50-other-subjects specificity test is useful. But the cleanest version is still not run: running with same x, same prompt format, query with f′ ≠ f, and ask whether f(x) still surfaces.

Extraction-site. You say that patches are extracted "at the location corresponding to maximal logit lens signal for f(x)." For direct-signature instances no such location exists by construction. What is the fallback? the null results for direct instances may reflect not knowing where to patch rather than absence of use. Please explain what its the procedure.

The zero-shot result. I find this the most interesting new finding, and I think it complicates rather than supports the current framing: if explicit instructions raise the f(x) signal by +0.33 in two direct tasks, then the compositional/direct distinction is a property of task and prompt, not of the task alone. I'd rather see this stated openly in the paper than treated as a robustness check.

I'd also add my support to the other reviewers, and my original request in the review, that the causal experiments should be clarified and reported alongside variance in each experiment.

Authors · CommentOpenReview ↗

Thanks for your continued engagement! Sorry for the long discussions, but we really appreciate the suggestions.

Mismatched f′f'. Thanks for clarifying, we had misunderstood your specific ask (measuring f(x)f(x) in the computations x→g(f(x))x \to g(f(x)) and x→g(f′(x))x \to g(f'(x))). We can do our best, although this particular construction happens to be difficult with our existing tasks/data:

  • E.g. plus-10-times-2 and plus-100-times-2 come to mind, but the former appears to actually be computed as times-2-plus-20 (according to the logit lens signature). Plus-100-times-2 is direct but could plausibly compute the same ff (times-two), which is measured at 0.81 RR in plus-10-times-2 and 0.25 RR in plus-100-times-2.
  • We can use the nonce-country-capital task from "Additional Findings (2)" to define different f,f′f, f' (nonce-country mappings) within the prompt. In that setting, f(x)f(x) appears with 0.93 RR in x→g(f(x))x \to g(f(x)) but with ~0.00 RR in x→g(f′(x))x \to g(f'(x)). Notably, f(x)f(x) actually appears in the prompt in the g(f′(x))g(f'(x)) task. This is a positive demonstration that f(x)f(x) is computed selectively for the task ff, although there may be differences in this task vs in-weights tasks ff.

Extraction site. We only extract patches from compositional signature examples (at the layer/token where logit lens peaks). We either patch these into compositional or direct signature examples and observe the difference. We always patch at the median location where f(x) peaks in compositional signatures: layer 18 and the 71st percentile query token position (for Llama 3B).

One could argue that gg operates on different representational subspaces between compositional or direct signature examples. So we have repeated the experiment from "Causality (2)" in our first response, but instead extract patches from / apply patches to direct signature examples. For each example, we extract all (candidate) patches within layers 16-21 and query token percentiles 56-80 (the IQR where f(x) peaks). We conduct activation patching for each candidate (patching at the corresponding location) and collect the max causal effect (Δ\DeltaRR). This experiment yields only +0.04 for book-author-birthyear and +0.09 for movie-director-birthyear.

Zero-shot. We totally agree that the processing signature is a contextual result of the prompt in addition to tasks and examples, and will better highlight that in our paper. We actually see the zero-shot and ICL settings as two different sets of tasks (e.g. with different biases) and believe this fits well into the existing narrative. The zero-shot experiment was a great pointer and we will integrate those results into our main body.

Variance. Below we report ±\pm SD for most experiments in our discussion so far. We will be sure to report this as much as possible in our paper.

Experiment Compositional Direct
Causality (1) +0.126 ±\pm 0.034 +0.036 ±\pm 0.015
Causality (2) +0.139 ±\pm 0.045 +0.001 ±\pm 0.027
Causality (3) −0.010 ±\pm 0.000
Controls (1) −0.683 ±\pm 0.018 +0.162 ±\pm 0.148
Controls (2) +0.070 ±\pm 0.056 +0.028 ±\pm 0.032
Zero-shot −0.114 ±\pm 0.120 +0.323 ±\pm 0.068
Extraction-site +0.065 ±\pm 0.037
Reviewer KLvyOpenReview ↗
Rating
4/6
Confidence
3/5
Quality
3/4
Clarity
2/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

The paper studies the phenomenon of compositionality in LLMs by studying the mechanism by which LLMs compose two tasks. First the authors demonstrate the compositionality gap in the models they study (Figure 1, 2 and the r^2=0). Then they focus on cases where the model does successfully compose, where they use logit lens style analysis to understand what happens in cases where the model appears to compose - in these cases they look for f(x) in the residual stream - where in Figure 3 they they look for f(x) and x (and g(x), f(g(x))) in the residual streams. Finally the authors propose an alternative which is that certain relationships are learnt through translation in embedding->unembedding space rather than composition; i.e., the model learns g(f(x)). They measure whether a task can done by translation or not by training a linear regression model.

Strengths and weaknesses

Overall the paper has interesting findings and strong claims, each with varying amounts of evidence, so I'll address them one claim at a time

Compositionality Gap

This is perhaps the most well demonstrated claim - that modern LLMs have a compositionality gap and their tasks do measure it. I think the compositonality gap goes deeper than these tasks indicate, for example I do not think recursion is well captured by this set up - none of the tasks the authors used seem to be f(f(x)). Additionally, I would love to know how modern SoTA LLMs perform on these tasks (ChatGPT, Gemini, Claude etc). However this section is already fairly strong - with large task diversity and comparison across many models.

Looking for f(x)

The second claim is that models do not always solve compositional tasks using composition, and the evidence provided is based on a logit-lens analysis. The authors do acknowledge that there are shortcomings to this approach (in section 4.1). I would like to see other approaches - for example if we ask the model to perform f(x), is there a relationship between the embeddings vs when we ask it to do g(f(x))? I do think Appendix J partially begins to address my concerns here, I would love to see it moved to the main body of the paper and expanded on - it currently only demonstrates results for a few task combinations, I wonder if we could construct tasks to do this kind of activation patching analysis.

Solving directly v/s solving compositionally

This section has a good experiment and analysis but I worry that the findings are easily confounded but there is no study of confounders. The authors find a correlation between tasks' ability-to-be-solved-by-translation v/s the presence of intermediate variables in the residual stream of models. Based on the experiments the claim could definitely be that "Embedding geometry is a good predictor of the observed processing signature.", but the current claim seems to be that "Embedding geometry causes the model to choose direct processing.". To support the latter I would expect at least a few confounders to be studied and ruled out, some examples: If x->f(g(x)) is more prevalent in training data, the model might be memorizing it, and the task would also be more doable through translation. Some proxy variable to measure prevalence in training data would be good. Perhaps training loss on the Question Answer pairs could be a good proxy.

Other Issues

  1. Very often the evidence provided in the Appendix is necessary for the argumentation in the main body. Perhaps the appendix can be compressed into easier to read plots and moved to the main body?
Questions

First concern is the logical leaps being made - I might bump my score a little if the claims were made weaker; But I would be concerned about significance if the claims were made weaker.

If the claims had stronger evidence (both the causality for the composition v/s translation claim AND the detection of intermediate variables) I would increment my score. Potential ablations for both were mentioned in strengths and weaknesses section already - sorry for not being able to follow the review template in this case.

Limitations

yes

Final justification

Comments somewhat addressed

Formatting concerns

N/A

1 comment
Authors · CommentOpenReview ↗

Dear [KLvy], thank you for your review and thoughtful feedback!

Compositionality Gap: We repeat our experiment from Fig. 2 with frontier models (Opus 5, GPT-5.6 Sol, and Gemini 3.6 Flash). These models get all hops correct in ~75% of examples. Opus and GPT feature a small compositionality gap of ~5% and Gemini has a gap of ~15%. With a "medium" reasoning (and tool-use) budget, this gap closes to 1-2% across models. We'll note that these results are behavioral and on simple tasks: they don't necessarily imply greater engagement in latent compositional processing.

Use of f(x): We appreciate your suggestions and have conducted several additional tests to demonstrate causal use of these intermediate variable representations. We would be happy to integrate these into the main body of our paper. Here, we generally extract patches from the location corresponding to maximal logit lens signal for f(x)f(x), as described in App. J.

  1. We can patch from x′→f(x′)x' \to f(x') or x′→f′(x′)x' \to f'(x') into the computation for x→g(f(x))x \to g(f(x)).

    We conduct this experiment with the park-country-capital and landmark-country-capital tasks. E.g. for park-country-capital, ff is park-country and f′f' is landmark-country.

    Example: from "Mount Rushmore →\to United States" into "Yellow Mountains →\to Beijing", measuring the causal effect on predicting "Washington DC" instead.

    Compositional Direct
    Δ\DeltaRR (mean) + 0.13 -0.05

    These interventions result in a positive causal effect for g(f(x′))g(f(x')) when patching examples with compositional signatures at early layers (similar to backpatching [1]), but not for examples with direct signatures (at any layer).

  2. We can patch from x′→g(f(x′))x' \to g(f(x')) into x→g(f(x))x \to g(f(x)), i.e. a different input for the same compositional task. We only use patched activations which do not decode g(f(x′))g(f(x')) via logit lens.

    We conduct this experiment with all tasks. Example (movie-director-birthyear): from "Cape Fear →\to 1942" into "Finding Nemo →\to 1965", measuring the causal effect on predicting "1942" instead.

    Compositional Direct
    Δ\DeltaRR (mean) +0.14 -0.03

    These interventions result in a positive causal effect for g(f(x′))g(f(x')) in examples with compositional signatures, but not direct signatures. If we patch activations regardless of whether they decode g(f(x′))g(f(x')), we see causal effects of +0.02-0.40 Δ\DeltaRR, likely implying copying of g(f(x′))g(f(x')) from the patch.

  3. We can patch from x′→g(f′(x′))x' \to g(f'(x')) into x→g(f(x))x \to g(f(x)).

    We specifically use two direct-signature tasks (movie-director-birthyear and book-author-birthyear) where the people f(x)f(x) are both directors and authors. For example, we can patch from "Sleepless in Seattle →\to 1941" (movie) to "Weaveworld →\to 1952" (book), and measure the causal effect on predicting 19411941.

    Direct
    Δ\DeltaRR (mean) +0.00

    We observe no such causal effect on predicting g(f′(x′))g(f'(x')), supporting the hypothesis that the model does not operate on intermediate variable representations in these direct signature tasks.

Geometry and processing: We do just intend to claim that geometry is "predictive of" or "related to" processing (e.g. L11, L44-47) and can make sure to adjust our language appropriately to avoid implying a causal relationship. At the same time, we would indeed like to provide evidence to support a stronger relationship.

  • We test for some confounders as you've suggested. We measure co-occurrence statistics for (x,g(f(x)))(x, g(f(x))) pairs across our tasks in 20% of Olmo's training data. For Olmo 7B, we find no correlation between pair frequency and the logit lens score for f(x)f(x) at the task-level (r2=0.00r^2 = 0.00) or per-example (r2=0.00r^2 = 0.00). We also measure training loss on these pairs in a QA format and find a poor correlation at r2=0.10r^2 = 0.10. Note that we do also test other correlations with other geometric features (hops, linear task representations) in App. L and M and find these are weaker than the one presented.
  • We can additionally control for the anisotropy of unembeddings. In Llama 3B, if we center unembeddings by the global mean, r2r^2 increases very slightly to 0.67. And, if we actually use the mean unembedding across all answer tokens (rather than just the first token), the correlation grows further to r2=0.77r^2 = 0.77.

Citations:

  1. Biran 2024. "Hopping too late: Exploring the limitations of large language models on multi-hop queries."
Reviewer EMSkOpenReview ↗
Rating
5/6
Confidence
4/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

The authors study two-hop recall tasks through the lens of compositionality: do models pass through the intermediate state when answering a two-hop question? Or do they jump directly to the answer?

Strengths and weaknesses

Strengths:

  • Interesting and well-motivated question for understanding models' internal reasoning processes.
  • Clear and well-written paper with connection to broader questions about compositionality.
  • I'm geniunely surprised at the (still) relatively large compositionality gap of o4-mini and DeepSeek-R1
  • The shift in token rank from x -> f(x) -> g(f(x)) is compelling (along with the causal interventions in the appendices)

Weaknesses:

  • Parts of the paper read as overly defensive. For example: "Our findings reflect our specific tasks and experimental design." I understand that reviewers often don't understand the point of interpretability papers or ask for nonsensical experiments, but some of this took me out of the flow of the narrative.
  • It seems possible that the model does pass through an intermediate state and "compose" functions even when logit lens or patchscope doesn't pick it up? This just says that it may not represent the intermediate state in a way decodeable by these tools?

General Comments:

  • I don't understand this sentence in the Figure 3 caption: "The incorrect composition, f (g(x)), is shown by the red line when not distinct from g(f (x))." Should this be "when distinct from"?
  • I found the explanation in 5.1 to be confusing and it took me a few reads to understand what you actually did and I'm still not 100% sure: train a vector that you add to the averaged embeddings to predict the correct unembedding vector? While this seems to work, it's not clear to me that the correct thing to do is map directly to the unembedding vector (the unembeddings probably live in a different space than the residual stream)?
Questions

Did you use logit lens or the tuned lens? I've seen the tuned lens able to give meaningful decoding results much deeper in the model (although it seems like your logit lens results are surprisingly good?)

Limitations

It may be mentioned, but I think it's reasonable to emphasize that the absence of decodeable intermediate representations doesn't mean absence of intermediate representations.

Formatting concerns

N/A

3 comments
Authors · CommentOpenReview ↗

Dear [EMSk], thank you for your review! We appreciate the pointers and would be happy to adjust our writing following your suggestions.

  • You are correct that our Fig. 3 caption should read "when distinct from".
  • Our method in Sec. 5.1 is as you describe: we trained a vector that we add to the averaged embeddings for xx to produce the unembedding for g(f(x))g(f(x)). We will clarify this text in revision.
  • You're also right about the unembeddings: due to the RMSNorm (in Llama 3 and Olmo 2), we should instead measure the translation from xx to γ⊙ug(f(x))\gamma \odot u_{g(f(x))} (the direction of the unembedding in the residual stream). Even so, our correlations remain the same (e.g. r2=0.65r^2 = 0.65), because cosine similarity is invariant to uniform scaling (and γ\gamma is near uniform).

Use of intermediate variables: The model could use intermediate variable representations that our methods do not decode and we can further emphasize that. However, our activation patching experiments in App. J and the following new ones provide some causal evidence against this hypothesis. We generally extract patches from the location corresponding to maximal logit lens signal for f(x)f(x), as described in App. J.

  1. We can patch from x′→f(x′)x' \to f(x') or x′→f′(x′)x' \to f'(x') into the computation for x→g(f(x))x \to g(f(x)).

    We conduct this experiment with the park-country-capital and landmark-country-capital tasks. E.g. for park-country-capital, ff is park-country and f′f' is landmark-country.

    Example: from "Mount Rushmore →\to United States" into "Yellow Mountains →\to Beijing", measuring the causal effect on predicting "Washington DC" instead.

    Compositional Direct
    Δ\DeltaRR (mean) + 0.13 -0.05

    These interventions result in a positive causal effect for g(f(x′))g(f(x')) when patching examples with compositional signatures at early layers (similar to backpatching [1]), but not for examples with direct signatures (at any layer).

  2. We can patch from x′→g(f(x′))x' \to g(f(x')) into x→g(f(x))x \to g(f(x)), i.e. a different input for the same compositional task. We only use patched activations which do not decode g(f(x′))g(f(x')) via logit lens.

    We conduct this experiment with all tasks. Example (movie-director-birthyear): from "Cape Fear →\to 1942" into "Finding Nemo →\to 1965", measuring the causal effect on predicting "1942" instead.

    Compositional Direct
    Δ\DeltaRR (mean) +0.14 -0.03

    These interventions result in a positive causal effect for g(f(x′))g(f(x')) in examples with compositional signatures, but not direct signatures. If we patch activations regardless of whether they decode g(f(x′))g(f(x')), we see causal effects of +0.02-0.40 Δ\DeltaRR, likely implying copying of g(f(x′))g(f(x')) from the patch.

  3. We can patch from x′→g(f′(x′))x' \to g(f'(x')) into x→g(f(x))x \to g(f(x)).

    We specifically use two direct-signature tasks (movie-director-birthyear and book-author-birthyear) where the people f(x)f(x) are both directors and authors. For example, we can patch from "Sleepless in Seattle →\to 1941" (movie) to "Weaveworld →\to 1952" (book), and measure the causal effect on predicting 19411941.

    Direct
    Δ\DeltaRR (mean) +0.00

    We observe no such causal effect on predicting g(f′(x′))g(f'(x')), supporting the hypothesis that the model does not operate on intermediate variable representations in these direct signature tasks.

Decoding f(x): We use logit lens, which appears to be sufficient for these models and tasks, rather than tuned lens.

  • Logit lens reads the unembedding subspace of residual stream activations, whereas tuned lens is optimized for predicting the next token. We want to account for what is represented by both methods and opt to use the token identity patchscope (App. I) as a more robust (and training-free) method for decoding the next-token subspace.
  • We now also use Jacobian lens [2] to decode signals for variables from representations. Both the patchscope and Jacobian lens strongly correlate with the measurements from logit lens (r2r^2 is 0.68 and 0.95 respectively). Neither method indicates presence of f(x)f(x) where logit lens suggests absence.
  • We also design a task "nonce-country-capital" where we provide a mapping (from 40 nonce words to countries) in the prompt, followed by ICL for (nonce, capital) pairs. In other words, ff is an in-context lookup task (not stored in-weights; motivated by [3]). To produce the correct answer, gg (country-capital) must be applied to the representation for f(x)f(x). We find a very strong logit lens signal (0.94) for f(x)f(x) in this task.

Citations:

  1. Biran 2024. "Hopping too late: Exploring the limitations of large language models on multi-hop queries."
  2. Gurnee 2026. "Verbalizable Representations Form a Global Workspace in Language Models".
  3. Russin 2025. "Parallel trade-offs in human cognition and neural networks: The dynamic interplay between in-context and in-weight learning."
Reviewer EMSk · CommentOpenReview ↗

Thanks for the additional experiments. I think these are reasonably compelling, and I agree with the other reviewers that these seem worth promoting to the main body of the paper. I think I'm a bit fuzzy on some of the details of these experiments, though (I also recognize that the discussion period is nearly over). For the patching, are you patching the entire residual stream at the positions where logit lens tends to show the intermediate representation? To be clear, I basically buy the story you're telling here. But, to make my concern more explicit, it's something more like the composition happens in lower level MLPs ("Dissecting Recall of Factual Associations in Auto-Regressive Language Models"-style enrichment) where the model maps the movie to the director then the director to the birthdate in "lower layer MLP space" rather than in "output vocab space." I'd also like to reiterate my support of the paper.

Authors · CommentOpenReview ↗

Thanks for your continued engagement!

That's right, we patch the residual stream at the median location (layer 18, 71st percentile query token position) where logit lens for f(x)f(x) peaks.

To test your alternative hypothesis (on the composition being computed early), we can also extract the patch at various layers across the model (and will apply them at the same layer).

Setup: we will patch from x′→g′(f′(x′))x' \to g'(f'(x')) into x→g(f(x))x \to g(f(x)) and measure the causal effect on g(f′(x′))g(f'(x')). We can use the nonce-country-capital task as g′(f′(x′))g'(f'(x')), i.e. from "Decoding f(x), pt. 3" in our above response, where the nonce-country mapping is only defined in the task prompt. And we can use new tasks as g(f(x))g(f(x)): {park,landmark}-country-{currency,continent}.

For example, we could patch from "blenter (nonce) →\to Paris" into "Mount Rushmore →\to Dollar" and measure the effect on instead predicting "Euro".

On average, the causal effects (Δ\DeltaRR) are +0.00 in layers 2-12, +0.11 in layers 14-18, and +0.03 in layers 20-26. In other words, there is no causal effect of representations for f′(x′)f'(x') in early layers.

The average logit lens signals (RR) for f′(x′)f'(x') in these patches are 0.00 (layers 2-12), 0.42 (layers 14-18), and 0.47 (layers 20-26). So, the causal effects also appear to emerge in the same layers as the logit lens signals for f′(x′)f'(x').

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

Missing a submission?

Loading the discussion…