Query-based Instance Discrimination Network for Relational Triple Extraction

Zeqi Tan, Yongliang Shen, Xuming Hu, Wenqi Zhang, Xiaoxia Cheng, Weiming Lu, Yueting Zhuang

Abstract

Relational triple extraction is a fundamental task in information extraction, aimed at identifying (subject, relation, object) sets within unstructured text. Traditional methods often suffer from error propagation in pipeline architectures or computational redundancy in joint models. We present the Query-based Instance Discrimination Network (QIDN), a novel framework that utilizes learnable "instance queries" to extract all triples in a single parallel step. By integrating a contrastive learning-based instance discriminator, QIDN captures complex global dependencies between triples, significantly improving extraction accuracy. Our approach achieves state-of-the-art performance across five major benchmarks, including NYT, WebNLG, and SciERC.

Introduction

Extracting structured knowledge from text requires identifying entities and the semantic relations that bind them. Historically, this has been approached via Pipeline Methods, which detect entities before classifying relations, or Joint/Cascading Methods, which attempt simultaneous extraction. Pipeline methods are prone to error propagation, while joint methods often struggle with "triple overlapping" (where an entity participates in multiple relations) and "relation redundancy" (the exhaustive checking of all possible relation types).

Furthermore, most existing models treat triples as independent events, failing to model the logical dependencies between them. For instance, a model should recognize that if a person is a "Founder" of a company, they are unlikely to simultaneously be its "Product." QIDN addresses these challenges by reimagining triple extraction as a set-prediction problem enhanced by global relational topology.

Methodology

QIDN draws inspiration from the DETR (Detection Transformer) architecture in computer vision, treating each relational triple as a distinct "instance" to be detected.

Architecture Overview

The model consists of three primary components: a Sentence Encoder, a Triple Prediction module, and an Instance Discriminator.

The QIDN architecture consists of a sentence encoder, a transformer decoder using instance queries for triple prediction, and an instance discriminator for contrastive learning.
  1. Sentence Encoder: The input text is processed through BERT and BiLSTM layers to generate context-aware token representations ($H_{context}$).
  2. Instance Queries & Decoder: Instead of word-by-word tagging, the model employs a fixed set of $M$ learnable query vectors. These queries interact with the sentence features via a Transformer decoder, using attention mechanisms to focus on relevant text spans for subjects and objects.
  3. Prediction Heads: Each query is transformed into a triple via three dedicated feed-forward networks (FFNs) that predict the relation type, the subject entity, and the object entity simultaneously.

Instance Discriminator

To model the inter-dependencies between triples, QIDN introduces an Instance Discriminator powered by contrastive learning. It optimizes two objectives:

  • Intra-class Similarity: Ensuring that different instances of the same relation type (e.g., multiple "Located In" triples) have similar representations in the latent space.
  • Relation-Type Alignment: Aligning the representation of a specific triple instance with a global embedding of its predicted relation type.

Key Insights and Ideas

From Tokens to Instances

By moving away from token-level tagging to instance-level queries, QIDN treats the triple as a holistic unit. This naturally handles overlapping triples (SEO/EPO patterns) because independent queries can point to the same entity spans without interference.

Global Connectivity

The contrastive learning module allows the model to learn the "topology" of relations. By clustering similar relations and separating dissimilar ones, the model gains a global perspective that helps it reject logically inconsistent triples.

Visualization of relation embeddings showing how the instance discriminator clusters related semantic types (e.g., Location, People, Business) in the latent space.

Experimental Results

QIDN was evaluated on five benchmarks: NYT, NYT*, WebNLG, ACE05, and SciERC.

  • SOTA Performance: On NYT and WebNLG, QIDN outperformed strong baselines like CasRel and TPLinker by approximately 2.0% to 2.1% in absolute F1-score.
  • Domain Robustness: The model showed significant gains in the scientific domain (SciERC), demonstrating its ability to handle complex technical entities and long-range dependencies.
  • Ablation Study: Removing the contrastive learning components resulted in a marked performance drop, confirming that modeling the global relationship between triples is essential for high-accuracy extraction.

Discussion and Limitations

While QIDN represents a significant step forward, several challenges remain:

  • Closed-World Assumption: The model requires a predefined set of relation types and cannot currently perform open-domain extraction.
  • Fixed Query Capacity: The number of queries is fixed (e.g., $M=15$). While sufficient for most sentences, extremely dense documents may exceed this capacity.
  • Contextual Limits: Like most BERT-based models, it is constrained by a 512-token input limit, which can hinder the extraction of relations spanning very long distances in a document.

Conclusion

QIDN introduces a parallel, query-based framework for relational triple extraction that effectively bridges the gap between local token features and global relational logic. By leveraging contrastive learning to discriminate between triple instances, it sets a new standard for accuracy and robustness in structured knowledge extraction.

Summary updated

BibTeX
@inproceedings{tan2022query,
  author = {Zeqi Tan and Yongliang Shen and Xuming Hu and Wenqi Zhang and Xiaoxia Cheng and Weiming Lu and Yueting Zhuang},
  title = {{Query-based Instance Discrimination Network for Relational Triple Extraction}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.emnlp-main.523},
}
Figure