Keeping the What-If: a record demo

By Darren Hall. A record for counterfactual world models, in reply to Balestriero, LeCun, and Varaku, arXiv:2611.24778.

Toy world, same dynamics as simulator.py. True dynamics: z' = z + a * s(z) + d, s = 1 + 0.4 sin(x) + 0.3 cos(y). Model mu(z,a) = z + a. Disturbance d is a hidden current, drawn per transition. Ground truth is shown here for teaching only. The agent never sees d.

Results from simulator.py, seed 20261125, n=2000. Holding test, R2 on the change: factual only 0.448, corrected immediately 0.913, corrected later from the record 0.913, wrong predictor version 0.657. Chaining test: chained record 60.7 percent reach the goal, naive model only 11.8 percent, one-step hindsight 65.8 percent. Full numbers in results.json, method and limits in REPORT.md. This is a toy simulation, not the paper's simulators.

Show me the gain, one event

Event 14, seed 20261125. Start at (1.41, 0.12). The boat actually went to (1.18, 1.34). Ask: what if it had taken a different action instead?

True what-if outcome, where it would have ended up: (1.06, 1.77)

Without the record, factual prediction: (1.53, 0.82). Misses by 1.07 units.

With the record, corrected prediction: (1.11, 1.59). Misses by 0.19 units.

Gain: 82.6% improvement.

Across all 2000 events, mean miss: factual 0.94 units, corrected 0.32 units. Gain: 65.9% improvement. Median miss: 0.88 down to 0.24, a gain of 72.7% improvement.

Chaining, out of 100 tries: naive plan reaches the goal 12 percent of the time, chained plan with the record reaches it 61 percent of the time. Gain: 408% improvement. One-step hindsight reaches it 66 percent of the time, so chaining does not beat one-step.

Run it by trust level

Same 2000 events, run again as if every entry were at that level. simulator_kt.py, results_kt.json. Holding R2 on the change: WILD 0.241, CANDIDATE 0.716, MATURE fast 0.877, MATURE slow 0.698, REVOKED 0.516, REVOKED gated: cannot-answer, no wrong answer. Chaining: fast chain 61.8 percent, slow chain 23.8 percent, naive 12.6 percent, one-step 66.0 percent. Measured immediately, slow is worse for hindsight on a specific event, because it replaces the actual disturbance with the regional mean. That ranking holds only for the immediate measurement. A retest measures slow after fast's authority collapses: slow holds at 0.696 while fast cannot answer. Fast is for this event, slow is for the domain. Gain from WILD to MATURE fast: 264% improvement in R2.

Result

Press New event, then ask a what-if.

Record, append only

No entries yet.

Code and report: github.com/iamvolshi/lecun-counterfactual-demo