TL;DR
PSViT introduces a single-shot, structured channel-wise pruning methodology designed specifically for Spiking Vision Transformers (SViTs). By eliminating non-significant weight channels without disrupting network topology, PSViT achieves a 22.4% memory saving and a 17.5% reduction in FLOPs on ImageNet-1K with minimal accuracy loss, making low-power SViTs deployable on standard hardware accelerators without requiring expensive retraining.
What Problem Does This Paper Address?
Spiking Vision Transformers (SViTs) are an exciting frontier in AI, combining the high performance of conventional Vision Transformers (ViTs) with the extreme energy efficiency of Spiking Neural Networks (SNNs). This makes them ideal candidates for edge devices and embedded systems. However, SViTs are notoriously massive and memory-intensive, making them difficult to deploy on resource-constrained hardware.
While model pruning is a standard solution to compress neural networks, existing SViT pruning techniques rely on unstructured pruning. This creates a random pattern of zero-weights throughout the model. As illustrated in the paper, unstructured sparsity requires specialized hardware accelerators to handle complex data indexing; when mapped onto standard, widely used hardware like systolic arrays, it yields absolutely no performance or speed benefits.
Furthermore, traditional pruning methods require iterative cycles of retraining to recover lost accuracy, which demands massive computational overhead and access to the original labeled training datasets. PSViT addresses this by proposing a training-free, hardware-friendly structured pruning pipeline.
Methods
PSViT introduces a three-step structured channel-wise pruning pipeline that targets the most memory-heavy layers of an SViT model:
- Layer-wise Sensitivity Analysis and Memory Profiling: The framework profiles the network to identify the top-$K$ largest, most memory-consuming layers. It then systematically tests each layer's sensitivity by pruning its channels at ratios ranging from 1% to 64% and recording the impact on accuracy. Channel importance is determined locally within each filter using an $L_2$-norm score for convolutional layers and absolute values for linear layers.
- Uniform Channel-wise Pruning: Using the sensitivity data, a safe baseline pruning ratio (e.g., 16%) is selected and applied uniformly across all the top-$K$ memory-intensive layers.
- Fine-Grained Channel-wise Pruning: To maximize compression, PSViT evaluates block-wise sensitivity. It aggressively increases the pruning ratio (e.g., to 32% or higher) in robust, less-sensitive blocks while keeping sensitive blocks conservatively pruned. A manual override mechanism allows fine-tuning of specific layer ratios to optimize the final memory-accuracy trade-off.
Datasets
The methodology was evaluated using the ImageNet-1K dataset, a large-scale classification benchmark crucial for validating real-world performance and ensuring the pruned models scale effectively beyond simple toy datasets.
Key Insights and Ideas
- The Downsampling Vulnerability: Layer-wise analysis revealed that downsampling layers are incredibly sensitive to structured pruning. Because they are responsible for preserving high-level spatial information, removing entire channels from these layers causes a sharp drop in accuracy. Consequently, they must be pruned conservatively.
- Attention and MLP Resilience: In contrast to downsampling layers, transformer-based attention and MLP (Multi-Layer Perceptron) blocks proved highly resilient to aggressive pruning, retaining competitive accuracy even when significantly thinned out.
- Local vs. Global Pruning: Instead of aggregating channel importance globally across the entire layer, PSViT evaluates channel importance locally within each filter. This preserves the hierarchical composition of the network while still allowing for aggressive channel removal.
Key Results
The authors evaluated PSViT on the state-of-the-art Spike-Driven Transformer v2 (SDTv2) architecture.
- Single-Shot (No Retraining): Without any post-pruning fine-tuning, PSViT achieved a 22.4% memory saving (reducing parameters from 55.4M to 43.0M) and a 17.5% reduction in FLOPs, while maintaining a top-1 accuracy of 70.3% (down from the baseline of 73.3%).
- With Fine-Tuning: When a brief fine-tuning step was applied to the best trade-off configuration (Config 24), the accuracy recovered to 72.8%, sitting within a mere 0.5% of the original unpruned model.
Limitations and Future Work
While PSViT successfully demonstrates a structured pruning pipeline, the final step of the fine-grained configuration relies on a "manual override" dictionary to tweak specific layer ratios based on empirical observations. Future work could automate this step by integrating reinforcement learning or neural architecture search (NAS) to discover the optimal layer-wise pruning ratios automatically. Additionally, the evaluation is primarily focused on a single backbone architecture (SDTv2), leaving room to verify its generalizability across other emerging SViT variants.
Summary updated