[Paper Review] Flexible Neural Image Compression via Code Editing
This paper proposes Code Editing, a novel framework for flexible neural image compression that enables continuous rate-distortion (R-D) trade-off, region-of-interest (ROI) coding, and multi-distortion optimization using a single decoder. By leveraging semi-amortized inference and adaptive quantization, it edits latent codes at inference time to achieve variable bitrate control without retraining, outperforming existing methods in R-D performance and flexibility.
Neural image compression (NIC) has outperformed traditional image codecs in rate-distortion (R-D) performance. However, it usually requires a dedicated encoder-decoder pair for each point on R-D curve, which greatly hinders its practical deployment. While some recent works have enabled bitrate control via conditional coding, they impose strong prior during training and provide limited flexibility. In this paper we propose Code Editing, a highly flexible coding method for NIC based on semi-amortized inference and adaptive quantization. Our work is a new paradigm for variable bitrate NIC. Furthermore, experimental results show that our method surpasses existing variable-rate methods, and achieves ROI coding and multi-distortion trade-off with a single decoder.
Motivation & Objective
- To address the lack of flexible bitrate control in neural image compression (NIC), which typically requires separate models for each R-D point.
- To overcome the limitations of conditional NIC methods that rely on discrete, predefined Lagrange multipliers and suffer from performance decay during interpolation.
- To enable fine-grained, continuous R-D trade-off and spatially adaptive bits allocation akin to traditional codecs, but with neural network performance.
- To explore the potential of semi-amortized inference for variable-rate NIC, previously unexplored in this context.
- To achieve multi-distortion trade-off (e.g., between MSE and LPIPS) using a single model and decoder.
Proposed method
- Code Editing uses semi-amortized inference to optimize latent codes at inference time based on desired R-D trade-off, parameterized by a Lagrange multiplier λ.
- It initializes the latent code using a pre-trained encoder at a base λ₀ and then performs gradient-based optimization to reach the target λ.
- Adaptive quantization step size is introduced to stabilize performance and improve the speed-performance trade-off.
- The method supports arbitrary spatial bits allocation by applying ROI maps that guide the optimization of latent codes per region.
- Multi-distortion trade-off is achieved by modifying the loss function to include perceptual (e.g., LPIPS) and fidelity (e.g., MSE) terms with learnable weights.
- All operations are performed with a single fixed decoder and entropy model, trained only once at a base λ₀.
Experimental results
Research questions
- RQ1Can semi-amortized inference be effectively leveraged to enable continuous, flexible bitrate control in neural image compression?
- RQ2Can Code Editing achieve better R-D performance than existing variable-rate NIC methods with a single decoder and fixed model?
- RQ3Can Code Editing support spatially adaptive bits allocation for ROI-based coding without retraining or complex priors?
- RQ4Can the method achieve multi-distortion trade-off (e.g., balancing MSE and LPIPS) with a single model and decoder?
- RQ5How does adaptive quantization improve the performance and efficiency of Code Editing?
Key findings
- Code Editing Enhanced outperforms existing variable-rate NIC methods, including Theis et al. (2017), Cui et al. (2021), and Song et al. (2021), across all three baselines in terms of R-D performance.
- The method achieves continuous R-D trade-off over a wide bitrate range (e.g., from low to mid-range, ~0.5 bpp) using only one decoder and entropy model.
- ROI-based coding with arbitrary-shaped masks (e.g., checkerboard, alphabets) is successfully achieved, with superior performance compared to prior methods that suffer from ROI map diminishing effects.
- The qualitative results show improved perceptual quality with increasing LPIPS weight λₚ, confirming effective multi-distortion trade-off.
- The method achieves a significant performance gain in high-bitrate regions compared to Theis et al. (2017), which suffers from degradation.
- Adaptive quantization step size significantly improves the stability and performance of Code Editing, especially in high-rate regimes.
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.