论文标题
有条件文本生成的对比度学习与对抗性扰动
Contrastive Learning with Adversarial Perturbations for Conditional Text Generation
论文作者
论文摘要
最近,具有变压器体系结构的序列到序列(SEQ2SEQ)模型在各种条件文本生成任务(例如机器翻译)上取得了出色的性能。但是,他们中的大多数人都接受了在每个时间步骤给出的地面真相标签的强迫训练,而不会在培训期间暴露于错误产生的令牌,这会损害其概括以表现出的投入,这被称为“暴露偏见”问题。在这项工作中,我们建议通过将正面对与负面对进行对比,以减轻条件文本生成问题,从而使模型暴露于输入的各种有效或不正确的扰动,以改善概括。但是,使用随机的非目标序列作为负面示例的幼稚对比度学习框架训练模型是次优的,因为它们很容易与正确的输出区分开,尤其是使用大型文本语料库预测的模型。同样,产生积极的例子需要特定领域的增强启发式方法,这可能不会概括多个领域。为了解决这个问题,我们提出了一种原则性的方法,以生成正面和负面样本以对对比度学习SEQ2SEQ模型。具体而言,我们通过在输入序列中添加小小的扰动来产生负面示例,以最大程度地减少其条件可能性,并通过添加大型扰动,同时实施其具有很高的条件可能性,从而产生负面示例。使用我们的方法引导的这种“硬”正和负对对模型产生,以更好地将正确的输出与不正确的输出区分开。我们从经验上表明,我们提出的方法显着改善了SEQ2SEQ对三个文本生成任务的概括 - 机器翻译,文本摘要和问题生成。
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.