Constructing basis functions from directed graphs for value function approximation

Jeffrey Johns, Sridhar MahadevanICML 2007

Reinforcement Learning (RL) agents rely on accurate representations of their environment to learn optimal policies. In large or continuous state spaces, storing a value for every single state is intractable, necessitating linear function approximation via basis functions. While recent approaches successfully use the eigenvectors of undirected graph Laplacians as these basis functions, this paper argues that undirected graphs fail to capture the dynamics of non-reversible Markov Decision Processes (MDPs). By utilizing directed graphs, the authors demonstrate a superior method for modeling environments with "one-way streets," leading to faster and more accurate learning.

The Problem with Undirected Graphs

Traditional methods construct a state-space graph and use its undirected Laplacian to generate basis functions. This inherently assumes reversibility: if an agent can transition from state A to B, the model assumes it can transition from B to A just as easily.

However, many real-world MDPs are non-reversible (e.g., a robot dropping off a ledge, or an inverted pendulum falling past a point of no return). Undirected models artificially "smooth" the value function across these irreversible transitions. When the true value function contains a sharp cliff or discontinuity, this smoothing creates a blurry representation that degrades the agent's policy.

Methodology: Directed Graph Laplacians

To address this, the authors employ the directed graph Laplacian, incorporating the environment's actual "flow."

  1. Graph Construction: A directed graph is built where vertices are states and edges represent valid, directional transitions. In continuous domains, a greedy subsampling approach prunes edges that do not align with possible actions.
  2. The Perron Vector ($\psi$): Unlike undirected graphs, directed graphs require computing the invariant distribution (the Perron vector) of a random walk. This vector captures the long-term probability of the agent occupying any given state, weighting the approximation toward regions where the agent spends the most time.
  3. Symmetrization: To ensure real eigenvalues and orthogonal eigenvectors for tractable computation, the directed graph is symmetrized using the formula $\frac{1}{2}(\Psi P + P^T \Psi)$, where $\Psi$ is a diagonal matrix of the Perron vector and $P$ is the transition matrix.
  4. Policy Iteration: These directed basis functions are integrated into the Representation Policy Iteration (RPI) framework to find the optimal policy.

Experiments and Key Results

The authors evaluated their approach on two benchmark domains characterized by non-reversible dynamics.

Discrete Two-Room Grid World

This 200-state environment features two rooms connected by one-way doorways, creating a massive discontinuity in the value function. The directed Laplacian basis reached near-optimal performance with only 30 basis functions, successfully representing the "jump" in value at the one-way door. In contrast, the undirected version forced values on both sides of the door to be similar, resulting in lower rewards and higher variance even with 50 basis functions.

Grid World Performance

Continuous Inverted Pendulum

Balancing a pole on a cart is inherently non-reversible; past a certain angle, the pole cannot be recovered. The directed approach captured these "tipping point" dynamics effectively. It learned to balance the pole for the maximum time (3000 steps) in as few as 20 training episodes. The undirected version required over 100 episodes to reach the same level of stability and exhibited much higher performance swings between runs.

Inverted Pendulum Performance

Limitations and Future Work

  • Scalability: Computing the Perron vector and eigenvectors for massive graphs (millions of states) remains computationally expensive. The authors propose using Kronecker products to factorize large transition matrices as a potential solution.
  • Teleporting Assumption: To guarantee the graph is "strongly connected" (a mathematical requirement for the invariant distribution), the method uses a PageRank-style "teleporting" random walk. The choice of the teleportation parameter ($\eta$) is a heuristic that can influence performance.
  • Theoretical Links: Future work aims to explore the formal theoretical relationship between the invariant distribution and the Bellman equation to better explain why this specific symmetrization is so effective.

Summary updated

BibTeX
@inproceedings{johns2007constructing,
  author = {Jeffrey Johns and Sridhar Mahadevan},
  title = {{Constructing basis functions from directed graphs for value function approximation}},
  booktitle = {International Conference on Machine Learning},
  year = {2007},
  url = {https://openreview.net/forum?id=rkZWA5W_WB},
}
Figure