Archtree: on-the-fly tree-structured exploration for latency-aware pruning of deep neural networks

Rémi Ouazan Reboul, Edouard Yvinec, Arnaud Dapogny, Kevin BaillyarXiv 2023 · DOI

TL;DR

Archtree is a novel structured pruning method that optimizes deep neural networks (DNNs) for speed by measuring latency directly on target hardware during the pruning process. By using a tree-structured "beam search" to explore multiple candidate models simultaneously, it achieves significantly better accuracy-latency trade-offs than existing state-of-the-art methods like HALP.

What Problem Does This Paper Address?

While Deep Neural Networks are powerful, they are often too slow or memory-intensive for "edge" devices like microcontrollers or consumer GPUs. Pruning—the process of removing unnecessary parts of a network—is a common solution. Specifically, structured pruning removes entire "channels" or neurons, which leads to direct speedups.

However, existing methods have two major flaws:

  1. The "Lookup Table" Trap: Most methods estimate speedups using pre-calculated tables. These tables ignore complex hardware realities like memory caching, serialization, and parallelization. Consequently, a model that should be fast according to a table might still be slow in practice.
  2. Greedy Search Limitations: Most algorithms follow a single "greedy" path, removing the least important channel one by one. This often leads to a "local optimum" where the algorithm misses a much better architecture just a few steps away.

The Archtree Approach

Archtree introduces a more robust way to navigate the massive search space of pruned models by moving away from single-path greedy searches and static lookup tables.

Archtree's tree-structured search space exploration with hardware-in-the-loop latency measurement.

Key components of the methodology include:

  • Tree-Structured Exploration: Instead of keeping just one "best" model at each step, Archtree maintains a set of $A$ active candidates (similar to a beam search). At each pruning step, it "blossoms" by generating many possible children and then prunes the search tree to keep only the most promising ones.
  • In Situ Latency Measurement: Instead of guessing, Archtree measures the latency of candidate models on the fly on the actual target hardware. This ensures the final model truly fits the desired latency budget.
  • Channel Grouping: To maintain the network's structural integrity (especially in architectures with skip connections like ResNets), Archtree identifies "channel groups" that must be pruned together.
  • Efficiency Mechanisms: To prevent the search from taking forever, the authors implemented adaptive step sizes (respecting hardware memory alignment), importance-based early stopping, and caching of previous latency measurements.

Experimental Results

The authors evaluated Archtree using two primary setups: CIFAR-10 (ResNet8 on an STM32 microcontroller) and ImageNet (ResNet18 on an NVIDIA GTX2070 GPU). Archtree consistently outperformed the previous state-of-the-art (HALP) in both accuracy and latency budget adherence.

Accuracy-latency trade-offs for different pruning strategies, showing Archtree's proximity to the optimal sub-model frontier.

Key Insights and Results

  • Superior Accuracy-Latency Trade-off: Archtree consistently finds models that are both faster and more accurate. On ResNet8 (STM32), at a high pruning rate (0.3 relative latency), Archtree maintained 76.4% accuracy, while HALP plummeted to 50.9%.
  • Hardware is Non-Linear: The paper demonstrates that latency doesn't drop smoothly as you remove channels; it often looks like a "staircase" due to memory alignment. Archtree’s on-the-fly measurements capture these "dips" that lookup tables miss.
  • Precision Budgeting: Archtree hits the target latency much more accurately. For example, when aiming for 50% latency on a GPU, Archtree hit exactly 0.5, whereas HALP was slightly off at 0.53.
  • The Power of "A": Increasing the number of active nodes ($A$) in the search tree yields diminishing returns after $A=3$, but even a small amount of parallel exploration significantly boosts final accuracy compared to greedy methods ($A=1$).

Limitations and Future Work

The authors acknowledge that while Archtree is more efficient than an exhaustive search, it is still computationally heavier than a simple greedy pruning method. Future work includes exploring more sophisticated importance criteria and expanding the method to Transformers (like ViT or BERT), which are composed of repeating blocks well-suited for latency profiling.

Summary updated

BibTeX
@misc{reboul2023archtree,
  author = {Rémi Ouazan Reboul and Edouard Yvinec and Arnaud Dapogny and Kevin Bailly},
  title = {{Archtree: on-the-fly tree-structured exploration for latency-aware pruning of deep neural networks}},
  year = {2023},
  eprint = {2311.10549},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2311.10549},
}
Figure