RotatE is a knowledge graph embedding model that represents entities as vectors in complex space and each relation as an element-wise rotation from the head entity to the tail entity. Introduced in 2019, it is a standard method in graph learning for link prediction in knowledge graphs, and a common baseline in artificial intelligence research on relational reasoning.
The model was designed to capture the main relation patterns found in real knowledge graphs, namely symmetry, antisymmetry, inversion and composition, with a single, simple scoring function. This combination of expressiveness and low parameter cost explains why RotatE remains widely used years after its publication.
How RotatE models relations as rotations
RotatE models a fact (h, r, t) as true when rotating the head embedding by the relation lands close to the tail embedding. Every entity is a vector of k complex numbers, and every relation is a vector of k complex numbers with modulus fixed to one, so each coordinate of the relation is a pure rotation by a phase angle.
The model expects t = h ∘ r, where ∘ is the element-wise (Hadamard) product. The distance function is the norm of h ∘ r − t, and a smaller distance means a more plausible triple. Because the modulus of each relation coordinate is one, a relation can change only the phase, never the magnitude, of an entity coordinate.
The following table lists the main components and their roles in the model.
| Component | Representation | Role |
|---|---|---|
| Entity embedding | Complex vector of dimension k | Position of each node |
| Relation embedding | Phase vector, unit modulus | Rotation applied to the head |
| Distance function | Norm of h ∘ r − t | Measures triple plausibility |
| Margin γ | Fixed scalar | Separates positive and negative scores |
| Negative samples | Corrupted heads or tails | Teach the model what is false |
Relation patterns that RotatE captures
RotatE captures four core relation patterns because rotations have simple algebraic properties. This analytical guarantee is the main argument for the model, since earlier methods each handled only a subset.
| Pattern | Example relation | Rotation condition |
|---|---|---|
| Symmetry | Married to | Phase of 0 or π in every coordinate |
| Antisymmetry | Parent of | Any phase other than 0 or π |
| Inversion | Hypernym and hyponym | One relation is the conjugate of the other |
| Composition | Mother of the father is grandmother | Phases of the two relations add up |
Composition is the most valuable of these properties for multi-hop reasoning. Because rotations combine by adding phase angles, a chain of relations corresponds to a single rotation, which lets the model infer facts that require following two or more edges.
Training with self-adversarial negative sampling
RotatE is trained with a margin-based logistic loss that pushes the distance of true triples below the margin and the distance of corrupted triples above it. Corrupted triples are created by replacing the head or tail with a random entity.
The paper also introduced self-adversarial negative sampling, which weights each negative sample by a softmax over its current score. Hard negatives that the model still finds plausible receive higher weight, while trivially false triples contribute little. This technique improved results substantially and has since been adopted by many other embedding models.
Typical settings include an embedding dimension of 500 to 1,000 complex coordinates, a margin between about 6 and 24, and hundreds of negative samples per positive triple. Results are sensitive to these hyperparameters, so fair comparisons require tuning every baseline with equal care.
Evaluation follows the filtered ranking protocol. For each test triple, the model scores the true tail against every other entity, removes candidates that form other known true triples, and records the rank of the correct answer. Reported metrics are mean reciprocal rank (MRR) and Hits@k, the share of test triples whose answer appears in the top k positions.
| Metric | Range | Interpretation |
|---|---|---|
| MRR | 0 to 1 | Average inverse rank; higher is better |
| Hits@1 | 0 to 1 | Share of exact top predictions |
| Hits@10 | 0 to 1 | Share of answers in the top ten |
| Mean rank | 1 to number of entities | Sensitive to outliers; lower is better |
RotatE compared with TransE and DistMult
RotatE generalizes ideas from earlier models: it replaces the translation of TransE with a rotation and keeps the element-wise product of DistMult and ComplEx, but uses a distance rather than a dot product. The table compares their ability to model relation patterns.
| Model | Symmetry | Antisymmetry | Inversion | Composition |
|---|---|---|---|---|
| TransE | No | Yes | Yes | Yes |
| DistMult | Yes | No | No | No |
| ComplEx | Yes | Yes | Yes | No |
| RotatE | Yes | Yes | Yes | Yes |
On standard benchmarks such as FB15k-237 and WN18RR, RotatE reported clear gains in mean reciprocal rank over these baselines when it was published. Later studies showed that part of the gap came from better training procedures, and that carefully tuned older models narrow it considerably.
Limitations and practical considerations
RotatE has known blind spots, and practitioners should check whether their graph depends on them before choosing it.
- Hierarchies: rotations preserve magnitude, so the model struggles to express tree-like depth; hyperbolic models handle this better.
- One-to-many relations: a single rotation maps a head to one point, so many valid tails must crowd around it.
- Transductive setting: entities unseen during training get no embedding without retraining or an inductive extension.
- Literal attributes: numbers, dates and text descriptions are ignored unless added through another component.
- Memory cost: complex embeddings double the storage per dimension compared with real vectors.
Successor models such as QuatE, which rotates in quaternion space, and HAKE, which adds a modulus component for hierarchy, extend the rotation idea to address these gaps.
Stripped to the essentials
A knowledge graph stores facts as links, such as Paris is the capital of France. RotatE gives every item a position and treats every type of link as a turn. If you start at Paris and apply the capital-of turn, you should land on France.
Turns are easy to combine and to undo. That is why the model can learn that some links work in both directions and that two links in a row can equal a third. Once trained, it can suggest missing facts by checking where a turn lands.
Where it is applied
A pharmaceutical research group maintains a biomedical knowledge graph with about 100,000 entities, including drugs, proteins, genes and diseases, connected by 50 relation types. The team trains RotatE with 500 complex dimensions and self-adversarial negative sampling to predict missing drug-targets-protein links.
Relations in the graph compose naturally, since a drug that inhibits a protein involved in a disease pathway may affect that disease. The trained model ranks candidate drug and disease pairs, and the team reviews the top 200 suggestions with domain experts. Several candidates are selected for laboratory testing, and the ranking cuts the manual screening workload to a small fraction of what an unguided review would require.