PSC: Posterior Sampling-Based Compression

Noam Elata, Tomer Michaeli, Michael Elad

Abstract

Diffusion models have transformed the landscape of image generation and now show remarkable potential for image compression. Most of the recent diffusion-based compression methods require training and are tailored for a specific bit-rate. In this work, we propose Posterior Sampling-based Compression (PSC) — a zero-shot compression method that leverages a pre-trained diffusion model as its sole neural network component, thus enabling the use of diverse, publicly available models without additional training. Our approach is inspired by transform coding methods, which encode the image in some pre-chosen transform domain. However, PSC constructs a transform that is adaptive to the image. This is done by employing a zero-shot diffusion-based posterior sampler so as to progressively construct the rows of the transform matrix. Each new chunk of rows is chosen to reduce the uncertainty about the image given the quantized measurements collected thus far. Importantly, the same adaptive scheme can be replicated at the decoder, thus avoiding the need to encode the transform itself. We demonstrate that even with basic quantization and entropy coding, PSC's performance is comparable to established training-based methods in terms of rate, distortion, and perceptual quality. This is while providing greater flexibility, allowing to choose at inference time any desired rate or distortion.

Introduction

Traditional image compression standards, such as JPEG, rely on fixed mathematical transforms (like the Discrete Cosine Transform) to identify and discard redundant information. While modern neural compression methods have surpassed these standards by learning optimized representations through deep learning, they often suffer from rigidity. Most neural codecs are optimized for a specific bit-rate, requiring separate models for different quality levels, and necessitate massive datasets and compute for training.

PSC addresses these challenges by utilizing the generative "knowledge" already embedded in pre-trained diffusion models. By treating compression as a zero-shot task, PSC avoids the overhead of task-specific training while providing a flexible, progressive framework for image-adaptive compression.

Methodology

PSC is built upon the principles of transform coding, but introduces a dynamic, image-adaptive transform construction process. Unlike traditional methods where the transform matrix $H$ is fixed, PSC builds $H$ row-by-row based on the specific content of the input image.

Adaptive Row Selection and Synchronization

The core of PSC is a diffusion-based posterior sampler. The encoder analyzes the image to identify regions of high uncertainty. It then selects a "measurement direction"—a new row in the transform matrix—that specifically targets this uncertainty.

Overview of the PSC adaptive transform construction process. The encoder uses a diffusion model to sample from the posterior, then applies PCA to identify the direction of maximum uncertainty for the next measurement row.

To avoid the high cost of transmitting this custom transform to the decoder, PSC employs a Synchronization Trick. By sharing a random seed, the decoder can replicate the exact same posterior sampling and row selection process as the encoder. Because each new row is calculated based only on previous measurements (which the decoder has already received), the transform is reconstructed bit-lessly at the receiver.

Latent-PSC

For ultra-low bit-rate scenarios, the authors introduce Latent-PSC, which operates within the latent space of models like Stable Diffusion. This allows the compression process to be guided by semantic text prompts, focusing bits on the most meaningful aspects of the scene.

Experimental Results

PSC was evaluated against both classic codecs (BPG, JPEG2000) and state-of-the-art neural methods (HiFiC, MS-ILLM, PerCo) using standard benchmarks like ImageNet, CLIC, and DIV2K.

Visual Performance and Perceptual Quality

At extremely low bit-rates, PSC demonstrates a significant advantage in maintaining structural integrity and realism. While other methods may produce "mushy" artifacts or lose fine details, PSC preserves the global composition and essential textures of the original image.

Visual comparison of PSC against MS-ILLM and PerCo. At ultra-low rates (0.004 BPP), PSC maintains superior detail in the lighthouse and parrot compared to competing diffusion-based methods.

Flexibility and Control

One of PSC's unique strengths is its progressive nature. A single bitstream can be decoded to different quality levels or using different decoding objectives. For instance, a user can choose a "Low Distortion" decoder to minimize blur or a "High Perception" decoder to maximize realism at the time of viewing, without needing a different file.

Conclusion and Future Work

PSC represents a paradigm shift in neural compression, moving from "learning to compress" to using generative priors to intelligently discard information. While the method currently faces high computational complexity due to the iterative nature of diffusion sampling, it serves as a powerful proof-of-concept for zero-shot, adaptive compression. Future work will focus on accelerating the sampling process and integrating non-linear measurements to further enhance compression efficiency.

Summary updated

BibTeX
@inproceedings{elata2025psc,
  author = {Noam Elata and Tomer Michaeli and Michael Elad},
  title = {{PSC: Posterior Sampling-Based Compression}},
  booktitle = {SampTA InvitedTalk},
  year = {2025},
  url = {https://openreview.net/forum?id=9WXIWLP3Nw},
}
Figure