[论文解读] Parallel Scheduled Sampling
本文提出并行调度采样(Parallel Scheduled Sampling),一种完全可并行化的技术,可在消除序列处理瓶颈的同时,复现调度采样(Scheduled Sampling)在减少自回归模型训练-测试分布差异方面的优势。通过并行生成模型预测,并使用可学习的概率调度将预测结果与真实标签混合,该方法在图像生成、摘要生成和对话任务中均达到最先进性能,FID降低最多20%,Inception Score(IS)提升13.8%,优于教师强制(teacher-forcing)方法。
Auto-regressive models are widely used in sequence generation problems. The output sequence is typically generated in a predetermined order, one discrete unit (pixel or word or character) at a time. The models are trained by teacher-forcing where ground-truth history is fed to the model as input, which at test time is replaced by the model prediction. Scheduled Sampling aims to mitigate this discrepancy between train and test time by randomly replacing some discrete units in the history with the model's prediction. While teacher-forced training works well with ML accelerators as the computation can be parallelized across time, Scheduled Sampling involves undesirable sequential processing. In this paper, we introduce a simple technique to parallelize Scheduled Sampling across time. Experimentally, we find the proposed technique leads to equivalent or better performance on image generation, summarization, dialog generation, and translation compared to teacher-forced training. In dialog response generation task, Parallel Scheduled Sampling achieves 1.6 BLEU score (11.5%) improvement over teacher-forcing while in image generation it achieves 20% and 13.8% improvement in Frechet Inception Distance (FID) and Inception Score (IS) respectively. Further, we discuss the effects of different hyper-parameters associated with Scheduled Sampling on the model performance.
研究动机与目标
- 解决自回归序列生成中的训练-测试差异问题,即训练时使用教师强制(teacher-forcing)而推理时采用自回归解码,导致分布不一致。
- 克服调度采样中因顺序处理导致的计算瓶颈,该瓶颈限制了长序列和大模型的可扩展性。
- 开发一种完全可并行化的调度采样替代方法,保留其经验优势,同时支持在现代机器学习加速器上高效训练。
- 证明所提出方法在包括图像生成和对话响应建模在内的多种序列生成任务中,性能优于或等同于教师强制和调度采样。
提出的方法
- 使用真实上下文并行生成整个序列的模型预测,等价于一次教师强制前向传播。
- 应用并行混合操作,其中时间步t的每个标记独立地从真实标签或模型预测的标记中选择,选择概率由调度函数决定。
- 使用可学习的混合概率,随时间逐步增加,以模拟原始调度采样的课程学习调度。
- 使用混合序列作为输入,执行标准的教师强制训练,从而实现通过整个序列的反向传播。
- 多次重复预测与混合步骤,使模型能够收敛至接近真实自回归解码的分布。
- 引入预热阶段:初期使用教师强制训练,随后过渡到混合训练模式,以稳定学习过程。
实验结果
研究问题
- RQ1调度采样能否在不损失其减少自回归模型训练-测试分布差异能力的前提下实现并行化?
- RQ2所提出的并行化技术是否在保持调度采样性能增益的同时,实现了大规模模型的高效训练?
- RQ3混合概率和迭代次数等超参数如何影响不同序列生成任务中的模型性能?
- RQ4在何种场景下,并行调度采样优于教师强制?其有效性的边界在哪里?
- RQ5该方法能否有效应用于长序列任务(如摘要生成和图像生成),其中顺序调度采样因计算成本过高而不可行?
主要发现
- 在CIFAR-10图像生成任务中,并行调度采样使FID降低20%,IS提升13.8%,优于教师强制方法。
- 在对话响应生成任务中,该方法相比教师强制使BLEU得分提升1.6分(相对提升11.5%)。
- 在摘要生成任务中,并行调度采样在基础模型上优于教师强制(无论使用束搜索还是贪心解码),在大模型上使用贪心解码时也表现更优。
- 该方法将训练时间缩短至顺序调度采样所需时间的0.3%,使其在大模型和长序列任务中具备实际可行性。
- 尽管在图像和文本任务中取得显著性能提升,但在机器翻译(WMT 2014 英德语)任务中未观察到性能增益,可能因序列长度较短所致。
- 在特定超参数设置下,该方法等价于调度采样,能够实现从教师强制到完全自回归解码的插值。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。