Taxonomy-Informed Neural Networks for Smart Manufacturing
Full text
This is a self-archived version of an original article. This version may differ from the original in pagination and typographic details. Author(s): Title: Year: Version: Copyright: Rights: Rights url: Please cite the original version: CC BY-NC-ND 4.0 https://creativecommons.org/licenses/by-nc-nd/4.0/ Taxonomy-Informed Neural Networks for Smart Manufacturing © 2024 The Authors. Published by Elsevier B.V. Published version Terziyan, Vagan; Vitko, Oleksandra Terziyan, V., & Vitko, O. (2024). Taxonomy-Informed Neural Networks for Smart Manufacturing. Procedia Computer Science, 232, 1388-1399. https://doi.org/10.1016/j.procs.2024.01.137 2024
ScienceDirect Available online at www.sciencedirect.com Procedia Computer Science 232 (2024) 1388–1399 1877-0509 © 2024 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0) Peer-review under responsibility of the scientific committee of the 5th International Conference on Industry 4.0 and Smart Manufacturing 10.1016/j.procs.2024.01.137 10.1016/j.procs.2024.01.137 1877-0509 © 2024 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0) Peer-review under responsibility of the scientific committee of the 5th International Conference on Industry 4.0 and Smart Manufacturing Available online at www.sciencedirect.com ScienceDirect Procedia Computer Science 00 (2023) 000–000 www.elsevier.com/locate/procedia 1877-0509 © 2023 The Authors. Published by ELSEVIER B.V. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0) Peer-review under responsibility of the scientific committee of the 5th International Conference on Industry 4.0 and Smart Manufacturing 5th International Conference on Industry 4.0 and Smart Manufacturing Taxonomy-Informed Neural Networks for Smart Manufacturing Vagan Terziyan a,*, Oleksandra Vitko b a Faculty of Information Technology, University of Jyväskylä, 40014, Jyväskylä, Finland b Department of Artificial Intelligence, Kharkiv National University of Radio Electronics, 61166, Kharkiv, Ukraine Abstract A neural network (NN) is known to be an efficient and learnable tool supporting decision-making processes particularly in Industry 4.0. The majority of NNs are data-driven and, therefore, depend on training data quantity and quality. The current trend in enhancing data-driven models with knowledge-based models promises to enable effective NNs with less data. So-called physics-informed NNs use additional knowledge from computational science to improve NN training. Quite much of the knowledge is available as logical constraints from domain ontologies, and NNs may benefit from using it. In this paper, we study the concept of Taxonomy- Informed NN (TINN), which combines data-driven training of NNs with ontological knowledge. We study different patterns of NN training with additional knowledge on class-subclass hierarchies and instance-class relationships with potential for federated learning. Our experiments show that additional knowledge, which influences TINNs’ training process through the loss function at backpropagation, improves the quality of trained models. © 2023 The Authors. Published by ELSEVIER B.V. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0) Peer-review under responsibility of the scientific committee of the 5th International Conference on Industry 4.0 and Smart Manufacturing Keywords: neural networks; machine learning; informed machine learning; physics-informed neural networks; taxonomy; Industry 4.0 1. Introduction New challenges related to digitalization, automation and intellectualization of industrial processes make Industry 4.0 (also 5.0) and smart manufacturing the key adopters of recent discoveries in artificial intelligence (AI) in general and machine learning (ML) in particular [1], [2]. Current progress in ML is associated with data-driven modelling, deep learning and neural networks (NNs). ML, however, may benefit from also exploring other AI assets (knowledge and behavior) in addition to data to enable better models. Modern industry has already collected useful knowledge formulated in terms of computational science (scientific computing) by combining mathematics with physics and * Corresponding author. E-mail address: [email protected] Available online at www.sciencedirect.com ScienceDirect Procedia Computer Science 00 (2023) 000–000 www.elsevier.com/locate/procedia 1877-0509 © 2023 The Authors. Published by ELSEVIER B.V. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0) Peer-review under responsibility of the scientific committee of the 5th International Conference on Industry 4.0 and Smart Manufacturing 5th International Conference on Industry 4.0 and Smart Manufacturing Taxonomy-Informed Neural Networks for Smart Manufacturing Vagan Terziyan a,*, Oleksandra Vitko b a Faculty of Information Technology, University of Jyväskylä, 40014, Jyväskylä, Finland b Department of Artificial Intelligence, Kharkiv National University of Radio Electronics, 61166, Kharkiv, Ukraine Abstract A neural network (NN) is known to be an efficient and learnable tool supporting decision-making processes particularly in Industry 4.0. The majority of NNs are data-driven and, therefore, depend on training data quantity and quality. The current trend in enhancing data-driven models with knowledge-based models promises to enable effective NNs with less data. So-called physics-informed NNs use additional knowledge from computational science to improve NN training. Quite much of the knowledge is available as logical constraints from domain ontologies, and NNs may benefit from using it. In this paper, we study the concept of Taxonomy- Informed NN (TINN), which combines data-driven training of NNs with ontological knowledge. We study different patterns of NN training with additional knowledge on class-subclass hierarchies and instance-class relationships with potential for federated learning. Our experiments show that additional knowledge, which influences TINNs’ training process through the loss function at backpropagation, improves the quality of trained models. © 2023 The Authors. Published by ELSEVIER B.V. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0) Peer-review under responsibility of the scientific committee of the 5th International Conference on Industry 4.0 and Smart Manufacturing Keywords: neural networks; machine learning; informed machine learning; physics-informed neural networks; taxonomy; Industry 4.0 1. Introduction New challenges related to digitalization, automation and intellectualization of industrial processes make Industry 4.0 (also 5.0) and smart manufacturing the key adopters of recent discoveries in artificial intelligence (AI) in general and machine learning (ML) in particular [1], [2]. Current progress in ML is associated with data-driven modelling, deep learning and neural networks (NNs). ML, however, may benefit from also exploring other AI assets (knowledge and behavior) in addition to data to enable better models. Modern industry has already collected useful knowledge formulated in terms of computational science (scientific computing) by combining mathematics with physics and * Corresponding author. E-mail address: [email protected]
Vagan Terziyan et al. / Procedia Computer Science 232 (2024) 1388–1399 1389 Available online at www.sciencedirect.com ScienceDirect Procedia Computer Science 00 (2023) 000–000 www.elsevier.com/locate/procedia 1877-0509 © 2023 The Authors. Published by ELSEVIER B.V. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0) Peer-review under responsibility of the scientific committee of the 5th International Conference on Industry 4.0 and Smart Manufacturing 5th International Conference on Industry 4.0 and Smart Manufacturing Taxonomy-Informed Neural Networks for Smart Manufacturing Vagan Terziyan a,*, Oleksandra Vitko b a Faculty of Information Technology, University of Jyväskylä, 40014, Jyväskylä, Finland b Department of Artificial Intelligence, Kharkiv National University of Radio Electronics, 61166, Kharkiv, Ukraine Abstract A neural network (NN) is known to be an efficient and learnable tool supporting decision-making processes particularly in Industry 4.0. The majority of NNs are data-driven and, therefore, depend on training data quantity and quality. The current trend in enhancing data-driven models with knowledge-based models promises to enable effective NNs with less data. So-called physics-informed NNs use additional knowledge from computational science to improve NN training. Quite much of the knowledge is available as logical constraints from domain ontologies, and NNs may benefit from using it. In this paper, we study the concept of Taxonomy- Informed NN (TINN), which combines data-driven training of NNs with ontological knowledge. We study different patterns of NN training with additional knowledge on class-subclass hierarchies and instance-class relationships with potential for federated learning. Our experiments show that additional knowledge, which influences TINNs’ training process through the loss function at backpropagation, improves the quality of trained models. © 2023 The Authors. Published by ELSEVIER B.V. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0) Peer-review under responsibility of the scientific committee of the 5th International Conference on Industry 4.0 and Smart Manufacturing Keywords: neural networks; machine learning; informed machine learning; physics-informed neural networks; taxonomy; Industry 4.0 1. Introduction New challenges related to digitalization, automation and intellectualization of industrial processes make Industry 4.0 (also 5.0) and smart manufacturing the key adopters of recent discoveries in artificial intelligence (AI) in general and machine learning (ML) in particular [1], [2]. Current progress in ML is associated with data-driven modelling, deep learning and neural networks (NNs). ML, however, may benefit from also exploring other AI assets (knowledge and behavior) in addition to data to enable better models. Modern industry has already collected useful knowledge formulated in terms of computational science (scientific computing) by combining mathematics with physics and * Corresponding author. E-mail address: [email protected] Available online at www.sciencedirect.com ScienceDirect Procedia Computer Science 00 (2023) 000–000 www.elsevier.com/locate/procedia 1877-0509 © 2023 The Authors. Published by ELSEVIER B.V. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0) Peer-review under responsibility of the scientific committee of the 5th International Conference on Industry 4.0 and Smart Manufacturing 5th International Conference on Industry 4.0 and Smart Manufacturing Taxonomy-Informed Neural Networks for Smart Manufacturing Vagan Terziyan a,*, Oleksandra Vitko b a Faculty of Information Technology, University of Jyväskylä, 40014, Jyväskylä, Finland b Department of Artificial Intelligence, Kharkiv National University of Radio Electronics, 61166, Kharkiv, Ukraine Abstract A neural network (NN) is known to be an efficient and learnable tool supporting decision-making processes particularly in Industry 4.0. The majority of NNs are data-driven and, therefore, depend on training data quantity and quality. The current trend in enhancing data-driven models with knowledge-based models promises to enable effective NNs with less data. So-called physics-informed NNs use additional knowledge from computational science to improve NN training. Quite much of the knowledge is available as logical constraints from domain ontologies, and NNs may benefit from using it. In this paper, we study the concept of Taxonomy- Informed NN (TINN), which combines data-driven training of NNs with ontological knowledge. We study different patterns of NN training with additional knowledge on class-subclass hierarchies and instance-class relationships with potential for federated learning. Our experiments show that additional knowledge, which influences TINNs’ training process through the loss function at backpropagation, improves the quality of trained models. © 2023 The Authors. Published by ELSEVIER B.V. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0) Peer-review under responsibility of the scientific committee of the 5th International Conference on Industry 4.0 and Smart Manufacturing Keywords: neural networks; machine learning; informed machine learning; physics-informed neural networks; taxonomy; Industry 4.0 1. Introduction New challenges related to digitalization, automation and intellectualization of industrial processes make Industry 4.0 (also 5.0) and smart manufacturing the key adopters of recent discoveries in artificial intelligence (AI) in general and machine learning (ML) in particular [1], [2]. Current progress in ML is associated with data-driven modelling, deep learning and neural networks (NNs). ML, however, may benefit from also exploring other AI assets (knowledge and behavior) in addition to data to enable better models. Modern industry has already collected useful knowledge formulated in terms of computational science (scientific computing) by combining mathematics with physics and * Corresponding author. E-mail address: [email protected] 2 Vagan Terziyan et al. / Procedia Computer Science 00 (2023) 000–000 other disciplines into analytical and computational models. The current “big thing” in ML, deep learning and NNs training is updating the NNs’ training algorithms with respect to available knowledge. Such “informed” ML [3] trend has already made a huge impact on developing efficient physics-informed NNs (PINNs) for a variety of industrial applications [4]. The majority of emergent informed ML models (particularly PINNs) combine NNs with knowledge in the form of differential or integral equations and other typical for scientific computing mathematical constraints. What is missing is the knowledge constraints formulated using the conceptual modelling terms (e.g., first-order logic) and available as domain ontologies (or particularly taxonomies). Could knowledge from ontologies (taxonomies) be used to guide and improve NNs’ training from data? Would potential taxonomy-informed NNs (TINNs) become a reasonable concept and architecture for the informed ML? How can TINNs be potentially useful for Industry 4.0 and smart manufacturing? We formulated these questions as objectives of our study described in this paper. In the context of these objectives, we are going to show the similarities and differences between emergent PINNs and potential TINNs suggested in this paper. We have contextualized our work within the broader landscape of Industry 4.0 (driven by automation and ML) and its evolution towards Industry 5.0 (with enhanced value of human knowledge). Our research converges at the juncture of cutting-edge NN methodologies and the imperative for intelligent decision-making in these transformative industrial paradigms. By bridging data-driven NNs with knowledge-based models, we empower these industries to harness ontological insights for enhanced decision-making even in scenarios with limited data. The concept of TINN that we explore finds its resonance in Industry 4.0’s drive for more efficient and effective decision support systems. One potential application example could revolve around predictive maintenance within a smart manufacturing environment. Imagine a scenario where a manufacturing facility seeks to optimize maintenance schedules for critical machinery. By integrating TINNs with domain ontologies and historical sensor data, the facility could create a more accurate predictive maintenance model. This model would not only consider the machinery’s data-driven health metrics but also leverage ontological knowledge to anticipate potential failure modes based on known relationships between component attributes. The resulting model would empower the facility to proactively schedule maintenance interventions, minimizing downtime and maximizing operational efficiency. The rest of the paper is organized as follows: Section 2 describes a general NN model enhancement mechanism used in PINNs and similar informed ML models; Section 3 describes how to use class-subclass hierarchy with multiple inheritance in known taxonomies to improve training of NNs from data, i.e., enabling TINNs; Section 4 presents some motivation examples (scenarios and experiments) with simple TINNs; In Section 5, we present couple of potential industrial scenarios with TINNs, which utilize knowledge on instance-class relationships for diagnostics (both individually and group informed) of industrial assets; and we conclude in Section 6. Related work will be cited throughout the paper. 2. From Neural Networks to Physics-Informed Neural Networks Habitual opposition of knowledge-based and data-driven modelling frameworks has recently changed to capable hybrids. Among current trends is the transformation of ML in general and NNs, in particular, into physics-informed ML and corresponding physics-informed NNs. We will briefly introduce these in this section. 2.1. A neural network and its general training schema A very generic representation of a NN is shown in Fig. 1 (the part within the dashed line). If you consider a NN as a black box, then it, actually, represents a complex function 𝑦𝑦 = 𝑓𝑓(𝑥𝑥,𝜃𝜃 ) (aka intended model), which takes a sample of data (a vector 𝑥𝑥 of numeric attributes’ values 𝑥𝑥1, 𝑥𝑥2,… ,𝑥𝑥𝑛𝑛 of the sample) as an input and outputs the target numeric value (regression case) or a label (classification case). Inside of such a black box, there are hyperparameters [5], which determine the structure (complexity) of the function (i.e., the number, the size and the type of hidden layers of the NN), and vector 𝜃𝜃 of the parameters 𝜃𝜃1,𝜃𝜃2,…,𝜃𝜃𝑘𝑘 of that function, which are the NN’s weights [6]. Learning NN means finding the values for both hyperparameters and parameters of the NN such that the resulting function will fit the best to the available (for training) data. Typically, the hyperparameters are chosen and managed semiautomatically with the support from data scientists and the parameters (weights) are discovered automatically using a backpropagation algorithm. Training by backpropagation is an iterative optimization algorithm (with roots from
1390 Vagan Terziyan et al. / Procedia Computer Science 232 (2024) 1388–1399 Vagan Terziyan et al. / Procedia Computer Science 00 (2023) 000–000 3 neuroscience [7]), which is searching for a best-fit function (intended model with optimal 𝜃𝜃 ). The algorithm starts with some arbitrary weights (initialization of NN [8]) and continuously updates these weights after processing groups (epochs or batches) of training data samples. At each iteration, the training algorithm measures the opposite to the (data-model) fitness function value (i.e., “loss”, or “error”, or “cost” function [9] computed by comparing the predicted value 𝑦𝑦((𝑥𝑥)𝑖𝑖) by the NN and the actual known value 𝑦𝑦𝑖𝑖 for each 𝑖𝑖-th training sample from the batch) and computes corresponding updates for the parameters (weights) according to the gradient descent schema aiming to get smaller loss at the next iteration. Therefore, by training a NN, we seek to minimize the loss function. One may see that such training makes NNs biased towards the training data [10] (including natural or adversarial noise within it). Therefore, quality and quantity of training data samples (in addition to various regularization tricks used during training to avoid overfitting [11]) matters a lot to get well performing (high prediction accuracy) and well generalized (capability to address unseen data) NNs. Fig. 1. Illustrating a generic NN schema (the part within the dashed line) and its extension towards KINN. One may see that KINN adds an extra summand to the NN’s loss function, which, in addition to the traditional “Data” Loss, takes into account also the “Knowledge” Loss related to fitness of the current NN’s predictions regarding the target function with the available knowledge on this function. 2.2. A knowledge-informed neural network and its training specifics The recent trend in updating NN architectures towards better performance and less dependency solely on data is related to the so-called “informed ML” in general and “informed NNs” in particular [3]. Different variations of informed NNs use available prior knowledge of the target model in addition to training data. Such NNs can be integrated into one broad category under the common umbrella term “Knowledge-Informed NN” (KINN). The very generic architecture and training schema of KINN is shown in Fig. 1 as an update of traditional NN architecture. Let us assume that we have some prior knowledge of the target function in the form of some constraint ℱ(𝑦𝑦,𝑥𝑥) from which it is impossible (or unfeasible) to directly derive the target function (model) 𝑦𝑦 = 𝑓𝑓(𝑥𝑥). The objective of KINN training will be still discovering the target function from available data in the form 𝑦𝑦 = 𝑓𝑓(𝑥𝑥,𝜃𝜃 ), however, with respect to the prior knowledge constraint ℱ(𝑦𝑦,𝑥𝑥). This can be achieved by making a complex loss function in backpropagation training, which sums up (with defined coefficients of importance) the loss related to the training data fitness to the target model (“Data” loss) and the loss related to the prior knowledge (“Knowledge” loss) as shown in Fig 1. The most popular subcategory of informed ML nowadays is physics-informed ML [12] with a variety of Industry 4.0 applications (see, e.g., [13], [14], [15]). This subcategory is based on PINNs [4] and it combines scientific computing with computational intelligence, aka a hybrid. The prior knowledge constraints in PINNs are usually differential or integral equations, which involve a target function. The balance between being “data-driven” and “knowledge-based” can be controlled by the corresponding adaptive weights in the loss function [16]. PINNs have been quickly adopted by industry (see, e.g., [17], [18]). In addition to physics constraints, industrial applications of KINNs may also benefit from knowledge and fuzzy analytics on a variety of human factors [19], knowledge from chemistry [20], biology [21], etc.
Vagan Terziyan et al. / Procedia Computer Science 232 (2024) 1388–1399 1391 Vagan Terziyan et al. / Procedia Computer Science 00 (2023) 000–000 3 neuroscience [7]), which is searching for a best-fit function (intended model with optimal 𝜃𝜃 ). The algorithm starts with some arbitrary weights (initialization of NN [8]) and continuously updates these weights after processing groups (epochs or batches) of training data samples. At each iteration, the training algorithm measures the opposite to the (data-model) fitness function value (i.e., “loss”, or “error”, or “cost” function [9] computed by comparing the predicted value 𝑦𝑦((𝑥𝑥)𝑖𝑖) by the NN and the actual known value 𝑦𝑦𝑖𝑖 for each 𝑖𝑖-th training sample from the batch) and computes corresponding updates for the parameters (weights) according to the gradient descent schema aiming to get smaller loss at the next iteration. Therefore, by training a NN, we seek to minimize the loss function. One may see that such training makes NNs biased towards the training data [10] (including natural or adversarial noise within it). Therefore, quality and quantity of training data samples (in addition to various regularization tricks used during training to avoid overfitting [11]) matters a lot to get well performing (high prediction accuracy) and well generalized (capability to address unseen data) NNs. Fig. 1. Illustrating a generic NN schema (the part within the dashed line) and its extension towards KINN. One may see that KINN adds an extra summand to the NN’s loss function, which, in addition to the traditional “Data” Loss, takes into account also the “Knowledge” Loss related to fitness of the current NN’s predictions regarding the target function with the available knowledge on this function. 2.2. A knowledge-informed neural network and its training specifics The recent trend in updating NN architectures towards better performance and less dependency solely on data is related to the so-called “informed ML” in general and “informed NNs” in particular [3]. Different variations of informed NNs use available prior knowledge of the target model in addition to training data. Such NNs can be integrated into one broad category under the common umbrella term “Knowledge-Informed NN” (KINN). The very generic architecture and training schema of KINN is shown in Fig. 1 as an update of traditional NN architecture. Let us assume that we have some prior knowledge of the target function in the form of some constraint ℱ(𝑦𝑦,𝑥𝑥) from which it is impossible (or unfeasible) to directly derive the target function (model) 𝑦𝑦 = 𝑓𝑓(𝑥𝑥). The objective of KINN training will be still discovering the target function from available data in the form 𝑦𝑦 = 𝑓𝑓(𝑥𝑥,𝜃𝜃 ), however, with respect to the prior knowledge constraint ℱ(𝑦𝑦,𝑥𝑥). This can be achieved by making a complex loss function in backpropagation training, which sums up (with defined coefficients of importance) the loss related to the training data fitness to the target model (“Data” loss) and the loss related to the prior knowledge (“Knowledge” loss) as shown in Fig 1. The most popular subcategory of informed ML nowadays is physics-informed ML [12] with a variety of Industry 4.0 applications (see, e.g., [13], [14], [15]). This subcategory is based on PINNs [4] and it combines scientific computing with computational intelligence, aka a hybrid. The prior knowledge constraints in PINNs are usually differential or integral equations, which involve a target function. The balance between being “data-driven” and “knowledge-based” can be controlled by the corresponding adaptive weights in the loss function [16]. PINNs have been quickly adopted by industry (see, e.g., [17], [18]). In addition to physics constraints, industrial applications of KINNs may also benefit from knowledge and fuzzy analytics on a variety of human factors [19], knowledge from chemistry [20], biology [21], etc. 4 Vagan Terziyan et al. / Procedia Computer Science 00 (2023) 000–000 3. Adding Awareness of Class-Subclass Hierarchies to Neural Networks The success of current KINNs implementations shows that additional knowledge constraints from computational modelling analytics may improve traditional data-driven modelling by NNs (e.g., in PINNs). However, would similar effects take place if we use constraints from conceptual modelling frameworks (e.g., ontology engineering [22])? Can we augment ML in general and NNs in particular by conceptual models and get benefits from the explainability of these models [23]? In this section, we will start with simple taxonomies based on class-subclass hierarchies and multiple inheritance [24] to add taxonomy awareness to NNs, i.e., enabling TINNs. An approach to adding taxonomy awareness to NNs is demonstrated in Fig.2. Assume that we have a simple taxonomy, which can be defined using conceptual modelling terms from RDF/RDFS (N3 notation; https://www.w3.org/TeamSubmission/n3/) language as follows: @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . :DOMAIN a rdfs:Class . :CLASS1 a rdfs:Class ; rdfs:subClassOf :DOMAIN . :CLASS2 a rdfs:Class ; rdfs:subClassOf :DOMAIN . :CLASS1.1 a rdfs:Class ; rdfs:subClassOf :CLASS1 . :CLASS1.2 a rdfs:Class ; rdfs:subClassOf :CLASS1 . :CLASS1.3 a rdfs:Class ; rdfs:subClassOf :CLASS1 . :CLASS2.1 a rdfs:Class ; rdfs:subClassOf :CLASS2 . :CLASS2.2 a rdfs:Class ; rdfs:subClassOf :CLASS2 . :CLASS2.3 a rdfs:Class ; rdfs:subClassOf :CLASS2 . :CLASS2.4 a rdfs:Class ; rdfs:subClassOf :CLASS2 . … Fig. 2a provides a visual representation of this taxonomy. Fig. 2. The training schema of TINN originated from simple taxonomy awareness is illustrated: (a) example of a taxonomy (class-subclass hierarchy of classes in the taxonomy); (b) the NN classifier B, which is currently being trained to label samples into 7 classes (lower level of the taxonomy) benefits from the NN classifier B trained to label the same instances into 2 classes of the upper level of the taxonomy. Classifier A contributes to the performance of classifier B by sharing part of its loss regarding the same input sample (e.g., some input training sample with two true labels, CLASS2 and CLASS2.3).
1392 Vagan Terziyan et al. / Procedia Computer Science 232 (2024) 1388–1399 Vagan Terziyan et al. / Procedia Computer Science 00 (2023) 000–000 5 Assume that, according to the scenario in Fig. 2b, we want to train NN (“B”) to label DOMAIN instances into seven classes {CLASS1.1 – CLASS1.3; CLASS2.1 – CLASS2.4} from Level B of the taxonomy. This could be done in a traditional way by feeding training instances into the network and learning (updating weights of) it by backpropagation until it converge. However, in such a case, we will not benefit from complete information provided by the taxonomy. It is known that an instance of a subclass is also an instance of its superclass. If, e.g., some data sample in our example is labeled with CLASS2.3 (at level B of the taxonomy), then this instance would also have another label, CLASS2 (at Level A of the taxonomy). Let us assume that we synchronously train also the classifier (NN “A”) to be capable of labeling input samples to two classes {CLASS1; CLASS2} from Level A of the taxonomy. Both classifiers (“A” and “B”) will address any training input sample with its own probability distribution (among output labels) and, therefore, error (loss). Therefore, when (during training) NN “B” gets an input sample with, e.g., the true label CLASS2.3 (explicit) and, therefore, with the label CLASS2 (implicit), then the error (Loss_B) made by NN “B” (regarding CLASS2.3) could be updated if to get also the error (Loss_A) from NN “A” regarding the same sample and its true label CLASS2. We have here the possibility to train NN “B” in the context of being “informed” on the outputs from NN “A” operating on a higher level. A modified loss function in this case would contain actual Loss_B plus part (defined by λ) of Loss_A (Fig. 2b). Update of the loss function is expected to have an impact on the training (and potentially on testing) performance of NN “B”. Such informed NN “B” is the simplest case of TINN. Let us consider a more complex taxonomy (Fig. 3a). Here we can see that some classes of the lowest Level C belong to the intersection of some classes from the higher Level B so that, e.g.: … :CLASS_Ci rdfs:subClassOf :CLASS_B1j ; rdfs:subClassOf :CLASS_B2k . :CLASS_B1j rdfs:subClassOf :CLASS_A1s . :CLASS_B2k rdfs:subClassOf :CLASS_A2t . :CLASS_A1s rdfs:subClassOf :DOMAIN1 . :CLASS_A2t rdfs:subClassOf :DOMAIN2 . … Therefore, for the class CLASS_Ci, we have a multiple inheritance case because it happens to be at the intersection of two of taxonomy branches (one with the root from DOMAIN1 and another one from DOMAIN2). This means that, if you apply the same TINN logic as above for the potential NN, we have two “channels to be additionally informed”. In Fig. 3b, we may see how the NN “C”, which is trained to classify instances at the lowest Layer C, may benefit from the additional loss information from the classifiers NN “B1” and NN “B2” operating at the Level B, and even deeper – from the classifiers NN “A1” and NN “A2” operating at the Level A of the taxonomy. If, for example, during backpropagation training, the current training sample has label CLASS_Ci and, additionally (due to taxonomy), we know that it also has labels CLASS_B1j; CLASS_B2k; CLASS_A1s; and CLASS_A2t, then the error (loss) Loss_C made (after processing this training sample) by the target classifier NN “C” can be updated with the losses (Loss_B1, Loss_B2, Loss_A1, and Loss_A2) from the higher layers’ classifiers NNs “B1”, “B2”, “A1”, and “A2” as follows: 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿 = 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐶𝐶+λ1 ∙ (𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵1 +𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵2) + λ2 ∙ (𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐴𝐴1 +𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐴𝐴2). (1) Formula (1) is derived by recursively applying the basic TINNs’ logic from the previous example (across all the taxonomy layers) as follows: 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿 = 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐶𝐶+ λ𝐵𝐵∙𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵1 + λ𝐵𝐵∙𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵2 =𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐶𝐶+ λ𝐵𝐵∙(𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵1 + 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵2)= =𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐶𝐶+ λ𝐵𝐵∙[(𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵1 + λ𝐴𝐴∙𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐴𝐴1)+(𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵2 + λ𝐴𝐴∙𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐴𝐴2)]= =𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐶𝐶+ λ𝐵𝐵∙[(𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵1 +𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵2) + λ𝐴𝐴∙ (𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐴𝐴1 +𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐴𝐴2)]= =𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐶𝐶+ λ𝐵𝐵∙ (𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵1 + 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵2) + λ𝐵𝐵∙ λ𝐴𝐴∙ (𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐴𝐴1 +𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐴𝐴2), … which after substitutes λ1 ← λ𝐵𝐵 and λ2 ← λ𝐵𝐵∙ λ𝐴𝐴 gives us formula (1). One can see that, in such and similar multiple inheritance cases, the losses coming from the same layer of the taxonomy are summed up and then each sum is taxed with the appropriate coefficient (different for different layers). 4. A Couple of Motivating Examples Consider the example in Fig. 4. The pictures of black or white squares or circles of different sizes represent the DOMAIN in the example. The final task was to train NN “B” to label any of such instances into one of four classes {BLACK_SQUARE; BLACK_CIRCLE; WHITE_SQUARE; WHITE_CIRCLE}. Using the terminology of taxonomy, we may say that our DOMAIN is a disjoint union of these four classes. Another important taxonomy awareness would be the knowledge that DOMAN, on the one hand, is also a disjoint union of BLACK and WHITE samples, and, on the other hand, DOMAIN is a disjoint union of SQUARE and CIRCLE samples. To make the task a
Vagan Terziyan et al. / Procedia Computer Science 232 (2024) 1388–1399 1393 Vagan Terziyan et al. / Procedia Computer Science 00 (2023) 000–000 5 Assume that, according to the scenario in Fig. 2b, we want to train NN (“B”) to label DOMAIN instances into seven classes {CLASS1.1 – CLASS1.3; CLASS2.1 – CLASS2.4} from Level B of the taxonomy. This could be done in a traditional way by feeding training instances into the network and learning (updating weights of) it by backpropagation until it converge. However, in such a case, we will not benefit from complete information provided by the taxonomy. It is known that an instance of a subclass is also an instance of its superclass. If, e.g., some data sample in our example is labeled with CLASS2.3 (at level B of the taxonomy), then this instance would also have another label, CLASS2 (at Level A of the taxonomy). Let us assume that we synchronously train also the classifier (NN “A”) to be capable of labeling input samples to two classes {CLASS1; CLASS2} from Level A of the taxonomy. Both classifiers (“A” and “B”) will address any training input sample with its own probability distribution (among output labels) and, therefore, error (loss). Therefore, when (during training) NN “B” gets an input sample with, e.g., the true label CLASS2.3 (explicit) and, therefore, with the label CLASS2 (implicit), then the error (Loss_B) made by NN “B” (regarding CLASS2.3) could be updated if to get also the error (Loss_A) from NN “A” regarding the same sample and its true label CLASS2. We have here the possibility to train NN “B” in the context of being “informed” on the outputs from NN “A” operating on a higher level. A modified loss function in this case would contain actual Loss_B plus part (defined by λ) of Loss_A (Fig. 2b). Update of the loss function is expected to have an impact on the training (and potentially on testing) performance of NN “B”. Such informed NN “B” is the simplest case of TINN. Let us consider a more complex taxonomy (Fig. 3a). Here we can see that some classes of the lowest Level C belong to the intersection of some classes from the higher Level B so that, e.g.: … :CLASS_Ci rdfs:subClassOf :CLASS_B1j ; rdfs:subClassOf :CLASS_B2k . :CLASS_B1j rdfs:subClassOf :CLASS_A1s . :CLASS_B2k rdfs:subClassOf :CLASS_A2t . :CLASS_A1s rdfs:subClassOf :DOMAIN1 . :CLASS_A2t rdfs:subClassOf :DOMAIN2 . … Therefore, for the class CLASS_Ci, we have a multiple inheritance case because it happens to be at the intersection of two of taxonomy branches (one with the root from DOMAIN1 and another one from DOMAIN2). This means that, if you apply the same TINN logic as above for the potential NN, we have two “channels to be additionally informed”. In Fig. 3b, we may see how the NN “C”, which is trained to classify instances at the lowest Layer C, may benefit from the additional loss information from the classifiers NN “B1” and NN “B2” operating at the Level B, and even deeper – from the classifiers NN “A1” and NN “A2” operating at the Level A of the taxonomy. If, for example, during backpropagation training, the current training sample has label CLASS_Ci and, additionally (due to taxonomy), we know that it also has labels CLASS_B1j; CLASS_B2k; CLASS_A1s; and CLASS_A2t, then the error (loss) Loss_C made (after processing this training sample) by the target classifier NN “C” can be updated with the losses (Loss_B1, Loss_B2, Loss_A1, and Loss_A2) from the higher layers’ classifiers NNs “B1”, “B2”, “A1”, and “A2” as follows: 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿 = 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐶𝐶+λ1 ∙ (𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵1 +𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵2) + λ2 ∙ (𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐴𝐴1 +𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐴𝐴2). (1) Formula (1) is derived by recursively applying the basic TINNs’ logic from the previous example (across all the taxonomy layers) as follows: 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿 = 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐶𝐶+ λ𝐵𝐵∙𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵1 + λ𝐵𝐵∙𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵2 =𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐶𝐶+ λ𝐵𝐵∙(𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵1 + 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵2)= =𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐶𝐶+ λ𝐵𝐵∙[(𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵1 + λ𝐴𝐴∙𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐴𝐴1)+(𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵2 + λ𝐴𝐴∙𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐴𝐴2)]= =𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐶𝐶+ λ𝐵𝐵∙[(𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵1 +𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵2) + λ𝐴𝐴∙ (𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐴𝐴1 +𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐴𝐴2)]= =𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐶𝐶+ λ𝐵𝐵∙ (𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵1 + 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐵𝐵2) + λ𝐵𝐵∙ λ𝐴𝐴∙ (𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐴𝐴1 +𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐴𝐴2), … which after substitutes λ1 ← λ𝐵𝐵 and λ2 ← λ𝐵𝐵∙ λ𝐴𝐴 gives us formula (1). One can see that, in such and similar multiple inheritance cases, the losses coming from the same layer of the taxonomy are summed up and then each sum is taxed with the appropriate coefficient (different for different layers). 4. A Couple of Motivating Examples Consider the example in Fig. 4. The pictures of black or white squares or circles of different sizes represent the DOMAIN in the example. The final task was to train NN “B” to label any of such instances into one of four classes {BLACK_SQUARE; BLACK_CIRCLE; WHITE_SQUARE; WHITE_CIRCLE}. Using the terminology of taxonomy, we may say that our DOMAIN is a disjoint union of these four classes. Another important taxonomy awareness would be the knowledge that DOMAN, on the one hand, is also a disjoint union of BLACK and WHITE samples, and, on the other hand, DOMAIN is a disjoint union of SQUARE and CIRCLE samples. To make the task a 6 Vagan Terziyan et al. / Procedia Computer Science 00 (2023) 000–000 bit more challenging for a convolutional NN we added some noise to all the images in the dataset. The classifier after training gave us 91.3% accuracy. We repeated the experiment from scratch, but now we try to train NN “B” as a TINN. For that, we simultaneously also train two other classifiers: NN “A1” (to label samples to two classes, BLACK and WHITE) and NN “A2” (to label samples to two classes, SQUARE and CIRCLE). Therefore, it was possible to train NN “B” with additional loss information coming from NN “A1” and NN “A2”. This TINN’s trick has surprisingly improved the accuracy of the NN “B” classifier from 91.3% (without taxonomy awareness) to 93.7 (with taxonomy awareness). Fig. 3. The training schema of the TINN originated from taxonomy (with multiple inheritance) awareness is illustrated: (a) example of a taxonomy (class-subclass hierarchy of classes in the taxonomy); (b) the NN classifier C, which is currently being trained to label data samples into 3 classes (lower level of the taxonomy) benefits from the NN classifiers B1 and B2 trained to label the same instances into two different groups of 3 classes each of the upper level of the taxonomy. In addition, the classifiers A1 and A2 from the higher level contribute indirectly to classifier C. The construction of overall loss (LOSS) for C is illustrated.
1394 Vagan Terziyan et al. / Procedia Computer Science 232 (2024) 1388–1399 Vagan Terziyan et al. / Procedia Computer Science 00 (2023) 000–000 7 Fig. 4. The experiment of building NN classifier “B” for the DOMAIN, which is a disjoint union of four classes {BLACK_SQUARE; BLACK_CIRCLE; WHITE_SQUARE; WHITE_CIRCLE}. Additional knowledge, that DOMAN is also a disjoint union of BLACK and WHITE samples and a disjoint union of SQUARE and CIRCLE samples, makes it possible to use TINN architecture for the target classifier “B”. The loss of “B” during training is updated with the loss coming from two other synchronously trained classifiers, “A1” (BLACK vs. WHITE) and “A2” (SQUARE vs. CIRCLE), which improves the performance of “B” to correctly classify the DOMAIN samples into four classes. The influence of taxonomy awareness on the accuracy of the convolutional NN classifier in the example is understandable. The features (color, shape), which are the basic ones for the class-subclass hierarchy in the taxonomy, are actually visually apparent. Therefore, to further check the concept of TINNs, we will try to construct the next example in a more provocative way so that the actual features behind the taxonomy are not explicitly visible in the pictures (training samples). We take MNIST (handwritten digits; http://yann.lecun.com/exdb/mnist/) image dataset and we split it to two disjoint unions of subclasses: (a) EVEN and ODD digits; and (b) “< 5” and “> 4” digits (see Fig.5). The features of being even or odd, as well as being “> 4” or “< 5” do not have explicit visual appearance in the pictures of the digits. Therefore, we expected TINN to fail to improve NN’s performance in this case.
Vagan Terziyan et al. / Procedia Computer Science 232 (2024) 1388–1399 1395 Vagan Terziyan et al. / Procedia Computer Science 00 (2023) 000–000 7 Fig. 4. The experiment of building NN classifier “B” for the DOMAIN, which is a disjoint union of four classes {BLACK_SQUARE; BLACK_CIRCLE; WHITE_SQUARE; WHITE_CIRCLE}. Additional knowledge, that DOMAN is also a disjoint union of BLACK and WHITE samples and a disjoint union of SQUARE and CIRCLE samples, makes it possible to use TINN architecture for the target classifier “B”. The loss of “B” during training is updated with the loss coming from two other synchronously trained classifiers, “A1” (BLACK vs. WHITE) and “A2” (SQUARE vs. CIRCLE), which improves the performance of “B” to correctly classify the DOMAIN samples into four classes. The influence of taxonomy awareness on the accuracy of the convolutional NN classifier in the example is understandable. The features (color, shape), which are the basic ones for the class-subclass hierarchy in the taxonomy, are actually visually apparent. Therefore, to further check the concept of TINNs, we will try to construct the next example in a more provocative way so that the actual features behind the taxonomy are not explicitly visible in the pictures (training samples). We take MNIST (handwritten digits; http://yann.lecun.com/exdb/mnist/) image dataset and we split it to two disjoint unions of subclasses: (a) EVEN and ODD digits; and (b) “< 5” and “> 4” digits (see Fig.5). The features of being even or odd, as well as being “> 4” or “< 5” do not have explicit visual appearance in the pictures of the digits. Therefore, we expected TINN to fail to improve NN’s performance in this case. 8 Vagan Terziyan et al. / Procedia Computer Science 00 (2023) 000–000 Fig. 5. The unusual taxonomy awareness effect is explored on top of the MNIST dataset. The target convolutional NN classifier “B” is trained synchronously with the two other ones: “A1”, which distinguishes between odd and even digits, and “A2”, which distinguishes between “<5” and “>4” digits. For each portion of input training samples, the loss of “B” during backpropagation training is updated also with the corresponding losses from “A1” and “A2”, and such a TINN trick has surprisingly improved the performance of “B”.