Source-linked AI summary

Variational image compression with a scale hyperprior

Johannes Ballé, David Minnen, Saurabh Singh, Sung Jin Hwang, Nick Johnston

arXiv:1802.01436v2eess.IVcs.IT

TL;DR

The paper addresses the limited ability of ANN-based image-compression entropy models to capture spatial dependencies in latent representations. It introduces an end-to-end trained VAE with a scale hyperprior, achieving state-of-the-art MS-SSIM performance and better PSNR rate–distortion performance than other ANN-based methods.

  • Problem

    ANN-based compression methods typically use entropy models that can mismatch the actual latent marginal, especially when spatial dependencies are present.

  • Method

    The model augments a variational image-compression autoencoder with a learned hyperprior that captures spatially varying latent scales and is trained jointly end-to-end.

  • Results

    The model achieves state-of-the-art image compression on MS-SSIM and surpasses published ANN-based methods in PSNR rate–distortion performance.

  • Takeaways & Limitations

    Hyperpriors provide a learned form of side information that makes the entropy prior more flexible for ANN-based image compression.

Abstract

from arXiv · show

We describe an end-to-end trainable model for image compression based on variational autoencoders. The model incorporates a hyperprior to effectively capture spatial dependencies in the latent representation. This hyperprior relates to side information, a concept universal to virtually all modern image codecs, but largely unexplored in image compression using artificial neural networks (ANNs). Unlike existing autoencoder compression methods, our model trains a complex prior jointly with the underlying autoencoder. We demonstrate that this model leads to state-of-the-art image compression when measuring visual quality using the popular MS-SSIM index, and yields rate-distortion performance surpassing published ANN-based methods when evaluated using a more traditional metric based on squared error (PSNR). Furthermore, we provide a qualitative comparison of models trained for different distortion metrics.

1 INTRODUCTION

The paper identifies mismatch between latent marginals and entropy models as a central compression problem, then proposes learning side information as a hyperprior. The resulting model improves image-compression performance across MS-SSIM and PSNR evaluations.

  • Entropy coding requires a shared prior probability model for the quantized latent representation.
  • R = E_ŷ∼m[−log2 p_ŷ(ŷ)] gives the expected code length under the entropy model, which is minimized when the model matches the latent marginal.
  • Fully factorized entropy models are suboptimal when statistical dependencies exist in the actual latent distribution.
  • Conventional codecs transmit hand-designed side information to adapt the entropy model to each image’s marginal distribution.
  • The proposed VAE formulation learns a latent representation of the entropy model and jointly balances side-information cost against entropy-model improvement.
  • The hyperprior model achieves state-of-the-art MS-SSIM performance and significantly better PSNR rate–distortion performance than other ANN-based methods.

2 COMPRESSION WITH VARIATIONAL MODELS

The compression system uses learned analysis and synthesis transforms with quantized latent representations, while variational training connects rate and distortion. A hyperprior captures spatially coupled latent scales that a factorized prior misses.

  • The analysis transform maps image x to latent representation y, which is quantized into ŷ and decoded through a synthesis transform to reconstruct the image.
  • After hyperprior normalization, the latent representation shows reduced apparent structure, indicating that the new prior captures that structure.
  • Quantization introduces tolerated error, creating a rate–distortion problem in which rate is expected code length and distortion measures reconstruction difference.
  • Training replaces quantization with additive uniform noise so gradients can be used to optimize the transforms.
  • The VAE formulation links the synthesis transform to generation, the analysis transform to inference, and KL-divergence terms to distortion and coding costs.
  • The factorized prior fails to represent clustered latent responses around edges and textured regions, indicating spatial dependencies.

3 INTRODUCTION OF A SCALE HYPERPRIOR

The scale hyperprior models spatial dependencies in the latent representation by introducing variables that predict spatially varying standard deviations. These variables are transmitted as side information so the decoder can recover the latent representation using corresponding probability estimates.

  • Scale hyperprior: The model introduces latent variables ˜z to capture spatial dependencies among latent representation elements ˆy, whose scales vary together across neighboring locations.The dependency structure motivates conditioning the target variables on ˜z.
  • Scale hyperprior: Each ˜y_i is modeled as a zero-mean Gaussian with a standard deviation predicted from ˜z by the synthesis transform h_s.The model convolves each Gaussian density with a standard uniform to account for quantization.
  • Inference model: The inference model stacks the transform h_a on top of y, creating a joint factorized variational posterior for the latent variables.This provides the inference pathway for the additional hyperprior representation.
  • Prior model: The hyperprior models ˜z with a non-parametric, fully factorized density because the responses y are treated as sufficient to estimate the spatial distribution of standard deviations.The prior has no assumed structure beyond this learned factorized density model.
  • Rate–distortion objective: The loss contains distortion and cross-entropies for ˜y and ˜z; the ˜z term represents side information in analogy to traditional transform coding.The first term is zero because the variational posterior is a product of unit-width uniform densities.
  • Compression pipeline: During compression, z is quantized, encoded, and transmitted first; its decoded form estimates ˆσ, enabling probability estimates used to recover ˆy before reconstructing the image.The decoder applies h_s to recovered ˆz, then applies g_s to ˆy.

4 EXPERIMENTS

Experiments on Kodak images compare hyperprior and factorized-prior models across distortion losses and rate–distortion tradeoffs. Performance depends strongly on the training metric: the hyperprior improves compression while producing similar artifact types, and uses limited side information.

  • Experimental setup: 32 models varied hyperprior use, distortion metric, and eight λ values to cover rate–distortion tradeoffs.Half used a hyperprior, half a factorized prior; models were trained with either mean squared error or MS-SSIM.
  • Evaluation: Models were evaluated on the Kodak dataset using PSNR and MS-SSIM rate–distortion curves.Curves represent tradeoffs across different λ values, with MS-SSIM converted to decibels for legibility.
  • Rate–distortion results: Matching the training loss to the evaluation metric is crucial: squared-error training yields the strongest PSNR results, while MS-SSIM training supports the strongest MS-SSIM results.The hyperprior trained on squared error outperforms published ANN-based methods in PSNR and approximates HEVC performance; for MS-SSIM, it consistently surpasses conventional codecs and the cited state-of-the-art model.
  • Qualitative comparison: At similar bit rates, MS-SSIM- and squared-loss models preserve comparable overall detail but distribute it differently across image regions.MS-SSIM training can preserve texture while removing detail from high-contrast semantic regions such as text.
  • Hyperprior effects: Hyperprior models tend to improve detail at lower bit rates without changing the qualitative nature of compression artifacts.The side-information rate remains far below 0.1 bpp even at the highest total bit rates, while the improved prior enables gains over the factorized-prior model.

5 DISCUSSION

The paper augments variational image compression with an end-to-end trained hyperprior that models latent-scale dependencies. Its results support reducing prior–marginal mismatch, while comparisons across distortion metrics show that evaluation outcomes depend strongly on the training loss.

  • Model contribution: The hyperprior augments a variational compression model with a learned entropy model over local latent scale parameters.It is trained end-to-end with the underlying compression model.
  • Evaluation: Optimizing for MS-SSIM versus squared error produces substantially different results, and visual quality can vary significantly with image content.The paper therefore examines both perceptual and pixel-wise distortion objectives.
  • Evaluation: The authors recommend comparing compression methods using more than one metric when human-rating experiments are unavailable.This recommendation follows their observation that metric choice and image content affect reported quality.
  • Model contribution: Hyperprior models consistently outperform factorized-prior models, underscoring the importance of reducing mismatch between the prior and latent marginal.The paper describes the hyperprior, or side information, as a way to introduce more flexible priors.
  • Context: The discussion relates learned hyperpriors to conventional side information and to prior work modeling statistical dependencies in transform coefficients.Classical codecs hand-engineer dependency models, whereas this approach learns the entropy-model representation jointly with the transform.

6 APPENDIX

The appendix develops flexible density models, explains uniform-noise convolution for priors, and documents capacity selection, runtimes, and rate–distortion aggregation. It also notes that residual latent dependencies may reflect insufficient transform capacity or optimization limitations.

  • 6.1 UNIVARIATE NON-PARAMETRIC DENSITY MODEL: The non-parametric density model defines a univariate density through a cumulative represented as a composition of functions.Non-negative Jacobian elements ensure a valid non-negative density, while the terminal function maps into [0, 1].
  • 6.1 UNIVARIATE NON-PARAMETRIC DENSITY MODEL: The model uses constrained matrix and vector parameters with nonlinearities that can expand or contract space near x = 0.The parameters are reparameterized to preserve non-negative derivatives.
  • 6.1 UNIVARIATE NON-PARAMETRIC DENSITY MODEL: For all experiments, each univariate density model uses K = 4 and dimensionalities r1 = r2 = r3 = 3.Each model has its own parameters a(k), b(k), and H(k).
  • 6.2 MODELING PRIORS WITH ADDED UNIFORM NOISE: Convolving the prior and hyperprior density models with standard uniform noise lets them represent unit-width uniform distributions needed for effectively disabled latent elements.This improves flexibility for matching the variational posterior and can yield zero cross entropy for deterministic quantized representations.
  • 6.3 MODEL CAPACITY: Residual latent dependencies may arise from insufficient analysis and synthesis transform capacity or failure to reach the global optimum.The authors attempted to reduce capacity-related confounding by selecting filter counts near saturation.
  • Appendix experiments: The appendix reports runtime measurements across Python and TensorFlow implementations, CPU and GPU settings, and multiple filter counts.The number of filters was selected to avoid transform bottlenecks rather than optimized for computational complexity.
  • Appendix experiments: The reported rate–distortion aggregation differs between PSNR and MS-SSIM evaluations.MS-SSIM curves are interpolated per image at predefined bit rates before averaging, whereas PSNR uses direct averaging without interpolation.
Loading 1802.01436v2…