arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2305.05711cs.CLcs.AI
收藏

CodeIE:大型代码生成模型是更好的少样本信息抽取器

CodeIE: Large Code Generation Models are Better Few-Shot Information Extractors

Fudan University(复旦大学);East China Normal University(华东师范大学)

Peng Li, Tianxiang Sun, Qiong Tang, Hang Yan, Yuanbin Wu, Xuanjing Huang, Xipeng Qiu

AI总结:

本文提出CodeIE方法,利用代码生成模型(如Codex)通过代码风格提示将信息抽取任务转化为代码生成,在少样本设置下优于微调专用模型和NL-LLMs提示方法。

摘要:

在大规模语料上预训练的大型语言模型(LLMs)在许多自然语言处理任务上展现了令人印象深刻的少样本学习能力。一种常见做法是将任务重构为文本到文本的格式,以便像GPT-3这样的自然语言生成式LLMs(NL-LLMs)可以被提示来解决该任务。然而,使用NL-LLMs执行信息抽取(IE)任务并非易事,因为IE任务的输出通常是结构化的,因此难以转换为纯文本。在本文中,我们提出将结构化输出重构为代码形式而非自然语言,并利用代码生成式LLMs(Code-LLMs),如Codex,来执行IE任务,特别是命名实体识别和关系抽取。与NL-LLMs相比,我们表明通过设计代码风格的提示并将这些IE任务表述为代码生成任务,Code-LLMs可以很好地与这些IE任务对齐。在七个基准上的实验结果表明,在少样本设置下,我们的方法始终优于专门为IE任务设计的微调中等规模预训练模型(如UIE)以及提示NL-LLMs的方法。我们进一步进行了一系列深入分析,以展示利用Code-LLMs处理IE任务的优势。

英文摘要:

Large language models (LLMs) pre-trained on massive corpora have demonstrated impressive few-shot learning ability on many NLP tasks. A common practice is to recast the task into a text-to-text format such that generative LLMs of natural language (NL-LLMs) like GPT-3 can be prompted to solve it. However, it is nontrivial to perform information extraction (IE) tasks with NL-LLMs since the output of the IE task is usually structured and therefore is hard to be converted into plain text. In this paper, we propose to recast the structured output in the form of code instead of natural language and utilize generative LLMs of code (Code-LLMs) such as Codex to perform IE tasks, in particular, named entity recognition and relation extraction. In contrast to NL-LLMs, we show that Code-LLMs can be well-aligned with these IE tasks by designing code-style prompts and formulating these IE tasks as code generation tasks. Experiment results on seven benchmarks show that our method consistently outperforms fine-tuning moderate-size pre-trained models specially designed for IE tasks (e.g., UIE) and prompting NL-LLMs under few-shot settings. We further conduct a series of in-depth analyses to demonstrate the merits of leveraging Code-LLMs for IE tasks.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑