Abstract
Deep neural networks have become commonplace in the domain of reinforcement learning, but are often expensive in terms of the number of parameters needed. While compressing deep neural networks has assumed great importance to overcome this drawback, little work has been done to address this problem in the context of reinforcement learning agents. This work aims at making first steps towards model compression in an RL agent. In particular, we compress networks to drastically reduce the number of parameters (to less than 3% of their original size), facilitated by applying a global max pool after the final convolution layer, and propose using Actor-Mimic in the context of compression. Finally, we show that this global max-pool allows for weakly supervised object localization, improving the ability to identify the agent's points of focus.
Introduction
Deep Reinforcement Learning (RL) has revolutionized complex task automation, from mastering Atari games to robotics. However, standard models like the Deep Q-Network (DQN) are often over-parameterized, containing millions of parameters primarily in the fully connected layers. This high computational cost hinders deployment on resource-constrained hardware such as mobile devices or small-scale robotics. Furthermore, these models often function as "black boxes," making it difficult to interpret which visual features drive an agent's decisions. This research addresses these dual challenges of efficiency and interpretability.
Methodology
The proposed approach for agent compression involves two primary components: architectural simplification and knowledge distillation.
Architectural Simplification
The researchers reduced the number of feature maps in all convolutional layers by half. Crucially, they introduced a Global Max Pool (GMP) layer between the final convolutional layer and the first fully connected layer. Instead of passing a massive flattened vector to the dense layers, the GMP layer only passes the maximum activation for each feature map. This modification drastically reduces the parameter count in the subsequent dense layers.
Knowledge Distillation via Actor-Mimic
Training highly compressed "student" networks from scratch using standard Q-learning is challenging due to limited representational capacity for exploration. To overcome this, the authors employed Actor-Mimic, a form of knowledge distillation. A pre-trained "expert" DQN guides the student network by minimizing the KL divergence between their respective action probability distributions. This allows the student to inherit complex strategies from the expert more effectively than learning from raw rewards alone.
Weakly Supervised Localization
The inclusion of the GMP layer serves a secondary purpose: interpretability. By forcing the network to select a single maximum value from each feature map, the model naturally learns to assign high activations to spatially relevant entities. The activations prior to the GMP layer can be used to generate localization maps, identifying where the agent is "looking" without explicit supervision.
Experimental Results
The methodology was evaluated using the Arcade Learning Environment (ALE) across seven Atari 2600 games, including Space Invaders, Breakout, and Seaquest.
Model Compression and Performance
The compression technique reduced the parameter count from 1.68 million in the expert network to just 43.1k in the student network—a reduction to approximately 2.5% of the original size. Despite this drastic reduction, the students maintained near-expert performance. For example, in Boxing, the student (96.5) slightly outperformed the expert (95.7), while in Space Invaders, the student achieved a score of 1325.4 against the expert's 1388.2.
Strategy and Localization Insights
The localization maps provided qualitative evidence of the agent's strategies. In Breakout, the model focused on the corners of the brick wall, reflecting a high-level "tunneling" strategy. In Seaquest, the model accurately tracked submarines. However, a "score trap" was observed where the model occasionally fixated on the score counter, likely because it serves as a strong predictor of state transitions.
Discussion and Limitations
While successful, the approach has limitations. In visually complex games like Beamrider, the performance gap between the expert and the compressed student was more pronounced, suggesting a lower bound for compression in high-entropy environments. Future work may explore additional techniques like weight pruning or more advanced architectures to further push the boundaries of RL model efficiency.
Conclusion
This work demonstrates that RL agents can be compressed to a fraction of their original size without significant performance loss. By integrating Global Max Pooling and knowledge distillation, the researchers created lightweight agents that are not only efficient but also offer inherent interpretability through weakly supervised object localization.
Summary updated