mowl.training
Training regimes (mowl.training.regime): the DELE regimes and the shared
deductive-closure utility (mowl.training.dele, mowl.training.closure), and
the regimes of the literature (negatives, losses, positives, schedules, model selection,
batching).
Functions
|
|
|
The DELE training regime: negatives and negative losses for all normal forms ("+l") and, if |
|
Best achievable F1 on the first validation axioms of one normal form, negated (so that lower is better): the model-selection quantity of the RegD code ( |
Classes
Base class of training regimes. |
|
|
Combination of several regimes. |
|
Inclusions may be violated by up to |
|
Inclusions must hold with a gap of at least |
|
How |
|
How the TransBox code (HuiYang1997/TransBox, |
|
How |
|
How the Keras code of EmEL++ (kracr/EmELpp, |
|
The objective of the Keras code of EmEL++ (kracr/EmELpp, |
|
Add the validation axioms of a normal form to the training data. |
|
How |
|
How the CatE code trains, and how the numbers of Zhapa-Camacho and Hoehndorf (arXiv:2305.07163v3, Tables 2-4) were obtained. |
|
Approximate deductive closure of a normalised ontology (see the module documentation for exactly what is included). |
How the DELE reference code combines the per-axiom losses of one normal form ( |
|
|
Train (and score) with the loss functions of the DELE reference code. |
|
How the DELE reference code (bio-ontology-research-group/DELE) trains, and how the numbers of DELE's Tables 3-6 were obtained: the composition of |
|
Negatives and negative losses for all seven \(\mathcal{EL}^{++}\) normal forms (DELE, Section 4; NeSy 2024, Section 4.2). |
|
Filter entailed axioms out of the sampled negatives (DELE, Section 5; NeSy 2024, Section 4.3 "Negatives Filtration"). |
|
Add axioms of the deductive closure to the training data as positives. |
|
Uniform corruption of one or more columns of the training axioms. |
|
Corrupt one fixed column of every axiom with a uniformly drawn entity. |
|
Every negative corrupts one side of the axiom, chosen uniformly at random. |
|
Every positive gets one block of negatives per side: one with the left-hand side corrupted and one with the right-hand side corrupted. |
|
Corrupt an entity only with an entity of the same type. |
|
Never use a known positive as a negative: a sampled negative that is itself an axiom of the training data is re-sampled in its corrupted column. |
|
Hard negatives for \(C \sqsubseteq D\) from the siblings of \(C\). |
|
Negatives that are provably false: corruptions that contradict an asserted disjointness axiom. |
|
Negatives drawn once, before training, and reused at every step. |
|
Re-initialise centre and radius (or offset) of every class as one vector: uniform in \([-1, 1]\), then the concatenation is scaled to unit norm. |
The negative loss of \(C \not\sqsubseteq \exists R.D\) without the hinge: \(r_C + r_D - \lVert c + R - d \rVert + \gamma\) instead of \(\max(0, \cdot)\). |
|
The penalty \(|\lVert c \rVert - 1|\) of every class centre that occurs in an axiom is added to the loss of that axiom (positives and negatives alike), instead of once per step as the mean over all classes. |
|
|
The loss details of the baseline models of the Box2EL code (KRR-Oxford/BoxSquaredEL, |
|
Mean loss of the positives plus |
|
Squared distance of the scores to targets: \(\mathrm{mean}((s^+ - t^+)^2) + \mathrm{mean}((s^- - t^-)^2)\), negatives scored by the module's negative loss. |
|
\(\mathrm{mean}_{i,k} \max(0, \gamma + s^+_i - s^-_{ik})\): every positive must score at least \(\gamma\) better than each of its negatives. |
|
Negative-sampling loss with a log-sigmoid, optionally self-adversarial: |
|
Bayesian personalised ranking (Rendle et al. 2012): \(-\mathrm{mean}_{i,k} \log\sigma(s^-_{ik} - s^+_i)\). |
|
The contrastive loss RegD (Yang and Chen, Section 3.3, Eq. |
|
The loss the RegD code trains with ( |
|
ELK-Em's contrastive loss (Singh et al. 2026, Section 4.2, Eq. |
|
Binary cross-entropy with the score read as a negative log-probability, \(p(\alpha) = e^{-s(\alpha)}\): |
|
Weight the loss of every normal form by its share of the training data. |
|
Train only on the transitive reduction of the asserted atomic subsumptions. |
|
Train on the transitive closure of the asserted atomic subsumptions: every \(C \sqsubseteq E\) with a path \(C \sqsubseteq \dots \sqsubseteq E\) of asserted |
|
Multiply the learning rate by |
|
Constant learning rate for the first |
|
Triangular cyclical learning rate between |
|
Reduce the learning rate by |
|
End training when a validation quantity has not improved for |
|
Keep the parameters with the best validation quantity. |
|
|
|
|
|
One mini-batch per normal form per optimisation step. |
Class Inheritance Diagram
