Skip to main content
QUICK REVIEW

[论文解读] Straightening Out the Straight-Through Estimator: Overcoming Optimization Challenges in Vector Quantized Networks

Minyoung Huh, Brian Cheung|arXiv (Cornell University)|May 15, 2023
Domain Adaptation and Few-Shot LearningComputer Science被引用 9
一句话总结

本文分析在使用直通估计(STE)的向量量化网络中的训练不稳定性,识别码本嵌入发散为核心问题,并提出仿射码向量重参数化、交替优化,以及改进的承诺损失,以在不同架构上使训练稳定。

ABSTRACT

This work examines the challenges of training neural networks using vector quantization using straight-through estimation. We find that a primary cause of training instability is the discrepancy between the model embedding and the code-vector distribution. We identify the factors that contribute to this issue, including the codebook gradient sparsity and the asymmetric nature of the commitment loss, which leads to misaligned code-vector assignments. We propose to address this issue via affine re-parameterization of the code vectors. Additionally, we introduce an alternating optimization to reduce the gradient error introduced by the straight-through estimation. Moreover, we propose an improvement to the commitment loss to ensure better alignment between the codebook representation and the model embedding. These optimization methods improve the mathematical approximation of the straight-through estimation and, ultimately, the model performance. We demonstrate the effectiveness of our methods on several common model architectures, such as AlexNet, ResNet, and ViT, across various tasks, including image classification and generative modeling.

研究动机与目标

  • 研究为什么在 STE 下训练 VQN 会不稳定,以及为什么会发生索引崩溃。
  • 表征训练过程中编码器嵌入分布与码本分布之间的发散。
  • 开发优化技术以使码本与嵌入对齐并减少梯度估计误差。
  • 在分类与生成任务的标准架构上展示所提方法。

提出的方法

  • 将承诺损失制定为嵌入分布与码本分布之间的发散度,以诊断不稳定性。
  • 提出对码向量的仿射重参数化,使用共享的全局均值和标准差以减少内部协变量偏移。
  • 引入交替优化,在更新码本(h)与其余模型(F,G)之间交替。
  • 澄清同步/一步更新并推导同步更新以减少 z_q 的梯度滞后。
  • 建议改进承诺损失,以在 z_e 与 z_q 之间提高对齐。
  • 在 AlexNet、ResNet,以及 ViT 上评估这些方法,涵盖分类与生成建模任务。

实验结果

研究问题

  • RQ1使用直通估计训练向量量化网络时的不稳定性原因是什么?
  • RQ2编码器嵌入分布与码本分布之间的发散如何促成索引崩溃?
  • RQ3仿射重参数化和交替优化是否能降低梯度估计误差并改善码本对齐?
  • RQ4对承诺损失的改进是否能在训练中改善 z_e 与 z_q 之间的交互?

主要发现

  • 对码向量的仿射重参数化显著减少索引崩溃并改善分布匹配。
  • 在更新码本与模型其他部分之间进行交替优化可减少梯度错位并改善稳定性。
  • z_q 的同步更新规则减轻更新延迟并增强与编码器的对齐。
  • 组合方法在 ImageNet100 分类任务中对 AlexNet、ResNet18 和 ViT 提供了最新的性能提升。
  • 预热和归一化有助于稳定性,但可能以表达能力的折衷为代价;带预热的余弦学习率是有效的。
  • 在生成建模任务中,将所提方法与现有基于 VQ 的框架结合后能改善重建指标。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。