Pith. sign in

REVIEW 2 cited by

Code4Struct: Code Generation for Few-Shot Event Structure Prediction

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2210.12810 v2 pith:BX7CD7SX submitted 2022-10-23 cs.CL

classification cs.CL
keywords codeeventcode4structlanguagestructurestrainedtypeabsolute
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

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-to-structure 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 and type annotation 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 state-of-the-art (SOTA) trained on 20-shot data by 29.5% absolute F1. 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.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 2 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. OpenAlex reports about 14 citations worldwide. Full citation record

  1. MPL: Multiple Programming Languages with Large Language Models for Information Extraction

    cs.CL 2025-05 conditional novelty 6.0 of 10

    Using multiple programming languages as code-style prompts during fine-tuning improves LLM information extraction accuracy over single-language prompting.

  2. Large Language Model for Extracting Complex Contract Information in Industrial Scenes

    cs.CL 2025-07 conditional novelty 3.0 of 10

    Clustering contracts, LLM-based labeling, augmentation, and LoRA fine-tuning improve Chinese industrial contract field extraction over traditional TF-IDF/TextRank/SNOWNLP/KeyBERT baselines.

Pith tools