Compressing large neural networks is an important step for their deployment\nin resource-constrained computational platforms. In this context, vector\nquantization is an appealing framework that expresses multiple parameters using\na single code, and has recently achieved state-of-the-art network compression\non a range of core vision and natural language processing tasks. Key to the\nsuccess of vector quantization is deciding which parameter groups should be\ncompressed together. Previous work has relied on heuristics that group the\nspatial dimension of individual convolutional filters, but a general solution\nremains unaddressed. This is desirable for pointwise convolutions (which\ndominate modern architectures), linear layers (which have no notion of spatial\ndimension), and convolutions (when more than one filter is compressed to the\nsame codeword). In this paper we make the observation that the weights of two\nadjacent layers can be permuted while expressing the same function. We then\nestablish a connection to rate-distortion theory and search for permutations\nthat result in networks that are easier to compress. Finally, we rely on an\nannealed quantization algorithm to better compress the network and achieve\nhigher final accuracy. We show results on image classification, object\ndetection, and segmentation, reducing the gap with the uncompressed model by 40\nto 70% with respect to the current state of the art.\n