Traversing Knowledge Graphs in Vector Space

TL;DR

Compositional training for TransE and bilinear models cuts path-query error by up to 76.2% and improves KBC.

cs.CL 🔴 Advanced 2015-06-03 16 views
Kelvin Guu John Miller Percy Liang
knowledge graphs path queries knowledge-base completion vector embeddings structural regularization

Key Findings

Methodology

The paper interprets a single-edge KBC model as a soft traversal operator. For score(s/r,t)=M(T_r(x_s),x_t), a path q=s/r1/.../rk is represented recursively as JqKV=T_rk(...T_r1(x_s)), then scored against candidate entities with M. The proposed compositional objective trains paths of lengths 1 through L with a max-margin loss and negative sampling, forcing intermediate representations to preserve information needed by later traversals.

Key Results

  • Compositional training consistently outperforms single-edge training on WordNet and Freebase across Bilinear, Bilinear-Diag, and TransE. On WordNet, Bilinear-Diag path-query mean quantile rises from 59.7 to 90.4, a 76.2% error reduction; Freebase Bilinear rises from 58.0 to 83.5.
  • Knowledge-base completion also improves: WordNet TransE mean quantile rises from 75.5 to 86.1, reducing error by 43.3%; Freebase Bilinear rises from 85.3 to 91.0, reducing error by 38.8%.
  • The gain is strongest for compositional reasoning. Freebase Bilinear deduction improves from 49.3 to 82.1 and induction from 49.4 to 70.6; an interpretable institution/institution−1/profession query improves from 50.0 to 93.6.

Significance

The work unifies knowledge-base completion and compositional querying in one vector computation framework. It addresses a central weakness of embedding methods: accurate predictions for individual edges do not guarantee reliable multi-hop reasoning. Path supervision also acts as structural regularization, improving ordinary link prediction. Stable gains on WordNet and Freebase suggest that the principle is not tied to one scoring function, with implications for question answering, recommendation, and relation prediction.

Technical Contribution

The central contribution is the composable form score(s/r,t)=M(T_r(x_s),x_t), which turns entity embeddings into vector denotations of path-induced sets. The paper instantiates this with matrix traversal for Bilinear and additive traversal T_r(x)=x+w_r for TransE. Rather than adding an L2 reconstruction penalty, it directly optimizes complete paths and intermediate states through a max-margin objective. This improves path representations, implicit Horn-rule modeling, and single-edge KBC.

Novelty

Relative to Nickel’s Bilinear model, Bordes’s TransE, and Socher’s NTN, the paper systematically recasts composable KBC models as recursive vector-space graph traversals and trains them with path supervision. The fundamental novelty is not merely combining relation embeddings; it is treating multi-hop inference as a learned state-preservation problem and demonstrating its regularization effect on standard completion.

Limitations

  • The framework requires a decomposition into a traversal operator T_r and membership function M; Riedel’s latent feature model and Socher’s NTN do not naturally satisfy this form.
  • Experiments use WordNet and Freebase subsets with randomly walked paths, which may not represent natural-language questions, noisy relations, or realistic long-range compositions.
  • Low-dimensional vectors only approximate reachable sets, and matrix or vector traversal may still accumulate error on very long paths.

Future Work

Future research should develop stronger set representations and neural traversers for branching, intersection, union, and negation. Evaluation should move to larger real-world graphs and natural-language QA. Combining compositional training with rule learning, interpretable path search, attention, and calibrated uncertainty could reduce long-path failures and improve deployment reliability.

AI Executive Summary

Knowledge graphs support questions such as “What languages are spoken by people living in Lisbon?”, yet missing edges interrupt the required chain of reasoning. Embedding systems such as TransE and Bilinear models can impute individual facts, but single-edge accuracy does not translate into dependable multi-hop inference: each traversal introduces a small representational discrepancy, and these discrepancies cascade.

Guu, Miller, and Liang propose compositional training. A relation becomes a vector-space traversal operator: Bilinear applies relation matrices sequentially, while TransE adds relation vectors. The resulting intermediate vector approximates the set of entities reachable so far; a membership score ranks candidate answers. The authors train on paths of multiple lengths generated by random walks, using a max-margin objective, AdaGrad, batches of 300, and 10 sampled negatives per example.

The results are striking. On WordNet, Bilinear-Diag path mean quantile rises from 59.7 to 90.4, a 76.2% error reduction; on Freebase, Bilinear rises from 58.0 to 83.5. Standard KBC also improves: WordNet TransE reduces error by 43.3%, while Freebase Bilinear reduces error by 38.8%. The study therefore presents path training as both a multi-hop reasoning method and a structural regularizer. Its evidence remains bounded by two controlled datasets, random-walk paths, and relatively simple operators; branching queries, natural-language variation, and very long paths remain open challenges.

Deep Analysis

Background

Freebase and WordNet provide broad relational coverage but contain many missing edges. Nickel et al.’s Bilinear model, Bordes et al.’s TransE, and Socher et al.’s NTN use low-dimensional embeddings for KBC, enabling generalization beyond observed triples. However, these systems primarily score one relation at a time and do not directly preserve the compositional query semantics that knowledge bases traditionally support.

Core Problem

Given an anchor s and relation sequence p=(r1,...,rk), the system must rank every entity reachable through that sequence. Single-edge training only requires a positive endpoint to beat negatives by margin 1. Once that constraint is met, residual noise remains in the traversal representation. Repeated application compounds this noise, so even correctly learned edges can produce poor path answers, especially when edges are missing.

Innovation

The paper contributes three linked ideas. First, it defines a general composable model with membership M and traversal T_r. Second, it recursively represents a path’s reachable entity set as a vector denotation. Third, it trains these representations directly on paths using max-margin supervision. Unlike a simple L2 penalty, this objective forces every traversal state to remain useful for subsequent relations and encourages the model to capture recurrent graph structures.

Methodology

  • �� Query semantics: J{s}K={s}; J{q/r}K={t: exists u in JqK with (u,r,t) in G}.
  • �� Bilinear scoring: x_s^T W_r x_t; a path uses x_s^T W_r1...W_rk x_t.
  • �� TransE traversal: T_r(x)=x+w_r, with score -||x_s+sum_i w_ri-x_t||².
  • �� Objective: sum over negatives of [1-score(q,t)+score(q,t′)]+, using 10 negative entities per example.
  • �� Optimization: AdaGrad, minibatch size 300, unit-ball entity constraints, gradient clipping, and a two-stage schedule: single-edge convergence followed by all-path training.

Experiments

The study uses Socher et al.’s WordNet and Freebase subsets: 38,696 and 75,043 entities, with 11 and 13 relations. Base training contains 112,581 and 316,232 edges; generated path training contains 2,129,539 and 6,266,058 examples. Bilinear, Bilinear-Diag, and TransE are compared under SINGLE and COMP training using hits@10 and mean quantile. Additional analyses separate deduction from induction and inspect interpretable queries.

Results

COMP wins broadly. WordNet Bilinear improves from 84.7 to 89.4 mean quantile and TransE from 83.7 to 93.3; Freebase Bilinear improves from 58.0 to 83.5. For KBC, WordNet TransE reaches 86.1 and Freebase Bilinear 91.0. Freebase Bilinear deduction rises from 49.3 to 82.1 and induction from 49.4 to 70.6, showing benefits for both recombining observed edges and recovering missing ones.

Applications

The framework can support multi-hop QA, entity-property inference, relation recommendation, and rule-assisted completion. For example, parents/location can help infer place of birth. Practical use requires entity linking, relation parsing, a reasonably clean graph, and candidate ranking. Its matrix and vector operations are naturally batchable, making large-scale retrieval plausible.

Limitations & Outlook

Random-walk paths may differ from real user questions, and the paper does not systematically evaluate branching, negation, or very long paths. A single low-dimensional vector is only an approximate representation of a reachable set; complex one-to-many relations may exceed the capacity of simple TransE or Bilinear operators. Matrix models can also incur memory costs. Future systems should combine richer set algebra, attention, rules, uncertainty calibration, and evaluation on larger dynamic graphs.

Plain Language Accessible to non-experts

Imagine a city map with people, places, jobs, and roads. A normal fact-completion system learns whether one road probably connects two locations. But a question may ask you to travel several roads in sequence: from a person to their parents, then to where those parents lived, then to languages spoken there. If the map is incomplete, blindly following roads becomes difficult.

This paper teaches the system to remember not only the next stop, but the whole region that could have been reached so far. Bilinear models combine road maps using matrices; TransE moves a marker by adding a direction for each road. During training, the system sees millions of real routes and must rank the genuine destination above incorrect ones.

Practising complete routes also improves single-road decisions, much like a rescue worker who rehearses an entire emergency route remembers every intersection more accurately. On the experiments, path-query errors fall by as much as 76.2%, and single-fact completion errors fall by as much as 43.3%. The approach is still imperfect on very long, messy, or branching routes.

ELI14 Explained like you're 14

Picture an open-world video game. You ask: “Starting from this character, follow the parent link, then the hometown link, then find the languages used there. What answers could I get?” The game’s map may have missing roads, so the computer cannot simply follow a perfect route.

Older AI is like a player who memorized one-step moves. It knows “character to parent” and “parent to town,” but may not know how to chain them. Worse, every move can be a little off. After several moves, the player may end up in the wrong neighborhood—like a navigation app drifting a few meters at every turn.

This paper makes the AI practise whole routes. Bilinear uses special number grids to pass information; TransE moves the current position by adding a relation direction. The AI is rewarded when the true destination ranks above wrong destinations, and millions of routes are made by random walks through the graph.

The payoff is impressive! On WordNet, one model cuts path-query error by 76.2%, and TransE cuts single-fact error by 43.3%. But it is not magic: long routes, messy maps, and questions requiring several conditions can still confuse it. The next challenge is teaching the AI to handle forks, groups of answers, and real questions from people!

Glossary

Path Query

A query that starts at an anchor entity and follows an ordered sequence of relations to retrieve reachable entities. Technically, it denotes a recursively defined set JqK.

The paper evaluates queries such as s/parents/location.

Knowledge-Base Completion

Predicting whether a missing triple (s,r,t) should exist in a knowledge graph. In this paper it is the special case of a length-one path query.

Used as the standard benchmark task.

Compositional Training

Training a model on paths of multiple lengths so that relation transformations can be recursively composed. It aims to preserve information across traversals.

The proposed COMP condition uses a max-margin objective.

Cascading Error

Small errors introduced at one traversal step accumulate and distort later states. This explains why SINGLE training performs poorly on multi-hop paths.

The paper measures the effect with reconstruction quality.

Mean Quantile

The fraction of incorrect candidates ranked below a correct answer, averaged across queries; 1 is optimal. It normalizes performance across candidate-set sizes.

It is the principal metric in Tables 2 and 3.

TransE

An embedding model that represents a relation as a translation vector, scoring -||x_s+w_r-x_t||². Its compositional path operator is repeated vector addition.

It is one of the main experimental base models.

Open Questions Unanswered questions from this research

  • 1 A single low-dimensional vector cannot exactly encode every reachable entity set. How to represent branching, intersection, union, and negation without losing efficiency remains unresolved.
  • 2 Random-walk paths may not match natural-language question distributions. Larger evaluations with noisy, dynamic graphs and genuine user queries are needed.
  • 3 It remains unclear whether non-composable models such as NTN can be redesigned with useful intermediate states and given a comparable theoretical treatment.

Applications

Immediate Applications

Multi-hop knowledge-base QA

A QA system can map a question to a relation sequence and rank answers with compositional TransE or Bilinear traversal. It is suitable for chains such as person–parent–location–attribute, provided entity linking, relation parsing, and graph-quality controls are available.

Missing-fact discovery

Organizations can rank candidate facts using high-confidence paths, such as using parents/location to suggest place of birth. Mean quantile and hits@10 can guide retrieval, while human review or symbolic rules should validate proposed facts before publication.

Long-term Vision

Explainable graph reasoning agents

Future agents could maintain an intermediate state for every step and expose the relation path as evidence for retrieval, recommendation, or decision support. Production adoption requires uncertainty estimates, conflict handling, continual updates, and robust long-path reasoning.

Abstract

Path queries on a knowledge graph can be used to answer compositional questions such as "What languages are spoken by people living in Lisbon?". However, knowledge graphs often have missing facts (edges) which disrupts path queries. Recent models for knowledge base completion impute missing facts by embedding knowledge graphs in vector spaces. We show that these models can be recursively applied to answer path queries, but that they suffer from cascading errors. This motivates a new "compositional" training objective, which dramatically improves all models' ability to answer path queries, in some cases more than doubling accuracy. On a standard knowledge base completion task, we also demonstrate that compositional training acts as a novel form of structural regularization, reliably improving performance across all base models (reducing errors by up to 43%) and achieving new state-of-the-art results.

cs.CL cs.AI cs.DB stat.ML