Vector quantized variational autoencoder (VQ-VAE) is a discrete auto-encoder that compresses images into discrete tokens. It is difficult to train due to discretization. In this paper, we propose a simple yet effective technique, dubbed Gaussian Quant (GQ), that converts a Gaussian VAE with certain constraint into a VQ-VAE without training. GQ generates random Gaussian noise as a codebook and finds the closest noise to the posterior mean. Theoretically, we prove that when the logarithm of the codebook size exceeds the bits-back coding rate of the Gaussian VAE, a small quantization error is guaranteed. Practically, we propose a heuristic to train Gaussian VAE for effective GQ, named target divergence constraint (TDC). Empirically, we show that GQ outperforms previous VQ-VAEs, such as VQGAN, FSQ, LFQ, and BSQ, on both UNet and ViT architectures. Furthermore, TDC also improves upon previous Gaussian VAE discretization methods, such as TokenBridge. The source code is provided in https://github.com/tongdaxu/VQ-VAE-from-Gaussian-VAE.


翻译:向量量化变分自编码器(VQ-VAE)是一种将图像压缩为离散标记的离散自编码器。由于其离散化特性,该模型训练难度较大。本文提出了一种简单而有效的技术,称为高斯量化(GQ),它能够将具有特定约束的高斯变分自编码器转换为VQ-VAE,而无需额外训练。GQ通过生成随机高斯噪声作为码本,并寻找与后验均值最接近的噪声向量。理论上,我们证明当码本大小的对数超过高斯变分自编码器的比特回传编码率时,可以保证较小的量化误差。在实际应用中,我们提出了一种启发式方法,称为目标散度约束(TDC),用于训练高斯变分自编码器以实现有效的GQ。实验结果表明,在UNet和ViT架构上,GQ的性能优于以往的VQ-VAE模型,如VQGAN、FSQ、LFQ和BSQ。此外,TDC也改进了先前的高斯变分自编码器离散化方法,如TokenBridge。源代码发布于https://github.com/tongdaxu/VQ-VAE-from-Gaussian-VAE。

0
下载
关闭预览

相关内容

【CVPR2020】跨模态哈希的无监督知识蒸馏
专知会员服务
61+阅读 · 2020年6月25日
【NeurIPS2019】图变换网络:Graph Transformer Network
NAACL 2019 | 一种考虑缓和KL消失的简单VAE训练方法
PaperWeekly
20+阅读 · 2019年4月24日
PCA的基本数学原理
算法与数学之美
11+阅读 · 2017年8月8日
EKF常用于目标跟踪系统的扩展卡尔曼滤波器
无人机
10+阅读 · 2017年7月25日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关VIP内容
相关资讯
【NeurIPS2019】图变换网络:Graph Transformer Network
NAACL 2019 | 一种考虑缓和KL消失的简单VAE训练方法
PaperWeekly
20+阅读 · 2019年4月24日
PCA的基本数学原理
算法与数学之美
11+阅读 · 2017年8月8日
EKF常用于目标跟踪系统的扩展卡尔曼滤波器
无人机
10+阅读 · 2017年7月25日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员