Symbolic learning is machine learning based on symbolic logic. Its peculiarity lies in the fact that the learned models enclose an explicit knowledge representation, which offers many opportunities:
- Verifying that the model's thought process is adequate for a given task;
- Learning of new insights by simple inspection of the model;
- Manual refinement of the model at a later time.
These levels of transparency (or interpretability) are generally not available with standard machine learning methods, thus, as AI permeates more and more aspects of our lives, symbolic learning is becoming increasingly popular. In spite of this, implementations of symbolic algorithms (e.g., extraction of decision trees or rules) are mostly scattered across different languages and machine learning frameworks.
Enough with this! The lesser and lesser minoritarian theory of symbolic learning deserves a programming framework of its own!
Sole is a collection of Julia packages for symbolic learning and reasoning. Although at an embryonic stage, Sole.jl covers a range of functionality that is of interest for the symbolic community, but it also fills some gaps with a few functionalities for standard machine learning pipelines. At the time of writing, the framework comprehends the three core packages:
- SoleLogics.jl provides the logical layer for symbolic learning. It provides a useful codebase for computational logic, which features easy manipulation of:
- Propositional and (multi)modal logics (atoms, logical constants, alphabet, grammars, fuzzy algebras);
- Logical formulas (random generation, parsing, minimization);
- Logical interpretations (or models, e.g., Kripke structures);
- Algorithms for model checking (that is, checking that a formula is satisfied by an interpretation).
- SoleData.jl provides the data layer for representing logisets, that is, the logical counterpart to machine learning datasets:
- Optimized data structures, useful when learning models from datasets;
- Support for multimodal data.
- Optimized data structures, useful when learning models from datasets;
- SoleModels.jl defines the building blocks of symbolic modeling, featuring:
- Definitions for (logic-agnostic) symbolic models (mainly, decision rules/lists/trees/forests);
- Support for mixed, neuro-symbolic computation.
Additional packages include:
- SoleDecisionTreeInterface.jl, which enables the use of Sole on decision trees learned via DecisionTree.jl (e.g., extract and evaluate rules);
- ModalDecisionTrees.jl which allows you to learn decision trees based on temporal logics on time-series datasets, and spatial logics on (small) image datasets;
- ModalDecisionLists.jl which implements a sequential covering algorithm to learn decision lists;
The formal foundations of the framework are given in giopaglia's PhD thesis: Modal Symbolic Learning: from theory to practice, G. Pagliarini (2024)
Additionally, there's a 10-hour PhD course on YouTube, as well as material for it (including Jupyter Notebooks displaying symbolic AI workflows with Sole).
The package is developed and maintained by the ACLAI Lab @ University of Ferrara.
Long live transparent modeling!