Reproduce “Document-Level In-Context Few-Shot Relation Extraction via Pre-Trained Language Models” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Yilmazcan Ozyurt, Stefan Feuerriegel, Ce Zhang

The REPLM framework introduces the first in-context few-shot learning approach for document-level relation extraction, reformulating the task as triplet generation using pre-trained language models and distantly-supervised data. It significantly outperforms state-of-the-art baselines on DocRED, achieving an F1-score of 35.09, and demonstrates that LMs can learn to extract relations from context rather than just retrieve memorized facts.

Key insights

  • Semantic filtering of in-context examples and probabilistic aggregation across multiple example sets are crucial for achieving robust document-level relation extraction performance.
  • Existing large-scale, human-annotated datasets like DocRED often contain incomplete ground truth, with REPLM extracting numerous correct relations missing from original annotations.
  • Pre-trained language models, when properly leveraged with in-context learning, demonstrate an ability to learn to extract relations from provided context rather than merely retrieving memorized facts from their pre-training.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.