Stateful Interaction Modules

Stateful interaction functions.

Classes

Interaction(*args, **kwargs)

Base class for interaction functions.

FunctionalInteraction(*args, **kwargs)

Base class for interaction functions.

NormBasedInteraction(p[, power_norm])

Norm-based interactions use a (powered) \(p\)-norm in their scoring function.

MonotonicAffineTransformationInteraction(base)

An adapter of interaction functions which adds a scalar (trainable) monotonic affine transformation of the score.

ClampedInteraction(base[, base_kwargs, ...])

An adapter to clamp scores to a minimum or maximum value.

DirectionAverageInteraction(base[, base_kwargs])

The directional average interaction module.

AutoSFInteraction(coefficients, *[, ...])

The AutoSF interaction as described by [zhang2020].

BoxEInteraction([tanh_map, p, power_norm])

The BoxE interaction from [abboud2020].

ComplExInteraction(*args, **kwargs)

The ComplEx interaction proposed by [trouillon2016].

ConvEInteraction([input_channels, ...])

The stateful ConvE interaction function.

ConvKBInteraction([hidden_dropout_rate, ...])

The stateful ConvKB interaction function.

CPInteraction(*args, **kwargs)

The Canonical Tensor Decomposition interaction as described [lacroix2018] (originally from [hitchcock1927]).

CrossEInteraction(embedding_dim, ...)

The stateful interaction function of CrossE.

DistMAInteraction(*args, **kwargs)

The stateless DistMA interaction function from [shi2019].

DistMultInteraction(*args, **kwargs)

The stateless DistMult interaction function.

ERMLPEInteraction([embedding_dim, ...])

The stateful ER-MLP (E) interaction function.

ERMLPInteraction(embedding_dim, hidden_dim, ...)

The ER-MLP stateful interaction function.

HolEInteraction(*args, **kwargs)

The stateless HolE interaction function.

KG2EInteraction([similarity, similarity_kwargs])

The stateless KG2E interaction function.

LineaREInteraction(p[, power_norm])

The LineaRE interaction described by [peng2020].

MultiLinearTuckerInteraction([head_dim, ...])

An implementation of the original (multi-linear) TuckER interaction as described [tucker1966].

MuREInteraction(p[, power_norm])

The norm-based MuRE interaction function from [balazevic2019b].

NTNInteraction([activation, activation_kwargs])

The state-less Neural Tensor Network (NTN) interaction function.

PairREInteraction(p[, power_norm])

The state-less norm-based PairRE interaction function.

ProjEInteraction(embedding_dim, ...)

The state-ful ProjE interaction function.

QuatEInteraction()

The state-less QuatE interaction function.

RESCALInteraction(*args, **kwargs)

The state-less RESCAL interaction function.

RotatEInteraction(*args, **kwargs)

The RotatE interaction function proposed by [sun2019].

SEInteraction(p[, power_norm])

The Structured Embedding (SE) interaction function.

SimplEInteraction()

The SimplE interaction function.

TorusEInteraction([p, power_norm])

The TorusE interaction function from [ebisu2018].

TransDInteraction([p, power_norm])

The TransD interaction function.

TransEInteraction(p[, power_norm])

The state-less norm-based TransE interaction function.

TransFInteraction(*args, **kwargs)

The state-less norm-based TransF interaction function.

TransformerInteraction(input_dim, ...)

Transformer-based interaction, as described in [galkin2020].

TransHInteraction(p[, power_norm])

The norm-based TransH interaction function.

TransRInteraction(p[, power_norm, ...])

The state-less norm-based TransR interaction function.

TripleREInteraction([u, p, power_norm])

The TripleRE interaction function from [yu2021].

TuckERInteraction([embedding_dim, ...])

The stateful TuckER interaction function.

UMInteraction(p[, power_norm])

The Unstructured Model (UM) interaction function.

Variables

interaction_resolver

A resolver for stateful interaction functions

Class Inheritance Diagram

Inheritance diagram of pykeen.nn.modules.Interaction, pykeen.nn.modules.FunctionalInteraction, pykeen.nn.modules.NormBasedInteraction, pykeen.nn.modules.MonotonicAffineTransformationInteraction, pykeen.nn.modules.ClampedInteraction, pykeen.nn.modules.DirectionAverageInteraction, pykeen.nn.modules.AutoSFInteraction, pykeen.nn.modules.BoxEInteraction, pykeen.nn.modules.ComplExInteraction, pykeen.nn.modules.ConvEInteraction, pykeen.nn.modules.ConvKBInteraction, pykeen.nn.modules.CPInteraction, pykeen.nn.modules.CrossEInteraction, pykeen.nn.modules.DistMAInteraction, pykeen.nn.modules.DistMultInteraction, pykeen.nn.modules.ERMLPEInteraction, pykeen.nn.modules.ERMLPInteraction, pykeen.nn.modules.HolEInteraction, pykeen.nn.modules.KG2EInteraction, pykeen.nn.modules.LineaREInteraction, pykeen.nn.modules.MultiLinearTuckerInteraction, pykeen.nn.modules.MuREInteraction, pykeen.nn.modules.NTNInteraction, pykeen.nn.modules.PairREInteraction, pykeen.nn.modules.ProjEInteraction, pykeen.nn.modules.QuatEInteraction, pykeen.nn.modules.RESCALInteraction, pykeen.nn.modules.RotatEInteraction, pykeen.nn.modules.SEInteraction, pykeen.nn.modules.SimplEInteraction, pykeen.nn.modules.TorusEInteraction, pykeen.nn.modules.TransDInteraction, pykeen.nn.modules.TransEInteraction, pykeen.nn.modules.TransFInteraction, pykeen.nn.modules.TransformerInteraction, pykeen.nn.modules.TransHInteraction, pykeen.nn.modules.TransRInteraction, pykeen.nn.modules.TripleREInteraction, pykeen.nn.modules.TuckERInteraction, pykeen.nn.modules.UMInteraction