AutoSF

class AutoSF(embedding_dim=256, num_components=4, coefficients=[(0, 0, 0, 1), (1, 1, 1, 1), (2, 2, 2, 1), (3, 3, 3, 1), (1, 2, 3, -1), (3, 1, 1, -1)], embedding_kwargs=None, **kwargs)[source]

Bases: ERModel

An implementation of AutoSF from [zhang2020].

Initialize AutoSF via the pykeen.nn.modules.AutoSFInteraction interaction.

Note

this variant uses num_components entity and relation representations with shared configuration. The coefficients should only be in \([0, num_components)\).

Parameters
  • embedding_dim (int) – The entity embedding dimension \(d\).

  • num_components (int) – the number of components.

  • coefficients (Sequence[Tuple[int, int, int, Literal[-1, 1]]]) – the coefficients determining the structure. The coefficients describe which head/relation/tail component get combined with each other. While in theory, we can have up to num_components**3 unique triples, usually, a smaller number is preferable to have some sparsity.

  • embedding_kwargs (Optional[Mapping[str, Any]]) – keyword arguments passed to the entity representation

  • kwargs – Remaining keyword arguments passed through to pykeen.models.ERModel.

Attributes Summary

hpo_default

The default strategy for optimizing the model's hyper-parameters

Attributes Documentation

hpo_default: ClassVar[Mapping[str, Any]] = {'embedding_dim': {'high': 256, 'low': 16, 'q': 16, 'type': <class 'int'>}}

The default strategy for optimizing the model’s hyper-parameters