Inverting the Bellman Equation: From Q-Values to World Models

MATS Fellow:

Alistair Letcher

Authors:

Alistair Letcher, Mattie Fellows, Alexander D. Goldie, Jonathan Richens, Jakob N. Foerster, Oliver Richardson

Citations

Citations

Abstract:

Model-based and model-free reinforcement learning are traditionally viewed as separate paradigms: instead of learning a model of the transition kernel P, model-free agents typically estimate value functions tied to a specific policy and reward. In this paper, we challenge this dichotomy by proving that value-based agents trained on a sufficiently rich set of reward functions, e.g. using goal-conditioned RL, implicitly encode a unique and accurate world model. To extract this model in practice, we introduce P-learning, an inverse analogue to Q-learning that samples from an agent's Q-values, policies and rewards to decode its internal model of the environment. We then provide sufficient conditions on the type and number of goals for which agents encode the true kernel P, covering both stochastic and deterministic MDPs over finite or continuous state spaces. Even when our assumptions are violated, we empirically demonstrate that agents trained on a handful of reward functions encode accurate dynamics in 𝚁𝚎𝚊𝚌𝚑𝚎𝚛, 𝙼𝚘𝚞𝚗𝚝𝚊𝚒𝚗𝙲𝚊𝚛 and stochastic variants of 𝙵𝚘𝚞𝚛𝚁𝚘𝚘𝚖𝚜. Surprisingly, we find that policies trained exclusively on a Reacher agent's implicit world model are quasi-optimal on out-of-distribution, velocity-based goals despite position-only training -- suggesting that agents contain hidden generalisation capabilities and providing a new lens into the connection between model-based, model-free, and goal-conditioned RL.

Recent research

Inverting the Bellman Equation: From Q-Values to World Models

Authors:

Alistair Letcher

Date:

June 19, 2026

Citations:

Diffuse AI Control on Fuzzy Tasks

Authors:

Mikhail Terekhov

Date:

June 8, 2026

Citations:

Frequently asked questions

What is the MATS Program?
How long does the program last?