How memory architecture affects learning in a simple POMDP: the two-hypothesis testing problem

Mario Geiger, Christophe Eloy, Matthieu Wyart · DOI

Abstract

Reinforcement learning is generally difficult for partially observable Markov decision processes (POMDPs), which occurs when the agent's observation is partial or noisy. To seek good performance in POMDPs, one strategy is to endow the agent with a finite memory, whose update is governed by the policy. However, policy optimization is non-convex in that case and can lead to poor training performance for random initialization. The performance can be empirically improved by constraining the memory architecture, then sacrificing optimality to facilitate training. Here we study this trade-off in a two-hypothesis testing problem, akin to the two-arm bandit problem. We compare two extreme cases: (i) the random access memory where any transitions between $M$ memory states are allowed and (ii) a fixed memory where the agent can access its last $m$ actions and rewards. For (i), the probability $q$ to play the worst arm is known to be exponentially small in $M$ for the optimal policy. Our main result is to show that similar performance can be reached for (ii) as well, despite the simplicity of the memory architecture: using a conjecture on Gray-ordered binary necklaces, we find policies for which $q$ is exponentially small in $2^m$, i.e. $q\simα^{2^m}$ with $α< 1$. In addition, we observe empirically that training from random initialization leads to very poor results for (i), and significantly better results for (ii) thanks to the constraints on the memory architecture.

Introduction: The Challenge of Partial Observability

In standard Reinforcement Learning (RL), agents typically operate in Markov Decision Processes (MDPs), where the current state is fully observable. However, real-world scenarios are often Partially Observable MDPs (POMDPs), where observations are noisy or incomplete. To navigate these, agents must maintain some form of memory.

A significant hurdle in POMDPs is that adding memory makes the policy space non-convex. When an agent is given a flexible "Random Access Memory" (RAM), the optimization landscape becomes jagged, often causing standard gradient descent to get stuck in mediocre local minima. This paper explores whether constraining the memory architecture—specifically using a "Memento" memory that only tracks recent history—can actually facilitate better learning by smoothing the optimization landscape.

Comparing Memory Architectures

The researchers evaluate two distinct memory models using a two-hypothesis testing problem (a variant of the two-arm bandit):

  1. Random Access Memory (RAM): The agent has $M$ states and complete freedom to transition between them based on observations.
  2. Memento Memory: The agent's memory is a fixed sliding window of the last $m$ actions and rewards. It cannot choose what to store, only how to act based on this fixed history.
Figure 1: Comparison of memory architectures (A, B) and the Column of Confidence Policy (C).

As shown in Figure 1, the Column of Confidence Policy (CCP) is a structured strategy for RAM where the agent moves along a "ladder" of states to build confidence in a specific arm. While theoretically powerful, finding such structured policies from a random start in a flexible RAM space is empirically difficult.

The Necklace Policy for Memento Memory

The paper's core contribution is the Necklace Policy for Memento memory. By leveraging combinatorial "necklaces" (unique cyclic patterns of bits), the authors organize memory states into a chain that mimics a high-resolution belief system.

Figure 2: The Necklace Policy organizes memory states into cyclic patterns to represent confidence levels.

This architecture allows the Memento agent to achieve exceptional efficiency. The error rate $q$ (the probability of pulling the wrong arm) scales as $\alpha^{2^m}$, meaning a small history window can lead to near-perfect performance.

Key Insights and Results

  • The Optimization Paradox: While RAM is theoretically more flexible, its lack of structure makes it a "nightmare" to train from scratch. Memento memory, by contrast, imposes a structure that acts as a form of regularization, allowing agents to consistently find high-performing strategies.
  • Exponential Efficiency: The theoretical performance of the Necklace Policy is remarkable, showing that constrained memory can match or even exceed the practical performance of unconstrained memory by being easier to optimize.
  • Linearity in Strategy: Across both architectures, the most successful policies tend to organize memory states linearly, behaving as if they have an internal "analog" variable for confidence.
  • Empirical Training: When starting from a random initialization, RAM agents almost always failed to find the optimal CCP strategy. Memento agents, however, consistently converged to high-performing "Necklace" strategies, despite the intensity of the search space which required roughly 10,000 CPU hours of experimentation.

Conclusion

The study demonstrates that "less is more" when it comes to memory architecture in POMDPs. By constraining the agent to a fixed history window (Memento), the optimization process becomes significantly more robust. Future work will explore how these "Necklace Policies" scale to more complex, multi-hypothesis environments and their potential integration into recurrent neural networks for deep RL.

Summary updated

BibTeX
@inproceedings{geiger2022how,
  author = {Mario Geiger and Christophe Eloy and Matthieu Wyart},
  title = {{How memory architecture affects learning in a simple POMDP: the two-hypothesis testing problem}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=hxitw01k_Ql},
}
Figure