470 research outputs found
Practical lossless compression with latent variables using bits back coding
Deep latent variable models have seen recent success in many data domains. Lossless compression is an application of these models which, despite having the potential to be highly useful, has yet to be implemented in a practical manner. We present 'Bits Back with ANS' (BB-ANS), a scheme to perform lossless compression with latent variable models at a near optimal rate. We demonstrate this scheme by using it to compress the MNIST dataset with a variational auto-encoder model (VAE), achieving compression rates superior to standard methods with only a simple VAE. Given that the scheme is highly amenable to parallelization, we conclude that with a sufficiently high quality generative model this scheme could be used to achieve substantial improvements in compression rate with acceptable running time. We make our implementation available open source at https://github.com/bits-back/bits-back
Practical Lossless Compression with Latent Variables using Bits Back Coding
Deep latent variable models have seen recent success in many data domains.
Lossless compression is an application of these models which, despite having
the potential to be highly useful, has yet to be implemented in a practical
manner. We present `Bits Back with ANS' (BB-ANS), a scheme to perform lossless
compression with latent variable models at a near optimal rate. We demonstrate
this scheme by using it to compress the MNIST dataset with a variational
auto-encoder model (VAE), achieving compression rates superior to standard
methods with only a simple VAE. Given that the scheme is highly amenable to
parallelization, we conclude that with a sufficiently high quality generative
model this scheme could be used to achieve substantial improvements in
compression rate with acceptable running time. We make our implementation
available open source at https://github.com/bits-back/bits-back
Lossless compression with latent variable models
We develop a simple and elegant method for lossless compression using latent variable models, which we call `bits back with asymmetric numeral systems' (BB-ANS). The method involves interleaving encode and decode steps, and achieves an optimal rate when compressing batches of data. We demonstrate it rstly on the MNIST test set, showing that state-of-the-art lossless compression is possible using a small variational autoencoder (VAE) model. We then make use of a novel empirical insight, that fully convolutional generative models, trained on small images, are able to generalize to images of arbitrary size, and extend BB-ANS to hierarchical latent variable models, enabling state-of-the-art lossless compression of full-size colour images from the ImageNet dataset. We describe `Craystack', a modular software framework which we have developed for rapid prototyping of compression using deep generative models
Recommended from our members
Advances in Compression using Probabilistic Models
The increasing demand for data transmission and storage necessitate the use of efficient compression methods. Compression algorithms work by mapping data to a more compact representation from which the original data can be recovered. To operate efficiently, they need to capture the characteristics of the data distribution, which can be difficult, especially for high-dimensional data.
One emerging solution lies in applying probabilistic machine learning to capture the data distribution in an unsupervised manner. Once a probabilistic model for the data is defined, variational inference can be used to infer its parameters from data. Variational inference is closely related to the optimal compression size, as stated by Hinton's bits-back argument: the evidence lower bound, the objective optimized by variational inference, corresponds to a lower bound on the optimal compression size of the average datapoint. However, current compression methods rely on variational inference merely as a heuristic, and they do not approach its postulated efficiency. In this thesis, we present principled and practical algorithms that get closer to this limit. After discussing our approach, we demonstrate its efficacy in image compression and model compression.
First, we focus on image compression, where we use a variational autoencoder to learn a mapping between the images and their unobserved, latent representations. We propose a stochastic coding scheme to encode the latent representation, from which the original image can be approximately reconstructed. Next, we look at the compression of deep learning models. We use variational inference to approximate the posterior distribution of the weights in a neural network, and apply our stochastic coding scheme to encode a weight configuration. Finally, we investigate a connection between variational inference and our compression algorithm. We show that a technique we used for compression can improve variational inference by generating samples from a highly flexible posterior approximation, without significantly increasing the computational costs
Data compression and computational efficiency
In this thesis we seek to make advances towards the goal of effective learned compression. This entails using machine learning models as the core constituent of compression algorithms, rather than hand-crafted components.
To that end, we first describe a new method for lossless compression. This method
allows a class of existing machine learning models β latent variable models β to be
turned into lossless compressors. Thus many future advancements in the field of
latent variable modelling can be leveraged in the field of lossless compression. We
demonstrate a proof-of-concept of this method on image compression. Further, we
show that it can scale to very large models, and image compression problems which
closely resemble the real-world use cases that we seek to tackle.
The use of the above compression method relies on executing a latent variable
model. Since these models can be large in size and slow to run, we consider how
to mitigate these computational costs. We show that by implementing much of the
models using binary precision parameters, rather than floating-point precision, we
can still achieve reasonable modelling performance but requiring a fraction of the
storage space and execution time.
Lastly, we consider how learned compression can be applied to 3D scene data - a
data medium increasing in prevalence, and which can require a significant amount of
space. A recently developed class of machine learning models - scene representation
functions - has demonstrated good results on modelling such 3D scene data. We
show that by compressing these representation functions themselves we can achieve
good scene reconstruction with a very small model size
- β¦