Abstract
Quantization is a critical technique for compressing over-parameterized neural networks, yet providing rigorous error analysis for deep, multi-layer architectures remains a significant challenge due to non-convex loss functions and non-linear activations. This paper introduces Stochastic Path Following Quantization (SPFQ), a fast post-training algorithm that leverages a greedy path-following mechanism and a stochastic quantizer. We establish the first full-network error bounds under minimal assumptions, demonstrating that quantization error decays linearly as network over-parametrization increases. Furthermore, we show that achieving near-optimal error bounds requires only $O(\log \log N)$ bits per weight, where $N$ is the number of neurons per layer.
Introduction
As deep neural networks (DNNs) continue to grow in scale, their deployment on resource-constrained edge devices is limited by memory and computational overhead. Quantization—the process of mapping high-precision weights (e.g., 32-bit float) to a discrete, finite alphabet (e.g., 4-bit or 6-bit integers)—is a standard solution.
Despite its empirical success, a theoretical gap persists. Most existing error analyses are restricted to single layers or shallow networks. Tracking error propagation through deep architectures is mathematically difficult because non-linear activations, such as ReLU, render the statistical distribution of signals across layers intractable. SPFQ bridges this gap by providing a framework that accounts for the cumulative error across the entire network.
The SPFQ Algorithm
SPFQ builds upon the Greedy Path Following Quantization (GPFQ) framework but introduces a critical element of randomness to facilitate theoretical analysis and improve performance.
1. Stochastic Quantizer
Unlike deterministic quantizers that round weights to the nearest available value, SPFQ employs a stochastic rounding mechanism. This randomness allows the use of the Convex Order mathematical framework to bound the error. By treating the quantization process as a stochastic approximation, the authors can bypass the complexities of tracking exact signal distributions through non-linearities.
2. Two-Phase Pipeline
The algorithm operates in two distinct phases:
- Phase I (Data Alignment): The algorithm identifies a "virtual" weight vector that ensures the output of the quantized layer aligns as closely as possible with the original layer's output given the input data.
- Phase II (Quantization): These virtual weights are then mapped to the finite alphabet using the stochastic quantizer.
3. Computational Efficiency
SPFQ is a post-training quantization (PTQ) method, meaning it does not require retraining the model. Its computational complexity scales linearly with the number of weights ($O(w)$), making it highly efficient for massive modern architectures.
Theoretical Insights
The Blessing of Over-parametrization
A primary contribution of this work is the proof that quantization error actually benefits from network width. The authors demonstrate that the relative square quantization error exhibits a linear decay ($1/N$) as the number of neurons in a layer increases. This suggests that larger, more over-parameterized networks are inherently more robust to quantization noise.
Log-Log Bit Scaling
The paper establishes that to achieve error bounds equivalent to an infinite alphabet (continuous weights), one only needs a bit-depth on the order of $\log \log N$. For a layer with 1,000 neurons, this implies that very low bit-widths are sufficient to maintain high fidelity. This provides a theoretical justification for the success of 4-bit and 5-bit quantization in large-scale models like LLMs and CNNs.
Experimental Results
The researchers evaluated SPFQ on the ImageNet (ILSVRC-2012) dataset using VGG-16, ResNet-18, and ResNet-50 architectures.
- High Fidelity: At 6-bit quantization, SPFQ achieved less than a 0.5% drop in Top-1 accuracy across all tested models.
- Low Bit-Width Performance: At 4 bits, the accuracy degradation remained minimal, with VGG-16 losing approximately 1.1% and ResNet-18 losing approximately 2.4%.
- Batch Size Scaling: The performance of the stochastic algorithm improves with the batch size ($m$) used for the quantization process. As $m$ increases, the gap between SPFQ and deterministic methods closes, with SPFQ often outperforming counterparts at higher bit-widths.
Conclusion and Future Work
SPFQ provides a robust theoretical foundation for understanding why deep network quantization works. By introducing stochasticity, the authors developed a tractable error analysis for full-network architectures.
Future research directions include extending these proofs to a wider variety of activation functions (e.g., GeLU, Swish) and addressing the simultaneous quantization of both weights and activations. Additionally, refining the hyperparameter tuning for the quantization alphabet step-size could further automate the deployment of SPFQ across diverse hardware targets.
Summary updated