Introduction
Deep Learning models have grown increasingly massive, posing significant challenges for deployment on resource-constrained edge devices like smartphones and robots. While pruning—the removal of redundant channels or filters—is a standard solution, traditional methods often suffer from "topology blindness," treating layers in isolation rather than considering the global network structure. Furthermore, Reinforcement Learning (RL) approaches to pruning often struggle with a reward trap where the agent prioritizes accuracy over compression unless complex manual heuristics are applied.
Methodology
The authors introduce GNN-RL, a framework that treats neural networks as hierarchical graphs to capture their structural "DNA." By combining multi-stage Graph Neural Networks (GNNs) with RL, the system automatically discovers optimal pruning strategies.
Hierarchical Graph Representation (m-GNN)
Instead of treating a DNN as a flat list of layers, GNN-RL models it as an $l$-level hierarchical graph. This approach identifies repetitive sub-graphs, or "motifs" (e.g., residual blocks or specific convolutions), as fundamental units. A novel multi-stage GNN (m-GNN) learns embeddings for these motifs at lower levels and utilizes them as edge features for higher levels. This hierarchical representation is memory-efficient and captures the global "flow" of information across the network.
DNN-Graph RL Environment
The framework employs the Proximal Policy Optimization (PPO) algorithm within a custom environment. The agent prunes the model step-by-step until a specific resource constraint (e.g., a 50% reduction in FLOPs) is met. Crucially, the reward—based on validation accuracy—is only granted after the constraint is satisfied. This design forces the agent to learn the most efficient way to reduce model size without compromising performance.
Experimental Evaluation
The GNN-RL method was evaluated on standard computer vision benchmarks, including CIFAR-10, CIFAR-100, and ImageNet (ILSVRC-2012), using architectures such as VGG-16, ResNet variants, MobileNet-v1/v2, and ShuffleNet.
Key Results
GNN-RL consistently outperformed or matched state-of-the-art (SOTA) pruning techniques:
- VGG-16 (ImageNet): Achieved an 80% FLOPs reduction with a 0.49% increase in accuracy.
- ResNet-110 (CIFAR-10): Reduced FLOPs by 52% with a 0.63% accuracy boost, suggesting that pruning can act as a form of regularization for over-parameterized models.
- MobileNet-v2 (ImageNet): Even on this efficient architecture, the method achieved a 42% FLOPs reduction with a minimal 1.83% drop in accuracy.
- Efficiency: Training is remarkably fast; for CIFAR-10, the agent converges in approximately 30 minutes on a single Nvidia V100 GPU.
Discussion and Insights
A primary finding is that topology serves as a critical signal. By embedding the network structure, the RL agent can identify structurally redundant components. Furthermore, the learned policies exhibit transferability: a pruning policy learned on ResNet-56 can be applied to ResNet-44, with the transferred agent converging 1.12x faster than one trained from scratch. This suggests that structural importance is consistent across similar architectures.
Limitations and Future Work
Despite significant theoretical reductions in FLOPs and memory, actual latency speedups on high-end desktop GPUs (like the GTX 1080Ti) were modest for mobile-friendly models, as these GPUs are not specifically optimized for the resulting sparse operations. Additionally, the initial set of "primitive operations" for the hierarchy still requires manual definition. Future research will focus on extending the framework to optimize directly for hardware metrics such as latency and energy consumption.
Summary updated