Soft then Hard: Rethinking the Quantization in Neural Image Compression
Zongyu Guo, Zhizheng Zhang, Runsen Feng, Zhibo Chen
Abstract
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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers15
- ELIC: Efficient Learned Image Compression with Unevenly Grouped Space-Channel Contextual Adaptive CodingDailan He, Ziming Yang, Weikun Peng, Rui Ma et al.CVPR 2022 · 363 citations
- MLIC: Multi-Reference Entropy Model for Learned Image CompressionWei Jiang, Jiayu Yang, Yongqi Zhai, Peirong Ning et al.ACM MM 2023 · 117 citations
- NVRC: Neural Video Representation CompressionHo Man Kwan, Ge Gao, Fan Zhang, Andrew Gower et al.NeurIPS 2024 · 44 citations
- Compression with Bayesian Implicit Neural RepresentationsZongyu Guo, Gergely Flamich, Jiajun He, Zhibo Chen et al.NeurIPS 2023 · 38 citations
- Semantically Structured Image Compression via Irregular Group-Based DecouplingRuoyu Feng, Yixin Gao, Xin Jin, Runsen Feng et al.ICCV 2023 · 25 citations
Builds on9
- High-Fidelity Generative Image CompressionFabian Mentzer, George Toderici, Michael Tschannen, Eirikur AgustssonNeurIPS 2020 · 675 citations
- From Variational to Deterministic AutoencodersPartha Ghosh, Mehdi S. M. Sajjadi, Antonio Vergari, Michael J. Black et al.ICLR 2020 · 298 citations
- Variable Rate Deep Image Compression With a Conditional AutoencoderYoojin Choi, Mostafa El-Khamy, Jungwon LeeICCV 2019 · 265 citations
- Improving Inference for Neural Image CompressionYibo Yang, Robert Bamler, Stephan MandtNeurIPS 2020 · 151 citations
- Universally Quantized Neural CompressionEirikur Agustsson, Lucas TheisNeurIPS 2020 · 118 citations
Related papers
- Correcting Quantization-Induced Gradient Mismatch in Neural Image CompressionChanghao Peng, Yuqi Ye, Wei GaoAAAI 2026
- Learning Optimal Lattice Vector Quantizers for End-to-end Neural Image CompressionXi Zhang, Xiaolin WuNeurIPS 2024 · 12 citations
- Training Quantised Neural Networks with STE Variants: the Additive Noise Annealing AlgorithmMatteo Spallanzani, Gian Paolo Leonardi, Luca BeniniCVPR 2022 · 2 citations
- Nonuniform-to-Uniform Quantization: Towards Accurate Quantization via Generalized Straight-Through EstimationZechun Liu, Kwang-Ting Cheng, Dong Huang, Eric P. Xing et al.CVPR 2022 · 108 citations
- DiVeQ: Differentiable Vector Quantization Using the Reparameterization TrickMohammad Hassan Vali, Tom Bäckström, Arno SolinICLR 2026 · 6 citations
