TL;DR
Outlier Channel Splitting (OCS) is a novel post-training quantization technique that handles "outlier" weights and activations by duplicating their channels and halving their values. This "functionally identical" transformation moves extreme values toward the center of the quantization grid, significantly improving accuracy at low bit-widths (4-6 bits) without requiring retraining or access to the original training dataset.
What Problem Does This Paper Address?
To run deep neural networks (DNNs) on edge devices or specialized hardware, we often use quantization: converting high-precision floating-point numbers (FP32) into low-precision integers (like INT8 or INT4). This saves memory and speeds up computation.
The challenge lies in the "Outlier Dilemma." DNN weights and activations typically follow a bell-shaped distribution with long tails. Standard hardware uses a linear quantization grid with evenly spaced points. If you stretch the grid to include the rare, extreme outliers, you "waste" resolution on values that rarely occur, leaving the common values with high rounding errors. If you "clip" the outliers (cut them off), you preserve resolution for the majority but lose the critical information contained in those extreme values.
While retraining the model can help it adapt to these errors, many real-world scenarios involve "black-box" models where the user lacks the original training data, the expertise, or the compute budget to retrain.
Methods
The authors propose Outlier Channel Splitting (OCS). Instead of throwing outliers away (clipping) or stretching the grid (linear mapping), OCS changes the network structure to make the distribution more "quantization-friendly."
- The Split: OCS identifies channels containing the largest outliers. It duplicates these channels and then halves the values in both. Because the operation is linear (like in a convolutional or fully connected layer), the sum of the two halved channels equals the original value. The network remains functionally identical, but the maximum absolute value in those channels is now halved.
- Quantization-Aware (QA) Splitting: A simple "divide by two" can lead to rounding errors where both halves round in the same direction, doubling the error. The authors introduced a specific splitting ratio—$(w - 0.5)/2$ and $(w + 0.5)/2$—which ensures that the quantized sum of the split values exactly matches the quantized version of the original value.
- Channel Selection: Since OCS increases model size (more channels = more memory), the authors use an "expansion ratio" ($r$) to decide how many channels to split. They prioritize channels with the largest absolute values to get the most "bang for their buck" in reducing the distribution's dynamic range.
Datasets
The researchers evaluated OCS across two main domains:
- Computer Vision: ImageNet classification using four popular architectures: VGG-16 (with Batch Norm), ResNet-50, DenseNet-121, and Inception-V3.
- Language Modeling: An RNN model with two stacked LSTM layers evaluated on the WikiText-2 dataset.
Key Insights and Ideas
- The "Functionally Identical" Advantage: Unlike clipping, which is inherently lossy, OCS is a mathematically exact transformation (ignoring quantization for a moment). It allows the model to "fit" into a smaller quantization grid without losing the information held by outliers.
- Weights vs. Activations: OCS is highly effective for weights because they are static and can be processed offline. For activations, OCS is trickier because the "outlier" channels can change depending on the input image. The authors found that "Oracle OCS" (knowing the outliers for every batch) works great, but practical, static activation OCS is less effective than simple clipping.
- Synergy with Clipping: OCS and clipping aren't mutually exclusive. The best results often come from using OCS to handle the most extreme outliers, followed by a mild clip to further tighten the grid.
- Commodity Hardware Ready: Unlike previous "outlier-aware" hardware designs that require custom circuits to handle high-precision outliers, OCS works on standard GPUs and CPUs because it only involves duplicating standard layers.
Key Results
- Superiority at Low Bits: On ImageNet, OCS significantly outperformed state-of-the-art clipping methods (like MSE or KL-divergence) at 4-bit and 5-bit weight quantization. For example, on Inception-V3 at 4 bits, OCS + Clipping achieved a massive accuracy boost compared to clipping alone.
- Minimal Overhead: An expansion ratio of just $r=0.02$ (a 2% increase in model size) was often enough to outperform all existing clipping-only methods.
- RNN Success: For LSTM models, where clipping often fails to show any benefit, OCS successfully reduced perplexity (improved performance) at 6-bit and 5-bit precision.
Limitations and Future Work
- Activation Challenges: As noted, OCS for activations is difficult to implement efficiently in a "static" way. Future work could explore more sophisticated, dynamic channel selection methods that don't add too much runtime latency.
- Memory Trade-off: While the overhead is small (~1-5%), it is still an increase in model size. In extremely memory-constrained environments, this might be a dealbreaker.
- Training Integration: The authors suggest that OCS principles could be used during training to help "shape" weight distributions, potentially leading to models that are inherently easier to quantize from the start.
Reference: Zhao, R., et al. (2019). Improving Neural Network Quantization without Retraining using Outlier Channel Splitting. Proceedings of the 36th International Conference on Machine Learning (ICML).
Summary updated