Deep Model Compression via Filter Auto-sampling

Daquan Zhou, Xiaojie Jin, Kaixin Wang, Jianchao Yang, Jiashi Feng

Abstract

The recent WSNet is a new model compression method through sampling filter weights from a compact set and has demonstrated to be effective for 1D convolution neural networks (CNNs). However, the weights sampling strategy of WSNet is handcrafted and fixed which may severely limit the expression ability of the resulted CNNs and weaken its compression ability. In this work, we present a novel auto-sampling method that is applicable to both 1D and 2D CNNs with significant performance improvement over WSNet. Specifically, our proposed auto-sampling method learns the sampling rules end-to-end instead of being independent of the network architecture design. With such differentiable weight sampling rule learning, the sampling stride and channel selection from the compact set are optimized to achieve better trade-off between model compression rate and performance. We demonstrate that at the same compression ratio, our method outperforms WSNet by 6.5% on 1D convolution. Moreover, on ImageNet, our method outperforms MobileNetV2 full model by 1.47% in classification accuracy with 25% FLOPs reduction. With the same backbone architecture as baseline models, our method even outperforms some neural architecture search (NAS) based methods such as AMC and MNasNet.

Introduction

Traditional model compression techniques—such as pruning, quantization, and low-rank factorization—operate under a rigid assumption: every weight tensor in a neural network must have a fixed, one-to-one correspondence with a specific layer in the architecture. This coupling limits compression efficiency; pruning a connection or reducing a layer's rank essentially discards potentially informative parameters. Furthermore, these methods are often architecture-dependent, making them difficult to generalize across different models.

Neural Epitome Search (NES) addresses this by disentangling learned parameters from the network's structural design. By breaking the traditional 1:1 mapping between architectures and parameters, NES learns a compact, shared "epitome" of weights that can be sampled and reshaped for any given layer.

Methodology

NES treats network weights as samples drawn from a master parameter set called an Epitome ($E$). Instead of storing unique weight tensors for every layer, NES stores a single, dense epitome of parameters.

Conceptual overview of standard convolution (a) vs. Epitome-based convolution (b).

The framework consists of several key components:

  1. Indexing Learner: A small, auxiliary neural network that learns to output "coordinates" (starting indices) within the epitome, identifying which patches are most expressive for a specific layer.
  2. Differentiable Transformation: To make the search end-to-end trainable, NES uses an interpolation-based sampler. This allows the model to sample from fractional indices in the epitome, ensuring differentiability.
  3. Routing Map: During training, the model records optimal mappings. For inference, the indexing learner is replaced by a static lookup table, ensuring no runtime overhead.
  4. Computation Reuse: Through "Channel Wrapping," NES reuses the results of convolutions when different layers sample overlapping parts of the epitome, effectively reducing the number of Multiply-Adds (MAdds) required.

Experimental Results

The researchers evaluated NES across ImageNet, CIFAR-10, and ESC-50 to prove its architecture-agnostic nature. NES consistently outperformed both baseline models and existing AutoML-based compression methods.

Performance comparison of MobileNetV2 variants against the proposed method on ImageNet.

Key results include:

  • MobileNetV2 on ImageNet: NES improved the full-model baseline by 1.47% in top-1 accuracy while reducing MAdds by 25%.
  • Comparison to AMC: At the same compression ratio, NES outperformed AutoML for Model Compression (AMC) by 2.5%.
  • EfficientNet-B0: NES achieved a 1.2% accuracy boost with 10% fewer MAdds.
  • New State-of-the-Art: Under mobile-friendly constraints (<350M MAdds), NES achieved a top-1 accuracy of 77.5% on ImageNet.

Conclusion and Future Work

NES demonstrates that parameters can be treated as a shared resource, leading to higher information density. By separating the shape of weights from their values, developers can precisely control model size by adjusting the epitome.

Future work may address the training complexity involved in optimizing the indexing learner and explore the efficacy of NES on non-convolutional architectures, such as Transformers and Attention mechanisms. Additionally, automating the search for optimal sub-tensor shapes remains a promising avenue for further optimization.

Summary updated

BibTeX
@inproceedings{zhou2020deep,
  author = {Daquan Zhou and Xiaojie Jin and Kaixin Wang and Jianchao Yang and Jiashi Feng},
  title = {{Deep Model Compression via Filter Auto-sampling}},
  booktitle = {International Conference on Learning Representations},
  year = {2020},
}
Figure