Machine learning researchers have created a technique that enables world models to infer how objects will behave without being trained for every possible outcome, according to a pre-print paper by Randall Balestriero of Brown University and AMI Labs, Kerda Varaku, and Turing Award winner Yann LeCun of NYU and AMI Labs, expected to be released on ArXiv this week. The approach, called counterfactual world models, allows robots and other physical AI systems to predict alternative scenarios by analyzing the gap between what they expected and what actually happened. World models currently train robots to navigate the real world by predicting the consequences of actions based on observed data, but they struggle to anticipate events that didn't occur.

The researchers tested their method in simulated tasks where robots attempted to reach goals after unexpected events like hidden currents or weak motors disrupted their initial attempts. When choosing actions using the counterfactual world model, robots successfully reached their targets in 35 to 69 percent of events, compared to just 14 to 23 percent for a planner that knew the true simulator but ignored what had been observed. With two additional attempts on the same event, success rates climbed to 51 to 97 percent. The technique can be applied to any world model that predicts the average next state under any action, though Joint Embedding Predictive Architecture models developed by LeCun and colleagues in 2023 are particularly well suited for adaptation. The experiments used off-the-shelf encoders without fine-tuning, requiring only a small predictor trained on top and minor additions to create a counterfactual world model.

"In causal inference, answering 'What would have happened had I acted differently?' takes three steps," Balestriero explained in an email. "You use what you observed to learn something about those hidden factors, you change the action, and you predict again with the hidden factors kept exactly as they were. Our counterfactual world model does all three steps with one subtraction." The paper illustrates this with a boat crossing a river: if the world model predicted where the boat would end up after steering left, but it actually ended up two meters further downstream, those two meters reveal the hidden current's effect. To answer where the boat would be if it had steered right instead, the model takes its prediction for steering right and adds the same two meters—in other words, the counterfactual equals what actually happened plus the difference between the model's predictions for the alternative action and the action taken. The researchers prove that the fraction of the disturbance's effect this rule gets wrong shrinks with the square of the time step, and that no method using the same ordinary data can perform better than this rate in the worst case.

The technique works because of a physics principle embedded in Gottfried Leibniz's axiom "nature makes no leaps," which the researchers use to justify their approach. Over short time intervals, the effect of an action and the effect of a hidden disturbance each grow in proportion to duration, while their interaction grows only with the square of duration, meaning they simply add up like forces over short steps. This eliminates the need for a learned component that infers hidden disturbances—an approach the researchers initially tried but found too fragile because hidden noise can be relabeled differently for each action without changing predictions, making it impossible for data alone to determine the right labeling. The missing piece comes from outside the data: for physical systems, it comes from the fact that forces add and their interaction builds up slowly over time, meaning the gap between what happened and what was predicted already carries the information needed.

Balestriero sees three likely uses for counterfactual world models: having robots retry actions after surprise events, adapting to persistent faults like miscalibrated motors, and helping people understand failures. "World models are trained to predict, and they are getting good at it," Balestriero said. "But a robot, a car or a drone acting in the real world is constantly surprised by things it could not see coming. After a surprise, the useful question is no longer what was expected, but what would have happened had it acted differently in that same situation." The paper connects causal inference, control theory, and world models in a way that explains what can and cannot be recovered without paired data and where the approach breaks down—questions that control engineers have addressed for decades when tuning hand-built models, but which hadn't been answered for learned world models that perceive the world through images. The shift from relying purely on exhaustive training to incorporating real-time inference could reshape how autonomous systems handle unpredictable environments, though the gap between controlled simulations and messy real-world deployment will test whether the mathematical elegance translates to practical reliability.