Machine learning program, machine learning method, and information processing device
By dividing training data into subsets based on fairness conditions and generating multiple machine learning models, the solution addresses the challenge of balancing accuracy and fairness in machine learning predictions, resulting in improved model performance and ethical considerations.
Patent Information
- Application Number
- PCT/JP2023/033771
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-09-15
- Publication Date
- 2025-03-20
AI Technical Summary
Existing machine learning models struggle to achieve a balance between accuracy and fairness in data predictions, particularly in decision trees where fairness constraints are added but fail to generate models that combine both effectively.
The proposed solution involves selecting multiple training data sets based on fairness conditions, generating multiple machine learning models, and training them using different subsets of data. This approach allows for the creation of machine learning models that can make predictions that combine fairness and accuracy.
This method enables the generation of machine learning models that achieve both high accuracy and fairness in data predictions, improving the overall performance and ethical considerations in machine learning applications.
Smart Images

Figure JP2023033771_20032025_PF_FP_ABST
Abstract
Description
Machine learning program, machine learning method, and information processing device
[0001] The present invention relates to a machine learning program that trains a machine learning model to classify data.
[0002] Machine learning models are used to make various data predictions, for example, by inputting data about a person into a machine learning model to predict whether or not the person will be approved for a loan.
[0003] FIG. 14 is a diagram showing an example of a machine learning model that performs data prediction. FIG. 14 shows a decision tree as an example of a machine learning model. The decision tree D1 shown in FIG. 14 has nodes n1-1, n1-2, n1-3, n1-4, and n1-5. Predetermined attributes and thresholds are assigned to nodes n1-1 and n1-3, and data is divided based on the attribute values and thresholds. The pair of attributes and thresholds assigned to the nodes is the "division condition."
[0004] Node n1-1 is a node related to the attribute "occupation," and the transition destination is determined according to the value of the attribute. For example, if the attribute value is "1 or greater (full-time worker)," the transition occurs to node n1-3. If the attribute value is "less than 1 (other than full-time worker)," the transition occurs to node n1-2.
[0005] Node n1-3 is a node related to the attribute "annual income," and the transition destination is determined according to the value of the attribute. For example, if the attribute value is "5 million yen or more," the transition occurs to node n1-5. If the attribute value is "less than 5 million yen," the transition occurs to node n1-4.
[0006] Nodes n1-2, n1-4, and n1-5 are leaf nodes, and prediction results are set therein. The prediction result "reject" is set in nodes n1-2 and n1-4. The prediction result "pass" is set in node n1-5.
[0007] For example, suppose data Da1 is given as data relating to a certain person. FIG. 15 shows an example of data relating to a certain person. In Da1, the value for the attribute "occupation" is "1" and the value for the attribute "annual income" is "6 million yen." When data Da1 is input into decision tree DA1, transitions occur in the order of node n1-1 → node n1-3 → node n1-5. As a result, the prediction result for data Da1 is "pass (allowing to take out a loan)."
[0008] When performing data prediction using a machine learning model, it is important to maintain not only the accuracy of the data prediction but also fairness.
[0009] For example, in conventional techniques, in order to achieve both fairness and accuracy, fairness constraints are added in addition to accuracy indicators such as Gini impurity, and splitting conditions for each node constituting a decision tree are specified.
[0010] JP 2022-500747 A JP 2022-527536 A U.S. Patent Application Publication No. 2010 / 0169252 U.S. Patent Application Publication No. 2022 / 0318639
[0011] However, the above-mentioned conventional techniques are unable to generate a machine learning model that can make predictions that are both fair and accurate.
[0012] In one aspect, the present invention aims to provide a machine learning program, a machine learning method, and an information processing device that can generate a machine learning model that makes predictions that are both fair and accurate.
[0013] In a first proposal, a computer performs the following processes: the computer selects first training data and second training data from a training data group; the computer selects a first plurality of training data including the first training data by dividing the plurality of training data based on the first training data in accordance with a fairness condition; the computer selects a second plurality of training data including the second training data by dividing the plurality of training data based on the second training data in accordance with a fairness condition; the computer trains a first machine learning model using the training data group, trains a second machine learning model using the first plurality of training data, and trains a third machine learning model using the second plurality of training data, thereby generating a machine learning model including the first machine learning model, the second machine learning model, and the third machine learning model.
[0014] It is possible to generate a machine learning model that makes predictions that are both fair and accurate.
[0015] FIG. 1 is a diagram for explaining a reference technology. FIG. 2 is a diagram (1) for explaining a process during learning of an information processing device according to this embodiment. FIG. 3 is a diagram (2) for explaining a process during learning of an information processing device according to this embodiment. FIG. 4 is a diagram showing an example of the data structure of a training dataset. FIG. 5 is a diagram for explaining a process during prediction of an information processing device according to this embodiment. FIG. 6 is a functional block diagram showing a configuration of an information processing device according to this embodiment. FIG. 7 is a diagram showing an example of the data structure of a machine learning model table. FIG. 8 is a diagram showing an example of the data structure of a machine learning model generated under certain division conditions. FIG. 9 is a flowchart showing a processing procedure of an information processing device during learning. FIG. 10 is a flowchart showing a processing procedure of an information processing device during prediction. FIG. 11 is a diagram for explaining other processing (1) executed by an information processing device. FIG. 12 is a diagram for explaining other processing (2) executed by an information processing device. FIG. 13 is a diagram showing an example of the hardware configuration of a computer that realizes the same functions as the information processing device of the embodiment. FIG. 14 is a diagram showing an example of a machine learning model that performs data prediction. FIG. 15 is a diagram showing an example of data related to a certain person.
[0016] Hereinafter, embodiments of the machine learning program, the machine learning method, and the information processing device disclosed in the present application will be described in detail with reference to the accompanying drawings. However, the present invention is not limited to these embodiments.
[0017] Before describing the present invention, we will explain the reference technology that led to the present invention. For the sake of convenience, we will refer to an apparatus that executes processing related to the reference technology as the "reference apparatus." This reference apparatus does not fall under the category of prior art.
[0018] For example, if one attempts to generate a single machine learning model that corresponds to all data, the division conditions become complicated, making it difficult to achieve both fairness and accuracy. Therefore, the reference device aims to achieve both fairness and accuracy by presetting multiple fair division conditions, dividing all data into multiple partial data that fit each division condition, and generating a machine learning model for each partial data. For example, a machine learning model based on partial data is simpler than a machine learning model based on all data, and also has improved accuracy.
[0019] Below are examples of unfair division conditions (a) and fair division conditions (b).
[0020] Split condition (a): {attribute = occupation, attribute value ≥ 1} AND {attribute = age, attribute value ≥ 35 years old} Split condition (b): {attribute = occupation, attribute value ≥ 1} AND {attribute = annual income, attribute value ≥ 5 million yen}
[0021] The division condition (a) includes "{attribute = occupation, attribute value ≥ 1}" indicating that the occupation is full-time work. The division condition (a) includes "attribute = age, attribute value ≥ 35 years old" indicating that the age is 35 years old or older. In other words, the division condition (a) is "the occupation is full-time work and the age is 35 years old or older." For example, when generating a machine learning model that predicts loan eligibility based on partial data that meets the division condition (a), the model is based on the assumption that annual income increases based on seniority. Given that the number of women who reach managerial positions is smaller than the number of men who reach managerial positions, this division condition can be said to be unfair.
[0022] The division condition (b) includes "{attribute = occupation, attribute value ≥ 1}" indicating that the occupation is full-time work. The division condition (b) includes "{attribute = annual income, attribute value ≥ 5 million yen}" indicating that the annual income is 5 million yen or more. In other words, the division condition (b) is "the occupation is full-time work and the annual income is 5 million yen or more." For example, when generating a machine learning model that predicts loan eligibility based on partial data that meets the division condition (b), whether the annual income is high or low is unrelated to gender, and therefore the division condition can be said to be fair.
[0023] FIG. 1 is a diagram for explaining the reference technology. First, the learning process of the reference technology will be described. In FIG. 1, a training data set 10 is used for explanation. The training data set 10 includes a plurality of training data, and each training data set is set with a plurality of attributes, attribute values, and a correct label. The reference device divides all of the training data sets 10 into partial data sub1, sub2, sub3, and sub4 based on a plurality of fair division conditions b1, b2, b3, and b4 that are set in advance.
[0024] For example, partial data sub1 includes multiple pieces of training data that meet division condition b1. Partial data sub2 includes multiple pieces of training data that meet division condition b2. Partial data sub3 includes multiple pieces of training data that meet division condition b3. Partial data sub4 includes multiple pieces of training data that meet division condition b4. Partial data sub1 to sub4 are fair partial data. Partial data may overlap with other partial data. In the example shown in FIG. 1, partial data sub3 and partial data sub4 partially overlap.
[0025] The reference device trains a machine learning model based on training dataset 10 to generate machine learning model M1. The reference device trains a machine learning model based on partial data sub1 to generate machine learning model M2. The reference device trains a machine learning model based on partial data sub2 to generate machine learning model M3. The reference device trains a machine learning model based on partial data sub3 to generate machine learning model M4. The reference device trains a machine learning model based on partial data sub4 to generate machine learning model M5.
[0026] As described above, by generating machine learning models M2 to M5 based on multiple partial data sub1 to sub4 divided according to fair division conditions b1 to b4, it is possible to generate a variety of machine learning models. Furthermore, the complexity of machine learning models M2 to M5 can be reduced, and prediction accuracy can be improved.
[0027] Next, the process of prediction in the reference technology will be described. For example, when the reference device receives prediction target data to be predicted, it determines whether the prediction target data satisfies any of the division conditions b1 to b4, and performs prediction using a machine learning model corresponding to the applicable division condition. For example, if the prediction target data satisfies division condition b1, it performs prediction using machine learning model M2. Note that if the prediction target data does not satisfy any of the division conditions b1 to b4, the reference device performs prediction using machine learning model M1.
[0028] However, even with the above-mentioned reference technology, it is difficult to achieve both fairness and accuracy. For example, if a training dataset is divided into partial data based on a fair division condition, data in the training dataset that is not included in the partial data becomes unfair data. Furthermore, even if a machine learning model is trained based on the partial data, the accuracy of the machine learning model is not necessarily good.
[0029] Next, an information processing device according to this embodiment will be described. The information processing device according to this embodiment will be referred to as an "information processing device 100." Below, the learning process and the prediction process of the information processing device 100 will be described in order.
[0030] The learning process of the information processing device 100 will be described. FIGS. 2 and 3 are diagrams for explaining the learning process of the information processing device according to this embodiment. The information processing device 100 executes the learning process using a training dataset 20. The training dataset 20 has a plurality of training data. Each training data item associates an attribute, an attribute value, and a correct label.
[0031] FIG. 4 is a diagram showing an example of the data structure of a training dataset. As shown in FIG. 4, the training dataset associates an item number, a plurality of attributes, and a correct answer label. The item number is a number that identifies each record in the training dataset 20, but it does not have to be included in the training dataset. One record included in the training dataset corresponds to one piece of training data. For example, an attribute value is set for each attribute. Each attribute is an occupation, annual income, gender, age, etc. The correct answer label is a label that indicates whether taking out a loan is "NG" or "OK."
[0032] Returning to the explanation of FIG. 2 , the information processing device 100 randomly selects multiple pieces of training data from the training dataset 20. In the following explanation, the selected training data will be referred to as "starting samples." In the example shown in FIG. 2 , four starting samples sa1, sa2, sa3, and sa4 are shown, but the number is not limited to this, and the information processing device 100 may select N (N≧1) starting samples.
[0033] For each of the starting samples sa1 to sa4, the information processing device 100 identifies split data starting from the starting sample. For example, the information processing device 100 compares the value of each attribute of the starting sample sa1 with the value of each attribute of other training data in the training dataset 20, and sets, as split data spl1, a plurality of training data having attribute values similar to the value of each attribute of the starting sample sa1.
[0034] For example, the information processing device 100 identifies the distance between the value of each attribute of the starting sample sa1 and the value of each attribute of each training data, and sets the training data for which the distance is less than a threshold as the divided data spl1.
[0035] The information processing apparatus 100 performs the same process as for the starting sample sa1 on the other starting samples sa2 to sa4 to set divided data spl2, spl3, and spl4, respectively.
[0036] The information processing device 100 searches for a division condition that maximizes the information gain FA_IG, taking fairness into consideration, based on multiple training data included in the divided data spl. For example, the information gain FA_IG is expressed by equation (1). The larger the value of the information gain FA_IG(D, D'), the more fair the division condition. In equation (1), Gini is the Gini coefficient, and is defined, for example, by equation (2).
[0037]
[0038]
[0039] In equation (1), Gini(D) represents the Gini coefficient value of the training data before division according to the division conditions. Gini(D') represents the Gini coefficient value of the training data after division according to the division conditions. "Gini(D) - Gini(D')" is the information gain.
[0040] In equation (1), "α" is one of the hyperparameters. In equation (1), SP_label outputs a value related to fairness. The closer the value of SP_label is to 0, the more fair it is. SP_label is defined by equation (3).
[0041]
[0042] In equation (3), p(Y=1|A=1) is the positive rate for the privileged class. p(Y=1|A=0) is the positive rate for the non-privileged class. The positive rate for the privileged class is the rate at which data containing a certain attribute value (e.g., male) of a certain attribute (e.g., gender) shifts to the positive side due to the threshold of the splitting condition. The positive rate for the non-privileged class is the rate at which data containing a certain attribute value (e.g., female) of a certain attribute (e.g., gender) shifts to the positive side due to the threshold of the splitting condition. If fairness is achieved, the value of SP_label approaches 0.
[0043] SP_label(D) is the value of SP_label before division according to the division condition, and SP_label(D') is the value of SP_label of the training data divided according to the division condition.
[0044] The information processing device 100 repeatedly calculates the value of the information gain FA_IG(D, D') while changing the division conditions (attributes and attribute values), and searches for the division conditions that maximize the value of the information gain FA_IG(D, D'). Note that the information processing device 100 imposes a constraint that the division based on the division conditions must be equal to or greater than "min × M", where M is the number of training data included in the training dataset 20. "min" is one of the hyperparameters.
[0045] As described above, the information processing device 100 searches for the division condition sc1 that maximizes the information gain FA_IG based on the plurality of training data included in the divided data spl.
[0046] The information processing device 100 searches for a division condition sc2 that maximizes the information gain FA_IG based on the plurality of training data included in the divided data sp2, in the same way as for the divided data sp1. The information processing device 100 searches for a division condition sc3 that maximizes the information gain FA_IG based on the plurality of training data included in the divided data sp3, in the same way as for the divided data sp1. The information processing device 100 searches for a division condition sc4 that maximizes the information gain FA_IG based on the plurality of training data included in the divided data sp4, in the same way as for the divided data sp1.
[0047] 3, the information processing device 100 divides all the training data sets 20 into partial data sub1-1, sub1-2, sub1-3, and sub1-4 based on the division conditions sc1 to sc4.
[0048] For example, partial data sub1-1 includes multiple training data that meet division condition sc1. For example, if division condition sc1 is "{attribute=occupation, attribute value ≥ 1} AND {attribute=annual income, attribute value ≥ 5 million yen}," all training data included in partial data sub1-1 have an attribute "occupation" value of "1 or more" and an attribute "annual income" value of "5 million yen or more."
[0049] Partial data sub1-2 includes multiple training data that meet division condition sc2. Partial data sub1-3 includes multiple training data that meet division condition sc3. Partial data sub1-4 includes multiple training data that meet division condition sc4. Each of partial data sub1 to sub4 is data that meets the division condition that maximizes the information gain FA_IG, and is fair partial data. Partial data may overlap with other partial data.
[0050] The information processing device 100 trains a machine learning model based on partial data sub1-1 and generates a machine learning model M1-1. The information processing device 100 trains a machine learning model based on partial data sub1-2 and generates a machine learning model M1-2. The information processing device 100 trains a machine learning model based on partial data sub1-3 and generates a machine learning model M1-3. The information processing device 100 trains a machine learning model based on partial data sub1-4 and generates a machine learning model M1-4.
[0051] The information processing device 100 trains a machine learning model based on the training dataset 20 and generates a machine learning model MA.
[0052] The machine learning models MA, M1-1 to M1-4 may be decision trees, neural networks (NNs), etc. When the machine learning models MA, M1-1 to M1-4 are decision trees, the information processing device 100 trains the machine learning models according to a decision tree learning algorithm such as Iterative Dichotomizer 3 (ID3), Classification and Regression trees (CART), or Random Forest. When the machine learning models MA, M1-1 to M1-4 are NNs, the information processing device 100 trains the machine learning models based on backpropagation.
[0053] After training the machine learning models M1-1 to M1-4, the information processing device 100 calculates the prediction accuracy of the machine learning models M1-1 to M1-4 using a validation dataset. The validation dataset includes multiple pieces of validation data. The data structure of the validation dataset is similar to the data structure of the training dataset 20 described in FIG. 4.
[0054] For example, the information processing device 100 acquires validation data from a validation dataset, identifies a division condition that applies to the acquired validation data, and inputs the validation data into a machine learning model that corresponds to the identified division condition. The information processing device 100 determines whether the prediction result is appropriate based on the result of inputting the validation data into the machine learning model and the correct label of the validation data. The information processing device 100 calculates the prediction accuracy of each machine learning model by repeatedly performing the above process for each validation data included in the validation dataset.
[0055] Furthermore, the information processing device calculates "ratio" based on formula (4). In the example described with reference to FIG. 3, the number of division conditions in formula (4) is "number of division conditions=4".
[0056] ratio = number of division conditions / number of training data included in the training data set 20 (4)
[0057] The information processing device 100 repeatedly executes the learning process described above with reference to FIGS. 2 and 3 while changing the values of the hyperparameters (α, min), and identifies the combination of hyperparameters and ratios that maximize the prediction accuracy of each machine learning model. In the following description, the hyperparameters and ratios that maximize the prediction accuracy of each machine learning model are referred to as "optimal parameters" and "optimal ratios." Note that the information processing device 100 executes the process of training the machine learning model MA using the training dataset 20 only the first time.
[0058] The information processing device 100 executes the process of prediction using each machine learning model generated with the optimal parameters and the optimal ratio. Each machine learning model is set with a division condition corresponding to the partial data used during training. The division condition set for the machine learning model is used to select which machine learning model to use when predicting the prediction target data.
[0059] In the prediction process of the information processing device 100 described below, the machine learning models trained with the optimal parameters and optimal ratios will be described as the machine learning models MA, M1-1 to M1-4 described in FIG.
[0060] Next, the process of prediction performed by the information processing device 100 will be described. Fig. 5 is a diagram for explaining the process of prediction performed by the information processing device according to this embodiment. Fig. 5 explains the process of the information processing device 100 when prediction target data Da1-1, Da1-2, and Da1-3 are received. The prediction target data Da1-1, Da1-2, and Da1-3 are associated with each attribute and each attribute value.
[0061] A case will be described in which the information processing device 100 processes prediction target data Da1-1. The information processing device 100 compares the prediction target data Da1-1 with division conditions sc1 to sc4 set for the machine learning models M1-1 to M1-4. The information processing device 100 determines that the prediction target data Da1-1 satisfies the division condition sc1. In this case, the information processing device 100 inputs the prediction target data Da1-1 into the machine learning model M1-1 corresponding to the division condition sc1 and calculates the prediction probability.
[0062] A case will be described in which the information processing device 100 processes prediction target data Da1-2. The information processing device 100 compares the prediction target data Da1-2 with the division conditions sc1 to sc4 set for the machine learning models M1-1 to M1-4. The information processing device 100 determines that the prediction target data Da1-2 does not apply to any of the division conditions. In this case, the information processing device 100 inputs the prediction target data Da1-2 into the machine learning model MA and calculates the prediction probability.
[0063] A case will be described in which the information processing device 100 processes prediction target data Da1-3. The information processing device 100 compares the prediction target data Da1-3 with the division conditions sc1 to sc4 set for the machine learning models M1-1 to M1-4. The information processing device 100 determines that the prediction target data Da1-3 falls under the division conditions sc3 and sc4. In this case, the information processing device inputs the prediction target data Da1-3 into the machine learning model M1-3 corresponding to the division condition sc3, and calculates a prediction probability. Furthermore, the information processing device 100 inputs the prediction target data Da1-3 into the machine learning model M1-4 corresponding to the division condition sc4, and calculates a prediction probability. The information processing device 100 calculates the average value of the prediction probability obtained using the machine learning model M1-3 and the prediction probability obtained using the machine learning model M1-4 as the prediction probability of the prediction target data Da1-3.
[0064] As described above, according to the information processing device 100 of this embodiment, during learning, the training data set 20 is divided into divided data based on random starting samples, and fair division conditions are searched for for the multiple training data included in the divided data. In this way, fair division conditions are searched for for the divided data based on random starting samples, so that it is possible to prevent unfairness of the data not included in the divided data.
[0065] Furthermore, during learning, the information processing device 100 divides a training dataset into multiple partial data sets based on fair division conditions, and repeats the process of training multiple machine learning models based on each partial data set while changing the conditions. For example, the information processing device 100 calculates the prediction accuracy of the trained machine learning models while changing hyperparameters, and identifies optimal parameters and an optimal ratio that maximize the prediction accuracy. The information processing device 100 generates each machine learning model trained with the optimal parameters and optimal ratio as a machine learning model of the learning result. This can improve the prediction accuracy of the machine learning models.
[0066] That is, the information processing apparatus 100 according to the present embodiment can generate a machine learning model that achieves both fairness and accuracy.
[0067] Furthermore, during prediction, the information processing device 100 acquires prediction target data, compares the prediction target data with the division conditions set for each machine learning model, and selects a machine learning model corresponding to the division conditions to which the prediction target data applies. The information processing device 100 inputs the prediction target data into the selected machine learning model and calculates prediction probabilities. This makes it possible to calculate accurate prediction probabilities from machine learning models trained under fair division conditions.
[0068] Next, an example of the configuration of an information processing device 100 that executes the above-mentioned processing will be described. Fig. 6 is a functional block diagram showing the configuration of an information processing device according to this embodiment. As shown in Fig. 6, the information processing device 100 has a communication unit 110, an input unit 120, a display unit 130, a storage unit 140, and a control unit 150.
[0069] The communication unit 110 executes data communication with external devices, etc. via a network. The control unit 150, which will be described later, uses the communication unit 110 to acquire various types of information from external devices, etc.
[0070] The input unit 120 inputs various types of information to the control unit 150 of the information processing device 100. During learning, the user may operate the input unit 120 to input initial values of hyperparameters, etc. During prediction, the user may operate the input unit 120 to input data to be predicted.
[0071] The display unit 130 displays the processing results of the control unit 150 .
[0072] The storage unit 140 includes a training dataset 20, a validation dataset 30, and a machine learning model table 40. The storage unit 140 is a memory or the like.
[0073] The training dataset 20 is used when training a machine learning model during learning. The training dataset 20 includes a plurality of training data. Other descriptions of the training dataset 20 are the same as those of the training dataset 20 described in FIG. 4 .
[0074] The validation dataset 30 is used when calculating the prediction accuracy of a machine learning model. The validation dataset 30 includes a plurality of validation data. The data structure of the validation dataset 30 is similar to the data structure of the training dataset 20 described with reference to FIG. 4.
[0075] The machine learning model table 40 holds the machine learning models generated during learning. FIG. 7 is a diagram showing an example of the data structure of the machine learning model table. For example, the machine learning model table 40 associates splitting conditions with machine learning models. The splitting conditions are splitting conditions searched for in the split data, and are splitting conditions that maximize the information gain FA_IG taking fairness into consideration. The machine learning models are machine learning models trained based on partial data that meet the corresponding splitting conditions. Note that the machine learning model MA corresponding to the splitting condition "none" is a machine learning model trained based on the entire training dataset 20.
[0076] FIG. 8 is a diagram showing an example of the data structure of a machine learning model generated under certain splitting conditions. While FIG. 8 shows a decision tree as an example of the machine learning model, it may also be a neural network (NN) or the like. As shown in FIG. 8, a machine learning model D2 has nodes n2-1, n2-2, n2-3, n2-4, n2-5, n2-6, and n2-7. Splitting conditions (attributes and thresholds) recursively searched based on the information gain FA_IG are assigned to nodes n2-1, n2-3, and n2-5, respectively, and the data is split based on the splitting conditions.
[0077] Node n2-1 is a node related to the attribute "attribute α," and the transition destination is determined according to the value of the attribute. For example, if the value of attribute α is "1 or greater," the transition occurs to node n2-3. If the value of attribute α is "less than 1," the transition occurs to node n2-2.
[0078] Node n2-3 is a node related to the attribute "attribute β," and the transition destination is determined according to the value of the attribute. For example, if the value of attribute β is "10 or greater," the transition occurs to node n2-5. If the value of attribute β is "less than 10," the transition occurs to node n2-4.
[0079] Node n2-5 is a node related to the attribute "attribute γ," and the transition destination is determined according to the value of the attribute. For example, if the value of attribute γ is "5 or greater," the transition occurs to node n2-7. If the value of attribute γ is "less than 5," the transition occurs to node n2-6.
[0080] Nodes n2-2, n2-4, n2-6, and n2-7 are leaf nodes, and prediction results are set therein. A prediction result of "NG" is set in nodes n2-2, n2-4, and n2-6. A prediction result of "OK" is set in node n2-7.
[0081] The control unit 150 includes an acquisition unit 151, a learning processing unit 152, and a prediction processing unit 153. The control unit 150 is a CPU (Central Processing Unit) or the like.
[0082] The acquisition unit 151 acquires various types of information from an external device or the like using the communication unit 110. For example, the acquisition unit 151 acquires a training dataset 20 and a validation dataset 30, and stores them in the storage unit 140. The acquisition unit 151 may also acquire initial values of hyperparameters from the input unit 120.
[0083] The learning processing unit 152 generates a machine learning model by executing the above-described learning process. For example, as described in Fig. 2, the learning processing unit 152 randomly selects multiple starting samples from the training data set 20 and sets multiple pieces of split data based on the multiple starting samples.
[0084] The learning processing unit 152 searches for a division condition that maximizes the information gain FA_IG, taking fairness into consideration, based on multiple training data sets included in the divided data. For example, the information gain FA_IG is expressed by equation (1). The learning processing unit 152 searches for a division condition for each divided data set. Other details regarding the process performed by the learning processing unit 152 to search for a division condition are the same as those described in FIG. 2.
[0085] As described in Fig. 3, the learning processing unit 152 divides the training data set into multiple partial data sets based on the multiple division conditions found. The learning processing unit 152 trains a machine learning model based on the training data included in the partial data sets, thereby generating a machine learning model. The learning processing unit 152 trains a machine learning model based on the training data set 20, thereby generating a machine learning model. Note that the learning processing unit 152 may prepare a base machine learning model before training, and perform each training using the base machine learning model.
[0086] In the example shown in FIG. 3, the learning processing unit 152 trains a machine learning model based on the training dataset 20 to generate a machine learning model MA. The learning processing unit 152 trains a machine learning model based on partial data sub1-1 to generate a machine learning model M1-1. The learning processing unit 152 trains a machine learning model based on partial data sub1-2 to generate a machine learning model M1-2. The learning processing unit 152 trains a machine learning model based on partial data sub1-3 to generate a machine learning model M1-3. The learning processing unit 152 trains a machine learning model based on partial data sub1-4 to generate a machine learning model M1-4.
[0087] After training each machine learning model, the learning processing unit 152 calculates the prediction accuracy of each machine learning model using the validation dataset. The learning processing unit 152 calculates "ratio" based on the above-mentioned formula (4).
[0088] 2 and 3 while changing the values of the hyperparameters (α, min), and identify the combination of optimal parameters and optimal ratios that maximizes the prediction accuracy of each machine learning model. The learning processing unit 152 sets, in the machine learning model table 40, pairs of the division conditions for the optimal parameters and optimal ratios and the machine learning models trained using the partial data corresponding to the division conditions.
[0089] The prediction processing unit 153 obtains the prediction probability of the prediction target data by performing the above-described prediction process. For example, when the prediction processing unit 153 receives the prediction target data, it compares the prediction target data with each division condition set in the machine learning model table 40 and selects machine learning data corresponding to the division condition that applies to the prediction target data. If there is no division condition that applies to the prediction target data, the prediction processing unit 153 selects the machine learning model MA trained with the training dataset 20.
[0090] The prediction processing unit 153 inputs the prediction target data into the selected machine learning model to calculate the prediction probability.
[0091] If the prediction target data satisfies multiple division conditions, the prediction processing unit 153 selects machine learning models corresponding to the multiple division conditions. The prediction processing unit 153 inputs the prediction target data to each selected machine learning model to calculate multiple prediction probabilities, and calculates the average of the multiple prediction probabilities as the final prediction probability.
[0092] The prediction processing unit 153 outputs the prediction result of the prediction target data to be displayed on the display unit 130. Other details regarding the prediction processing unit 153 are the same as those described with reference to FIG.
[0093] Next, an example of a processing procedure of the information processing device 100 according to this embodiment will be described. Fig. 9 is a flowchart showing the processing procedure of the information processing device during learning. As shown in Fig. 9, the learning processing unit 152 of the information processing device 100 randomly selects a starting sample from the training dataset 20 (step S101).
[0094] The learning processing unit 152 sets divided data based on the starting sample (step S102). The learning processing unit 152 searches for a division condition that maximizes the information gain while considering fairness, based on multiple training data included in the divided data (step S103).
[0095] The learning processing unit 152 divides the training data set 20 into partial data based on the division conditions (step S104). The learning processing unit 152 trains a machine learning model based on the partial data, thereby generating a machine learning model (step S105).
[0096] The learning processing unit 152 generates a machine learning model by training the machine learning model based on the training dataset 20 (step S106). The learning processing unit 152 calculates the prediction accuracy of the machine learning model based on the validation dataset 30 (step S107).
[0097] The learning processing unit 152 calculates the ratio (step S108). The learning processing unit 152 records a set of the prediction accuracy, the hyperparameter, and the ratio (step S109). If the number of processing times is not equal to or greater than the predetermined number (step S110, No), the learning processing unit 152 proceeds to step S101. The learning processing unit 152 changes the hyperparameter (step S111) and proceeds to step S101.
[0098] On the other hand, if the number of processing times is equal to or greater than the predetermined number (Step S110, Yes), the learning processing unit 152 proceeds to Step S112. The learning processing unit 152 identifies the optimal parameters and optimal ratio that maximize the prediction accuracy (Step S112). The learning processing unit 152 registers the splitting conditions and machine learning model corresponding to the optimal parameters and optimal ratio in the machine learning model table 40 (Step S113).
[0099] 10 is a flowchart showing the processing steps of the information processing device during prediction. The prediction processing unit 153 of the information processing device 100 receives prediction target data (step S201). The prediction processing unit 153 compares the prediction target data with the division conditions in the machine learning model table and identifies the division conditions that apply to the prediction target data (step S202).
[0100] If the prediction target data does not satisfy any of the division conditions (No at Step S203), the prediction processing unit 153 proceeds to Step S204. The prediction processing unit 153 selects a machine learning model MA trained on the entire training data set (Step S204), and proceeds to Step S206.
[0101] On the other hand, if the prediction target data satisfies any of the division conditions (Yes at step S203), the prediction processing unit 153 selects a machine learning model corresponding to the identified division condition (step S205).
[0102] The prediction processing unit 153 inputs the prediction target data into the selected machine learning model to calculate the prediction probability (step S206). The prediction processing unit 153 outputs the prediction probability to the display unit 130 (step S207).
[0103] Next, the effects of the information processing device 100 according to this embodiment will be described. During learning, the information processing device 100 divides the training data set 20 into divided data sets based on random starting samples, and searches for fair division conditions for the multiple training data sets included in the divided data sets. In this way, because fair division conditions are searched for for the divided data sets based on random starting samples, it is possible to prevent unfairness of data not included in the divided data sets.
[0104] Furthermore, during learning, the information processing device 100 divides a training dataset into multiple partial data sets based on fair division conditions, and repeats the process of training multiple machine learning models based on each partial data set while changing the conditions. For example, the information processing device 100 calculates the prediction accuracy of the trained machine learning models while changing hyperparameters, and identifies optimal parameters and an optimal ratio that maximize the prediction accuracy. The information processing device 100 generates each machine learning model trained with the optimal parameters and optimal ratio as a machine learning model of the learning result. This can improve the prediction accuracy of the machine learning models.
[0105] That is, the information processing apparatus 100 according to the present embodiment can generate a machine learning model that achieves both fairness and accuracy.
[0106] Furthermore, during prediction, the information processing device 100 acquires prediction target data, compares the prediction target data with the division conditions set for each machine learning model, and selects a machine learning model corresponding to the division conditions to which the prediction target data applies. The information processing device 100 inputs the prediction target data into the selected machine learning model and calculates prediction probabilities. This makes it possible to calculate accurate prediction probabilities from machine learning models trained under fair division conditions.
[0107] However, the processing of the information processing device 100 described above is not limited to the above processing. Other processing (1) and (2) executed by the information processing device 100 will be described below in order.
[0108] Other processing (1) executed by the information processing device 100 will be described. As described with reference to FIG. 2 , the information processing device 100 sets the split data based on the starting sample, but the split data may also be set by further utilizing "separability." For example, if the separability of the split data is sufficient, the information processing device 100 performs processing to search for split conditions using the split data. On the other hand, if the separability of the split data is not sufficient, the information processing device 100 reselects the starting sample and sets new split data.
[0109] 11 is a diagram illustrating another process (1) executed by the information processing device. The learning processing unit 152 of the information processing device 100 sorts multiple training data included in the divided data into positive samples and negative samples. The positive samples are training data whose correct answer label is "OK." The negative samples are training data whose correct answer label is "NG."
[0110] The learning processing unit 152 calculates a first centroid, which is the center of gravity of multiple positive samples. The learning processing unit 152 also calculates a second centroid, which is the center of gravity of multiple negative samples. If the distance between the first centroid and the second centroid included in the divided data is equal to or greater than a threshold, the learning processing unit 152 determines that separability is sufficient and performs a process of searching for a division condition using the divided data. On the other hand, if the distance between the first centroid and the second centroid included in the divided data is less than the threshold, the learning processing unit 152 determines that separability is insufficient and does not perform a process of searching for a division condition using the divided data, and instead selects a new starting sample.
[0111] In FIG. 11 , the divided data sp10 includes multiple positive samples and multiple negative samples. Positive samples are indicated by triangles. Negative samples are indicated by crosses. The learning processing unit 152 calculates a first centroid c1 and a second centroid c2 of the divided data sp10. If the distance between the first centroid c1 and the second centroid c2 is less than a threshold, the learning processing unit 152 determines that separability is insufficient, reselects the starting sample, and sets new divided data. In this case, the learning processing unit 152 does not search for division conditions based on the divided data sp.
[0112] 11, the split data sp20 includes a plurality of positive samples and a plurality of negative samples. The learning processing unit 152 calculates a first centroid c3 and a second centroid c4 of the split data sp20. If the distance between the first centroid c3 and the second centroid c4 is equal to or greater than a threshold, the learning processing unit 152 determines that separability is sufficient and performs a process of searching for split conditions using the split data sp20. The process of searching for split conditions performed by the learning processing unit 152 is similar to the process described above.
[0113] As described above, the information processing device 100 further utilizes "separability" to set split data and uses the split data to search for split conditions, thereby enabling more accurate split conditions to be set. For example, if separability is sufficient, the boundary between multiple positive samples and multiple negative samples becomes clear, simplifying the split conditions and increasing accuracy.
[0114] Next, other processing (2) executed by the information processing device 100 will be described. In other processing (2), the information processing device 100 sets divided data based on the distance between the starting sample and the first centroid. For example, when the distance between the starting sample and the first centroid is less than a threshold, the information processing device 100 performs processing to search for a division condition using the divided data. On the other hand, when the distance between the starting sample and the first centroid is equal to or greater than the threshold, the information processing device 100 reselects the starting sample and sets new divided data.
[0115] 12 is a diagram illustrating another process (2) executed by the information processing device. The learning processing unit 152 of the information processing device 100 separates multiple training data sets included in the divided data into positive samples and negative samples, similar to the other process (1). In FIG. 12, the positive samples and negative samples are not shown.
[0116] The learning processing unit 152 calculates a first centroid c5, which is the center of gravity of the multiple positive samples included in the divided data sp11. The learning processing unit 152 also calculates a second centroid c6, which is the center of gravity of the multiple negative samples included in the divided data sp11. If the distance between the starting sample sa11, which was the reference for the divided data sp11, and the first centroid c5 is equal to or greater than a threshold, the learning processing unit 152 reselects the starting sample and sets new divided data.
[0117] The learning processing unit 152 calculates a first centroid c7, which is the center of gravity of the multiple positive samples included in the divided data sp21. The learning processing unit 152 also calculates a second centroid c8, which is the center of gravity of the multiple negative samples included in the divided data sp21. If the distance between the starting sample sa21 that served as the reference for the divided data sp21 and the first centroid c7 is less than a threshold, the learning processing unit 152 performs a process of searching for a division condition using the divided data. The process of searching for a division condition performed by the learning processing unit 152 is similar to the process described above.
[0118] As described above, the information processing device 100 sets division data based on the distance between the starting sample and the first centroid, and uses the division data to search for division conditions, thereby being able to identify division conditions with high accuracy.
[0119] Next, a description will be given of an example of the hardware configuration of a computer that realizes the same functions as the above-described information processing device 100. Fig. 13 is a diagram showing an example of the hardware configuration of a computer that realizes the same functions as the information processing device of the embodiment.
[0120] 13, computer 300 has a CPU 301 that executes various types of arithmetic processing, an input device 302 that accepts data input from a user, and a display 303. Computer 300 also has a communication device 304 that exchanges data with external devices via a wired or wireless network, and an interface device 305. Computer 300 also has a RAM 306 that temporarily stores various types of information, and a hard disk drive 307. Each of devices 301 to 307 is connected to a bus 308.
[0121] The hard disk drive 307 stores an acquisition program 307 a, a learning processing program 307 b, and a prediction processing program 307 c. The CPU 301 reads out each of the programs 307 a to 307 c and loads them into the RAM 306.
[0122] The acquisition program 307a functions as the acquisition process 306a, the learning process program 307b functions as the learning process 306b, and the prediction process program 307c functions as the prediction process 306c.
[0123] The processing of the acquisition process 306a corresponds to the processing of the acquisition unit 151. The processing of the learning process 306b corresponds to the processing of the learning processing unit 152. The processing of the prediction process 306c corresponds to the processing of the prediction processing unit 153.
[0124] It should be noted that each of the programs 307a to 307c does not necessarily have to be stored in the hard disk drive 307 from the beginning. For example, each program may be stored in a "portable physical medium" such as a flexible disk (FD), CD-ROM, DVD, magneto-optical disk, or IC card that is inserted into the computer 300. Then, the computer 300 may read and execute each of the programs 307a to 307c.
[0125] 20 Training dataset 30 Validation dataset 40 Machine learning model table 100 Information processing device 110 Communication unit 120 Input unit 130 Display unit 140 Storage unit 150 Control unit 151 Acquisition unit 152 Learning processing unit 153 Prediction processing unit
Claims
1. A machine learning program that causes a computer to execute the following processes: selecting first training data and second training data from a training data group; selecting a first plurality of training data including the first training data by dividing the plurality of training data based on a fairness condition using the first training data as a reference; selecting a second plurality of training data including the second training data by dividing the plurality of training data based on a fairness condition using the second training data as a reference; and generating a machine learning model including the first machine learning model, the second machine learning model, and the third machine learning model by training a first machine learning model using the training data group, training a second machine learning model using the first plurality of training data, and training a third machine learning model using the second plurality of training data.
2. The machine learning program of claim 1, further comprising the steps of: selecting training data from the training data group; setting split data having a plurality of training data based on the selected training data based on attribute values set for the selected training data and attribute values for each training data included in the training data group; and searching for split conditions that maximize a value indicating fairness based on the plurality of training data included in the split data.
3. The machine learning program of claim 2, further comprising a process for causing a computer to execute a process for identifying a first centroid of a plurality of training data that are positive examples and a second centroid of a plurality of training data that are negative examples among the plurality of training data included in the split data, and the process for searching for the splitting condition searches for the splitting condition based on the split data when the distance between the first centroid and the second centroid is equal to or greater than a threshold value.
4. The machine learning program of claim 2, further comprising a process for causing a computer to execute a process for identifying the center of gravity of multiple training data that are positive examples among the multiple training data included in the split data, and a process for searching for the splitting condition, characterized in that when the distance between the training data that is the basis of the split data and the center of gravity is less than a threshold value, the process for searching for the splitting condition searches for the splitting condition based on the split data.
5. The machine learning program of claim 2, characterized in that the process of searching for the splitting condition searches for a first splitting condition based on a plurality of training data contained in first split data that has the first training data as a reference, and searches for a second splitting condition based on a plurality of training data contained in second split data that has the second training data as a reference.
6. The machine learning program of claim 5, further comprising causing a computer to execute the steps of: setting first partial data from the training data group, the first partial data including a plurality of training data that meet the first division condition; and setting second partial data from the training data group, the second partial data including a plurality of training data that meets the second division condition; training the second machine learning model based on the plurality of training data included in the first partial data; and training the third machine learning model based on the plurality of training data included in the second partial data.
7. The machine learning program of claim 5, further comprising causing a computer to execute a process of generating a plurality of second machine learning models and a plurality of third machine learning models using a plurality of the first division conditions and a plurality of the second division conditions, calculating the predictive accuracy of the plurality of second machine learning models and the plurality of third machine learning models using a group of validation data, and identifying the second machine learning model and the third machine learning model with the highest predictive accuracy.
8. A machine learning method, characterized in that a computer executes the following processes: selecting first training data and second training data from a training data group; selecting a first plurality of training data including the first training data by dividing the plurality of training data based on a fairness condition using the first training data as a reference; selecting a second plurality of training data including the second training data by dividing the plurality of training data based on a fairness condition using the second training data as a reference; and generating a machine learning model including the first machine learning model, the second machine learning model, and the third machine learning model by training a first machine learning model using the training data group, training a second machine learning model using the first plurality of training data, and training a third machine learning model using the second plurality of training data.
9. The machine learning method according to claim 8, further comprising the steps of: selecting training data from the training data group; setting split data having a plurality of training data based on the selected training data as a reference based on an attribute value set for the selected training data and an attribute value for each training data included in the training data group; and searching for split conditions that maximize a value indicating fairness based on the plurality of training data included in the split data.
10. The machine learning method described in claim 9, further comprising a process in which the computer executes a process of identifying a first centroid of a plurality of training data that are positive examples and a second centroid of a plurality of training data that are negative examples among the plurality of training data included in the split data, and the process of searching for the splitting condition searches for the splitting condition based on the split data when the distance between the first centroid and the second centroid is equal to or greater than a threshold.
11. The machine learning method described in claim 10, further comprising a process in which the computer executes a process of identifying the center of gravity of multiple training data that are positive examples among the multiple training data included in the split data, and the process of searching for the splitting condition searches for the splitting condition based on the split data when the distance between the training data that is the basis of the split data and the center of gravity is less than a threshold value.
12. The machine learning method described in claim 10, characterized in that the process of searching for the splitting condition searches for a first splitting condition based on a plurality of training data contained in first split data having the first training data as a reference, and searches for a second splitting condition based on a plurality of training data contained in second split data having the second training data as a reference.
13. The machine learning method of claim 12, further comprising the steps of: setting first partial data from the training data group, the first partial data including a plurality of training data that meet the first division condition; and setting second partial data from the training data group, the second partial data including a plurality of training data that meets the second division condition; training the second machine learning model based on the plurality of training data included in the first partial data; and training the third machine learning model based on the plurality of training data included in the second partial data.
14. The machine learning method described in claim 12, further comprising a process in which the computer executes the steps of generating a plurality of second machine learning models and a plurality of third machine learning models using a plurality of the first division conditions and a plurality of the second division conditions, calculating the predictive accuracy of the plurality of second machine learning models and the plurality of third machine learning models using a group of validation data, and identifying the second machine learning model and the third machine learning model with the highest predictive accuracy.
15. An information processing device having a control unit that executes a process of acquiring a first machine learning model trained based on a plurality of training data that meet a first division condition that satisfies a condition for fairness of data division, and a second machine learning model trained based on a plurality of training data that meets a second division condition that satisfies a condition for fairness of data division, and when prediction target data is received, determining whether the prediction target data meets the first division condition or the second division condition, and if the first division condition is met, inputting the prediction target data into the first machine learning model to calculate a prediction probability, and if the second division condition is met, inputting the prediction target data into the second machine learning model to calculate a prediction probability.
16. The information processing device according to claim 15, further comprising: when the prediction target data does not satisfy the first division condition and the second division condition, the control unit further executes a process of calculating a prediction probability by inputting the prediction target data to a third machine learning model trained based on a training data group including a plurality of training data that satisfies the first division condition, a plurality of training data that satisfies the second division condition, and other training data.