Abstract
Relation extraction aims to classify the relationships between two entities into pre-defined categories. While previous research has mainly focused on sentence-level relation extraction, recent studies have expanded the scope to document-level relation extraction. Traditional relation extraction methods heavily rely on human-annotated training data, which is time-consuming and labor-intensive. To mitigate the need for manual annotation, recent weakly-supervised approaches have been developed for sentence-level relation extraction while limited work has been done on document-level relation extraction. Weakly-supervised document-level relation extraction faces significant challenges due to an imbalanced number of "no relation" instances and the failure of directly probing pretrained large language models for document relation extraction. To address these challenges, we propose PromptRE, a novel weakly-supervised document-level relation extraction method that combines prompting-based techniques with data programming. Furthermore, PromptRE incorporates the label distribution and entity types as prior knowledge to improve the performance. By leveraging the strengths of both prompting and data programming, PromptRE achieves improved performance in relation classification and effectively handles the "no relation" problem. Experimental results on ReDocRED, a benchmark dataset for document-level relation extraction, demonstrate the superiority of PromptRE over baseline approaches.
Introduction
Relation Extraction (RE) is the task of identifying how two entities in a text are connected (e.g., "Pacific Fair" is located in "Queensland"). While sentence-level extraction is well-studied, Document-level RE (DocRE) is significantly more challenging due to three primary factors:
- Long-range dependencies: Entities may be mentioned multiple times across different sentences, requiring the model to reason over the entire document context.
- The "NA" Problem: In a typical document, the vast majority of entity pairs have no defined relationship. This creates a massive class imbalance where "No Relation" (NA) instances overwhelm the actual data.
- Annotation Cost: Traditional supervised models require thousands of manually labeled documents, which is prohibitively slow and expensive.
Existing weakly-supervised methods often struggle with the complexity and noise inherent in full-length documents. PromptRE addresses these by using Large Language Models (LLMs) as noisy labeling functions and denoising their outputs through statistical data programming.
Methodology
PromptRE utilizes a multi-stage pipeline designed to handle long contexts and noisy signals from LLMs.
1. Entity-Oriented Preprocessing
To manage long contexts, the system uses ChatGPT to summarize only the information relevant to the specific entities being queried. This distilled context reduces noise and focuses the model on the most pertinent relational evidence.
2. Multi-Strategy Prompting
PromptRE employs three distinct prompting strategies to extract signals from LLMs (such as LLaMA2 or UnifiedQA):
- Relation-Specific ($Prompt_{RE}$): Directly asking if a specific relation exists between two entities.
- Open-Ended ($Prompt_{OE}$): Asking for the relationship in natural language and comparing the embedding of the LLM's answer to known relation labels using cosine similarity.
- Existence Check ($Prompt_{SR}$): A binary check to determine if any relationship exists, which helps mitigate the NA problem.
3. Data Programming (DP)
Instead of relying on a single prompt, PromptRE treats different prompts as "weak supervisors." It uses a mathematical framework based on the Snorkel approach to estimate the accuracy of these sources and combine them into a single, denoised "pseudo-label."
4. Prior Knowledge Integration
The framework incorporates entity type constraints (e.g., a "Person-Person" pair cannot have a "capital of" relation) and relation distributions to filter out impossible predictions and calibrate the model.
Experimental Setup
The authors evaluate PromptRE on ReDocRED, a refined version of the DocRED dataset. ReDocRED is designed to resolve the incompleteness of original DocRED labels, providing a more rigorous benchmark for document-level reasoning. The experiments utilize various LLM backbones, including LLaMA2-7B and UnifiedQA-Large.
Results and Discussion
PromptRE demonstrates a significant improvement over simple prompting baselines. As shown in the results table, the integration of Data Programming (DP) consistently boosts performance across different LLM backbones.
Key Findings
- Embeddings vs. Raw Text: Using cosine similarity of embeddings from open-ended prompts proved more effective than forcing models to output exact label strings, as LLMs are often naturally "chatty."
- The "Existence" Signal: The binary existence check was one of the most effective weak signals for filtering out "NA" noise.
- The NA Bottleneck: A critical insight is the performance gap between weak supervision and the "True NA Mask" scenario. If the model were perfectly informed of which pairs had no relation, the F1 score would jump from ~10 to ~46, highlighting that identifying the existence of a relation is the current primary bottleneck.
Conclusion
PromptRE represents a significant step forward for zero-label document-level extraction. While a performance gap remains compared to fully supervised models (which achieve ~80 F1), PromptRE effectively leverages LLMs and data programming to navigate the complex "no relation" problem without manual annotation. Future work will explore few-shot learning to better calibrate the LLM's understanding of specific relation spaces.
Summary updated