Learned Compression for Compressed Learning

Dan Jacobellis, Neeraja J. YadwadkararXiv 2024

TL;DR

This paper introduces WaLLoC, a novel neural codec designed for "compressed-domain learning." WaLLoC efficiently compresses high-resolution data into compact representations that machine learning models can process, significantly reducing computational costs and latency without sacrificing accuracy, unlike previous methods.

What Problem Does This Paper Address?

Modern sensors are generating increasingly high-resolution data, which poses a significant challenge for machine learning models due to computational and memory constraints. A common approach is to reduce the resolution of the input data, but this often leads to a loss of crucial details and a degradation in model performance. "Compressed-domain learning" aims to solve this by having models operate on compressed, low-dimensional representations of the data. However, existing compression techniques are not well-suited for this:

  • Linear transform coding (e.g., JPEG, MP3): Reduces bitrate but doesn't effectively reduce dimensionality for efficiency gains.
  • End-to-end learned codecs: Offer better rate-distortion but have high encoding overhead, negating compressed-domain learning benefits.
  • Generative autoencoders: Reduce dimensionality but often use adversarial or perceptual losses that lead to significant information loss, making them unsuitable for tasks requiring precise detail.

The authors aim to bridge this gap by developing a compression method that is efficient, achieves high compression ratios, and provides uniform dimensionality reduction, making it ideal for compressed-domain learning.

Methods

The core of WaLLoC is its novel architecture that combines linear transform coding with a non-linear autoencoder. Key components include:

  • Wavelet Packet Transform (WPT): An invertible linear transform that efficiently trades off spatial/temporal resolution for frequency resolution. This allows the subsequent neural network layers to operate at a lower resolution, significantly reducing computational cost.
  • Asymmetric Autoencoder: WaLLoC employs a shallow, linear analysis transform (encoder) and a deep, non-linear synthesis transform (decoder). This asymmetry is motivated by the fact that discarding redundancies (encoder's job) is easier after WPT, while reconstructing details (decoder's job) is more complex.
  • Entropy Bottleneck: To achieve high compression ratios and quantization resilience, WaLLoC incorporates an entropy bottleneck, which involves adding uniform noise during training. This makes the latent representations robust to quantization.
  • Companding: A Gaussian CDF companding operation is used to whiten the latent distribution before the entropy bottleneck, ensuring latents stay within a manageable range for 8-bit quantization.
  • Entropy Coding: Standard lossless codecs like WebP are used for final compression after quantization.

Crucially, WaLLoC's encoder is designed to be computationally efficient, consisting mostly of linear operations, making it suitable for resource-constrained environments.

Datasets

The paper uses the following datasets for training and evaluation:

  • Training:
    • MUSDB18-HQ (for stereo audio codecs)
    • LSDIR (for RGB image codecs)
  • Evaluation:
    • ImageNet-1k (for image classification)
    • DocVQA (for document understanding)
    • MUSDB18-HQ (for music source separation)

The paper does not introduce new datasets but leverages existing ones to demonstrate WaLLoC's capabilities across various tasks.

Key Insights and Ideas

  • WPT as a Preprocessor: Using the Wavelet Packet Transform before the autoencoder is a key insight. It effectively reduces the resolution for the neural network layers without information loss, dramatically cutting down computational requirements.
  • Asymmetry is Key for Efficiency: The paper highlights that an asymmetric autoencoder (linear encoder, non-linear decoder) is more efficient for this task. The encoder's job of discarding redundancy is simplified by the WPT, allowing for a lightweight linear layer.
  • Quantization Resilience through Noise: The entropy bottleneck with additive noise during training is a clever way to make the compressed representations robust to quantization, enabling higher compression ratios without severe quality degradation.
  • Modality Agnosticism: WaLLoC's design, particularly the WPT and the autoencoder structure, is presented as being compatible with modalities beyond RGB images and stereo audio, suggesting broader applicability.

Key Results

  • Compression Efficiency: WaLLoC achieves significantly higher compression ratios (e.g., nearly 12x higher than Stable Diffusion 3 VAE for images) while maintaining comparable or better quality.
  • Computational Efficiency: WaLLoC offers substantially higher encoding throughput (e.g., >48x for images compared to Cheng et al. [11]) and significantly lower encoding costs (less than 5% of other neural codecs).
  • Compressed-Domain Learning Performance: When used for compressed-domain learning, WaLLoC-processed data leads to substantial improvements in accuracy for tasks like image classification (e.g., 50.6% vs. 23.1% accuracy) and document understanding (e.g., 81.1 vs. 43.7 ANLS) compared to simple resolution reduction.
  • Uniform Dimensionality Reduction: WaLLoC provides up to 20x dimensionality reduction, which is uniform and predictable, making it a suitable drop-in replacement for resolution reduction in downstream models.

Limitations and Future Work

  • Limitations:
    • While WaLLoC is presented as modality-agnostic, the paper focuses on RGB images and stereo audio. Its performance on other modalities like hyperspectral images or microscopy is not yet demonstrated.
  • The paper acknowledges that some existing compression methods might offer better rate-distortion trade-offs in specific scenarios, but WaLLoC prioritizes efficiency and uniform dimensionality reduction for compressed-domain learning.
  • Future Work:
    • The authors plan to extend WaLLoC to applications involving high-resolution signal types where current compression methods fall short, such as hyperspectral images or whole-slide microscopy.
  • These domains may present additional challenges but also offer greater potential benefits due to increased signal redundancies.

Summary updated

Abstract

Modern sensors produce increasingly rich streams of high-resolution data. Due to resource constraints, machine learning systems discard the vast majority of this information via resolution reduction. Compressed-domain learning allows models to operate on compact latent representations, allowing higher effective resolution for the same budget. However, existing compression systems are not ideal for compressed learning. Linear transform coding and end-to-end learned compression systems reduce bitrate, but do not uniformly reduce dimensionality; thus, they do not meaningfully increase efficiency. Generative autoencoders reduce dimensionality, but their adversarial or perceptual objectives lead to significant information loss. To address these limitations, we introduce WaLLoC (Wavelet Learned Lossy Compression), a neural codec architecture that combines linear transform coding with nonlinear dimensionality-reducing autoencoders. WaLLoC sandwiches a shallow, asymmetric autoencoder and entropy bottleneck between an invertible wavelet packet transform. Across several key metrics, WaLLoC outperforms the autoencoders used in state-of-the-art latent diffusion models. WaLLoC does not require perceptual or adversarial losses to represent high-frequency detail, providing compatibility with modalities beyond RGB images and stereo audio. WaLLoC's encoder consists almost entirely of linear operations, making it exceptionally efficient and suitable for mobile computing, remote sensing, and learning directly from compressed data. We demonstrate WaLLoC's capability for compressed-domain learning across several tasks, including image classification, colorization, document understanding, and music source separation. Our code, experiments, and pre-trained audio and image codecs are available at https://ut-sysml.org/walloc

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
RGB image compressionWaLLoC 16×compression ratio (CR)35.2RGB codec; dimensionality reduction (DR) 16×.
Source quote
L167: WaLLoC │ 16 │ 35.2 │ 22.1 │ 0.466 │ 27.5 │ 0.97 │ 6.51 │ 13.9
RGB image compressionSD 3.0compression ratio (CR)6.00RGB codec; dimensionality reduction (DR) 12×.
Source quote
L165: SD 3.0 │ 12 │ 6.00 │ 0.195 │ 0.101 │ 20.9 │ 0.84 │ 8.33 │ 13.8
DocVQAResolution reduction (resize)average normalized levenshtein similarity (ANLS)43.7split: test
Source quote
L244: 224^2 px │ 16× │ 43.7 │ 81.1 │ \uparrow37.4
DocVQAWaLLoC 16×average normalized levenshtein similarity (ANLS)81.1split: test
Source quote
L244: 224^2 px │ 16× │ 43.7 │ 81.1 │ \uparrow37.4
Reported baseline / comparator measurements (2)
BenchmarkMethodMetricScoreProtocol / Evidence
ImageNet-1K · image classificationResolution reduction (resize) baselineaccuracy23.1%backbone=ViT-Ti
Source quote
L241: 64^2 px │ 16× │ 23.1 │ 50.3 │ \uparrow27.2
ImageNet-1K · image classificationWaLLoC 16× baselineaccuracy50.3%backbone=ViT-Ti
Source quote
L241: 64^2 px │ 16× │ 23.1 │ 50.3 │ \uparrow27.2
BibTeX
@misc{jacobellis2024learned,
  author = {Dan Jacobellis and Neeraja J. Yadwadkar},
  title = {{Learned Compression for Compressed Learning}},
  year = {2024},
  eprint = {2412.09405},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.09405},
}

Loading related content...

Figure