Models

An interaction model \(f:\mathcal{E} \times \mathcal{R} \times \mathcal{E} \rightarrow \mathbb{R}\) computes a real-valued score representing the plausibility of a triple \((h,r,t) \in \mathbb{K}\) given the embeddings for the entities and relations. In general, a larger score indicates a higher plausibility. The interpretation of the score value is model-dependent, and usually it cannot be directly interpreted as a probability.

Functions

make_model(dimensions, interaction[, …])

Build a model from an interaction class hint (name or class).

make_model_cls(dimensions, interaction[, …])

Build a model class from an interaction class hint (name or class).

Classes

Model(triples_factory[, loss, …])

A base module for KGE models.

_OldAbstractModel(triples_factory[, loss, …])

A base module for PyKEEN 1.0-style KGE models.

EntityEmbeddingModel(triples_factory, …[, …])

A base module for most KGE models that have one embedding for entities.

EntityRelationEmbeddingModel(…[, loss, …])

A base module for KGE models that have different embeddings for entities and relations.

_NewAbstractModel(triples_factory[, loss, …])

An abstract class for knowledge graph embedding models (KGEMs).

ERModel(*, triples_factory, interaction[, …])

A commonly useful base for KGEMs using embeddings and interaction modules.

LiteralModel(triples_factory, interaction, …)

Base class for models with entity literals that uses combinations from pykeen.nn.combinations.

CompGCN(*, triples_factory[, embedding_dim, …])

An implementation of CompGCN from [vashishth2020].

ComplEx(triples_factory[, embedding_dim, …])

An implementation of ComplEx [trouillon2016].

ComplExLiteral(triples_factory[, …])

An implementation of the LiteralE model with the ComplEx interaction from [kristiadi2018].

ConvE(triples_factory[, input_channels, …])

An implementation of ConvE from [dettmers2018].

ConvKB(triples_factory[, …])

An implementation of ConvKB from [nguyen2018].

DistMult(triples_factory[, embedding_dim, …])

An implementation of DistMult from [yang2014].

DistMultLiteral(triples_factory[, …])

An implementation of the LiteralE model with the DistMult interaction from [kristiadi2018].

ERMLP(triples_factory[, embedding_dim, …])

An implementation of ERMLP from [dong2014].

ERMLPE(triples_factory[, hidden_dim, …])

An extension of ERMLP proposed by [sharifzadeh2019].

HolE(triples_factory[, embedding_dim, loss, …])

An implementation of HolE [nickel2016].

KG2E(triples_factory[, embedding_dim, loss, …])

An implementation of KG2E from [he2015].

MuRE(*[, embedding_dim, p, power_norm, …])

An implementation of MuRE from [balazevic2019b].

NTN(triples_factory[, embedding_dim, …])

An implementation of NTN from [socher2013].

PairRE([embedding_dim, p, power_norm, …])

An implementation of PairRE from [chao2020].

ProjE(triples_factory[, embedding_dim, …])

An implementation of ProjE from [shi2017].

QuatE(*[, embedding_dim, …])

An implementation of QuatE from [zhang2019].

RESCAL(triples_factory[, embedding_dim, …])

An implementation of RESCAL from [nickel2011].

RGCN(*, triples_factory[, embedding_dim, …])

An implementation of R-GCN from [schlichtkrull2018].

RotatE(triples_factory[, embedding_dim, …])

An implementation of RotatE from [sun2019].

SimplE(triples_factory[, embedding_dim, …])

An implementation of SimplE [kazemi2018].

StructuredEmbedding(triples_factory[, …])

An implementation of the Structured Embedding (SE) published by [bordes2011].

TransD(triples_factory[, embedding_dim, …])

An implementation of TransD from [ji2015].

TransE(triples_factory[, embedding_dim, …])

An implementation of TransE [bordes2013].

TransH(triples_factory[, embedding_dim, …])

An implementation of TransH [wang2014].

TransR(triples_factory[, embedding_dim, …])

An implementation of TransR from [lin2015].

TuckER(triples_factory[, embedding_dim, …])

An implementation of TuckEr from [balazevic2019].

UnstructuredModel(*[, embedding_dim, …])

An implementation of the Unstructured Model (UM) published by [bordes2014].

Class Inheritance Diagram

Inheritance diagram of pykeen.models.base.Model, pykeen.models.base._OldAbstractModel, pykeen.models.base.EntityEmbeddingModel, pykeen.models.base.EntityRelationEmbeddingModel, pykeen.models.nbase._NewAbstractModel, pykeen.models.nbase.ERModel, pykeen.models.multimodal.base.LiteralModel, pykeen.models.unimodal.compgcn.CompGCN, pykeen.models.unimodal.complex.ComplEx, pykeen.models.multimodal.complex_literal.ComplExLiteral, pykeen.models.unimodal.conv_e.ConvE, pykeen.models.unimodal.conv_kb.ConvKB, pykeen.models.unimodal.distmult.DistMult, pykeen.models.multimodal.distmult_literal.DistMultLiteral, pykeen.models.unimodal.ermlp.ERMLP, pykeen.models.unimodal.ermlpe.ERMLPE, pykeen.models.unimodal.hole.HolE, pykeen.models.unimodal.kg2e.KG2E, pykeen.models.unimodal.mure.MuRE, pykeen.models.unimodal.ntn.NTN, pykeen.models.unimodal.pair_re.PairRE, pykeen.models.unimodal.proj_e.ProjE, pykeen.models.unimodal.quate.QuatE, pykeen.models.unimodal.rescal.RESCAL, pykeen.models.unimodal.rgcn.RGCN, pykeen.models.unimodal.rotate.RotatE, pykeen.models.unimodal.simple.SimplE, pykeen.models.unimodal.structured_embedding.StructuredEmbedding, pykeen.models.unimodal.trans_d.TransD, pykeen.models.unimodal.trans_e.TransE, pykeen.models.unimodal.trans_h.TransH, pykeen.models.unimodal.trans_r.TransR, pykeen.models.unimodal.tucker.TuckER, pykeen.models.unimodal.unstructured_model.UnstructuredModel