INQUIRING LINE

Can an AI chain facts it already knows into a brand-new multi-step chain of reasoning it's never actually seen before?

How do transformers compose multi-step reasoning across different domains?

This explores how transformers chain several reasoning steps together (A leads to B, B leads to C), and whether that chaining carries over to new combinations and unfamiliar domains or only works on patterns they have already seen.


This explores how transformers link several reasoning steps together, and whether that ability carries over to new territory. The short answer from the corpus: transformers compose steps well when they've seen similar combinations before. Getting them to compose new ones may depend less on more training data and more on how the architecture reuses its own computation.

Controlled training experiments show the skill doesn't arrive all at once. Models first memorize facts, then learn to chain them on familiar examples, and only later handle chains they haven't seen. Success shows up as related entities clustering together inside the model, and the second step of a chain only generalizes if training explicitly included composed examples How do transformers learn to reason across multiple steps?. A more skeptical line of work argues that what looks like composition is often matching against fragments of computation memorized during training. That works on familiar problems but breaks on new combinations, and errors pile up with each additional step Do transformers actually learn systematic compositional reasoning?. A related finding: when the meaning is stripped out of a logic problem and only the rules are left, performance collapses even with the correct rules in the prompt. Models lean on what concepts mean rather than on formal logic Do large language models reason symbolically or semantically?.

The cross-domain part of the question has a surprisingly geometric answer. When transformers solve analogies, they first line up the relational structure of one domain with another inside their internal representation space, then apply a learned mapping between them. The same signature appears in toy tasks and in pretrained LLMs How do transformers perform analogical reasoning across domains?. Reasoning also leaves a visible shape: as a problem passes through the model's layers, reasoning and analogy tasks trace paths that bend two to three times more sharply than simple word-variation tasks Does transformer reasoning leave a geometric signature in representation space?. On this view, carrying reasoning across domains means aligning shapes, not applying abstract rules.

The architecture sets a ceiling. A standard transformer has a fixed number of layers. Each reasoning step uses up depth, so long chains eventually run out of room, and writing out chain-of-thought is a costly patch that moves the model's running notes into tokens Why do transformers need explicit chain-of-thought reasoning?. Looped transformers, which run the same layers repeatedly, generalize to unseen combinations and to longer chains than they were trained on, while vanilla transformers don't Can looped transformers generalize to unseen knowledge combinations?. A small model that pairs slow high-level planning with fast detailed computation solves Sudoku and maze tasks where chain-of-thought fails completely Can recurrent hierarchies achieve reasoning that transformers cannot?.

One consequence you might not expect: the reasoning steps a model writes out are not necessarily where the composition happens. Models trained to output filler compute the correct answer in their first few layers and then overwrite it Do transformers hide reasoning before producing filler tokens?. Fine-tuning makes the written steps matter less to the final answer Does fine-tuning disconnect reasoning steps from final answers?, and chain-of-thought often copies the form of familiar reasoning rather than doing new inference Does chain-of-thought reasoning reveal genuine inference or pattern matching?. That is why some researchers argue multi-step reasoning should be studied as movement through the model's hidden states, with the visible text treated as only a partial window onto it Where does LLM reasoning actually happen during generation?.


Sources 12 notes

How do transformers learn to reason across multiple steps?

Controlled training reveals transformers learn multi-hop reasoning in three phases: memorization, in-distribution generalization, and cross-distribution reasoning. Successful reasoning correlates with cosine clustering of entity representations, and second-hop generalization requires explicit compositional exposure during training.

Do transformers actually learn systematic compositional reasoning?

Research shows transformers succeed on in-distribution tasks by memorizing computation subgraphs from training data, not by learning systematic rules. They fail drastically on novel compositions, with errors compounding across reasoning steps.

Do large language models reason symbolically or semantically?

When semantic content is decoupled from reasoning tasks, LLM performance collapses even with correct rules in context. Models rely on parametric commonsense and token associations rather than formal logical manipulation, constraining reasoning to training distribution semantics.

How do transformers perform analogical reasoning across domains?

Mechanistic analysis reveals transformers perform analogical reasoning via two stages: geometric alignment of relational structure in embedding space, followed by learned functor application. This signature appears in both synthetic tasks and pretrained LLMs.

Does transformer reasoning leave a geometric signature in representation space?

Measuring intrinsic geometry across multiple models shows reasoning and analogy tasks carve paths with mean curvature of 0.71–0.83 rad, while lexical tasks produce only 0.27–0.31 rad, suggesting path geometry encodes task difficulty.

Show all 12 sources
Why do transformers need explicit chain-of-thought reasoning?

Feedforward transformers lack native recurrent state-tracking and must push evolving state deeper into layers, eventually exhausting depth. Explicit chain-of-thought externalizes this state into tokens as a costly patch for a structural deficiency.

Can looped transformers generalize to unseen knowledge combinations?

Recurrent-depth transformers with shared parameters across iterations enable systematic generalization and depth extrapolation that vanilla transformers cannot achieve. This emerges through a sharp three-phase process: memorization, in-distribution, then out-of-distribution generalization.

Can recurrent hierarchies achieve reasoning that transformers cannot?

The Hierarchical Reasoning Model couples slow abstract planning with fast detailed computation across two timescales, achieving near-perfect performance on Sudoku and mazes where chain-of-thought methods fail completely. With only 27M parameters and 1,000 samples, HRM escapes the AC0/TC0 complexity ceiling that constrains fixed-depth transformers.

Do transformers hide reasoning before producing filler tokens?

Logit lens analysis shows models trained with hidden CoT tokens compute correct answers in layers 1-3, then actively suppress these representations in final layers to produce format-compliant filler output. The reasoning is fully recoverable from lower-ranked token predictions.

Does fine-tuning disconnect reasoning steps from final answers?

Three faithfulness tests show fine-tuned models generate reasoning chains that less reliably influence final outputs. Early termination, paraphrasing, and filler substitution all produce invariant answers more often after fine-tuning, suggesting reasoning becomes performative rather than functional.

Does chain-of-thought reasoning reveal genuine inference or pattern matching?

CoT works by constraining models to reproduce familiar reasoning patterns from training, not by enabling novel symbolic reasoning. Performance degrades predictably under distribution shifts—the signature of imitation rather than capability emergence.

Where does LLM reasoning actually happen during generation?

Evidence from CoT faithfulness tests, feature steering, and layer analysis suggests latent-state dynamics drive reasoning, while surface chain-of-thought serves as a partial interface. Hidden reasoning processes should be the default focus of study.

Papers this line draws on 8

The research behind the notes this line reads — ranked by how closely each paper relates.