Code4Struct: Code Generation for Few-Shot Event Structure Prediction
Xingyao Wang, Sha Li, Heng Ji
摘要
Large Language Model (LLM) trained on a mixture of text and code has demonstrated impressive capability in translating natural language (NL) into structured code. We observe that semantic structures can be conveniently translated into code and propose CODE4STRUCT to leverage such text-tostructure translation capability to tackle structured prediction tasks. As a case study, we formulate Event Argument Extraction (EAE) as converting text into event-argument structures that can be represented as a class object using code. This alignment between structures and code enables us to take advantage of Programming Language (PL) features such as inheritance 1 and type annotation 2 to introduce external knowledge or add constraints. We show that, with sufficient in-context examples, formulating EAE as a code generation problem is advantageous over using variants of text-based prompts. Despite only using 20 training event instances for each event type, CODE4STRUCT is comparable to supervised models trained on 4,202 instances and outperforms current stateof-the-art (SOTA) trained on 20-shot data by 29.5% absolute F1. By leveraging the inheritance feature of PL, CODE4STRUCT can use 10-shot training data from a sibling event type to predict arguments for zero-resource event types and outperforms the zero-shot baseline by 12% absolute F1. 3
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 21 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- GoLLIE: Annotation Guidelines improve Zero-Shot Information-Extraction 引用了 Language Models are Few-Shot Learners
- Automated Data Visualization from Natural Language via Large Language Models: An Exploratory Study 引用了 Training language models to follow instructions with human feedback
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity 引用了 Language Models are Few-Shot Learners
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity 引用了 Calibrate Before Use: Improving Few-shot Performance of Language Models
- Rethinking the Role of Demonstrations: What Makes In-Context Learning Work? 引用了 Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
- Rethinking the Role of Demonstrations: What Makes In-Context Learning Work? 引用了 Language Models are Few-Shot Learners
- Rethinking the Role of Demonstrations: What Makes In-Context Learning Work? 引用了 Calibrate Before Use: Improving Few-shot Performance of Language Models
- LaMPilot: An Open Benchmark Dataset for Autonomous Driving with Language Model Programs 引用了 Language Models are Few-Shot Learners
- Training language models to follow instructions with human feedback 引用了 Language Models are Few-Shot Learners
- Executable Code Actions Elicit Better LLM Agents 引用了 Training language models to follow instructions with human feedback
- Calibrate Before Use: Improving Few-shot Performance of Language Models 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper21
- Executable Code Actions Elicit Better LLM AgentsXingyao Wang, Yangyi Chen, Lifan Yuan, Yizhe Zhang 等ICML 2024 · 436 次引用
- GoLLIE: Annotation Guidelines improve Zero-Shot Information-ExtractionOscar Sainz, Iker García-Ferrero, Rodrigo Agerri, Oier Lopez de Lacalle 等ICLR 2024 · 168 次引用
- Automated Data Visualization from Natural Language via Large Language Models: An Exploratory StudyYang Wu, Yao Wan, Hongyu Zhang, Yulei Sui 等SIGMOD 2024 · 44 次引用
- LaMPilot: An Open Benchmark Dataset for Autonomous Driving with Language Model ProgramsYunsheng Ma, Can Cui, Xu Cao, Wenqian Ye 等CVPR 2024 · 39 次引用
- STAR: Boosting Low-Resource Information Extraction by Structure-to-Text Data Generation with Large Language ModelsMingyu Derek Ma, Xiaoxuan Wang, Po-Nien Kung, P. Jeffrey Brantingham 等AAAI 2024 · 22 次引用
它引用的 Paper12
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida 等NeurIPS 2022 · 24,707 次引用
- Calibrate Before Use: Improving Few-shot Performance of Language ModelsZihao Zhao, Eric Wallace, Shi Feng, Dan Klein 等ICML 2021 · 1,843 次引用
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order SensitivityYao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel 等ACL 2022 · 1,494 次引用
- Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?Sewon Min, Xinxi Lyu, Ari Holtzman, Mikel Artetxe 等EMNLP 2022 · 634 次引用
相关 Paper
- Extracting Events Like Code: A Multi-Agent Programming Framework for Zero-Shot Event ExtractionQuanjiang Guo, Sijie Wang, Jinchuan Zhang, Ben Zhang 等AAAI 2026
- Multilingual Generative Language Models for Zero-Shot Cross-Lingual Event Argument ExtractionKuan-Hao Huang, I-Hung Hsu, Prem Natarajan, Kai-Wei Chang 等ACL 2022
- CodeIE: Large Code Generation Models are Better Few-Shot Information ExtractorsPeng Li, Tianxiang Sun, Qiong Tang, Hang Yan 等ACL 2023 · 41 次引用
- Rule-Guided Extraction: A Hierarchical Rule Optimization Framework for Document-Level Event Argument ExtractionYue Zuo, Yuxiao Fei, Wanting Ning, Jiayi Huang 等EMNLP Findings 2025 · 2 次引用
- Contextualized Soft Prompts for Extraction of Event ArgumentsChien Van Nguyen, Hieu Man, Thien Huu NguyenACL Findings 2023 · 20 次引用
