An Expectation-Maximization Algorithm to Compute a Stochastic Factorization From Data.

André da Motta Salles Barreto, Rafael L. Beirigo, Joelle Pineau, Doina PrecupIJCAI 2015

Abstract

Estimating transition probability matrices for large-scale Markovian systems is a fundamental challenge in reinforcement learning and robotics. Standard Maximum Likelihood Estimation (MLE) via counting requires $O(n^2)$ parameters, leading to high data requirements. This paper introduces the Stochastic Factorization Model (SFM), a latent-variable framework that assumes the transition matrix $P$ can be factored into two smaller stochastic matrices ($P = DK$). We propose the EMSF algorithm, a specialized Expectation-Maximization approach to learn these factors directly from observed transitions. Our results show that EMSF significantly outperforms traditional counting methods in data-starved regimes, achieving superior performance in the game of Blackjack with half the training data.

Introduction

In many real-world applications, systems are modeled using Markov chains or Markov Decision Processes (MDPs). A central component of these models is the transition probability matrix ($P$), which describes the likelihood of moving from one state to another. As the state space $n$ grows, the number of entries to estimate increases quadratically, making standard "counting" methods data-inefficient.

Many real-world transition matrices possess an underlying low-rank structure, meaning they can be factored into two smaller stochastic matrices ($P = DK$). Previously, this "stochastic-factorization trick" required the full $n \times n$ matrix $P$ to be known first. We solve this "chicken-and-egg" problem by learning the factors $D$ and $K$ directly from raw sample transitions without ever building the massive full-sized matrix.

The Stochastic Factorization Model (SFM)

The SFM is a probabilistic interpretation of matrix factorization involving observable states ($S_t$), actions ($A_t$), and hidden states ($H_t$). While it bears a resemblance to a Hidden Markov Model (HMM), the SFM has a distinct dependency structure.

Comparison of HMM and SFM graphical models.

In an SFM, the current observable state is sufficient to define the distribution of the next hidden state. This structure mirrors the algebraic identity $P = DK$, where $D$ maps observable states to hidden states, and $K$ maps hidden states back to observable states. By choosing a factorization order $m < n$, the number of parameters drops from $n^2$ to $2nm$, providing a massive reduction in the degrees of freedom the model needs to learn.

The EMSF Algorithm

To learn the parameters from data, we derive an Expectation-Maximization (EM) algorithm called EMSF.

  1. E-step: Uses a modified "forward-backward" procedure to estimate the probability of being in a specific hidden state at each time step, given the observed data.
  2. M-step: Updates the matrices $D$ and $K$ to maximize the likelihood of the observed transitions based on the hidden state probabilities.

The algorithm includes a scaling mechanism to ensure numerical stability, preventing probabilities from vanishing during long sequences.

Experimental Results

The authors evaluated EMSF on synthetic low-rank matrices and the game of Blackjack.

Synthetic Benchmarks

In synthetic tests, EMSF reached low error rates with significantly fewer samples than standard counting (CNT). While CNT eventually becomes more accurate as data approaches infinity (as it is unbiased), EMSF is superior in the "data-starved" regime. The factorization order $m$ acts as a regularization parameter: a small $m$ reduces variance and sensitivity to noise in limited data.

Reinforcement Learning: Blackjack

In the Blackjack environment, an RL agent using EMSF to learn the game's model outperformed the standard "dealer strategy" after only 3,000 hands.

Expected return in Blackjack: EMSF vs. standard counting (CNT).

As shown in the figure, the standard model-based approach (CNT + Policy Iteration) required 6,000 hands—double the data—to reach the same level of performance. This success demonstrates that the stochastic factorization assumption effectively captures the underlying structure of real-world decision processes.

Conclusion

EMSF provides a data-efficient alternative to standard transition matrix estimation by leveraging low-rank stochastic structures. By reducing the parameter space, it enables faster learning in complex environments. Future work includes extending this framework to continuous state spaces and developing online versions of the algorithm for massive data applications.

Summary updated

BibTeX
@inproceedings{barreto2015expectation,
  author = {André da Motta Salles Barreto and Rafael L. Beirigo and Joelle Pineau and Doina Precup},
  title = {{An Expectation-Maximization Algorithm to Compute a Stochastic Factorization From Data.}},
  booktitle = {IJCAI},
  year = {2015},
  url = {https://openreview.net/forum?id=zFucW-KCHj2},
}
Figure