A fuzzy loss for ontology classification
Simon Flügel, Martin Glauer, Till Mossakowski, Fabian Neuhaus
TL;DR
The paper tackles the problem of ensuring logical consistency in deep learning for ontology classification by introducing a fuzzy loss that penalizes subsumption and disjointness violations. It defines the loss using product and Lukasiewicz t-norms, with a balanced variant to counteract class-imbalance, and demonstrates its application on the CHEBI ontology with CHEBI_100 data, leveraging PubChem pretraining and semi-supervised learning. Empirical results show the fuzzy loss markedly reduces consistency violations (by about two orders of magnitude) while preserving or only modestly affecting classification performance, and data from unlabelled sources further improves out-of-distribution consistency. The work situates its approach relative to semantic loss methods and discusses trade-offs due to hierarchical data imbalance, offering directions for extension to other ontology axioms and integration with broader neuro-symbolic frameworks. All mathematical notation used for the ontology constraints and loss terms is expressed with $...$ delimiters to maintain clarity and reproducibility.
Abstract
Deep learning models are often unaware of the inherent constraints of the task they are applied to. However, many downstream tasks require logical consistency. For ontology classification tasks, such constraints include subsumption and disjointness relations between classes. In order to increase the consistency of deep learning models, we propose a fuzzy loss that combines label-based loss with terms penalising subsumption- or disjointness-violations. Our evaluation on the ChEBI ontology shows that the fuzzy loss is able to decrease the number of consistency violations by several orders of magnitude without decreasing the classification performance. In addition, we use the fuzzy loss for unsupervised learning. We show that this can further improve consistency on data from a
