Lune

ACL2023顶会

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

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

摘要

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. 1

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 19 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • GoLLIE: Annotation Guidelines improve Zero-Shot Information-Extraction 引用了 Language Models are Few-Shot Learners
  • Large language models are few-shot clinical information extractors 引用了 Language Models are Few-Shot Learners
  • KnowCoder: Coding Structured Knowledge into LLMs for Universal Information Extraction 引用了 GoLLIE: Annotation Guidelines improve Zero-Shot Information-Extraction
  • Rethinking the Role of Demonstrations: What Makes In-Context Learning Work? 引用了 Language Models are Few-Shot Learners
  • Improving Natural Language Understanding for LLMs via Large-Scale Instruction Synthesis 引用了 GoLLIE: Annotation Guidelines improve Zero-Shot Information-Extraction
  • QUEST: Query Optimization in Unstructured Document Analysis 引用了 GoLLIE: Annotation Guidelines improve Zero-Shot Information-Extraction
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper19

  1. GoLLIE: Annotation Guidelines improve Zero-Shot Information-ExtractionOscar Sainz, Iker García-Ferrero, Rodrigo Agerri, Oier Lopez de Lacalle 等ICLR 2024 · 168 次引用
  2. Code-Style In-Context Learning for Knowledge-Based Question AnsweringZhijie Nie, Richong Zhang, Zhongyuan Wang, Xudong LiuAAAI 2024 · 24 次引用
  3. KnowCoder: Coding Structured Knowledge into LLMs for Universal Information ExtractionZixuan Li, Yutao Zeng, Yuxin Zuo, Weicheng Ren 等ACL 2024 · 19 次引用
  4. QUEST: Query Optimization in Unstructured Document AnalysisZhaoze Sun, Chengliang Chai, Qiyan Deng, Kaisen Jin 等VLDB 2025 · 9 次引用
  5. Improving Natural Language Understanding for LLMs via Large-Scale Instruction SynthesisLin Yuan, Jun Xu, Honghao Gui, Mengshu Sun 等AAAI 2025 · 3 次引用

它引用的 Paper13

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and GenerationYue Wang, Weishi Wang, Shafiq R. Joty, Steven C. H. HoiEMNLP 2021 · 1,224 次引用
  3. Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?Sewon Min, Xinxi Lyu, Ari Holtzman, Mikel Artetxe 等EMNLP 2022 · 634 次引用
  4. Large language models are few-shot clinical information extractorsMonica Agrawal, Stefan Hegselmann, Hunter Lang, Yoon Kim 等EMNLP 2022 · 285 次引用
  5. REBEL: Relation Extraction By End-to-end Language generationPere-Lluís Huguet Cabot, Roberto NavigliEMNLP Findings 2021 · 262 次引用

相关 Paper

  1. Language Models of Code are Few-Shot Commonsense LearnersAman Madaan, Shuyan Zhou, Uri Alon, Yiming Yang 等EMNLP 2022 · 103 次引用
  2. Generating Diverse Training Samples for Relation Extraction with Large Language ModelsZexuan Li, Hongliang Dai, Piji LiACL 2025
  3. C-ICL: Contrastive In-context Learning for Information ExtractionYing Mo, Jiahao Liu, Jian Yang, Qifan Wang 等EMNLP Findings 2024 · 28 次引用
  4. Large Language Model Is Not a Good Few-shot Information Extractor, but a Good Reranker for Hard Samples!Yubo Ma, Yixin Cao, Yong Hong, Aixin SunEMNLP Findings 2023 · 125 次引用
  5. Thinking about GPT-3 In-Context Learning for Biomedical IE? Think AgainBernal Jimenez Gutierrez, Nikolas McNeal, Clayton Washington, You Chen 等EMNLP Findings 2022 · 115 次引用
黄昏的海面,两侧是细线勾勒的悬崖