The present invention relates to a learning apparatus, a classification apparatus, a learning method, a classification method and a program.
When there is a relationship of a cause and an effect (i.e., a causal relationship) between two variables, causal effect is a known measure for quantifying influence that the variable as the cause has on the variable as the effect. There also are known techniques for learning a classifier while removing causal effect between particular variables using the causal relationship between those variables as prior knowledge. In recent years, attention has been paid to employing a classifier in handling of decision making problems related to individuals, such as recruiting at a company or release of a prisoner at a trial, as an application of such techniques.
For such an application, it is required that non-discriminatory decision making (i.e., a fair decision making) be made in terms of features of an individual, such as race, sex, and sexual orientation (hereinafter referred to as “sensitive features”). Doing decision making in consideration of such fairness is very important in learning of a classifier. This is because discriminatory bias related to sensitive features, such as correlation between a sensitive feature and a decision result, is often included in training data since training data used for learning a classifier is the results of decision makings that were actually made by people in the past.
Thus, more recently, techniques for learning a classifier while removing causal effects between a sensitive feature and decision results have been proposed for fairness-conscious classification problems. For example, Non-Patent Literature 1 proposes a technique for learning a classifier by solving an optimization problem with imposition of a constraint such that the mean value of causal effects will be zero when causal effects between a sensitive feature and decision results are estimated for a group of individuals.
However, with the technique proposed in Non-Patent Literature 1, for example, causal effects might be large values for some individuals although the mean value of causal effects is zero for the entire group. Consequently, some individuals can receive a decision result that is largely affected by a sensitive feature (i.e., a non-fair, discriminatory decision result).
In view of the foregoing, an object of an embodiment of the present invention is to learn a classifier while removing causal effects in each training data.
To attain the object, a learning apparatus according to an embodiment of the present invention includes: input means for inputting training data for learning a classifier and a causal graph representing causal relationships between variables included in the training data; and learning means for learning the classifier by solving a constrained optimization problem in which a mean of causal effects between predetermined variables is within a predetermined range and a variance of the causal effects is equal to or smaller than a predetermined value, using the training data and the causal graph input by the input means.
It is possible to learn a classifier while removing causal effects in each training data.
An embodiment of the present invention is now described. In the present embodiment, a learning apparatus 10 that can learn a classifier while removing causal effects in each training data and a classification apparatus 20 that classifies data with the classifier learned by the learning apparatus 10 are described.
The embodiment described below considers (1) a constrained optimization problem that imposes not only the mean value of causal effects but a variance value thereof as constraints, and in particular (2) a case where a classifier is represented as a non-convex function such as a neural network. In such a case, the variance of causal effects will be a non-convex and non-smooth function and the problem to be solved will be a non-convex and non-smooth optimization problem, so that it is generally difficult to create an optimization algorithm with convergence guarantee. Accordingly, in the present embodiment, (3) an objective function is formulated as a weakly convex function, thereby enabling application of an existing optimization algorithm with convergence guarantee. These (1) to (3) allow the learning apparatus 10 according to the present embodiment to learn a classifier while removing causal effects in each training data. It in turn enables the classification apparatus 20 according to the present embodiment to perform classification without being affected by sensitive features in classification target data using a classifier learned by the learning apparatus 10.
<Theoretical Configuration>
Next, a theoretical configuration of the present embodiment is described. The present embodiment considers a classification problem for learning a probabilistic classifier that takes a variable X formed from multiple variables as input and predicts a variable Y, while removing the causal effect of a variable A ∈ X on the variable Y. As training data used for learning the classifier, observations {(x1, y1), . . . , (xn, yn)} are used. Here, xi(i=1, . . . , n) is an observed value of the variable X, and yi(i=1, . . . , n) is an observed value of the variable Y when xi is observed.
For example, with a problem of decision making related to individuals, the variable X can represent a feature of each individual, the variable Y can represent the decision result of decision making for each individual, and the variable A can represent a sensitive feature (e.g., race, sex, sexual orientation, etc.). The training data is data that records the features of each individual and the decision result of decision making that was actually made for that individual by a person in past. For the following description, a decision making problem related to individuals is assumed, where the variable X is a feature of each individual, the variable Y is the decision result of decision making for each individual, and the variable A is a sensitive feature.
Let hθ be a probabilistic classifier that should be learned (hereinafter also referred to just as “classifier”) and let θ a parameter thereof. An error function for quantifying an accuracy of the classifier hθ is denoted as 1, and a function representing a causal effect for quantifying the fairness of the classifier hθ for an individual having the feature X is denoted as gθ (x).
In the present embodiment, the constrained optimization problem shown in Expression (1) below is solved in order to acquire a parameter θ that minimizes a prediction error with the error function l and makes the causal effect on each individual zero:
Here,
{circumflex over (P)}
n [Math. 2]
is an empirical distribution of the training data {(x1, y1), . . . , (xn, yn)}, with constraints being imposed so that the mean of causal effects:
E
{circumflex over (P)}
[gθ(X)] [Math. 3]
is within a range of equal to or greater than −δ and equal to or smaller than δ and that the variance of causal effects:
Var{circumflex over (P)}
is equal to or smaller than ζ. δ≥0 and ζ≥0 are hyperparameters.
The function gθ representing a causal effect is represented as a function of θ based on the estimate described in Reference Literature 1: Huber, Martin and Solovyeva, Anna, “Direct and indirect effects under sample selection and outcome attrition,” Working Paper, Universite de Fribourg, 2018. The function representing a causal effect is represented in different forms depending on causal relationships between variables and the causal effect between which variables is to be considered. For example, in a case where variables {X, Y}={A, M, Q, Y} and the causal relationships between these variables A, M, Q and Y are represented by a causal graph as shown in
Here, w>0 represents a weight parameter, determined by the values of conditional probabilities P(A=0|m, q) and P(A=0|q). These conditional probability values can be estimated by previously learning a model such as logistic regression and neural network using training data. For the foregoing, it is assumed that the variable A can take either 0 or 1, and m and q represent observed values of the variables M and Q, respectively.
Rather than directly solving the constrained optimization problem shown in Expression (1) above using a function value (estimate) gθ estimated with Expression (2) above, the present embodiment considers an objective function that approximates the constrained optimization problem shown in Expression (1) above. This is because if the constrained optimization problem shown in Expression (1) above is to be directly solved based on the estimate gθ shown in Expression (2) above and when classifier hθ is a non-convex function, the optimization problem will be a non-convex and non-smooth optimization problem and it will be difficult to create an optimization algorithm with convergence guarantee in general. A function being non-smooth means that a derivative of the function is not Lipschitz continuous.
Accordingly, for a problem that imposes a constraint on each of the mean and variance of causal effects (the constrained optimization problem shown in Expression (1) above), the present embodiment considers solving the constrained optimization problem shown in Expression (1) above in an approximating manner by optimizing an objective function that uses a penalty function for constraining a sum of the mean and the variance with respect to absolute values of causal effects. Specifically, consider the sum of the mean and a standard deviation of causal effects:
E
{circumflex over (P)}
[|gθ(X)|]+√{square root over (Var{circumflex over (P)}
This is an amount called an upper confidence bound in the context of statistics.
The present embodiment designs the penalty function using the approximate estimate for the upper confidence bound described in Reference Literature 2: Namkoong, Hongseok and Duchi, John C., “Variance-based regularization with convex objectives” NeurIPS, pages 2971-2980, 2017. Using the approximate estimate described in Reference Literature 2, the upper confidence bound for the absolute values of causal effects can be approximated with Expression (3) below:
Here,
ρ,n [Math. 8]
represents a set of distributions analogous to an empirical distribution:
{circumflex over (P)}
n [Math. 9]
and is represented by Expression (4) below:
Here,
V(p∥{circumflex over (P)}n)=½Σi=1n(npi−1)2 [Math. 11]
is a measure of similarity between distributions called X2-divergence (chi square divergence), quantifying the similarity between two distributions:
p,{circumflex over (P)}
n [Math. 12]
This is controlled by a hyperparameter ρ>0.
In the present embodiment, the objective function shown in Expression (5) below is optimized using the approximate estimate shown in Expression (3) above.
The objective function shown in Expression (5) above can be rewritten into the objective function shown in Expression (6) below, which has no constraint on distribution p:
Here, the second term of Expression (6) above is a penalty function that constrains the mean and variance of the absolute values of causal effects and the degree of its penalty is controlled by a hyperparameter ν>0. The third term of Expression (6) above is the chi square divergence between two distributions:
p,{circumflex over (P)}
n, [Math. 12]
controlled by a hyperparameter λ>0.
The objective function shown in Expression (6) above belongs to a function class called weakly convex function when the error function l is represented by a Lipschitz continuous convex function (e.g., cross-entropy loss and the like) and the classifier hθ is represented by a non-convex and smooth function (e.g., a type of neural network for which an activation function is represented by a smooth function such as a sigmoid function). A weakly convex function means a function having properties similar to those of a convex function.
Several optimization algorithms have recently been proposed for optimization problems where the objective function is represented in the form of a weakly convex function. Thus, the present embodiment performs learning of the classifier hθ such that there is convergence guarantee by optimizing the objective function shown in Expression (6) above using the optimization algorithm called PG-SMD described in Reference Literature 3: Rafique, Hassan and Liu, Mingrui and Lin, Qihang and Yang, Tianbao. “Non-convex min-max optimization: Provable algorithms and applications in machine learning” arXiv, 2018.
As described above, the present embodiment learns the classifier hθ by optimizing an objective function that approximates the constrained optimization problem shown in Expression (1) above (the objective function shown in Expression (6) above) with PG-SMD. This enables the classifier hθ to be learned such that there is convergence guarantee while removing causal effect on each individual even when a classifier hθ represented by a non-convex function, e.g., a neural network, is used.
<Functional Configuration>
Now referring to
As shown in
The training data storage unit 104 has stored therein training data for learning the classifier hθ. The causal graph storage unit 105 has stored therein a causal graph representing causal relationships between variables.
When a learned classifier hθ is used in recruiting related to an occupation that requires physical strength such as a construction job, for example, a specific example of training data is data that records features of past applicants and results of recruitment (accepted or rejected) for those applicants. A specific example of a corresponding causal graph is a graph representing causal relationships between variables representing the features of each applicant and the result of recruitment, such as variable A representing the sex of each applicant, variable Q representing a qualification, variable M representing a physical test score, and variable Y representing the result of recruitment. For this specific example, the causal graph can be the graph shown in
In the case of the specific example above, it is discriminatory to determine the result of recruitment (variable Y) based on sex (variable A), but it is not necessarily discriminatory to determine the result of recruitment (variable Y) using the result of a physical test (variable M) because a construction job is an occupation requiring physical strength or to determine the result of recruitment (variable Y) considering a qualification (Q), such as a qualification to operate a construction machine. Thus, for this specific example, the variable A is defined as a sensitive feature and attention is focused on the causal effect between the variables A and Y such that the classifier hθ is learned while removing this causal effect. The causal effect between which variables should be considered may be specified or configured by a user and the like in advance or may be configured in the causal graph.
The input unit 101 inputs the training data stored in the training data storage unit 104 and the causal graph stored in the causal graph storage unit 105.
The learning unit 102 learns the classifier hθ using the training data and causal graph input by the input unit 101.
The output unit 103 outputs the parameter θ of the classifier hθ learned by the learning unit 102 to the classification apparatus 20. Destination of the output of the output unit 103 is not limited to the classification apparatus 20 but may be any destination (e.g., an auxiliary storage device of the learning apparatus 10, a storage device accessible to the classification apparatus 20, and the like).
As shown in
The test data storage unit 204 has stored therein test data to be classified with the learned classifier hθ. When the learned classifier hθ is used in recruiting related to an occupation that requires physical strength such as a construction job, the test data will be data representing the features of applicants (i.e., data without assignment of a label representing the result of recruitment).
The input unit 201 inputs the test data stored in the test data storage unit 204.
The classification unit 202 classifies each test data with the learned classifier hθ (i.e., the classifier hθ with the parameter θ output by the learning apparatus 10 being set). In doing so, the classification unit 202 estimates a probability of classification into the class represented by each label by the classifier hθ for each test data. For example, in the case of the specific example mentioned above, the probability of classification into an “accepted” class and the probability of classification into a “rejected” class are estimated for each test data. In actual classification of test data, the test data may be classified into the class represented by the label with the highest probability, for example.
The output unit 203 outputs a classification result from the classification unit 202 (i.e., the probabilities of labels for each test data) to a certain destination (e.g., a display or an auxiliary storage device of the classification apparatus 20).
Although in the present embodiment the learning apparatus 10 and the classification apparatus 20 are described as being different devices, the present invention is not limited thereto; the learning apparatus 10 and the classification apparatus 20 may be integrally configured, for example.
<Learning Process>
Next, referring to
First, the input unit 101 inputs the training data stored in the training data storage unit 104 and the causal graph stored in the causal graph storage unit 105 (step S101). The causal graph may also be estimated from training data using the method described in Reference Literature 4: Spirtes, Peter and Glymour, Clark. An algorithm for fast recovery of sparse causal graphs. Signal Processing, Social science computer review, 9(1):62-72, 1991, for example.
Then, the learning unit 102 learns the classifier hθ using the training data and causal graph that were input in step S101 (step S102). Specifically, the learning unit 102 learns the classifier hθ such that causal effects are removed by optimizing the objective function shown in Expression (6) above with PG-SMD.
Then, the output unit 103 outputs the parameter θ of the classifier hθ learned in step S102 above to the classification apparatus 20 (step S103).
<Classification Process>
Next, referring to
First, the input unit 201 inputs the test data stored in the test data storage unit 204 (step S201).
Next, the classification unit 202 classifies the test data input in step S201 above with the learned classifier hθ (step S202). This results in estimation of the probabilities of classification into the classes represented by respective labels for each test data.
Then, the output unit 203 outputs a classification result from step S202 above (i.e., the probabilities of the labels for each test data) to a certain destination (step S203).
<Evaluation>
Results of evaluating the present embodiment using COMPAS dataset, an actual dataset available for public use, are now described.
Table 1 below shows the results of evaluating the classifier hθ learned with the learning apparatus 10 of the present embodiment using the COMPAS dataset (an approach of the present embodiment) and the results of evaluating a classifier that has been learned by the approach described in Non-Patent Literature 1 above (FIO). For evaluation indices, correct classification rate for labels, and the mean value, standard deviation, maximum and minimum of causal effects in test data were used. A causal effect closer to zero means the classification result of the classifier being fairer.
For the classifier hθ learned with the learning apparatus 10 of the present embodiment, a two-layer neural network was used. The activation function was a sigmoid function and the respective layer were linear layers with 100 and 50 hidden neurons, respectively. Further, an output function was a softmax function and cross-entropy loss was used as the error function l.
As shown in Table 1 above, FIO has a very large variance of causal effects and the maximum and the minimum deviate from zero since FIO constrains only the mean of causal effects. By contrast, the approach of the present embodiment constrains the mean and variance of causal effects, so that, as can be seen, the variance of causal effects is small, the maximum and the minimum are values close to zero, and further the correct classification rate for labels is comparable to that of FIO. It can therefore be seen that the approach of the present embodiment is capable of classification with a correct classification rate comparable to FIO while removing causal effects in each test data.
<Hardware Configuration>
Finally, referring to
As shown in
The input device 301 can be a keyboard, a mouse, or a touch panel, for example. The display device 302 can be a display, for example. The learning apparatus 10 and the classification apparatus 20 may not include at least either one of the input device 301 and the display device 302.
The external I/F 303 is an interface with external devices. The external devices include a recording medium 303a and the like. The learning apparatus 10 can read or write the recording medium 303a via the external I/F 303 and the like. The recording medium 303a may store one or more programs for implementing the functional components of the learning apparatus 10 (such as the input unit 101, the learning unit 102 and the output unit 103), for example. Likewise, the recording medium 303a may store one or more programs for implementing the functional components of the classification apparatus 20 (such as the input unit 201, the classification unit 202 and the output unit 203), for example.
The recording medium 303a includes a CD (Compact Disc), a DVD (Digital Versatile Disk), an SD memory card (Secure Digital memory card), a USB (Universal Serial Bus) memory card, for example.
The communication I/F 304 is an interface for connecting to a communication network. One or more programs for implementing the functional components of the learning apparatus 10 may be acquired (downloaded) from a certain server device or the like through the communication I/F 304 of the learning apparatus 304. Likewise, one or more programs for implementing the functional components of the classification apparatus 20 may be acquired (downloaded) from a certain server device or the like through the communication I/F 304 of the classification apparatus 20.
The processor 305 can be any of various arithmetic units such as CPU (Central Processing Unit) and GPU (Graphics Processing Unit). The functional components of the learning apparatus 10 are implemented through processing that is caused to be executed by the processor 305 of the learning apparatus 10 by one or more programs stored in the memory device 306 of the learning apparatus 10 and the like. Likewise, the functional components of the classification apparatus 20 are implemented through processing that is caused to be executed by the processor 305 of the classification apparatus 20 by one or more programs stored in the memory device 306 of the classification apparatus 20 and the like.
The memory device 306 can be any of various storage devices such as HDD (Hard Disk Drive), SSD (Solid State Drive), RAM (Random Access Memory), ROM (Read Only Memory), and flash memory. The training data storage unit 104 and the causal graph storage unit 105 can be implemented using the memory device 306 of the learning apparatus 10, for example. Similarly, the test data storage unit 204 can be implemented using the memory device 306 of the classification apparatus 20, for example.
The learning apparatus 10 and the classification apparatus 20 according to the present embodiment can perform the learning process and the classification process mentioned above by having the hardware configuration shown in
The present invention is not limited to the embodiment specifically disclosed above but various modifications or alterations, combination with existing techniques and the like are possible without departing from the scope of claims set forth.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2019/042339 | 10/29/2019 | WO |