Introduction
Knowledge Graphs (KGs) such as Freebase and WordNet serve as foundational structures for storing factual information in the form of (subject, relation, object) triplets. Despite their utility, these graphs are often incomplete. Knowledge Graph Embedding (KGE) methods aim to address this by mapping entities and relations into a continuous vector space to predict missing links. Traditional approaches like TransE or RotatE typically represent entities as static vectors, which often fails to capture the rich relational context provided by an entity's local neighborhood. HittER addresses this limitation by leveraging a hierarchical Transformer architecture to aggregate neighborhood information effectively.
Methods
HittER treats the local neighborhood of an entity as a sequence of structured data, processing it through a two-tier Transformer hierarchy:
- Entity Transformer (Bottom Block): This layer extracts features from individual entity-relation pairs within the neighborhood, learning the specific interactions between a neighbor and its connecting relation.
- Context Transformer (Top Block): This layer aggregates the outputs from the Entity Transformer. It utilizes a global context token (
[GCLS]) to pool information from the entire neighborhood into a single, context-aware representation.
To prevent the model from over-relying on the source entity embedding and ignoring the neighborhood context, the authors introduce Masked Entity Prediction (MEP). Similar to masked language modeling in BERT, MEP involves randomly masking or replacing the source entity during training. This forces the model to reconstruct the entity using only the surrounding graph context, ensuring that the neighborhood information is meaningfully integrated into the final embedding.
Key Results
The performance of HittER was evaluated on standard link prediction benchmarks: FB15K-237 and WN18RR. The model achieved state-of-the-art (SOTA) results across both datasets, demonstrating its superiority over previous geometric and graph-based embedding methods.
On the dense FB15K-237 dataset, HittER achieved a Mean Reciprocal Rank (MRR) of 0.373. On the sparser WN18RR dataset, it reached an MRR of 0.503. These results indicate that the hierarchical attention mechanism is particularly effective at capturing structural patterns, even in graphs with lower connectivity.
Downstream Applications: Factoid QA
Beyond link prediction, HittER embeddings were used to enhance pre-trained language models for factoid question answering. By integrating HittER's structured graph knowledge into BERT via cross-attention, the authors observed significant performance gains. On the FreebaseQA dataset, accuracy improved from 30.8% (BERT alone) to 37.1% (BERT + HittER), proving that high-quality KGEs can provide valuable external knowledge to NLP models.
Conclusion
HittER represents a significant step forward in KGE by successfully adapting the Transformer architecture to structured graph data. By utilizing hierarchical attention and a masked training objective, it captures relational context more effectively than previous methods. Future work may involve extending the model to capture multi-hop paths or global graph topology to further enhance its reasoning capabilities.
Summary updated