TL;DR
Training state representations for reinforcement learning (RL) from scratch on domain-specific data is computationally expensive and sample-inefficient. This paper introduces PEARL, demonstrating that frozen, general-purpose pretrained vision models (like CLIP) can match or outperform state-of-the-art self-supervised methods on Atari games when combined with simple grid-based patching. Surprisingly, adding complex spatio-temporal attention or domain-specific fine-tuning provides little to no benefit, proving that good pretrained encoders are truly "all you need."
What Problem Does This Paper Address?
Deep RL directly from pixel inputs is notoriously sample-inefficient. To combat this, researchers often decouple representation learning from policy learning using self-supervised learning (SSL). However, standard SSL methods for RL require training large models from scratch on massive, domain-specific datasets (e.g., millions of frames of specific Atari gameplay). This process is compute-heavy, data-intensive, and results in representations that struggle to generalize outside their narrow training domain.
The authors tackle a fundamental question: Can we leverage general-purpose vision models—trained on web-scale, uncurated data—to provide high-quality, data-efficient state representations for RL without needing domain-specific training?
Methods
The authors introduce PEARL (Pretrained Encoder and Attention for Representation Learning), a framework designed to evaluate pretrained models for RL state representation.
The methodology consists of three main explorations:
- Pretrained Image Representations: They use a frozen CLIP model as the core image encoder to generate 512-dimensional embeddings. To capture local details, they implement a "zooming in" strategy by breaking the image into equally sized, non-overlapping grid patches ($1\times1$ for full image, $2\times2$, and $4\times4$) and concatenating their embeddings.
- Spatio-temporal Attention: They test whether adding explicit temporal dynamics helps by incorporating Optical Flow (via RAFT) and Image Difference (via structural similarity) to create attention masks or weight specific patches.
- Self-supervised Fine-tuning: They investigate if fine-tuning the pretrained representations on domain-specific data using state-of-the-art SSL losses—such as Contrastive Predictive Coding (CPC), Spatio-Temporal Deep InfoMax (ST-DIM), and standard image augmentations—improves performance.
To evaluate the quality of these representations, they freeze the encoder and train a simple linear probe to predict game state variables, measuring success via F1 scores.
Datasets
The framework is evaluated on a benchmark of 22 Atari games (including classics like Breakout, Pong, Boxing, and Montezuma’s Revenge). For each game, they use a dataset of 50,000 data points, split into 70% training, 10% validation, and 20% testing sets. No new benchmarks are introduced.
Key Insights and Ideas
- The Power of "Zooming In": The most significant performance gains came from simply slicing the input image into grids. Concatenating the full-image embedding with localized patch embeddings allows the model to maintain global context while capturing fine-grained object details (like small sprites or bullets), which general vision encoders often smooth over.
- Pretrained Attention is Already "Good Enough": Introducing explicit spatio-temporal attention mechanisms (like optical flow) failed to meaningfully improve performance. The authors suggest that advanced vision-language models like CLIP already implicitly encode robust spatial attention features.
- Diminishing Returns from Fine-Tuning: Fine-tuning the representations with domain-specific contrastive losses yielded negligible improvements (only ~3% for CPC) or even degraded performance. In data-constrained scenarios, keeping the pretrained encoder entirely frozen is both computationally cheaper and highly effective.
Key Results
- Beating the State-of-the-Art: CLIP’s vanilla pretrained embeddings using a multi-scale patch configuration ($1\times1 + 2\times2 + 4\times4$) outperformed domain-specific state-of-the-art models (ST-DIM) in 20 out of 22 games, yielding an average 5% performance improvement.
- Even PEARL's worst-performing baseline configuration (using only the full image without patches) outperformed a standard Variational Autoencoder (VAE) trained directly on domain-specific data.
- Fine-tuning methods largely underperformed compared to vanilla configurations, showing that the cost of domain-specific training rarely justifies the minor, game-dependent gains.
Limitations and Future Work
- Embedding Size Trade-off: While "zooming in" via grid patches drastically improves accuracy, it scales up the embedding size significantly (e.g., 21 patches $\times$ 512 dimensions). This larger state vector increases the computational burden on downstream RL policy training.
- Frozen Weights Constraint: The lack of improvement during the fine-tuning experiments might stem from the fact that the core CLIP encoder weights were kept frozen, leaving only a few shallow layers to adapt to the limited data. Exploring parameter-efficient fine-tuning (PEFT) techniques could be a promising direction.
- Downstream Policy Validation: The paper evaluates representation quality using a linear probe to predict state variables. The authors note that future work must validate how these exact frozen embeddings perform when training actual RL action-policies from scratch.
Summary updated