Abstract
The task of accelerating large neural networks on general purpose hardware has, in recent years, prompted the use of channel pruning to reduce network size. However, the efficacy of pruning based approaches has since been called into question. In this paper, we turn to distillation for model compression—specifically, attention transfer—and develop a simple method for discovering performance enhanced student networks. We combine channel saliency metrics with empirical observations of runtime performance to design more accurate networks for a given latency budget. We apply our methodology to residual and densely-connected networks, and show that we are able to find resource-efficient student networks on different hardware platforms while maintaining very high accuracy. These performance-enhanced student networks achieve up to 10% boosts in top-1 ImageNet accuracy over their channel-pruned counterparts for the same inference time.
Introduction
Deep neural networks are increasingly deployed on edge devices with limited computational resources. To meet strict latency requirements, researchers often employ channel pruning, which removes entire rows or columns of weights to reduce model size. However, a significant gap exists between theoretical compression metrics and actual hardware performance. Most pruning methods optimize for FLOPs (Floating Point Operations), assuming a linear relationship between operations and speed. In practice, modern hardware architectures (CPUs and GPUs) process data in parallel chunks, leading to non-linear performance characteristics.
The Staircase Phenomenon
A critical observation of this work is that hardware inference time often follows a staircase pattern rather than a linear slope. Due to SIMD/MIMD parallelization and memory alignment, a layer with 128 channels may execute just as quickly as one with 100 channels. Standard pruning algorithms often stop at an arbitrary channel count that sacrifices model capacity without providing any real-world speedup.
By identifying these "Optimal Points"—the rightmost edge of a performance step—we can "nudge" pruned layer widths upward to the maximum capacity allowed within a specific latency budget. This allows the model to regain representational power for "free" in terms of inference time.
Methodology: Performance Enhanced Students
We propose a two-stage framework to bridge the gap between pruning and empirical performance. This pipeline transforms a pruned architecture into a "Performance Enhanced Student."
1. Architecture Discovery (The Staircase Optimizer)
The process begins with a large teacher model. We apply Fisher Pruning, a saliency-based method that identifies channels with the least impact on the loss function. Simultaneously, we perform an empirical latency sweep on the target hardware. The Staircase Optimizer then aligns the pruned channel counts with the nearest hardware-optimal points. If the pruning algorithm suggests a width that falls in the middle of a performance step, the optimizer increases the width to the edge of that step, maximizing capacity without increasing latency.
2. Training via Attention Transfer
Once the student architecture is defined, we move beyond simple fine-tuning. We employ Attention Transfer distillation, where the student network is trained to mimic the spatial attention maps of the original teacher model. This knowledge transfer allows the smaller student to learn complex feature representations more effectively than training from scratch or standard fine-tuning.
Experimental Results
Our methodology was evaluated on CIFAR-10 and ImageNet (ILSVRC 2012) across different hardware platforms, including ARM Cortex-A57 CPUs and Nvidia Pascal GPUs.
- Accuracy Gains: On ImageNet, a ResNet-34 student compressed by 75% achieved a 31.29% Top-1 error, a massive improvement over the 43.43% error of a standard Fisher-pruned model at the same inference speed (approx. 0.04s on an Nvidia TX2).
- Hardware Efficiency: The Performance Enhanced Students demonstrated higher MACs/ps (Multiply-Accumulate operations per second), indicating they utilize the hardware's theoretical peak performance more effectively than traditionally pruned models.
- Cross-Platform Consistency: The staircase patterns were observed and successfully exploited across both CPU and GPU architectures, proving the method's versatility.
Conclusion
By acknowledging the non-linear nature of hardware performance, we can design compressed models that are significantly more accurate without being slower. The combination of hardware-aware architecture discovery and attention-based distillation provides a robust path for deploying high-performance neural networks on resource-constrained devices. Future work will explore extending this framework to more complex vision tasks like object detection and semantic segmentation.
Summary updated