TL;DR
This paper explores how to make Vision Transformers (ViTs) viable for Deep Reinforcement Learning (RL) by using self-supervised pretraining. The authors introduce TOV-VICReg, a novel method that combines variance-invariance-covariance regularization with a temporal order verification task, significantly improving the data efficiency of ViTs in Atari environments and matching the performance of traditional convolutional networks.
What Problem Does This Paper Address?
In computer vision, Vision Transformers (ViTs) have largely dethroned Convolutional Neural Networks (CNNs). However, in Reinforcement Learning, CNNs remain the king. Why? ViTs have much "weaker inductive biases"—meaning they don't inherently assume that nearby pixels are related the way CNNs do. This makes them incredibly "data-hungry." While a CNN might learn to play an Atari game in a few million frames, a ViT trained from scratch (or tabula rasa) often fails to learn anything useful within the same timeframe.
The authors address this "data inefficiency gap." They investigate whether we can give ViTs a "head start" by pretraining them on environment observations using self-supervised learning (SSL), allowing the model to understand visual features and temporal flow before it ever tries to maximize a reward.
Methods
The researchers evaluated several state-of-the-art SSL methods (DINO, MoCo v3, MAE, and VICReg) but found they lacked a crucial component for RL: time.
To fix this, they proposed TOV-VICReg (Temporal-Order-Verification VICReg). Here’s how it works:
- VICReg Base: It uses the Variance-Invariance-Covariance Regularization method, which prevents "representation collapse" (where the network outputs the same vector for every image) by forcing the embeddings to be diverse and decorrelated.
- Temporal Order Verification (TOV): This is the "secret sauce." The model is given three consecutive frames and must predict if they are in the correct chronological order or if they have been shuffled.
- Architecture: They used a "ViT-tiny" model to keep computational costs manageable, comparing it against standard RL baselines like the Nature CNN and ResNet.
Datasets
- Pretraining: The models were pretrained on the DQN Replay Dataset, specifically using 100,000 observations from 10 different games in the Atari 100k benchmark (totaling 3 million data points).
- Evaluation: The agents were evaluated on the same 10 Atari games (e.g., Breakout, Pong, MsPacman) using the Rainbow algorithm, a high-performance RL agent.
- Linear Probing: They also used an imitation learning task to see how well the frozen pretrained features could predict actions compared to a "Nature CNN" baseline.
Key Insights and Ideas
- Time is a Feature: Standard SSL treats images as static objects. In RL, the relationship between frames (the velocity of a ball, the direction of a ghost) is more important than the texture of the background. Adding the temporal shuffle task (TOV) was the primary driver of performance.
- Sparsity is Efficiency: One of the most striking findings was that TOV-VICReg produced much sparser representation vectors (more zeros in the output) and more focused attention maps. The model learned to ignore the "noise" of the background and focus strictly on game-critical entities like paddles and scores.
- Closing the Gap: Without pretraining, ViTs are significantly worse than CNNs in low-data regimes. With TOV-VICReg pretraining, a ViT with 5.5 million parameters can finally match the data efficiency of a tiny Nature CNN (75k parameters), which is a massive leap for Transformer-based RL.
Key Results
- RL Performance: ViT + TOV-VICReg outperformed all other SSL pretraining methods (DINO, MoCo, etc.) in terms of mean and Inter-Quartile Mean (IQM) scores across the Atari games.
- Linear Probing: In the imitation learning test, TOV-VICReg achieved a mean F1-score of 0.2680, significantly higher than the randomly initialized ViT (0.1430) and other SSL methods like MAE (0.1706).
- Representational Stability: The authors showed that TOV-VICReg effectively avoided "dimensional collapse," utilizing the available representation space better than standard VICReg or MoCo.
Limitations and Future Work
Despite the success, the authors acknowledge several hurdles:
- Computational Overhead: Transformers are still significantly slower to train and run than the small CNNs typically used in RL. This makes "online" training (learning while playing) difficult without massive hardware.
- Generalization: While the model learned well on the games it was pretrained on, it didn't show significant "zero-shot" advantages when moved to entirely new games. The authors suggest that future work should focus on pretraining on much larger, more diverse datasets (like the 26-game Atari set) to encourage broader feature extraction.
- Beyond Vision: The authors suggest exploring other dimensions of similarity, such as semantics (what an object is) and behavior (what an object does), to further enrich the learned representations.
Summary updated