Relation Classification Using Segment-Level Attention-based CNN and Dependency-based RNN

Van-Hien Tran, Van-Thuy Phi, Hiroyuki Shindo, Yuji MatsumotoNAACL 2019

Abstract

Relation Classification (RC) is a fundamental task in information extraction, aimed at identifying semantic relationships between entities in text. Traditional models often face a trade-off between capturing broad contextual information and focusing on concise grammatical structures. This paper presents a hybrid neural network architecture that integrates a Segment-Level Attention-based CNN (SACNN) with a Dependency-based RNN (DepRNN). The SACNN captures local context by dividing sentences into segments and applying an attention mechanism, while the DepRNN processes the Shortest Dependency Path (SDP) to model long-distance semantic dependencies. Evaluated on the SemEval-2010 Task 8 dataset, the combined model achieves a state-of-the-art F1-score of 85.8% without the need for external lexical resources.

Introduction

Identifying the semantic relationship between two marked entities in a sentence—such as determining that "apple" and "tree" share an Entity-Origin relationship in "The apple fell from the tree"—is known as Relation Classification (RC). Existing approaches typically fall into two categories: raw sequence models (like CNNs) and dependency-based models (like RNNs).

Raw sequence models are excellent at capturing the full context of a sentence but often struggle with "noise" from redundant words and have difficulty modeling long-distance relationships. Conversely, dependency-based models focus on the Shortest Dependency Path (SDP), which is grammatically dense and concise, but they may discard helpful supplementary context found outside the path. This research addresses this trade-off by proposing a hybrid model that preserves full relational information by combining the local pattern-matching strengths of CNNs with the structural reasoning of RNNs.

Methods

The proposed architecture processes input through two parallel streams: the SACNN and the DepRNN.

The hybrid architecture combining SACNN and DepRNN for relation classification.

Input Representation

Words are represented by concatenating word embeddings with two specialized features:

  • Entity Tag Feature (ETF): Special tokens marking the start and end of the target entities.
  • Tree-based Position Feature (TPF): Encodes the relative distance of each word to the target entities within the dependency tree.

SACNN (The Context Specialist)

To capture context effectively, the raw sentence is divided into three segments: left of the entities, middle (between them), and right. Three separate CNNs process these segments. An attention mechanism then automatically weights these segments, acknowledging that while the middle segment is often the most informative, the left or right segments can provide crucial clues for specific relations.

DepRNN (The Structural Specialist)

This component utilizes a Bidirectional LSTM (BLSTM) to process the Shortest Dependency Path (SDP). It doesn't just look at the words; it also incorporates embeddings for dependency relation types (e.g., "nmod", "dobj") and their directions, allowing the model to understand the specific roles of the subject and object within the grammatical structure.

The final representations from both the SACNN and DepRNN are concatenated and passed through a softmax classifier to predict the relation.

Key Results

The model was evaluated on the SemEval-2010 Task 8 benchmark, a standard dataset consisting of 8,000 training and 2,717 test sentences across 19 relation classes.

Comparison of the proposed model with state-of-the-art methods on the SemEval-2010 Task 8 dataset.

As shown in the performance comparison, the combined model achieved a state-of-the-art F1-score of 85.8%, outperforming previous complex models such as SR-BRCNN (85.1%) and PECNN (84.6%). Ablation studies revealed that the SACNN alone reached 85.1%, while the DepRNN alone reached 83.8%. The 0.7% boost from combining them confirms that the two architectures capture complementary information. Notably, this performance was achieved without relying on external lexical resources like WordNet or Named Entity Recognition (NER) tags.

Discussion and Conclusion

The success of this hybrid approach highlights the synergy between raw sequence features and structural dependency information. The SACNN acts as a robust local feature extractor, while the DepRNN handles the global logic of the sentence structure. Furthermore, the segment-level attention mechanism proves that context outside the entities is frequently vital for accurate classification.

While the model sets a new benchmark, it remains dependent on the quality of the initial dependency parse. Future work could explore more sophisticated attention mechanisms, such as Transformers, or investigate how this hybrid architecture scales to multi-sentence relation extraction tasks.

Summary updated

BibTeX
@inproceedings{tran2019relation,
  author = {Van-Hien Tran and Van-Thuy Phi and Hiroyuki Shindo and Yuji Matsumoto},
  title = {{Relation Classification Using Segment-Level Attention-based CNN and Dependency-based RNN}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/n19-1286},
}
Figure