A causal model that learned cause and effect before it saw your data.
Most tools fit a new statistical model every time you ask a question. Counterfact is different: it is a transformer pretrained on millions of simulated economies where the true effect of every change is known. It arrives already knowing how to separate what you caused from what would have happened anyway.
Try it yourself
Can you beat the model? Guess what the change did.
This is how Counterfact was trained. We build a small world, make a change in it (or not), and keep a secret copy of what would have happened without it. You guess the effect, then the real model answers on the same data and we reveal the truth.
Architecture
From your spreadsheet to an honest answer, in one pass.
Click any block to look inside
Trained on worlds where the truth is known
You can't learn cause and effect from real data alone, because in real data nobody knows the true answer. So we generate synthetic economies, and each one is simulated twice from the same random starting point: once with a change and once without. The gap is the true effect, and the model learns to recover it.
- Hidden causes, delays and chains of effects
- Trends, seasons, sudden shocks and spikes
- Real Indian festival calendars (Diwali, Holi, Eid) and weekday patterns
- Matched to real data: smoothness, trend strength and how closely series move together were measured on Indian and US data and copied into the simulations
Honest by construction
Every answer is a range, not just a number. The model outputs the full spread of what would plausibly have happened, then a correction fitted on real data makes its "90% range" hold about 9 times in 10.
- The correction is tuned on 7 kinds of real data and tested on an 8th it has never seen, rotating through all 8
- Six views of your data (different comparison sets and history lengths) are averaged
- Automatic checks: fake change dates, and dropping each comparison
- When the data can't support a claim, it says "can't tell"
Benchmarks
Tested where the right answer is known, against the usual methods.
1,200 windows of real Indian and US public data (MOSPI state CPI, NSE sector indices, NIFTY stocks, US unemployment, payrolls, building permits and retail sales), with effects of a known size added, or none at all.
Explore by data type
Overall, including the fair comparison where the usual method gets the same honesty correction:
| Method | Typical error ↓ | 90% range holds | False alarms ↓ | Large effects caught |
|---|---|---|---|---|
| Counterfact | 0.47 | 90% | 9.5% | 65% |
| CausalImpact-style model, as usually used | 0.50 | 58% | 41% | 82%* |
| CausalImpact-style model, given the same honesty correction | 0.50 | 90% | 10% | 56% |
| Regression on comparison series | 0.62 | 13% | 87% | n/a |
Error is in units of each series' own variation before the change. *A method that flags effects 4 times in 10 when nothing happened will also "catch" more real effects; that isn't a fair win. At equal honesty, Counterfact's ranges are about 11% tighter and it catches more real effects (65% vs 56%). "CausalImpact-style" means a local-level model with regression on comparison series, fitted per problem, as in Google's CausalImpact.
Published natural experiments
- California's 1989 tobacco tax: −16.4 packs per person a year (range −27.2 to −4.1). Published: about −19 (Abadie et al., 2010).
- German reunification: −944 USD per person, but the range includes zero, so it says can't tell. Published: about −1,600. Only 16 comparison countries is a hard case.
- Basque Country terrorism: −0.60 (range −1.60 to +0.23), right direction and size, and again an honest can't tell. Published: about −0.6 to −0.9.
Placebo tests: where nothing happened
We ran every method on the states and countries that had no policy change. A good method should rarely find an "effect" there.
- Typical method: flags an effect in 81–94% of them
- Counterfact: 19–24%
- Coverage holds at 86–94% on every one of the 8 data types, not just on average
100 worlds where nothing happened
Each dot is a test with no real effect. Red means the method claimed one anyway. The rates come from the 1,200-test benchmark.
Independent benchmark
Tested on someone else's worlds.
Our own benchmarks could flatter us, since we built the simulator. So we also ran Counterfact on dot-Identifiability, a public benchmark from another research group (DoTime). Each world was simulated twice from the same random start, with and without a change, so the true effect is known exactly. Nine causal structures, 800 worlds, with no retuning.
of the open model's 90% ranges held the true answer
for the production model, tuned for real-world data
No retuning or refitting on their data: raw model ranges
Pick a causal structure
Two kinds of tool
Some causal models, including DoTime's, forecast: "if we force X, what will Y be?", before the outcome is known. Counterfact measures after the fact: "Y changed; what would it have been without the change?" Seeing the outcome makes the job easier, so the two can't fairly be scored head-to-head, and we don't.
What this does and doesn't show
- It does show the ranges stay honest on a simulator we didn't write, including worlds where the change did nothing.
- It doesn't show we beat simple methods here: each world asks about the single step right after the change, where a before-and-after guess gets the direction right about as often.
- Weakest case: a hidden factor driving both the cause and the outcome (bow graph). Ranges there are a little too narrow for the production model.
Setup: dot-Identifiability-v1 v1.2.0 (Thumm & Chen, 2026), 800 worlds sampled with a fixed seed. Counterfact sees the changed series and the outcome only (no hidden variables and no knowledge of the graph) and predicts the outcome without the change at the queried step, using its raw 90% range. Error is in units of the series' typical step-to-step change. Scripts and per-world results: Hugging Face.
How it compares
Why not just use the usual tools?
| Counterfact | CausalImpact | Synthetic control | Diff-in-diff | A/B test | |
|---|---|---|---|---|---|
| Works on changes you already made | Yes | Yes | Yes | Yes | No: must be planned |
| Needs a statistician to set up | No | Some | Yes | Yes | Yes |
| Time to an answer | Seconds | Minutes | Hours to days | Hours to days | Weeks |
| Honest uncertainty on real data | ~9 in 10 holds | ~6 in 10 | Depends on setup | Depends on assumptions | Yes |
| Works with few comparison series | Yes (3–10) | Yes | Needs many | Needs a control group | n/a |
| Knows Indian festivals and seasons | Yes | No | No | No | n/a |
| Plain-language answer and report | Yes | Text summary | No | No | Varies |
A randomised A/B test remains the gold standard when you can run one. Counterfact is for the many changes you can't randomise: national prices, TV campaigns, store launches, policies.
Research lineage
The newest idea in causal AI, ready to use today.
In 2026, research labs began publishing models that learn cause and effect in time series from simulated worlds. Most are research prototypes tested mainly on synthetic data. Counterfact takes the same idea and turns it into something you can use: tested on real data, calibrated so its ranges can be trusted, and shipped as a product.
Transformers trained on simulated data can do Bayesian inference in one pass (Müller et al.).
The same idea beats tuned models on small tables (Hollmann et al., Nature).
Research models extend it to cause and effect in tables (Do-PFN, CausalFM).
Research prototypes for time series appear (CausalTimePrior, TCPFN, DoTime). Most are tested mainly on synthetic data.
Tested on 1,200 real Indian and US data windows, with honest ranges. Available as a web app, PDF report, API, Python package and open model.
Open and verifiable
Don't take our word for it. Check it.
The research version of the model, its benchmarks and its limits are public on Hugging Face. The production model is available on this site, as an API and as a Python package.