Paper commentary
Complex Embeddings for Simple Link Prediction
Complex embeddings let simple link prediction model antisymmetric relations
- Problem Dot-product embedding models handle symmetric relations well, but antisymmetric relations usually need many more parameters. That extra size raises the risk of overfitting.
- Method ComplEx represents entities and relations as complex vectors. It scores a fact by the real part of a Hermitian product of the subject, relation and conjugated object embeddings.
- Results ComplEx reaches 0.941 filtered MRR on WN18 and 0.692 on FB15K. HolE reports 0.938 and 0.524 in prior work.
Why link prediction needs antisymmetry
Link prediction fills in entries that a knowledge base leaves out, and a common way to pose it is as completion of a three-dimensional binary tensor whose slices are the adjacency matrices of the relation types. Many relations are non-deterministic, so a prediction has to be probabilistic rather than a rule that always fires.
Factorization methods give each entity and each relation a fixed-size vector, and a fact is scored as a multi-linear product of the embeddings of its subject, relation and object. Binary relations show several patterns, including hierarchies, compositions and equivalences, and a good model should cover the combinations of reflexivity, symmetry and transitivity while its time and memory grow linearly with the size of the knowledge base.
Dot products of embeddings already cope with symmetry and with reflexivity or irreflexivity, and a suitable loss function can add transitivity. Antisymmetric relations are the difficulty: real-valued approaches usually need a large increase in parameters to represent them, which makes the models prone to overfitting.
Complex eigen-decomposition and normal matrices
The starting point is an eigen-decomposition in which one set of factors describes both the subject and the object role of an entity. For real symmetric matrices the eigenvectors are real and orthogonal, but an antisymmetric matrix has no such decomposition in the real space, so complex eigenvectors are needed.
The model uses the Hermitian product, which conjugates the first argument: \\( \\langle u,v\\rangle := \\bar{u}^T v \\). Conjugation makes the product non-symmetric, so the two orderings of a pair can receive different scores, and it gives a proper norm, since a complex vector whose self-product is zero must be the zero vector.
Inverting a complex eigenvector matrix causes computational trouble, so the model restricts relation matrices to normal matrices, those satisfying \\( X\\bar X^T=\\bar X^T X \\). For these matrices the spectral theorem gives a unitary diagonalization \\( X = E W \\bar E^T \\), where the inverse of E is its conjugate transpose. The class contains real symmetric and antisymmetric sign matrices, orthogonal matrices and permutation matrices.
Most normal matrices are not real, but relation scores must be real, so the model keeps only the real part, \\( X=\\mathrm{Re}(E W \\bar E^T) \\). Taking the real part still permits an exact decomposition of any real square matrix, not only normal ones, a result the authors attribute to Trouillon et al. (2016).
Sign-rank and the rank bound
The approach assumes that observed binary relations have low sign-rank.
Sign-rank is a natural complexity measure for sign matrices and is linked to learnability, and factorization models have worked well in practice, which gives some support to the assumption. If a sign matrix has low sign-rank, the model can reproduce its sign pattern with a rank at most twice the sign-rank, so the factor of two is an upper bound rather than a typical cost.
Sign-rank is often far below ordinary rank: the n by n identity matrix has rank n but sign-rank 3. Reordering columns in pairs turns that identity into a relation the authors call marriedTo, which is known to be hard to factorize, and the model expresses it in rank 6 for any n.
In practice the rank is capped at K, much smaller than n, so E becomes an n by K complex matrix and W a K by K complex matrix, and a single relation score is \\( X_{so}=\\mathrm{Re}(e_s^T W \\bar e_o) \\).
The multi-relational scoring function
Each relation receives its own embedding w_r, while the entity embeddings are shared across all relations. The probability that a fact is true is the logistic function of a score \\( \\phi(r,s,o;\\Theta) \\), where Theta collects the learned parameters of the model.
The score is the real part of a three-way product, \\( \\phi(r,s,o;\\Theta)=\\mathrm{Re}(\\langle w_r, e_s, \\bar e_o\\rangle) \\), which expands to a sum over latent dimensions k of the products of w_rk, e_sk and the conjugate of e_ok. The three-way product written this way is the componentwise multi-linear product, not the Hermitian extension of the dot product.
Splitting every complex value into real and imaginary parts gives four real trilinear terms, which pair the real and imaginary parts of the relation with those of the subject and the object. The sign of the imaginary-part terms is what makes the score change when subject and object are swapped.
If the relation embedding is purely imaginary the score is antisymmetric, and if it is purely real the score is symmetric. The authors also split the relation matrix into a symmetric part built from the real part of w_r and an antisymmetric part built from its imaginary part.
The relation embedding therefore acts as a weight on each latent dimension: its real part weights the symmetric component of the entity inner product and its imaginary part weights the antisymmetric component. Geometrically, each relation scales the basis formed by the entity embeddings anisotropically, and the result is projected onto the real subspace.
Training objective and negative sampling
The data term is the negative log-likelihood, so minimizing it maximizes the likelihood of the observed signs before the penalty is added.
In preliminary work the log-likelihood beat the ranking loss on FB15K, with TransE as the exception.
Negatives are created from the observed positives by replacing either the subject or the object, under the local closed world assumption, and this is repeated at run time for each batch. The number of negatives per positive triple is the parameter eta, and the main search uses the values 1, 2, 5 and 10.
Optimization uses stochastic gradient descent on mini-batches, with AdaGrad tuning the learning rate, and the regularization factor and the initial learning rate alpha0 are chosen from grids. Early stopping is applied to the validation filtered MRR, computed every 50 epochs with at most 1000 epochs. The best ranks in the search were generally 150 or 200.
The authors find AdaGrad relatively insensitive to the initial learning rate and suggest that this may encourage overconfidence in its online tuning and less care when the starting value is chosen.
Synthetic symmetry and antisymmetry check
The synthetic knowledge base has two relations over 30 entities, one fully symmetric and one fully antisymmetric, forming a 2 by 30 by 30 tensor with the diagonal left unobserved. Training has 1392 observed triples, and validation and test each have 174 triples.
Models of ranks up to 50 are compared by Average Precision, the area under the precision-recall curve, on the symmetric relation, the antisymmetric relation and the combined data.
DistMult predicts only the symmetric relation correctly, since it cannot model antisymmetry. TransE performs poorly in practice, particularly on the antisymmetric relation, and RESCAL overfits as its rank grows because of its large number of parameters. The CP decomposition fails on both relations, because it has to push symmetric and antisymmetric patterns through the entity embeddings.
Among the compared models the authors report that only ComplEx succeeds on this simple data.
FB15K and WN18 results
FB15K is a subset of Freebase with general facts, and WN18 is a subset of WordNet with lexical relations between words. WN18 has 40,943 entities and 141,442 training triples, and FB15K has 14,951 entities and 483,142 training triples.
Each test triple is ranked against all candidate subject and object substitutions, and MRR and Hits at m are reported in raw and filtered form, where the filtered form removes the other observed positive triples from the ranking.
On WN18 ComplEx reaches 0.941 filtered MRR, on par with 0.938 for HolE, the latter taken from prior work. DistMult reaches 0.822 and TransE 0.454 filtered MRR on WN18.
On the per-relation breakdown, ComplEx scores 0.953 filtered MRR on hypernym, against 0.791 for DistMult and 0.446 for TransE. The gap narrows on relations that DistMult already handles well: member of domain usage gives 0.917 for both ComplEx and DistMult, and synset domain usage of gives 1.000 for all three models.
On FB15K ComplEx reaches 0.692 filtered MRR and 59.9% Hits at 1, against 0.524 and 40.2% for HolE as reported from prior work. DistMult scores 0.654 on FB15K, a smaller gap than to HolE. The authors attribute the larger gap to the simplicity of their model and to the loss function, and they read the small gap with DistMult as consistent with ComplEx being a complex-number version of DistMult.
TransE and CP are far behind on both datasets; the authors take CP's weakness on WN18 to come from the small number of relations, which magnifies the difference between subject and object roles.
The HolE rows are taken from the original report, while the other baselines were reimplemented within the same framework as ComplEx.
Effect of negatives per positive on FB15K
The main search allowed only up to 10 negatives per positive because of computational limits, so this experiment extends eta to 1, 2, 5, 10, 20, 50, 100 and 200 on FB15K. The other hyperparameters are fixed at the best validated values, K = 200, lambda = 0.01 and alpha0 = 0.5.
Moving from 1 to 10 negatives raised the filtered MRR on FB15K by up to 0.08, while the effect on WN18 was small. With 100 negatives the filtered MRR reaches 0.737 and Hits at 1 reaches 64.8%, and the score falls again at 200 negatives.
The model converges in fewer epochs as the number of negatives grows, which offsets part of the higher cost per epoch up to 50 negatives, and beyond that the training time grows linearly with eta. The authors choose 50 negatives as a trade-off between accuracy and training time.
Relation to HolE and NTN
The Neural Tensor Network combines bilinear forms and linear transformations of subject and object embeddings and feeds them into a nonlinear neural layer, which gives it expressiveness at the price of a very large number of parameters.
HolE also handles antisymmetry, through circular correlation, which the authors describe as an O(n log n) operation, whereas the complex inner product costs O(n).
Limitations
The synthetic check involves one symmetric and one antisymmetric relation over 30 entities, so it tests only a small case. The HolE numbers were not reproduced by the authors, so the comparison with HolE rests on values reported elsewhere. The benchmark experiments cover only FB15K and WN18 with the baselines listed.
The comparison between the logistic loss and the ranking loss was made in preliminary work and is not reported in the tables. Training uses only observed positive triples and the negatives generated from them under the local closed world assumption.
Pairwise embeddings with complex numbers, a more informative negative sampling procedure and complex embeddings inside deep networks are left as open questions.
Paper info
- Authors
- Trouillon, Théo, Welbl, Johannes, Riedel, Sebastian, Gaussier, Éric, Bouchard, Guillaume
- Venue
- arXiv · Preprint
- First published
- 2016-6-20
- Added
- 2026-11-12
- Updated
- 2016-6-20
- Version
- v1
- arXiv
- 1606.06357
- Category
- cs.AI · cs.LG · stat.ML
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Trouillon, Théo, Welbl, Johannes, Riedel, Sebastian, Gaussier, Éric, Bouchard, Guillaume (2016). Complex Embeddings for Simple Link Prediction. arXiv:1606.06357v1. https://arxiv.org/abs/1606.06357v1
BibTeX
@misc{tho2016complex,
title = {{Complex Embeddings for Simple Link Prediction}},
author = {Trouillon, Théo and Welbl, Johannes and Riedel, Sebastian and Gaussier, Éric and Bouchard, Guillaume},
year = {2016},
eprint = {1606.06357},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1606.06357v1}
}