[Paper Review] StARformer: Transformer with State-Action-Reward Representations for Visual Reinforcement Learning
StARformer introduces a novel Transformer architecture for visual reinforcement learning that explicitly models state-action-reward (StAR) representations within short temporal windows to inject a Markovian inductive bias, improving long-term sequence modeling. By combining ViT-like image patches with convolutional features and fusing them through interleaved Step and Sequence Transformers, StARformer outperforms state-of-the-art methods on Atari and DM Control Suite benchmarks in both offline-RL and imitation learning settings.
Reinforcement Learning (RL) can be considered as a sequence modeling task: given a sequence of past state-action-reward experiences, an agent predicts a sequence of next actions. In this work, we propose State-Action-Reward Transformer (StARformer) for visual RL, which explicitly models short-term state-action-reward representations (StAR-representations), essentially introducing a Markovian-like inductive bias to improve long-term modeling. Our approach first extracts StAR-representations by self-attending image state patches, action, and reward tokens within a short temporal window. These are then combined with pure image state representations -- extracted as convolutional features, to perform self-attention over the whole sequence. Our experiments show that StARformer outperforms the state-of-the-art Transformer-based method on image-based Atari and DeepMind Control Suite benchmarks, in both offline-RL and imitation learning settings. StARformer is also more compliant with longer sequences of inputs. Our code is available at https://github.com/elicassion/StARformer.
Motivation & Objective
- To improve long-term sequence modeling in visual reinforcement learning by explicitly modeling local state-action-reward transitions.
- To alleviate the burden on self-attention mechanisms by injecting a Markovian inductive bias through localized StAR-representations.
- To preserve fine-grained spatial information in image states by using ViT-style patch embeddings instead of whole-image CNN features.
- To enable better generalization and scalability to longer input sequences by decoupling short-term transition modeling from long-range context learning.
- To evaluate the effectiveness of StARformer across diverse reward settings, including return-to-go, stepwise reward, and no-reward (imitation) scenarios.
Proposed method
- The model employs a Step Transformer that self-attends over image state patches, action tokens, and reward tokens within a single time step to learn local StAR-representations.
- Image states are encoded as ViT-like patches to retain fine-grained spatial details, while pure image features are extracted via convolutional networks for global context.
- The Sequence Transformer combines StAR-representations with global convolutional features across the entire trajectory to generate action predictions via causal self-attention.
- A layer-wise fusion mechanism combines StAR-representations and global image features at each transformer layer, enhancing representational capacity without increasing model depth.
- The architecture supports multiple reward settings: return-to-go, stepwise reward, and no-reward (imitation), enabling ablation across different learning paradigms.
- Model variants are evaluated with different fusion strategies (e.g., P+C, C+P, StAR Fusion, StAR Stack) to determine optimal feature integration.
Experimental results
Research questions
- RQ1Can explicit modeling of local state-action-reward transitions improve long-term sequence modeling in visual reinforcement learning?
- RQ2Does fusing ViT-style patch embeddings with convolutional features enhance performance compared to using only one type of representation?
- RQ3How does the choice of reward signal—return-to-go, stepwise reward, or no reward—affect model performance and generalization?
- RQ4Is the proposed interleaved Step-Sequence Transformer design more effective than stacked or summed fusion variants?
- RQ5Can StARformer achieve strong performance in imitation learning without any reward signal, indicating robust sequence modeling capacity?
Key findings
- StARformer outperforms the state-of-the-art Decision Transformer on both Atari and DeepMind Control Suite benchmarks in offline-RL and imitation learning settings.
- The model achieves superior performance with the P+C fusion strategy (patch embeddings in Step Transformer, convolutional features in Sequence Transformer), confirming the benefit of fine-grained to coarse-grained feature hierarchy.
- StARformer maintains strong performance across all reward settings, including no-reward imitation learning, where it outperforms Decision Transformer with return-to-go.
- The layer-wise fusion mechanism (original StAR model) outperforms both element-wise summation (StAR Fusion) and stacked architecture (StAR Stack), indicating that multi-level abstraction is critical.
- Attention maps show that action tokens attend meaningfully to relevant spatial regions (e.g., paddle in Pong), confirming the model learns semantically grounded representations.
- The model demonstrates improved compliance with longer input sequences, suggesting better scalability than prior Transformer-based approaches in visual RL.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.