NYU's Look Back Beats REINFORCE by 57% Using Counterfactual World Models
A new policy gradient method uses counterfactual world models to separate action effects from environmental luck, cutting variance in noisy, complex environments.
Takeaways
- NYU team introduces Look Back, a policy gradient method using counterfactual world models as baselines.
- Counterfactual world models edit observed trajectories under new actions while keeping environmental randomness fixed.
- RLB proven unbiased under any consistent structural causal model; identifiability is unnecessary for RL.
- Tested on bandits, 60-agent big worlds, credit assignment, and pixel-based Chrome Dino with diffusion world model.
- On Chrome Dino, RLB reaches 113.9 mean score versus 72.4 for REINFORCE with lower variance.
- Code available on GitHub; method underperforms when action effects themselves are hard to predict.
In stochastic environments, where identical actions can produce different outcomes, reinforcement learning agents struggle to separate sound decisions from favorable randomness. NYU researchers address that credit-assignment problem in Look Back: Reinforcement Learning with Counterfactual World Models (preprint) by editing recorded trajectories: the model substitutes alternative actions while preserving the environmental randomness inferred from the original experience.
The paper introduces REINFORCE Look Back, or RLB, which uses returns from those counterfactual trajectories as policy-gradient baselines. Shared randomness helps cancel noise that affected both the observed and edited trajectories, producing a cleaner estimate of each action’s contribution. The approach is most useful when action effects are easier to predict than the environment’s full evolution. The authors have also published a repository with their implementation.
A Smaller Prediction Target
Conventional model-based reinforcement learning trains a model to simulate future states and rewards, then uses those synthetic rollouts for planning or policy updates. In a large, noisy environment, the model must reproduce action effects, background dynamics, and random events. Prediction errors can accumulate across rollout steps, while newly sampled randomness makes returns vary for reasons unrelated to the policy.
A counterfactual world model starts from an observed transition and asks how it would have changed under another action with the latent environmental noise held constant. This narrower target lets the model concentrate its capacity on action-dependent changes. Background events that occurred in the original trajectory remain aligned across the factual and counterfactual versions.
How Shared Randomness Cuts Variance
REINFORCE estimates a policy gradient by weighting an action’s log probability with its return or advantage. High return variance produces noisy updates and increases the number of samples needed for learning. Baselines reduce that variance by subtracting a reference return without changing the expected gradient.
Grouped methods such as RLOO and GRPO form references from multiple sampled rollouts associated with the same prompt or starting condition. RLB builds on that idea but obtains comparison returns from counterfactual edits of an observed rollout. At a high level, training proceeds as follows:
- Collect a trajectory with the current policy.
- Infer the latent noise associated with the observed transitions.
- Substitute alternative actions while preserving that inferred noise.
- Predict the resulting counterfactual states, rewards, and returns.
- Use the counterfactual returns as baselines for the policy-gradient update.
Because each comparison shares the original trajectory’s random events, return differences can reflect the substituted actions more directly. The variance reduction depends on the counterfactual model capturing those action effects accurately.
Causal Ambiguity Does Not Bias the Gradient
Observed transition data do not uniquely identify a structural causal model, which specifies how state, action, and latent noise combine to produce the next state. Several causal models can match the same transition distribution while producing different answers to a same-noise counterfactual query.
The paper proves that RLB’s policy-gradient estimator remains unbiased under any consistent structural causal model. The selected model can still change the estimator’s variance, so causal ambiguity affects efficiency even when it does not shift the expected update.
This result allows the method to use general invertible world models. With a diffusion model, for example, the system can invert an observed transition into latent noise and then denoise under a substituted action. The paper argues that this construction can turn diffusion models trained on unpaired data into counterfactual models.
Four Tests of the Same Idea
The evaluation spans simple controlled tasks and a pixel-based game, allowing the authors to vary environmental noise and model difficulty.
| Environment | What it tests | Reported finding |
|---|---|---|
| High-noise bandits | Whether shared randomness improves action-value comparisons | Counterfactual baselines reduce gradient noise when rewards contain substantial environmental variance. |
| Multi-agent bandit | How learning changes as up to 60 other agents add uncontrollable variation | RLB retains an advantage as the surrounding “big world” becomes harder to predict. |
| Sequential credit assignment | Whether the method can attribute delayed outcomes to earlier actions | Counterfactual returns improve policy learning when action-dependent changes remain predictable. |
| Chrome Dino | Whether a diffusion model can support counterfactual learning from pixels | RLB reaches a reported mean score of 113.9, compared with 72.4 for standard REINFORCE, with lower variance across runs. |
Where the Method Reaches Its Limits
RLB’s gains depend on a specific asymmetry: environmental evolution must be harder to predict than the effect of changing an action. When action effects are themselves unstable or poorly modeled, the counterfactual returns provide a weak baseline and can offer little variance reduction.
- Model error: inaccurate counterfactual edits can increase variance even when the estimator remains unbiased under the paper’s assumptions.
- Causal coupling: different consistent structural models preserve unbiasedness but may produce substantially different variance.
- Compute cost: each update requires model inversion and multiple counterfactual predictions.
- Evaluation scope: the pixel-based evidence comes from Chrome Dino, while the remaining experiments use controlled environments.
- Research status: the results are reported in a preprint and have not completed peer review.
For implementation decisions, the useful diagnostic is the source of return variance. Environments dominated by exogenous events offer RLB room to cancel shared noise and focus model capacity on action-dependent changes. Environments dominated by unpredictable action effects demand a stronger counterfactual model before the added computation is likely to pay off.