Research map / Large language models / Language, safety and interpretability
Code4Struct: Code Generation for Few-Shot Event Structure Prediction
Read the paperPlace an idea next to itCheck your own paper ↗
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| use a code prompt rather than text prompt T1 with 20 in-context examples | Code4Struct (code-davinci-002) · ACE05-E Arg-C | F1: 54.9 -> 58.5 | Improved |
| use a code prompt rather than BART-Gen-style text prompt on text-davinci-003 at 20-shot | Code4Struct (text-davinci-003) · ACE05-E Arg-C | F1: 60.8 (text) vs 60.4 (code) | No clear effect |
| 20-shot Code4Struct instead of 20-shot DEGREE | Code4Struct (text-davinci-003) · ACE05-E Arg-C | F1: 30.9 -> 60.4 | Improved |
| zero-shot Code4Struct with text-davinci-003 vs 50-shot DEGREE | Code4Struct · ACE05-E Arg-C | F1: 37.3 -> 37.8 | Improved |
| add event trigger marking (ablation) | Code4Struct (code-davinci-002) · ACE05-E Arg-C 20-shot | F1: 53.8 -> 58.5 | Improved |
| add event description (ablation) | Code4Struct (code-davinci-002) · ACE05-E Arg-C 20-shot | F1: 57.1 -> 58.5 | Improved |
| add event description (ablation) | Code4Struct (code-davinci-002) · ACE05-E 0-shot Arg-I | F1: 51.4 -> 50.6 | Hurt |
| add type annotation (ablation) | Code4Struct (code-davinci-002) · ACE05-E Arg-C 20-shot | F1: 57.6 -> 58.5 | Improved |
| add type annotation (ablation) | Code4Struct (code-davinci-002) · ACE05-E Arg-C 10-shot | F1: 54.5 -> 52.8 | Mixed |
| add hierarchical (parent class) event definition (ablation) | Code4Struct (code-davinci-002) · ACE05-E Arg-C 20-shot | F1: 55.4 -> 58.5 | Improved |
| use 10 examples from sibling event type instead of 0-shot | Code4Struct (code-davinci-002) · ACE05-E 23 test types Arg-C | F1: 42.9 -> 54.9 | Improved |
| use sibling-type instead of same-type examples (10-shot) | Code4Struct (code-davinci-002) · ACE05-E 23 test types Arg-C | F1: 55.2 -> 54.9 | No clear effect |
Later papers that compared with this method
1 later accepted paper reports Code4Struct as a baseline in their results tables; 1 of them report a better number on most of the results they share with it.
- REAR: Reinforced Reasoning Optimization for Event Argument Extraction with Relation-Aware Support (EMNLP 2025 · better on 1 of 1 shared result)
Matched by method name in results tables read by AI. Authors' own tables tend to favour the newer method, and a comparison can be missed when a method is renamed.
Open problems in controlled text generation
How can generation be controlled and checked reliably across languages, domains and model sizes without extra cost?
- Each study covers one domain, source or task, so transfer is unknown. · 13 papers state it
- Only a few languages are tested, mostly English or high-resource ones. · 12 papers state it
- Extra stages, calls or tokens make generation slower and costlier. · 10 papers state it
Closest papers by meaning
- Extracting Events Like Code: A Multi-Agent Programming Framework for Zero-Shot Event Extraction (AAAI 2026 · similarity 0.86)
- Benchmarking Language Models for Code Syntax Understanding (EMNLP 2022 · similarity 0.85)
- Instruction-Tuning LLMs for Event Extraction with Annotation Guidelines (ACL 2025 · similarity 0.85)
- CGBridge: Bridging Code Graphs and Large Language Models for Better Structure-Aware Code Understanding (ACL 2026 · similarity 0.85)
- Query and Extract: Refining Event Extraction as Type-oriented Binary Decoding (ACL 2022 · similarity 0.85)
- AST-T5: Structure-Aware Pretraining for Code Generation and Understanding (ICML 2024 · similarity 0.85)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.