All notable changes to Ontolearn are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
When cutting a release, move the relevant [Unreleased] entries under a new
## [x.y.z] - YYYY-MM-DD heading (matching the PyPI/GitHub release version and
date) and use that section as the basis for the GitHub release notes.
TDL(hypothesis_extraction="pruned_leaves", prune_tolerance=0.0): thepredicted_leavesexpression derefined on the training examples by reduced-error pruning (ontolearn.learners.tdl_pruning.prune_rules; drops literals and whole conjunctions while the training F1 stays withinprune_tolerance). Not part of the published, peer-reviewed TDL algorithm: it is an Ontolearn addition, stated as such in the code and docstrings, opt-in, and the default is unchanged. Evaluated in nested CV on 20 problems (issue #672, after the∀ r⁻.⊤fix): withprune_tolerance=0the expressions are 1.2x shorter at the geometric mean (38 to 32 characters), their instances are retrieved 1.6x faster (faster on 20/20 problems; Mutagenesis median 3.6 s to 0.3 s with a tuned tolerance and a length penalty), and held-out F1 changes by -0.0006 (Holm p=0.35; non-inferiority was not tested). 18 of the 20 problems are one synthetic KB, so treat the efficiency gain as measured and the "no loss" as unproven.EvoLearner(selection='lexicase'): lexicase parent selection (ontolearn.ea_semantic.lexicase_select), which filters the population on randomly ordered examples and breaks ties toward the shortest tree, so specialists that solve different subsets of the examples survive. Every evaluated individual now carries a per-example error vector (ind.errors), computed from the existing reasoner call at no extra cost. Default stays'tournament'. On 8 problems x 10 seeds with equal wall-clock budgets (examples/benchmark_evolearner_lexicase.py) it improved training F1 (+0.005, paired Wilcoxon p=0.006) and reached the goal with fewer concept tests, with no measurable change in held-out F1.TDL(hypothesis_extraction=...)selects how a class expression is extracted from the trained tree:"positive_paths"(default, the previous behaviour),"predicted_leaves"(union of the leaves that predict the positive class, deterministic order,⊤/⊥for trees without a positive/negative leaf) and"factored_tree"(factored expression with merged sibling subtrees, or the complement of the negative region if that is shorter).tests/test_tdl_hypothesis_extraction.pycompares the modes on a synthetic KB.
TDLwithuse_inverse=Trueno longer creates the feature∀ r⁻.⊤next to∃ r⁻.⊤. With the filler⊤it is a tautology (the reasoner returns every individual), but its column was set only for individuals that have a predecessor, so the training matrix disagreed with the reasoner on 123 of 26,752 cells of the FamilyUncleproblem and a split on that column was read back as⊤or⊥. The column duplicated∃ r⁻.⊤and, sorting first by DL string, won ties against it. Learned hypotheses can change: in 5-fold CV on the 18 Family problems 4 of them differ (Cousin 0.822 to 0.777, Grandgrandson 0.899 to 0.882, PersonWithASibling 0.930 to 1.000, Uncle 0.893 to 0.906 held-out F1; mean over the 18 problems 0.9647 to 0.9658).EvoLearner.best_hypotheses(n>1, return_node=True)(andreturn_info=True) could report the quality, tree length and depth of the wrong individual: the deduplicated hypotheses were paired with the non-deduplicated population, so a duplicate of the best individual shifted every later hypothesis's reported values. (#669)TDLwas not reproducible across processes: the feature columns followed the (hash-seed dependent) iteration order of the knowledge base, so sklearn broke ties between equally good splits differently from run to run (e.g. 5-fold CV F1 ofCousinon Family ranged from 0.760 to 0.804 depending only onPYTHONHASHSEED). The features are now sorted by their DL string.TDL.fitcrashed withValueError: Found array with 0 feature(s)when every extracted feature was constant over the positive and negative examples (e.g. PremierLeague with inverse properties, data properties, nominals and cardinality restrictions all disabled), because the constant columns were dropped and sklearn received an empty matrix. It now logs a warning and falls back to the trivial hypothesis⊤. (#666)TripleStoreReasoner.instances(ce, direct=False)only followedowl:equivalentClassfor the top-level class (via one extra request per equivalent class), so individuals typed by a class equivalent to a filler or any other nested class (e.g.Guardian ≡ Parentfor∃hasChild.Parent) were missed, andinstances_countdisagreed withinstances. The subclass closure now followsrdfs:subClassOfandowl:equivalentClassin both directions at every nesting level, in a single query. To keep stores without equivalence axioms as fast as before, the reasoner checks once with anASKwhether anyowl:equivalentClasstriple exists and otherwise keeps the plainrdfs:subClassOf*path. (#571)save_owl_class_expressionscalledexit(1)after printing debug output when anOWLEquivalentClassesAxiomcould not be added, terminating the whole interpreter from library code. It now logs the details and re-raises the originalAttributeError.PrepareBatchOfTraining(data_struct.py) batching errors (invalid input detected during batching in X/Y) now carry their message in the raisedValueErrorinstead of printing it beforehand.NEROcrashed whenever CUDA was available: the model was moved to the GPU for training, but the index tensors forsearch,fitand the embedding getters were built on the CPU (RuntimeError: Expected all tensors to be on the same device), and the predicted indices were converted with.numpy()straight from the GPU. Indices are now created on the model's device (NERO._index_tensor),forwardmoves its inputs there, and results are moved back with.cpu(). CI has no GPU and never saw this.LearningProblemGeneratorraised a bareValueErrorfor an invalidsearch_algo; the message was printed beforehand. It is now the exception message.NCESTrainerandCLIPTrainerraised a bareValueErrorfor an unsupported optimizer; the message was aprintplaced after theraiseand never ran. It is now the exception message.TripleStoreReasoner.instances(ce, direct=False)only expanded subclasses for the root variable's type triple, so class expressions with fillers (e.g.Grandfather ⊓ ∃hasChild.Grandparent) missed individuals typed only by a subclass of the filler. Every type triple is now expanded, each with its own variable, andinstances_countandis_subset_of_individualsshare the same helper (with_subclass_closure), which also removes the shared-variable scoping bug of #575 from those two. (#571)ontolearn.semantic_caching.retrievecalledNeuralOntology(path_of_kb=...), an argument removed from owlapy, so the neural-reasoner path raisedTypeErrorwhenever no KGE model path was given. It now trains/loads viapath_neural_embeddingand caches the reasoner per KG instead of rebuilding it for every concept. (#515)
NCES,NCES2(and soROCES) report status, warnings and verbose predictions throughlogginginstead ofprint, without the ANSI colour codes, so the output can be filtered or silenced with the standard logging configuration. A leftover debugprint(num_workers)inNCES2.trainis now a debug log.TDL/TDL_refinement(learners/tree_learner.py) report progress (feature extraction, training, grid-search parameters, classification report) throughlogginginstead ofprint. The duplicate verboseprintafter each "Error extracting ... features" warning is removed, as the same error was already logged.NERO(verboselevels map toinfo/debug; the "queue exceeded max" notice is now an unconditionalwarning),NCESTrainerandCLIPTrainerreport throughlogginginstead ofprint; the decorative#/*banners are gone.LearningProblemGeneratorand thelp_generatordata generator (KB2Data) report progress and constraint problems throughlogginginstead ofprint(the insufficient-concepts and unfulfilled-constraints notices are warnings).binders(DL-Learner output parsing),utils.static_funcs(save_owl_class_expressions,verbalize),data_structand the diagnostic messages ofsearchreport throughlogginginstead ofprint. The tree-display methods ofsearchstill print on purpose.- Re-enabled
tests/test_semantic_cache.py(previously 100% commented out), exercising only the symbolic (HermiT) reasoner; the neural (EBR) path is left out as in-process KGE training alongside the JVM segfaulted CI (#515). tests/test_semantic_cache.pynow also covers the neural (EBR) retrieval path, using the a KGE trained on a temporary copy offather.owl, in a child process so a torch + JVM crash fails that one test instead of killing the suite. (#515)- Removed
tests/test_example_concept_learning_neural_evaluation.py, which was 100% commented out and imported the long-goneontolearn.concept_learner. Improvements.mdpruned of items already resolved (CELOE._add_node_evaldremoval,BaseConceptLearner.train()documented as an optional hook, unit-test coverage for previously weak modules) and its priority list refreshed.- NCES/NCES2/ROCES tests (
tests/test_nces*.py,tests/test_roces.py) run in ~20s instead of ~100s:test_nces.pyandtest_nces_trainer.pynow use the shipped pretrained family embeddings/model instead of training embeddings via adiceesubprocess and the synthesizer for 5 epochs on every run; NCES2/ROCES (no shipped weights) train briefly on a few LPs. Quality thresholds raised (0.1 -> 0.4 pretrained NCES, 0.3 NCES2; ROCES stays at 0.1 because its trained quality varies run to run), and the tests run in a temporary working directory so they no longer leave*-Experiment-*,temp_embeddings/andtemp_triples/behind. (#559) - CI (
.github/workflows/test.yml):pushnow only triggers ondevelop/main(PRs run viapull_request), so branches with an open PR are no longer tested twice; superseded runs are cancelled; and on PRs only the tests of the touched learner(s) run unless shared code changed (.github/scripts/select_tests.py; unmapped files fall back to the full suite, docs-only PRs skip the test job). (#645) - CI (
.github/workflows/test.yml): the test suite is split intolearners,neuralandtriplestorematrix jobs that run in parallel (.github/scripts/split_tests.py; new test files land inlearnersunless matched). Onlytriplestorestarts Fuseki, every job restores the data cache, and the PR test selection still applies (groups with nothing selected are not started). (#651)
0.11.0 - 2026-10-15
ontolearn/logging_tentris.conf, a leftover logging config from the removedtentris.py, unused anywhere in the package.CELOE._add_node_evald(ontolearn/learners/celoe.py), dead code with no call sites — a near-duplicate of_add_node.ontolearn/tentris.py, a stale, self-marked-TODO script unused anywhere else in the codebase. It importedontolearn.base, a module removed back in the owlapy 1.1.0 migration, so it hadn't been importable for a long time. (#599)
best_hypotheses(..., return_info=True)onCELOE/OCEL,EvoLearner,Drill,NCES,NCES2andROCESreturns(hypotheses, info), whereinfoholds thequalityandlengthof each hypothesis.fitand the default return value are unchanged.TDL, the SAT learners andNEROdon't have a node-basedbest_hypothesesand are not covered yet. (#498)ontolearn.lp_generator.GoalDirectedLPGenerator(ontolearn/lp_generator/complexity_lp_generator.py), a goal-directed, complexity-controlled learning-problem generator. UnlikeLPGen/KB2Data, which refineowl:Thingbottom-up and keep whatever falls out, it samples target concepts top-down from an explicit DL-construct grammar (ComplexityProfile/DLConstruct: intersection, union, ∃, ∀, cardinality, has-value, negation, plus length/depth/arity bounds), retrieves E+/E- via the reasoner and discards trivially-solvable problems (a cheap one-step baseline hypothesis already separates E+/E-).generate_benchmark()runs a curriculum of profiles andsave_benchmark()persists it.- Difficulty-aware:
DifficultyWeights/difficulty_scorecombine target length/depth, (1 - baseline F1) and near-miss-negative density;generate()oversamples and keeps the hardestnum_lps, biasing negatives towards near-misses (hard_negative_ratio). - Works on any knowledge base, including ones with no object properties (relation-based constructs are dropped from the grammar).
- Example sweeping several KGs with TDL:
examples/benchmark_complexity_lp_generator_with_tdl.py.
- Difficulty-aware:
- Unit tests for previously weakly-covered modules:
quality_funcs(31% -> 100%),nces_utils(39% -> 87%),incomplete_kb(8% -> 91%),data_struct(~60% -> 97%),value_splitterincl.EntropyValueSplitter(33% -> 100%) andutils/static_funcs(37% -> 92%). Drill.__init__(ontolearn/learners/drill.py) accepts arandom_stateparam, seeding a dedicatedrandom.Randominstance (used for exploration/ example sampling instead of the globalrandommodule) plustorch/CUDA, so runs are reproducible given the same seed. Previously unseeded with no way to make runs reproducible via the public API.EvoLearner's DEAP-driven GA has the same gap, still open. (#624)- Example for generating learning problems with numeric data properties
(
examples/generate_numeric_lps.py). (#593) - Explicit
ruff.tomlpinning the enforced lint rule set (E4,E7,E9,F) instead of relying on ruff's shipped default. (#594)
- CI caches the
KGs/LPs/NCESData/CLIPDataarchives withactions/cache, so runs no longer download them fromfiles.dice-research.orgevery time. (#637) - Version bumped to 0.11.0 (
setup.py,ontolearn/__init__.py, README badges, docs). Thesetup.pytrove classifier and the README/installation docs now state Python 3.11, matchingpython_requires='>=3.11'(they still said 3.10). print()calls inknowledge_base.py,semantic_caching.py,learners/tree_learner_refinement_inherit.py,learners/spell_kit/structures.py, andlearners/drill.pynow go through module-levellogging.getLogger(__name__)loggers (info/warning/debug/error, matched to the message), so their output is controllable and filterable via the existing logging config instead of always printing unconditionally to stdout.structures.py'sstructure_to_dot, whoseprint()s produce actual DOT-graph output rather than log messages, is left as-is. Remaining offenders across the rest ofontolearn/are noted inImprovements.md.BaseConceptLearner.train()(ontolearn/learners/base.py) is now documented as a learner-specific optional hook (overridden by Drill, NCES, NCES2, ROCES, CLIP with their own signatures) and returnsselfas its docstring always claimed, instead of being a misleadingly-documented "Train RL agent" stub returningNone.- Upgraded to owlapy 1.6.6, which makes owlready2 an optional install extra
rather than a hard dependency;
ontolearn/incomplete_kb.pyandontolearn/semantic_caching.pyswitched from module-load-timefrom owlready2 import *to a lazyontolearn.utils.import_owlready2()helper so importing them no longer requires owlready2 unless owlready2-backed functionality is actually used. (#600) TripleStore.individuals_count()andTripleStore.most_general_object_properties()(ontolearn/triple_store.py) fetched and materialized the full SPARQL result set over HTTP just to compute a count or test a domain/range subset relationship, transferring and parsing far more data than needed on a large or remote endpoint (e.g. DBpedia).individuals_countnow issues a server-sideCOUNTquery (TripleStoreOntology.individuals_in_signature_count/TripleStoreReasoner.instances_count).most_general_object_propertiesnow checks each object property's domain/range against the target domain via a single short-circuitingASKquery (TripleStoreReasoner.is_subset_of_individuals) instead of fetching every property's full instance set per iteration; this also fixes the subset check itself, which previously compared individuals against the raw (unconsumed) domain/range generator instead of the individuals it would yield, so it could only ever match when the domain wasowl:Thing. (#613)tests/test_example_concept_learning_evaluation.py::TestConceptLearning::test_learningintermittently failed DRILL's mean-F1 assertion (assert x > 0.9) in CI. Now passesrandom_state=42toDrilland gives it a larger dedicated runtime budget; its threshold is lowered to0.85since the search is still wall-clock time-boxed, so outcome still varies somewhat with runner load even with a fixed seed. See #624.KnowledgeBase.abox()(ontolearn/knowledge_base.py) repeated the same rdf:type/data-property/object-property triple traversal once permode in {"native", "iri", "axiom"}, differing only in output formatting. Factored into a shared_abox_native_triplesgenerator with per-mode formatter methods applied on top.ModifiedCELOERefinement._setup()(ontolearn/refinement_operators.py, used byCELOE/OCEL/ExpressRefinement) eagerly swept every object property against every individual in the knowledge base at construction time, purely to precomputemax_nr_fillersfor cardinality-restriction refinements — an O(properties x individuals) reasoner cost paid up front regardless of whether cardinality refinements on a given property were ever explored during search.max_nr_fillersis now a lazily-populated mapping (_LazyMaxNrFillers) that computes and caches a property's value on first lookup instead. (#612)TDL_refinement._merge_binary_feature_matricesre-rendered each candidate feature's DL syntax string from scratch inside the per-example loop (owl_expression_to_dlscales with expression complexity), giving O(examples × features × expression-size) work instead of O(features × expression-size); now precomputed once per feature before the example loop. (#611)TDL_refinement.fit()(ontolearn/learners/tree_learner_refinement_inherit.py) duplicatedTDL.fit()(ontolearn/learners/tree_learner.py) almost line-for-line for grid search, classifier training, classification reporting, and plotting, with only the SHAP-based refinement loop spliced in; likewisecreate_training_datawas a byte-for-byte copy ofTDL's. Extracted the shared steps into_fit_decision_tree/_report_and_plot/_finalize_predictions/_maybe_plot_embeddingshooks on the baseTDLclass, andTDL_refinementnow inheritscreate_training_datainstead of redefining it. (#616)quality_funcs.f1/accreimplemented the tp/tn/fp/fn and precision/recall arithmetic already implemented inmetrics.py'sF1/Accuracyclasses; now delegate to those classes instead of duplicating the math.SearchTreePriorityQueue.get_top_nandDRILLSearchTreePriorityQueue.get_top_n(ontolearn/search.py) duplicated the samekey == 'quality'/'heuristic'/'length'dispatch; extracted into a shared_get_top_n_nodeshelper that both now call, parameterized by how each tree obtains a node's length.- Ruff upgraded to
>=0.16.0. (#594) TDL/TDL_refinementdata-property filtering extended to exclude boolean data properties, with a toggle to enable/disable boolean data properties. (#588)max_runtimefor TDL feature matrix creation/extraction changed toNoneby default, matching the other learners. (#585)
LPGen/KB2Datarelied on a module-levelrandom.seed(42)that reseeded the globalrandommodule on every import, so the same seed did not reproduce the same learning problems once anything else touched global random state.LPGen,KB2Data,ConceptDescriptionGeneratorandExpressRefinementnow take arandom_seedand use their ownrandom.Randominstance; the import-time seeding is gone. (#595)TripleStoreinstance retrieval returned too few individuals for class expressions with a⊤filler such as∃r.⊤on a triplestore without reasoning (#581): owlapy <= 1.6.5 rendered the filler as an explicit?s a owl:Thingpattern that raw triples never satisfy, so such branches matched nothing (e.g. 127 instead of 259 instances on Carcinogenesis). Resolved by the owlapy 1.6.6 upgrade (#600); a regression test now guards the generated SPARQL.TDL/TDL_refinement(ontolearn/learners/tree_learner.py,tree_learner_refinement_inherit.py) declaredkwargs_grid_search: dict = {}, a mutable default argument that was mutated in place via.setdefault("cv", 10), so state leaked between unrelated learner instances (and into caller-supplied dicts). The default is nowNoneand each instance gets its own copy.CLIPDatasetInference.__getitem__(ontolearn/data_struct.py) built the negative-example tensor from the positive examples (embeddings.loc[pos]instead ofembeddings.loc[neg]), soCLIP's length predictor ignored the negatives at inference time even though it was trained with them. (#638)- Two bare
except:clauses swallowed everything, includingKeyboardInterrupt/SystemExit:NCESBaseDataset.decompose's numeric-token check (ontolearn/data_struct.py:289) narrowed toValueError(the only thingint(char)can raise there), andNCESDatasetInference.__getitem__'s embedding lookup (data_struct.py:388) narrowed toKeyError(the only thing a missing-label.loc[]lookup can raise).SPARQLQueryLearner._compute_f1_score(ontolearn/learners/sparql_query_learner.py) caught bareExceptionfor the same reason its own_http_requestraised a bareException("Query failed")on a non-2xx response;_http_requestnow raisesrequests.exceptions.HTTPError, so the catch narrows to(requests.exceptions.RequestException, KeyError, IndexError, ValueError)- the actual failure modes of a malformed candidate SPARQL query (built from_powerset_of_filterscombinations) or its response. TDL.extract_expressions_from_owl_individuals's three per-individual feature extractors (ontolearn/learners/tree_learner.py) caughtExceptionaround both the reasoner lookups and the OWL-object construction that follows them, so a real bug in the construction code (not just a reasoner miss) would silently reduce a feature set instead of surfacing. Narrowed_extract_inverse_property_features's innertryto wrap only theget_object_property_valuesreasoner call; all three now always log the caught exception (previously only printed whenverbose > 0, so a bug hitting the default-quiet path left no trace at all).CELOE.updating_node'sexcept ValueError: passaroundheuristic_queue.discard(node)carried an unresolved# TODO:CD: We need to understand this.heuristic_queueis aSortedSetkeyed by the node'sheuristicvalue;discard()looks a node up by its current key, so theValueErrormeans the node's queue membership and itsheuristicattribute have gone out of sync (e.g. mutated somewhere other than through this context manager). Documented the actual mechanism and replaced the silentpasswith alogger.warningso a future occurrence is visible instead of invisible.TripleStoreReasoner.instances(ontolearn/triple_store.py), used for indirect (direct=False) instance retrieval on aTripleStore, rewrote every?x aoccurrence in the generated SPARQL to the same?some_clsvariable. For class expressions with more than one such occurrence in different scopes — e.g.(¬Daughter) ⊓ Female, which places one inside aFILTER NOT EXISTSblock and one outside it — the shared variable name let the two occurrences bind to each other instead of being scoped independently, producing incorrect results. Each occurrence now gets its own uniquely numbered?some_cls_Nvariable. Covered bytests/test_triplestore_indirect_instances_sparql.py, which mocks the HTTP layer so it doesn't need a live triplestore. (#575)TripleStoreOntology.object_property_domain_axioms/data_property_domain_axioms/object_property_range_axioms(ontolearn/triple_store.py) crashed withTypeError: cannot unpack non-iterable NoneType objectfor any property with no explicitrdfs:domain/rdfs:rangetriple, because thepeek()helper they rely on returned a bareNonefor an empty generator instead of the(None, generator)tuple its callers unpack. Previously unreachable in practice since nothing exercised these axioms for a property lacking a domain/range; surfaced by the#613fix above oncemost_general_object_propertiesstarted actually calling into them for every object property in the signature.peek()now returns(None, generator)on an empty generator, matching its documented contract.ALCSAT/SPELL(SATBaseLearner._convert_kb_to_structure,ontolearn/learners/sat_base.py) crashed withAttributeError: 'Or' object has no attribute 'iri'while initializing over ontologies that illegally pun an entity as multiple property types (e.g.KGs/Biopax/biopax.owl'sDELTA-G, declared as bothObjectPropertyandAnnotationProperty), because owlready2's load-time punning repair returned internal class-expression nodes as object-property values. Resolved as a side effect of the owlapy 1.6.6 upgrade above (#600), which routesStructuralReasoner.object_property_values()through a helper that skips such malformed values with a warning instead of crashing; not previously credited for this fix. (#598)TDL_refinement.classification_reportalways raisedAttributeError:TDL_refinement.fit()setself.__classification_reportfrom within its own class body, which Python name-mangles to a different attribute than the one theclassification_reportproperty (defined onTDL) reads. Fixed as part of deduplicatingfit()into sharedTDLhooks, above; the report is now always set from the base class's_report_and_plot, so both classes agree on the mangled name.tests/test_tdl_refinement.py'stest_classification_reportre-enabled. (#616)NCESTrainer.train()created a freshDataLoader(num_workers=...)worker pool per architecture in a loop; the existingos.cpu_count()-based cap onnum_workersonly engaged whencpu_count <= num_workers, so it silently did nothing on machines with more cores than the default of 8, and repeated worker-pool creation at that count could deadlock undercoverage run(NCES/NCES2/ROCEStraining, e.g.test_nces_trainer.py). Now capped unconditionally tomin(requested, cpu_count-1, 4). (#610)tests/test_nces.py,test_nces2.py(andROCES, which subclassesNCES2) intermittently hung for 1h+ in CI (#622), stalling PRs until manually cancelled. Root cause: severalDataLoaderconstruction sites inontolearn/learners/nces.py/nces2.pystill built a multiprocessing worker pool (num_workers=self.num_workers,NCES2even doing so once per architecture in a loop) — the same fresh-worker-pool-under-coverage rundeadlock pattern already found and fixed forNCESTrainer.train()in #610, just missed elsewhere: the four inference-only call sites (NCES/NCES2fit_one/fit_from_iterable, no throughput benefit from multiprocessing when fetching one or a few batches) and the "quick, low-fidelity"auto_trainconvenience path in both classes'_set_prerequisites(5-epoch training on a tiny dataset, where #610's capped-but-nonzero worker count still wasn't safe under coverage). All six now usenum_workers=0. Also added atimeout=600to the untimeddiceeembedding-training subprocess inNCES._set_prerequisitesas defense in depth, and a job-leveltimeout-minutes: 90safety net in.github/workflows/test.ymlso any future hang fails fast instead of running for hours. The three NCES test files, temporarily excluded from CI while this was diagnosed (#623), are re-enabled.ConceptAbstractSyntaxTreeBuilder._fix_mid_tokens_errors/_postprocess_tail_fix/_enforcerepaired malformed token sequences viarandom.choice(...), making parser output non-deterministic across runs on identical input; replaced with a deterministic (sorted) tie-break.EvoLearnerregistered its DEAPFitness/Quality/Individualtypes under fixed names in DEAP's process-globalcreatormodule and tore them down inclean()behind a bareexcept AttributeError: pass; concurrentEvoLearnerinstances (e.g.fit()calls interleaved across threads) could silently clobber each other's DEAP type definitions. Each instance now registers its own uniquely-named types. (#609)TDL's "no features extracted" error message referencedself.use_data_properties, an attributeTDL.__init__never sets, raisingAttributeErrorinstead of the intended descriptive error; now reports the actualuse_data_properties_boolean/string/date/numericflags.DRILLSearchTreePriorityQueue.get_top_n()raisedAttributeError/TypeErroron the never-assignedself.refined_nodesattribute; now builds its node list fromself.nodes.values(). (#605)LengthBasedRefinement.refine_atomic_concept's disjointness check was dead logic — both branches of theif/elsebuilt the same expression, so refinements into a class disjoint with the current concept were never actually skipped. (#604)LearningProblemGeneratorwas not working;tests/test_learning_problem_generator.pyre-enabled. (#589)- TDL++ integer-typed expression handling; two more intervals added to range generation; range generation skipped when the value distribution can't be fitted. (#593)
- Malformed range/domain axioms are skipped instead of aborting the whole learner run. (#587)
0.10.0 - 2026-02-10
- SAT-based learners SPELL and ALCSAT integrated.
- NERO integrated.
- GPU execution support for Drill, with stricter stopping conditions.
- Concept and neural learners extended and refactored, with better feature
construction and validation. All learners now live under
ontolearn.learners. - Triple store: caching and stability improvements.
- Web UI extended for a smoother experience.
- TDL received multiple fixes and refinements.
- Upgraded to owlapy 1.6.3.
- Deprecated components such as
EBR(moved to owlapy).
0.9.2 - 2025-06-12
- Issue in the
triple_storemodule from the 0.9.1 release.
executormodule now supports both TDL and NCES.verbalizermodule improvements.
0.9.1 - 2025-05-26
- Caching for OWL reasoners.
- Upgraded to owlapy 1.5.1, resolving key dependency issues; sync (Java) reasoner integration tested and stabilized.
0.9.0 - 2025-03-03
- ROCES and NCES2 learners.
- Semantic caching algorithm for OWL reasoners.
- Major refactor of knowledge base classes, especially
TripleStore:- Removed some
KnowledgeBasehyperparameters and caching operations. TripleStoreandTripleStoreKnowledgeBasemerged into a single class.TripleStoreknowledge base can now be used by all learners except NCES, NCES2, and ROCES.
- Removed some
- Drill: bug fixes and optimizations.
0.8.1 - 2024-11-19
- Upgraded to owlapy 1.3.3, bringing several fundamental changes and accompanying fixes.
- Neural reasoner fixes, prediction caching (LRU),
test_owl_neural_retrievalABox method fix. - Learning SPARQL queries using string literals.
0.8.0 - 2024-10-28
ModelAdapterremoved.
- Code adjustments for owlapy's newest versions (up to 1.3.1) and refactoring for the Enexa project.
- NCES integrated into the
ontolearn-webservice. - DL-Learner binding fixes.
0.7.3 - 2024-08-01
- ALCQIO retrieval with neural nets.
- TDL refactoring.
OWLLiteralwith string value support; triples based on literals can now be parsed.
0.7.2 - 2024-07-11
- Breaking: modules under
ontolearn/baseremoved from Ontolearn; the classes are now provided by owlapy (owlapy 1.1.0). Documentation guides moved to owlapy's docs accordingly. - Triplestore improvements;
ontolearn-webserviceAPI changes; nominals support in Drill; default cardinality restriction handling.
0.7.1 - 2024-05-09
- DRILL refactored.
TripleStorereworked on top ofrdflib.graph; TDL over triplestore.- Adapted to owlapy 1.0.1.
- LLM-based verbalizer.
- TDL class expression learning example over a DBpedia SPARQL endpoint.
0.7.0 - 2024-03-07
- Drill, Tree-based DL Learner (TDL), and CLIP learners
available via
ontolearn.learners/ontolearn.concept_learner. - Triple Store Knowledge Base:
TripleStoreOntology,TripleStoreReasoner,TripleStoreKnowledgeBase, usable with just a SPARQL endpoint. KnowledgeBase.abox()/.tbox()/.triples()for triple retrieval, in'native','iri', or'axiom'modes.- Ontosample
integrated (available via
pip install ontolearn[full]). - Learning problem generator as a Python module.
KnowledgeBase:kb.ontology()/kb.reasoner()are now properties (kb.ontology/kb.reasoner); optionalinclude_implicit_individualsflag for type retrieval.- Dependencies split into
ontolearn[min](default) andontolearn[full](extras).
- Triplestore logic removed from
OWLOntology_Owlready2/OWLReasoner_Owlready2, moved toontolearn.triple_store.
- Reusing the same
EvoLearnermodel to fit more than one learning problem no longer causes a quality drop.
0.6.1 - 2023-12-03
Maintenance release.
0.5.4 - 2023-08-17
Maintenance release.
0.5.3 - 2023-02-10
Maintenance release.
0.5.2 - 2022-10-17
- Domain inclusion checking in
ConceptGenerator. - Top-level CNF/DNF conversion.
- OCEL fixes (not yet fully equivalent to the DL-Learner implementation).
DLSyntaxParsercorrectly parsesThing/Nothing.- Multiple
fit()calls onEvoLearnerfor datasets with data properties. - Super-property filtering in
OWLReasoner_Owlready2.
- Closed-world behaviour used by default for negation
(
FastInstanceChecker).