NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning Representations by Maximizing Compression

Karol Gregor, Yann LeCunarXiv 2011

Introduction

Modeling high-dimensional data, such as images, is a fundamental challenge in machine learning because the underlying probability distributions are complex and multimodal. Traditional generative models, like Restricted Boltzmann Machines (RBMs) or denoising autoencoders, often rely on approximations or surrogate objectives because calculating the exact data likelihood is computationally intractable.

This paper introduces a novel approach that treats representation learning as a compression task. By breaking down the high-dimensional problem into a sequence of simple binary predictions, the model can calculate exact likelihoods and learn meaningful visual features by minimizing the number of bits required to encode the data.

Methodology: Sequential Pixel Prediction

The authors propose a "Sequential Pixel Prediction" model that shares the structural spirit of an autoencoder but operates iteratively. An image is converted into a sequence of bits $x_1, x_2, \dots, x_n$. Crucially, this sequence does not need to follow a standard raster scan; the model can learn effectively even from a random permutation of pixels.

The Sequential Pixel Prediction architecture, featuring dual-path prediction (UV and R) and a recurrent hidden state.

As each pixel $x_k$ is processed, a hidden layer $h$ is updated to act as a running memory of the bits seen so far. To predict the next bit $y_{k+1}$, the model utilizes two distinct paths:

  • The $UV$ Path: A representation-based path where the hidden layer (transformed by matrix $V$) predicts the next bit, capturing global structure.
  • The $R$ Path: A direct connection from input pixels to the output (matrix $R$), capturing local correlations.

The model is trained using backpropagation to maximize the log-likelihood of the sequence, which is directly tied to how well the data can be compressed using arithmetic coding.

Key Insights and Emergent Features

The core philosophy of this work is that compression is modeling. A model that can describe data in fewer bits has inherently captured the underlying "rules" and dependencies of that data.

One of the most significant findings is that the model is order-independent. Unlike traditional image compression algorithms that rely on a fixed 2D spatial grid, this model discovers spatial correlations through the learning process. When the filters in the $U$ matrix (the input-to-hidden weights) are visualized, they naturally evolve into "strokes" and local parts of digits, similar to the features learned by RBMs.

Visualization of learned filters in the U matrix, showing emergent stroke-like features across different training stages or configurations.

Furthermore, because the model provides a probability for each bit, it is inherently generative. By sampling pixels one by one, the model can produce realistic new images of digits, confirming it has successfully captured the data distribution.

Empirical Results

The model was evaluated on the USPS ($16 \times 16$) and MNIST ($28 \times 28$) datasets. Performance was measured by the average number of bits required to encode a single digit (lower is better).

Method USPS (bits/digit) MNIST (bits/digit)
Original (Uncompressed) 256 784
Pixel Independent 236 442
Proposed Model (1000 units) 81.0 92.2
Context Independent DjVu 91.7 119

The proposed model significantly outperformed standard baselines and even surpassed the context-independent version of the DjVu compression algorithm, demonstrating the power of context-dependent sequential modeling.

Conclusion and Future Work

While the sequential nature of the model introduces higher computational complexity compared to feed-forward architectures, it offers a mathematically grounded way to achieve exact likelihood calculation. Future research directions include extending the model to real-valued data and exploring deeper, multi-layer versions of this context-dependent architecture.

Summary updated

BibTeX
@misc{gregor2011learning,
  author = {Karol Gregor and Yann LeCun},
  title = {{Learning Representations by Maximizing Compression}},
  year = {2011},
  eprint = {1108.1169},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1108.1169},
}
Figure