NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Geometric and algebraic inference in humans and neural networks

Jacob Russin, Joonhwa Kim, Ellie Pavlick, Michael J. FrankarXiv 2026

TL;DR

Researchers have identified two distinct strategies for logical inference shared by humans and neural networks: a geometric strategy that uses pre-compiled "mental maps" and an algebraic strategy that reasons step-by-step. These strategies have opposite performance signatures—one gets easier with distance while the other gets harder—and are driven by independent neural mechanisms that can be selectively disrupted.

What Problem Does This Paper Address?

How do we know that a windmill is larger than a toaster? Usually, we don't have to "think" about it; we just know. But if you're told "Leo is taller than Max, and Max is taller than Owen," you might have to mentally chain those facts together to conclude Leo is taller than Owen.

This is transitive inference (TI): deriving a new relation ($A \succ C$) from known ones ($A \succ B, B \succ C$). For decades, cognitive scientists have debated whether TI relies on "primitive" incremental learning (building an ordered representation) or "explicit" logical deduction. This paper argues that it’s not an "either/or" situation. Instead, both humans and neural networks (including LLMs) flexibly deploy two different strategies depending on whether the information is familiar or novel.

Methods

The authors formalize two algorithms:

  1. Geometric (Pre-compile): The system learns item ranks over time and stores them in its "weights" or long-term memory. Inference is a simple, one-step comparison of positions on a mental line.
  2. Algebraic (Traverse): The system doesn't memorize ranks but instead "walks" through the premises provided in the current context step-by-step.
Figure 1: Two strategies for transitive inference. The geometric strategy pre-compiles item ranks into ordered representations. The algebraic strategy reasons step by step over relations given in context.

To test these, they designed two types of tests:

  • In-Weight Learning (IWL): Testing familiar items without providing the context (relying on memory).
  • In-Context Learning (ICL): Testing novel items where the relationships are provided in the prompt (relying on reasoning).

They evaluated these across three groups: human participants, Transformers trained from scratch, and 22 different Large Language Models (LLMs).

Datasets

  • Human Experiments: Participants learned "alien preferences" using clip-art images (Exp 1) or compared animal weights based on scrambled statements (Exp 2).
  • LLM Evaluations: The authors used real-world dimensions for familiar knowledge (e.g., country populations, animal masses) and novel arbitrary relations (e.g., heights of common names or invented city names) for in-context reasoning.

Key Insights and Ideas

  • The SDE Signature: The "Geometric" strategy produces a classic Symbolic Distance Effect (SDE): it is actually easier and faster to tell that $A > D$ than $A > B$ because the points are further apart and more discriminable in representational space.
  • The Reverse SDE: Conversely, the "Algebraic" strategy produces a Reverse SDE: it is harder and slower to tell that $A > D$ because the system has to perform more logical "hops" to connect them.
  • Dissociable Mechanisms: Using "mechanistic interpretability" on neural networks, the authors found they could selectively "break" one strategy without touching the other.
  • Erasing the "rank direction" in the model's internal activations destroyed its ability to use familiar knowledge but left its step-by-step reasoning intact.
  • Ablating specific "context-reading" attention heads destroyed its reasoning ability but left its familiar knowledge untouched.
  • Data Distribution Trade-offs: The geometric strategy is "expensive" to learn but "cheap" to use. The algebraic strategy is "free" to learn (it's a general skill) but "expensive" to use (requires more computation at runtime). The authors show that systems favor the geometric strategy when data is consistent and skewed, and the algebraic strategy when data is diverse and changing.

Key Results

The study found a striking convergence between humans and AI:

  • Humans: Showed a clear SDE (higher accuracy at distance) for familiar items and a Reverse SDE (lower accuracy and much slower response times at distance) for novel items.
  • LLMs: Across 22 models, the same pattern held. For example, Qwen3-32B showed high accuracy that increased with distance for country populations (IWL), but accuracy that decreased with distance when reasoning about novel names in a prompt (ICL).
Figure 2: Symbolic distance effects (SDE). (A) Learning phase: participants were shown a query above a row of relations in context, and were given feedback. (B) IWL test (red): to test whether participants committed ranks of items to memory, we tested trained items with an uninformative context. (C) ICL test (blue): to test whether participants could make TIs in context, we tested them on novel items. (D) Under simple noise assumptions, the two strategies produce opposite distance effects on accuracy. (E) Expected reasoning steps grow with distance in the algebraic but not the geometric strategy. (F) Under the algebraic strategy, accuracy rises with reasoning budget, and longer distances require more steps. (G) Transformers trained from scratch exhibited an SDE on the IWL test and a reverse SDE on the ICL test. (H) The number of reasoning steps required to reach 90% of maximum accuracy increased with distance on the ICL, but not the IWL test. (I) ICL test accuracy increased with the number of reasoning steps, and longer distances required more steps. (J) Humans exhibited an SDE on the IWL test and a reverse SDE on the ICL test. (K) Human response times increased with distance on the ICL, but not the IWL test. (L) LLMs (Qwen3-32B shown) exhibited an SDE when discriminating familiar relations (country population), and a reverse SDE when tested on novel relations in context. (M) Across LLMs, the accuracy increased with symbolic distance on the IWL test and decreased on the ICL test for 15 of 18 models (lower right quadrant). (N) When evaluated with chain of thought (CoT), LLMs (Qwen3-32B shown) used more reasoning tokens for longer distances on the ICL test, and used fewer reasoning tokens on the IWL test (country population). (O) Across LLMs, the reasoning budget needed was larger on the ICL test than on the IWL test and increased with distance on the ICL test for 18 of 19 models (upper right quadrant). (P) The same held on the LLM ICL test as a function of the reasoning budget in tokens (Qwen3-32B shown). Panels F, I, and P show one line per symbolic distance (darker for larger distances); I and P show the best accuracy reached at each budget or below. Numbers show accuracy at the largest reasoning budget (eight steps; 1,024 tokens) over distances 2–6.
  • Content Effects: When logical premises in a prompt contradicted world knowledge (e.g., "a mouse is heavier than an elephant"), models initially failed (the geometric prior won), but could overcome the error if given enough "Chain-of-Thought" reasoning steps.

Limitations and Future Work

  • Animal Cognition: While humans and AI show both strategies, no non-human animal has yet been shown to exhibit the "Reverse SDE" (the algebraic strategy). Future work could investigate if this is a uniquely human/AI capability.
  • LLM Forward Passes: Interestingly, LLMs showed a Reverse SDE even without explicit Chain-of-Thought (in a single forward pass). The authors speculate this is because the fixed depth of the Transformer architecture limits how much serial computation can happen in one go.
  • Strategy Selection: The paper provides a normative account of when each strategy should be used based on costs, but how the brain or a model actually "decides" which one to deploy in the moment remains an open question.

Summary updated

BibTeX
@misc{russin2026geometric,
  author = {Jacob Russin and Joonhwa Kim and Ellie Pavlick and Michael J. Frank},
  title = {{Geometric and algebraic inference in humans and neural networks}},
  year = {2026},
  eprint = {2611.00387},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.00387},
}
Figure