Command Palette
Search for a command to run...
Apprentissage de plongements structurés de bases de connaissances
Apprentissage de plongements structurés de bases de connaissances
Antoine Bordes Jason Weston Ronan Collobert Yoshua Bengio
Résumé
De nombreuses bases de connaissances (BK) sont aujourd'hui facilement accessibles et englobent des quantités colossales d'informations, grâce soit à des efforts de financement à long terme (par exemple WordNet, OpenCyc) soit à des processus collaboratifs (par exemple Freebase, DBpedia). Toutefois, chacune d'entre elles repose sur un cadre symbolique rigide différent, ce qui rend difficile l'exploitation de leurs données dans d'autres systèmes. Il est regrettable que des connaissances structurées aussi riches ne puissent pas conduire à un bond qualitatif considérable dans de nombreux autres domaines de l'intelligence artificielle, comme le traitement du langage naturel (désambiguïsation lexicale, compréhension du langage naturel, …), la vision (classification de scènes, annotation sémantique d'images, …) ou le filtrage collaboratif. Dans cet article, nous présentons un processus d'apprentissage fondé sur une architecture innovante de réseau de neurones, conçue pour projeter l'une de ces représentations symboliques dans un espace vectoriel continu plus flexible où la connaissance originale est conservée et enrichie. Ces plongements appris permettraient d'utiliser facilement les données de n'importe quelle BK dans les méthodes récentes d'apprentissage automatique pour la prédiction et la recherche d'information. Nous illustrons notre méthode sur WordNet et Freebase et présentons également une manière de l'adapter à l'extraction de connaissances à partir de textes bruts.
One-sentence Summary
Bordes et al. propose a neural energy-based model that embeds knowledge base entities and relations into a continuous vector space while preserving structural constraints, facilitating downstream tasks such as word-sense disambiguation, scene classification, and collaborative filtering.
Key Contributions
- A neural embedding framework maps heterogeneous knowledge bases into a continuous vector space by representing each entity as a low-dimensional vector and each relation type as a low-dimensional operator or matrix.
- The framework uses a compact, flexible training procedure and kernel density estimation in the embedding space to estimate relation probabilities and infer new plausible relations.
- Experiments on WordNet and Freebase show that the embeddings preserve knowledge from large knowledge bases with hundreds of thousands of entities and hundreds of relations, and the approach extends to knowledge extraction from raw text.
Introduction
The authors leverage large web-based Knowledge Bases such as WordNet, Freebase, DBpedia, and OpenCyc, which organize vast amounts of general and domain-specific knowledge in structured, relational form. These resources are important because they could strengthen many AI systems, including natural language processing, computer vision, semantic search, and collaborative filtering. However, prior work has shown that such Knowledge Bases are difficult to reuse inside statistical learning systems, because their symbolic frameworks are often rigid and do not map naturally to feature vectors, embeddings, or other numerical learning representations. Existing embedding-based approaches also faced limitations, including complex multi-vector entity representations that could hurt generalization, or methods designed for small and specialized knowledge tasks rather than broad Knowledge Base reuse.
The authors address this by learning structured distributed embeddings for any Knowledge Base composed of entities and relations. Their model learns a low-dimensional vector for each entity and a low-dimensional matrix operator for each relation type, while preserving the original Knowledge Base structure during training. They also use Kernel Density Estimation in the embedding space to estimate the likelihood of possible relations between entities, even when those relations were not explicitly present in the original Knowledge Base. This yields compact, flexible, and generalizable knowledge representations that can connect large symbolic Knowledge Bases with modern statistical and deep learning systems, and can be extended to knowledge extraction from raw text.
Dataset
-
Overall dataset composition: The authors work with knowledge bases represented as graphs of entity-relation triplets, plus an additional dataset extracted from raw text. Their KB data comes from WordNet and Freebase, while their raw-text data is derived from Wikipedia articles.
-
WordNet subset: WordNet is used in its native graph form. The authors keep entities connected by the relation types highlighted in the paper, but remove entities with too little information. WordNet entities are represented by combining a word with a sense number, for example
auto 1, to distinguish different meanings of the same word. -
Freebase subset: Freebase is also treated as a graph, but the authors do not use the full base. They restrict the data to the “deceased people” type and keep the subgraph formed by all relations involving at least one entity of that type. Examples include triplets such as
(marylin monroe, profession, actress). -
Filtering rules for the KB datasets: For both WordNet and Freebase, the authors keep only triplets whose entities appear in at least 3 relations and whose relation types appear at least 5,000 times. These filters are intended to remove sparse or poorly represented parts of the graph.
-
Test construction for KB datasets: From each dataset, the authors create a test set by randomly holding out 4,000 triplets. These held-out triplets still involve entities that appear elsewhere in the training set, so the split is based on missing links rather than fully unseen entities.
-
Raw-text dataset source: The authors also build a dataset from 40,000 Wikipedia articles using semantic role labeling to extract subject–verb–direct-object structures.
-
Raw-text processing: They simplify the extracted sentences by keeping only subject-verb-direct object phrases, removing adjectives, adverbs, and pronouns from the subject and object noun phrases, and stemming the verbs. They then retain only triplets using the 100 most frequent verb forms.
-
Raw-text dataset scale: This process produces 154,438 triplets with 100 relation types and 23,936 entities. The authors then use this dataset to learn embeddings with the same general training scheme as in the KB experiments.
-
How the data is used: The paper uses these datasets to evaluate whether relational triples from knowledge bases and raw text can be embedded into vector representations. For the KB data, the authors provide both a training split and a held-out test split; for the raw-text data, the processed triplets are used directly as inputs for embedding.
Method
The authors leverage a structured embedding framework that represents a knowledge base as a graph of entities and directed relations. In this formulation, each entity corresponds to a node, and each fact corresponds to a triplet (el,r,er), where el is the left entity, r is a relation type, and er is the right entity. The model does not assume that the knowledge base must be represented as a strict ontology or hierarchy. Instead, it flattens the available facts into relational triplets and learns a vector-space representation that preserves the behavior of different relation types.
The central idea is that entities live in a common embedding space, while each relation type is equipped with its own similarity measure. If the embedding dimension is d, the ith entity is assigned a vector Ei∈Rd. For each relation type k, the authors learn a pair of d×d transformation matrices, Rklhs and Rkrhs, corresponding to the left and right sides of the relation. The similarity between two entities under relation k is then defined as
Sk(Ei,Ej)=RklhsEi−RkrhsEjp.A smaller value of this distance indicates that the two entities are more compatible under that relation. The framework uses p=1, corresponding to the 1-norm, because it simplifies gradient-based optimization. This design also allows relations to be asymmetric. For example, a relation such as “part of” is naturally directional, so the left-hand and right-hand transformations can learn different roles for the same relation type.
This structure can be interpreted as a generalized siamese network. A standard siamese network learns a single similarity function for pairs of inputs, whereas this model learns one similarity function per relation type. The learning problem is therefore defined over a set of triplets
xi=(eil,ri,eir),where the model must learn an energy-like function f(xi) that is low for valid triplets and higher for invalid corrupted triplets. Concretely, if a true training triplet is (eil,ri,eir), the authors want the model to assign a lower score when either the left or right entity is replaced by an incorrect entity. This yields two margin-based constraints:
f(eil,ri,eir)<f(ejl,ri,eir),for all invalid left-side corruptions, and
f(eil,ri,eir)<f(eil,ri,ejr),for all invalid right-side corruptions.
The scoring function itself is built from the entity and relation parameters. The entity embeddings are stored in a matrix E∈Rd×De, where De is the number of entities. Relation parameters are stored as tensors Rlhs and Rrhs of size d×d×Dr, where Dr is the number of relation types. For a triplet xi=(eil,ri,eir), the energy is computed as
f(eil,ri,eir)=RrilhsEv(eil)−RrirhsEv(eir)1.Here, v(n) maps an entity index to a sparse indicator vector, so that Ev(eil) and Ev(eir) extract the corresponding entity embedding columns from E. The model then transforms the left and right entity vectors with the relation-specific matrices and measures their 1-norm distance.
A notable design choice is that a single entity embedding matrix is shared across all relation types. This creates a multi-task learning setup: each entity embedding must encode information useful for many different relations in which that entity appears. As a result, the representation is compact and avoids learning a separate vector for every entity-relation pair. For a relation type, only two linear transformations are learned, which keeps the model scalable while still allowing relation-specific behavior.
Training proceeds with stochastic gradient descent over a hinge-style objective. The procedure repeatedly samples a positive training triplet, then randomly corrupts either the left or right entity to create a negative triplet. For a positive triplet xi and its corrupted version xneg, the model applies a gradient update when the positive energy is not sufficiently smaller than the negative energy. The update direction minimizes
max(0,1−f(xneg)+f(xi)).The constant 1 acts as a margin, encouraging valid triplets to be separated from invalid ones by a minimum gap. After each update, the model normalizes each entity embedding so that
∥Ei∥=1for every entity. This normalization removes a scaling ambiguity: without it, entity vectors could shrink while relation matrices grow, producing the same energy values but allowing parameters to drift during optimization.
Although the structured embeddings define a continuous distance for every possible triplet, the authors address an important limitation of the raw embedding space: facts present in the original knowledge base have symbolic certainty, while arbitrary unseen triplets receive only a distance score. To recover a probabilistic interpretation, they estimate a probability density over the embedding space after learning the embeddings. This step uses kernel density estimation, which evaluates how closely a candidate triplet resembles known training triplets.
The kernel is Gaussian and compares two triplets xi and xj by measuring the squared Euclidean distances between their relation-transformed left and right entity embeddings:
K(xi,xj)=2πσ1exp(−2σ21(RrilhsEv(eil)−RrjlhsEv(ejl)22+RrirhsEv(eir)−RrjrhsEv(ejr)22)).For efficiency, the density estimate for a triplet xi is not computed over the entire training set. Instead, the authors restrict the neighborhood to training triplets that share the same relation type and have either the same left or right entity:
S(xi)={(ejl,rj,ejr):rj=ri∧(ejl=eil∨ejr=eir)}.The probability density is then
fkde(xi)=∣S(xi)∣1xj∈S(xi)∑K(xi,xj).This local KDE process preserves the advantage of embedding-based scoring while giving higher confidence to triplets that are close to observed facts. Once the density is estimated, it can be used for prediction. For example, to infer the right entity given a left entity and relation type, the model selects the entity with the highest density:
e^r=argmaxe∈Defkde((el,r,e)).The same procedure can infer the missing left entity or rank candidate answers by their associated scores. Because these scores can be normalized over the available symbolic answers, the system can output probabilistic rankings rather than only nearest-neighbor embeddings.
Experiment
The experiments evaluate structured embeddings on ranking over WordNet and Freebase, comparing variants with and without multi-task embedding sharing and kernel density estimation. Ranking results show that shared multi-task embeddings generalize better than separate or purely count-based representations, while KDE strengthens fit to known triples. Additional analyses illustrate that entity embeddings capture multifaceted semantic neighborhoods, including analogies and word-sense distinctions, and that the same training framework scales to knowledge extraction from raw text.
The table reports dataset statistics for two knowledge bases, WordNet and Freebase, after filtering entities and relation types. Freebase is larger than WordNet in both entities and training examples, while both datasets use a similar number of relation types and hold out the same size test set. The Freebase data comes from a deceased-people subgraph rather than the full knowledge base. Freebase contains more entities and training examples than WordNet. Both datasets include a withheld test set of the same size.
The table lists representative relation types for two graph-based knowledge bases, Freebase and WordNet. Freebase includes biographical and family relations such as place of birth, profession, and parents, while WordNet includes lexical and semantic relations such as has part, type of, and domain topic. These relations define directed links between entities and support learning structured representations from knowledge base triplets. Freebase relation types focus on facts about persons, including birth place, residence, profession, and family connections. WordNet relation types capture semantic and structural links between synsets, such as part relations, type relations, and domain topics. The relations are treated as directed links between entities within a flat graph representation of the knowledge bases.
Predicted ranking results show that COUNTS and standard EMB match training examples well but perform poorly on held-out examples, indicating limited generalization. Multi-task embedding rankings, especially EMB_MT and EMB_MT+KDE, produce substantially better test ranks, with the clearest improvement on WordNet. The table supports the view that sharing embedding information across relations is key to generalizing ranking performance. COUNTS and EMB achieve good training ranks but weak test ranks. Multi-task embeddings improve test ranking accuracy markedly. The relative benefit of multi-tasking is larger on WordNet than on Freebase.
The ranking results show that count-based features primarily record training triples and perform poorly on test cases. Standard embeddings achieve strong training recall but remain weak on unseen facts, while multi-task embeddings improve generalization on both datasets. The gains are clearer on WordNet and for head-entity prediction, and Freebase shows smaller transfer to right-entity ranking. Multi-tasking gives much better test-time top-10 ranking than non-multi-task embeddings. WordNet benefits more than Freebase because entities participate in more relation types. Multi-task embeddings retain strong training performance while avoiding the low test performance of single-task embeddings.
The multi task embedding model with density estimation produces predictions that include entities absent from the training examples, showing generalization beyond direct memorization. These ranked outputs form semantically meaningful analogies for WordNet relations, especially for relational patterns such as part of and has part. The predictions are not always exactly correct, but many candidate entities are reasonable given the relation. Training examples are removed from the lists, so the shown predictions reflect generalized analogies Multi task embedding enables better generalization than models that mainly reproduce training relations Predicted entities for relational queries are often plausible but not always perfectly correct
The experiments evaluate ranking on filtered WordNet and Freebase knowledge bases, comparing count-based models, standard embeddings, and multi-task embedding variants. The results show that simple models fit training triples well but generalize poorly to held-out facts, whereas multi-task embeddings improve test-time ranking by sharing relation-level information. The benefit is especially clear on WordNet and for head-entity prediction, and qualitative examples indicate that multi-task models can generate plausible analogies involving unseen entities.