This paper introduces Associative Compression Networks (ACNs), a newframework for variational autoencoding with neural networks. The system differsfrom existing variational autoencoders in that the prior distribution used tomodel each code is conditioned on a similar code from the dataset. Incompression terms this equates to sequentially transmitting the data using anordering determined by proximity in latent space. As the prior need onlyaccount for local, rather than global variations in the latent space, thecoding cost is greatly reduced, leading to rich, informative codes, even whenautoregressive decoders are used. Experimental results on MNIST, CIFAR-10,ImageNet and CelebA show that ACNs can yield improved dataset compressionrelative to order-agnostic generative models, with an upper bound of 73.9 natsper image on binarized MNIST. They also demonstrate that ACNs learn high-levelfeatures such as object class, writing style, pose and facial expression, whichcan be used to cluster and classify the data, as well as to generate diverseand convincing samples.