Research map / Large language models / Language, safety and interpretability
A Implies B: Circuit Analysis in LLMs for Propositional Logical Reasoning
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Uses causal mediation analysis on a minimal propositional logic task to find a sparse, modular four-family attention-head circuit in Mistral-7B, Gemma-2-9B and Gemma-2-27B.
Problem
How pre-trained LLMs internally execute multi-step propositional logical reasoning: which components localize, move, process and decide over facts and rules.
Approach
Designs a controlled five-variable propositional logic template so that counterfactual prompts can be generated systematically, then applies QUERY-based causal mediation and patching to reveal a sparse circuit with four specialized attention-head families (queried-rule locating, queried-rule mover, fact-processing, decision) in in-the-wild LLMs.
Key results
- Gemma-2-9B circuit of 13 attention heads recovers 94% of the normal logit difference when run alone, while removing any one head family drops the direct effect to near zero or negative.
- Mistral-7B, Gemma-2-9B and Gemma-2-27B all show four analogous head families; Gemma-2-27B additionally has logical-operator heads and a more parallel circuit.
- Proof accuracy on the disjunction task is about 70% for Mistral-7B and 83% for Gemma-2-9B, and 86% for Gemma-2-27B on the full problem.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Add queried-rule locating heads to the circuit (ablation) | Gemma-2-9B reasoning circuit · Normal samples | Δ^C_normal/Δ_normal: -0.97 -> 0.94 | Helped |
| Add queried-rule mover heads to the circuit (ablation) | Gemma-2-9B reasoning circuit · Normal samples | Δ^C_normal/Δ_normal: -0.40 -> 0.94 | Helped |
| Add fact-processing heads to the circuit (ablation) | Gemma-2-9B reasoning circuit · Normal samples | Δ^C_normal/Δ_normal: 0.17 -> 0.94 | Helped |
| Add decision heads to the circuit (ablation) | Gemma-2-9B reasoning circuit · Normal samples | Δ^C_normal/Δ_normal: -1.11 -> 0.94 | Helped |
Surprising findings
- LLMs exhibit lazy reasoning: the core circuit activates mainly after seeing the QUERY token rather than pre-processing rules and facts.
- Small 3-layer models trained on the task use intermingled, less modular mechanisms than the pretrained LLMs.
Limitations
- Circuit analysis is mostly at the attention-pattern level, without embedding-level analysis.
- Only short logical chains (length 2) studied; longer chains not verified.
- Gemma-2-27B analysis is partial due to computational constraints.
Experimental setup
Datasets: synthetic propositional logic problems generated from template
Benchmarks: synthetic propositional logic task (proof and query accuracy)
Metrics: calibrated logit difference proof accuracy circuit sufficiency ratio (direct effect / normal logit diff
Baselines: 3-layer transformer trained on the task
Builds on: causal mediation analysis activation patching indirect object identification circuit analysis
Closest papers by meaning
- Who Reasons in the Large Language Models? (NeurIPS 2025 · similarity 0.89)
- Lost in Transmission: When and Why LLMs Fail to Reason Globally (NeurIPS 2025 · similarity 0.89)
- Boule or Baguette? A Study on Task Topology, Length Generalization, and the Benefit of Reasoning Trace (NeurIPS 2026 · similarity 0.88)
- CircuitSeer: Mining High-Quality Data by Probing Mathematical Reasoning Circuits in LLMs (NeurIPS 2026 · similarity 0.88)
- ZebraLogic: On the Scaling Limits of LLMs for Logical Reasoning (ICML 2025 · similarity 0.88)
- Reforming the Mechanism: Editing Reasoning Patterns in LLMs with Circuit Reshaping (ICLR 2026 · similarity 0.88)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
