Abstract
This work analyses the disparity in performance between Decision Transformer (DT) and Decision Mamba (DM) in sequence modelling reinforcement learning tasks for different Atari games. The study first observed that DM generally outperformed DT in the games Breakout and Qbert, while DT performed better in more complicated games, such as Hero and Kung Fu Master. To understand these differences, we expanded the number of games to 12 and performed a comprehensive analysis of game characteristics, including action space complexity, visual complexity, average trajectory length, and average steps to the first non-zero reward. In order to further analyse the key factors that impact the disparity in performance between DT and DM, we employ various approaches, including quantifying visual complexity, random forest regression, correlation analysis, and action space simplification strategies. The results indicate that the performance gap between DT and DM is affected by the complex interaction of multiple factors, with the complexity of the action space and visual complexity (particularly evaluated by compression ratio) being the primary determining factors. DM performs well in environments with simple action and visual elements, while DT shows an advantage in games with higher action and visual complexity. Our findings contribute to a deeper understanding of how the game characteristics affect the performance difference in sequential modelling reinforcement learning, potentially guiding the development of future model design and applications for diverse and complex environments.
Introduction
The "Transformer vs. State Space Model (SSM)" debate is a central theme in contemporary AI research. In Reinforcement Learning (RL), the Decision Transformer (DT) revolutionized the field by treating RL as a conditional sequence modeling problem. By leveraging self-attention, DTs can effectively map sequences of states, actions, and rewards to future actions. Recently, Decision Mamba (DM) was introduced, replacing the attention mechanism with Mamba blocks—a linear-time SSM—to improve efficiency and handle longer sequences.
However, empirical results have been inconsistent. While DM excels in certain environments like Breakout, it struggles in others like Hero. This study aims to identify the specific task characteristics—such as action space size and visual complexity—that determine the relative performance of these two architectures.
Architectures
The primary difference between the two models lies in their core sequence processing block. The Decision Transformer relies on causal self-attention, whereas Decision Mamba utilizes the Mamba block, which incorporates selective state spaces and convolutional layers.
The Mamba block (shown below) is designed to capture temporal dependencies with linear complexity, making it theoretically superior for long-range context.
Methodology
The researcher evaluated DT and DM across 12 Atari games using the DQN-replay dataset. Models were trained on a 1% subset of the data and evaluated online via the Arcade Learning Environment (ALE). To move beyond simple performance metrics, the study quantified game complexity using:
- Visual Metrics: Image entropy, compression ratio (using the DEFLATE algorithm), and SIFT feature counts.
- Structural Metrics: Action space size, average trajectory length, and steps to the first reward.
- Explainability: Random Forest Regression and SHAP values were used to rank the importance of these metrics in predicting the performance gap.
Results and Analysis
The study found that DT outperformed DM in 8 out of 12 games, showing significant dominance in complex titles like Hero (Score: 30.37 vs. DM's 7.77). DM won in 4 games, including Breakout and Space Invaders.
Key Predictors of Performance
- Action Space Complexity: This was the single most influential factor (0.444 importance). As the number of possible actions increases, DT's advantage grows.
- Visual Complexity: The compression ratio (0.213 importance) was the second major factor. DM thrives in "clean" environments with high redundancy, while DT's attention mechanism is better at filtering relevant signals from high-entropy visuals.
- Context Length: DM showed a notable advantage in Qbert as context length increased to 50, confirming its strength in handling long-range dependencies when the environment is not overly cluttered.
The Action Fusion Paradox
An experiment to simplify action spaces ("Action Fusion") surprisingly did not help DM. Instead, it significantly degraded DT's performance. This suggests that the models rely on the original granularity of the action space to learn effective policies; reducing this granularity complicates the learning task for both architectures.
Conclusion
The performance gap between DT and DM is driven by a complex interaction of factors, primarily action space and visual complexity. While Mamba offers efficiency and excels in simpler environments, the Decision Transformer remains the more robust choice for complex, high-entropy tasks. Future research should investigate hybrid architectures that leverage the strengths of both attention and state-space models.
Summary updated