In reinforcement learning, an agent’s success depends on its ability to solve the credit assignment problem: determining which past actions are responsible for current rewards. Traditionally, we solve this by looking forward. We estimate a value function—the expected sum of future rewards—and use temporal difference (TD) learning to bootstrap our way to an answer.
However, a growing body of research suggests that looking only at the future is half the story. By learning to predict the past—a concept known as retrospective or bidirectional value estimation—agents can build more robust representations and assign credit more effectively, especially when using deep neural networks.
The Problem with Stale Gradients
The standard tool for credit assignment is the eligibility trace, often denoted as TD($\lambda$). It maintains a memory of which states were recently visited, allowing rewards to be propagated backward in time. While elegant in linear systems, Dhawal Gupta, Emma Jordan, and their colleagues argue in From Past to Future: Rethinking Eligibility Traces that this approach falters in deep RL.
The issue is "staleness." Eligibility traces rely on gradients calculated at previous time steps. In a deep network, where weights are updated constantly, a gradient from ten steps ago was calculated using a version of the network that no longer exists. This mismatch creates a noisy, unreliable signal for learning.
Grounding the Present in the Past
To fix this, Gupta et al. propose bidirectional value functions. Instead of just predicting the discounted sum of future rewards, the agent also learns to predict the discounted sum of past rewards accumulated to reach the current state.
Why does predicting the past help you navigate the future? It acts as a powerful auxiliary task. To accurately predict how it arrived at a state, a neural network must develop a rich internal representation of that state's historical context. This "hindsight learning" forces the model to encode features that are descriptive of the trajectory, leading to more stable and accurate predictions of future outcomes. In effect, the backward-looking objective grounds the current state in its history, providing a richer signal than forward-looking rewards alone.
From Single Paths to Expected Histories
While bidirectional value functions focus on rewards, we can also look backward at the states themselves. In Predecessor Features, Duncan Bailey introduces a way to estimate the "expected history" of an agent.
This approach builds on the Successor Representation (SR), which maps a current state to the states it is likely to visit in the future. Bailey demonstrates that by transposing the SR matrix, an agent can estimate the occupancy of states that preceded the current one.
This is a significant shift in intuition. Traditional credit assignment is often restricted to the single trajectory the agent just experienced. Predecessor features allow the agent to assign credit across a distribution of all possible paths that could have led to the current state. This enables a more generalized form of credit assignment that isn't tied to the luck of a specific sample.
Symmetry in Learning
The tools we use to predict the future are surprisingly well-suited for predicting the past. Ray Jiang, Shangtong Zhang, and Hado van Hasselt explore this symmetry in Learning Expected Emphatic Traces for Deep RL.
They focus on "emphatic weightings," a method used to stabilize off-policy learning (learning from data generated by a different policy). Calculating these weightings typically requires knowing the history of a state. To make this work with non-sequential data from a replay buffer, they apply TD learning in reverse time.
By treating the "preceding state" as the "next state" in a reversed Markov chain, the agent can learn to predict its own historical importance. This confirms a core intuition of this research direction: retrospective properties—like how much a state contributed to past transitions—can be optimized using the same recursive tools we use for prospective rewards. By turning the arrow of time around, we gain the stability needed to learn from complex, shuffled experience.