In-Context Learning Operates as Concept Subspace Learning

Wei Tang, Xinyan Jiang, Fakhri Karray, Lijie Hu · 2026

Read In-Context Learning Operates as Concept Subspace Learning by Wei Tang, Xinyan Jiang, Fakhri Karray, Lijie Hu (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2605-18830.txt.

Introduction

Wei Tang and three colleagues view in-context learning as concept subspace learning. Regression and Bayesian accounts explain how examples induce predictors, while mechanistic work finds compact directions that steer behaviour, yet the link between them stays unclear. The authors show forecasts break down into a concept part plus leakage outside the subspace for ridge and least-squares proxies. Under block-diagonal covariance, leading errors scale with concept dimension, while cross-subspace coupling controls the rest.

Catalog record

CREATORWei Tang, Xinyan Jiang, Fakhri Karray, Lijie Hu
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE80124
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2605.18830

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

In-Context Learning Operates as Concept Subspace Learning Wei Tang, Xinyan Jiang, Fakhri Karray, Lijie Hu Abstract Regression and Bayesian accounts of in-context learning (ICL) explain how demonstrations can induce predictors, while mechanistic analyses often identify compact activation directions that steer prompted behavior. However, it remains unclear whether structured demonstrations induce low-dimensional concept inference. We study this question through a concept-subspace view of ICL, in which tasks vary only along intrinsic concept coordinates, although inputs are observed in a high-dimensional ambient space. For ridge and least-squares ICL proxies, prediction decomposes exactly into concept-coordinate regression and off-subspace leakage. Under block-diagonal or near-block-diagonal covariance assumptions, the leading estimation and nuisance-sensitivity terms scale with the dimension of the concept subspace, while residual effects are controlled by cross-subspace coupling. This separation gives a mechanistic prediction: recoverable task information should concentrate in a low-dimensional, task-aligned activation subspace. On CounterFact-derived multi-relation prompts with Llama-3-8B, a 68 68 – 73 73 -dimensional subspace of the 4096 4096 -dimensional residual stream restores 78.8 % 78.8\% of the clean–corrupted accuracy gap, whereas patching the complementary subspace restores 0 % 0\% . Concept swaps redirect predictions toward injected relations, while random and cross-task matched-rank controls are largely ineffective. Additional experiments on Qwen2.5-7B and a controlled cross-lingual rule task show the same qualitative pattern. These results support concept subspaces as compact, task-aligned mediators of recoverable ICL behavior in structured task families, without implying full-circuit recovery. 1 Introduction In-context learning (ICL) enables a pretrained language model to infer a new task from a few demonstrations without updating its weights [ 1 , 2 , 3 ] . Demonstrations do more than provide supervised examples: they can specify label spaces, input distributions, output formats, and semantic priors [ 4 , 5 ] . Theoretical work has shown that, in controlled settings, ICL can implement least-squares or ridge regression, Bayesian inference, gradient descent, and algorithm selection [ 6 , 7 ] . These accounts explain how a predictor can be fit from a prompt, but they often treat the inferred task as an unconstrained vector in a high-dimensional ambient space. This issue is most salient when prompts share latent structure. Many demonstrations may instantiate a shared relation, rule, transformation, or semantic attribute [ 8 ] . In such cases, treating the task as an unconstrained ambient parameter may obscure the relevant geometry. This raises a fundamental structural question: When tasks share a low-dimensional conceptual structure, does ICL operate by explicitly inferring that low-dimensional concept? This question is related to recent evidence that transformer representations can contain disentangled latent concepts or language-agnostic concept directions [ 9 , 10 ] . The answer has direct statistical and mechanistic consequences. If ICL exploits shared task geometry, estimation should scale with the concept dimension, while orthogonal perturbations act mainly as nuisances. Diffuse high-dimensional pattern matching gives no reason to expect such dimension-dependent behavior or nuisance stability. Existing regression theories, activation-space analyses, and causal-intervention tools each support parts of this view [ 11 ] , but do not identify a common latent object induced by structured ICL prompts. To make this question precise, we introduce concept-subspace ICL . In our model, task parameters satisfy w=U\beta , where U\in\mathbb{R}^{d\times r} has orthonormal columns and r\ll d . Inputs live in the ambient space, but the task depends on them only through concept coordinates z=U^{\top}x . Directions orthogonal to U are irrelevant in the population model, except through finite-sample effects and covariance leakage. For ridge and least-squares ICL proxies, ambient prediction decomposes into regression over the r -dimensional concept coordinates plus an off-subspace leakage term. Under block-diagonal or near-block-diagonal covariance assumptions, the leading estimation and nuisance-sensitivity terms depend on r , while residual error is controlled by cross-subspace coupling. The same formulation also admits a Bayesian interpretation as posterior inference over \beta and identifies the concept subspace up to rotation [ 12 , 13 ] . We turn the statistical hypothesis into a mechanistic test. If a transformer implements concept-subspace inference, then task-relevant information should be concentrated in a low-dimensional, task-aligned activation subspace. Patching this subspace from a clean prompt into a corrupted prompt should restore much of the ICL behavior, whereas patching the orthogonal complement or matched-rank control subspaces should have little effect. This gives a falsifiable intervention test: the relevant subspace must carry causal task information, not merely provide a low-rank direction along which the model can be steered. We empirically evaluate this test on CounterFact-derived multi-relation ICL tasks [ 14 ] using Llama-3-8B [ 15 ] . A 68 – 73 -dimensional subspace of the 4096 -dimensional residual stream recovers 78.8\% of the clean–corrupted accuracy gap, while patching the complementary subspace restores 0\% . Concept-swap interventions redirect predictions toward the injected relation, whereas random and cross-task matched-rank controls are largely ineffective. Additional experiments show consistent patterns on cross-lingual tasks [ 16 ] and on Qwen2.5-7B [ 17 ] . These results do not imply that the full ICL circuit is low-dimensional. Rather, they indicate that, for the structured task families, a compact concept subspace carries a substantial portion of the recoverable causal signal. Our contributions can be summarized as follows. First, we formulate ICL with shared task variation as estimation in an intrinsic concept subspace rather than unconstrained ambient regression. Second, we analyze ridge and least-squares proxies and show that, under explicit covariance and regularization assumptions, dominant error and nuisance-sensitivity terms scale with the concept dimension r , while leakage is controlled by cross-subspace coupling. Third, we turn the theory into a subspace-patching hypothesis and test it with concept-only patching, complementary-space controls, matched-rank controls, and concept swaps on controlled multi-relation tasks. 2 Related Work In-context learning. Empirical studies of ICL show that demonstrations provide more than a small supervised training set. A complementary theoretical line asks which algorithm a transformer executes in-context. linear regression studies show that transformers can implement or approximate least-squares-style predictors in controlled settings [ 18 , 19 ] . Bayesian and algorithm-selection views explain ICL as posterior inference or as selecting among latent algorithms from the prompt [ 6 , 7 ] . Gradient-descent and meta-optimizer interpretations analyze how transformer computations can emulate iterative optimization procedures [ 20 , 21 , 22 ] . Other analyses study how pretraining task diversity, meta-learning objectives, and learnability conditions shape the emergence of ICL [ 23 , 24 , 25 ] . Mechanistic work further identifies induction-head circuits and task-vector phenomena as compact carriers of prompt-induced behavior [ 26 , 27 ] . These works support a task-inference view of ICL. Our focus is different: we ask when the inferred task should be treated as a low-dimensional concept coordinate rather than as an arbitrary ambient parameter. Concept learning. Concept-based methods seek representations in which semantically meaningful variables can be inspected, constrained, or intervened on [ 28 , 29 , 30 ] . Post-hoc concept directions and whitening methods identify or align internal features with human-interpretable concepts [ 31 , 32 ] . Ante-hoc architectures make concept variables explicit through bottlenecks or concept embeddings [ 28 , 33 ] . However, unsupervised latent factors are generally unidentifiable without structural assumptions, weak supervision, or an appropriate invariance class [ 34 , 35 ] . Recent analyses also caution that concept

Read the complete text