How do transformers perform analogical reasoning across domains?
Exploring whether transformers solve analogy problems through a distinct mechanism separate from composition, and whether this involves abstract relational structure rather than memorized computation patterns.
Most work on transformer reasoning frames it as compositional — complex conclusions built by chaining simpler local steps. Analogy is a qualitatively different faculty: rather than chaining steps, it identifies shared relational structure across distinct domains and transfers it, producing the cognitive "leap" that Structure-Mapping Theory describes as preserving higher-order relations over surface features. "Emergent Analogical Reasoning in Transformers" formalizes this using functors from category theory — analogy as the inference of structure-preserving correspondences between entities across categories — and builds synthetic tasks to watch it emerge under controlled conditions.
The mechanistic finding is a clean two-part decomposition: (1) geometric alignment of relational structure in the embedding space, and (2) application of a functor within the transformer that carries that structure from source category to target. Emergence of this ability is highly sensitive to data characteristics, optimizer choice, and model scale — but the same trends and mechanisms appear in pretrained LLMs, so this is not just a synthetic-task artifact.
This matters because it separates two capacities the vault has mostly discussed together. Since Do transformers actually learn systematic compositional reasoning?, compositional reasoning is essentially interpolation over seen computation graphs — which means it does not explain cross-domain transfer. The functor mechanism is the missing account of transfer: relational structure abstracted in the geometry and re-applied elsewhere, which is closer to the "leap" than to subgraph lookup. It pairs naturally with How do transformers learn to reason across multiple steps? — both locate reasoning in emergent embedding-space geometry rather than explicit symbolic machinery.
Inquiring lines that read this note 3
This note is a source for these research framings, grouped by the broader line of inquiry each explores. Scan the bold lines of inquiry; follow any specific question forward.
Does recurrence enable reasoning capabilities that fixed-depth transformers cannot achieve? Does model scaling alone produce compositional generalization without symbolic mechanisms?Related concepts in this collection 2
This note in its neighbourhood — explore the map, then jump to a related concept in the list below.
Click a node to walk · click center to open · click Open in graph to see this note in the full knowledge graph
-
Do transformers actually learn systematic compositional reasoning?
Explores whether transformers solve compositional tasks through genuine systematic reasoning or by pattern-matching against training data. This matters because it determines whether scaling alone can achieve robust generalization.
contrasts: analogy explains transfer that subgraph matching cannot
-
How do transformers learn to reason across multiple steps?
Does multi-hop reasoning in transformers emerge through distinct learning phases, and what geometric patterns in hidden representations explain when reasoning succeeds or fails?
relates: both locate reasoning in emergent embedding geometry
Related papers in this collection 8
Papers most semantically related to this note, ranked by cosine similarity in the embedding space.
- Emergent Analogical Reasoning in Transformers
- Grokked Transformers are Implicit Reasoners: A Mechanistic Journey to the Edge of Generalization
- How do Transformers Learn Implicit Reasoning?
- Emergence of Abstractions: Concept Encoding and Decoding Mechanism for In-Context Learning in Transformers
- Faith and Fate: Limits of Transformers on Compositionality
- Automatic Extraction of Metaphoric Analogies from Literary Texts: Task Formulation, Dataset Construction, and Evaluation
- Implicit Chain of Thought Reasoning via Knowledge Distillation
- Pushing the Limits of Rule Reasoning in Transformers through Natural Language Satisfiability
Original note title
analogical reasoning in transformers decomposes into geometric alignment of relational structure plus application of a functor