Rethinking Autoregressive Models for Lossless Image Compression via Hierarchical Parallelism and Progressive Adaptation

Daxin Li, Yuanchao Bai, Kai Wang, Wenbo Zhao, Junjun Jiang, Xianming LiuarXiv 2025

TL;DR

Autoregressive (AR) models deliver excellent lossless compression ratios but are traditionally dismissed as impractical due to their sluggish, pixel-by-pixel sequential processing. This paper introduces a novel framework that re-establishes pure autoregression as a fast and lightweight solution using hierarchical parallelism and fast, instance-specific test-time adaptation. The resulting model achieves state-of-the-art compression performance while maintaining a remarkably small parameter footprint and competitive coding speeds.

What Problem Does This Paper Address?

Lossless image compression is vital in fields like medical imaging and satellite remote sensing, where even the slightest loss of data fidelity can have severe consequences. Autoregressive (AR) models excel here because they capture intricate pixel dependencies by predicting each pixel conditioned on previous ones. However, this strict causal dependency makes sequential inference painfully slow for large images.

To achieve practical speeds, the compression field shifted toward hybrid or Variational Autoencoder (VAE)-based architectures. Unfortunately, these alternatives trade away compression performance and often require massive parameter counts. Furthermore, pre-trained models suffer from an "amortization gap"—they struggle to generalize to unique, out-of-domain test images. While test-time adaptation can bridge this gap by fine-tuning the model on the fly, existing methods are impractically slow, sometimes taking over an hour to compress a single image.

Methods

The authors introduce the Hierarchical Parallel Autoregressive ConvNet (HPAC) alongside an efficient test-time adaptation strategy to solve both the speed and generalization bottlenecks.

Fig. 1. Overview of the proposed architectures and mechanisms in HPAC: (a) The content-adaptive Convolutional Gating Mechanism (CGM) simplifies attention. (b) Building on this, the Hierarchical Parallel Autoregressive ConvNet (HPAC) consists of Local Context Modulator (LCM), MLP, and Spatial Propagation Module (SPM) blocks. (c) To accelerate coding, Cache-then-Select Inference (CSI) caches activations and performs efficient selective computation only on causally relevant features.

1. Hierarchical Parallel Autoregressive ConvNet (HPAC)

HPAC breaks the strict serial pixel dependency by dividing an image into non-overlapping patches.

  • Intra-patch Parallelism: Within each patch, pixels are organized into parallel groups using a parameterized scan order, allowing all pixels in the same group to be processed simultaneously.
  • Inter-patch Parallelism: To capture global context without breaking causality, the Spatial Propagation Module (SPM) stacks patch features into a 3D tensor and applies standard 2D convolutions across the patch dimension in parallel.
  • Convolutional Gating Mechanism (CGM): Instead of heavy self-attention layers, HPAC utilizes local depthwise separable convolutions combined with element-wise gating to achieve content-adaptive modeling efficiently.

2. Inference and Coding Optimizations

  • Cache-then-Select Inference (CSI): During inference, a state cache stores activations from previously processed pixel groups. A gather-and-multiply primitive replaces standard masked convolutions, computing only the causally relevant features and eliminating redundant math.
  • Adaptive Focus Coding (AFC): High bit-depth (HBD) images typically have sparse pixel value distributions. Instead of instantiating a massive probability table, AFC dynamically focuses a compact coding window around the model's predicted mean, drastically reducing memory overhead.

3. Spatially-Aware Rate-Guided Progressive Fine-Tuning (SARP-FT)

To adapt to unseen images quickly, the authors use Parameter-Efficient Transfer Learning (PETL) via low-rank adaptation (LoRA and Tucker decomposition). Guided by the Minimum Description Length (MDL) principle, SARP-FT identifies a contiguous rectangular region with the highest information density (bitrate) and fine-tunes the low-rank adapters there first, progressively expanding the focus area to the full image.

Datasets

The framework was evaluated across a diverse set of high-resolution benchmarks:

  • Natural Images: Kodak (24 images), DIV2K (100 images), and CLIC.p (41 images).
  • Remote Sensing/Satellite: RS19 (190 images) and LoveDA24 (24 images).
  • Medical/Histopathology: Histo24 (24 images), Covid-CT (in-domain high bit-depth), and Chaos-CT (out-of-domain high bit-depth).

Key Insights and Ideas

  • AR Models Don't Have to Be Huge: By combining group-wise intra-patch parallelism and inter-patch parallel convolutions, HPAC matches or beats the compression performance of massive hybrid models while remaining ultra-lightweight (only 677K parameters).
  • Spatial Contiguity is Crucial for Adaptation: Previous test-time adaptation methods selected scattered high-bitrate patches across an image, which breaks local context. SARP-FT selects contiguous regions, ensuring the hierarchical AR model receives the coherent spatial context it needs to learn effectively.
  • Dynamic Alphabet Truncation: For high bit-depth images, trying to calculate probabilities for every possible value is wasteful. Shifting a small window dynamically based on the model's prediction keeps the entropy coder fast and lightweight without sacrificing lossless reconstruction.

Key Results

  • State-of-the-Art Compression: The pre-trained HPAC model achieves an average of 15.7% bits-per-subpixel (bpsp) savings over JPEG-2000 and outperforms the previous SOTA, ArIB-BPS. When enhanced with SARP-FT adaptation (HPAC-FT), savings reach 20.7% over JPEG-2000.
  • Extreme Parameter Efficiency: HPAC achieves these results with just 677K parameters—a mere 0.5% of ArIB-BPS’s 146.6M parameters.
  • Blazing Fast Adaptation: Thanks to its lightweight architecture, HPAC-FT completes test-time adaptation in just 8.45 seconds per image. This represents a ~700× speedup over the competing adaptive method, FNLIC, which takes over 1.5 hours.

Limitations and Future Work

While 8.45 seconds is a massive leap forward for test-time adaptation, it remains too slow for real-time interactive applications or video streaming. Additionally, the framework relies on a GPU to execute its parallel gather-and-multiply primitives efficiently. The authors suggest that future work could explore even faster convergence schedules or hardware-level optimizations to bring AR-based lossless compression closer to real-time deployment.

Summary updated

BibTeX
@misc{li2025rethinking,
  author = {Daxin Li and Yuanchao Bai and Kai Wang and Wenbo Zhao and Junjun Jiang and Xianming Liu},
  title = {{Rethinking Autoregressive Models for Lossless Image Compression via Hierarchical Parallelism and Progressive Adaptation}},
  year = {2025},
  eprint = {2511.10991},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.10991},
}
Figure