LPViT: Low-Power Semi-structured Pruning for Vision Transformers

Kaixin Xu, Zhe Wang, Chunyun Chen, Xue Geng, Jie Lin, Xulei Yang, Min Wu, Xiaoli Li, Weisi Lin

Abstract

Vision Transformers (ViTs) have achieved state-of-the-art performance in computer vision but face significant deployment challenges on edge devices due to their high memory and power demands. This paper presents LPViT, a hardware-aware, block-structured pruning method designed to optimize ViTs for real-world efficiency. By utilizing a second-order Taylor approximation and incorporating an explicit power consumption constraint, LPViT identifies and removes redundant weight blocks. Experimental results on ImageNet-1K and Cityscapes demonstrate that LPViT achieves up to a 3.93x speedup and 1.4x power reduction with minimal accuracy loss, effectively bridging the gap between model performance and hardware constraints.

Introduction: The Efficiency Challenge in ViTs

While Vision Transformers (ViTs) often outperform traditional convolutional neural networks (CNNs), their massive memory footprints and high power consumption hinder deployment on resource-constrained devices like smartphones and IoT sensors. The primary challenge in model compression is navigating the trade-off between pruning granularity and hardware efficiency.

Unstructured pruning, which removes individual weights, maintains high accuracy but fails to deliver speedups on modern hardware (GPUs/TPUs) not designed for random sparsity. Conversely, structured pruning removes entire rows or channels, offering high speed but often at the cost of significant accuracy degradation.

The trade-off between accuracy preservation and hardware efficiency across different pruning granularities.

LPViT identifies a "Goldilocks" zone: block-structured (semi-structured) pruning. By pruning small, fixed-size blocks of weights, the method aligns model sparsity with General Matrix Multiply (GEMM) kernels, achieving the speed of structured pruning with the precision of unstructured methods.

The LPViT Methodology

The LPViT framework consists of three core components designed to optimize ViTs for low-power inference:

  1. Block-wise Pruning: Instead of evaluating individual neurons, the algorithm assesses the importance of 2D blocks (e.g., 32x32). It employs a first-order Taylor expansion to identify blocks that contribute minimally to the model's output.
  2. Hardware-Aware Objective: Unlike standard methods that focus solely on FLOP reduction, LPViT integrates a specific power consumption constraint ($\mathcal{L}_{power}$) into the learning objective. This allows the system to prioritize pruning layers that are particularly power-hungry on actual silicon.
  3. Efficient Optimization: To handle the computational complexity of second-order derivatives in large transformers, the authors use an empirical Fisher approximation and a "subvector update" technique. This reduces the mathematical complexity from biquadratic to linear, enabling rapid pruning.
The LPViT framework: from prunable weights to power-constrained block-structured pruning.

Experimental Evaluation

The researchers evaluated LPViT on two primary benchmarks: ImageNet-1K for classification (using DeiT and Swin architectures) and Cityscapes for urban semantic segmentation.

Key Results and Insights

  • Hardware Speedups: On the VITA RISC-V platform, LPViT achieved a 3.93x speedup for DeiT-B. On NVIDIA A100 GPUs, a 1.79x speedup was observed.
  • Power Savings: The method yielded a 1.4x reduction in inference power on real-world GPUs.
  • Accuracy Preservation: On DeiT-Base, the model was reduced to 29% of its original FLOPs while maintaining 81.03% accuracy (a negligible 0.77% drop). Notably, on DeiT-Small, the pruned model actually improved Top-1 accuracy by 0.89% at 50% FLOPs, suggesting that block pruning acts as an effective regularizer.
  • Layer Sensitivity: The optimization process automatically identified that projection layers in Multi-Head Attention (MHA) blocks are highly redundant, while classification heads and final transformer blocks are critical for performance.
  • Downstream Transferability: A DeiT-Base backbone pruned by 50% showed only a 1.27 mIoU loss on Cityscapes, confirming that the pruned model retains its representational intelligence for complex tasks.

Conclusion

LPViT demonstrates that block-structured pruning is a highly effective strategy for deploying heavy Vision Transformers on edge hardware. By aligning sparsity with hardware execution patterns and incorporating power-aware constraints, the framework achieves significant efficiency gains without sacrificing accuracy. Future work may explore combining weight pruning with token pruning or layer skipping to further enhance performance.

Paper Citation: Xu, K., Wang, Z., et al. "LPViT: Low-Power Semi-structured Pruning for Vision Transformers." arXiv:submit/5726756 [cs.CV] 12 Jul 2024.

Summary updated

BibTeX
@inproceedings{xu2024lpvit,
  author = {Kaixin Xu and Zhe Wang and Chunyun Chen and Xue Geng and Jie Lin and Xulei Yang and Min Wu and Xiaoli Li and Weisi Lin},
  title = {{LPViT: Low-Power Semi-structured Pruning for Vision Transformers}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-73209-6\_16},
}
Figure