TL;DR
GREC (Generative Relation Extraction and Classification) reframes relation extraction as a sequence-to-sequence generation task using pre-trained models like BART and T5. By carefully encoding entity information and introducing novel "knobs" for precision and recall tuning, the authors achieve state-of-the-art results across three major benchmarks while offering a high-speed "one-pass" extraction variant.
What Problem Does This Paper Address?
Relation Extraction (RE) is the task of identifying semantic links between entities in text—for example, recognizing that in the sentence "Steve Jobs founded Apple," there is a founder relationship between "Steve Jobs" and "Apple."
Traditionally, this is treated as a classification problem: given a sentence and two entities, pick the correct relationship from a pre-defined list. However, classification models often struggle to capture the complex syntactic and semantic nuances when multiple entities and relations overlap in a single sentence. Furthermore, balancing precision (avoiding false positives) and recall (finding all true relations) usually requires significant architectural changes or retraining.
Methods
The authors propose GREC, which treats RE as a translation task. Instead of outputting a class label, the model generates a text string representing the relation triple.
1. Encoding Strategy
The model uses a standard Transformer-based encoder-decoder (BART or T5). The "secret sauce" lies in how the input (source) and output (target) are formatted:
- Source Encoding: The authors found that marking entities with their types (e.g.,
[Person] Toefting [Person]) in the source sentence significantly outperforms using generic markers like$or&. - Target Encoding: The model generates a triple in the format
[subject | relation | object]. Interestingly, the authors found that the "Subject-Verb-Object" (SVO) order works best, likely because it aligns with the natural language patterns the models learned during pre-training.
2. Precision and Recall Tuning
To give practitioners more control, the authors introduced two techniques:
- Negative Sampling ($\alpha$): During training, they randomly drop a fraction of "no relation" examples. Reducing $\alpha$ forces the model to see a higher ratio of positive relations, boosting recall.
- Decoding Scaling ($\beta$): During inference, the model generates the top $N$ possible sequences. If the model is torn between a positive relation and a "None" relation, the $\beta$ factor acts as a threshold. A higher $\beta$ requires the model to be much more confident in a positive relation before selecting it, effectively boosting precision.
3. Entity-Pair vs. One-Pass
- Entity-Pair: The model looks at one pair of entities at a time. This is highly accurate but slow if a sentence has many entities.
- One-Pass: The model encodes all entities at once and generates all relations in the sentence in a single output string. This is up to 15x faster for decoding, though it comes with a performance penalty.
Datasets
The model was evaluated on three widely used benchmarks:
- ACE05: A classic dataset with 7 entity types and 6 relation types.
- SemEval 2010 Task 8: A standard relation classification dataset.
- TACRED (Revised): A large-scale dataset with 42 relation types, recently cleaned to reduce annotation errors.
Key Insights and Ideas
- Generative > Discriminative: By generating the entities again in the target sequence, the model effectively "re-attends" to the entity information, which helps it resolve ambiguous relations better than a simple classifier.
- Pre-training Alignment: The success of the SVO order (
[subject | relation | object]) suggests that we should design our generative tasks to mimic the natural language structures found in the model's original pre-training data. - The Efficiency Trade-off: The "One-Pass" approach highlights a massive gap between research SOTA and production needs. While the entity-pair approach wins on accuracy, the 15x speedup of the one-pass approach makes it far more viable for processing massive web-scale corpora.
Key Results
GREC achieved new state-of-the-art (SOTA) results across all three datasets:
- ACE05: Achieved a Rel+ F1 score of 68.2, outperforming the previous best model (PURE) by 2.6 points.
- SemEval 2010: Reached an F1 of 89.9, setting a new benchmark without needing external data like Wikipedia or WordNet.
- TACRED: Achieved an F1 of 80.6, a significant jump over previous BERT-based baselines.
The tuning parameters $\alpha$ and $\beta$ proved highly effective. As shown in the ablation studies, adjusting these allowed the authors to move the F1 score by several points depending on whether the goal was high precision or high recall.
Limitations and Future Work
The primary limitation is the performance gap in the one-pass approach, which lags nearly 10 F1 points behind the entity-pair method. Closing this gap is a clear direction for future research. Additionally, while the paper mentions the potential for cross-sentence extraction, the experiments focused primarily on single-sentence relations. Extending this generative framework to handle long-range dependencies across paragraphs remains an open challenge.
Summary updated