OneRel: Unified Triple Classification
- OneRel is a unified neural framework for joint entity and relation extraction that reframes triple prediction as an atomic classification decision.
- It combines a BERT-based encoder with a HolE-inspired scoring classifier and relation-specific horns tagging to efficiently decode overlapping entity-relation spans.
- Experimental results show state-of-the-art F1 scores and significant improvements in training and inference efficiency across multiple benchmarks.
OneRel is a unified neural framework for joint entity and relation extraction that frames the task as a fine-grained triple classification problem. Rather than decomposing extraction into interdependent modules or stages, OneRel directly models the interdependence of entities and relations by jointly predicting factual triples in a single step and with a single module. This paradigm addresses deficiencies in prior systems—such as cascading errors and redundant spurious triples—by making the triple prediction problem an atomic classification decision for each possible (head, relation, tail) configuration (Shang et al., 2022). The approach comprises a BERT-based encoder, a HolE-inspired scoring classifier, and a novel relation-specific horns tagging methodology for robust, efficient decoding.
1. Foundational Motivation and Problem Setting
Traditional approaches to joint entity and relation extraction—critical in knowledge graph construction and information extraction—commonly observe either a cascaded pipeline (entity recognition, then relation classification) or parallel/separate modules (e.g., table filling, paired predictions). These methods fail to exploit the inherent indivisibility among entities and relations in a factual triple . The OneRel approach refines the problem: given a sentence and a relation set , the task is transformed into a classification over the product space , where a triple signifies a span pair and a semantic relation (Shang et al., 2022).
2. Model Architecture and Tagging Scheme
OneRel's architecture consists of three interlocking components:
- Sentence Encoder: The input sentence is encoded by a pre-trained BERT model, producing contextualized embeddings with .
- Scoring-based Classifier: For every token-pair and relation , a feedforward pair encoder concatenates and projects their embeddings, generating a feature vector . A relation embedding tensor enables the scoring of all relations and four tag types in a single matrix operation, with softmax normalization over four tags for each relation.
- Relation-Specific Horns Tagging: Each relational submatrix encodes triples by sparsely tagging three “corners” (begin-head/begin-tail, head-begin/tail-end, head-end/tail-end), aligning with entity-relation span boundaries. This sparsity permits natural representation of all overlap patterns, including entity-pair overlap (EPO), single-entity overlap (SEO), and head-tail overlap (HTO), without ambiguity or loss of generality.
3. Decoding, Training, and Optimization
The decoding algorithm extracts triples by iterating over all relations. For each predicted “HB–TE” (head-begin/tail-end) tag at in , it searches for compatible “HB–TB” and “HE–TE” neighbors to reconstruct span boundaries and output the associated triple. The computational complexity is per sentence, supporting practical large-scale inference.
Training employs cross-entropy loss over all triplets, with negative samples arising naturally from the overwhelming prevalence of the “–” tag. Optimization leverages Adam with a learning rate of , regularized by dropout in the pair encoder.
4. Experimental Evaluation and Results
Extensive experiments were conducted on four benchmarks: NYT* and WebNLG* (distant supervision, last-token entity annotation), and their full-span counterparts. Results were evaluated using micro-averaged precision, recall, and F1 at the triple level. OneRel achieved the following key results:
| Dataset | OneRel F1 | Best Baseline (F1) |
|---|---|---|
| NYT* | 92.8 | PRGC 92.6 |
| WebNLG* | 94.3 | PRGC 93.0 |
| NYT (full) | 92.9 | PRGC 92.7 |
| WebNLG (full) | 91.0 | PRGC 88.5 |
The OneRel- ablation, which substitutes a simple linear classifier for the HolE-style module, incurred a 1–2 point F1 drop, confirming the substantial impact of the HolE-inspired classifier.
5. Analysis of Overlapping Structures, Subtasks, and Efficiency
OneRel’s design achieves robustness against all overlap types (EPO, SEO, HTO), maintaining state-of-the-art or tied F1 across grouped test sets. In breakdowns by number of triples per sentence (including highly entangled sentences with triples), OneRel exhibited pronounced superiority. Subtask-specific F1 (entity-pair detection, relation classification) demonstrated that the unified module outperforms the best discrete or cascaded baselines in all respects.
Efficiency is markedly improved over prior work: on WebNLG*, OneRel’s training time per epoch was 88 seconds versus 599 seconds for TPLinker, attributed to the batched matrix computations enabled by the single-step scoring framework. Inference time per sentence was comparable (40 ms).
6. Representation Learning and Relation Embedding Topologies
Inspecting the geometry of learned relation embedding vectors via t-SNE reveals coherent clustering by semantic proximity: for example, person-related and location-related relations form tight groups. Specific relation types that are semantically close (“place_of_birth,” “place_lived,” “place_of_death”) appear as near-neighbors, indicating that OneRel’s architecture favors the emergence of inter-relation structural knowledge in the learned parameter space.
7. Prospects and Future Research Directions
Potential extensions of OneRel include:
- Investigation of more powerful scoring mechanisms (e.g., complex-space transformations as in RotatE) to encode sophisticated relational patterns.
- Application of the fine-grained triple classification methodology to broader information extraction tasks, such as event extraction and slot filling.
- Zero-shot and few-shot learning leverage via the discovered relation embedding topology, aimed at generalizing to unseen relation types.
A plausible implication is that unified triple classification, as instantiated by OneRel, constitutes a robust paradigm for information extraction tasks that require multiway, overlapping, or non-local dependencies among relational arguments, with practical advantages in both accuracy and computational efficiency (Shang et al., 2022).