FALCONModel

class mowl.models.FALCONModel(dataset, embed_dim=50, anon_e=4, alpha=0.3, beta=0.3, t_norm='product', max_measure='max', num_negs=4, learning_rate=0.001, batch_size=256, model_filepath=None, device='cpu')[source]

Bases: EmbeddingALCModel

FALCON model [falcon2022]: a fuzzy \(\mathcal{ALC}\) neural reasoner.

Each class expression is interpreted as a fuzzy set over a collection of named and sampled anonymous entities, and axioms are scored through fuzzy logical operators. The training objective combines a TBox term and two ABox terms (concept and relation assertions), weighted by alpha and beta (see EmbeddingALCModel).

Parameters:
  • dataset (mowl.datasets.base.Dataset) – mOWL dataset to use for training.

  • embed_dim (int, optional) – Dimension of the embeddings. Defaults to 50.

  • anon_e (int, optional) – Number of anonymous entities sampled each epoch. Defaults to 4.

  • t_norm (str, optional) – Fuzzy t-norm: 'product', 'minmax' or 'Łukasiewicz'. Defaults to 'product'.

  • max_measure (str, optional) – Aggregation used by the concept-concept loss. Defaults to 'max'.

  • num_negs (int, optional) – Number of negative samples per ABox axiom. Defaults to 4.

Methods Summary

init_module()

Sets self.module to the ALCModule used by this model.

Methods Documentation

init_module()[source]

Sets self.module to the ALCModule used by this model. Must be implemented by subclasses.