Modality-Aware Negative Sampling for Multi-modal Knowledge Graph Embedding

Yichi Zhang, Mingyang Chen, Wen Zhang · DOI

Introduction

Multi-modal Knowledge Graphs (MMKGs) represent a significant advancement in structured data representation, enriching traditional (head, relation, tail) triples with auxiliary modalities such as images and text. To train effective Multi-modal Knowledge Graph Embeddings (MMKGE), models typically rely on Negative Sampling (NS) to distinguish between factual triples and plausible but incorrect alternatives. However, traditional NS strategies often fail to account for the unique challenges of multi-modal data.

Researchers from Zhejiang University have introduced Modality-Aware Negative Sampling (MANS), a lightweight yet powerful strategy designed to improve the alignment between structural and visual data in MMKGs. By shifting the focus from entity-level replacement to modal-level contrast, MANS addresses the inherent bottlenecks in current training paradigms.

The Limitations of Entity-Level Sampling

Existing negative sampling methods primarily operate at the entity level. When generating a negative sample, these methods replace an entire entity—including its structural representation and its associated images—with a different entity. This approach suffers from two primary drawbacks:

  1. Entity-Level Blindness: Standard NS assumes that the structural and visual components of an entity are already perfectly aligned. By replacing the whole entity, the model is never explicitly forced to learn the fine-grained correspondence between a specific graph structure and its corresponding image.
  2. Efficiency Bloat: To overcome the limitations of random sampling, some researchers use complex modules like Generative Adversarial Networks (GANs) or large-scale caches to find "hard" negative samples. While effective, these methods introduce significant computational overhead, making them difficult to scale for large multi-modal datasets.

The MANS Strategy: Modal-Level Contrast

The core innovation of MANS is the introduction of Visual Negative Sampling (MANS-V). Instead of replacing a complete entity, MANS-V retains the structural data of the original entity but swaps its associated image with one from a different entity. This creates a "virtual" negative sample that is structurally correct but visually mismatched, forcing the model to refine its cross-modal alignment.

The authors propose four distinct implementations of this strategy:

  • MANS-V: A pure modal-level sampling approach.
  • MANS-T (Two-stage): This version utilizes MANS-V in the initial training phase to establish modality alignment, followed by traditional entity-level sampling to refine graph logic.
  • MANS-H (Hybrid): This approach mixes MANS-V and traditional sampling within every training batch based on a fixed ratio ($\beta$).
  • MANS-A (Adaptive): The most sophisticated variant, MANS-A dynamically adjusts the sampling ratio. It compares the model's unimodal performance against its multi-modal performance; if the multi-modal component lags, the system automatically increases the frequency of modal-level sampling to prioritize alignment.

Experimental Evaluation

The MANS framework was evaluated using two benchmark datasets: FB15K (a Freebase subset with ~13,000 images) and DB15K (a DBpedia subset with ~12,000 images). The researchers focused on two primary tasks: Link Prediction (predicting missing entities in a triple) and Triple Classification (determining the veracity of a given fact).

The experiments used the Image-embodied Knowledge Representation Learning (IKRL) framework as the underlying backbone to test the effectiveness of the sampling strategy.

Results and Impact

The results demonstrate that MANS significantly outperforms traditional negative sampling methods while maintaining high efficiency.

Performance Gains

On the FB15K dataset, MANS-A achieved a Hit@1 of 0.353, representing a 9.9% relative improvement over standard negative sampling baselines. This suggests that better alignment between modalities directly translates to more accurate knowledge graph embeddings.

Computational Efficiency

Unlike GAN-based or clustering-based methods, MANS is computationally inexpensive. MANS-A requires approximately 16.1 seconds per epoch, which is comparable to basic random sampling (15.8s) and significantly faster than EANS (60.9s) or NSCaching (16.7s).

Embedding Quality

Qualitative analysis using t-SNE visualizations indicates that MANS produces a clearer separation between structural and visual embeddings. This separation suggests that the model has successfully learned to distinguish between different semantic signals, leading to more robust and meaningful representations.

Conclusion

MANS provides a simple yet effective solution to the alignment problem in Multi-modal Knowledge Graph Embeddings. By introducing modal-level negative sampling, the researchers have shown that complex generative models are not always necessary for high-quality training signals. Future work will look to expand MANS to include other modalities like text and audio, and explore co-designing the sampling strategy with new KGE architectures.

Summary updated

BibTeX
@inproceedings{zhang2023modality,
  author = {Yichi Zhang and Mingyang Chen and Wen Zhang},
  title = {{Modality-Aware Negative Sampling for Multi-modal Knowledge Graph Embedding}},
  booktitle = {IJCNN},
  year = {2023},
  url = {https://openreview.net/forum?id=tosciwZl5Wy},
}
Figure