Counterfactual Rewrites with a Provenance Ledger for Multi-Hop Training

Small language models can learn to chain facts across documents ("who directed this film" and then "where was that person born") when trained on synthetic multi-hop questions. Both current recipes for producing that data have a known weakness. Questions written from real Wikipedia let the model skip a hop by recalling facts it memorized during pretraining. Questions built from templates over fictional worlds remove that shortcut, but their language is stilted, and gains stop short of training on real data. We propose a third source that keeps natural prose and removes memorized answers. An LLM takes real Wikipedia passages and swaps their entities, dates and attributes for plausible false ones. It then writes multi-hop questions over the altered passages. Every edit is recorded in a provenance ledger: which source sentence, which substitution, which hop graph, which rewrite rule. Human reviewers use the ledger to inspect and fix the groups of edits most likely to be broken, instead of reading random samples.

The ledger also supports a transparency measurement. Because we know the original real-world answer behind every counterfactual question, we can count how often a trained model "leaks" the memorized real answer instead of reading the context. For a fully open model whose pretraining corpus is public, we can also test whether that leakage tracks how often the original fact appears in pretraining text. The core claim has two parts. First, the gap between template-based synthetic data and real data comes mostly from language, not from facts. Second, errors in counterfactual rewriting cluster in a few identifiable rewrite types, so a small, targeted human review budget buys more than the same money spent on extra automated filtering.

What exists and what is missing

Three papers motivate this work. CofCA built exactly this kind of data: LLM counterfactual rewriting of 300 Wikipedia passages, human verification, and GPT-4 question generation with intermediate sub-questions. It showed that GPT-4's exact match drops from about 70% on factual passages to about 53% on 2-hop counterfactual ones, and that only 36.3% of its full reasoning chains are correct. CofCA, however, is a 1,800-item evaluation set that was never used for training, and its human pass covered every item, which is why it stayed small.

Learning from Synthetic Data Improves Multi-hop Reasoning supplies the training method we reuse. That method is reinforcement learning with GRPO (Group Relative Policy Optimization, which compares several sampled answers per question) and a reward only for the correct final answer. The paper reports 56% to 131% relative F1 gains for Qwen3-0.6B trained on the fictional PhantomWiki. The same paper reports that reinforcement learning on real in-domain data still does better, which is the ceiling we target.

Few-Shot Data Synthesis for Open Domain Multi-Hop Question Answering scaled real-Wikipedia question synthesis to 1.5M examples. It used LLM self-answering and retriever checks, with no human review, and reports an average +19.9 points for LLaMA 7B. Its data inherits the memorization shortcut that CofCA and MuSiQue diagnose. MuSiQue's own contribution is relevant here too: it composes single-hop questions and then filters out compositions answerable without the bridge hop. We reuse that disconnection filter.

INSPECTOR supplies the review method. It groups synthetic examples by the transformation that produced them, and auditors using it found 3x to 4x more valid labels than auditors reviewing randomly. INSPECTOR, however, was only tested on sentence-level sentiment and hate-speech labels with lexical perturbations. We carry the idea to rewritten passages and hop graphs, where a single bad substitution can silently break a chain.

On transparency, What's In My Big Data? gives exact-count tools over pretraining corpora. Dolma and OLMo 2 give a model whose pretraining data is fully public. Copyright Traps acts as a constraint on design: ordinary membership tests are near chance (AUC about 0.52) at around 1B parameters. We therefore do not try to infer ingestion from loss. We measure behavioral leakage against a known counterfactual instead.

Research Program

The rewriting pipeline. We draw hyperlinked Wikipedia passage pairs and triples, using the pairing scheme of Few-Shot Data Synthesis and excluding any passage that appears in CofCA, MuSiQue, HotpotQA or 2WikiMultihopQA evaluation sets. An LLM extracts a hop graph and rewrites each passage with a consistent substitution map across all passages in the chain; a counterfactual entity must stay the same entity everywhere. It then generates 2- to 4-hop questions with sub-questions in CofCA's format. We drop questions that a model can answer from a single passage, using MuSiQue-style masked-bridge checks.

The ledger. Every item stores five things: the source sentences, the substitution map (original value and new value), the rewrite type, the hop topology, and the automated scores. Rewrite types include name swaps, date shifts, numeric changes, location changes and relation edits. The automated scores cover fluency, self-answerability and contradiction checks.

Provenance-targeted review. Reviewers see items grouped by rewrite type and topology, ordered by automated risk. They accept, edit or reject whole groups, and they spot-check accepted groups. We expect failures to concentrate in a few predictable places: date shifts that break age arithmetic, swaps that leave stray real-world coreferences, and partial substitutions inside comparison questions.

Training and leakage measurement. Qwen3-0.6B, Qwen3-1.7B and OLMo 2 7B are trained with outcome-reward GRPO, following Learning from Synthetic Data. Leakage is defined as the fraction of counterfactual questions where the model outputs the original real-world value recorded in the ledger. For OLMo 2, we count each original fact's surface forms in Dolma with WIMBD-style exact counts. We then fit leakage against log frequency before and after training.

Baselines

The naive reference point is the untrained base model of each size, prompted zero-shot and with few-shot chain-of-thought on every benchmark. It anchors relative gains and gives the leakage rate before any counterfactual training.

The strongest existing training method is PhantomWiki with outcome-reward GRPO from Learning from Synthetic Data Improves Multi-hop Reasoning. It is the closest competitor: it already removes memorization by construction and already transfers to real benchmarks. Its reported figure is 56% to 131% relative F1 improvement for Qwen3-0.6B across real-world benchmarks. The file gives no per-benchmark absolute F1 (no reported result found on Lacuna for PhantomWiki-trained absolute MuSiQue or CofCA scores), so we rerun it ourselves. The rerun uses the same models, the same number of training questions, the same hop-count distribution, the same GRPO steps and rollouts, and the same hyperparameter search budget. Beating it means higher MuSiQue-Ans answer F1 and higher CofCA joint chain accuracy, over three seeds, with non-overlapping confidence intervals.

The second strong baseline is the automated real-Wikipedia pipeline of Few-Shot Data Synthesis. Its reported figure is an average +19.9 points (+63.6%) for LLaMA 7B across multi-hop benchmarks. We regenerate it on our passage pool and train with the same GRPO budget. We expect it to score well on HotpotQA but leak more and do worse on CofCA. Beating it means matching it on HotpotQA while exceeding it on CofCA joint accuracy and on leakage.

Two ablations isolate our ingredients. The first is the same counterfactual pipeline with no human review. Its savings go to automated filtering: a larger filter model, more candidates and stricter thresholds, with dollar cost matched to annotator wages. The second is the same human hours spent on uniformly random items rather than ledger-grouped items, which isolates provenance targeting. As an upper reference, we train on the real MuSiQue training split with the same GRPO budget; this is the "real data ceiling." For context, MuSiQue reports human performance of 78.0 answer F1, and CofCA reports GPT-4 at 36.3% correct chains.

Why not just…?

Why not just use the fully automated pipeline and skip humans? This is the real threat. LLM self-checking may catch most rewriting errors, and the evidence against it in the file is indirect. Few-Shot Data Synthesis discarded more than half its candidates at a cost of 20.4k GPU hours. INSPECTOR found that automated transformations often change labels. Neither shows that this happens with counterfactual chains. The cost-matched no-review ablation settles the question. If it ties targeted review, we report that, and the contribution narrows to the claim that naturalistic counterfactual text beats templates. That claim is tested independently of the review question.

Why not just train on PhantomWiki or another template world? It is cheaper and also free of memorization. Its own authors, however, report that real-data training still wins, and they attribute this to missing linguistic nuance. Our comparison holds facts-free-ness constant and varies only whether the prose is natural. If PhantomWiki matches us, the language hypothesis is wrong.

Why not just prompt a large model or use interleaved retrieval such as IRCoT? IRCoT improves retrieval at inference time, but it does not stop a model from answering from memory once the evidence is in context. CofCA's GPT-4 results show large models do exactly that. Failure Modes in Multi-Hop QA shows that retrieved evidence in low-visibility positions still goes unused. We report IRCoT on top of both base and trained models, treating it as complementary rather than competing.

Proposed Experiments

The first decisive check compares counterfactual-natural data with PhantomWiki at matched questions and compute, on MuSiQue-Ans (answer and support F1), CofCA joint chain accuracy, HotpotQA distractor and 2WikiMultihopQA. Our claim predicts we close a substantial share of the gap to the real-MuSiQue ceiling, and that the gain is largest on CofCA and MuSiQue.

The second check is a three-way comparison at equal cost: targeted review, random review and no review. It is run across review budgets of 0%, 2%, 5% and 10% of items, so we obtain a cost curve rather than a single point. We also report per-group error rates from a fully annotated audit sample, which tests whether failures really cluster by rewrite type.

The third check is leakage on a held-out counterfactual set built from passages unseen in training, plotted against Dolma frequency of the original fact for OLMo 2. The claim predicts three things. Base-model leakage should rise with pretraining frequency. Training on counterfactual chains should flatten that slope more than PhantomWiki or real-Wikipedia synthesis. And leakage should predict intermediate-hop failures in CofCA's sub-question scoring.

We will release the data, the ledger and the reviewer edit logs.