Template Filling with Generative Transformers

Xinya Du, Alexander M. Rush, Claire Cardie

Introduction

Document-level template filling is a core task in Information Extraction (IE) that aims to identify "who did what to whom" by extracting event types and their associated roles (e.g., perpetrator, target, weapon). Traditionally, this task has been approached using pipeline systems that first extract entities and then assign them to templates. However, these pipelines suffer from error propagation and often treat events in isolation, failing to capture dependencies between multiple events described in a single document.

To address these challenges, we present GTT (Generative Template Transformer), an end-to-end framework that treats template filling as a sequence generation problem. By leveraging a generative transformer to "write out" event templates, GTT naturally models inter-event dependencies and significantly outperforms traditional methods.

Methodology: GTT Framework

GTT redefines template filling by framing it as a translation task: converting unstructured prose into a structured template language. The model uses a BERT-based encoder-decoder architecture to generate a sequence of event templates.

The GTT architecture treats template filling as a sequence generation task, using a generative transformer to produce structured event templates from document tokens.

Key Components

  • Task as Sequence Generation: The input consists of the document text and a list of potential event types. The output is a structured string representing the identified events.
  • Pointer Decoding: Instead of generating words from a fixed vocabulary, GTT employs a pointer mechanism to predict the start and end indices of spans within the source document. This ensures that all extracted information is grounded in the original text.
  • Encoder-Decoder Architecture: A single BERT model serves as both encoder and decoder. A partial causal attention mask is applied during training to prevent the decoder from attending to future tokens in the target sequence.

Experimental Evaluation

The model was evaluated on the MUC-4 dataset, a classic benchmark featuring 1,700 documents related to Latin American terrorism. MUC-4 is particularly challenging due to its six event types and the frequent occurrence of multiple related or overlapping events within a single article.

Results and Performance

GTT achieved a micro-average F1 score of 50.23, surpassing the best pipeline baseline (47.31) and the popular span-based model DYGIE++ (45.79). Its performance in event recognition was notably strong, reaching an F1 of 67.44.

The most significant advantage of GTT is its robustness as document complexity increases. While all models see a decline in performance when handling documents with multiple events, GTT's degradation is far more graceful.

Comparison of F1 scores across different numbers of events (E). GTT (Ours) maintains significantly higher performance than GRIT-pipeline and DyGIE++ as the number of events increases.

As shown in the figure above, GTT's performance drop on multi-event documents was only -9.26%, compared to a -21.33% plunge for the pipeline approach. This confirms that the holistic, generative approach is superior at capturing document-level context and inter-event relationships.

Conclusion and Future Work

GTT demonstrates that framing structured data extraction as a sequence generation task is highly effective for complex, multi-event documents. By modeling events holistically, it avoids the pitfalls of pipeline isolation and error propagation. Future research may explore the impact of role ordering within the generated sequence and the potential benefits of using larger pre-trained models to further enhance extraction accuracy.

Summary updated

BibTeX
@inproceedings{du2021template,
  author = {Xinya Du and Alexander M. Rush and Claire Cardie},
  title = {{Template Filling with Generative Transformers}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2021},
  doi = {10.18653/v1/2021.naacl-main.70},
}
Figure