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 (by varying $\beta$) 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 deep learning-based lossy compression (images, video, audio), models are typically trained to balance two competing goals: minimizing the file size (Rate, $R$) and minimizing the reconstruction error (Distortion, $D$). The standard way to train these models is the $\beta$-VAE approach, which minimizes a joint loss function: $D + \beta R$.
However, using $\beta$ is highly problematic for researchers. Mathematically, $\beta$ dictates the slope of the Rate-Distortion (R/D) curve. Because the shape of this curve changes depending on the model architecture and hyperparameters, guessing the right $\beta$ to hit a specific bitrate or image quality is incredibly difficult. Consequently, to fairly compare a new model against an old one, researchers are forced to train both models multiple times with various $\beta$ values to plot and compare full R/D curves. This is computationally expensive and severely slows down the research iteration cycle.
Methodology
The authors propose using distortion-constrained optimization (D-CO). The goal is to minimize the Rate subject to a strict Distortion constraint ($D \leq c_D$). To achieve this using stochastic gradient descent, they adapt a Lagrangian optimization method:
- Loss Function: They optimize $\mathcal{L} = R + \lambda^D (\frac{D}{c_D} - 1)$. Normalizing the distortion by the target $c_D$ ensures the optimization hyperparameters work reliably across different target values.
- Optimization: Network weights are updated using Adam to minimize the loss, while the Lagrangian multiplier ($\lambda^D$) is dynamically updated using SGD with momentum to maximize it.
Experimental Setup
The models were evaluated on the ImageNet dataset. Training used random 160x160 crops from the ImageNet Train set. Evaluation was performed on 160x160 center crops from the ImageNet Validation set, with images first resized to 256 on their shortest side to reduce pre-existing compression artifacts.
Results and Discussion
The D-CO method demonstrates several key advantages over traditional approaches.
Performance and Convergence
D-CO reliably converges to the exact set target, typically landing within 1 MSE point of the target distortion. As shown in Figure 1, D-CO significantly outperforms a simpler "Hinge Loss" baseline and achieves Rate-Distortion performance practically identical to the heavily tuned $\beta$-VAE baseline.
Simplified Model Selection
Because D-CO allows you to lock in the Distortion axis, you can train two different architectures with the exact same target $c_D$. To see which model is better, you simply look at which one achieved a lower Rate. This eliminates the need to generate full R/D curves just to test a minor architectural tweak. Figure 2 demonstrates this by comparing models with different latent channel capacities.
Limitations
At very high bitrates (>0.4 bpp), the $\beta$-VAE baseline showed a very slight performance advantage over D-CO, likely due to hyperparameter tuning specific to that regime. Additionally, if a target is unachievable for a model's capacity, the multiplier simply clips to its maximum value, and the model acts like a standard fixed-weight loss.
Conclusion
Distortion-constrained optimization provides a more intuitive and efficient framework for training lossy compression models. By allowing researchers to target specific quality levels directly, it simplifies model comparison and matches the performance of state-of-the-art methods.
Summary updated