Training method and system of process fair machine learning model based on feature attribution interpretation

By dividing the data point set using the feature attribution explanation method and training the machine learning model using cross-entropy loss and process fairness loss, the problem of insufficient process fairness in the existing technology is solved, and the process fairness and outcome fairness of the model are improved.

CN121998123APending Publication Date: 2026-05-08LINGNAN UNIVERSITY +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LINGNAN UNIVERSITY
Filing Date
2024-10-31
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing technologies lack methods to improve the process fairness of machine learning models during training. Existing methods rely on human moral judgment, which is highly subjective, difficult to scale, and does not consider the logical fairness of the decision-making process behind the model's predictions.

Method used

By using a feature-based attribution explanation method, the data point set of the machine learning model is divided into sets with different sensitive attributes. The most similar data point pairs are extracted, and cross-entropy loss and process fairness loss are used as penalty terms to train an iterative model to optimize process fairness. A gradient-based feature attribution explanation method is adopted to reduce computational costs.

Benefits of technology

It significantly improves the process fairness and outcome fairness of machine learning models, while having a negligible impact on the accuracy of model predictions and keeping computational costs under control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121998123A_ABST
    Figure CN121998123A_ABST
Patent Text Reader

Abstract

The invention provides a method for training a process fair machine learning model based on feature attribution interpretation. The method comprises the following steps: (a) dividing a data point set of the machine learning model into a first set X1 and a second set X2 with different sensitive attributes according to the sensitive attributes; (b) extracting k data point pairs from the first set X1 and the second set X2, wherein the similarity measurement index of two data points in each data point pair is minimum; (c) based on the cross entropy loss LCE of the machine learning model f theta, taking the process fairness loss LGPF as a penalty term to carry out regular term penalty with a hyper-parameter of alpha so as to obtain the total loss L of the target function, and training and iterating the machine learning model f theta until the total loss L of the target function is converged; and (d) outputting the trained machine learning model f theta. The invention further provides a corresponding training system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure generally relates to the training of machine learning models. In particular, this disclosure relates to the training of process-fair machine learning models based on feature attribution explanations. Background Technology

[0002] With the widespread application of artificial intelligence (AI), its fairness has become a primary concern. Ensuring the fairness of AI decision-making is crucial to avoiding exacerbating existing social inequalities. Generally, in the context of decision-making, fairness means "not having any bias or preference based on the inherent or acquired characteristics of an individual or group." Therefore, researching fairness in AI and machine learning is imperative for promoting the responsible and inclusive deployment of AI technologies.

[0003] Fairness typically encompasses two dimensions: outcome fairness—focusing on the fairness of decision outcomes, also known as distributive fairness; and procedural fairness—studying the fairness of the decision-making process that leads to those outcomes, also known as procedural fairness. The procedural fairness of a machine learning model refers to the internal decision-making logic / process of the model, ensuring it is not subject to any bias or preference due to inherent or acquired characteristics of individuals or groups.

[0004] While research on fairness in artificial intelligence has primarily focused on outcome fairness, researchers are increasingly recognizing the importance of procedural fairness. Although procedural fairness is considered key to achieving overall fairness and is regarded as a more reliable standard than outcome fairness, existing technologies and methods tend to focus on improving the outcome fairness of machine learning models, and there is still a lack of methods to improve the procedural fairness of machine learning models during training.

[0005] In existing research on procedural fairness, some studies rely on the inherent fairness of the features of the training model, measuring procedural fairness through "human moral judgment or intuition regarding the fairness of using input features in a decision-making context." In other words, the defined procedural fairness is based on human evaluation, which is easily influenced by human subjectivity, possesses strong subjectivity and limitations, and is difficult to extend. Another approach involves manually judging the fairness of each input feature and then using feature selection to remove features deemed unfair by the humans to improve the procedural fairness of the machine learning model. However, this method only perceives the procedural fairness of the machine learning model based on input features, without considering whether the decision-making process or logic behind the model's predictions is fair. Summary of the Invention

[0006] Various aspects and advantages of this disclosure will be set forth in part in the description which follows, or may become apparent from the description, or may be learned by practice of the art.

[0007] This application proposes a training method for a process-fair machine learning model based on feature attribution explanation, comprising the following steps: (a) dividing the data point set of the machine learning model into a first set X1 and a second set X2 with different sensitivity attributes according to the sensitivity attributes; (b) extracting k pairs of data points from the first set X1 and the second set X2, wherein the similarity metric of the two data points in the data point pair is the smallest, one of the data point pairs belongs to the first set X1, and the other of the data point pair belongs to the second set X2. The k data points originally belonging to the first set X1 are selected to form a third set X′1, and the k data points originally belonging to the second set X′2 are selected to form a fourth set X′2. The data point pairs are represented as follows: and Where i = 1, 2, ..., k; (c) Based on machine learning model f θ Cross-entropy loss L CE Loss of process fairness L GPF A regularization term with hyperparameter α is used as a penalty term to obtain the total loss L of the objective function, and then the iterative machine learning model f is trained. θ Until the total loss L of the objective function converges; and (d) output the trained machine learning model f. θ .

[0008] In some embodiments, the total loss L of the objective function is expressed as L = L CE +α×L GPF Loss of process fairness L GPF The calculation formula is as follows:

[0009]

[0010] in, g() is the local feature attribution explanation function, l q Indicates distance.

[0011] In some embodiments, l q For distance l1, the process fairness loss L GPF The calculation formula is as follows:

[0012]

[0013] In some embodiments, the hyperparameter α = 0.5.

[0014] In some embodiments, step (a) is represented as follows:

[0015] The first set X1 = {x (i) ∈X|s (i) =s1},

[0016] The second set X2 = {x (i) ∈X|s(i) =s2},

[0017] Here, s1 and s2 are two values ​​with different sensitivity attributes, s (i) It is data point x (i) The sensitive attribute value it possesses, X is the machine learning model f θ The set of data points with quantity m, i = 1, 2, ..., m.

[0018] In some embodiments, the method for extracting k pairs of data points from the first set X1 and the second set X2 in step (b) is as follows:

[0019] in It is an empty set;

[0020] For X1 By making and Data similarity metrics between Minimum to find the smallest in X2 Will in, Select One data point pair;

[0021] For X2 By making and Data similarity metrics between Minimum to find the smallest in X1 in, Select the remaining Data point pairs.

[0022] In some embodiments, the data similarity metric d x (,) represents the Euclidean distance.

[0023] In some embodiments, the Adam optimizer is used to update the model gradient parameters.

[0024] This disclosure also proposes a training system for a process-fair machine learning model based on feature attribution explanation, including: a sensitive attribute partitioning module, a data point pair extraction module, a training module based on feature attribution explanation, and an output module. The sensitive attribute partitioning module partitions the data point set of the machine learning model into a first set X1 and a second set X2 with different sensitive attributes. The data point pair extraction module extracts k pairs of data points from the first set X1 and the second set X2, where the two data points in a pair have the lowest similarity metric. One data point in the pair belongs to the first set X1, and the other belongs to the second set X2. The k data points originally belonging to the first set X1 form a third set X′1, and the k data points originally belonging to the second set X2 form a fourth set X′2. The data point pairs are represented as follows: and Where i = 1, 2, ..., k. The training module based on feature attribution explanation is based on the machine learning model f. θ Cross-entropy loss L CE Loss of process fairness L GPF A regularization term with hyperparameter α is used as a penalty term to obtain the total loss L of the objective function, and the machine learning model f is trained iteratively. θ The process continues until the total loss L of the objective function converges. The output module then outputs the trained machine learning model f. θ .

[0025] In some embodiments, the total loss L of the objective function is expressed as L = L CE +α×L GPF Loss of process fairness L GPF The calculation formula is as follows:

[0026]

[0027] in, g() is the local feature attribution explanation function, l q Indicates distance.

[0028] In some embodiments, l q For distance l1, the process fairness loss L GPF The calculation formula is as follows:

[0029]

[0030] In some embodiments, the hyperparameter α = 0.5.

[0031] In some embodiments, in the sensitive attribute segmentation module,

[0032] The first set X1 = {x (i) ∈X|s(i) =s1},

[0033] The second set X2 = {x (i) ∈X|s (i) =s2},

[0034] Here, s1 and s2 are two values ​​with different sensitivity attributes, s (i) It is data point x (i) The sensitive attribute value it possesses, X is the machine learning model f θ The set of data points with quantity m, i = 1, 2, ..., m.

[0035] In some embodiments, the data point pair extraction module extracts k data point pairs from the first set X1 and the second set X2, including:

[0036] in It is an empty set;

[0037] For X1 By making and Data similarity metrics between Minimum to find the smallest in X2 Will in, Select One data point pair;

[0038] For X2 By making and Data similarity metrics between Minimum to find the smallest in X1 in, Select the remaining Data point pairs.

[0039] In some embodiments, the data similarity metric d x (,) represents the Euclidean distance.

[0040] In some embodiments, the Adam optimizer is used to update the model gradient parameters.

[0041] These and other features, aspects, and advantages of this disclosure will become more readily understood with reference to the description below and the appended claims. The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments of the technology and, together with the specification, serve to explain the principles of the technology. Attached Figure Description

[0042] The present disclosure is fully and practically available with reference to the accompanying drawings, which are intended for those skilled in the art and include the best mode of making and using the system and method, as shown in the drawings:

[0043] Figure 1 A flowchart illustrating a training method for a process-fair machine learning model based on feature attribution explanation according to a partial embodiment of the present invention is shown.

[0044] Figure 2 A schematic diagram of a training system for a process-fair machine learning model based on feature attribution explanation according to a partial embodiment of the present invention is shown.

[0045] Figure 3 This diagram illustrates the relationship between features and class labels in a synthetic dataset according to a partial embodiment of the present invention.

[0046] Figure 4 A schematic diagram illustrating the visualization of SHAP interpretations of sensitive attributes obtained by the method according to some embodiments of the present invention and the method for comparison is shown. Detailed Implementation

[0047] Embodiments of this disclosure will now be described in detail with reference to the accompanying drawings, one or more examples of which are illustrated. The word “exemplary” is used herein to mean “serving as an example, instance, or illustration.” Any implementation described herein as “exemplary” is not necessarily to be construed as being more preferred or advantageous than other implementations. Furthermore, each example is provided by way of explanation rather than limitation. Indeed, it will be apparent to those skilled in the art that modifications and variations can be made to this technology without departing from the scope or spirit of the claimed technology. For example, features shown or described as part of one embodiment may be used with another embodiment to produce yet another embodiment. Therefore, this disclosure is intended to cover such modifications and variations within the scope of the appended claims and their equivalents. Numerical and alphabetic designations are used in the detailed description to denote features in the drawings. Similar or analogous designations in the drawings and specification are used to refer to similar or analogous parts in this disclosure.

[0048] As used herein, the terms “first,” “second,” and “third” are used interchangeably to distinguish one component from another, rather than to indicate the position or importance of a single component. The singular expressions “a,” “an,” and “the” also include plural cases, unless the context explicitly specifies otherwise. The terms “coupled,” “fixed,” “connected to,” etc., refer to direct coupling, fixing, or connection, as well as indirect coupling, fixing, or connection through one or more intermediate components or features, unless otherwise specified herein. The terms “comprising,” “including,” “constituting,” “having,” or any other variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, article, or apparatus that includes a set of features is not necessarily limited to those features, but may include features not expressly listed or other features inherent to such process, method, article, or apparatus. Furthermore, unless expressly stated to the contrary, “or” is inclusive rather than exclusive. For example, any of the following satisfy conditions A or B: A is true (or exists) and B is false (or does not exist); A is false (or does not exist) and B is true (or exists); and both A and B are true (or exist).

[0049] Terms indicating approximation, such as “approximately,” “roughly,” “approximately,” or “substantially,” include values ​​that are within 10% larger or smaller than the described value. When used in the context of angles or directions, these terms include values ​​that are within 10 degrees larger or smaller than the described angle or direction. For example, “roughly vertical” includes directions that deviate from vertical by within 10 degrees in any direction (e.g., clockwise or counterclockwise).

[0050] The benefits, other advantages, and solutions to problems are described below with reference to specific embodiments. However, the benefits, advantages, solutions to problems, and any features that may cause any benefit, advantage, or solution to occur or become more apparent should not be construed as key, necessary, or essential features of any or all claims.

[0051] The decision-making process is a core element and cornerstone of perceived process fairness. Currently, there is no method to improve process fairness during the training of machine learning models. This prompted the inventors to propose a new method to improve process fairness during the training of machine learning models: considering Global Process Fairness (GPF) during the model construction process. FAE Metrics can be used to improve process fairness. Compared to typically trained machine learning models, the process fairness of the model can be significantly improved.

[0052] Procedural fairness captures the fairness of the model's decision-making process, unlike outcome fairness which considers the equality of model predictions (outputs) across different individuals and groups. Procedural fairness includes individual procedural fairness and group procedural fairness. Individual procedural fairness refers to the expectation that two similar samples should have similar decision logic / processes. Group procedural fairness (GPF) refers to the expectation that similar samples in two groups should have similar decision logic / processes. FAE The metric is used to evaluate the group process fairness of machine learning models. GPF FAE Feature Attribution Explanation (FAE) is used to characterize the decision-making logic of machine learning models. FAE is a widely accepted and used interpretable artificial intelligence technique that elucidates the decision-making process of a machine learning model by quantifying the contribution of each input feature to a given data point. FAE is a type of interpretable artificial intelligence (XAI) that explains the machine learning model's decisions by calculating the attribution (i.e., the importance score of each input feature) for each input feature. Based on the method of generating the explanation, FAE methods can be divided into perturbation-based methods and gradient-based methods. Gradient-based methods are computationally efficient, while perturbation-based methods (e.g., SHAP) are theoretically safer. Specifically, GPF... FAE It can be defined as:

[0053] GPF FAE =D(E1,E2);

[0054]

[0055] in and This represents a set of k data points selected from two distinct groups, X1 and X2. For example, groups X1 and X2 could represent the male and female groups, respectively; they could also represent the white and colored groups, respectively; and so on. Each pair... and These are the data points that are most similar to each other across different groups. g represents the local feature attribution function, which is the function that explains the machine learning model f. θ and the data point x being explained (i) As input, it returns the feature attribution explanation result (i.e., feature importance score). (i) =g(f θ ,x (i) )∈R d D(·,·) is an evaluation metric for the distance between two sets of feature attribution explanations, E1 and E2. It uses the maximum mean difference with an exponential kernel function to measure the difference between the distributions of the two explanations, and the p-value obtained by performing a permutation test on the generated kernel matrix is ​​used as the final evaluation result.

[0056] This invention considers GPF in the form of regularization terms. FAE The goal is to improve the process fairness of machine learning models by optimizing process fairness metrics during training. However, directly optimizing GPF... FAE The indicator is undesirable, mainly due to the following two problems:

[0057] (1)GPF FAE It is not differentiable, therefore it cannot be optimized in conventional machine learning models;

[0058] (2) Optimize GPF during training FAE When calculating metrics, it is necessary to obtain the interpretation results of the current machine learning model at each epoch. As mentioned above, although the perturbation-based SHAP interpretation method can be adopted, this method is very time-consuming, making it impractical to obtain its SHAP interpretation results at each epoch.

[0059] To solve the problem (1), this invention modifies the GPF during the training of the machine learning model. FAE Adjustments are made and included as a penalty term in the loss function, denoted as the process fairness loss L. GPF Specifically, the present invention utilizes l q Distance is used to evaluate the difference between interpretations of similar data points in two interpretation sets, as follows:

[0060]

[0061] l q The distance can be l1, l2, etc. In a preferred embodiment, the present invention uses a distance of l1.

[0062]

[0063] To address problem (2), namely the excessive interpretation time cost caused by the SHAP interpretation method, this invention uses a gradient-based feature attribution interpretation method during the training phase, leveraging the speed advantage of the gradient-based feature attribution interpretation method to overcome this problem. In other words, L GPF The calculation is the average of the differences in interpretation of k pairs of similar data points by the gradient-based feature attribution method.

[0064] The pseudocode for the above method is shown in Algorithm 1.

[0065]

[0066]

[0067] First, in the pseudocode in lines 1-2, the training dataset is divided into X1 and X2 based on the sensitive attribute s.

[0068] Then, for each data point, find the data point that is most similar to it but differs from its sensitivity attribute value. This process can begin with the data points in X1. By making and Data similarity metrics between Minimum to find the smallest in X2 Will In order to maintain the fairness of the process, Search Half of the data can be extracted, that is Select A pair of data points. Then, through... Search Extract the other half of the data. That is, for X2... By making and Data similarity metrics between Minimum to find the smallest in X1 in, Select the remaining There are 10 data point pairs. It can be understood that the extraction order and the number of data pairs extracted in sequence can be adjusted as needed. Where d... x It can be defined in various ways, such as Euclidean distance.

[0069] The pseudocode in lines 3-11 provides the interpretation results. At this point, X′1 and X′2 contain all training data and their most similar data points. The data points corresponding to the superscripts are... and They are a pair of most similar data points.

[0070] Then, in the pseudocode lines 12-19, iterative training begins. First, the cross-entropy loss L of the current model is calculated. CE (Pseudocode line 13) and the procedural fairness loss L GPF (Pseudocode lines 14-16). Then, obtain the total loss L (pseudocode line 17) and update the model parameters (pseudocode line 18). After the iteration is complete, output the trained machine learning model f. θ (Pseudocode on line 20).

[0071] Training methods for process-fair machine learning models based on feature attribution explanations can be embodied in 100 Figure 1In the flowchart described above, in step 110, the data point set of the machine learning model is divided into a first set X1 and a second set X2 with different sensitivity attributes based on the sensitivity attributes. In step 120, k pairs of data points are extracted from the first set X1 and the second set X2, where the similarity metric between the two data points in a pair is the smallest. One data point in a pair belongs to the first set X1, and the other belongs to the second set X2. The k data points originally belonging to the first set X1 form the third set X′1, and the k data points originally belonging to the second set X2 form the fourth set X′2. The data point pairs are represented as follows: and Where i = 1, 2, ..., k. In step 130, based on the machine learning model f θ Cross-entropy loss L CE Loss of process fairness L GPF A regularization term with hyperparameter α is used as a penalty term to obtain the total loss L of the objective function, and then the iterative machine learning model f is trained. θ This continues until the total loss L of the objective function converges. In step 140, the trained machine learning model f is output. θ .

[0072] Training systems for process-fair machine learning models based on feature attribution explanation (e.g., 200) Figure 2 As shown. System 200 includes: a sensitive attribute segmentation module 210, a data point pair extraction module 220, a feature-based attribution interpretation training module 230, and an output module 240. Modules 210-240 execute accordingly. Figure 1 Steps 110-140 are repeated here.

[0073] To verify the effectiveness of the proposed method, experiments were conducted on seven datasets, including six real-world datasets widely used in fair machine learning and one synthetic dataset. The six datasets are Adult, Bank, COMPAS, Default, KDD, and LSAT. Notably, for the three inherently fair datasets (Bank, Default, and KDD), since their fairness index (DP, or demographic equality or statistical equality) values ​​are less than 0.10, data points labeled "1" in the dominant group were randomly resampled until their DP values ​​exceeded 0.10. These resampled datasets were designated "Unfair Bank," "Unfair Default," and "Unfair KDD." For the synthetic dataset, a dataset containing 20,000 data points was constructed. Specifically, 20,000 binary class labels y were first randomly generated. Then, samples were drawn from two different Gaussian distributions, and features x1 and x2 were associated with each label:

[0074] p([x1,x2]|y=1)=N([2;2],[5,1;1,5]),

[0075] p([x1,x2]|y=0)=N([-2;-2],[10,1;1,3]).

[0076] In addition, sensitive feature x s Then sample from two different Bernoulli distributions: p(x s |y=1)=Bernoulli(p), p(x s |y=0)=Bernoulli(1-p). Proxy feature x p ~N(x) s (0.5). Clearly, the parameter p controls the degree of bias (unfairness) in this synthetic dataset. Here, we set the parameter p to 0.65 and define the dataset as Synthetic-0.65. The relationship between features and class labels in the synthetic dataset is as follows: Figure 3 As shown, consistent preprocessing was performed on each dataset: categorical features were labeled and then normalized using Z-score normalization. Furthermore, each dataset was randomly divided into training and test sets in a 4:1 ratio.

[0077] In the experiments described above, a single-hidden-layer neural network model was trained as a classifier on each dataset using the ReLU activation function and the Adam optimizer. The total loss consisted of the binary cross-entropy loss L. CE And process fairness loss L GPFThe components are composed of elements and weighted by the parameter α. Except for the KDD dataset, which has a large number of features, resulting in a hidden layer node count of 64, the hidden layer node count for each model is set to 32. The number of iterations and the learning rate are set to 300 and 0.01, respectively. For GPF... FAE The parameter k (logarithm of similar data points) in the metric is set to 100. As for the hyperparameter α (in the method of this application, hyperparameter α is used to balance the cross-entropy loss L),... CE And process fairness loss L GPF Instead of specifically adjusting this parameter for each dataset, it was uniformly set to 0.5. For the outcome fairness metric DP, the implementation from the open-source Python algorithm fairness toolkit AI Fairness 360 was used. All experiments were run 10 times independently using different random number seeds.

[0078] The baseline method used for comparison with the proposed method is a neural network model trained using only the binary cross-entropy function as the loss function (with the model structure and other parameters remaining unchanged), hereinafter referred to as MLP. BCE In this model, MLP stands for Multilayer Perceptron, and BCE stands for Binary Cross-Entropy Loss. Evaluation metrics include Model Prediction Accuracy (ACC) and Process Fairness (GPF). FAE The experiment compared the changes in process fairness and outcome fairness of machine learning models before and after considering process fairness, as well as their impact on the model's predictive accuracy.

[0079] Table 1 shows the method and MLP proposed in this application. BCE The comparison results of the method on seven datasets lead to the following conclusions:

[0080] (1) The method proposed in this application significantly improves procedural fairness. Especially on datasets other than COMPAS and LSAT, the method proposed in this application reduces GPF. FAE The metric improved from near 0.0 to near or reaching 1.0. Even on the COMPAS and LSAT datasets, MLP... BCE The initial GPF of the model FAE The index value is relatively high, but the method proposed in this application can still significantly improve GPF. FAE Indicator value.

[0081] (2) The method proposed in this application has a negligible impact on model performance. On seven datasets, the average loss in model accuracy is 0.9%. This indicates that the method proposed in this application effectively improves the fairness of the model without significantly affecting its predictive performance.

[0082] (3) Outcome fairness also benefits significantly from the method proposed in this application. The outcome fairness metric DP of the method proposed in this application shows significant improvement on the vast majority of datasets. In particular, on the Unfair Bank, UnfairDefault, Unfair KDD, and LSAT datasets, the optimization of GPF further enhances the effectiveness of the proposed method. FAE After adjusting for the metric, the DP value has decreased to a smaller range. This indicates that improving the process fairness of the model also helps to improve its outcome fairness.

[0083] Table 1 shows the performance of the two methods on each dataset for ACC and GPF. FAE Evaluation results for the DP metric. The better result from the two methods is underlined. ↑ indicates a larger metric is better, ↓ indicates a smaller metric is better. The average results for the seven datasets are shown at the bottom.

[0084]

[0085]

[0086] Figure 4 Two methods were compared to obtain the SHAP values ​​of sensitive attributes for machine learning models on each dataset. The interpretations of the SHAP values ​​for sensitive attributes obtained by both methods were visualized to observe whether and how sensitive attributes influence the decision-making process of the two machine learning models. This is because the impact of sensitive attributes on the decision-making process can also reflect the procedural fairness of the machine learning model. (This is related to the method used to evaluate GPF.) FAE With consistent data points for the metrics, the SHAP values ​​of the sensitive attributes of the dataset X′=X′1∪X′2 are visualized. Figure 4 This visualization shows the explanatory distribution of the sensitivity attributes for k pairs of similar data points with different sensitivity attributes. Each row in the visualization corresponds to the interpretation result of a specific method for the sensitivity attributes in the dataset. For example, the row labeled "Adult-MLP"... BCE The first line of "-Sex" indicates MLP BCE The visualization results of the model on the "gender" sensitivity attribute in the Adult dataset. Each dark gray dot and light gray dot represent a data point in X′ belonging to the dominant and disadvantaged groups, respectively. The value corresponding to the x-axis of this data point is the interpretation result of the SHAP method for the sensitivity attribute of that data point. It represents the impact of the sensitivity attribute of the data point on its decision (importance score). Among them, the larger the absolute value of SHAP, the greater its impact on the decision, while the positive / negative sign represents a positive / negative benefit to the decision.

[0087] from Figure 4 As can be seen from this, regarding MLP BCERegarding the model, on datasets other than COMPAS and LSAT, the dominant group clearly gained positive benefits in the decision-making process, while the disadvantaged group was negatively affected. This indicates that there is a bias favoring the dominant group in the decision-making process of machine learning models. Conversely, on the COMPAS and LSAT datasets, neither group showed significant bias. Instead, the method in this application optimizes the GPF. FAE After analyzing the metrics, it was found that the sensitive attributes no longer affected the decision-making process across all datasets. Therefore, this further demonstrates the effectiveness of the proposed method in improving procedural fairness in machine learning models.

[0088] Furthermore, although the method for obtaining FAE interpretations during training was changed from SHAP to a more efficient gradient-based method, it obviously incurs a certain computational cost because it requires calculating the interpretation results of all training data in each iteration. Therefore, the inventors compared the method proposed in this application with directly training an MLP. BCE The runtime cost of the model is shown in Table 2. The computing environment was a Linux server equipped with an AMD Ryzen Threadripper PRO 3995WX 64-core processor and 512GB of memory.

[0089] Table 2 compares the average runtime (in seconds) of training the model on each dataset. The average results for the seven datasets are shown at the bottom.

[0090]

[0091] Table 2 shows the optimization of GPF FAE The metrics do incur some computational costs, with an average training time of approximately 8.6 seconds. While this is roughly twice the time required for standard training, it is still a relatively fast process.

[0092] In summary, this invention is the first to propose a method for improving procedural fairness in machine learning models during training. This is a simple yet effective approach that considers the procedural fairness metric GPF (General Process Fairness) as a regularization term during optimization. FAE This significantly improves the procedural fairness of the model. Experiments on a synthetic dataset and six real datasets demonstrate that the proposed method significantly improves the procedural fairness of the machine learning model, and the outcome fairness is also significantly improved; the impact on the accuracy of the machine learning model is minimal, averaging only 0.9%; and the required time cost is kept within an acceptable range.

[0093] This specification uses examples to disclose, including best practices, and to enable any person skilled in the art to practice this disclosure, including making and using any device or system and methods of performing any combination. The patent scope of this disclosure is defined by the claims, but may include other examples that would occur to a person skilled in the art. The scope of the claims covers such other examples if they include structural elements that are not distinct from the literal expression of the claims, or if they include equivalent structural elements that are not substantially different from the literal expression of the claims.

Claims

1. A training method for a process-fair machine learning model based on feature attribution explanation, comprising the following steps: (a) Divide the set of data points for the machine learning model into a first set X1 and a second set X2 with different sensitivity attributes based on the sensitivity attributes; (b) Extract k pairs of data points from the first set X1 and the second set X2, wherein the similarity metric of the two data points in each pair is the smallest, one of the data points in each pair belongs to the first set X1, and the other belongs to the second set X2. The k data points originally belonging to the first set X1 are selected to form the third set X. ′ 1. Select the k data points that originally belonged to the second set X2 to form the fourth set X. ′ 2. The data point pairs are represented as follows: and Where i = 1, 2, ..., k; (c) Based on machine learning model f θ Cross-entropy loss L CE Loss of process fairness L GPF A regularization term with hyperparameter α is used as a penalty term to obtain the total loss L of the objective function, and the machine learning model f is trained iteratively. θ Until the total loss L of the objective function converges; and (d) Output the trained machine learning model f θ .

2. The training method according to claim 1, wherein, The total loss L of the objective function is expressed as L = L CE +α×L GPF The process fairness loss L GPF The calculation formula is as follows: in, g() is the local feature attribution explanation function, l q Indicates distance.

3. The training method according to claim 2, wherein, l q Given a distance of l1, the process fairness loss L GPF The calculation formula is as follows:

4. The training method according to claim 2, wherein, The hyperparameter α = 0.

5.

5. The training method according to claim 1, wherein, Step (a) is represented as follows: The first set X1 = {x (i) ∈X|s (i) =s1}, The second set X2 = {x (i) ∈X|s (i) =s2}, Here, s1 and s2 are two values ​​with different sensitivity attributes, s (i) It is data point x (i) The sensitive attribute value it possesses, X is the machine learning model f θ The set of data points with quantity m, i = 1, 2, ..., m.

6. The training method according to claim 1, wherein, The method for extracting k pairs of data points from the first set X1 and the second set X2 in step (b) is as follows: in It is an empty set; For X1 By making and Data similarity metrics between Minimum to find the smallest in X2 Will in, Select One data point pair; For X2 By making and Data similarity metrics between Minimum to find the smallest in X1 in, Select the remaining Data point pairs.

7. The training method according to claim 6, wherein, The data similarity metric d x (,) represents the Euclidean distance.

8. The training method according to claim 1, wherein, Update model gradient parameters using the Adam optimizer.

9. A training system for a process-fair machine learning model based on feature attribution explanation, comprising: A sensitive attribute partitioning module, which divides the data point set of the machine learning model into a first set X1 and a second set X2 with different sensitive attributes based on the sensitive attributes. The data point pair extraction module extracts k data point pairs from a first set X1 and a second set X2. The data point pairs in each pair have the lowest similarity metric, one data point in each pair belongs to the first set X1, and the other belongs to the second set X2. The k data points originally belonging to the first set X1 are then selected to form a third set X. ′ 1. Select the k data points that originally belonged to the second set X2 to form the fourth set X. ′ 2. The data point pairs are represented as follows: and Where i = 1, 2, ..., k; A training module based on feature attribution explanation, wherein the training module based on feature attribution explanation is based on machine learning model f θ Cross-entropy loss L CE Loss of process fairness L GPF A regularization term with hyperparameter α is used as a penalty term to obtain the total loss L of the objective function, and the machine learning model f is trained iteratively. θ Until the total loss l of the objective function converges; and The output module outputs the trained machine learning model f. θ .

10. The training system according to claim 9, wherein, The total loss L of the objective function is expressed as L = L CE +α×L GPF The process fairness loss L GPF The calculation formula is as follows: in, g() is the local feature attribution explanation function, l q Indicates distance.

11. The training system according to claim 10, wherein, l q Given a distance of l1, the process fairness loss L GPF The calculation formula is as follows:

12. The training system according to claim 10, wherein, The hyperparameter α = 0.

5.

13. The training system according to claim 9, wherein, In the sensitive attribute partitioning module, The first set X1 = {x (i) ∈X|s (i) =s1}, The second set X2 = {x (i) ∈X|s (i) =s2}, Here, s1 and s2 are two values ​​with different sensitivity attributes, s (i) It is data point x (i) The sensitive attribute value it possesses, X is the machine learning model f θ The set of data points with quantity m, i = 1, 2, ..., m.

14. The training system according to claim 9, wherein, The data point extraction module extracts k data point pairs from the first set X1 and the second set X2, including: in It is an empty set; For X1 By making and Data similarity metrics between Minimum to find the smallest in X2 Will in, Select One data point pair; For X2 By making and Data similarity metrics between Minimum to find the smallest in X1 in, Select the remaining Data point pairs.

15. The training system according to claim 14, wherein, The data similarity metric d x (,) represents the Euclidean distance.

16. The training system according to claim 9, wherein, Update model gradient parameters using the Adam optimizer.