Network Pruning via Transformable Architecture Search

Xuanyi Dong, Yi Yang

TL;DR

Instead of relying on hand-crafted rules to decide which parts of a neural network to cut, Transformable Architecture Search (TAS) treats pruning as a search problem. It uses a differentiable approach to automatically find the optimal width and depth for a compressed model, then populates that structure using knowledge distillation from the original large network.

The Problem with Traditional Pruning

Deep learning has a "size" problem. While massive convolutional neural networks (CNNs) achieve state-of-the-art performance, they are often too computationally expensive to run on resource-constrained devices like smartphones or drones.

Network pruning is the standard solution: taking a large, "over-parameterized" network and removing redundant filters or layers. However, traditional pruning follows a rigid "train-prune-finetune" pipeline. The "prune" step usually relies on human intuition—for example, "remove 30% of filters in every layer." These hand-crafted rules are often sub-optimal because they don't account for how different layers contribute to the final result.

Traditional vs. Proposed Pruning Paradigm

The authors argue that we should let the data decide the best shape for the pruned network, moving away from rigid heuristics.

Methods: Transformable Architecture Search (TAS)

The authors propose a new paradigm that merges pruning with Neural Architecture Search (NAS). Their approach, TAS, consists of four main steps:

  1. Search for Width and Depth: Unlike standard NAS, which searches for complex cell topologies, TAS searches for the best size (number of channels and layers). It uses a differentiable search method, meaning it uses gradients to update the probability of choosing a specific width or depth.
  2. Channel-Wise Interpolation (CWI): To make the search differentiable, the model needs to "try out" different widths simultaneously. The authors introduced CWI to align feature maps of different sizes so they can be summed up and processed. This allows the loss to back-propagate directly to the architecture parameters.
Channel-Wise Interpolation in TAS
  1. Cost-Aware Loss: They include a penalty term in the loss function that encourages the model to hit a specific computational target (e.g., a specific number of FLOPs).
  2. Knowledge Transfer: Once the optimal "small" architecture is found, it is trained from scratch. However, instead of just using the ground-truth labels, it uses Knowledge Distillation (KD) to learn from the original, unpruned "teacher" network, which helps the smaller model recover performance faster.

Datasets

The researchers evaluated TAS on three standard computer vision benchmarks:

  • CIFAR-10: A small-scale dataset with 10 classes.
  • CIFAR-100: A medium-scale dataset with 100 classes.
  • ImageNet: The gold standard for large-scale image classification (1.28 million images, 1000 classes).

Key Insights

  • Pruning is Architecture Search: The core realization is that pruning isn't just about deleting weights; it's about discovering the most efficient architecture hidden within a larger one.
  • Differentiability Saves Time: By making the search space differentiable (using the Gumbel-Softmax trick), they avoid the massive computational costs associated with Reinforcement Learning or Evolutionary algorithms. They can find a pruned ResNet-32 in just under 4 hours on a single GPU.
  • Flexibility Matters: Searching for width and depth jointly yields significantly better results than searching for either one in isolation, suggesting that the "shape" of a network is a holistic property.
  • The Power of the Teacher: Knowledge distillation is crucial. Even a perfectly searched architecture performs better when it "mimics" the feature distributions of its larger predecessor.

Key Results

TAS consistently outperformed traditional state-of-the-art pruning methods across different depths of ResNet:

  • CIFAR-100: On ResNet-32, TAS achieved 72.41% accuracy while reducing FLOPs by nearly 40%. For comparison, traditional "pre-defined" pruning reached only 68.18% with similar constraints.
  • ImageNet: Pruning a ResNet-50 by 43.5% (FLOPs), TAS maintained a Top-1 accuracy of 76.20%. This outperformed other popular methods like FPGM (75.50%) and SFP (74.61%).
  • Efficiency: In several cases, the TAS-pruned models actually achieved higher accuracy than the original unpruned models, likely because the search process acted as a form of effective regularization.

Limitations and Future Work

While TAS is a significant step forward, the authors note a few areas for improvement:

  • Topology Constraints: The search is still limited to the original network's basic structure (e.g., starting with a ResNet yields a smaller ResNet). It doesn't yet search for entirely new types of operations or connections.
  • Search Space Complexity: For extremely deep networks (like ResNet-164), the search space becomes massive ($8^{163}$ candidates), which can lead to overfitting during the search phase.
  • Future Directions: Future work could explore more sophisticated knowledge transfer methods or apply TAS to other types of architectures beyond standard CNNs, such as Transformers or mobile-specific backbones.

Summary updated

BibTeX
@inproceedings{dong2019network,
  author = {Xuanyi Dong and Yi Yang},
  title = {{Network Pruning via Transformable Architecture Search}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
  url = {https://openreview.net/forum?id=WWFQ3aXnxK},
}
Figure