Abstract
Deep Neural Networks (DNNs) are the heavyweights of modern AI, but their massive size makes them difficult to deploy on mobile devices or edge hardware. Researchers from Tencent America propose Structured Weight Unification, a method that "unifies" groups of weights to share the same values in a hardware-friendly 3D structure. By combining this with a novel 3D pyramid-based encoding scheme, they achieve up to 14× compression and significant inference speedups on ImageNet models with minimal loss in accuracy.
Introduction
Modern AI relies on massive Deep Neural Networks (DNNs), yet their scale often precludes deployment on resource-constrained edge devices. Traditional compression techniques like pruning (deleting connections) and quantization (reducing bit-depth) frequently force a trade-off between model size, inference speed, and predictive accuracy. This paper introduces a middle ground: instead of simply deleting weights, we can unify them into structured groups that share values, aligning model architecture with hardware efficiency.
The Efficiency Trilemma
The core challenge in model compression is balancing three competing factors:
- Storage: Large models exceed the memory capacity of mobile hardware.
- Speed: While unstructured pruning reduces model size, it creates sparse matrices that lead to random memory access, often slowing down computation on standard hardware.
- Accuracy: Structured pruning (removing entire channels) is fast but often significantly degrades the model's performance.
Standard approaches typically treat pruning and quantization as separate or jointly optimized but unstructured tasks.
The authors argue that weights should not merely be set to zero. Instead, encouraging weights to share values in a way that aligns with General Matrix Multiplication (GEMM) allows hardware to reuse computation results, improving speed without the "dumb" removal of entire channels.
Proposed Methodology: Structured Weight Unification
The paper introduces a two-pronged innovation: structured unification and efficient 3D encoding.
1. Structured Weight Unification
The authors reshape 4D weight tensors into 3D "Coding Tree Units" (CTU3D). Within these units, weights are partitioned into small $2 \times 2 \times 2$ blocks.
- The Unify Step: All weights within a block are forced to share the same absolute value (the mean of the original values) while retaining their original signs.
- GEMM Alignment: Because these values are identical, hardware can perform a single multiplication and reuse the result for the entire block, drastically reducing Multiply-Accumulate (MAC) operations.
2. 3D Pyramid-Based Encoding
To maximize storage savings, the unified weights are encoded using a 3D-Octree method. This recursively subdivides the 3D weight tensor. If an entire branch of the tree shares the same value or is pruned to zero, the encoder "skips" those nodes, representing large network segments with minimal bits.
3. Iterative Training
The process utilizes a two-step iterative framework: first, a percentage of weights are unified; then, the remaining weights are fine-tuned to recover accuracy.
Key Insights
- Generalized Pruning: Pruning is a special case of unification where the unified value is zero. By allowing non-zero unified values, the network retains more capacity.
- Locality and Correlation: By grouping physically adjacent weights, the authors minimize the distortion caused by forcing equality, leveraging the natural local correlations in neural networks.
- Regularization Bonus: At low compression rates, unification can act as a form of regularization, sometimes improving performance over the uncompressed baseline.
Experimental Results
The researchers validated their approach across diverse tasks:
- ResNet-50 (ImageNet): Achieved a 10× to 14× compression rate and a speedup of 0.83 gigaMACs, maintaining Top-1 accuracy within 2% of the original.
- MobileNet-V2: Even on this optimized architecture, the method achieved a 7× to 9× compression rate with improved inference speed.
- Audio Classification: On DCASE2019 tasks, the method showed a 20× compression rate and a 3× speedup.
Limitations and Future Work
While effective, the authors identify several areas for future research. Compact models like MobileNet show higher sensitivity to unification, suggesting a need for more sophisticated retraining. Additionally, the first and last layers are currently skipped due to their sensitivity. Finally, realizing theoretical speedups in the real world requires specialized hardware kernels (e.g., CUDA) optimized for $2 \times 2 \times 2$ unified blocks.
Summary updated