[论文解读] Contrastive Learning with Adversarial Perturbations for Conditional Text Generation
本文提出 CLAPS,一种用于序列到序列模型的对比学习方法,通过对抗性扰动生成困难的正样本和负样本,以缓解条件文本生成中的暴露偏差问题。通过最小化负样本的条件似然,并强制提高语义相似但距离较远的正样本的似然,CLAPS 在机器翻译、文本摘要和问题生成任务中均实现了对基线模型的一致性能提升,显著改善了泛化能力。
Recently, sequence-to-sequence (seq2seq) models with the Transformer architecture have achieved remarkable performance on various conditional text generation tasks, such as machine translation. However, most of them are trained with teacher forcing with the ground truth label given at each time step, without being exposed to incorrectly generated tokens during training, which hurts its generalization to unseen inputs, that is known as the "exposure bias" problem. In this work, we propose to mitigate the conditional text generation problem by contrasting positive pairs with negative pairs, such that the model is exposed to various valid or incorrect perturbations of the inputs, for improved generalization. However, training the model with naive contrastive learning framework using random non-target sequences as negative examples is suboptimal, since they are easily distinguishable from the correct output, especially so with models pretrained with large text corpora. Also, generating positive examples requires domain-specific augmentation heuristics which may not generalize over diverse domains. To tackle this problem, we propose a principled method to generate positive and negative samples for contrastive learning of seq2seq models. Specifically, we generate negative examples by adding small perturbations to the input sequence to minimize its conditional likelihood, and positive examples by adding large perturbations while enforcing it to have a high conditional likelihood. Such "hard" positive and negative pairs generated using our method guides the model to better distinguish correct outputs from incorrect ones. We empirically show that our proposed method significantly improves the generalization of the seq2seq on three text generation tasks - machine translation, text summarization, and question generation.
研究动机与目标
- 为解决使用教师强制训练的序列到序列模型中存在的暴露偏差问题,即模型在训练过程中从未接触过错误生成的结果。
- 通过在训练过程中引入多样化且有意义的正负样本,提升模型的泛化能力。
- 克服使用随机负样本的朴素对比学习方法的局限性,因为这些负样本容易被区分且效果不佳。
- 提出一种系统化的方法,通过在隐藏表示上施加对抗性扰动,生成语义上有意义的困难正负样本对。
- 在多个条件文本生成任务中验证所提方法的有效性。
提出的方法
- 通过向输入序列的隐藏表示添加微小扰动,最小化其条件似然,从而生成负样本。
- 通过对目标序列的隐藏表示施加大扰动,同时通过最小化 KL 散度来强制保持高条件似然,从而生成正样本。
- 在对比学习框架中使用生成的困难正负样本对,以提升模型对正确与错误输出的判别能力。
- 端到端训练序列到序列模型,结合原始输入输出对与扰动后的输入输出对,使用对比损失进行优化。
- 利用预训练模型提升生成扰动的质量,从而增强泛化能力。
- 将该方法应用于多种文本生成任务中的 Transformer 架构序列到序列模型。
实验结果
研究问题
- RQ1通过对抗性生成的困难负样本和正样本是否能提升条件文本生成中模型的泛化能力?
- RQ2与使用随机负样本的朴素对比学习相比,基于系统化扰动的对比学习在模型性能和鲁棒性方面表现如何?
- RQ3所提出的方法是否能有效缓解序列到序列模型中的暴露偏差,而无需依赖强化学习或 GAN 训练?
- RQ4CLAPS 在机器翻译、摘要和问题生成等多样化文本生成任务中的性能提升程度如何?
- RQ5当使用困难且语义上合理的对比样本进行训练时,模型区分正确与错误输出的能力是否得到增强?
主要发现
- CLAPS 在三个文本生成任务(机器翻译、文本摘要和问题生成)中显著提升了泛化能力。
- 该方法在强基线模型上实现了持续的性能提升,包括使用教师强制训练的模型以及采用随机负样本的对比学习模型。
- 经过 CLAPS 训练的模型由于接触了困难且语义上合理的负样本,对分布偏移和未见输入表现出更强的鲁棒性。
- 实验表明,CLAPS 生成的对比样本比随机负样本更难区分,表现为在正负样本对上的零样本分类准确率更低。
- 通过对抗性扰动生成正负样本,使模型预测与真实标签之间的对齐更加紧密,尤其在低资源或分布外设置下效果更明显。
- 即使应用于在大规模语料上预训练的模型,该方法依然有效,而朴素对比学习因随机负样本易被区分而失效。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。