ProjE
- class ProjE(*, embedding_dim=50, inner_non_linearity=None, entity_initializer=<function xavier_uniform_>, relation_initializer=<function xavier_uniform_>, **kwargs)[source]
Bases:
pykeen.models.nbase.ERModel
An implementation of ProjE from [shi2017].
ProjE is a neural network-based approach with a combination and a projection layer. The interaction model first combines \(h\) and \(r\) by following combination operator:
\[\textbf{h} \otimes \textbf{r} = \textbf{D}_e \textbf{h} + \textbf{D}_r \textbf{r} + \textbf{b}_c\]where \(\textbf{D}_e, \textbf{D}_r \in \mathbb{R}^{k \times k}\) are diagonal matrices which are used as shared parameters among all entities and relations, and \(\textbf{b}_c \in \mathbb{R}^{k}\) represents the candidate bias vector shared across all entities. Next, the score for the triple \((h,r,t) \in \mathbb{K}\) is computed:
\[f(h, r, t) = g(\textbf{t} \ z(\textbf{h} \otimes \textbf{r}) + \textbf{b}_p)\]where \(g\) and \(z\) are activation functions, and \(\textbf{b}_p\) represents the shared projection bias vector.
See also
Official Implementation: https://github.com/nddsg/ProjE
Initialize the module.
- Parameters
triples_factory – The triples factory facilitates access to the dataset.
interaction – The interaction module (e.g., TransE)
interaction_kwargs – Additional key-word based parameters given to the interaction module’s constructor, if not already instantiated.
entity_representations – The entity representation or sequence of representations
entity_representations_kwargs – additional keyword-based parameters for instantiation of entity representations
relation_representations – The relation representation or sequence of representations
relation_representations_kwargs – additional keyword-based parameters for instantiation of relation representations
skip_checks – whether to skip entity representation checks.
kwargs – Keyword arguments to pass to the base model
Attributes Summary
The default strategy for optimizing the model's hyper-parameters
The default parameters for the default loss function class
Attributes Documentation