Abstract
Relation Extraction (RE) is a fundamental task in natural language processing, traditionally reliant on extensive labeled datasets. Zero-Shot Relation Extraction (ZeroRE) addresses this limitation by identifying unseen relations through semantic matching between input sentences and natural language relation descriptions. However, existing methods often struggle with the trade-off between computational efficiency and matching accuracy. We present RE-Matching, a novel framework that achieves state-of-the-art performance while operating 10 times faster than previous top-tier models. By decomposing the matching process into fine-grained entity and context components and employing a feature distillation module to filter out textual noise, RE-Matching provides a robust and efficient solution for open-domain relation extraction.
The Challenge of Zero-Shot Relation Extraction
Zero-Shot Relation Extraction (ZeroRE) aims to identify how two entities in a sentence are connected (e.g., "Apple" is "headquartered in" "California") without having seen examples of that specific relation during training. This is typically achieved by matching an input sentence against a natural language description of a potential relation, such as "an organization is located in a city."
Current research generally follows two architectural paradigms:
- Siamese Schemes: These use dual encoders to map inputs and descriptions into a shared space. While computationally efficient ($O(m+n)$ complexity), they often lack the deep interaction necessary for high accuracy.
- Full Encoding Schemes: These employ cross-attention between the input and description. While highly accurate, they are computationally expensive ($O(m \times n)$ complexity), making them impractical for real-time applications with many candidate relations.
Furthermore, standard models often treat sentences as monolithic "black boxes." They fail to account for the inherent structure of relational data: entities should match their respective types (hypernyms), and the context should match the relational logic while ignoring irrelevant "noise" or redundant information.
The RE-Matching Framework
RE-Matching bridges the gap between efficiency and accuracy by combining a Siamese-style encoder with a fine-grained matching architecture. The framework introduces three core innovations:
1. Fine-Grained Decomposition
Instead of calculating a single global similarity score, RE-Matching explicitly decomposes the matching process into three distinct components: Head Entity matching, Tail Entity matching, and Context matching. This structure provides a "reasonable inductive bias," ensuring the model learns to match entities to their types and relational phrases to the core logic of the description.
2. Relation Feature Distillation Layer
Natural language sentences often contain "redundant context"—information that is irrelevant to the specific relation being extracted (e.g., "is a great company" in the sentence "Apple, situated at California, is a great company"). To handle this without manual noise labels, the authors designed a distillation module. It utilizes a Gradient Reverse Layer (GRL) to identify features irrelevant to the relation. The model then projects the context representation into the orthogonal space of these irrelevant features, effectively filtering out noise before the final matching step.
3. Description Enrichment
Raw relation labels are often sparse and provide poor matching targets. RE-Matching automatically enriches these descriptions using synonyms from Wikidata and rule-based templates, providing a more comprehensive semantic anchor for the matching process.
Experimental Evaluation
The model was evaluated on two major benchmarks: FewRel, a high-quality hand-annotated dataset from Wikipedia, and Wiki-ZSL, a larger, noisier dataset generated via distant supervision.
Key Results
- Efficiency: RE-Matching is 10x faster at inference than the previous state-of-the-art (PromptMatch) when evaluating 15 unseen relations. It maintains the $O(m+n)$ speed of Siamese models while matching the performance of heavy Full Encoding models.
- Accuracy: The model consistently outperformed all baselines. On the challenging Wiki-ZSL dataset, it achieved an $F_1$ score of 67.32, significantly higher than the best full-encoding baseline (61.95) and the standard Siamese baseline (34.25).
- Robustness: Analysis shows that the distillation module successfully allows the model to ignore filler words and focus on the core relational phrases and entities.
Conclusion
RE-Matching demonstrates that high-performance Zero-Shot Relation Extraction does not require massive computational overhead. By structuring the matching logic to reflect the natural decomposition of relational data and implementing orthogonal projection for noise reduction, the framework achieves a superior balance of speed and accuracy. Future work may explore more sophisticated ways to build "label anchors," such as using ensembles of multiple descriptions, to further improve the recognition of abstract relations.
Summary updated