Introduction
In reinforcement learning (RL), agents typically model their environment through a transition matrix $P$, which defines the probability of moving between states. However, for an environment with $n$ states, $P$ contains $n^2$ parameters, creating a significant computational and memory bottleneck as the state space grows. This paper proposes an incremental version of Stochastic Factorization (SF) to address this scalability issue by approximating $P$ as the product of two smaller stochastic matrices, $D$ and $K$ ($P \approx DK$).
The Stochastic Factorization Framework
Stochastic Factorization reduces the parameter count from $n^2$ to $2nm$, where $m \ll n$. The core idea is to introduce a set of hidden states that mediate transitions. The authors demonstrate that these hidden states depend only on the immediate transition $(S_t, A_t, S_{t+1})$, which simplifies the underlying graphical model and allows for more efficient computation.
By leveraging this structure, the authors derive multiplicative update rules similar to those used in Non-negative Matrix Factorization (NMF). A key theoretical insight is that the Expectation-Maximization Stochastic Factorization (EMSF) algorithm implicitly minimizes a weighted Kullback-Leibler (KL) divergence. This weighting ensures the model prioritizes accuracy for state transitions that the agent actually experiences, effectively allocating its "approximation budget" to the most relevant parts of the state space.
Incremental EMSF Algorithm
The primary contribution of this work is Incremental EMSF, an online learning algorithm that updates the $D$ and $K$ factors one transition at a time. This approach is designed for streaming data and includes:
- Simple Multiplicative Updates: Replacing complex batch calculations with efficient step-by-step adjustments.
- Memory Management: A "memory cap" ($\eta_{max}$) to bound the size of internal counting matrices.
- Adaptability: A learning rate ($\alpha$) that allows the model to remain responsive to non-stationary environments.
Experimental Evaluation
The algorithm was evaluated on synthetic MDPs and the Blackjack benchmark. In synthetic tests, EMSF proved significantly more robust than standard NMF (KLM) when data was sampled non-uniformly, as it focused on frequently visited states rather than trying to fit rare transitions.
On the Blackjack task, the authors combined Incremental EMSF with Policy Iteration (PISF). The results demonstrated that this model-based approach could outperform model-free methods like Q-learning while using a highly compressed model.
Key Results and Conclusion
- Model Compression: On the Blackjack task, EMSF achieved superior performance using a model only 5% the size of the full transition matrix.
- Efficiency: The "SF trick" allows agents to solve a much smaller "mini-MDP" (defined by $\bar{P} = KD$) to derive policies, drastically reducing the time required for policy computation.
- Robustness: The weighted KL divergence objective makes the algorithm naturally resilient to the non-uniform sampling typical of RL trajectories.
In summary, Incremental Stochastic Factorization provides a mathematically grounded and computationally efficient framework for building compressed environment models from streaming data, bridging the gap between probabilistic latent variable models and online reinforcement learning.
Summary updated