TL;DR
This paper introduces axiomatic training, a novel method to teach transformers abstract causal reasoning by training them directly on symbolic text demonstrations of causal rules (like transitivity and d-separation). Remarkably, models trained only on simple, short causal chains successfully generalize to complex, branched, and much longer graph structures, with fine-tuned open-source models even outperforming GPT-4 on established causal benchmarks.
What Problem Does This Paper Address?
Causal reasoning—understanding cause-and-effect relationships rather than just statistical correlations—is a fundamental requirement for robust AI. Typically, machine learning models either have causal assumptions hardcoded into their architecture (inductive biases) or attempt to infer causal patterns from massive observational datasets.
Large Language Models (LLMs) frequently struggle with true causal reasoning. They often fall prey to the "reversal curse" (failing to invert a known relationship) or fail entirely when graph structures scale up or change slightly. The authors tackle a fundamental question: Can a transformer directly learn abstract causal rules from purely symbolic text demonstrations and successfully apply them to unseen, more complex graph topologies?
Methods
Instead of training models on data generated by a causal system, the authors propose axiomatic training. They format causal axioms into simple text tuples: ⟨premise, hypothesis, conclusion⟩. For example, a demonstration of the transitivity axiom looks like this:
- Premise:
X1 causes X2. X2 causes X3. - Hypothesis:
Does X1 cause X3? - Conclusion:
Yes.
The overall framework is illustrated below:
The authors evaluate this approach using two distinct setups:
- From-Scratch Training: They train a small, 67-million-parameter GPT-2-like decoder model from scratch to isolate the effects of axiomatic training without any pre-training data contamination.
- Fine-Tuning: They use Low-Rank Adaptation (LoRA) to fine-tune a pre-trained
Llama-3-8B-Instructmodel on the same axiomatic data.
Crucially, the training data only consists of simple, linear chain graphs containing 3 to 6 nodes. To encourage structural generalization, they introduce Random Flipping—randomly reversing the direction of some edges in the training chains to expose the model to forks and colliders (v-structures). They also experiment with different positional encodings (NoPE, LPE, SPE, and RoPE) to see which best supports length generalization.
Datasets
The authors generate synthetic training sets (OCC for only causal chains, TS1 and TS2 for mixtures containing random edge flips) consisting of 175k axiom demonstrations.
For evaluation, they use:
- MultiEval_SLR: A challenging synthetic out-of-distribution dataset featuring sentence shuffling, random edge flipping, and longer sequences (up to 9 nodes).
- CLEAR Benchmark: An external natural language benchmark testing a model's understanding of causal graphs through binary (Yes/No) and multiple-choice questions.
- Corr2Cause Dataset: An external dataset requiring models to infer pure causal graphs from a set of correlational and conditional independence statements.
Key Insights and Ideas
- Diversity Breeds Generalization: Models trained only on clean, forward-directed causal chains (
OCC) fail completely when evaluated on branched or reversed graphs. Introducing edge-level noise (random flipping) during training is essential; it forces the model to learn the underlying mechanics of the axiom rather than memorizing a sequence template. - Positional Encodings Matter for Structure: Traditional absolute positional encodings (like Sinusoidal or Learnable PEs) cause models to struggle when node names grow longer or graph sizes increase. Rotary Position Embedding (RoPE) and No Positional Encoding (NoPE) perform significantly better, allowing the model to focus purely on the relational structure of the text.
- Compositional Generalization is Possible: A small 67M model trained only on 3–6 node graphs can successfully chain abstract rules together at test time to solve problems on graphs with up to 15 nodes and complex branching factors.
Key Results
The results demonstrate that axiomatic training punches far above its weight class:
- Zero-Shot Branching Performance: On complex graphs with a branching factor of 1.4, the 67M model trained from scratch (
TS2 w RoPE) achieved 68% accuracy on 12-node graphs, significantly outperforming Gemini Pro in a zero-shot setting and approaching GPT-4's multi-shot performance. - Outperforming GPT-4 on Benchmarks: When
Llama-3-8B-Instructwas fine-tuned on d-separation axioms, its multiple-choice accuracy on the CLEAR benchmark jumped from 33% to 50%, surpassing GPT-4 (36.67%). - Corr2Cause Breakthrough: On the highly complex Corr2Cause task, transitivity-based fine-tuning pushed Llama-3's F1 score from a baseline of 0.11 up to 0.32, beating GPT-4's score of 0.29.
Limitations and Future Work
While promising, the paper notes a few key limitations:
- Simplified Causal Assumptions: The current work assumes there are no unobserved confounders, which is rarely the case in messy, real-world causal problems.
- Limited Axiom Scope: The framework was only tested on transitivity and d-separation. Extending this to more advanced causal frameworks, such as Pearl's do-calculus, remains an open challenge.
For future directions, the authors suggest that axiomatic training could be applied broadly to other formal systems, such as deductive logical reasoning. Additionally, these axiom-trained models could serve as test-time "causal verifiers" to validate and correct the outputs of larger language models.
Summary updated