[Paper Review] Soft then Hard: Rethinking the Quantization in Neural Image Compression
This paper proposes a soft-then-hard quantization strategy for neural image compression that first trains with additive uniform noise to learn expressive latent representations, then fine-tunes with hard quantization to close the train-test mismatch. It further introduces scaled additive uniform noise to enable adaptive quantization granularity via a new variational upper bound, achieving 8.9% BD-rate savings over state-of-the-art models.
Quantization is one of the core components in lossy image compression. For neural image compression, end-to-end optimization requires differentiable approximations of quantization, which can generally be grouped into three categories: additive uniform noise, straight-through estimator and soft-to-hard annealing. Training with additive uniform noise approximates the quantization error variationally but suffers from the train-test mismatch. The other two methods do not encounter this mismatch but, as shown in this paper, hurt the rate-distortion performance since the latent representation ability is weakened. We thus propose a novel soft-then-hard quantization strategy for neural image compression that first learns an expressive latent space softly, then closes the train-test mismatch with hard quantization. In addition, beyond the fixed integer quantization, we apply scaled additive uniform noise to adaptively control the quantization granularity by deriving a new variational upper bound on actual rate. Experiments demonstrate that our proposed methods are easy to adopt, stable to train, and highly effective especially on complex compression models.
Motivation & Objective
- To address the train-test mismatch in neural image compression caused by differentiable quantization approximations.
- To improve latent representation ability, which is weakened by straight-through estimator and soft-to-hard annealing.
- To maintain the expressive latent space learning of additive uniform noise while eliminating its train-test discrepancy.
- To enable adaptive quantization granularity through a learnable noise scale, improving rate-distortion efficiency.
- To develop a plug-and-play method that enhances existing noise-relaxed compression models without architectural changes.
Proposed method
- First, train the encoder using additive uniform noise as a soft approximation of quantization to learn a smooth, expressive latent space.
- Then, perform ex-post tuning of the decoder using hard quantization to align with the true test-time behavior and close the train-test mismatch.
- Introduce scaled additive uniform noise by deriving a new variational upper bound on the actual rate, allowing element-wise adaptive quantization step sizes.
- The noise scale is learned end-to-end, enabling context-aware quantization granularity that correlates with image texture and channel-specific complexity.
- The method is plug-and-play: the soft-then-hard strategy and scaled noise can be applied to any existing noise-relaxed compression model.
- The approach combines the expressiveness of noise-based training with the accuracy of hard quantization in inference, improving rate-distortion performance.
Experimental results
Research questions
- RQ1Why do straight-through estimator and soft-to-hard annealing degrade rate-distortion performance despite eliminating train-test mismatch?
- RQ2Can we preserve the expressive latent space of additive uniform noise while resolving its train-test mismatch?
- RQ3How can we make quantization granularity adaptive to image content and latent channel characteristics?
- RQ4Does a two-stage training strategy—soft training followed by hard fine-tuning—improve compression performance across diverse models?
- RQ5Can a learned, adaptive noise scale improve rate-distortion efficiency beyond fixed quantization step sizes?
Key findings
- The soft-then-hard quantization strategy achieves 8.9% BD-rate savings over the state-of-the-art model (Cheng et al., 2020) when both techniques are applied together.
- The proposed method improves rate-distortion performance across all bitrates, with stable gains even at high bitrates where previous annealing methods underperform.
- Applying scaled uniform noise enables element-wise adaptive quantization, with learned noise scales correlating strongly with image texture and channel-specific complexity.
- The method outperforms both STE-based and SGA-based fine-tuning, which suffer from training instability and suboptimal performance.
- When optimized for MS-SSIM, the proposed method delivers perceptually superior reconstructions with stable improvements across all bitrates.
- The approach is robust and generalizable, delivering state-of-the-art results when deployed on other powerful models, including Guo et al. (2020), surpassing the VVC standard.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.