
PyKEEN-ComplEx
Graphs and geometry28 ops37K params
A knowledge graph embedding model that scores (head, relation, tail) triples with complex-valued embeddings.
Graphs and geometry · 28 operations Checked
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.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
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.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@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},
}