All models

ComplEx

A knowledge graph embedding model that scores (head, relation, tail) triples with complex-valued embeddings.

Graphs and geometry · 28 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (31 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Family
ComplEx
Parameters
37K
Operations
28
Framework
PyTorch
Recurrent
No
Published
ICML 2016
Cited by
2,100 (as of 29 October 2026)
Authors
Théo Trouillon, Johannes Welbl, Sebastian Riedel and others
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m386
Graph hash
06e735da39a10cdb766b7a79047e04d0b69c9746a9f0bfea426281bb5ee67e8d
Skeleton hash
b2d08134e03db0aabd6bb82fd8fe21949097240c77d3236944b1434f45bc2d61
Architecture hash
624a45074e9c944443f29d838c5171986a01cd1a4c6872773b6cb9656dd4f803
Diagram SHA-256
9305e8a76b8aa9922041b32794299326e8ce489a71d7cf90259322c3f1909284
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

This model is the ComplEx implementation in PyTorch Geometric, torch_geometric.nn.kge.ComplEx.

About this model's family

ComplEx is a link prediction model for knowledge bases that solves the problem through latent factorization with complex valued embeddings. Its score uses only the Hermitian dot product, the complex counterpart of the standard dot product between real vectors.

The Hermitian dot product involves the conjugate-transpose of one of the two vectors, so it is no longer symmetric, and facts about antisymmetric relations can receive different scores depending on the ordering of the entities involved. Each entity still keeps a single joint representation whether it appears as subject or object of a relation. The paper notes that the model can be interpreted as a complex number version of DistMult.

The approach remains linear in both space and time. On FB15K the paper reports a filtered MRR of 0.692 and 59.9% of Hits at 1 for ComplEx, compared to 0.524 and 40.2% for HolE. On WN18, ComplEx and HolE are on par, with respective filtered MRR scores of 0.941 and 0.938.

Key idea. ComplEx shows that complex valued embeddings composed with the Hermitian dot product can handle symmetric and antisymmetric relations while staying linear in space and time.

  • ComplEx
  • Complex Embeddings
  • Complex Embeddings for Simple Link Prediction
  • knowledge graph embedding
  • link prediction
  • knowledge graph completion
  • complex-valued embeddings
  • Hermitian dot product
  • KGE

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{trouillon2016complexembeddingssimplelink,
      title={Complex Embeddings for Simple Link Prediction}, 
      author={Théo Trouillon and Johannes Welbl and Sebastian Riedel and Éric Gaussier and Guillaume Bouchard},
      year={2016},
      eprint={1606.06357},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/1606.06357}, 
}