SYNTHESIS NOTE
Topics›Evaluations›this note

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.

Synthesis note · 2026-03-28 · sourced from Evaluations

"Faith and Fate: Limits of Transformers on Compositionality" (Dziri et al., 2023) provides the clearest empirical decomposition of how transformers actually handle compositional tasks — and why they fail.

The test bed is three representative tasks: multi-digit multiplication, logic grid puzzles (Einstein's puzzle), and a classic dynamic programming problem. Each is formulated as a computation graph with measurable complexity. The results are devastating for systematic reasoning claims: training on task-specific data leads to near-perfect performance on in-distribution instances at low compositional complexity, but "fails drastically on instances outside of this region."

The mechanism: transformers solve compositional tasks by reducing multi-step reasoning into linearized path matching. When a test problem's computation subgraph was seen during training (or closely resembles one), the model succeeds. When the composition is novel — requiring the model to apply computational rules to unseen combinations — it fails. This is shortcut learning: "may yield fast correct answers when similar compositional patterns are available during training but does not allow for robust generalization to uncommon or complex examples."

The error analysis is particularly revealing. While models can memorize single-step operations, they fail to compose them into correct reasoning paths. The failure is not random — it is systematic, suggesting "predictions based on shallow, rote learning rather than a deep, holistic task understanding." Error propagation makes this worse: errors in early stages compound in subsequent steps, creating an inherent ceiling on complex compositional tasks.

This provides the task-specific mechanism for what Do foundation models learn world models or task-specific shortcuts? describes at a higher level. The heuristic IS linearized subgraph matching — and it works well enough within the training distribution to create the illusion of systematic reasoning. Since Can neural networks learn compositional skills without symbolic mechanisms?, the Faith and Fate finding adds the critical qualifier: scaling helps only insofar as it increases training coverage of computation subgraphs. Novel compositions remain unsolved.

The implication for chain-of-thought: since Does logical validity actually drive chain-of-thought gains?, CoT may work not because it enables systematic reasoning but because it decomposes problems into subgraphs the model has already seen. CoT as subgraph decomposition rather than logical inference.

Inquiring lines that read this note 86

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.

How do transformer circuits and attention mechanisms enable or limit reasoning? What determines how neural networks organize their internal knowledge representations? Can scaling alone produce compositional generalization in neural networks? How do mechanistic features and representations drive model behavior? What causes foundation models to develop task heuristics instead of understanding? How can language models effectively manage long-context memory without quality degradation? Why do language models systematically fail at causal reasoning? What determines whether visible reasoning traces improve task performance? How can parameter sparsity improve interpretability while maintaining model capability? Does training data format shape reasoning more than domain content? What training data structures and signals produce robust learning across distributions? Do language models learn underlying linguistic structure or merely surface patterns? What fundamental limitations prevent embeddings from solving task-relevant retrieval? Can synthetic data preserve necessary diversity to prevent model collapse? How does verifier integration affect the generation-verification gap? What are the trade-offs between memory capacity and continuous task learning? How do different reward signals affect model reasoning and calibration differently? Does architectural recurrence enable computational capabilities that fixed-depth models cannot achieve? Why does separating planning from execution enhance reasoning performance? What actually drives chain-of-thought performance gains in reasoning tasks? Should GUI agents use structured UI perception instead of raw pixels? Does reasoning architecture matter more than model scale? Why do human-AI teams underperform compared to their individual components?

Related concepts in this collection 4

This note in its neighbourhood — explore the map, then jump to a related concept in the list below.

Concept map
13 direct connections · 126 in 2-hop network ·dense cluster Open in graph ↗

Click a node to walk · click center to open · click Open in graph to see this note in the full knowledge graph

your link semantically near linked from elsewhere

Related papers in this collection 8

Papers most semantically related to this note, ranked by cosine similarity in the embedding space.

Original note title

compositional reasoning in transformers reduces to linearized subgraph matching — success depends on training exposure to similar computation subgraphs not systematic problem-solving