[Paper Review] Minimal Random Code Learning: Getting Bits Back from Compressed Model Parameters
This paper proposes Minimal Random Code Learning (MIRACLE), a novel neural network compression method that encodes a random sample from a variational posterior distribution over weights, achieving near-theoretical compression limits via the bits-back argument. By directly optimizing for both model performance and compression rate through KL divergence control, MIRACLE sets new state-of-the-art in Pareto efficiency on MNIST and CIFAR-10 benchmarks.
While deep neural networks are a highly successful model class, their large memory footprint puts considerable strain on energy consumption, communication bandwidth, and storage requirements. Consequently, model size reduction has become an utmost goal in deep learning. A typical approach is to train a set of deterministic weights, while applying certain techniques such as pruning and quantization, in order that the empirical weight distribution becomes amenable to Shannon-style coding schemes. However, as shown in this paper, relaxing weight determinism and using a full variational distribution over weights allows for more efficient coding schemes and consequently higher compression rates. In particular, following the classical bits-back argument, we encode the network weights using a random sample, requiring only a number of bits corresponding to the Kullback-Leibler divergence between the sampled variational distribution and the encoding distribution. By imposing a constraint on the Kullback-Leibler divergence, we are able to explicitly control the compression rate, while optimizing the expected loss on the training set. The employed encoding scheme can be shown to be close to the optimal information-theoretical lower bound, with respect to the employed variational family. Our method sets new state-of-the-art in neural network compression, as it strictly dominates previous approaches in a Pareto sense: On the benchmarks LeNet-5/MNIST and VGG-16/CIFAR-10, our approach yields the best test performance for a fixed memory budget, and vice versa, it achieves the highest compression rates for a fixed test performance.
Motivation & Objective
- To address the high memory and energy costs of large deep neural networks in mobile and edge applications.
- To overcome the suboptimal compression efficiency of existing methods that fix on a single deterministic weight set.
- To exploit the overparameterization of deep networks by selecting a 'cheap' weight configuration from a distribution of good ones.
- To provide explicit, direct control over both model performance and compression rate during training.
- To achieve compression rates close to the information-theoretic lower bound using practical, implementable coding schemes.
Proposed method
- The method learns a full variational posterior distribution over network weights, rather than a single deterministic set.
- It encodes a random sample from this variational distribution using a coding scheme that leverages the bits-back argument to achieve near-optimal compression.
- The coding cost is approximately equal to the KL divergence between the variational posterior and a prior, which is minimized during training.
- A practical algorithm is designed to generate approximate samples from the variational distribution that can be efficiently encoded.
- The compression rate is explicitly controlled via a KL divergence penalty term, directly linking it to the code length.
- The approach uses a local coding goal and iterative variational updates to balance performance and compression.
Experimental results
Research questions
- RQ1Can we achieve higher compression rates than existing methods by encoding a random sample from a full variational posterior instead of a single deterministic weight set?
- RQ2To what extent can the bits-back argument be practically realized in neural network compression without requiring joint encoding of targets?
- RQ3Can we achieve explicit, direct control over both model accuracy and compression size through a single hyperparameter (e.g., KL penalty)?
- RQ4How close can a practical compression method get to the theoretical information-theoretic lower bound for weight encoding?
- RQ5Does exploiting overparameterization by selecting a 'cheap' weight configuration improve the Pareto trade-off between model size and test accuracy?
Key findings
- On LeNet-5/MNIST, MIRACLE achieved a test error of 0.69% at 3.03 kB (555× compression), outperforming Bayesian Compression (1.0% error at 2.3 kB) and Deep Compression (0.8% at 44 kB).
- For the same model, MIRACLE achieved 1110× compression (1.52 kB) with 0.96% test error, surpassing all prior methods in compression efficiency.
- On VGG-16/CIFAR-10, MIRACLE achieved 452× compression (135 kB) with 10.0% test error, significantly outperforming Bayesian Compression (95×, 8.6%) and other baselines.
- MIRACLE constructed a clear Pareto frontier by varying the KL penalty, demonstrating superior trade-offs: better accuracy for any given size, and better compression for any given accuracy.
- The method achieved state-of-the-art performance by strictly dominating previous approaches in a Pareto sense across both benchmarks.
- Theoretical analysis confirms that the method’s coding efficiency is close to the information-theoretic lower bound, as defined by the bits-back argument.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.