TL;DR
This paper introduces a fast and robust framework for mixed-precision post-training quantization (PTQ) by deriving a novel probabilistic layerwise error analysis. By separating local quantization noise from propagated error, the authors create a simple, "solver-free" greedy allocation algorithm that is up to 2,570x faster than current state-of-the-art methods while remaining significantly more robust to corrupted calibration data.
What Problem Does This Paper Address?
Deep neural networks are often too large and power-hungry for embedded devices like autonomous vehicles or drones. Post-training quantization (PTQ) helps by reducing the precision of weights (e.g., from 32-bit floats to 4-bit integers) using only a small "calibration" dataset, avoiding the need for expensive full-model retraining.
However, not all layers are equally sensitive to precision loss. Mixed-precision PTQ assigns different bit-widths to different layers to optimize the accuracy-memory trade-off. This presents three major challenges:
- Combinatorial Explosion: For a typical network, there are trillions of possible bit-width configurations, making exhaustive search impossible.
- Computational Cost: Existing methods often require complex external solvers (like integer programming) or multiple full-network passes, which are slow.
- Data Sensitivity: PTQ relies on a tiny calibration set. If this data is noisy or corrupted, the resulting bit-allocation often fails, leading to poor model performance.
Methods
The authors propose a method that is both mathematically grounded and practically efficient. Their approach centers on a probabilistic layerwise analysis of quantization error.
Key components include:
- Error Separation: They decompose the total error at any given layer into two parts: the error propagated from previous layers and the local perturbation introduced by quantizing the current layer.
- Separable Local Scores: Instead of running the whole network to test every configuration, they compute a local sensitivity score ($s^{loc}_g$) for each layer block. This score uses the mean and standard deviation of the local quantization error, calculated during a single full-precision pass over the calibration data.
- Solver-Free Greedy Allocation: The algorithm starts with all layers at maximum precision and greedily reduces the bit-width of the layer that saves the most memory for the smallest increase in the local error score. This eliminates the need for heavy-duty optimization solvers.
- Probabilistic Robustness: By using a probabilistic bound (based on the one-sided Chebyshev inequality) rather than a deterministic "worst-case" bound, the method naturally ignores outliers in corrupted calibration data.
Datasets
The researchers evaluated their framework on two primary tasks:
- Image Denoising: Using the DRUNet architecture on the CelebA and BSDS500 datasets.
- Image Generation: Using a Latent Diffusion Model (LDM) on the CelebA-HQ dataset.
To test robustness, they introduced "stress conditions" by corrupting the calibration images with random spatial masks and noise, while keeping the final test sets clean.
Key Insights and Ideas
- Local is Enough: A major "aha moment" is that you don't necessarily need to model complex cross-layer interactions to get a good bit-allocation. A well-designed local metric, captured during a single forward pass, is sufficient to match SOTA performance.
- Variance Matters: The inclusion of the standard deviation in the local score ($s^{loc}_g$) is critical. It penalizes layers where quantization error fluctuates wildly across different images, leading to more stable and robust allocations.
- Speed is a Feature: Because the scores are pre-computed and the allocation is a simple greedy rule, the method allows for near-instantaneous exploration of different memory budgets.
Key Results
The proposed method achieves a rare "triple threat" of being faster, more robust, and equally accurate compared to existing baselines.
- Massive Speedups: In matched timing comparisons, the bit-allocation was 28x to 2,570x faster than baselines like CLADO and AIMET. For example, while CLADO took over 6 hours to allocate bits for a specific task, this method finished in under 9 seconds.
- Superior Robustness: When calibration data was corrupted, the method maintained stable performance, while competitors saw PSNR drops of over 5 dB. In some cases, the authors reported PSNR gains of up to 7.5 dB over the next best method under corruption.
- Clean Performance: On clean data, the method matches or slightly exceeds the performance of much more complex optimization-based methods.
As shown in Table 1 above, at a target budget of 4 bits, the proposed method matches the PSNR of the high-complexity CLADO baseline while significantly outperforming uniform quantization and OMPQ-ORM.
Limitations and Future Work
While the results are impressive, the authors note a few areas for further exploration:
- Hardware Deployment: The study focuses on the allocation of bits. Actually running these mixed-precision models on specific embedded hardware remains a challenge due to limited software support for non-standard bit-widths (like 5-bit or 7-bit).
- Theoretical Tightness: While the probabilistic bounds are useful for allocation, the authors suggest that further refining these bounds to be even tighter remains an open theoretical question.
- Activation Quantization: This work primarily focuses on weight quantization; extending the probabilistic layerwise analysis to include activation quantization is a logical next step.
Summary updated