Knowledge Graph and Text Jointly Embedding

Zhen Wang, Jianwen Zhang, Jianlin Feng, Zheng ChenEMNLP 2014

Abstract

Knowledge Graphs (KGs) are essential for structured reasoning but often suffer from incompleteness, particularly regarding entities not present during training. Conversely, word embeddings capture broad semantic relationships from text but lack explicit relational structure. This paper introduces a novel framework that jointly embeds KGs and text corpora into a single continuous vector space. By leveraging Wikipedia anchors and entity names for alignment, the model enables mutual enhancement: KGs provide structural supervision for text, while text provides implicit relational data to fill KG gaps. Evaluation on triplet classification, relation extraction, and word analogy tasks demonstrates that the joint model significantly outperforms single-domain baselines, especially for "out-of-KB" entities.

Introduction

Modern AI applications rely heavily on structured knowledge bases like Freebase and WordNet. While knowledge embedding techniques such as TransE have advanced the ability to predict missing links within these graphs, they are constrained by a "closed-world" assumption—they cannot reason about entities absent from the initial database. Meanwhile, word embedding models like word2vec learn from massive unstructured corpora but fail to capture the precise, labeled relations (e.g., CEO-of, Born-in) that define KGs.

This research bridges the gap by proposing a unified representation space. The core insight is that text can provide the necessary context to reason about new entities, while KGs can offer the structural "supervision" required to refine word representations for complex reasoning tasks.

Methodology

The proposed framework integrates three interconnected components to align structured and unstructured data.

1. Knowledge Model (pTransE)

The system utilizes a probabilistic version of the TransE model (pTransE). In this model, relations are represented as translations in vector space, where the head entity ($h$) plus the relation ($r$) should approximately equal the tail entity ($t$) ($h + r \approx t$). The model calculates the likelihood of a triplet being valid based on this geometric distance.

2. Text Model and Relational Concurrence

Departing from standard inner-product-based word embeddings, the authors propose a distance-based text model. It operates on the Relational Concurrence Assumption: if two words co-occur within a specific text window, an implicit relation exists between them. This distance-based approach is mathematically compatible with the translation logic of the knowledge model, allowing both to coexist in the same vector space.

3. Alignment Model

Alignment is the "glue" that forces entities and words into a shared space. Two primary mechanisms are employed:

  • Wikipedia Anchors: These link specific phrases in text directly to their corresponding Freebase entities, providing high-precision alignment.
  • Entity Names: The model treats entity names as words and constructs a "name graph" to bridge the domains, offering broader coverage at the cost of potential ambiguity (e.g., distinguishing "Apple" the company from the fruit).

The entire system is optimized simultaneously using Stochastic Gradient Descent (SGD) with Negative Sampling (NEG) to scale to millions of entities and billions of word pairs.

Experimental Setup

The model was trained on a subset of Freebase (44k relations, 43M entities) and the English Wikipedia (1.5B phrases). Performance was evaluated using:

  • NYT+FB: A dataset for relation extraction combining New York Times articles with Freebase facts.
  • Google Analogy Datasets: Standard benchmarks for testing semantic relationships in word and phrase embeddings.

Key Results

The joint embedding framework demonstrated superior performance across all benchmarks.

Relation Extraction and Triplet Classification

The model achieved 88.8% accuracy in triplet classification, a substantial improvement over the 77.5% achieved by models trained on a single source. Furthermore, when used as a "prior" for existing relation extractors like the Mintz model, the joint embeddings significantly improved precision-recall performance across various relations.

Precision-Recall curves for relation extraction across various datasets, comparing the baseline Mintz model with the proposed joint embedding approach.

Handling "Out-of-KB" Entities

A critical success of the model is its ability to handle entities not present in the original Knowledge Graph. For triplets involving these "out-of-KB" entities, the joint model maintained an accuracy of 81.5% to 82.0%, whereas traditional KG-only models would be unable to make predictions.

Word and Phrase Analogies

The structural supervision from the KG improved the quality of word embeddings. On the Google Analogy task, the joint model outperformed Skip-Gram (71.2% vs 70.0%). The improvement was even more pronounced for phrase analogies, where accuracy jumped from 18.0% to 27.6%.

Conclusion

By jointly embedding structured knowledge and unstructured text, this framework addresses the inherent limitations of both domains. The model not only improves the density and accuracy of Knowledge Graphs but also enhances the semantic richness of word representations. Future work will focus on improving entity disambiguation and expanding the coverage of entity aliases to further refine the alignment between text and structured data.

Summary updated

BibTeX
@inproceedings{wang2014knowledge,
  author = {Zhen Wang and Jianwen Zhang and Jianlin Feng and Zheng Chen},
  title = {{Knowledge Graph and Text Jointly Embedding}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2014},
  doi = {10.3115/v1/d14-1167},
}
Figure