Soft Convex Quantization: Revisiting Vector Quantization with Convex Optimization

Abstract

Vector Quantization (VQ) is a well-known technique in deep learning for extracting informative discrete latent representations. VQ-embedded models have shown impressive results in a range of applications including image and speech generation. VQ operates as a parametric K-means algorithm that quantizes inputs using a single codebook vector in the forward pass. While powerful, this technique faces practical challenges including codebook collapse, non-differentiability and lossy compression. To mitigate the aforementioned issues, we propose Soft Convex Quantization (SCQ) as a direct substitute for VQ. SCQ works like a differentiable convex optimization (DCO) layer: in the forward pass, we solve for the optimal convex combination of codebook vectors to quantize the inputs. In the backward pass, we leverage differentiability through the optimality conditions of the forward solution. We then introduce a scalable relaxation of the SCQ optimization and demonstrate its efficacy on the CIFAR-10, GTSRB and LSUN datasets. We train powerful SCQ autoencoder models that significantly outperform matched VQ architectures, observing an order of magnitude better image reconstruction and codebook usage with comparable quantization runtime.

Cite

Text

Gautam et al. "Soft Convex Quantization: Revisiting Vector Quantization with Convex Optimization." Proceedings of the 6th Annual Learning for Dynamics & Control Conference, 2024.

Markdown

[Gautam et al. "Soft Convex Quantization: Revisiting Vector Quantization with Convex Optimization." Proceedings of the 6th Annual Learning for Dynamics & Control Conference, 2024.](https://mlanthology.org/l4dc/2024/gautam2024l4dc-soft/)

BibTeX

@inproceedings{gautam2024l4dc-soft,
  title     = {{Soft Convex Quantization: Revisiting Vector Quantization with Convex Optimization}},
  author    = {Gautam, Tanmay and Pryzant, Reid and Yang, Ziyi and Zhu, Chenguang and Sojoudi, Somayeh},
  booktitle = {Proceedings of the 6th Annual Learning for Dynamics & Control Conference},
  year      = {2024},
  pages     = {273-285},
  volume    = {242},
  url       = {https://mlanthology.org/l4dc/2024/gautam2024l4dc-soft/}
}