Researchers from Alibaba DAMO Academy and several partner universities have introduced a novel approach to Deep Neural Network (DNN) pruning that bridges the gap between high-accuracy unstructured pruning and hardware-efficient structured pruning. Their proposed Gather-Scatter (GS) patterns optimize memory access on edge devices, achieving significant speedups without compromising model quality.
The Challenge: Accuracy vs. Hardware Efficiency
Pruning is a critical technique for deploying massive DNNs on resource-constrained devices like mobile phones and embedded sensors. By deleting unimportant weights, memory and computation requirements are reduced. However, existing methods force a difficult trade-off:
- Unstructured (Irregular) Sparsity: Pruning weights anywhere maintains high accuracy but creates irregular memory access patterns. This leads to "bank conflicts" on modern hardware, where multiple processing units compete for the same memory location, causing significant bottlenecks.
- Structured (Block) Sparsity: Pruning in fixed blocks is hardware-friendly but often removes important weights simply because they are adjacent to unimportant ones, leading to a sharp decline in model accuracy.
Modern processors, such as Digital Signal Processors (DSPs), often feature Tightly Coupled Memories (TCMs) and gather/scatter engines designed for indirect memory access. The authors observed that current sparse models fail to load-balance data across these memory banks, leaving hardware resources underutilized.
Proposed Method: Gather-Scatter (GS) Patterns
The core innovation is the GS pattern, which constrains pruning so that remaining non-zero weights are perfectly distributed across memory banks. This hardware-software co-design ensures that data can be fetched in a single cycle without conflicts.
- GS Horizontal Pattern: In each row of a weight matrix, non-zero weights are selected such that their column indices (modulo the number of memory banks) are unique. This allows a single "gather" instruction to retrieve all necessary data simultaneously.
- Vertical & Hybrid Patterns: These extend the balancing logic across multiple rows to better utilize SIMD (Single Instruction, Multiple Data) hardware, enabling parallel processing of multiple neurons.
- Compact Storage: The researchers developed a specialized storage format, similar to Block Sparse Row, that efficiently maps active weights to their corresponding activations for the hardware engine.
Key Results and Performance
The approach was validated across three domains: machine translation (GNMT on WMT), image recognition (ResNet50 on ImageNet), and speech recognition (Jasper on LibriSpeech).
As shown in the evaluation of the GNMT translation task, GS patterns maintain accuracy levels comparable to unstructured pruning. Specifically, GS-Horizontal outperformed traditional block-structured pruning by 1.1 to 1.5 BLEU points at identical sparsity levels.
In terms of hardware performance, cycle-accurate simulations using GEM5 demonstrated that GS kernels achieve a 4.19x average speedup over dense kernels. When compared to the most efficient block-based patterns, GS patterns provided 2–3x better runtime latency at the same accuracy level, as they allow for more aggressive pruning without the typical quality loss associated with rigid structures.
Conclusion and Future Work
By leveraging existing gather/scatter hardware found in many DSPs and CPUs, the GS pattern offers a "free" accuracy boost compared to structured pruning. While the current benefits are most pronounced on hardware with multi-bank TCMs, this research paves the way for integrating load-balanced sparsity into automated AutoML pruning frameworks and more complex neural architectures.
Summary updated