Neighborhood Selective Aggregation Zero-Shot Knowledge Graph Link Prediction Method with Single Sample Support
Knowledge graphs have become increasingly important in various applications ranging from question answering systems to large-scale recommendation systems. However, despite their growing complexity, knowledge graphs remain highly incomplete. This incompleteness manifests in two primary ways: missing information and the need for continuous updates with new knowledge. Traditional methods for knowledge graph completion often struggle when dealing with limited training samples or entirely unseen relations, leading to performance degradation in such scenarios. To address these challenges, this paper introduces a novel approach called Neighborhood Selective Aggregation Zero-Shot Knowledge Graph Link Prediction with Single Sample Support (NSALP).
Introduction
The incompleteness of knowledge graphs poses significant challenges in real-world applications. Missing entities or relations can hinder the effectiveness of downstream tasks, while the dynamic nature of knowledge requires efficient methods for incorporating new information. Traditional link prediction methods, such as TransE, DistMult, and ComplEx, rely on embedding-based learning to predict missing links. These methods perform well when sufficient training data is available but struggle in low-resource settings, particularly in zero-shot scenarios where relations or entities are entirely unseen during training.
Zero-shot knowledge graph link prediction aims to predict relationships or entities that were not present in the training data. This task is particularly challenging because traditional embedding-based approaches cannot directly apply to unseen relations. Recent work has explored using textual descriptions of relations to bridge this gap, but existing methods often assume sufficient training samples for feature extraction. In practice, however, many relations have very few supporting instances, leading to poor generalization.
To overcome these limitations, NSALP introduces a generative adversarial framework that improves feature extraction and generation under single-sample support conditions. The key contributions include:
- Selective Neighborhood Aggregation: Inspired by graph isomorphism networks, the feature extractor assigns learnable weights to neighborhood nodes, filtering irrelevant features while emphasizing useful ones.
- Structure-Aware Generation: The generator incorporates head entity embeddings and relation descriptions to produce features that better align with real knowledge triple structures.
Background and Problem Definition
Knowledge Graph Link Prediction
A knowledge graph is represented as a collection of triples ((h, r, t)), where (h) and (t) are entities, and (r) is a relation connecting them. Link prediction involves inferring missing triples—either predicting a tail entity given a head and relation or predicting a relation given a head and tail entity. Traditional methods learn embeddings for entities and relations, optimizing them such that valid triples score higher than invalid ones. However, these approaches fail when relations or entities are unseen during training.
Few-Shot and Zero-Shot Link Prediction
Few-shot learning addresses scenarios where only a limited number of training examples are available. One-shot learning is an extreme case where only a single example per relation is provided. Zero-shot learning goes further by requiring predictions for relations with no training examples at all. Instead, these methods rely on auxiliary information, such as textual descriptions, to generalize to new relations.
The challenge in zero-shot link prediction lies in mapping textual descriptions of unseen relations to meaningful structural embeddings. Previous approaches, such as ZSGAN, use generative adversarial networks (GANs) to synthesize relation embeddings from text. However, these methods often suffer from poor performance when training samples are scarce.
Methodology
NSALP consists of three main components: a feature extractor, a generator, and a discriminator. Each component is designed to address specific limitations in existing zero-shot link prediction methods.
Feature Extractor with Selective Aggregation
Traditional feature extractors aggregate neighborhood information by averaging embeddings, which can introduce noise from irrelevant nodes. NSALP improves this by assigning learnable weights to each neighbor, allowing the model to emphasize important features while suppressing noise.
Given a head entity (h) and its neighbors, the feature extractor computes a weighted aggregation where each neighbor’s contribution is dynamically adjusted during training. This selective aggregation ensures that only relevant structural patterns influence the final embedding. Similarly, tail entity neighborhoods are processed, and the combined features are used to represent the relation structurally.
Structure-Aware Generator
The generator synthesizes relation embeddings from textual descriptions. Previous methods directly map text embeddings to relation embeddings, which lacks interpretability and often produces suboptimal results. NSALP enhances this process by incorporating head entity embeddings into the generation phase.
Specifically, the generator takes as input the concatenation of:
• The head entity embedding
• The textual description of the relation
• A learnable placeholder for the tail entity
This structure mimics the composition of a knowledge triple, making the generation process more interpretable. The generator then refines this input through multiple layers to produce a synthetic relation embedding that closely resembles real triples.
Discriminator and Training
The discriminator evaluates the quality of generated embeddings by distinguishing them from real ones. The training process follows a GAN framework, where the generator and discriminator compete: the generator tries to produce realistic embeddings, while the discriminator learns to detect synthetic ones.
To stabilize training, NSALP incorporates Wasserstein distance and gradient penalty techniques, which help avoid common GAN issues like mode collapse. The final model is trained end-to-end, optimizing both the feature extractor and generator to produce high-quality embeddings even with minimal training data.
Experiments and Results
Datasets and Evaluation
NSALP is evaluated on two standard zero-shot knowledge graph datasets:
• NELL-ZS: A smaller dataset with 65,567 entities and 181 relations.
• Wiki-ZS: A larger dataset with 605,812 entities and 537 relations.
Performance is measured using Mean Reciprocal Rank (MRR) and Hits@N metrics, which assess how well the model ranks true entities among candidates.
Comparative Analysis
NSALP is compared against several baselines, including:
• TransE, DistMult, ComplEx: Traditional embedding methods that perform poorly in zero-shot settings.
• ZSGAN: A GAN-based zero-shot link prediction model.
• OntoZSL: A method incorporating ontological knowledge.
Results show that NSALP outperforms all baselines, achieving improvements of 2.5% and 0.7% in MRR on NELL-ZS and Wiki-ZS, respectively. Notably, some relations see dramatic improvements—for example, “airportincity” improves from 21.9% to 45.2% in Hits@1.
Ablation Studies
Ablation experiments confirm the contributions of each component:
• Selective Aggregation (Extractor+): Improves MRR by 0.1%.
• Structure-Aware Generator (Generator+): Improves MRR by 1.5%.
• Full NSALP: The combined model achieves the best results, demonstrating that both components synergistically enhance performance.
Conclusion
NSALP presents a robust solution for zero-shot knowledge graph link prediction under single-sample support conditions. By selectively aggregating neighborhood features and incorporating structural awareness into the generation process, the model achieves significant improvements over existing methods. Future work could explore integrating additional information sources, such as path reasoning or visual data, to further enhance zero-shot generalization.
doi.org/10.19734/j.issn.1001-3695.2024.06.0198
Was this helpful?
0 / 0