CoChat

Code4Struct: Code Generation for Few-Shot Event Structure Prediction

Open access
Wang, Xingyao, Li, Sha, Ji, Heng · 2023 · Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)
Cited by 62

The DOI matches its Crossref record; 13 of the 13 references it cites were found in a registry or an index.

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-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 Event Argument Extraction Programming Language (Python) Event / Entity Type Transport, VEH Class definition class Transport, class VEH Hierarchical Event Ontology Movement:Transport Inheritance Inheritance is a way to create a hierarchy of classes in PL.A child class can base upon another class, retaining similar implementation.class Transport(Movement) Event Arguments vehicle Function arguments def function(vehicle=...) Argument ConstraintEach argument can has a list of multiple entities; Argument vehicle should be entities of type VEH. Type Annotation & Argument Default ValueType annotations are used by developers to indicate the data types of variables and input/outputs of functions.If a function is called without the argument, the argument gets its default value (a list in this case). def function( vehicle: List[VEH] = [], … ) Weakly-supervised InformationTransport Event describes someone transporting something in a vehicle from one place to another place. Docstring or Commentsclass Transport(Movement):""" self.agenttransported self.artifact in self.vehiclevehicle from self.origin place to self.destination place."""

Overview

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.18653/v1/2023.acl-long.202

Cites

13 of 13 references verified0 citation errors · 0 not checkable

Statistics

Verification

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Citations

Cites

Cited by

See all 62

Metadata

Authors
Wang, X., Li, S., & Ji, H.
Venue
Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)
Published
2023
Pages
3640-3663
OpenAlex
W4385571184
Cited by
62
References
13
FWCI
11.72
Type
conference paper
Language
en
Open access
hybrid

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.