Reinforcement Learning Under Partial Observability Guided by Learned Environment Models

Edi Muskardin, Martin Tappler, Bernhard K. Aichernig, Ingo Pill

TL;DR

This paper introduces $Q^A$-learning, a novel framework that tackles reinforcement learning in partially observable environments (POMDPs) by pairing model-free Q-learning with passive automata learning. Instead of relying on computationally heavy recurrent neural networks (LSTMs) or arbitrary history windows, it dynamically learns a discrete Markov Decision Process (MDP) model of the environment and uses its states to expand the agent's observation space, drastically reducing training time while outperforming state-of-the-art deep RL baselines.

What Problem Does This Paper Address?

In standard reinforcement learning (RL), agents assume full observability—meaning the current sensor reading provides all the context needed to choose an optimal action. However, real-world applications are rarely so simple. Most problems are Partially Observable Markov Decision Processes (POMDPs), where sensor data is incomplete or ambiguous (for example, knowing you are in "Room 1" but not knowing your exact coordinates within it).

To overcome this lack of immediate context, modern deep RL algorithms typically use memory mechanisms, such as stacking a fixed history of past frames or utilizing Recurrent Neural Networks (like LSTMs). While effective, these approaches come with significant downsides: they require heavy hyperparameter tuning, are slow to train, and struggle to explicitly map out the underlying structure of the environment. Traditional state-estimation methods exist but often require unrealistic prior knowledge, such as knowing the exact number of hidden states beforehand.

Methods

The authors propose $Q^A$-learning, an approach that combines standard tabular $\epsilon$-greedy Q-learning with IoAlergia, a passive automata learning algorithm.

Instead of maintaining a continuous hidden memory state, $Q^A$-learning builds an explicit, discrete map of the environment on the fly:

  1. Trace Collection: As the agent explores the environment, it records its execution traces (sequences of actions and observations, ignoring rewards).
  2. Automata Learning: Periodically, the IoAlergia algorithm processes these traces to construct a deterministic labeled MDP that approximates the environment's underlying "Belief MDP" (as illustrated in the hot beverage example below).
  3. State Space Extension: The agent's Q-table is dynamically re-initialized using an extended state space: a combination of the raw environment observation and the abstract state of the newly learned automaton.
  4. Handling the Unknown: If the agent encounters an unmapped action-observation pair, the simulation enters an "undefined" state ($\bot$). Crucially, the Q-learning updates naturally guide the agent back toward these undefined zones, encouraging targeted exploration to refine the model in subsequent iterations.
A POMDP example of a vending machine producing hot beverages based on sequential coin and button actions.

Datasets

The approach was evaluated on four custom-designed, discrete, partially observable synthetic grid-world benchmarks:

  • OfficeWorld: A grid environment where the agent only observes the room number rather than its exact $(x,y)$ coordinates.
  • ConfusingOfficeWorld: A more challenging variation where multiple distinct rooms yield identical observations, requiring the agent to remember its historical trajectory to differentiate them.
  • GravityDomain: An environment where gravity randomly pulls the agent down unless it navigates to a specific blue toggle switch to deactivate it.
  • ThinMaze: A highly restricted maze where the agent's only observations are "cookie" (the goal) or "wall" (when an action is blocked).
The layout of the standard OfficeWorld (left) vs. the partially observable version (right).

Key Insights and Ideas

  • Automata as Interpretable Memory: Instead of implicitly storing history in a black-box neural network vector, $Q^A$-learning uses the discrete states of a learned automaton. This provides an explicit, human-readable representation of what the agent "remembers."
  • Exploration via Model Deficiencies: The integration between the RL agent and the automaton learner creates a beneficial feedback loop. When the model is incomplete (resulting in an undefined $\bot$ state), the Q-value updates naturally incentivize the agent to revisit these areas, automatically gathering the exact traces needed to fix the model during the next update.
  • Taming Infinite Belief Spaces: Even when a POMDP mathematically maps to an infinite Belief MDP, the authors demonstrate that a finite sample size allows IoAlergia to extract a compact, finite approximation that is entirely sufficient for finding optimal control policies.

Key Results

The authors benchmarked $Q^A$-learning against six state-of-the-art deep RL baselines from stable-baselines (three using stacked-frame histories and three using LSTM-backed policies).

  • Robustness to Ambiguity: $Q^A$-learning successfully solved all four environments. In contrast, all six deep RL baselines completely failed to solve ConfusingOfficeWorld and ThinMaze within the 30,000-episode training limit.
  • Optimal vs. Sub-optimal Policies: In the GravityDomain, baseline methods settled for a sub-optimal policy (simply spamming the "up" action, yielding a 50% success rate). $Q^A$-learning successfully learned the optimal sequence: navigate to the toggle switch first, then head to the goal.
  • Massive Speedups: In the standard OfficeWorld setup, $Q^A$-learning converged in just 3 seconds. The deep RL baselines took anywhere from 48 to 373 seconds to train, making the proposed method orders of magnitude faster due to the simplicity of tabular Q-learning.
The layouts for ConfusingOfficeWorld (left) and ThinMaze (right), both of which defeated the deep RL baselines.

Limitations and Future Work

While highly effective for these benchmarks, the primary limitation of $Q^A$-learning is its reliance on discrete action and observation spaces. The underlying IoAlergia algorithm scales cubically with sample size in the worst-case scenario, meaning it cannot currently be applied directly to continuous environments or high-dimensional inputs like raw video frames.

To address this, the authors point to two promising future directions:

  1. Scaling the framework to deep RL architectures by feeding the discrete automaton states directly into deep Q-networks or actor-critic models.
  2. Exploring and developing advanced automata-learning techniques capable of natively handling high-dimensional and continuous data distributions.

Summary updated

BibTeX
@inproceedings{muskardin2023reinforcement,
  author = {Edi Muskardin and Martin Tappler and Bernhard K. Aichernig and Ingo Pill},
  title = {{Reinforcement Learning Under Partial Observability Guided by Learned Environment Models}},
  booktitle = {iFM},
  year = {2023},
  doi = {10.1007/978-3-031-47705-8\_14},
}
Figure