arXiv:2611.24778cs.LGNov 2026

Manuscript Offprint

arXiv:2611.24778

Counterfactual World Models: JEPAs That Reason About "What If"

Randall Balestriero, Yann LeCun, Kerda Varaku

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

World models operate in a world they cannot fully observe. When a hidden disturbance, such as a current pushing a boat, changes the outcome of an action, a counterfactual question follows: what would have happened under a different action, subject to the same disturbance? Its answer separates bad decisions from bad luck. We prove that world models trained on factual transitions cannot answer it on their own, whatever their data or capacity. For many physical systems, the observed outcome and a simple property of the dynamics suffice: natura non facit saltus, nature makes no leaps. When actions and disturbances act as separate forces, their interaction is second-order in time, so the counterfactual outcome is, to first order, the observed outcome plus the difference between the world model’s predictions under the alternative and factual actions. This yields a counterfactual world model with no counterfactual data, extra parameters, or retraining. For transitions of duration hh, we prove an O(h2)O(h^{2}) bound on the counterfactual error relative to the disturbance variance, establish a matching minimax lower bound from unpaired factual data, and characterize failures at discontinuities, coordinate folds, and disturbances that scale the command. We validate these predictions from pixels with JEPA world models on frozen DINOv2 and masked autoencoder (MAE) encoders. On four rendered simulators, our approach improves counterfactual R2R^{2} from 3838–46%46\% to 8686–96%96\% with the same world models; on a fifth, an underwater vehicle, it reaches 9090–94%94\% with sixteen times more factual data. Four further frozen encoders, DINOv3, SigLIP 2, CLIP and EVA-02, give 8181–95%95\% on the same simulators. In hindsight planning, it finds the action that would have reached the goal in 3535–69%69\% of events, against 1414–23%23\% for an oracle planner that knows the simulator but not the outcome.

1 Introduction

World models predict the consequences of actions and are becoming a core component of agents that interact with the world. From latent dynamics models for control [17, 18, 19, 20, 53, 21] to joint-embedding predictive architectures (JEPAs) that predict in the feature space of self-supervised encoders [28, 3, 7, 4, 64, 57], they allow agents to anticipate outcomes before acting.

Yet the real world is never fully observed. Consider the boat of : it picks a heading while an unseen current pushes it. Before acting, no world model can know the current it is about to meet, so the best it can do is predict where the boat ends up on average over currents (green). The observed outcome (diamond) lands elsewhere, and in doing so reveals how far the current actually pushed the boat. A new question then arises: where would the boat have ended up under a different heading, in that same current? (dotted). This is an individual counterfactual. Asked about another heading, a standard world model returns the average over currents again (green) and discards what the outcome revealed. The same question arises whenever a gust of wind or a miscalibrated actuator alters an outcome. Its answer is what one needs to debug a failure, to tell a bad decision from bad luck, to assign credit to an action, and to find in hindsight the action that would have reached the goal, which we call hindsight planning.

This question is fundamentally different from factual prediction: as we prove, a world model trained on factual transitions cannot answer it on its own. A world model learns the conditional consequences of actions from observed transitions, whereas an individual counterfactual asks about an alternative action under the same hidden disturbance. An unpaired factual dataset does not record outcomes under two actions for the same initial state and realized disturbance. Consequently, even a perfect model of factual transitions does not determine how alternative outcomes are coupled, i.e., which outcome under the alternative action belongs to the observed event: distinct counterfactual worlds can induce exactly the same factual distribution ( and ). Neither a more accurate predictor nor a more expressive generative model resolves this ambiguity, and no factual test can reveal it. Without additional structure, individual counterfactuals are not identified.

For many physical systems, nature provides this structure. Natura non facit saltus: nature makes no leaps. When the action and the hidden disturbance enter as separate forces, as the boat’s propulsion and the current do, each changes the state gradually, and each alters the effect of the other only through the change of state it has already caused. Their interaction, i.e., how much the effect of changing the action depends on the disturbance, is therefore second-order in the transition duration. To first order, changing the action changes the outcome by the same amount in every event, and this amount is what a factual world model predicts between the two actions. Separate channels are an assumption on how the disturbance enters, not a consequence of smoothness: a worn actuator whose effect grows with the command is smooth, yet it interacts with the action at first order (), and we test this failure in . Under separate channels, this observation leads to a simple construction. Let zt=f(ot)z_{t}=f(o_{t}) denote the representation of an observation, and let μ(zt,a)\mu(z_{t},a) be a factual world model trained to predict the next representation under action aa. Given an observed transition (zt,at,zt+1)(z_{t},a_{t},z_{t+1}), we estimate the outcome under an alternative action a′a^{\prime} by

z^t+1(a′)=zt+1+μ(zt,a′)−μ(zt,at).\boxed{\widehat{z}_{t+1}(a^{\prime})=z_{t+1}+\mu(z_{t},a^{\prime})-\mu(z_{t},a_{t}).}

The observed outcome records the effect of the realized disturbance; the world model predicts the effect of changing the action. The construction requires only two evaluations of an ordinary factual predictor and one residual correction: no paired counterfactual data, additional parameters, explicit disturbance inference, or retraining. We call the resulting predictor a counterfactual world model. On the boat of , it shifts the world model’s prediction for the new heading by the drift that the current caused in the observed event (from the green to the orange outline in the bottom-right frame), and follows the true counterfactual (orange against dotted).

In additive worlds, residual reuse is the unique counterfactual rule that is exact for every factual transition (). Outside this regime, its error is governed by the interaction between actions and hidden disturbances, quantified by the mixed derivative of the dynamics (). For short physical transitions with separate action and disturbance channels, this interaction is second-order in the time step hh, leaving only an O(h2)O(h^{2}) fraction of the disturbance uncertainty unexplained ( and ). This guarantee extends through smooth representations and to systems with hidden velocities (). The rate cannot be uniformly improved: we establish a matching minimax lower bound, with the sharp leading constant, for estimators using unpaired factual transitions and one observed outcome (). Residual reuse therefore achieves the best possible asymptotic rate under the stated information and physical assumptions. How short is short enough depends on the system, and we measure it (). The same analysis identifies the limits of residual reuse: disturbances that scale the command, discontinuous contacts, and folded representations can invalidate it.

Residual correction is familiar in control theory, where disturbance observers, offset-free model predictive control, and iterative learning control reuse errors from observed trajectories [39, 35, 41, 2, 11]. Likewise, additive-noise structural causal models provide a classical route to individual counterfactuals [44, 45]. What has remained unclear is why this construction should be justified for learned world models, what can be recovered without paired counterfactual observations, and whether the principle survives nonlinear representations learned from pixels. Our analysis connects the identification problem of causal inference, the disturbance structure of control, and the representations of modern world models. In particular, factual training of the predictor is sufficient under the stated shared-input conditions, without additional propensity weighting or encoder retraining (, and ).

We test these claims using rendered physical simulators and frozen self-supervised image encoders, DINOv2 [40] in two sizes and masked autoencoders (MAE) [23], and repeat the main comparison with four further frozen encoders, DINOv3 [56], SigLIP 2 [58], CLIP [50] and EVA-02 [16]. We score predicted physical quantities, such as joint angles and positions, by their R2R^{2} against the true counterfactual outcome, i.e., the fraction of its variance they explain (physical counterfactual R2R^{2}). On four environments, with DINOv2 and MAE, counterfactual world models improve physical counterfactual R2R^{2} from 3838–46%46\% to 8686–96%96\% using the same factual predictors, with the correction applied after a readout of these quantities fitted on factual frames; applied to the image features themselves, which needs no state labels, it reaches 7373–94%94\%. On the fifth, the BlueROV2 underwater vehicle, they reach 9090–94%94\% with sixteen times more factual data. They outperform even an oracle predictor that knows the true simulator and its full state, but not the disturbance that occurred, and therefore predicts the average outcome. With the four further encoders, correction after the readout reaches 8181–95%95\% on the first four environments. In hindsight planning, the counterfactual model reaches the goal in 3535–69%69\% of events, compared with 1414–23%23\% for the true-simulator planner without access to the observed outcome. The experiments also recover the predicted failure modes, including contacts, folded coordinates, and disturbances that multiply the command. These results demonstrate that the observed outcome can be more informative for individual counterfactual reasoning than an otherwise perfect predictive model.

Our contributions are threefold.

  • First, we establish the nonidentification of individual counterfactuals from factual world models, including a minimax impossibility result and an explicit gauge ambiguity that persists even with exact factual likelihoods: the latent noise of a generative model can be relabeled separately for each action without changing any factual prediction ().
  • Second, we derive residual reuse from the short-time structure of physical dynamics, prove its exactness under additivity, characterize its interaction error and failure modes, and establish its minimax rate-optimality from unpaired factual data ( and ).
  • Third, we validate the resulting counterfactual world models from pixels, across seven frozen image encoders, physical disturbances, hindsight-planning tasks, and controlled violations of the assumptions ().

References (62)