Learning first-order Markov models for control

Pieter Abbeel, Andrew Y. NgNeurIPS 2004

This paper, authored by robotics and AI pioneers Pieter Abbeel and Andrew Y. Ng, addresses a fundamental flaw in how we typically train Markov models for reinforcement learning and control.

TL;DR

Standard Maximum Likelihood (ML) estimation for Markov models is "short-sighted," focusing only on one-step transitions and failing when systems have hidden long-term dependencies. This paper proposes a new training objective and an efficient EM algorithm that accounts for multi-step interactions, resulting in models that produce much safer and more effective control policies in non-Markovian environments.

What Problem Does This Paper Address?

In reinforcement learning, we often model the world as a Markov Decision Process (MDP). The "Markov property" assumes that the future depends only on the current state, not the past. However, real-world systems are rarely perfectly Markovian—they often have hidden states, sensor lag, or temporally correlated noise.

When we don't know the system's dynamics, we usually estimate them from data using Maximum Likelihood Estimation (ML). ML looks at a sequence of states and tries to maximize the probability of the very next state ($s_{t+1}$) given the current one ($s_t$).

The authors point out a major "aha!" problem: if a system has long-range correlations (e.g., a gust of wind that lasts for 10 seconds rather than 1), an ML-trained model will ignore these correlations. It will assume the noise at each step is independent. Consequently, the model will drastically underestimate how far the system might drift over time, leading an autonomous agent to take "risky" actions because it overestimates its own control.

Methods

The authors propose shifting the optimization goal from one-step prediction to multi-step accuracy.

  1. The New Objective: Instead of just maximizing $\log P(s_{t+1} | s_t)$, they maximize a discounted sum of log-probabilities for states $k$ steps into the future: $$\sum_t \sum_k \gamma^k \log P(s_{t+k} | s_t)$$ where $\gamma$ is the discount factor. This forces the model to be accurate over the same time horizons that the reward function cares about.

  2. The EM Algorithm: Because calculating $P(s_{t+k} | s_t)$ for a first-order model involves marginalizing over all possible intermediate paths, the authors derive an Expectation-Maximization (EM) algorithm.

  3. Computational Efficiency: A naive implementation of this objective would be $O(T^3)$, which is too slow for large datasets. The authors introduce a "forward-backward" message-passing scheme and show that by truncating the horizon ($H$) and counting state-triple occurrences, the complexity drops to $O(|S|^2 H^2)$. This makes the training time independent of the total sequence length $T$ after an initial pass.

Datasets

The paper evaluates the algorithm on two synthetic but highly illustrative control problems:

  • Correlated Grid-World: A navigation task where "noise" (unintended movement) is temporally correlated. If the agent slips once, it is likely to keep slipping in the same direction for several steps.
  • Bursty Queueing System: A service queue where customers arrive in "bursts" (driven by a hidden high/low arrival state). The agent must choose between different service speeds with varying costs and rewards.

Key Insights and Ideas

  • ML is "Short-Sighted": The core insight is that ML is a generative criterion that doesn't necessarily align with the discriminative task of control. If your model is "wrong" (i.e., the world isn't truly first-order Markov), ML will fail to capture the "effective" uncertainty of the system.
  • The "Effective Noise" Phenomenon: In experiments, the new algorithm essentially "tricks" the first-order model into adopting a higher noise variance. By doing so, the resulting MDP policy becomes more cautious, avoiding narrow paths where a sequence of correlated slips would lead to a crash.
  • Alignment of Time Scales: By using the same discount factor $\gamma$ in the training objective as in the control objective, the model's predictive accuracy is optimized for the specific "look-ahead" distance that matters for maximizing rewards.

Key Results

Experimental results showing the grid-world setup and utility comparisons.
  • Shortest vs. Safest Path: In the grid-world (panel a), the ML-based agent consistently chose a "short but narrow" path (Path A) and failed because it didn't realize how much it would drift. The proposed algorithm chose the "long but wide" path (Path B), achieving significantly higher utility.
  • Superiority in Correlation: As the temporal correlation of the noise increased (panels b and c), the performance gap between the new algorithm and ML widened. When the system was perfectly Markovian, both performed similarly, but the new algorithm was much more robust to non-Markovian "burstiness."
  • 100x Speedup: The optimized version of their EM algorithm reduced the time for a single iteration on the queueing problem from 6 minutes to 3 seconds.

Limitations and Future Work

  • State Space: The paper focuses on finite (discrete) state spaces. While the theory holds for continuous spaces, the specific EM implementation using message passing would require adaptation (e.g., using function approximators or kernels).
  • Exploration Policies: To maintain computational efficiency when actions are involved, the authors suggest using a combination of deterministic exploration policies.
  • Real-World Application: While the paper concludes with a mention of applying these ideas to autonomous RC cars, those specific results were deferred to future work (which later became a cornerstone of Abbeel's work in helicopter and car autonomy).

Summary updated

BibTeX
@inproceedings{abbeel2004learning,
  author = {Pieter Abbeel and Andrew Y. Ng},
  title = {{Learning first-order Markov models for control}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2004},
}
Figure