Source-linked AI summary

KBGAN: Adversarial Learning for Knowledge Graph Embeddings

Liwei Cai, William Yang Wang

arXiv:1711.04071v3cs.CLcs.AI

TL;DR

Knowledge graphs mainly contain positive facts, making uniformly sampled negative examples often too easy to help training. KBGAN uses one embedding model as a negative-sample generator and another as discriminator, achieving consistent improvements across three datasets and model settings.

  • Problem

    Knowledge graphs primarily store positive facts, while uniform entity replacement often produces unrelated, easily discriminated negatives that contribute little to training.

  • Method

    KBGAN adversarially trains a generator embedding model to provide higher-quality negative triples for a discriminator embedding model, using one-step REINFORCE for discrete generation.

  • Results

    Adversarial training consistently improves various knowledge graph embedding models across FB15k-237, WN18, and WN18RR.

  • Takeaways & Limitations

    The framework can improve diverse KGE models without depending on their concrete score functions or external ontology constraints.

  • Takeaways & Limitations

    Generated negatives remain semantically weak and include many unrelated entities because the method deliberately limits their strength with a small Ns.

Abstract

from arXiv · show

We introduce KBGAN, an adversarial learning framework to improve the performances of a wide range of existing knowledge graph embedding models. Because knowledge graphs typically only contain positive facts, sampling useful negative training examples is a non-trivial task. Replacing the head or tail entity of a fact with a uniformly randomly selected entity is a conventional method for generating negative facts, but the majority of the generated negative facts can be easily discriminated from positive facts, and will contribute little towards the training. Inspired by generative adversarial networks (GANs), we use one knowledge graph embedding model as a negative sample generator to assist the training of our desired model, which acts as the discriminator in GANs. This framework is independent of the concrete form of generator and discriminator, and therefore can utilize a wide variety of knowledge graph embedding models as its building blocks. In experiments, we adversarially train two translation-based models, TransE and TransD, each with assistance from one of the two probability-based models, DistMult and ComplEx. We evaluate the performances of KBGAN on the link prediction task, using three knowledge base completion datasets: FB15k-237, WN18 and WN18RR. Experimental results show that adversarial training substantially improves the performances of target embedding models under various settings.

1 Introduction

Knowledge graph embeddings address the challenge of learning useful representations from graphs that primarily store positive facts. KBGAN introduces a general adversarial framework for generating better negative examples and reports consistent gains across datasets.

  • Knowledge graph embeddings represent entities and relations in vector space to learn continuous representations of graph knowledge.
  • Uniformly replacing an entity often creates obviously false negatives, limiting their usefulness for training embedding models.
  • KBGAN uses adversarial learning to generate useful negative training examples for knowledge graph embedding.
  • The framework supports a wide range of KGE models without requiring external ontology constraints.
  • Experiments show consistent performance gains on three commonly used KGE datasets.The evaluated datasets are FB15k-237, WN18, and WN18RR.

2 Related Work

Prior work developed diverse knowledge graph embedding models and applied GAN ideas to sample generation. KBGAN builds on these directions while addressing discrete negative-triple generation with policy-gradient training.

  • Knowledge graph embedding models represent entities and relations with vectors or matrices using varied score-function designs.Examples include RESCAL, TransE, TransD, DistMult, ComplEx, HOLE, and ConvE.
  • Many existing knowledge graph embedding studies use uniform sampling to generate negative training examples.
  • GANs use a generator and discriminator in a minimax game to produce samples that resemble ground-truth data.
  • Original GAN training cannot directly generate discrete knowledge graph triples because discrete sampling blocks gradient propagation to the generator.
  • Prior discrete GAN approaches use reinforcement learning, and KBGAN likewise trains its generator with policy gradients.

3 Our Approaches

KBGAN addresses weak uniform negative sampling by using a probabilistic KGE generator to produce informative negatives for a marginal-loss discriminator. The framework trains the generator with policy gradients and the discriminator with generated negative triples.

  • Generative Adversarial Training: The generator assigns probabilities to candidate corrupted triples and samples one, while the discriminator scores it alongside the ground-truth triple.The generator and discriminator therefore exchange information through generated negative examples rather than through a conventional classifier output.
  • Weakness of Uniform Negative Sampling: Uniformly replacing an entity often produces obviously false negatives, so models may learn entity types rather than underlying semantics.Type-incompatible examples such as LocatedIn(NewOrleans,BarackObama) are easy to eliminate, whereas type-compatible alternatives can be more informative.
  • Weakness of Uniform Negative Sampling: The sampling problem is especially damaging for marginal-loss models because they typically use a 1:1 negative-to-positive ratio.Log-softmax models often sample tens or hundreds of negatives per positive, increasing the chance of including useful negatives.
  • Generative Adversarial Training: KBGAN uses a softmax-probability KGE model as generator and a marginal-loss KGE model as discriminator, without requiring particular score functions.The generator supplies higher-quality negative samples while the discriminator produces the final embeddings.
  • Generative Adversarial Training: The discriminator minimizes marginal loss using generated negatives, whereas the generator minimizes their discriminator scores to seek useful training examples.The discriminator objective differs from the standard marginal loss only in obtaining negatives from the generator.
  • Generative Adversarial Training: Because sampling is discrete, KBGAN trains the generator with a one-step reinforcement-learning formulation using the Policy Gradient Theorem and REINFORCE.The discriminator acts as the environment, generated triples are actions, and negative discriminator scores serve as rewards.

4 Experiments

The experiments evaluate KBGAN with four generator–discriminator combinations on three link-prediction datasets. Adversarial training improves the tested models, while learning curves converge and generated negatives are more semantically related than uniform random negatives.

  • Experimental setup: Four KBGAN combinations pair DistMult or ComplEx generators with TransE or TransD discriminators for link prediction.The experiments use three knowledge base completion datasets: FB15k-237, WN18, and WN18RR.
  • Overall results: All adversarial-training settings produce pronounced improvements, indicating consistent effectiveness across the tested cases.The results compare KBGAN discriminators with baseline implementations and other baselines.
  • Overall results: The choice between DistMult and ComplEx as generator does not greatly affect performance.This comparison concerns the generator choice within the tested adversarial configurations.
  • Overall results: KBGAN-enhanced TransE and TransD significantly beat their corresponding baselines and outperform stronger baselines in some cases.The authors describe these experiments as prototypical and not intended to establish state-of-the-art results.
  • Convergence: KBGAN learning curves increase toward convergence as training proceeds, although some curves continue rising after 5000 epochs.The authors lacked sufficient computation to train longer and expected eventual convergence.
  • Negative samples: Generated negatives are more semantically related to positive facts than uniformly random negatives, but deliberately remain relatively weak.Empirically, weaker generated negatives were more beneficial for discriminator training than stronger negatives when selecting the optimal Ns.

5 Conclusions

The paper presents KBGAN as a generic adversarial framework with generator and discriminator KGE components, using higher-quality negatives and one-step REINFORCE. Across four KGE models and three datasets, it reports consistent improvements under different settings.

  • Conclusion: KBGAN uses a generator–discriminator framework with dual knowledge graph embedding components to improve a wide range of models.The generator produces higher-quality negative examples than random uniform sampling.
  • Conclusion: One-step REINFORCE integrates the generator and discriminator despite the generator’s discrete sampling step.This enables backpropagation of error between the two modules.
  • Conclusion: Experiments with four KGE models on three datasets show consistent improvements under different settings.The conclusion summarizes the framework’s reported empirical performance.
Loading 1711.04071v3…