Abstract: The Bellman operator is the cornerstone of dynamic programming (DP), yet it faces a fundamental trade-off: the standard parallelizable version converges slowly, while the sequential Gauss-Seidel variant converges quickly but cannot leverage modern multi-core hardware. This paper introduces the Randomized Mini-Batch Operator, a hybrid approach that partitions the state space into batches. By processing states within a batch in parallel and updating the value function between batches, this operator achieves a tunable balance between iteration efficiency and computational throughput. Theoretical analysis confirms the operator is a contraction mapping, ensuring convergence. Numerical evaluations on environments like 2D-Maze and Taxi demonstrate speedups of over 50x compared to sequential methods and significant improvements over standard parallel Value Iteration.
Introduction
Dynamic Programming (DP) algorithms, such as Value Iteration (VI), rely on iterative applications of an operator to find the optimal value function of a Markov Decision Process (MDP). Traditionally, practitioners choose between the Standard Bellman Operator, which updates all states simultaneously, and the Gauss-Seidel Operator, which updates states sequentially.
While the Bellman operator is ideal for GPUs due to its inherent parallelism, it often requires a high number of iterations to reach convergence. Conversely, the Gauss-Seidel operator incorporates interim results immediately, leading to much faster convergence in terms of iteration count. However, its sequential nature creates a bottleneck on modern hardware. As state spaces grow in complexity, neither extreme is optimal. This work proposes a "best of both worlds" solution: the Randomized Mini-Batch Operator.
The Randomized Mini-Batch Operator
The core innovation is the operator $B_m$, where $m$ represents the batch size. The state space is shuffled and partitioned into batches of size $m$. Within each batch, updates are performed in parallel (Bellman-style). Once a batch is processed, the updated values are immediately used for the subsequent batch (Gauss-Seidel-style).
Mathematically, the authors prove that $B_m$ is a contraction mapping, guaranteeing that the algorithm will always converge to the unique optimal value function $J^*$. This flexibility allows users to tune $m$ based on their specific hardware constraints and the structure of the MDP.
The Iteration vs. Time Trade-off
A key insight of this research is the non-linear relationship between batch size, iteration count, and wall-clock time. Smaller batch sizes behave more like Gauss-Seidel, requiring fewer iterations but offering less parallelization. Larger batch sizes saturate GPU cores but converge more slowly.
As seen in the 2D-Maze experiments, the sequential version ($m=1$) takes the fewest iterations but the most time. Conversely, the full-batch version ($m=9706$) is slower than intermediate sizes like $m=512$, which find the "sweet spot" for GPU utilization.
Experimental Results and Scalability
The operator was tested on several OpenAI Gym environments, including FrozenLake, Taxi, and a large-scale 2D-Maze. The results highlight three major advantages:
- Computational Speedup: In the 2D-Maze ($N=80$), the mini-batch approach was 89.28x faster than sequential Gauss-Seidel and 1.41x faster than standard VI.
- Memory Efficiency: For the largest maze ($N=100$), the standard Bellman operator failed to run on the GPU due to memory limits. The mini-batch operator bypassed this by processing the state space in manageable chunks.
- Performance in MPI: The operator is particularly effective when integrated into Modified Policy Iteration (MPI).
In the MPI case, the mini-batch operator achieved a staggering 194.52x speedup over the sequential version in the large maze environment, demonstrating its efficacy for high-dimensional problems.
Conclusion
The Randomized Mini-Batch Operator provides a flexible framework for Dynamic Programming that adapts to the strengths of modern hardware. By treating the batch size as a hyperparameter, researchers can optimize for wall-clock time rather than just iteration count. Future work may explore "importance sampling" to prioritize state updates and asynchronous variants to further reduce synchronization overhead.
Summary updated