TL;DR
This paper introduces the Forward-Backward (FB) representation, a novel unsupervised reinforcement learning framework that learns the dynamics of an environment without any reward information. Once trained, it can instantly compute optimal policies for any reward function specified later—including complex combinations of goals and constraints—completely bypassing the need for test-time planning or retraining.
What Problem Does This Paper Address?
Traditional reinforcement learning (RL) agents are specialists: they are trained to maximize a specific, predefined reward function. If the task changes, the agent usually has to be retrained from scratch.
To build more flexible agents, researchers have tried two main approaches, both with significant drawbacks:
- Goal-conditioned RL: Agents learn to reach arbitrary target states, but they cannot adapt online to complex or dense rewards (e.g., "go to state X, but avoid area Y").
- Model-based RL: Agents learn a simulation of the world and plan trajectories at test time. However, generating accurate, high-dimensional state trajectories (like video frames) over long horizons is notoriously difficult and computationally expensive.
The authors ask a fundamental question: Can we learn a compact "summary" of an environment's dynamics during an unsupervised exploration phase that allows us to instantly extract the optimal policy for any reward function specified later?
Methods
The core innovation is the Forward-Backward (FB) representation, which decomposes the environment's successor measure—a predictive occupancy map that quantifies how much time an agent will spend in future states.
Instead of predicting future states explicitly, the framework learns two low-dimensional vector representations into a space $Z \simeq \mathbb{R}^d$:
- Forward representation $F(s, a, z)$: Encodes the future behavior of the agent from state $s$ and action $a$ under a policy parameterized by $z$.
- Backward representation $B(s, a)$: Encodes the ways to reach a state-action pair.
The key mathematical insight is that the dot product $F(s_0, a_0, z)^\top B(s, a)$ approximates the long-term discounted probability of transitioning from $(s_0, a_0)$ to $(s, a)$ under policy $\pi_z$.
The Two-Phase Pipeline:
- Unsupervised Learning Phase: The agent interacts with the environment without any rewards. It uses a temporal difference (TD) learning algorithm to update $F$ and $B$ based purely on state transitions.
- Reward Estimation & Exploitation Phase: When a reward function $r(s,a)$ is introduced, the agent computes a task vector $z_R = \mathbb{E}[r(s,a)B(s,a)]$. The optimal policy is then obtained directly without planning via: $$\pi_{z_R}(s) = \arg\max_a F(s, a, z_R)^\top z_R$$
Datasets
The authors evaluated their approach on four diverse simulated environments:
- Discrete Maze: A classical $11 \times 11$ gridworld with four rooms.
- Continuous Maze: A 2D continuous environment with impassable walls and stochastic transition noise.
- FetchReach: A 10-dimensional virtual robotic arm environment where the agent must move its gripper to a 3D target position.
- Ms. Pacman: A pixel-based Atari environment where states are raw image frames ($84 \times 84 \times 4$ tensors) and goals are defined as coordinates on the screen.
Key Insights and Ideas
- Zero-Shot Task Composition: Because the reward mapping is linear with respect to $B$, you can algebraically combine tasks. For example, to reach target $g_0$ while avoiding obstacles $g_1 \dots g_k$, you can simply set $z_R = B(g_0) - \lambda \sum B(g_i)$. The agent instantly adapts without any extra training.
- No State Synthesis: Unlike model-based RL, FB doesn't waste capacity generating pixels or future states. It only models the relationships between states, making it much more scalable to complex visual inputs like Atari games.
- Spectral Bias as a Feature: Choosing a smaller embedding dimension $d$ forces a low-rank approximation of the environment. This creates an implicit bias toward long-range, spatially smooth behaviors, effectively blurring out local noise while preserving global topology.
Key Results
On standard goal-reaching tasks, the FB representation performs comparably to state-of-the-art goal-oriented baselines like Deep Q-Networks (DQN) with Hindsight Experience Replay (HER), while maintaining the ability to generalize to non-goal rewards.
In the complex pixel-based Ms. Pacman environment, standard DQN completely fails to learn. While DQN requires HER to function, the FB representation matches or exceeds DQN+HER performance and demonstrates superior sample efficiency in the early epochs.
Qualitative Success with Complex Rewards
The authors demonstrated that the agent could immediately solve complex tasks zero-shot:
- Forbidden States: Successfully navigating mazes and Ms. Pacman while actively avoiding specified zones (see Figure 5 and 6).
- Multi-goal Selection: Automatically navigating to the closest of two equally rewarding targets.
Limitations and Future Work
- Exploration Dependency: The unsupervised phase assumes access to a good exploration policy or replay buffer. If the agent doesn't visit a region during exploration, it cannot optimize rewards there.
- Spatial Blurring: A low embedding dimension $d$ can cause the agent to stop slightly short of a exact goal coordinate due to the spatial smoothing effect.
- Variance in Large Spaces: Independent sampling of state-action pairs can lead to high variance in massive environments. The authors suggest combining FB with HER-style replay buffer management in the future to mitigate this.
Summary updated