Abstract
When training end-to-end learned models for lossy compression, one has to balance the rate and distortion losses. This is typically done by manually setting a tradeoff parameter $\beta$, an approach called $\beta$-VAE. Using this approach it is difficult to target a specific rate or distortion value, because the result can be very sensitive to $\beta$, and the appropriate value for $\beta$ depends on the model and problem setup. As a result, model comparison requires extensive per-model $\beta$-tuning, and producing a whole rate-distortion curve for each model to be compared. We argue that the constrained optimization method of Rezende and Viola, 2018 is a lot more appropriate for training lossy compression models because it allows us to obtain the best possible rate subject to a distortion constraint. This enables pointwise model comparisons, by training two models with the same distortion target and comparing their rate. We show that the method does manage to satisfy the constraint on a realistic image compression task, outperforms a constrained optimization method based on a hinge-loss, and is more practical to use for model selection than a $\beta$-VAE.
Introduction
In neural image compression, the standard objective is to minimize a weighted sum of distortion ($D$) and rate ($R$): $\mathcal{L} = D + \beta R$. While effective, the hyperparameter $\beta$ lacks physical units and its relationship to final bitrate or quality is highly non-linear and model-dependent. This makes it difficult for engineers to target specific quality levels (e.g., a specific PSNR) and forces researchers to train numerous models across a range of $\beta$ values just to perform a fair comparison between two architectures. This paper proposes Distortion Constrained Optimization (D-CO) as a more intuitive and efficient alternative.
Methodology
The authors reformulate the compression objective as a constrained optimization problem: $$\min_{\theta} R(\theta) \quad \text{subject to} \quad D(\theta) \leq c_D$$ where $c_D$ is the desired distortion target. To solve this, they employ several key techniques:
- Lagrangian Formulation: The constraint is integrated into the loss using a multiplier $\lambda^D$.
- Normalized Constraints: To ensure hyperparameter stability across different targets, the constraint is normalized: $\mathcal{L} = R + \lambda^D (\frac{D}{c_D} - 1)$.
- Dual Optimization: Model parameters are updated via Adam to minimize the loss, while $\lambda^D$ is updated via SGD to maximize it, ensuring the constraint is met.
- Compression Specifics: The method is adapted for discrete latent spaces and learnable entropy priors common in modern codecs.
Experimental Results
The proposed method was evaluated on the ImageNet dataset, using 160x160 crops for training and validation.
Performance and Convergence
D-CO models reliably converge to their distortion targets, typically within 1 MSE point. As shown in Figure 1, D-CO achieves Rate-Distortion (R/D) performance on par with the standard $\beta$-VAE approach while significantly outperforming hinge-loss baselines, which often fail to converge accurately to the target.
Model Selection and Pointwise Comparison
A major advantage of D-CO is the ability to perform "pointwise" comparisons. In traditional $\beta$-VAE setups, changing a model's capacity (e.g., reducing latent channels) shifts the resulting model unpredictably in both rate and distortion. With D-CO, one can fix the distortion target and directly observe the bitrate penalty of a lower-capacity model. Figure 2 illustrates how D-CO maintains the target distortion across different model sizes, facilitating clear architectural comparisons that are difficult with $\beta$-VAE.
Conclusion
Distortion Constrained Optimization offers a more practical framework for training learned compression models. By allowing direct targeting of quality levels, it simplifies the research workflow and enables more transparent model comparisons. While challenges remain regarding unachievable constraints and the need for high-momentum multiplier updates, D-CO represents a significant step toward more controllable and interpretable neural compression.
Summary updated