License: arXiv.org perpetual non-exclusive license
arXiv:2402.14726v1 [cs.LG] 22 Feb 2024

Incorporating Expert Rules into Neural Networks in the Framework of Concept-Based Learning

Andrei V. Konstantinov and Lev V. Utkin
Higher School of Artificial Intelligence Technologies
Peter the Great St.Petersburg Polytechnic University
St.Petersburg, Russia
e-mail: [email protected], [email protected]
Abstract

A problem of incorporating the expert rules into machine learning models for extending the concept-based learning is formulated in the paper. It is proposed how to combine logical rules and neural networks predicting the concept probabilities. The first idea behind the combination is to form constraints for a joint probability distribution over all combinations of concept values to satisfy the expert rules. The second idea is to represent a feasible set of probability distributions in the form of a convex polytope and to use its vertices or faces. We provide several approaches for solving the stated problem and for training neural networks which guarantee that the output probabilities of concepts would not violate the expert rules. The solution of the problem can be viewed as a way for combining the inductive and deductive learning. Expert rules are used in a broader sense when any logical function that connects concepts and class labels or just concepts with each other can be regarded as a rule. This feature significantly expands the class of the proposed results. Numerical examples illustrate the approaches. The code of proposed algorithms is publicly available.

Keywords: concept-based learning, expert rules, neural networks, classification, logical function, inductive and deductive learning.

1 Introduction

Concept-based learning (CBL) is a well-established approach to express predictions of a machine learning model in terms of high-level concepts derived from raw features instead of in terms of the raw features themselves [1], i.e. unlike using a pixel-based level, CBL provides a higher level of connection between the image and the decision using concepts. The understanding of the decision becomes straightforward once the interpretation of each concept is determined [2]. High-level concepts can be interpreted as additional expert knowledge. Therefore, CBL aims to integrate expert knowledge or human-like reasoning into machine learning models. In the context of machine learning, incorporating high-level concepts into the learning process may significantly improve the efficiency and accuracy of models. Moreover, high-level concepts may improve the explainability of the machine learning model outputs because they are intuitive to users [3, 4]. On the one hand, concepts can be viewed as high-level features of an object, for example, a color of a bird in a picture. On the other hand, the same concepts can be regarded as complex classification labels. The training of the concept model often requires the concept annotations in the form of binary labels, i.e. concept is “present” or “not present”, for each defined concept and image. However, concepts can be represented in other forms, for example, by means of indices assigned to elements of a concept description set. It should be noted that, indices can always be converted into binary concepts.

Many recent CBL approaches consider human-specified concepts as an intermediate step to derive the final predictions. Concept Bottleneck Models (CBMs) [5] and Concept Embedding Models (CEMs) [6] are CBL models that implement these approaches. According to the CBM approach, the CBL model provides the concept prediction in the middle of the decision-making process, i.e. it explicitly predicts the concept labels from images and then predicts the final label based on the concept label predictions. The classifier deriving the final label has access only to the concept representation, and the decision is strongly tied to the concepts [2]. At that, the training procedure can be implemented in an independent way when the concept labels are trained independently on the final label. Another way for learning is to train in an end-to-end manner.

In contrast to CBLs, we propose quite different models which can roughly be called concept-based models because they use concepts for training like CBLs. However, the main goal of the proposed model is to combine the inductive learning tools (neural networks) with the knowledge-based expert rules of the form “IF …, THEN …”, which are elicited from experts and constructed by means of concepts. For example, the rule from the lung cancer diagnostics can look like “IF Finding is the mass, Contour is spicules, Inclusion is the air cavity, THEN a Diagnosis is the squamous cells carcinoma”. Here concepts are shown in Bold, the concept values are shown in Italic. Another illustrative example is taken from the Bird identification dataset (CUB) [7]: “IF the Head is red, the Back color is black, the Breast color is white, the Crown color is red, the Wing color is white, the Bill shape may be dagger OR all-purpose, THEN the Bird is a red-headed woodpecker”. In the context of medicine, a doctor often diagnoses a disease based on certain rules from a medical handbook. Using such rules is the basis of a doctor’s work. Similar examples of using expert rules can be found in various applied fields, not just in medicine. Therefore, it is important to incorporate the expert rules into machine learning models.

It is assumed that we have knowledge how final labels (consequents) of instances depend on values of concepts (antecedents) from a set of knowledge-based expert rules. Moreover, we have a partially labeled training set consisting of images with some concept labels and with some targets which will be called as final concepts. The question is how to construct and to train a neural network which deals simultaneously with the concept-based dataset and the knowledge-based rules to provide accurate predictions and to explain the predictions by using concepts. In order to answer this question, we propose two approaches to taking into account the expert rules.

First, we represent the knowledge-based expert rules in the form of logical functions consisting of the disjunction and conjunction operations of indicator functions corresponding to values of concepts. At that, the target value is also represented as a concept. By having the logical functions, we can write constraints for a joint probability distribution over all combinations of concept values to satisfy the expert rules. This allows us to construct and to train a neural network which guarantees that the output probabilities of concepts would not violate the expert rules. We formulate the corresponding feasible set of probability distributions in the form of a convex polytope and analytically find its vertices. By means of the vertices, a point inside the polytope can be constructed that determines marginal probability distributions of concepts. Additionally, we can define the same polytope in H-representation by setting its faces. It is useful because the number of faces can be significantly smaller than the number of vertices. These two ways to define the convex polytope form a base for develo** four approaches for constructing neural networks incorporating the expert rules.

An important peculiarity of the proposed models is that the expert rules compensate the incomplete concept labeling of instances in datasets whereas existing concept-based models may lead to overfitting when many images have incomplete concept description. Moreover, the expert rules allow us to compensate a partial availability of targets in the training set.

In sum, we try to incorporate the knowledge-based expert rules into a neural network to improve predictions and their interpretation. The knowledge of expert rules changes probabilities of concepts as well as predictions corresponding to new instances which are classified and explained. The proposed models can be viewed as a way for combining the inductive and deductive learning.

It is also important to point out that the term “expert rules” is used in the proposed models not only to represent the standard “IF …,THEN …” rule, but in a broader sense. Any logical function that connects concepts and class labels or just concepts with each other can be regarded as a rule. This feature significantly expands the class of the proposed results.

The code of proposed algorithms is available in https://github.com/andruekonst/ecbl.

2 Related work

Concept-based learning models. Many models taking into account various aspects of CBL have been developed by following the works [3, 4]. In particular, the concept attribution approach to tabular learning by providing an idea on how to define concepts over tabular data was proposed in [8]. An algorithm for learning visual concepts directly from images, using probabilistic predictions generated by visual classifiers as the input to a Bayesian generalization model was proposed in [9]. A novel concept-based explanation framework named Prototypical Concept-based Explanation is proposed in [10]. An idea of the framework is that it provides differences and similarities to the expected model behavior via prototypes which are representative predictions summarizing the model behavior in condensed fashion. An analysis of correlations between concepts and methods beyond the test accuracy for evaluating concept-based models, with regard to whether a concept has truly been learned by the model were presented in [11].

Lage et al. [1] claim that many CBL models define concepts which are not inherently interpretable. To overcome this limitation, the authors proposed a CBL model where concepts are fully transparent, thus enabling users to validate whether mental and machine models are aligned. An important peculiarity of the model is that the corresponding learning process incorporates user feedback directly when learning the concept definitions: rather than labeling data, users mark whether specific feature dimensions are relevant to a concept [1]. To relax an assumption that humans are oracles who are always certain and correct in decision making Collins et al. [12] study how existing concept-based models deal with uncertain interventions from humans. An attempt to suppress false positive explanations by providing explanations based on statistically significant concepts was carried out in [13] where the authors guarantee the reliability of the concept-based explanation by controlling an introduced false discovery rate of the selected concepts.

Applications of the concept-based explanation in medicine can be found in [14, 15, 16, 17, 18]. The use of CBL models for time-series data are presented in [19, 20]. Taking into account the anomaly detection problem, a framework for learning a set of concepts that satisfy properties of the out-of-distribution detection and help to explain the out-of-distribution predictions was presented in [21]. In the same work, new metrics for assessing the effectiveness of a particular set of concepts for explaining the out-of-distribution detection detectors were introduced. The concept-based model for anomaly detection was also considered in [22].

Promises and pitfalls of black-box concept learning models [23]. A review of recent approaches for explaining concepts in neural networks was provided in [24].

Concept bottleneck models. Following [5], many extensions of the CBM model have been proposed. A part of the CBL models belongs to post-hoc models. These models analyze the whole model only after it has finished the training process. The post-hoc CBMs were introduced in [25]. These models convert any pre-trained model into a concept bottleneck model. This conversion can be done by using the concept activation vectors (CAVs) [3] in a special way. A Cooperative-CBM (coop-CBM) model was proposed in [26]. The model aims at addressing the performance gap between CBMs and standard black-box models. It uses an auxiliary loss that facilitates the learning of a rich and expressive concept representation. In order to take into account the ambiguity in the concept predictions, a probabilistic CBM was proposed in [27], which exploits probabilistic embeddings in the concept embedding space and reflects uncertainty in the concept predictions. The model maps an image to the concept embeddings with probabilistic distributions which model concept uncertainties.

According to [6], one of the drawbacks of many CBM models is that they unable to find optimal compromises between high task accuracy, robust concept-based explanations, and effective interventions on concepts. In order to overcome this drawback, concept embedding models were introduced in [6]. The models can be viewed as a family of CBMs that represents each concept as a supervised vector, i.e. the models learn two embeddings per concept, one for when it is active, and another when it is inactive. Following the concept embedding model [6], the concept bottleneck generative models were introduced in [28], where a concept bottleneck layer is constrained to encode human-understandable features. Raman et al. [29] studied whether CBMs correctly capture the degree of conditional independence across concepts when the concepts are localized spatially and semantically. Margeloiu et al. [30] demonstrated that concepts may not correspond to anything semantically meaningful in input space. A simple procedure allowing to perform concept-based instance-specific interventions on an already trained black-box neural network is proposed in [31].

A novel image representation learning method, called the Concept-based Explainable Image Representation Learning and adept at harnessing human concepts to bolster the semantic richness of image representations was introduced in [32]. A case of implicit knowledge corresponding to the unsupervised (unlabeled) concepts was studied in [33] where the authors propose to adopt self-explaining neural networks to obtain the unsupervised concepts. These networks are composed of an encoder-decoder architecture and a parametrizer estimating weights of each concept. Energy-based CBMs which use a set of neural networks to define the joint energy of candidate (input, concept, class) tuples are introduced in [34].

CBMs were extended in [35] to interactive prediction settings such that the model can query a human collaborator for the label to some concepts. In order to improve the final prediction, an interaction policy was developed in [35] that chooses which concepts should be requested for labeling. An approach to modify CBMs for images segmentation, objects fine classification and tracking was developed in [36]. Two causes of performance disparity between soft (inputs to a label predictor are the concept probabilities) and hard (the label predictor only accepts binary concepts) CBMs were proposed in [37]. They allow hard CBMs to match the predictive performance of soft CBMs without compromising their resilience to leakage. A similar task was solved in [38]. Marconato et al. [39] provided a definition of interpretability in terms of alignment between the representation of a model and an underlying data generation process, and introduced GlanceNets, a new CBM that exploits techniques from disentangled representation learning and open-set recognition to achieve alignment, thus improving the interpretability of the learned concepts.

Drawing inspiration from the CLIP model [40], a foundation model that establishes a shared embedding space for both text and images, the CLIP-based CBMs are proposed in [41].

3 Background

The concept-based classification is a task to construct a potentially black-box classifier and to explain the constructed classifier’s decision process through human-interpretable concepts [13].

We are given a set of inputs 𝐱isubscript𝐱𝑖absent\mathbf{x}_{i}\inbold_x start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ∈ 𝒳d𝒳superscript𝑑\mathcal{X}\subset\mathbb{R}^{d}caligraphic_X ⊂ blackboard_R start_POSTSUPERSCRIPT italic_d end_POSTSUPERSCRIPT and the corresponding targets yi𝒴={1,2,,K}subscript𝑦𝑖𝒴12𝐾y_{i}\in\mathcal{Y}=\{1,2,...,K\}italic_y start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ∈ caligraphic_Y = { 1 , 2 , … , italic_K }. Suppose we are also given a set of m𝑚mitalic_m pre-specified concepts 𝐜i=(ci(1),,ci(m))𝒞subscript𝐜𝑖superscriptsubscript𝑐𝑖1superscriptsubscript𝑐𝑖𝑚𝒞\mathbf{c}_{i}=(c_{i}^{(1)},...,c_{i}^{(m)})\in\mathcal{C}bold_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = ( italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT , … , italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_m ) end_POSTSUPERSCRIPT ) ∈ caligraphic_C such that the training set comprises (𝐱i,yi,𝐜i)subscript𝐱𝑖subscript𝑦𝑖subscript𝐜𝑖(\mathbf{x}_{i},y_{i},\mathbf{c}_{i})( bold_x start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT , italic_y start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT , bold_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ), i=1,,n𝑖1𝑛i=1,...,nitalic_i = 1 , … , italic_n. Typically, concepts can be represented as a binary m𝑚mitalic_m-length vector 𝐜isubscript𝐜𝑖\mathbf{c}_{i}bold_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT where its j𝑗jitalic_j-th element ci(j)superscriptsubscript𝑐𝑖𝑗c_{i}^{(j)}italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPTdenotes whether the j𝑗jitalic_j-th concept is present or not in the input 𝐱isubscript𝐱𝑖\mathbf{x}_{i}bold_x start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT.

Generally, the CBL model aims to find how targets depend on concepts and inputs, i.e., to find a function h:(𝒳,𝒞)𝒴:𝒳𝒞𝒴h:(\mathcal{X},\mathcal{C})\rightarrow\mathcal{Y}italic_h : ( caligraphic_X , caligraphic_C ) → caligraphic_Y. However, the CBL model can also be used to interpret how predictions depend on concepts corresponding to inputs. In order to solve this task, CBMs have been developed, which learn two map**s, one from the input to the concepts g::𝑔absentg:italic_g : 𝒳𝒞𝒳𝒞\mathcal{X}\rightarrow\mathcal{C}caligraphic_X → caligraphic_C, and another from the concepts to the outputs f:𝒞𝒴:𝑓𝒞𝒴f:\mathcal{C}\rightarrow\mathcal{Y}italic_f : caligraphic_C → caligraphic_Y. In this case, the CBM prediction for a new input instance 𝐱𝐱\mathbf{x}bold_x is defined as y=f(g(𝐱))𝑦𝑓𝑔𝐱y=f(g(\mathbf{x}))italic_y = italic_f ( italic_g ( bold_x ) ).

There are different problem settings in the framework of CBL models [34]:

Prediction: Given the input 𝐱𝐱\mathbf{x}bold_x, the goal is to predict the class label y𝑦yitalic_y and the associated concepts 𝐜𝐜\mathbf{c}bold_c to interpret the predicted class label, that is to find the probability Pr(𝐜,y𝐱)Pr𝐜conditional𝑦𝐱\mathop{\rm Pr}(\mathbf{c},y\mid\mathbf{x})roman_Pr ( bold_c , italic_y ∣ bold_x ). Note that CBMs decompose Pr(𝐜,y𝐱)Pr𝐜conditional𝑦𝐱\mathop{\rm Pr}(\mathbf{c},y\mid\mathbf{x})roman_Pr ( bold_c , italic_y ∣ bold_x ) to predict Pr(𝐜𝐱)Prconditional𝐜𝐱\mathop{\rm Pr}(\mathbf{c\mid x})roman_Pr ( bold_c ∣ bold_x ) and then Pr(y𝐱)Prconditional𝑦𝐱\mathop{\rm Pr}(y\mid\mathbf{x})roman_Pr ( italic_y ∣ bold_x ).

Concept Correction/Intervention: Given the input 𝐱𝐱\mathbf{x}bold_x and a corrected concept c(k)superscript𝑐𝑘c^{(k)}italic_c start_POSTSUPERSCRIPT ( italic_k ) end_POSTSUPERSCRIPT, predict all the other concepts c(i)superscript𝑐𝑖c^{(i)}italic_c start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT, i=1,,m,𝑖1𝑚i=1,...,m,italic_i = 1 , … , italic_m , ik𝑖𝑘i\neq kitalic_i ≠ italic_k.

Conditional Interpretations: Given an image with class label y𝑦yitalic_y and concept c(j)superscript𝑐𝑗c^{(j)}italic_c start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPT , what is the probability that the model correctly predicts concept c(k)superscript𝑐𝑘c^{(k)}italic_c start_POSTSUPERSCRIPT ( italic_k ) end_POSTSUPERSCRIPT.

We propose a different problem setting which uses concepts to incorporate the available expert rules of the form: “IF concepts have certain values, THEN the target is equal to a certain class”, into neural networks.

4 Expert rules and concepts

4.1 Problem statement

In contrast to the above definition of concepts as binary variables, which is conventional in many models, we assume that each concept c(i)superscript𝑐𝑖c^{(i)}italic_c start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT can take one of nisubscript𝑛𝑖n_{i}italic_n start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT values denoted as 𝒞(i)={1,,ni}superscript𝒞𝑖1subscript𝑛𝑖\mathcal{C}^{(i)}=\{1,...,n_{i}\}caligraphic_C start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT = { 1 , … , italic_n start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT }, i{0,,m}𝑖0𝑚i\in\{0,\dots,m\}italic_i ∈ { 0 , … , italic_m }. We call 𝒞(i)superscript𝒞𝑖\mathcal{C}^{(i)}caligraphic_C start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT the i𝑖iitalic_i-th concept outcome set. The concept vector is 𝐜=(c(0),c(1),,c(m))𝒞×𝐜superscript𝑐0superscript𝑐1superscript𝑐𝑚superscript𝒞\mathbf{c}=(c^{(0)},c^{(1)},...,c^{(m)})\in\mathcal{C}^{\times}bold_c = ( italic_c start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT , italic_c start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT , … , italic_c start_POSTSUPERSCRIPT ( italic_m ) end_POSTSUPERSCRIPT ) ∈ caligraphic_C start_POSTSUPERSCRIPT × end_POSTSUPERSCRIPT, where 𝒞×superscript𝒞\mathcal{C}^{\times}caligraphic_C start_POSTSUPERSCRIPT × end_POSTSUPERSCRIPT is the concept domain produced by the Cartesian product 𝒞×=𝒞(0)××𝒞(m)superscript𝒞superscript𝒞0superscript𝒞𝑚\mathcal{C}^{\times}=\mathcal{C}^{(0)}\times\dots\times\mathcal{C}^{(m)}caligraphic_C start_POSTSUPERSCRIPT × end_POSTSUPERSCRIPT = caligraphic_C start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT × ⋯ × caligraphic_C start_POSTSUPERSCRIPT ( italic_m ) end_POSTSUPERSCRIPT. We consider the concept c(0)superscript𝑐0c^{(0)}italic_c start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT as a special concept corresponding to the target variable y𝑦yitalic_y.

Let us introduce the logical literal hi(j)(𝐜)=𝕀superscriptsubscript𝑖𝑗𝐜𝕀h_{i}^{(j)}(\mathbf{c})=\mathbb{I}italic_h start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPT ( bold_c ) = blackboard_I [c(j)=i]delimited-[]superscript𝑐𝑗𝑖[c^{(j)}=i][ italic_c start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPT = italic_i ] which takes the value 1111, if the concept c(j)superscript𝑐𝑗c^{(j)}italic_c start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPT has the value i𝑖iitalic_i. A set of expert rules is formulated as a logical expression g(𝐜)𝑔𝐜g(\mathbf{c})italic_g ( bold_c ) over literals hi(j)(𝐜)superscriptsubscript𝑖𝑗𝐜h_{i}^{(j)}(\mathbf{c})italic_h start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPT ( bold_c ). Formally a set of expert rules may be represented as a map** g:𝒞×{0,1}:𝑔maps-tosuperscript𝒞01g:\mathcal{C}^{\times}\mapsto\{0,1\}italic_g : caligraphic_C start_POSTSUPERSCRIPT × end_POSTSUPERSCRIPT ↦ { 0 , 1 }, where 00 means FALSE, and 1111 means TRUE.

For example, the rule “IF c(1)=3superscript𝑐13c^{(1)}=3italic_c start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT = 3 THEN c(2)=1superscript𝑐21c^{(2)}=1italic_c start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT = 1” is equivalent to the function:

g=(c(1)=3)(c(2)=1)=h3(1)h1(2)=(¬h3(1))h1(2),𝑔superscript𝑐13superscript𝑐21superscriptsubscript31superscriptsubscript12superscriptsubscript31superscriptsubscript12g=(c^{(1)}=3)\rightarrow(c^{(2)}=1)=h_{3}^{(1)}\rightarrow h_{1}^{(2)}=(\lnot h% _{3}^{(1)})\vee h_{1}^{(2)},italic_g = ( italic_c start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT = 3 ) → ( italic_c start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT = 1 ) = italic_h start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT → italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT = ( ¬ italic_h start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ) ∨ italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT , (1)

where \rightarrow is implication and ¬\lnot¬ is negation and the argument 𝐜𝐜\mathbf{c}bold_c is omitted for short. A literal negation is equivalent to disjunction of the rest outcomes of the same concept. For example, ¬h3(1)h1(1)h2(1)superscriptsubscript31superscriptsubscript11superscriptsubscript21\lnot h_{3}^{(1)}\equiv h_{1}^{(1)}\vee h_{2}^{(1)}¬ italic_h start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ≡ italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ∨ italic_h start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT, when 𝒞(1)={1,2,3}superscript𝒞1123\mathcal{C}^{(1)}=\{1,2,3\}caligraphic_C start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT = { 1 , 2 , 3 }.

Let X𝑋Xitalic_X be a random vector taking values from 𝒳a𝒳superscript𝑎\mathcal{X}\subset\mathbb{R}^{a}caligraphic_X ⊂ blackboard_R start_POSTSUPERSCRIPT italic_a end_POSTSUPERSCRIPT. We introduce C(0),,C(m)superscript𝐶0superscript𝐶𝑚C^{(0)},\dots,C^{(m)}italic_C start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT , … , italic_C start_POSTSUPERSCRIPT ( italic_m ) end_POSTSUPERSCRIPT as discrete random variables for the concepts, taking values from 𝒞(0),,𝒞(m)superscript𝒞0superscript𝒞𝑚\mathcal{C}^{(0)},\dots,\mathcal{C}^{(m)}caligraphic_C start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT , … , caligraphic_C start_POSTSUPERSCRIPT ( italic_m ) end_POSTSUPERSCRIPT, respectively. The concept random vector is C=(C(0),C(1),,C(m))𝐶superscript𝐶0superscript𝐶1superscript𝐶𝑚C=(C^{(0)},C^{(1)},...,C^{(m)})italic_C = ( italic_C start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT , italic_C start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT , … , italic_C start_POSTSUPERSCRIPT ( italic_m ) end_POSTSUPERSCRIPT ).

The task is to estimate marginal concept probabilities Pr(C(i)=jX=𝐱)Prsuperscript𝐶𝑖conditional𝑗𝑋𝐱\mathop{\rm Pr}(C^{(i)}=j\mid X=\mathbf{x})roman_Pr ( italic_C start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT = italic_j ∣ italic_X = bold_x ) conditioned on an input object 𝐱𝐱\mathbf{x}bold_x (for example, image) for the i𝑖iitalic_i-th concept and outcome j𝑗jitalic_j under condition of the expert rules.

For brevity, we denote the marginal concept probabilities as vectors:

p(i)=(Pr(C(i)=1𝐱),,Pr(C(i)=ni𝐱)),superscript𝑝𝑖Prsuperscript𝐶𝑖conditional1𝐱Prsuperscript𝐶𝑖conditionalsubscript𝑛𝑖𝐱p^{(i)}=\left(\mathop{\rm Pr}(C^{(i)}=1\mid\mathbf{x}),\dots,\mathop{\rm Pr}(C% ^{(i)}=n_{i}\mid\mathbf{x})\right),italic_p start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT = ( roman_Pr ( italic_C start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT = 1 ∣ bold_x ) , … , roman_Pr ( italic_C start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT = italic_n start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ∣ bold_x ) ) , (2)

which is standard for classification. Since the marginal probabilities are not independent because of the expert rules, we cannot estimate p(i)superscript𝑝𝑖p^{(i)}italic_p start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT separately. Instead, the goal is to find the concatenated vector of marginal concept probabilities:

p¯=[(p(0))T;,(p(m))T]T.¯𝑝superscriptsuperscriptsuperscript𝑝0𝑇superscriptsuperscript𝑝𝑚𝑇𝑇\overline{p}=[(p^{(0)})^{T};\dots,(p^{(m)})^{T}]^{T}.over¯ start_ARG italic_p end_ARG = [ ( italic_p start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT ) start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT ; … , ( italic_p start_POSTSUPERSCRIPT ( italic_m ) end_POSTSUPERSCRIPT ) start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT ] start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT . (3)

4.2 Joint distribution

First, we consider the conditional joint probability distribution over concepts: Pr(C=𝐜|X=𝐱)Pr𝐶conditional𝐜𝑋𝐱\mathop{\rm Pr}(C=\mathbf{c}|X=\mathbf{x})roman_Pr ( italic_C = bold_c | italic_X = bold_x ). Since all concept random variables are discrete with finite outcome sets, all possible vectors 𝐜𝐜\mathbf{c}bold_c can be enumerated. The total number of distinct concept vectors is t=i=0mni𝑡superscriptsubscriptproduct𝑖0𝑚subscript𝑛𝑖t=\prod_{i=0}^{m}n_{i}italic_t = ∏ start_POSTSUBSCRIPT italic_i = 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_m end_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT. Let us introduce a function :𝒞×{1,,t}:maps-tosuperscript𝒞1𝑡\mathcal{M}:\mathcal{C}^{\times}\mapsto\{1,\dots,t\}caligraphic_M : caligraphic_C start_POSTSUPERSCRIPT × end_POSTSUPERSCRIPT ↦ { 1 , … , italic_t }, that maps the concept vector to its number, and its inverse function 1superscript1\mathcal{M}^{-1}caligraphic_M start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT that maps the number to the concept vector. We define the joint probability distribution vector π=(π1,,πt)𝜋subscript𝜋1subscript𝜋𝑡\pi=(\pi_{1},\dots,\pi_{t})italic_π = ( italic_π start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_π start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ) as follows:

𝐜𝒞×,π(𝐜)=Pr(C=𝐜|X=𝐱).formulae-sequencefor-all𝐜superscript𝒞subscript𝜋𝐜Pr𝐶conditional𝐜𝑋𝐱\forall\mathbf{c}\in\mathcal{C}^{\times},\ \ \pi_{\mathcal{M}(\mathbf{c})}=% \mathop{\rm Pr}(C=\mathbf{c}|X=\mathbf{x}).∀ bold_c ∈ caligraphic_C start_POSTSUPERSCRIPT × end_POSTSUPERSCRIPT , italic_π start_POSTSUBSCRIPT caligraphic_M ( bold_c ) end_POSTSUBSCRIPT = roman_Pr ( italic_C = bold_c | italic_X = bold_x ) . (4)

4.3 Reduction to a linear constraint

The joint probability distribution is constrained to satisfy the expert rules formulated as g𝑔gitalic_g, therefore:

Pr(g(C)=1)=1.Pr𝑔𝐶11\mathop{\rm Pr}(g(C)=1)=1.roman_Pr ( italic_g ( italic_C ) = 1 ) = 1 . (5)

Let us consider a binary mask of admissible states, a vector u=(u1,,ut){0,1}t𝑢subscript𝑢1subscript𝑢𝑡superscript01𝑡u=(u_{1},\dots,u_{t})\in\{0,1\}^{t}italic_u = ( italic_u start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_u start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ) ∈ { 0 , 1 } start_POSTSUPERSCRIPT italic_t end_POSTSUPERSCRIPT, whose components are equal to 1111 if and only if the rules are satisfied for the corresponding concept vectors:

uk=g(1(k)),k{1,,t}.formulae-sequencesubscript𝑢𝑘𝑔superscript1𝑘𝑘1𝑡u_{k}=g(\mathcal{M}^{-1}(k)),\ \ k\in\{1,...,t\}.italic_u start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT = italic_g ( caligraphic_M start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ( italic_k ) ) , italic_k ∈ { 1 , … , italic_t } . (6)

The constraint on the joint probability distribution (5) can be reformulated as a set of the equality constraints on components of π𝜋\piitalic_π, corresponding to invalid states (that violate the rules):

πk=0,k{i{1,t}g(1(k))=0}.formulae-sequencesubscript𝜋𝑘0𝑘conditional-set𝑖1𝑡𝑔superscript1𝑘0\pi_{k}=0,\ \ k\in\{i\in\{1,...t\}\mid g(\mathcal{M}^{-1}(k))=0\}.italic_π start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT = 0 , italic_k ∈ { italic_i ∈ { 1 , … italic_t } ∣ italic_g ( caligraphic_M start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ( italic_k ) ) = 0 } . (7)

The vector π𝜋\piitalic_π also obeys the following probability distribution constraints:

πΔt,𝜋subscriptΔ𝑡\pi\in\Delta_{t},italic_π ∈ roman_Δ start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT , (8)

so the system (7) can be rewritten in more compact form as one linear equality constraint:

uTπ=1.superscript𝑢𝑇𝜋1u^{T}\pi=1.italic_u start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT italic_π = 1 . (9)

Here ΔtsubscriptΔ𝑡\Delta_{t}roman_Δ start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT is the unit simplex of dimension t𝑡titalic_t.

To construct a feasible solution, a neural network should be able to generate probability distributions matching equality constraint.

For illustrative purposes, we consider a toy example with two classes of birds: a red-headed woodpecker (c(0)=1superscript𝑐01c^{(0)}=1italic_c start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT = 1) and an European green woodpecker (c(0)=2superscript𝑐02c^{(0)}=2italic_c start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT = 2). The corresponding concepts describing the birds are head (c(1)superscript𝑐1c^{(1)}italic_c start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT), bill shape (c(2)superscript𝑐2c^{(2)}italic_c start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT), and wing color (c(3)superscript𝑐3c^{(3)}italic_c start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT). Concept head can take values: red (c(1)=1superscript𝑐11c^{(1)}=1italic_c start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT = 1), green (c(1)=2superscript𝑐12c^{(1)}=2italic_c start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT = 2), concept bill shape can take values: chisel (c(2)=1superscript𝑐21c^{(2)}=1italic_c start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT = 1), dagger (c(2)=2superscript𝑐22c^{(2)}=2italic_c start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT = 2), all-purpose  (c(2)=3superscript𝑐23c^{(2)}=3italic_c start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT = 3). Here m=2𝑚2m=2italic_m = 2, n0=2subscript𝑛02n_{0}=2italic_n start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT = 2, n1=2subscript𝑛12n_{1}=2italic_n start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT = 2, n2=3subscript𝑛23n_{2}=3italic_n start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT = 3. Suppose there is available the following expert rule:

IF 𝐡𝐞𝐚𝐝isredAND bill shapeis𝑑𝑎𝑔𝑔𝑒𝑟 OR all-purpose,THEN 𝐛𝐢𝐫𝐝isred-headed woodpecker,IF 𝐡𝐞𝐚𝐝isredAND bill shapeis𝑑𝑎𝑔𝑔𝑒𝑟 OR all-purpose,THEN 𝐛𝐢𝐫𝐝isred-headed woodpecker,\begin{array}[c]{llll}\text{IF}&\text{ {head}}&\text{is}&\text{\emph{red}}\\ \text{AND}&\text{ {bill shape}}&\text{is}&\text{\emph{dagger} OR \emph{all-purpose},}\\ \text{THEN}&\text{ {bird}}&\text{is}&\text{\emph{red-headed woodpecker},}\end{array}start_ARRAY start_ROW start_CELL IF end_CELL start_CELL bold_head end_CELL start_CELL is end_CELL start_CELL red end_CELL end_ROW start_ROW start_CELL AND end_CELL start_CELL bold_bill bold_shape end_CELL start_CELL is end_CELL start_CELL italic_dagger OR italic_all-purpose , end_CELL end_ROW start_ROW start_CELL THEN end_CELL start_CELL bold_bird end_CELL start_CELL is end_CELL start_CELL italic_red-headed italic_woodpecker , end_CELL end_ROW end_ARRAY (10)

or

IFc(1)=1 AND c(2){2,3},THENc(0)=1.IFsuperscript𝑐11 AND superscript𝑐223THENsuperscript𝑐01.\begin{array}[c]{ll}\text{IF}&c^{(1)}=1\text{ AND }c^{(2)}\in\{2,3\},\\ \text{THEN}&c^{(0)}=1\text{.}\end{array}start_ARRAY start_ROW start_CELL IF end_CELL start_CELL italic_c start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT = 1 AND italic_c start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT ∈ { 2 , 3 } , end_CELL end_ROW start_ROW start_CELL THEN end_CELL start_CELL italic_c start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT = 1 . end_CELL end_ROW end_ARRAY (11)

This rule can be represented as follows:

g(𝐜)𝑔𝐜\displaystyle g(\mathbf{c})italic_g ( bold_c ) =(h1(1)(h2(2)h3(2)))h1(0)absentsuperscriptsubscript11superscriptsubscript22superscriptsubscript32superscriptsubscript10\displaystyle=\left(h_{1}^{(1)}\wedge\left(h_{2}^{(2)}\vee h_{3}^{(2)}\right)% \right)\rightarrow h_{1}^{(0)}= ( italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ∧ ( italic_h start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT ∨ italic_h start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT ) ) → italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT
=h1(0)¬(h1(1)(h2(2)h3(2)))absentsuperscriptsubscript10superscriptsubscript11superscriptsubscript22superscriptsubscript32\displaystyle=h_{1}^{(0)}\vee\lnot\left(h_{1}^{(1)}\wedge\left(h_{2}^{(2)}\vee h% _{3}^{(2)}\right)\right)= italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT ∨ ¬ ( italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ∧ ( italic_h start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT ∨ italic_h start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT ) )
=h1(0)¬h1(1)(¬h2(2)¬h3(2))absentsuperscriptsubscript10superscriptsubscript11superscriptsubscript22superscriptsubscript32\displaystyle=h_{1}^{(0)}\vee\lnot h_{1}^{(1)}\vee\left(\lnot h_{2}^{(2)}% \wedge\lnot h_{3}^{(2)}\right)= italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT ∨ ¬ italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ∨ ( ¬ italic_h start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT ∧ ¬ italic_h start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT )
=h1(0)h2(1)h1(2).absentsuperscriptsubscript10superscriptsubscript21superscriptsubscript12\displaystyle=h_{1}^{(0)}\vee h_{2}^{(1)}\vee h_{1}^{(2)}.= italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT ∨ italic_h start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ∨ italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT . (12)

Table 1 shows in bold all possible combinations of the concept values satisfying the above expert rule. It can be seen from Table 1 that there holds:

π1+π2+π3+π4+π5+π6+π7++π10+π11+π12=1.\pi_{1}+\pi_{2}+\pi_{3}+\pi_{4}+\pi_{5}+\pi_{6}+\pi_{7}++\pi_{10}+\pi_{11}+\pi% _{12}=1.italic_π start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT + italic_π start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT + italic_π start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT + italic_π start_POSTSUBSCRIPT 4 end_POSTSUBSCRIPT + italic_π start_POSTSUBSCRIPT 5 end_POSTSUBSCRIPT + italic_π start_POSTSUBSCRIPT 6 end_POSTSUBSCRIPT + italic_π start_POSTSUBSCRIPT 7 end_POSTSUBSCRIPT + + italic_π start_POSTSUBSCRIPT 10 end_POSTSUBSCRIPT + italic_π start_POSTSUBSCRIPT 11 end_POSTSUBSCRIPT + italic_π start_POSTSUBSCRIPT 12 end_POSTSUBSCRIPT = 1 . (13)
Table 1: An example of combinations of the concept values and the corresponding probabilities
c(0)superscript𝑐0c^{(0)}italic_c start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT 𝟏1\mathbf{1}bold_1 𝟏1\mathbf{1}bold_1 𝟏1\mathbf{1}bold_1 𝟏1\mathbf{1}bold_1 𝟏1\mathbf{1}bold_1 𝟏1\mathbf{1}bold_1 𝟐2\mathbf{2}bold_2 2222 2222 𝟐2\mathbf{2}bold_2 𝟐2\mathbf{2}bold_2 𝟐2\mathbf{2}bold_2
c(1)superscript𝑐1c^{(1)}italic_c start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT 𝟏1\mathbf{1}bold_1 𝟏1\mathbf{1}bold_1 𝟏1\mathbf{1}bold_1 𝟐2\mathbf{2}bold_2 𝟐2\mathbf{2}bold_2 𝟐2\mathbf{2}bold_2 𝟏1\mathbf{1}bold_1 1111 1111 𝟐2\mathbf{2}bold_2 𝟐2\mathbf{2}bold_2 𝟐2\mathbf{2}bold_2
c(2)superscript𝑐2c^{(2)}italic_c start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT 𝟏1\mathbf{1}bold_1 𝟐2\mathbf{2}bold_2 𝟑3\mathbf{3}bold_3 𝟏1\mathbf{1}bold_1 𝟐2\mathbf{2}bold_2 𝟑3\mathbf{3}bold_3 𝟏1\mathbf{1}bold_1 2222 3333 𝟏1\mathbf{1}bold_1 𝟐2\mathbf{2}bold_2 𝟑3\mathbf{3}bold_3
π𝜋\mathbf{\pi}italic_π π1subscript𝜋1\pi_{1}italic_π start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT π2subscript𝜋2\pi_{2}italic_π start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT π3subscript𝜋3\pi_{3}italic_π start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT π4subscript𝜋4\pi_{4}italic_π start_POSTSUBSCRIPT 4 end_POSTSUBSCRIPT π5subscript𝜋5\pi_{5}italic_π start_POSTSUBSCRIPT 5 end_POSTSUBSCRIPT π6subscript𝜋6\pi_{6}italic_π start_POSTSUBSCRIPT 6 end_POSTSUBSCRIPT π7subscript𝜋7\pi_{7}italic_π start_POSTSUBSCRIPT 7 end_POSTSUBSCRIPT π8subscript𝜋8\pi_{8}italic_π start_POSTSUBSCRIPT 8 end_POSTSUBSCRIPT π9subscript𝜋9\pi_{9}italic_π start_POSTSUBSCRIPT 9 end_POSTSUBSCRIPT π10subscript𝜋10\pi_{10}italic_π start_POSTSUBSCRIPT 10 end_POSTSUBSCRIPT π11subscript𝜋11\pi_{11}italic_π start_POSTSUBSCRIPT 11 end_POSTSUBSCRIPT π12subscript𝜋12\pi_{12}italic_π start_POSTSUBSCRIPT 12 end_POSTSUBSCRIPT

4.4 Probabilistic approach

An alternative approach is to consider the joint probability under condition that expert rules are satisfied:

Pr(C=𝐜g(C)=1)=Pr(C=𝐜,g(C)=1)Pr(g(C)).Pr𝐶conditional𝐜𝑔𝐶1Prformulae-sequence𝐶𝐜𝑔𝐶1Pr𝑔𝐶\mathop{\rm Pr}\left(C=\mathbf{c}\mid g(C)=1\right)=\frac{\mathop{\rm Pr}\left% (C=\mathbf{c},~{}g(C)=1\right)}{\mathop{\rm Pr}\left(g(C)\right)}.roman_Pr ( italic_C = bold_c ∣ italic_g ( italic_C ) = 1 ) = divide start_ARG roman_Pr ( italic_C = bold_c , italic_g ( italic_C ) = 1 ) end_ARG start_ARG roman_Pr ( italic_g ( italic_C ) ) end_ARG . (14)

The probability of conjunction Pr(C=𝐜,g(C)=1)Prformulae-sequence𝐶𝐜𝑔𝐶1\mathop{\rm Pr}\left(C=\mathbf{c},~{}g(C)=1\right)roman_Pr ( italic_C = bold_c , italic_g ( italic_C ) = 1 ) can be expanded as

Pr(C=𝐜,g(C)=1)=Pr(C=𝐜)Pr(g(C)=1|C=𝐜),Prformulae-sequence𝐶𝐜𝑔𝐶1Pr𝐶𝐜Pr𝑔𝐶conditional1𝐶𝐜\mathop{\rm Pr}(C=\mathbf{c},g(C)=1)=\mathop{\rm Pr}(C=\mathbf{c})\cdot\mathop% {\rm Pr}(g(C)=1|C=\mathbf{c}),roman_Pr ( italic_C = bold_c , italic_g ( italic_C ) = 1 ) = roman_Pr ( italic_C = bold_c ) ⋅ roman_Pr ( italic_g ( italic_C ) = 1 | italic_C = bold_c ) , (15)

where Pr(C=𝐜)Pr𝐶𝐜\mathop{\rm Pr}(C=\mathbf{c})roman_Pr ( italic_C = bold_c ) is a predicted probability distribution that may not satisfy the expert rules.

The posterior probability depends on the deterministic function g𝑔gitalic_g, thus

Pr(g(C)=1C=𝐜)={1,ifg(𝐜)=10,else.Pr𝑔𝐶conditional1𝐶𝐜cases1if𝑔𝐜10else\mathop{\rm Pr}(g(C)=1\mid C=\mathbf{c})=\begin{cases}1,&\text{if}~{}g(\mathbf% {c})=1\\ 0,&\text{else}.\end{cases}roman_Pr ( italic_g ( italic_C ) = 1 ∣ italic_C = bold_c ) = { start_ROW start_CELL 1 , end_CELL start_CELL if italic_g ( bold_c ) = 1 end_CELL end_ROW start_ROW start_CELL 0 , end_CELL start_CELL else . end_CELL end_ROW (16)

Let us find the probability Pr{g(C)}Pr𝑔𝐶\mathop{\rm Pr}\{g(C)\}roman_Pr { italic_g ( italic_C ) } as follows:

Pr(g(C))=𝐤𝒞×𝕀[g(𝐤)]Pr(C=𝐤).Pr𝑔𝐶subscript𝐤superscript𝒞𝕀delimited-[]𝑔𝐤Pr𝐶𝐤\mathop{\rm Pr}(g(C))=\sum_{\mathbf{k}\in\mathcal{C}^{\times}}\mathbb{I}[g(% \mathbf{k})]\cdot\mathop{\rm Pr}(C=\mathbf{k}).roman_Pr ( italic_g ( italic_C ) ) = ∑ start_POSTSUBSCRIPT bold_k ∈ caligraphic_C start_POSTSUPERSCRIPT × end_POSTSUPERSCRIPT end_POSTSUBSCRIPT blackboard_I [ italic_g ( bold_k ) ] ⋅ roman_Pr ( italic_C = bold_k ) . (17)

The prior joint concept probability can be calculated as an output of a neural network. Let us denote the output π^^𝜋\widehat{\pi}over^ start_ARG italic_π end_ARG:

Pr(C=𝐜)=π^(𝐜).Pr𝐶𝐜subscript^𝜋𝐜\mathop{\rm Pr}(C=\mathbf{c})=\widehat{\pi}_{\mathcal{M}(\mathbf{c})}.roman_Pr ( italic_C = bold_c ) = over^ start_ARG italic_π end_ARG start_POSTSUBSCRIPT caligraphic_M ( bold_c ) end_POSTSUBSCRIPT . (18)

Hence, there holds

πj=π^j𝕀[g(1(j))]𝐤𝒞×π^k𝕀[g(1(k))].subscript𝜋𝑗subscript^𝜋𝑗𝕀delimited-[]𝑔superscript1𝑗subscript𝐤superscript𝒞subscript^𝜋𝑘𝕀delimited-[]𝑔superscript1𝑘\pi_{j}=\frac{\widehat{\pi}_{j}\cdot\mathbb{I}[g(\mathcal{M}^{-1}(j))]}{\sum_{% \mathbf{k}\in\mathcal{C}^{\times}}\widehat{\pi}_{k}\cdot\mathbb{I}[g(\mathcal{% M}^{-1}(k))]}.italic_π start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT = divide start_ARG over^ start_ARG italic_π end_ARG start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ⋅ blackboard_I [ italic_g ( caligraphic_M start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ( italic_j ) ) ] end_ARG start_ARG ∑ start_POSTSUBSCRIPT bold_k ∈ caligraphic_C start_POSTSUPERSCRIPT × end_POSTSUPERSCRIPT end_POSTSUBSCRIPT over^ start_ARG italic_π end_ARG start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT ⋅ blackboard_I [ italic_g ( caligraphic_M start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ( italic_k ) ) ] end_ARG . (19)

In sum, this approach produces a mask for admissible probabilities π1,,πNsubscript𝜋1subscript𝜋𝑁\pi_{1},...,\pi_{N}italic_π start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_π start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT. The mask is the same as u𝑢uitalic_u in (9). This approach requires to predict all components of the joint probability distribution by applying a neural network, while only admissible states will be used. So, it is quite redundant, and this motivates us not to use the approach in practice. However, it is flexible and can be useful, for example, in case when multiple conflicting expert rules are applied to different parts of one dataset, or when the choice of expert rules depends on input.

4.5 Solution set as a polytope

Instead of modelling the whole joint distribution, one can estimate probabilities only of the states that lead to satisfying the expert rules. We call this reduced vector as the “admissible probability vector” and denote as π~=(π~1,,π~d)~𝜋subscript~𝜋1subscript~𝜋𝑑\tilde{\pi}=(\tilde{\pi}_{1},\dots,\tilde{\pi}_{d})over~ start_ARG italic_π end_ARG = ( over~ start_ARG italic_π end_ARG start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , over~ start_ARG italic_π end_ARG start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT ), where d𝑑ditalic_d is the number of admissible states. There is no additional constraints on π~~𝜋\tilde{\pi}over~ start_ARG italic_π end_ARG, therefore we can say that it belongs to the unit simplex of dimension d𝑑ditalic_d.

The joint probability vector can be found as

π=Wπ~,𝜋𝑊~𝜋\pi=W\tilde{\pi},italic_π = italic_W over~ start_ARG italic_π end_ARG , (20)

where W{0,1}t×d𝑊superscript01𝑡𝑑W\in\{0,1\}^{t\times d}italic_W ∈ { 0 , 1 } start_POSTSUPERSCRIPT italic_t × italic_d end_POSTSUPERSCRIPT is a placement matrix which contains strictly one non-zero element in each column and one or zero non-zero elements in each row. It can be interpreted as arrangement of π~~𝜋\tilde{\pi}over~ start_ARG italic_π end_ARG entries to the admissible components of π𝜋\piitalic_π.

The desired marginal concept probabilities can be calculated as a summation over relevant entries of π𝜋\piitalic_π:

Pr(C(i)=j𝐱)=c𝒞×π(c)𝕀[c(i)=j].Prsuperscript𝐶𝑖conditional𝑗𝐱subscript𝑐superscript𝒞subscript𝜋𝑐𝕀delimited-[]superscript𝑐𝑖𝑗\mathop{\rm Pr}(C^{(i)}=j\mid\mathbf{x})=\sum_{c\in\mathcal{C}^{\times}}\pi_{% \mathcal{M}(c)}\cdot\mathbb{I}[c^{(i)}=j].roman_Pr ( italic_C start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT = italic_j ∣ bold_x ) = ∑ start_POSTSUBSCRIPT italic_c ∈ caligraphic_C start_POSTSUPERSCRIPT × end_POSTSUPERSCRIPT end_POSTSUBSCRIPT italic_π start_POSTSUBSCRIPT caligraphic_M ( italic_c ) end_POSTSUBSCRIPT ⋅ blackboard_I [ italic_c start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT = italic_j ] . (21)

So each vector p(i)superscript𝑝𝑖p^{(i)}italic_p start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT can be represented as

p(i)=B(i)π=B(i)Wπ~,superscript𝑝𝑖superscript𝐵𝑖𝜋superscript𝐵𝑖𝑊~𝜋p^{(i)}=B^{(i)}~{}\pi=B^{(i)}W\tilde{\pi},italic_p start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT = italic_B start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT italic_π = italic_B start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT italic_W over~ start_ARG italic_π end_ARG , (22)

where Bjk(i)=𝕀[(1(k))(i)=j]superscriptsubscript𝐵𝑗𝑘𝑖𝕀delimited-[]superscriptsuperscript1𝑘𝑖𝑗B_{jk}^{(i)}=\mathbb{I}\left[\left(\mathcal{M}^{-1}(k)\right)^{(i)}=j\right]italic_B start_POSTSUBSCRIPT italic_j italic_k end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT = blackboard_I [ ( caligraphic_M start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ( italic_k ) ) start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT = italic_j ].

Then every solution satisfying rules can be expressed as

p¯=Vπ~,V=[(B(0)W)T;;(B(m)W)T]T,π~0,𝟏Tπ~=1.formulae-sequence¯𝑝𝑉~𝜋formulae-sequence𝑉superscriptsuperscriptsuperscript𝐵0𝑊𝑇superscriptsuperscript𝐵𝑚𝑊𝑇𝑇formulae-sequencesucceeds-or-equals~𝜋0superscript1𝑇~𝜋1\begin{gathered}\overline{p}=V\tilde{\pi},\\ V=[(B^{(0)}W)^{T};\dots;(B^{(m)}W)^{T}]^{T},\\ \tilde{\pi}\succcurlyeq 0,~{}\mathbf{1}^{T}\tilde{\pi}=1.\end{gathered}start_ROW start_CELL over¯ start_ARG italic_p end_ARG = italic_V over~ start_ARG italic_π end_ARG , end_CELL end_ROW start_ROW start_CELL italic_V = [ ( italic_B start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT italic_W ) start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT ; … ; ( italic_B start_POSTSUPERSCRIPT ( italic_m ) end_POSTSUPERSCRIPT italic_W ) start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT ] start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT , end_CELL end_ROW start_ROW start_CELL over~ start_ARG italic_π end_ARG ≽ 0 , bold_1 start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT over~ start_ARG italic_π end_ARG = 1 . end_CELL end_ROW (23)

Therefore the solution set is by definition a polytope whose vertices are columns of the matrix V𝑉Vitalic_V.

In practice, this approach can be used as follows. First, all possible concept vectors are enumerated and passed through the expert rules, represented as g𝑔gitalic_g to obtain the map** W𝑊Witalic_W to the admissible states. Then π~~𝜋\tilde{\pi}over~ start_ARG italic_π end_ARG is obtained as an output of a neural network after applying the softmax operation, that is π~~𝜋\tilde{\pi}over~ start_ARG italic_π end_ARG is formally a discrete probability distribution. Then the solution is a point inside the polytope, which is calculated by weighing columns of the vertex matrix V𝑉Vitalic_V with elements of π~~𝜋\tilde{\pi}over~ start_ARG italic_π end_ARG.

The main disadvantage of this approach is that we have to pre-calculate and store all vertices, while their amount can be enormous for complex logical expressions on multiple concepts.

4.6 Linear inequality system

The solution set is a polytope with a possibly high number of vertices. We discover an alternative definition of this set as an intersection of half-spaces, determined by hyperplanes, the so-called H-representation. Instead of converting from V- to H-representation after calculating vertices, we construct a linear inequality system from scratch based only on g𝑔gitalic_g.

The algorithm for constructing the linear inequality system consists of three steps:

  1. 1.

    Convert g𝑔gitalic_g into conjunctive normal form (CNF).

  2. 2.

    Map each clause to exactly one linear inequality.

  3. 3.

    Unify (intersect) clause’s linear inequalities into one system, along with the probability distribution constraints on marginals.

The first step is NP-complete in a general case, but can be solved in reasonable time in many practical applications. We stress here that the algorithm is appropriate when the expert rules can be converted to a compact CNF. Let the rule set be represented in CNF as a conjunction of clauses:

=𝒦1𝒦b.subscript𝒦1subscript𝒦𝑏\mathcal{R}=\mathcal{K}_{1}\wedge\dots\wedge\mathcal{K}_{b}.caligraphic_R = caligraphic_K start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ∧ ⋯ ∧ caligraphic_K start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT . (24)

Each clause 𝒦lsubscript𝒦𝑙\mathcal{K}_{l}caligraphic_K start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT is a disjunction of literals:

𝒦l=qKllq,subscript𝒦𝑙subscript𝑞subscript𝐾𝑙subscript𝑙𝑞\mathcal{K}_{l}=\bigvee_{q\in K_{l}}l_{q},caligraphic_K start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT = ⋁ start_POSTSUBSCRIPT italic_q ∈ italic_K start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT end_POSTSUBSCRIPT italic_l start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT , (25)

where q=(i,j)𝑞𝑖𝑗q=(i,j)italic_q = ( italic_i , italic_j ), lq=hj(i)subscript𝑙𝑞superscriptsubscript𝑗𝑖l_{q}=h_{j}^{(i)}italic_l start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT = italic_h start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT for some set of literals Klsubscript𝐾𝑙K_{l}italic_K start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT of the clause. Note, that if the clause contains some negated literals like ¬hj(i)superscriptsubscript𝑗𝑖\lnot h_{j}^{(i)}¬ italic_h start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT, they are replaced with the disjunction of the rest outcome literals for the i𝑖iitalic_i-th concept:

¬hj(i)k𝒞(i){j}hk(i).superscriptsubscript𝑗𝑖subscript𝑘superscript𝒞𝑖𝑗superscriptsubscript𝑘𝑖\lnot h_{j}^{(i)}\equiv\bigvee_{k\in\mathcal{C}^{(i)}\setminus\{j\}}h_{k}^{(i)}.¬ italic_h start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT ≡ ⋁ start_POSTSUBSCRIPT italic_k ∈ caligraphic_C start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT ∖ { italic_j } end_POSTSUBSCRIPT italic_h start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT . (26)

Further, we assume that such the transformation was applied to all clauses, and then each clause does not contain negations.

The next steps can be applied to any boolean expressions in CNF. Let us describe them in detail. First, consider a clause 𝒦𝒦\mathcal{K}caligraphic_K, whose literals are like hj(i)superscriptsubscript𝑗𝑖h_{j}^{(i)}italic_h start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT. The goal is to find appropriate marginals p¯¯𝑝\overline{p}over¯ start_ARG italic_p end_ARG, for which some corresponding joint probability distribution satisfying the clause exists. Formally, given a clause of the form:

𝒦=qKlq,𝒦subscript𝑞𝐾subscript𝑙𝑞\mathcal{K}=\bigvee_{q\in K}l_{q},caligraphic_K = ⋁ start_POSTSUBSCRIPT italic_q ∈ italic_K end_POSTSUBSCRIPT italic_l start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT , (27)

the sum of probabilities of dependent literals has a lower bound:

Pr(𝒦)=1qPr(lq)Pr(𝒦)=1.Pr𝒦1subscript𝑞Prsubscript𝑙𝑞Pr𝒦1\mathop{\rm Pr}(\mathcal{K})=1\implies\sum_{q}\mathop{\rm Pr}(l_{q})\geq% \mathop{\rm Pr}(\mathcal{K})=1.roman_Pr ( caligraphic_K ) = 1 ⟹ ∑ start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT roman_Pr ( italic_l start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT ) ≥ roman_Pr ( caligraphic_K ) = 1 . (28)

This property can be used to formulate a constraint of marginal probabilities. For the clause 𝒦𝒦\mathcal{K}caligraphic_K, the constraint is

(i,j)Kpj(i)1.subscript𝑖𝑗𝐾superscriptsubscript𝑝𝑗𝑖1\sum_{(i,j)\in K}p_{j}^{(i)}\geq 1.∑ start_POSTSUBSCRIPT ( italic_i , italic_j ) ∈ italic_K end_POSTSUBSCRIPT italic_p start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT ≥ 1 . (29)

The lower bound is tight in a sense that there exist feasible marginals that sum up to one. Moreover, no other constraints (except the probability distribution constraints on marginals) restrict the feasible set. It means that, for any solution p¯¯𝑝\overline{p}over¯ start_ARG italic_p end_ARG satisfying the constraint (the sum of different marginals probabilities is not less than 1111), there exists at least one joint probability distribution matching rules that have the same marginal probability distributions.

We apply this transformation to each clause to obtain one linear inequality constraint per clause. The last step is to correctly merge the constraints of the clauses into one system. Hopefully, it can be achieved by intersecting the obtained inequalities.

Theorem 1.

Given a rule \mathcal{R}caligraphic_R in CNF, consisting of b𝑏bitalic_b clauses:

=𝒦1𝒦b,subscript𝒦1subscript𝒦𝑏\mathcal{R}=\mathcal{K}_{1}\wedge\dots\wedge\mathcal{K}_{b},caligraphic_R = caligraphic_K start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ∧ ⋯ ∧ caligraphic_K start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT , (30)

the constraint on the expert rule probability is equivalent to intersection of clause constraints:

Pr()=1{Pr(𝒦1)=1,Pr(𝒦b)=1.iffPr1casesPrsubscript𝒦11𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒Prsubscript𝒦𝑏1𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒\mathop{\rm Pr}(\mathcal{R})=1\iff\begin{cases}\mathop{\rm Pr}(\mathcal{K}_{1}% )=1,\\ \dots\\ \mathop{\rm Pr}(\mathcal{K}_{b})=1.\end{cases}roman_Pr ( caligraphic_R ) = 1 ⇔ { start_ROW start_CELL roman_Pr ( caligraphic_K start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) = 1 , end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL … end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL roman_Pr ( caligraphic_K start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT ) = 1 . end_CELL start_CELL end_CELL end_ROW (31)
Proof.

Necessity.

Pr()=1j1,b¯Pr(𝒦j)Pr(ij𝒦i|𝒦j)=1Pr(𝒦j)=1.Pr1for-all𝑗¯1𝑏Prsubscript𝒦𝑗Prconditionalsubscript𝑖𝑗subscript𝒦𝑖subscript𝒦𝑗1Prsubscript𝒦𝑗1\mathop{\rm Pr}(\mathcal{R})=1\implies\forall j\in\overline{1,b}~{}~{}\mathop{% \rm Pr}(\mathcal{K}_{j})\cdot\mathop{\rm Pr}(\bigwedge_{i\neq j}\mathcal{K}_{i% }|\mathcal{K}_{j})=1\implies\mathop{\rm Pr}(\mathcal{K}_{j})=1.roman_Pr ( caligraphic_R ) = 1 ⟹ ∀ italic_j ∈ over¯ start_ARG 1 , italic_b end_ARG roman_Pr ( caligraphic_K start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ) ⋅ roman_Pr ( ⋀ start_POSTSUBSCRIPT italic_i ≠ italic_j end_POSTSUBSCRIPT caligraphic_K start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT | caligraphic_K start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ) = 1 ⟹ roman_Pr ( caligraphic_K start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ) = 1 .

Sufficiency.

j1,b¯Pr(𝒦j)=1Pr(𝒦j¯)=0ifffor-all𝑗¯1𝑏Prsubscript𝒦𝑗1Pr¯subscript𝒦𝑗0absent\displaystyle\forall j\in\overline{1,b}~{}~{}\mathop{\rm Pr}(\mathcal{K}_{j})=% 1\iff\mathop{\rm Pr}(\overline{\mathcal{K}_{j}})=0\implies∀ italic_j ∈ over¯ start_ARG 1 , italic_b end_ARG roman_Pr ( caligraphic_K start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ) = 1 ⇔ roman_Pr ( over¯ start_ARG caligraphic_K start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT end_ARG ) = 0 ⟹ (32)
0=i=1bPr(𝒦i¯)Pr(𝒦1¯𝒦b¯)=Pr(𝒦1𝒦b¯)00superscriptsubscript𝑖1𝑏Pr¯subscript𝒦𝑖Pr¯subscript𝒦1¯subscript𝒦𝑏Pr¯subscript𝒦1subscript𝒦𝑏0absent\displaystyle 0=\sum_{i=1}^{b}\mathop{\rm Pr}(\overline{\mathcal{K}_{i}})\geq% \mathop{\rm Pr}(\overline{\mathcal{K}_{1}}\lor\dots\lor\overline{\mathcal{K}_{% b}})=\mathop{\rm Pr}(\overline{\mathcal{K}_{1}\land\dots\land\mathcal{K}_{b}})% \geq 0\implies0 = ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_b end_POSTSUPERSCRIPT roman_Pr ( over¯ start_ARG caligraphic_K start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_ARG ) ≥ roman_Pr ( over¯ start_ARG caligraphic_K start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_ARG ∨ ⋯ ∨ over¯ start_ARG caligraphic_K start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT end_ARG ) = roman_Pr ( over¯ start_ARG caligraphic_K start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ∧ ⋯ ∧ caligraphic_K start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT end_ARG ) ≥ 0 ⟹ (33)
0=Pr(𝒦1𝒦b¯)=1Pr(𝒦1𝒦b)0Pr¯subscript𝒦1subscript𝒦𝑏1Prsubscript𝒦1subscript𝒦𝑏absent\displaystyle 0=\mathop{\rm Pr}(\overline{\mathcal{K}_{1}\land\dots\land% \mathcal{K}_{b}})=1-\mathop{\rm Pr}(\mathcal{K}_{1}\land\cdots\land\mathcal{K}% _{b})\implies0 = roman_Pr ( over¯ start_ARG caligraphic_K start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ∧ ⋯ ∧ caligraphic_K start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT end_ARG ) = 1 - roman_Pr ( caligraphic_K start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ∧ ⋯ ∧ caligraphic_K start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT ) ⟹ (34)
Pr(i=1b𝒦i)=1.Prsuperscriptsubscript𝑖1𝑏subscript𝒦𝑖1\displaystyle\mathop{\rm Pr}(\bigwedge_{i=1}^{b}\mathcal{K}_{i})=1.roman_Pr ( ⋀ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_b end_POSTSUPERSCRIPT caligraphic_K start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ) = 1 . (35)

Finally, according to the proposition and the theorem, when only marginal distributions are of interest, any set of expert rules can be equivalently transformed to a linear inequalities system of the form:

{(i,j)K1pj(i)1(i,j)Kbpj(i)1,casessubscript𝑖𝑗subscript𝐾1superscriptsubscript𝑝𝑗𝑖1𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒subscript𝑖𝑗subscript𝐾𝑏superscriptsubscript𝑝𝑗𝑖1𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒\begin{cases}\sum_{(i,j)\in K_{1}}p_{j}^{(i)}\geq 1\\ \dots\\ \sum_{(i,j)\in K_{b}}p_{j}^{(i)}\geq 1,\end{cases}{ start_ROW start_CELL ∑ start_POSTSUBSCRIPT ( italic_i , italic_j ) ∈ italic_K start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT italic_p start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT ≥ 1 end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL … end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL ∑ start_POSTSUBSCRIPT ( italic_i , italic_j ) ∈ italic_K start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT end_POSTSUBSCRIPT italic_p start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT ≥ 1 , end_CELL start_CELL end_CELL end_ROW (36)

where Krsubscript𝐾𝑟K_{r}italic_K start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT is a set of concept-values pairs for a clause r𝑟ritalic_r of the set of rules in CNF. Lets call the matrix of the system as A^^𝐴\hat{A}over^ start_ARG italic_A end_ARG, thus the system is:

A^p¯𝟏.^𝐴¯𝑝1\hat{A}~{}\overline{p}\geq\mathbf{1}.over^ start_ARG italic_A end_ARG over¯ start_ARG italic_p end_ARG ≥ bold_1 . (37)

The entire system of constraints for marginal distributions includes also the probability distribution constraints:

p(i)Δni,superscript𝑝𝑖subscriptΔsubscript𝑛𝑖p^{(i)}\in\Delta_{n_{i}},italic_p start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT ∈ roman_Δ start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT , (38)

and becomes:

Ap¯𝐴¯𝑝\displaystyle A~{}\overline{p}italic_A over¯ start_ARG italic_p end_ARG b,absent𝑏\displaystyle\geq b,≥ italic_b , (39)
Qp¯𝑄¯𝑝\displaystyle Q~{}\overline{p}italic_Q over¯ start_ARG italic_p end_ARG =𝟏,absent1\displaystyle=\mathbf{1},= bold_1 , (40)

where

A=[A^E],b=[𝟏𝟎],formulae-sequence𝐴matrix^𝐴𝐸𝑏matrix10A=\begin{bmatrix}\hat{A}\\ E\end{bmatrix},~{}~{}b=\begin{bmatrix}\mathbf{1}\\ \mathbf{0}\end{bmatrix},italic_A = [ start_ARG start_ROW start_CELL over^ start_ARG italic_A end_ARG end_CELL end_ROW start_ROW start_CELL italic_E end_CELL end_ROW end_ARG ] , italic_b = [ start_ARG start_ROW start_CELL bold_1 end_CELL end_ROW start_ROW start_CELL bold_0 end_CELL end_ROW end_ARG ] , (41)
Q=[110000001100000011]m+1×s.𝑄matrix110000001100missing-subexpressionmissing-subexpression000011superscript𝑚1𝑠Q=\begin{bmatrix}1\dots 1&0\dots 0&0\dots 0\\ 0\dots 0&1\dots 1~{}&0\dots 0\\ &\ddots&\\ 0\dots 0&0\dots 0~{}&1\dots 1\\ &&\end{bmatrix}\in\mathbb{R}^{m+1\times s}.italic_Q = [ start_ARG start_ROW start_CELL 1 … 1 end_CELL start_CELL 0 … 0 end_CELL start_CELL 0 … 0 end_CELL end_ROW start_ROW start_CELL 0 … 0 end_CELL start_CELL 1 … 1 end_CELL start_CELL 0 … 0 end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL ⋱ end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL 0 … 0 end_CELL start_CELL 0 … 0 end_CELL start_CELL 1 … 1 end_CELL end_ROW end_ARG ] ∈ blackboard_R start_POSTSUPERSCRIPT italic_m + 1 × italic_s end_POSTSUPERSCRIPT . (42)

Note that dimensionality of the linear inequality system may be reduced from s𝑠sitalic_s to (sm)𝑠𝑚(s-m)( italic_s - italic_m ) along with elimination of equality constraints because, for each concept, strictly one entry can be removed by using the condition p1(i)=1j1pj(i)superscriptsubscript𝑝1𝑖1subscript𝑗1superscriptsubscript𝑝𝑗𝑖p_{1}^{(i)}=1-\sum_{j\neq 1}p_{j}^{(i)}italic_p start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT = 1 - ∑ start_POSTSUBSCRIPT italic_j ≠ 1 end_POSTSUBSCRIPT italic_p start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT.

5 Neural network and expert rules

Consider a partially-labeled multi-label multi-class classification problem. The training dataset 𝒟𝒟\mathcal{D}caligraphic_D consists of N𝑁Nitalic_N tuples (𝐱j,ζj(0),,ζj(m))subscript𝐱𝑗superscriptsubscript𝜁𝑗0superscriptsubscript𝜁𝑗𝑚(\mathbf{x}_{j},\zeta_{j}^{(0)},\dots,\zeta_{j}^{(m)})( bold_x start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT , italic_ζ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT , … , italic_ζ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_m ) end_POSTSUPERSCRIPT ), where ζj(i)𝒞(i){1}superscriptsubscript𝜁𝑗𝑖superscript𝒞𝑖1\zeta_{j}^{(i)}\in\mathcal{C}^{(i)}\cup\{-1\}italic_ζ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT ∈ caligraphic_C start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT ∪ { - 1 } is a label of the i𝑖iitalic_i-th concept of the j𝑗jitalic_j-th training observation. The label ζj(i)superscriptsubscript𝜁𝑗𝑖\zeta_{j}^{(i)}italic_ζ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT is assigned to 11-1- 1 if it is unknown for the j𝑗jitalic_j-th observation. The main target yjsubscript𝑦𝑗y_{j}italic_y start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT is denoted as the 00-th concept ζj(0)superscriptsubscript𝜁𝑗0\zeta_{j}^{(0)}italic_ζ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT and can also be partially labeled, that is ζj(0)superscriptsubscript𝜁𝑗0\zeta_{j}^{(0)}italic_ζ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT can be equal to 11-1- 1.

We consider neural networks that simultaneously predict the marginal distribution for each concept. For the i𝑖iitalic_i-th concept, the prediction map** is denoted as

f(i):𝒳Δni,:superscript𝑓𝑖maps-to𝒳subscriptΔsubscript𝑛𝑖f^{(i)}:\mathcal{X}\mapsto\Delta_{n_{i}},italic_f start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT : caligraphic_X ↦ roman_Δ start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT , (43)

however, a neural network fθsubscript𝑓𝜃f_{\theta}italic_f start_POSTSUBSCRIPT italic_θ end_POSTSUBSCRIPT with parameters θ𝜃\thetaitalic_θ computes fθ(0),,fθ(m)superscriptsubscript𝑓𝜃0superscriptsubscript𝑓𝜃𝑚f_{\theta}^{(0)},\dots,f_{\theta}^{(m)}italic_f start_POSTSUBSCRIPT italic_θ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT , … , italic_f start_POSTSUBSCRIPT italic_θ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_m ) end_POSTSUPERSCRIPT simultaneously.

The training loss function is a weighted sum of the masked cross entropy losses over each concept

\displaystyle\mathcal{L}caligraphic_L =i=0mω(i)(i),absentsuperscriptsubscript𝑖0𝑚superscript𝜔𝑖superscript𝑖\displaystyle=\sum_{i=0}^{m}\omega^{(i)}\cdot\mathcal{L}^{(i)},= ∑ start_POSTSUBSCRIPT italic_i = 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_m end_POSTSUPERSCRIPT italic_ω start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT ⋅ caligraphic_L start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT , (44)
(i)superscript𝑖\displaystyle\mathcal{L}^{(i)}caligraphic_L start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT =j=1N𝕀[ζj(i)1](k=1ni𝕀[ζj(i)=k]log(f(i)(𝐱))k),\displaystyle=-\sum_{j=1}^{N}\mathbb{I}\left[\zeta_{j}^{(i)}\neq-1\right]\cdot% \left(\sum_{k=1}^{n_{i}}\mathbb{I}[\zeta_{j}^{(i)}=k]\cdot\log{(f^{(i)}(% \mathbf{x}))_{k}}\right),= - ∑ start_POSTSUBSCRIPT italic_j = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_N end_POSTSUPERSCRIPT blackboard_I [ italic_ζ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT ≠ - 1 ] ⋅ ( ∑ start_POSTSUBSCRIPT italic_k = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUPERSCRIPT blackboard_I [ italic_ζ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT = italic_k ] ⋅ roman_log ( italic_f start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT ( bold_x ) ) start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT ) , (45)

where ω(i)superscript𝜔𝑖\omega^{(i)}italic_ω start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT is a weight of the i𝑖iitalic_i-th concept loss, which is an inverse number of labeled concept samples by default. The summation in brackets is the log-likelihood for the i𝑖iitalic_i-th concept.

The neural network consists of classical layers (fully-connected or convolutional layers, depending on a solved problem) with one special layer at the end of the neural network, which we call as a concept head. This layer maps an embedding produced by the preceding layers to the marginal class probabilities and guarantees that they will satisfy expert rules for any input. The approaches described above can be used to construct different concept heads. Let us consider them in detail.

5.1 Base head

The most simple concept head implementation is to calculate prior joint probability distribution vector π^^𝜋\widehat{\pi}over^ start_ARG italic_π end_ARG using softmax applied to a linear layer that maps embedding to t𝑡titalic_t logits. Then, to satisfy the expert rules, the posterior joint probability conditioned on the rules is calculated by multiplying of admissible states by the mask u𝑢uitalic_u, and renormalized. This approach does extra computation when calculating probabilities of invalid states.

The Base Head approach is schematically shown in the top picture in Fig. 1.

5.2 Admissible state head

The idea of the Admissible State head (AS-head) is to estimate the probability distribution on only admissible outcomes π~~𝜋\tilde{\pi}over~ start_ARG italic_π end_ARG instead of the whole joint probability vector π𝜋\piitalic_π. The full joint probability vector is constructed using (20), and the marginals are calculated by using the matrix multiplication (22). In a software implementation, we obtain marginal probabilities p(i)superscript𝑝𝑖p^{(i)}italic_p start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT by resha** the flat vector π𝜋\piitalic_π into a multi-dimensional array with dimensions (n0,,nm)subscript𝑛0subscript𝑛𝑚(n_{0},\dots,n_{m})( italic_n start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT , … , italic_n start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT ), and then summing up over all dimensions except i𝑖iitalic_i. Formally, it is equivalent to (22).

To obtain the placement matrix W𝑊Witalic_W and the dimension d𝑑ditalic_d of π~~𝜋\tilde{\pi}over~ start_ARG italic_π end_ARG, before constructing such the layer, one needs to enumerate all possible joint outcomes and evaluate the expert rules on them. It is not a problem for a small number of concepts, when enumeration can be carried out in a reasonable time. But it can be a problem when the number of concepts and their outcomes is large enough. Therefore, additional optimizations are required in this case.

Refer to caption
Figure 1: The Base Head (the top picture) and the AS-Head (the bottom picture) approaches

The bottom picture in Fig. 1 illustrates the Admissible State Head approach.

5.3 Vertex-based head

The placement matrix W𝑊Witalic_W is of dimension t×d𝑡𝑑t\times ditalic_t × italic_d, where t𝑡titalic_t is the total number of joint outcomes and d𝑑ditalic_d is the number of valid states. Even if d𝑑ditalic_d remains small, t𝑡titalic_t grows exponentially with the number of concepts m𝑚mitalic_m. Since the main goal is to compute only marginal distributions using (23), one can precompute the polytope vertex matrix V𝑉Vitalic_V of dimension s×d𝑠𝑑s\times ditalic_s × italic_d, where s=i=0mni𝑠superscriptsubscript𝑖0𝑚subscript𝑛𝑖s=\sum_{i=0}^{m}n_{i}italic_s = ∑ start_POSTSUBSCRIPT italic_i = 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_m end_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT is the dimension of the vector p¯¯𝑝\overline{p}over¯ start_ARG italic_p end_ARG of concatenated marginal probabilities.

The computation of V𝑉Vitalic_V is carried out offline, before training a neural network. Total number of operations at training or inference is reduced in this case when dense or sparse matrices are used for storing W,V𝑊𝑉W,Vitalic_W , italic_V. If dense matrices are used, then the number of operations is reduced exponentially w.r.t. m𝑚mitalic_m compared to the approaches described above.

The left picture in Fig. 2 illustrates a scheme of the Vertex Head approach. The neural network generates the vector π~~𝜋\widetilde{\pi}over~ start_ARG italic_π end_ARG in the unit simplex, which is multiplied by the simplex vertices.

Another way for implementing the vertex-based approach is to first construct the linear inequality system which defines the polytope of feasible solutions p¯¯𝑝\overline{p}over¯ start_ARG italic_p end_ARG. Then the vertices V𝑉Vitalic_V can be found via H- to V-representation conversion [42].

5.4 Constraints head

Alternatively, the solution p¯¯𝑝\overline{p}over¯ start_ARG italic_p end_ARG can be generated inside the polytope defined by the linear inequality constraints, in H-representation without estimation of vertices. The vertex-based head is an approach to generate a point in a polytope by multiplying its vertices by weights from softmax. However there are other methods for such a problem, considered in [43]. These methods require one feasible point as an input that is strictly inside the polytope and can map an input embedding into a polytope point. The methods have the computational complexity O(νμ)𝑂𝜈𝜇O(\nu\cdot\mu)italic_O ( italic_ν ⋅ italic_μ ), where ν𝜈\nuitalic_ν is the number of inequality constraints, μ𝜇\muitalic_μ is the output dimension.

The right picture in Fig. 2 illustrates a scheme of the Constraints Head approach.

The main advantage of this approach is that it can be applied even when the heads described above fail: the number of admissible states is enormous, the matrix V𝑉Vitalic_V cannot be computed in a reasonable time, or uses too much memory, in a couple with the matrix constructed from weights of the preceding linear layer. It is because the number of inequality constraints b𝑏bitalic_b (the number of clauses in CNF) can be relatively small comparing to the number of admissible joint outcomes d𝑑ditalic_d. The computational complexity of the point construction inside the polytope, defined by the inequality constraints (39), at inference is O((b+s)s)𝑂𝑏𝑠𝑠O\left((b+s)\cdot s\right)italic_O ( ( italic_b + italic_s ) ⋅ italic_s ) under condition that at least one point inside the polytope is found in advance. Therefore, it is reasonable to apply this layer only when db+smuch-greater-than𝑑𝑏𝑠d\gg b+sitalic_d ≫ italic_b + italic_s.

Refer to caption
Figure 2: The Vetex Head (the left picture) and Constraints Head (the right picture) approaches

5.5 State space reduction

The number of enumeration steps, vertices or half-planes, depending on the chosen approach from the described above, can be strongly reduced by considering only concept values that are mentioned in expert rules. For this case, we construct first separate concepts, that were not mentioned in the rules at all, and use separate classification heads for them.

Other concepts, which are partially mentioned in the expert rules, can be compressed. For this, we consider all values that were not mentioned in the rules and incorporate them into a special 00 outcome. For example, if rules are based only on literals h1(1),h2(3),h4(3)superscriptsubscript11superscriptsubscript23superscriptsubscript43h_{1}^{(1)},h_{2}^{(3)},h_{4}^{(3)}italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT , italic_h start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT , italic_h start_POSTSUBSCRIPT 4 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT, and 𝒞(1)={1,2},𝒞(3)={1,2,3,4}formulae-sequencesuperscript𝒞112superscript𝒞31234\mathcal{C}^{(1)}=\{1,2\},\mathcal{C}^{(3)}=\{1,2,3,4\}caligraphic_C start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT = { 1 , 2 } , caligraphic_C start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT = { 1 , 2 , 3 , 4 }, then the compressed outcome sets will be 𝒞~(1)={0,1},𝒞~(3)={0,2,4}formulae-sequencesuperscript~𝒞101superscript~𝒞3024\tilde{\mathcal{C}}^{(1)}=\{0,1\},\tilde{\mathcal{C}}^{(3)}=\{0,2,4\}over~ start_ARG caligraphic_C end_ARG start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT = { 0 , 1 } , over~ start_ARG caligraphic_C end_ARG start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT = { 0 , 2 , 4 }. Here for the first concept c(1)superscript𝑐1c^{(1)}italic_c start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT, the outcome 2222 is not used in the rules, therefore, we replace it with the artificial 00 outcome. For the third concept c(3)superscript𝑐3c^{(3)}italic_c start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT, outcomes {1,3}13\{1,3\}{ 1 , 3 } are not used and replaced with the outcome 00.

After such the transformation, the total number of the joint distribution outcomes is much less than the initial one. To infer probabilities of compressed outcomes, we construct the additional classification heads that estimate the probability distribution over outcomes which were replaced with 00, for each concept, that was partially mentioned in rules and has at least two values for replacement. The final probability of compressed outcomes is calculated as a multiplication of 00 outcome probability by estimated probabilities of replaced outcomes. In the above example, we have:

Pr(C(3)=1)=Prcomp(C(3)=0)Prrepl(C(3)=1),Prsuperscript𝐶31subscriptPrcompsuperscript𝐶30subscriptPrreplsuperscript𝐶31\displaystyle\mathop{\rm Pr}(C^{(3)}=1)=\mathop{\rm Pr}_{\text{comp}}(C^{(3)}=% 0)\cdot\mathop{\rm Pr}_{\text{repl}}(C^{(3)}=1),roman_Pr ( italic_C start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT = 1 ) = roman_Pr start_POSTSUBSCRIPT comp end_POSTSUBSCRIPT ( italic_C start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT = 0 ) ⋅ roman_Pr start_POSTSUBSCRIPT repl end_POSTSUBSCRIPT ( italic_C start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT = 1 ) , (46)
Pr(C(3)=2)=Prcomp(C(3)=2),Prsuperscript𝐶32subscriptPrcompsuperscript𝐶32\displaystyle\mathop{\rm Pr}(C^{(3)}=2)=\mathop{\rm Pr}_{\text{comp}}(C^{(3)}=% 2),roman_Pr ( italic_C start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT = 2 ) = roman_Pr start_POSTSUBSCRIPT comp end_POSTSUBSCRIPT ( italic_C start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT = 2 ) , (47)
Pr(C(3)=3)=Prcomp(C(3)=0)Prrepl(C(3)=3),Prsuperscript𝐶33subscriptPrcompsuperscript𝐶30subscriptPrreplsuperscript𝐶33\displaystyle\mathop{\rm Pr}(C^{(3)}=3)=\mathop{\rm Pr}_{\text{comp}}(C^{(3)}=% 0)\cdot\mathop{\rm Pr}_{\text{repl}}(C^{(3)}=3),roman_Pr ( italic_C start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT = 3 ) = roman_Pr start_POSTSUBSCRIPT comp end_POSTSUBSCRIPT ( italic_C start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT = 0 ) ⋅ roman_Pr start_POSTSUBSCRIPT repl end_POSTSUBSCRIPT ( italic_C start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT = 3 ) , (48)
Pr(C(3)=4)=Prcomp(C(3)=4),Prsuperscript𝐶34subscriptPrcompsuperscript𝐶34\displaystyle\mathop{\rm Pr}(C^{(3)}=4)=\mathop{\rm Pr}_{\text{comp}}(C^{(3)}=% 4),roman_Pr ( italic_C start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT = 4 ) = roman_Pr start_POSTSUBSCRIPT comp end_POSTSUBSCRIPT ( italic_C start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT = 4 ) , (49)

where PrcompsubscriptPrcomp\mathop{\rm Pr}_{\text{comp}}roman_Pr start_POSTSUBSCRIPT comp end_POSTSUBSCRIPT are the compressed probabilities, PrreplsubscriptPrrepl\mathop{\rm Pr}_{\text{repl}}roman_Pr start_POSTSUBSCRIPT repl end_POSTSUBSCRIPT are probabilities of replaced values estimated by the separate classification heads.

6 Numerical experiments

6.1 A toy example

The first example is entirely synthetic. Two-dimensional input vectors are randomly generated in the square [0,1]2superscript012[0,1]^{2}[ 0 , 1 ] start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT. The concepts are: y=c(0)𝒞(0)={1,2}𝑦superscript𝑐0superscript𝒞012y=c^{(0)}\in\mathcal{C}^{(0)}=\{1,2\}italic_y = italic_c start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT ∈ caligraphic_C start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT = { 1 , 2 }, 𝒞(1)={1,2}superscript𝒞112\mathcal{C}^{(1)}=\{1,2\}caligraphic_C start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT = { 1 , 2 }, 𝒞(2)={1,2,3}superscript𝒞2123\mathcal{C}^{(2)}=\{1,2,3\}caligraphic_C start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT = { 1 , 2 , 3 }, 𝒞(3)={1,2,3}superscript𝒞3123\mathcal{C}^{(3)}=\{1,2,3\}caligraphic_C start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT = { 1 , 2 , 3 }.

Concepts used in the example are illustrated in Fig. 3. In particular, the first concept c(1)superscript𝑐1c^{(1)}italic_c start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT is equal to 2222 at the right from the middle, and to 1111 at the left. The second concept c(2)superscript𝑐2c^{(2)}italic_c start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT is equal to 1111 at the bottom horizontal stripe of height 0.250.250.250.25, to 2222 at the middle horizontal stripe of height 0.50.50.50.5 and to 3333 at the top stripe. The third concept is like the second, but in the “L”-shape, that is it depends on both features x(1)superscript𝑥1x^{(1)}italic_x start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT and x(2)superscript𝑥2x^{(2)}italic_x start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT. The main target y𝑦yitalic_y is equal to 2222 if and only if c(1)=c(2)=2superscript𝑐1superscript𝑐22c^{(1)}=c^{(2)}=2italic_c start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT = italic_c start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT = 2.

Refer to caption
Figure 3: Concepts used in the toy synthetic example

For example, let us consider the rule g(𝐜)=((c(1)=2)(c(2)=2))(y=2)𝑔𝐜superscript𝑐12superscript𝑐22𝑦2g(\mathbf{c})=((c^{(1)}=2)\wedge(c^{(2)}=2))\rightarrow(y=2)italic_g ( bold_c ) = ( ( italic_c start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT = 2 ) ∧ ( italic_c start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT = 2 ) ) → ( italic_y = 2 ) which is correct for the dataset. It can be expressed with literals as g(𝐜)=(h2(1)h2(2))h2(0)𝑔𝐜superscriptsubscript21superscriptsubscript22superscriptsubscript20g(\mathbf{c})=(h_{2}^{(1)}\wedge h_{2}^{(2)})\rightarrow h_{2}^{(0)}italic_g ( bold_c ) = ( italic_h start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ∧ italic_h start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT ) → italic_h start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT.

First, we train the model on the dataset completely without y𝑦yitalic_y labels, i.e. ζk(0)=1superscriptsubscript𝜁𝑘01\zeta_{k}^{(0)}=-1italic_ζ start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT = - 1 for each sample k𝑘kitalic_k. The model is able to reconstruct y𝑦yitalic_y by using the rules. The predicted probabilities are shown in Fig. 4. Second, we train the model for the same dataset but with “if and only if” rule g(𝐜)=h2(0)(h2(1)h2(2))𝑔𝐜superscriptsubscript20superscriptsubscript21superscriptsubscript22g(\mathbf{c})=h_{2}^{(0)}\leftrightarrow(h_{2}^{(1)}\wedge h_{2}^{(2)})italic_g ( bold_c ) = italic_h start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT ↔ ( italic_h start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ∧ italic_h start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT ). The predicted probabilities are shown in Fig. 5. Note, that the shape of Pr(y=2)Pr𝑦2\mathop{\rm Pr}(y=2)roman_Pr ( italic_y = 2 ) is fully determined by the predicted Pr(c(1)=2)Prsuperscript𝑐12\mathop{\rm Pr}(c^{(1)}=2)roman_Pr ( italic_c start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT = 2 ) and Pr(c(2)=2)Prsuperscript𝑐22\mathop{\rm Pr}(c^{(2)}=2)roman_Pr ( italic_c start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT = 2 ), while Pr(c(3)=2)Prsuperscript𝑐32\mathop{\rm Pr}(c^{(3)}=2)roman_Pr ( italic_c start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT = 2 ) does not affect y𝑦yitalic_y.

Refer to caption
Figure 4: Predicted probabilities with the implication rule
Refer to caption
Figure 5: Predicted probabilities with the “if and only if” rule

6.2 Multi-label MNIST

The second example is with an artificial dataset constructed on a part of the real labeled handwritten digits image dataset MNIST consisting of 5000 randomly selected images. We consider digit labels as the concept c(1)superscript𝑐1c^{(1)}italic_c start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT (not the main target). An additional synthetic feature is the digit color. Each digit is randomly colored in white or blue corresponding to c(2)=1superscript𝑐21c^{(2)}=1italic_c start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT = 1 or c(2)=2superscript𝑐22c^{(2)}=2italic_c start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT = 2, respectively. The main label y=c(0)𝑦superscript𝑐0y=c^{(0)}italic_y = italic_c start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT is defined as the following: odd blue digits or even white digits are assigned to y=1𝑦1y=1italic_y = 1, the rest are assigned to y=2𝑦2y=2italic_y = 2.

We compare three different types of heads: AS-Head, Joint Distribution Head (AS-Head without expert rules) and Independent Classification Heads without rules. The Independent Classification Heads model differs from the first two models. It considers concepts as independent targets (classes) and predicts probabilities for the targets separately. The first head is given the same rule that was used for constructing labels for y𝑦yitalic_y. The second head predicts a joint distribution and then calculates marginals from it. The third head, a baseline, is a plain multi-label multi-class classification head, where probabilities for each head are predicted independently. Results are shown in Fig. 6, where the F1subscript𝐹1F_{1}italic_F start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT measure as a function of the labeled data ratio is provided. The higher the labeled data fraction, the easier is the task, therefore all three curves almost coincide at the fraction of 0.50.50.50.5. However when only a small amount of labeled data is available, the proposed AS-Head, that takes expert rules into account, performs systematically better than the baseline.

Refer to caption
Figure 6: Test performance (F1subscript𝐹1F_{1}italic_F start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT) depending on the labeled data ratio

7 Conclusion

We formulated the problem of incorporating the expert rules into machine learning models for extending the concept-based learning for the first time. We have shown how to combine logical rules and neural networks predicting the concept probabilities. Several approaches have been proposed in order to solve the stated problem and to implement the idea behind the use of expert rules in machine learning. The proposed approaches have provided ways of constructing and training a neural network which guarantees that the output probabilities of concepts satisfy the expert rules. These ways are based on representing sets of possible probability distributions of concepts by means of a convex polytope such that the use of its vertices or its faces allows the neural network to generate a probability distribution of concepts satisfying the expert rules.

It has been illustrated by the numerical examples that the proposed models compensate the incomplete concept labeling of instances in datasets. Moreover, the expert rules allow us to compensate a partial availability of targets in the training set.

The proposed approaches have different computational complexity depending on the number of concepts, the number of concept values, and the number of training examples.

The general problem of incorporating the expert rules into neural networks has been solved. However, there are problems where an application of the proposed models can significantly improve the accuracy and interpretability of models. In particular, it is interesting to adapt the proposed models to CBMs which also deal with concepts and can be combined with the expert rules. This is an important direction for further research.

References

  • [1] Isaac Lage and Finale Doshi-Velez. Learning interpretable concept-based models with human feedback. arXiv:2012.02898, Dec 2020.
  • [2] Bowen Wang, Liangzhi Li, Yuta Nakashima, and Hajime Nagahara. Learning bottleneck concepts in image classification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10962–10971, 2023.
  • [3] Been Kim, Martin Wattenberg, Justin Gilmer, Carrie Cai, James Wexler, Fernanda Viegas, et al. Interpretability beyond feature attribution: Quantitative testing with concept activation vectors (tcav). In International conference on machine learning, pages 2668–2677. PMLR, 2018.
  • [4] Chih-Kuan Yeh, Been Kim, Sercan Arik, Chun-Liang Li, Tomas Pfister, and Pradeep Ravikumar. On completeness-aware concept-based explanations in deep neural networks. In Advances in neural information processing systems, volume 33, pages 20554–20565, 2020.
  • [5] Pang Wei Koh, Thao Nguyen, Yew Siang Tang, Stephen Mussmann, Emma Pierson, Been Kim, and Percy Liang. Concept bottleneck models. In International conference on machine learning, pages 5338–5348. PMLR, 2020.
  • [6] Mateo Espinosa Zarlenga, Pietro Barbiero, Gabriele Ciravegna, Giuseppe Marra, Francesco Giannini, Michelangelo Diligenti, Zohreh Shams, Frederic Precioso, Stefano Melacci, Adrian Weller, et al. Concept embedding models: Beyond the accuracy-explainability trade-off. In Advances in Neural Information Processing Systems, volume 35, pages 21400–21413, 2022.
  • [7] C. Wah, S. Branson, P. Welinder, P. Perona, and S. Belongie. The caltech-ucsd birds-200-2011 dataset. Technical report, Technical report, California Institute of Technology, 2011.
  • [8] Varsha Pendyala and Jihye Choi. Concept-based explanations for tabular data. arXiv:2209.05690, Sep 2022.
  • [9] Yangqing Jia, Joshua T Abbott, Joseph L Austerweil, Tom Griffiths, and Trevor Darrell. Visual concept learning: Combining machine vision and bayesian generalization on concept hierarchies. In Advances in Neural Information Processing Systems, volume 26, pages 1–9, 2013.
  • [10] Maximilian Dreyer, Reduan Achtibat, Wojciech Samek, and Sebastian Lapuschkin. Understanding the (extra-) ordinary: Validating deep model decisions with prototypical concept-based explanations. arXiv:2311.16681, Nov 2023.
  • [11] Lena Heidemann, Maureen Monnet, and Karsten Roscher. Concept correlation and its effects on concept-based models. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 4780–4788, 2023.
  • [12] Katherine Maeve Collins, Matthew Barker, Mateo Espinosa Zarlenga, Naveen Raman, Umang Bhatt, Mateja Jamnik, Ilia Sucholutsky, Adrian Weller, and Krishnamurthy Dvijotham. Human uncertainty in concept-based ai systems. In Proceedings of the 2023 AAAI/ACM Conference on AI, Ethics, and Society, pages 869–889, 2023.
  • [13] Kaiwen Xu, Kazuto Fukuchi, Youhei Akimoto, and Jun Sakuma. Statistically significant concept-based explanation of image classifiers via model knockoffs. arXiv:2305.18362, May 2023.
  • [14] Ričards Marcinkevičs, Patricia Reis Wolfertstetter, Ugne Klimiene, Kieran Chin-Cheong, Alyssia Paschke, Julia Zerres, Markus Denzinger, David Niederberger, Sven Wellmann, Ece Ozkan, et al. Interpretable and intervenable ultrasonography-based machine learning models for pediatric appendicitis. Medical Image Analysis, 91:103042, 2024.
  • [15] A.A. Meldo, L.V. Utkin, M.S. Kovalev, and E.M. Kasimov. The natural language explanation algorithms for the lung cancer computer-aided diagnosis system. Artificial Intelligence in Medicine, 108(Article 101952):1–10, 2020.
  • [16] Cristiano Patrício, João C Neves, and Luis F Teixeira. Coherent concept-based explanations in medical image and its application to skin lesion diagnosis. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3798–3807, 2023.
  • [17] Cristiano Patrício, Luís F Teixeira, and João C Neves. Towards concept-based interpretability of skin lesion diagnosis using vision-language models. arXiv:2311.14339, Nov 2023.
  • [18] An Yan, Yu Wang, Yiwu Zhong, Zexue He, Petros Karypis, Zihan Wang, Chengyu Dong, Amilcare Gentili, Chun-Nan Hsu, **gbo Shang, et al. Robust and interpretable medical image classifiers via concept bottleneck models. arXiv:2310.03182, Oct 2023.
  • [19] Christoph Obermair, Alexander Fuchs, Franz Pernkopf, Lukas Felsberger, Andrea Apollonio, and Daniel Wollmann. Example or prototype? learning concept-based explanations in time-series. In Asian Conference on Machine Learning, pages 816–831. PMLR, 2023.
  • [20] Wensi Tang, Lu Liu, and Guodong Long. Interpretable time-series classification on few-shot samples. In 2020 International Joint Conference on Neural Networks (IJCNN), pages 1–8. IEEE, 2020.
  • [21] Jihye Choi, Jayaram Raghuram, Ryan Feng, Jiefeng Chen, Somesh Jha, and Atul Prakash. Concept-based explanations for out-of-distribution detectors. In International Conference on Machine Learning, pages 5817–5837. PMLR, 2023.
  • [22] Laya Rafiee Sevyeri, Ivaxi Sheth, Farhood Farahnak, and Shirin Abbasinejad Enger. Transparent anomaly detection via concept-based explanations. arXiv:2310.10702, Oct 2023.
  • [23] Anita Mahinpei, Justin Clark, Isaac Lage, Finale Doshi-Velez, and Weiwei Pan. Promises and pitfalls of black-box concept learning models. arXiv:2106.13314, Jun 2021.
  • [24] Jae Hee Lee, Sergio Lanza, and Stefan Wermter. From neural activations to concepts: A survey on explaining concepts in neural networks. arXiv:2310.11884, Oct 2023.
  • [25] Mert Yuksekgonul, Maggie Wang, and James Zou. Post-hoc concept bottleneck models. arXiv:2205.15480, May 2022.
  • [26] I. Sheth and S.E. Kahou. Auxiliary losses for learning generalizable concept-based models. arXiv:2311.11108, Nov 2023.
  • [27] Eunji Kim, Dahuin Jung, Sangha Park, Siwon Kim, and Sungroh Yoon. Probabilistic concept bottleneck models. arXiv:2306.01574, Jun 2023.
  • [28] Aya Abdelsalam Ismail, Julius Adebayo, Hector Corrada Bravo, Stephen Ra, and Kyunghyun Cho. Concept bottleneck generative models. In Proceedings of ICML 2023. Workshop on Deployment Challenges for Generative AI, https://openreview.net/group?id=ICML.cc/2023/Workshop, pages 1–10, 2023.
  • [29] Naveen Raman, Mateo E. Zarlenga, Juyeon Heo, and Mateja Jamnik. Do concept bottleneck models obey locality? arXiv:2401.01259, Jan 2024.
  • [30] Andrei Margeloiu, Matthew Ashman, Umang Bhatt, Yanzhi Chen, Mateja Jamnik, and Adrian Weller. Do concept bottleneck models learn as intended? arXiv:2105.04289, May 2021.
  • [31] R. Marcinkevics, S. Laguna, M. Vandenhirtz, and J.E. Vogt. Beyond concept bottleneck models: How to make black boxes intervenable? arXiv:2401.13544, Jan 2024.
  • [32] Yan Cui, Shuhong Liu, Liuzhuozheng Li, and Zhiyuan Yuan. Ceir: Concept-based explainable image representation learning. arXiv:2312.10747, Dec 2023.
  • [33] Yoshihide Sawada and Keigo Nakamura. Concept bottleneck model with additional unsupervised concepts. IEEE Access, 10:41758–41765, 2022.
  • [34] Xinyue Xu, Yi Qin, Lu Mi, Hao Wang, and Xiaomeng Li. Energy-based concept bottleneck models: unifying prediction, concept intervention, and conditional interpretations. arXiv:2401.14142, Jan 2024.
  • [35] Kushal Chauhan, Rishabh Tiwari, Jan Freyberg, Pradeep Shenoy, and Krishnamurthy Dvijotham. Interactive concept bottleneck models. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pages 5948–5955, 2023.
  • [36] Federico Pittino, Vesna Dimitrievska, and Rudolf Heer. Hierarchical concept bottleneck models for vision and their application to explainable fine classification and tracking. Engineering Applications of Artificial Intelligence, 118:105674, 2023.
  • [37] Marton Havasi, Sonali Parbhoo, and Finale Doshi-Velez. Addressing leakage in concept bottleneck models. In Advances in Neural Information Processing Systems, volume 35, pages 23386–23397, 2022.
  • [38] Ao Sun, Yuanyuan Yuan, **chuan Ma, and Shuai Wang. Eliminating information leakage in hard concept bottleneck models with supervised, hierarchical concept learning. arXiv:2402.05945, Feb 2024.
  • [39] Emanuele Marconato, Andrea Passerini, and Stefano Teso. Glancenets: Interpretable, leak-proof concept-based models. In Advances in Neural Information Processing Systems, volume 35, pages 21212–21227, 2022.
  • [40] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International conference on machine learning, pages 8748–8763. PMLR, 2021.
  • [41] Rémi Kazmierczak, Eloïse Berthier, Goran Frehse, and Gianni Franchi. CLIP-QDA: An explainable concept bottleneck model. arXiv:2312.00110, Dec 2023.
  • [42] Komei Fukuda. Exact algorithms and software in optimization and polyhedral computation. In Proceedings of the Twenty-First International Symposium on Symbolic and Algebraic Computation, pages 333–334, 2008.
  • [43] A.V. Konstantinov and L.V. Utkin. A new computationally simple approach for implementing neural networks with output hard constraints. Doklady Mathematics, 2023.