Source-linked AI summary
Logical subspace in LLMs
Hope Kean, Enric Boix-Adsera
TL;DR
Behavioral ability does not reveal whether logical inference in language models depends on compact, functionally distinct machinery. The paper introduces MVS to find low-rank subspaces preserving task performance, and reports that logic subspaces can be selectively sufficient and necessary while dissociating from other tested capacities.
Problem
Behavioral competence does not reveal whether model capacities rely on shared resources, specialized mechanisms, or dynamically selected representations, leaving the internal organization of reasoning unresolved.
Source: §1 · pp. 1–2Method
MVS searches for a lowest-rank activation subspace that preserves task performance when activity outside it is removed, then tests the identified subspace by ablation.
Source: §1 · p. 2Results
The identified low-rank subspaces preserve logical inference when retained and, at intermediate layers, ablating them disrupts logic while preserving performance on other tasks such as general language modeling.
Source: §5 · p. 6, §6 · p. 10Takeaways & Limitations
The results provide evidence for functionally specialized machinery that is both necessary and sufficient for logical inference in the tested LLMs.
Source: §5 · p. 6The study uses non-thinking modes; extending MVS to extended chains of thought would require a larger compute budget.
Source: §6 · p. 12
Abstract
from arXiv · showhide
Recent work has identified a human brain network specialized for abstract formal reasoning (Kean et al., 2025). Does the same hold true in language models? To answer this question, we introduce the minimal viable subspace (MVS) method, which searches for the lowest-rank activation subspace at a layer that preserves task performance when everything outside that subspace is ablated. Using MVS, we demonstrate low-rank subspaces supporting logical inference on Gemma and Qwen models. Furthermore, these subspaces exhibit a clear dissociation from model capacities on other tasks, such that retaining these late logic subspaces preserves inference while impairing factual knowledge, working memory, cognitive control, and arithmetic. Conversely, ablating them reduces logical inference accuracy to chance while largely sparing these other capacities. Our results suggest a functionally localizable core machinery for logic akin to that in the human brain.
1 Introduction
Behavioral competence alone does not reveal whether model capacities rely on shared resources, specialized mechanisms, or dynamically selected representations. The paper introduces MVS to locate compact task-supporting subspaces and reports low-rank logic subspaces with dissociable effects on other tasks.
1 Introduction
- The study asks whether capacities such as logical inference can be causally isolated within a shared architecture, beyond what behavioral competence alone reveals.The possibilities considered include shared resources, specialized mechanisms, and dynamically selected task-relevant structure.Source: §1 · p. 1
- Prior decoding or task-attributed neurons do not establish that a compact representation is both sufficient and selectively necessary for a capacity.Information can be decoded without being causally used by the system.Source: §1 · p. 2
- MVS searches for the lowest-rank activation subspace that preserves target-task performance when activity outside it is removed.The authors also ablate the identified subspace to test whether it is selectively necessary for inference.Source: §1 · p. 2
- At middle layers, logic subspaces reach two dimensions; retaining them preserves near-ceiling logic while impairing control tasks, whereas ablating them brings logic near chance while largely sparing those tasks.The effects generalize across ordinary and nonword arguments.Source: §1 · p. 3
2 Related Work
Prior work has examined behavioral reasoning, task-associated mechanisms, and broader functional organization in language models. This paper distinguishes its focus on whether a capacity is supported by a minimal low-dimensional subspace that is sufficient for that task but insufficient for others.
Abstract reasoning in language models
- Earlier work established behavioral competence in logical reasoning and identified attention heads for stages of symbolic abstraction, induction, and retrieval; this study instead examines low-dimensional representations preserving logical function.Prior behavioral studies also report effects of content and linguistic formulation.Source: §2 · p. 3
Functional organization in LLMs
- Where prior work localizes domain-attributed neurons or a domain-general workspace, this analysis tests whether one capacity can be isolated in a minimal subspace sufficient for it but insufficient for others.The cited workspace work reports that text parsing and routine inference can proceed without the workspace.Source: §2 · p. 3
Causal subspaces and dictionary learning
- Unlike DAS, MVS searches without gold labels or prespecified causal variables, then tests sufficiency and cross-task selectivity by retaining and ablating a fixed low-rank subspace.Related approaches target output-preserving sparse dictionaries or task-sufficient attention heads rather than residual-stream directions.Source: §2 · p. 3
3 Minimal viable subspaces: a method for localizing task machinery in LLMs
MVS evaluates whether task performance can be preserved within a learned activation subspace of a chosen rank. It projects residual-stream activations around a neutral-corpus reference mean, learns the subspace to preserve model behavior, and compares held-out performance across ranks and layers.
3 Minimal viable subspaces: a method for localizing task machinery in LLMs
- At layer ℓ, MVS represents the residual-stream activation hℓ around a neutral-corpus mean µℓ using a learned rank-k subspace U.The neutral corpus is disjoint from evaluated tasks.Source: §3 · p. 4
- Projection retains variation within the subspace and removes orthogonal variation at every token position, while remaining layers run normally.Source: §3 · p. 4
- MVS learns U by minimizing KL divergence between unmodified and retained models’ output distributions to preserve current behavior.The compared distributions are the models’ next-token distributions at the final prompt position.Source: §3 · p. 4
- The method repeats the search across ranks and measures held-out task performance, revealing how the rank–performance relationship changes across layers.Source: §3 · p. 4
4 Experimental setup
The experiments optimize MVS subspaces at multiple layers of two models, evaluate conditional-inference generalization across content and argument forms, and assess interventions on a range of control tasks. They also test whether effects reflect response-label mappings and measure changes to next-token predictions.
4 Experimental setup
- The study uses Qwen3-8B and Gemma-4-12B in non-thinking mode, optimizing separate subspaces at 15 depths per model.The models have 36 and 48 layers, respectively.Source: §4 · p. 4
4.1 Logical inference task
- The logic task tests whether conclusions follow from premises across four argument forms and affirmative or negated consequents, with held-out splits for unseen content, families, and nonword vocabulary.The final dataset contains 10,720 items; modus ponens and modus tollens are valid, while denying the antecedent and affirming the consequent are invalid.Source: §4.1 · pp. 4–5
4.2 Control tasks and scoring
- Control evaluations span memory, language, reasoning, world knowledge, cognitive control, and arithmetic, with response-label controls and a next-token KL measure of language-modeling preservation.Binary MMLU uses 1/2 or A/B labels, and Qwen is also tested with standard four-option MMLU; lower per-token KL indicates better preservation.Source: §4.2 · p. 6
5 Results
Across Gemma and Qwen, MVS identifies compact activation subspaces that preserve logical inference, and interventions reveal a dissociation from other tested capacities. The subspaces become lower-rank with depth; at selected middle layers, ablation disrupts logic while largely sparing controls, and retention reverses that pattern.
5.1 Low-rank activation subspaces that are sufficient for logical inference
- The smallest sufficient rank generally decreases with depth, so later layers preserve logic with a small fraction of activation space even as other-task performance deteriorates.The retained subspaces preserve logical inference without preserving the models’ broader capabilities.Source: §5.1 · p. 7, Figure 2 · p. 7
- Linear probes decode syllogism features with depth, reaching near-perfect accuracy by layer 21 in Qwen3-8B and layer 24 in Gemma4-12B.Decoded features include the proposition in the second premise, whether it is affirmed or denied, and argument validity.Source: §5.1 · p. 7, Figure 3 · p. 8
- Ablation and retention effects generalize from English-word syllogisms to nonword arguments and held-out formulations, consistent with sensitivity to abstract inferential structure.The MVS was trained on English-word syllogisms.Source: §5.1 · pp. 7–8
5.2 Retaining and ablating logic subspaces selectively dissociates logical inference from other tasks, such as language modeling
- Other capacities become supportable by compact subspaces at different depths: for Qwen3-8B under rank-2 logic-subspace retention, language-versus-nonwords classification returns at layer 26 and working memory at layer 30.Until the final layers, retaining only the logic subspace significantly impairs other tasks.Source: §5.2 · p. 8
- At Qwen layer 22 and Gemma layer 21, retaining the logic subspace preserved near-baseline syllogism accuracy while substantially increasing continuation KL; ablating it reduced logic to chance with KL near zero.Language modeling was evaluated using mean per-token KL divergence between intact and intervened next-token distributions.Source: §5.2 · p. 8, Figure 5 · p. 10
5.3 Visualizing the logic subspace
- At intermediate layers, the rank-2 logic subspace contains cluster structure matching the syllogism’s abstract argument form.The visualization concerns the subspace identified in Figures 4 and 5.Source: §5.3 · pp. 8, 10
5 Results
- Ablating the selected subspaces drove all three syllogism sets to chance (0.99 →0.51, 0.97 →0.50, 0.97 →0.51) while controls were unchanged; retention preserved syllogisms and impaired controls.With retention, syllogism accuracies were 0.99, 0.96, and 0.96, while control tasks fell to or below chance.Source: §5 · p. 6, §5.2 · p. 8, Figure 4 · p. 9
6 Discussion
The discussion argues that low-rank logic subspaces can preserve inference while other capabilities are impaired, and that the recovered subspaces generalize beyond particular lexical contents. It connects this retention result to pruning and outlines comparisons and extensions for future work.
6 Discussion
- Logic performance can be retained in very low-rank subspaces, while ablating those subspaces on certain layers preserves reference control-task capabilities.The authors connect this substantial subspace-level pruning to the lottery ticket hypothesis and pruning, which also ask how much of a network can be removed while preserving successful behavior.Source: §6 · p. 10
- The recovered subspaces extend beyond particular lexical contents, generalizing across syllogism templates filled with words or nonwords.Source: §6 · p. 10
- Applying MVS to tasks beyond logic could reveal which capabilities rely on shared directions and which have distinct sufficient subspaces.Source: §6 · p. 10
- MVS preserves task behavior rather than explained variance and can move away from its leading-principal-subspace initialization; whether selected principal components alone suffice remains an open comparison.Source: §6 · p. 11
- Comparing logic MVS directions with J-space directions active during inference could test whether the studied logic uses that shared workspace or a separate route.Source: §6 · p. 11
- Because MVS is unsupervised, future work could compare it with DAS subspaces aligned to logical variables and annotate or discover interpretable latent variables within it.Source: §6 · p. 11
- Matched tasks could help separate general from task-specific machinery, while subtracting shared task machinery from logic MVSs could yield subspaces whose ablation selectively disrupts logic.Source: §6 · p. 11
- The study uses non-thinking modes to isolate single conditional inferences; extending MVS to extended chains of thought would require a larger compute budget.Source: §6 · p. 12
AI use statement
The authors describe how generative AI tools were used in the research and manuscript process, while stating that the authors retain responsibility for the final work.
AI use statement
- Generative AI tools assisted with experiment code, synthetic syllogism data, literature discovery, and portions of manuscript drafting and polishing.Source: AI use statement · p. 12
- The authors state that they heavily edited AI outputs.Source: AI use statement · p. 12
- The authors state that AI was not used to formulate hypotheses, develop methodology, design or give feedback on experiments, or interpret results.Source: AI use statement · p. 12
- The authors take full responsibility for the final content, including its text, claims, code, and data.Source: AI use statement · p. 12
A Further results
Further analyses provide detailed performance results across retention ranks and layers for Qwen and Gemma, and examine the late Qwen logic subspace's relationship to response-label format. Additional visualizations show activation projections across token positions and optimization seeds.
A Further results
- Figure 7 reports Qwen3-8B performance recovered by retaining logic subspaces at different ranks and layers.Source: Figure 7 · p. 16, A Further results · p. 16
- Figure 8 reports Gemma4-12B performance recovered by retaining logic subspaces at different ranks and layers.Source: Figure 8 · p. 16
- At Qwen's last evaluated layer, ablating the rank-2 logic subspace reduces MMLU accuracy with 1/2 labels to 0% but does not hurt MMLU with A/B labels.The authors interpret this as evidence that the subspace controls an output channel shared with MMLU 1/2 but not MMLU A/B.Source: Figure 9 · p. 17, A Further results · p. 17
- For Gemma's last evaluated layer, ablation also contrasts MMLU 1/2 with A/B, but less dramatically than for Qwen; a shared abstract output channel is offered as a hypothesis.Source: Figure 9 · p. 17
- Figure 10 extends the projection visualizations across four token positions and three optimization seeds per model, with cluster structure corresponding to different underlying syllogisms.Source: A Further results · p. 17, Figure 10 · p. 18
B Tasks
The task materials organize logical inference examples into template families defined by their rule formulation. The table lists 14 families and marks three held out from optimization.
B Tasks
- Premise order is a family-level property: fact_first gives the fact before the rule, while the other families state the rule first.Source: §B.1 · p. 19
- Within each family, surface factors vary in the conclusion marker and in which term the rule mentions first.Source: §B.1 · p. 19
- The task uses 14 template families grouped by logical rule formulation, with three families held out from optimization.Source: Table 2 · p. 19
- The two event families use tensed verbs rather than adjectival predication.Source: Table 2 · p. 19
B.2 Control tasks
The control battery probes working memory, cognitive control, factual knowledge, abstract reasoning, arithmetic, language modeling, and linguistic form. A separate label-space comparison tests whether effects reflect task computation rather than the shared response channel.
B.2 Control tasks
- Word recall tests maintenance and matching with 8-word easy or 48-word hard lists, while Stroop requires reporting ink color despite word–color conflict.MSIT asks the model to report the odd digit among three; both models score 1.000 on this task.Source: §B.2 · pp. 19, 21
- The sentence-versus-pseudoword language localizer targets linguistic form rather than memory or inference, and both models score 1.000.Qwen’s Raven score is not interpretable: its intact accuracy is 0.540 against a 0.500 chance level, unlike Gemma’s 0.692.Source: §B.2 · pp. 20, 22
- PrOntoQA uses nonce-category universal statements and individual queries, with positive chains of one to three hops and negatives testing converse errors or unrelated branches.All queried categories appear in the premises, and premise order is shuffled to prevent position from leaking the answer.Source: §B.2 · p. 20
- An earlier PrOntoQA build let a word-presence heuristic score 800/800; Qwen scored 0.736 on the reported build, so cross-model comparisons require normalization to intact baselines.The usable above-chance range is 0.236 for Qwen and 0.489 for Gemma.Source: §B.2 · p. 20
- MMLU combines items from 59 sources, including three logic sources quarantined from optimization and reserved for evaluation; accuracy is the unweighted mean across sources.Items are reduced to binary choices between the gold answer and one distractor, with side randomized.Source: §B.2 · p. 20
- One-digit multiplication is at ceiling for both models, while language-modeling effects are measured by per-token continuation KL divergence rather than accuracy.The two-digit Qwen multiplication score is excluded because it is 0.500; continuation KL measures divergence from the clean model, with larger values worse.Source: §B.2 · pp. 19, 22
B.3 Output-channel control
- Before intervention, A/B and 1/2 MMLU accuracy differed by at most 0.006 for each model, with the difference reversing sign; four-way MMLU and multiplication controls also point away from a shared-channel explanation.Qwen scored 0.799 in A/B versus 0.805 in 1/2, and Gemma 0.857 versus 0.851; Qwen scored 0.741 on instructed four-way MMLU.Source: §B.3 · pp. 22–23
C Implementation details for MVS
MVS recovery normalizes held-out accuracy between chance and the unmodified model, then identifies the smallest fitted rank meeting a chosen recovery threshold.
C Implementation details for MVS
- Recovery is defined from held-out task accuracy under a retained subspace, the unmodified model’s accuracy, and chance performance, assuming intact accuracy exceeds chance.Recovery of 1 corresponds to unmodified accuracy, and 0 to chance.Source: C Implementation details for MVS · p. 23
- For a chosen recovery threshold, MVS reports the smallest rank among fitted subspaces that meets or exceeds that threshold.The candidate set contains fitted subspaces across tested ranks and optimization runs.Source: C Implementation details for MVS · p. 23
- Because optimization may miss smaller solutions, the rank found is only an upper bound on the true minimum; if no fitted subspace meets the threshold, none is reported within tested ranks.Initialization draws directions inside the layer’s top-2048 principal subspace, and the neutral-corpus mean encodes no evaluated task.Source: C Implementation details for MVS · p. 23
D An optimizer pathology from large-magnitude coordinates
Qwen3-8B’s highly concentrated residual-stream variance creates an optimizer pathology at some layers, while coordinate pinning improves the fitted solution; Gemma-4-12B lacks a comparable coordinate.
D An optimizer pathology from large-magnitude coordinates
- In Qwen3-8B, unit 2276 switches on at layer 6 and carries 99.98% of µ-centred variance thereafter; without additional constraints, gradient descent stalls near ln 2 at layers 6–14 across tested ranks.Successful late-layer subspaces have only chance-level overlap with these coordinates while still reproducing the clean distribution.Source: D An optimizer pathology from… · p. 23
- Pinned directions count toward total rank, so pinning two coordinates in a rank-k condition leaves k − 2 directions to learn rather than increasing rank to k + 2.The same accounting applies when one or no coordinates are pinned.Source: D An optimizer pathology from… · p. 24
- At layer 6, pinning two coordinates reduces attained KL from approximately 0.67 to 3.4×10^-3; pinning one gives 0.26, while four or eight adds no further gain.Gemma-4-12B has no comparable coordinate, with λ1/λ2 ≤3.6 at every layer, and requires no such remedy.Source: D An optimizer pathology from… · p. 24