Learning Relational Representations by Analogy using Hierarchical Siamese Networks

Gaetano Rossiello, Alfio Gliozzo, Robert Farrell, Nicolas R. Fauceglia, Michael R. GlassNAACL 2019

Introduction

Relation Extraction (RE) is a cornerstone of information retrieval, identifying semantic links between entities in text. Traditionally, RE is framed as a classification task over a predefined set of labels. However, this paradigm struggles with the "long tail" of rare relations, domain-specific nuances, and the inability to recognize unseen relation types. This paper proposes a shift: treating RE as an analogy problem. By learning relational similarity, models can identify new relationships with minimal supervision.

The Hierarchical Siamese Network (HSN)

The core of this approach is the Hierarchical Siamese Network (HSN). Unlike standard classifiers, a Siamese network consists of two identical sub-networks that share weights. It processes two entity pairs simultaneously to determine if they share the same underlying relationship.

Architecture of the Hierarchical Siamese Network (HSN) showing word-level and sentence-level attention mechanisms.

The "hierarchical" aspect addresses the complexity of natural language:

  • Word-Level Encoding: A Bidirectional Gated Recurrent Unit (Bi-GRU) coupled with an attention mechanism identifies the most salient words connecting two entities.
  • Sentence-Level Encoding: Using Multi-Instance Learning, the model applies a second layer of attention to aggregate information across multiple sentences, filtering out "noisy" contexts that do not accurately represent the target relation.

The model is trained via distant supervision, leveraging knowledge bases like Wikidata to automatically generate millions of analogy pairs from large-scale web corpora.

Experimental Setup and Datasets

To test robustness and generalization, the authors evaluated HSN on three datasets:

  1. T-REX: A large-scale alignment of Wikipedia and Wikidata (685 relations).
  2. NYT-FB: A benchmark using New York Times articles and Freebase entities.
  3. CC-DBP: A web-scale dataset derived from Common Crawl and DBpedia.

Key Results and Insights

The HSN demonstrates significant advantages in few-shot scenarios and traditional benchmarks.

One-Shot Learning Performance

The model excels at identifying relations given only a single example. In N-way one-shot trials, HSN consistently outperformed established baselines such as GloVe, Word2Vec, and InferSent across all tested datasets.

N-way one-shot trial results on T-REX, CC-DBP, and NYT-FB datasets, demonstrating HSN's superior accuracy compared to baselines.

Transfer Learning and Robustness

Beyond one-shot tasks, the "analogy embeddings" produced by HSN can enhance existing RE models. Integrating these embeddings into a Piecewise Convolutional Neural Network (PCNN-KI) led to state-of-the-art performance on the NYT-FB and CC-DBP benchmarks. This suggests that the HSN captures deep relational signals—such as paraphrasing—that traditional models overlook. Furthermore, the model showed strong cross-domain robustness, maintaining high accuracy even when trained on clean Wikipedia text and tested on noisier web data.

Conclusion

By reframing Relation Extraction as an analogy task, the Hierarchical Siamese Network offers a flexible solution to the limitations of traditional classification. While performance naturally scales with the complexity of the task (the number of unseen relations), the HSN's ability to generalize from single examples marks a significant step toward more adaptable and data-efficient NLP systems. Future work will explore positional embeddings and entity placeholders to further refine the model's contextual understanding.

Summary updated

BibTeX
@inproceedings{rossiello2019learning,
  author = {Gaetano Rossiello and Alfio Gliozzo and Robert Farrell and Nicolas R. Fauceglia and Michael R. Glass},
  title = {{Learning Relational Representations by Analogy using Hierarchical Siamese Networks}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/n19-1327},
}
Figure