TL;DR
To build generalist reinforcement learning agents that can handle multiple environments and goals without explicit task labels, what do they actually need to remember? This paper proves mathematically that any agent achieving near-optimal performance across diverse domains must store domain-distinguishing information in its memory when facing observational bottlenecks. Furthermore, if this memory is rich enough to predict values for different goals, it implicitly contains a decodable local world model of the environment's dynamics.
What Problem Does This Paper Address?
As reinforcement learning (RL) moves toward "generalist agents" capable of handling multiple tasks across different environments, understanding the internal representations of these agents becomes crucial. Previous work established that agents need "world models" (causal or transition models) to perform well across diverse goals if they are given an explicit task or domain index. However, in reality, generalist agents often don't get a label telling them which environment they are currently in; they must infer it purely from their history of observations and actions.
This paper tackles a fundamental question: What must an agent's memory implicitly encode to act competently across different goals and unindexed domains? Specifically, when different environments look identical initially (an observational bottleneck) but require completely different actions to succeed, how does a successful agent's memory behave, and can we extract a local world model from it?
Methods
The authors formalize the problem using a latent-domain partially observable Markov decision process (POMDP) framework, where the environment domain is fixed but hidden from the agent. They provide two main theoretical contributions:
- Theorem 1 (Representation Separation): A control-theoretic proof showing that if two domains require different optimal actions at a shared "bottleneck" state, any uniformly near-optimal policy must induce distinct memory distributions for those domains at that bottleneck. This establishes memory-level separation as a mathematical necessity.
- Theorem 2 (Approximate Decoder Existence): An identification-by-tests argument showing that if an agent's memory is "value-sufficient" (meaning it can accurately predict optimal action-values for a rich enough set of auxiliary probe goals), then a decoder exists that can approximately reconstruct the local interventional dynamics (transition kernel) of the environment from that memory alone.
Datasets
The authors evaluate their theory using a custom-designed, minimal controlled environment called ForkWorld.
- ForkWorld: A T-junction gridworld where an agent starts in a corridor and moves toward a fork (the bottleneck state $s^\dagger$). Beyond the fork, the agent must choose to go up or down to reach a goal ($G_{\text{up}}$ or $G_{\text{down}}$). Crucially, the vertical action mapping is either
NORMAL(up goes up, down goes down) orSWAPPED(up goes down, down goes up) depending on the hidden domain. The agent must infer the domain by making a probe move or observing its trajectory, as the domain index is not provided.
Key Insights and Ideas
- Near-optimality forces representation separation: Memory separation isn't just a nice feature of certain algorithms; it is a mathematical requirement for success. If an agent performs well across domains with conflicting action requirements, its memory must distinguish them.
- Asynchronous memory comparison: The separation theorem doesn't compare memory at the same clock time, but rather at the same bottleneck state, meaning the agent's memory tracks context rather than just time steps.
- Value sufficiency implies world models: You don't need an explicit world-modeling loss to learn a world model. If an agent learns to predict values across a diverse enough set of goals, a local transition model can be directly decoded from its internal memory state.
Key Results
The authors compared several agent architectures, including memoryless DQN, Stacked DQN (with a short history window), and Deep Recurrent Q-Networks (DRQN).
- Memoryless agents fail completely: Memoryless DQN achieved an overall success rate of only 19%, falling far below even a random-guessing baseline of 50%. Conflicting gradient signals at the bottleneck state prevent the Q-function from converging to a stable preference.
- Memory-equipped agents succeed: Stacked DQN (88% success) and DRQN variants (75%–78% success) successfully learned to infer the domain from trajectory context.
- Linear Probing Confirms Separation: A linear probe trained to predict the hidden domain from the agents' internal memory achieved ~97–100% accuracy on subsequent visits to the bottleneck state, confirming Theorem 1.
- Transition Decoding Works: Using a two-layer MLP decoder, the authors successfully reconstructed local transition dynamics from the memory of DRQN agents, reducing fork-state prediction error significantly compared to a majority-class baseline (e.g., from 0.46 down to 0.17 for DRQN states), validating Theorem 2.
Limitations and Future Work
- Local vs. Global World Models: Theorem 2 guarantees the decodability of local transition dynamics (on reachable states), but does not imply that a full, global world model can be reconstructed for unvisited or distant states.
- Simplicity of the Experimental Setup: While ForkWorld perfectly isolates the theoretical assumptions, it is a small, discrete gridworld. Testing these theorems in complex, continuous, or high-dimensional environments (like 3D simulators or robotic tasks) remains an open area for empirical validation.
- Constructive Algorithms: The paper proves that a decoder exists, but does not provide a specific algorithmic recipe for how to best shape or regularize memory representations during training to maximize generalist capabilities.
Summary updated