一种预测结构化输出的检索编辑框架
A Retrieve-and-Edit Framework for Predicting Structured Outputs
摘要:
对于生成复杂输出(如源代码)的任务,编辑现有输出可能比从头开始生成复杂输出更容易。出于这种动机,我们提出了一种方法,首先根据输入检索训练示例(例如,自然语言描述)并且然后将其编辑为期望的输出(例如,代码)。我们的贡献是一个计算效率高的方法学习检索模型,嵌入输入的任务依赖的方式,而不依赖于手工制作的度量或招致的费用,共同训练检索与编辑器。我们的检索和编辑框架可以应用于任何基础模型之上。我们发现,在GitHub Python代码和Hearthstone cards基准测试的新自动完成任务上,检索和编辑显著提高了两个任务上香草序列到序列模型的性能。
英文摘要:
For the task of generating complex outputs such as source code, editing existing outputs can be easier than generating complex outputs from scratch. With this motivation, we propose an approach that first retrieves a training example based on the input (e.g., natural language description) and then edits it to the desired output (e.g., code). Our contribution is a computationally efficient method for learning a retrieval model that embeds the input in a task-dependent way without relying on a hand-crafted metric or incurring the expense of jointly training the retriever with the editor. Our retrieve-and-edit framework can be applied on top of any base model. We show that on a new autocomplete task for GitHub Python code and the Hearthstone cards benchmark, retrieve-and-edit significantly boosts the performance of a vanilla sequence-to-sequence model on both tasks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。