NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Auto Graph Encoder-Decoder for Neural Network Pruning

Sixing Yu, Arya Mazaheri, Ali Jannesari

Introduction

Deep Neural Networks (DNNs) are notoriously over-parameterized, containing significantly more weights and computations than required for their primary tasks. While this redundancy aids training, it poses a major hurdle for deployment on resource-constrained edge devices like smartphones and robotics. Neural network pruning—the process of removing redundant channels or layers—is a standard solution, but it has historically relied on manual, handcrafted rules or simplistic automated methods.

Traditional automated pruning methods, such as AMC (AutoML for Model Compression), typically represent network layers as "flat" vectors of features (e.g., kernel size, layer index). This approach fundamentally ignores the structural topology of the network—how layers are interconnected through residual skip-connections or branching. This paper introduces the Auto Graph Encoder-Decoder (AGMC) framework, which treats DNNs as computational graphs, allowing a Reinforcement Learning (RL) agent to "see" and exploit the model's internal dependencies to find optimal pruning ratios.

The AGMC Framework

AGMC automates the search for pruning ratios through a sophisticated three-stage pipeline that integrates graph representation learning with policy-based reinforcement learning.

  1. Graph Representation: The target DNN is first modeled as a directed graph where nodes represent feature maps and edges represent operations (e.g., convolutions, pooling). To maintain computational efficiency, primitive operations are grouped into higher-level functional blocks.
  2. Graph Encoder-Decoder:
    • Encoder: A Graph Convolutional Network (GCN) processes the DNN graph to extract a global "structure representation," capturing the architectural context of every layer.
  3. Decoder: An LSTM-based decoder receives this global representation and generates individual embeddings for each hidden layer.
  4. Reinforcement Learning (DDPG): A Deep Deterministic Policy Gradient (DDPG) agent uses these layer embeddings as its state to predict continuous pruning ratios (actions).
  5. Action Rescaling: To ensure the final model adheres to specific hardware constraints, a specialized algorithm rescales the predicted ratios to meet target FLOPs or parameter counts.
The AGMC pipeline: from DNN graph encoding to RL-based pruning ratio prediction.

Structural Topology as a Signal

A core insight of this work is that a layer's importance is intrinsically linked to its position within the graph. By utilizing a GCN, the RL agent understands that a layer preceding a residual skip-connection requires a different pruning strategy than a standard sequential layer. The authors demonstrate that these learned graph embeddings are significantly more effective than manual features, resulting in approximately 2x less error than the 11 handcrafted features used in previous state-of-the-art methods.

Furthermore, the graph encoder exhibits impressive generalizability. An encoder trained on a deep network (like ResNet-56) can be transferred to a shallower one (like ResNet-20) with minimal fine-tuning, suggesting that the framework learns universal structural patterns common to specific architecture families.

Experimental Results

AGMC was evaluated on standard benchmarks including CIFAR-10/100 and ImageNet (ILSVRC-2012) across various architectures, including the ResNet family, VGG-16, and mobile-optimized models like MobileNet and ShuffleNet.

Performance comparison of AGMC against various pruning baselines across multiple architectures.

As shown in the results table, AGMC consistently outperforms both manual and automated baselines:

  • ResNet-56: At a 50% FLOPs reduction, AGMC achieved 92.76% accuracy, losing only 0.63% compared to the baseline, whereas AMC dropped to 90.2%.
  • VGG-16: On ImageNet, AGMC reached 70.35% accuracy with an 80% reduction in FLOPs, surpassing other automated methods.
  • Efficiency: The search process is remarkably fast; for a model like ResNet-56, the RL agent can determine optimal pruning ratios in just 5-6 minutes on a single high-end GPU.

Conclusion and Future Directions

AGMC demonstrates that structural awareness is critical for effective neural network pruning. By moving beyond flat vector representations to graph-based encoding, the framework achieves superior accuracy-compression trade-offs. While the current work focuses on channel pruning, the authors suggest that this graph-based approach is highly extensible to other compression tasks, such as quantization or Neural Architecture Search (NAS). Future iterations may also incorporate direct hardware metrics, such as latency on specific mobile chips, into the RL reward function to further enhance real-world deployment efficiency.

Summary updated

BibTeX
@inproceedings{yu2021auto,
  author = {Sixing Yu and Arya Mazaheri and Ali Jannesari},
  title = {{Auto Graph Encoder-Decoder for Neural Network Pruning}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2021},
  doi = {10.1109/iccv48922.2021.00630},
}
Figure