Skip to main content
QUICK REVIEW

[论文解读] Generating Sequences by Learning to Self-Correct

Sean Welleck, Ximing Lu|arXiv (Cornell University)|Oct 31, 2022
Software Engineering Research被引用 28
一句话总结

自我纠错将序列生成分解为一个基本生成器和一个单独纠错器,该纠错器迭代改进输出,在不更新基础模型的情况下在多个任务上取得改进。纠错器可以比基本生成器小,并且可以利用显式反馈。

ABSTRACT

Sequence generation applications require satisfying semantic constraints, such as ensuring that programs are correct, using certain keywords, or avoiding undesirable content. Language models, whether fine-tuned or prompted with few-shot demonstrations, frequently violate these constraints, and lack a mechanism to iteratively revise their outputs. Moreover, some powerful language models are of extreme scale or inaccessible, making it inefficient, if not infeasible, to update their parameters for task-specific adaptation. We present Self-Correction, an approach that decouples an imperfect base generator (an off-the-shelf language model or supervised sequence-to-sequence model) from a separate corrector that learns to iteratively correct imperfect generations. To train the corrector, we propose an online training procedure that can use either scalar or natural language feedback on intermediate imperfect generations. We show that Self-Correction improves upon the base generator in three diverse generation tasks - mathematical program synthesis, lexically-constrained generation, and toxicity control - even when the corrector is much smaller than the base generator.

研究动机与目标

  • 证明在序列生成中进行迭代精炼以满足语义约束的必要性。
  • 提出一个两模块框架:一个基本生成器和一个可迭代应用的单独纠错器。
  • 为纠错器开发一种在线训练程序,使用标量值或自然语言反馈。
  • 展示纠错器在跨任务中的有效性及对其他生成器和设置的迁移能力。

提出的方法

  • 将 p(y|x) 分解为 p0(y0|x) 与 pθ(y|y0,x) 的乘积,以形成具有多次纠错步骤的自我纠错器。
  • 通过自我纠错学习训练纠错器,从生成器输出和纠正的集合中构建价值提升对。
  • 使用标量值函数 v(·) 来引导改进,可选的反馈 f(·) 指导纠错。
  • 通过配对和采样策略形成并抽取价值提升对,平衡改进与相似性。
  • 通过从生成器解码 y0 来推断最终输出,然后从纠错器迭代解码 y(t+1)。

实验结果

研究问题

  • RQ1在线训练的单独纠错器是否能在多样化任务中提升基本生成器的质量?
  • RQ2在换入更大或不同的生成器时,纠错机制是否可迁移?
  • RQ3显式的自然语言反馈是否进一步提升纠错质量?
  • RQ4训练动态(配对、邻近性、探索)对纠错器有效性有何影响?

主要发现

  • 自我纠错在数学程序综合、词汇受限生成和有害性控制方面提升了基本生成器。
  • 一个比基础生成器更小的纠错器仍然能实现显著提升。
  • 纠错器能够把改进转移到更大的生成器,即使在测试时更换生成器也可。
  • 显式的自然语言反馈进一步引导纠错,在各任务中带来性能提升。
  • 多次纠错与提出的训练动态共同促进更强的改进,探索有助于提升性能。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。