How Do Language Models Compose Functions?
Import the versions from OpenReview: the same title at other venues
@openreview[bot] · 2026-11-22 20:08 UTC · 46914db5ed71 ·
versions/v_h9tkdjhr.json added
+++ b/versions/v_h9tkdjhr.json@@ -0,0 +1,18 @@+{+ "date": "2025-09-19",+ "kind": "submitted",+ "label": "ICLR 2026",+ "submissions": [+ {+ "venue": "ICLR 2026",+ "status": "rejected",+ "url": "https://openreview.net/forum?id=h7ZAgetMLc"+ }+ ],+ "title": "How Do Language Models Compose Functions?",+ "url": "https://openreview.net/forum?id=h7ZAgetMLc",+ "evidence": [+ "https://openreview.net/forum?id=h7ZAgetMLc"+ ],+ "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))$. We first confirm that modern LLMs continue to suffer from the \"compositionality gap\": i.e. their ability to compute both $z = f(x)$ and $y = g(z)$ does not entail their ability to compute the composition $y = g(f(x))$. Then, using logit lens on their residual stream activations, we identify two processing mechanisms, one which solves tasks *compositionally*, computing $f(x)$ along the way to computing $g(f(x))$, and one which solves them *directly*, without any detectable signature of the intermediate variable $f(x)$. Finally, we find that which mechanism is employed appears to be related to the embedding space geometry, with the idiomatic mechanism being dominant in cases where there exists a linear mapping from $x$ to $g(f(x))$ in the embedding spaces."+}
versions/v_ikcydrf8.json added
+++ b/versions/v_ikcydrf8.json@@ -0,0 +1,18 @@+{+ "date": "2026-05-08",+ "kind": "submitted",+ "label": "Mech Interp @ ICML 2026",+ "submissions": [+ {+ "venue": "Mech Interp @ ICML 2026",+ "status": "accepted",+ "url": "https://openreview.net/forum?id=iXnaLHVuAj"+ }+ ],+ "title": "How Do Language Models Compose Functions?",+ "url": "https://openreview.net/forum?id=iXnaLHVuAj",+ "evidence": [+ "https://openreview.net/forum?id=iXnaLHVuAj"+ ],+ "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))$. We first confirm that modern LLMs continue to suffer from the \"compositionality gap\", i.e. their ability to compute both $z = f(x)$ and $y = g(z)$ does not entail their ability to compute the composition $y = g(f(x))$. We then decode residual stream representations and identify two processing mechanisms: one which solves tasks *compositionally*, computing $f(x)$ along the way to $g(f(x))$, and one which solves them *directly*, without any detectable signature of the intermediate variable $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 $x$ to $g(f(x))$ in the embedding spaces."+}