NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Complex Embeddings for Simple Link Prediction

Théo Trouillon, Johannes Welbl, Sebastian Riedel, Éric Gaussier, Guillaume Bouchard

TL;DR

The authors introduce ComplEx, a link prediction model that uses complex-valued embeddings to represent entities and relations in a knowledge base. By moving from real to complex numbers, the model can effectively capture both symmetric and antisymmetric relations using a simple Hermitian dot product, achieving state-of-the-art accuracy while remaining highly scalable.

What Problem Does This Paper Address?

Knowledge Bases (KBs) like Freebase or WordNet are massive repositories of facts, but they are notoriously incomplete. Link prediction—the task of automatically inferring missing relationships between entities—is the standard solution.

The challenge lies in the nature of these relationships. Some are symmetric (e.g., is_married_to), while others are antisymmetric (e.g., is_parent_of or is_hypernym_of). Simple models like DistMult use a standard dot product, which is inherently symmetric and fails to distinguish between "A is the parent of B" and "B is the parent of A." More complex models like RESCAL or Neural Tensor Networks (NTN) can handle asymmetry but suffer from a "parameter explosion," making them prone to overfitting and difficult to scale to millions of entities.

Methods

The authors propose using complex-valued embeddings. Instead of representing an entity or relation as a vector of real numbers, they use vectors in $\mathbb{C}^K$.

The core of the approach is the Hermitian dot product. In real-valued space, the dot product of two vectors $u$ and $v$ is $u^T v$. In complex space, the Hermitian product is $\bar{u}^T v$, where $\bar{u}$ is the complex conjugate of $u$.

Why does this matter? 1. Asymmetry: Because of the conjugate, $\langle u, v \rangle \neq \langle v, u \rangle$. This allows the model to assign different scores to a relation depending on which entity is the subject and which is the object. 2. Simplicity: The scoring function is just the real part of the multi-linear product of the subject, relation, and object embeddings: $\phi(r, s, o) = Re(\langle w_r, e_s, \bar{e}_o \rangle)$. 3. Efficiency: The model is linear in both time and space complexity ($O(K)$), making it as fast as the simplest real-valued models but significantly more expressive.

Datasets

The model was evaluated on three primary benchmarks:

  • Synthetic Dataset: A small KB of 30 entities with one purely symmetric and one purely antisymmetric relation, used to test the model's theoretical capabilities.
Synthetic dataset matrices showing symmetric and antisymmetric relations
  • WN18: A subset of WordNet containing lexical relations between words. It is characterized by many hierarchical (antisymmetric) relations like hypernym.
  • FB15K: A subset of Freebase containing general world knowledge. It features a diverse mix of relation types.

Key Insights and Ideas

  • Complex Numbers as a Natural Fit: The authors point out that while any real square matrix can be decomposed using complex eigenvalues and eigenvectors, the same isn't true for real-valued decompositions. Complex space is the "natural" home for representing the types of matrices found in link prediction.
  • The "Normal Matrix" Connection: The paper leverages the spectral theorem for normal matrices. By taking the real part of the complex decomposition, they can represent any real matrix (symmetric or antisymmetric) efficiently.
  • Unified Entity Representations: Unlike some models that learn two different vectors for an entity (one for when it's a subject and one for when it's an object), ComplEx uses a single complex vector. The subject/object distinction is handled automatically by the complex conjugate.
  • Loss Function Matters: The authors found that using a log-likelihood loss (logistic regression) performed better than the ranking losses commonly used in previous literature, especially for capturing transitive relations.

Key Results

ComplEx consistently outperformed previous state-of-the-art models like TransE, DistMult, and HolE.

Average Precision vs. Factorization Rank on the synthetic dataset

As demonstrated on the synthetic dataset (above), ComplEx perfectly captures both symmetric and antisymmetric relations (reaching an Average Precision of 1.0), whereas models like DistMult fail entirely on antisymmetric relations.

On real-world datasets, the performance gains were equally clear:

  • WN18: ComplEx achieved a Mean Reciprocal Rank (MRR) of 0.941, slightly edging out HolE (0.938) and significantly beating DistMult (0.822).
  • FB15K: The gap was even larger. ComplEx reached an MRR of 0.692, compared to HolE's 0.524 and DistMult's 0.654.
  • Negative Sampling: The authors demonstrated that increasing the number of negative samples (generated by corrupting triples) significantly boosts performance on FB15K, with gains continuing up to 50–100 negative samples per positive.

Limitations and Future Work

  • Non-Compositionality: The current model focuses on direct links. It does not explicitly handle "paths" or compositions of relations (e.g., "the father of my father is my grandfather") as well as some specialized path-based models.
  • Negative Sampling Strategy: While increasing the number of negatives helped, the authors suggest that more intelligent sampling (picking "harder" negatives) could further improve training efficiency.
  • Broader Applications: The authors suggest that complex embeddings could be integrated into deeper architectures, such as neural networks, to see if the benefits of the Hermitian product translate to more complex non-linear models.

Summary updated

BibTeX
@inproceedings{trouillon2016complex,
  author = {Théo Trouillon and Johannes Welbl and Sebastian Riedel and Éric Gaussier and Guillaume Bouchard},
  title = {{Complex Embeddings for Simple Link Prediction}},
  booktitle = {International Conference on Machine Learning},
  year = {2016},
}
Figure