Source-linked AI summary

Incorporating GAN for Negative Sampling in Knowledge Representation Learning

Peifeng Wang, Shuangyin Li, Rong pan

arXiv:1809.11017v1cs.AIcs.LG

TL;DR

Random negative sampling can produce trivial examples that provide little training guidance. This paper uses a GAN generator to supply quality negatives while a discriminator learns knowledge graph embeddings, and reports improvements over baselines on triplets classification and link prediction.

  • Problem

    Randomly sampled negative triplets can fall outside the margin, producing zero loss and little guidance for training knowledge representations.

    Source: §1 · pp. 1–2
  • Method

    A GAN generator mines quality negative triplets for a discriminator that learns entity and relation embeddings using margin-based ranking loss.

    Source: §1 · p. 2
  • Results

    GAN-based models outperform baselines on triplets classification and link prediction.

    Source: §1 · p. 2
  • Takeaways & Limitations

    The framework is reported to extend to various knowledge representation models and enhance their embedding ability.

    Source: §1 · p. 2

    Further analysis, generalization to other problems involving negative sampling, and a more complicated generator are identified as future work.

    Source: §5 · p. 7

Abstract

from arXiv · show

Knowledge representation learning aims at modeling knowledge graph by encoding entities and relations into a low dimensional space. Most of the traditional works for knowledge embedding need negative sampling to minimize a margin-based ranking loss. However, those works construct negative samples through a random mode, by which the samples are often too trivial to fit the model efficiently. In this paper, we propose a novel knowledge representation learning framework based on Generative Adversarial Networks (GAN). In this GAN-based framework, we take advantage of a generator to obtain high-quality negative samples. Meanwhile, the discriminator in GAN learns the embeddings of the entities and relations in knowledge graph. Thus, we can incorporate the proposed GAN-based framework into various traditional models to improve the ability of knowledge representation learning. Experimental results show that our proposed GAN-based framework outperforms baselines on triplets classification and link prediction tasks.

1 Introduction

Knowledge representation learning embeds knowledge graphs for completion and semantic similarity, but random negative sampling can become trivial as training progresses. The paper proposes GAN-based sampling and reports improvements over baselines on two tasks.

1 Introduction

  • Knowledge graphs organize real-world entities and relations as fact triplets, while representation learning embeds them to support completion and capture semantic similarity.The passage names web search, question answering, and personalized recommendation as applications supported by knowledge graphs.Source: §1 · p. 1
  • Randomly sampled negatives often move outside the margin during training, yielding zero loss and little guidance for learning true triplets.The paper also notes that uninformative negatives can slow convergence.Source: §1 · pp. 1–2
  • The GAN framework uses a generator to mine quality negatives and a discriminator to learn entity and relation embeddings with margin-based ranking loss.The generator is described as an auxiliary that pushes the discriminator to its limit.Source: §1 · p. 2
  • The proposed training framework is intended to extend to various knowledge representation models and enhance their embedding ability.The paper presents the generator as an auxiliary to existing models.Source: §1 · p. 2
  • GAN-based models achieve remarkable improvements over baselines on triplets classification and link prediction.The authors describe these results as evidence of the framework's effectiveness in mining quality negatives and embedding knowledge graphs.Source: §1 · p. 2

2 Related Work

Prior knowledge embedding work includes translation-based models and several non-translation architectures, generally trained with randomly sampled negatives. The paper positions GAN-based negative sampling as a new approach for knowledge representation learning.

2 Related Work

  • TransE models a true triplet as h + r = t; TransH adds relation-specific hyperplane projections, TransR projects entities into relation space, and TransD makes projection matrices entity-dependent.TransD's projection matrices are determined by both relations and entities.Source: §2 · p. 2
  • Other translation models vary entity projections or incorporate entity text descriptions and images.The cited examples include (Xiao, Huang, and Zhu 2015; Ji et al. 2016) for projection variants and and (Xie et al. 2016a) for supplemental information.Source: §2 · p. 2
  • Other architectures include relation-agnostic Unstructured Model, projection-based Structured Embedding, nonlinear Single Layer Model, and second-order Neural Tensor Network.Single Layer Model adds a relation vector and nonlinear transformation; Neural Tensor Network adds second-order correlations.Source: §2 · p. 2
  • The surveyed embedding models use random negative sampling, while this paper applies GAN training to sample high-quality negative triplets for knowledge representation learning.The authors characterize this as the first use of GANs for this task; they cite prior GAN applications in information retrieval (Wang et al. 2017) and commonsense machine comprehension (Wang, Liu, and Zhao 2017).Source: §2 · pp. 2–3

3 GAN on Knowledge Embedding

Section 3 replaces random negative-triplet sampling with an adversarial generator whose reward favors examples that keep the discriminator’s ranking loss nonzero. The discriminator’s learned embeddings become the final knowledge-graph representation.

3 GAN on Knowledge Embedding

  • Randomly sampled negatives often fall outside the margin, producing zero loss and contributing little to embedding learning.The framework retains the margin-based ranking objective while replacing random negatives with generator-produced triplets.Source: §3 · p. 3

3.1 Discriminator for Knowledge Embedding

  • The discriminator learns entity and relation embeddings with the existing margin-based ranking loss, using negative triplets supplied by the generator.Its score function is computed according to the selected knowledge-embedding model.Source: §3.1 · p. 3, Figure 2 · p. 3

3.2 Generator for Negative Sampling

  • The generator uses concatenated entity–relation embeddings to parameterize replacement-entity probabilities and is rewarded for negatives that produce non-zero ranking loss.Its reward favors informative replacements and lowers the probability of trivial negatives.Source: §3.2 · pp. 3–4

3.3 Model Training

  • Training alternates generator and discriminator updates on the training set, then uses the discriminator’s embeddings as the final representation.The two parameter sets are fixed in turn during their respective updates; both models use Adam, and the generator receives L2 regularization.Source: §3.3 · p. 4

4 Experiments and Analysis

Experiments evaluate the framework on Freebase and WordNet subsets across link prediction and triplet classification. GAN training improves many models, while pretraining usually outperforms training from scratch and gains vary for more sophisticated models.

4.1 Link Prediction

  • On link prediction, GAN training improves most knowledge-embedding models on FB15K and WN11, while TransR and TransD show no noticeable improvement.The authors attribute the weaker results for TransR and TransD to overfitting and model complexity.Source: Table 2 · p. 5, §4.1 · p. 5

4.2 Triplets Classification

  • On triplet classification, SE, SME(bilinear), TransE, and TransH improve under both GAN settings, while results for sophisticated models vary.SLM improves with GAN-scratch on FB13 and WN11, but GAN-pretrain does not work well on FB13; TransR improves with GAN-pretrain on both datasets, while GAN-scratch improves only on FB13; TransD improves only with GAN-pretrain on FB13.Source: Table 3 · p. 6, §4.2 · p. 6

4.3 Discussion on GAN-scratch vs. GAN-pretrain

  • GAN-pretrain outperforms GAN-scratch under most circumstances in both link prediction and triplet classification.The authors explain that pretraining provides a better starting point and a more stable search space for the generator.Source: §4.3 · p. 6, §4.2 · p. 6

4.4 Visualization of Negative Triplets

  • On FB13, generated negative heads are generally people and tails match the positive entities' types, as illustrated by the examples in Table 4.For (michel chartrand, profession, politician), the generated head is louis jordan and the tail is writer.Source: §4.4 · pp. 6–7, Table 4 · p. 7

5 Conclusion and Future Work

The paper concludes that its GAN framework supplies higher-quality negative triplets and improves existing knowledge embedding models. Future work will further analyze the framework’s generalization and test a more complex generator.

5 Conclusion and Future Work

  • Extensive experiments show that the GAN framework efficiently improves several existing knowledge embedding models and generalizes to state-of-the-art models.Source: §5 · p. 7
  • The generator provides higher-quality negative triplets, helping the discriminator learn better entity and relation embeddings.Source: §5 · p. 7
  • Future work will analyze the framework further, study generalization to other negative-sampling problems, and test a more complicated generator architecture.Source: §5 · p. 7
Loading 1809.11017v1…