This application claims priority to Chinese Application No. 202310800831.6 filed on Jun. 30, 2023, the disclosures of which is incorporated herein by reference in its entity.
The present disclosure generally relates to the field of artificial intelligence, and more specifically to a method, apparatus, electronic device, and medium for determining fairness impact of a sample on a model.
During constant development and popularization of application of artificial intelligence, people begin to pay attention to the impact of an algorithm and a model on social fairness. Unfair treatment of individuals with different population attributes (also known as sensitive attributes) might lead to problems such as increased social inequalities. Therefore, there is an urgent need to ensure the fairness of models to protect the right and interests of individuals and populations. In the field of artificial intelligence, fairness may involve multiple aspects. For example, when a model is trained, it is requisite to ensure the representativeness and diversity of training samples, and ensure that the algorithm does not favor or discriminate against individuals from different populations, etc.
Embodiments of the present disclosure provide a method, apparatus, electronic device, and medium for determining fairness impact of a sample on a model. For a set of training samples for training a model, the method according to embodiments of the present disclosure provide methods may adjust an original training sample in a number of ways to generate a counterfactual sample corresponding to the sample. The method may then calculate the impact on the fairness of the model when the counterfactual sample is used to train the model.
In a first aspect of embodiments of the present disclosure, there is provided a method for determining fairness impact of a sample on a model. The method comprises generating a counterfactual sample by adjusting an original sample in an original sample set, the original sample set being used for generating an original model for performing a classification task. The method further comprises determining a fairness metric of the original model on a validation sample set. In addition, the method further comprises determining fairness impact of the original sample on the original model based on the fairness metric, the original sample, and the counterfactual sample.
In a second aspect of embodiments of the present disclosure, there is provided an apparatus for determining fairness impact of a sample on a model. The apparatus comprises a counterfactual sample generating module configured to generate a counterfactual sample by adjusting an original sample in an original sample set, the original sample set being used for generating an original model for performing a classification task. The apparatus further comprises a fairness metric determining module configured to determine a fairness metric of the original model on a validation sample set. In addition, the apparatus further comprises a fairness impact determining module configured to determine fairness impact of the original sample on the original model based on the fairness metric, the original sample, and the counterfactual sample.
In a third aspect of the present disclosure, there is provided an electronic device. The electronic device comprises one or more processor; and a storage device for storing one or more programs which when executed by the one or more processors, cause the one or more processor to implement a method for determining fairness impact of a sample on a model. The method comprises generating a counterfactual sample by adjusting an original sample in an original sample set, the original sample set being used for generating an original model for performing a classification task. The method further comprises determining a fairness metric of the original model on a validation sample set. In addition, the method further comprises determining fairness impact of the original sample on the original model based on the fairness metric, the original sample, and the counterfactual sample.
In a fourth aspect of the present disclosure, there is provided a computer readable storage medium in which is stored a computer program which when executed by a processor, implements a method for determining fairness impact of a sample on a model. The method comprises generating a counterfactual sample by adjusting an original sample in an original sample set, the original sample set being used for generating an original model for performing a classification task. The method further comprises determining a fairness metric of the original model on a validation sample set. In addition, the method further comprises determining fairness impact of the original sample on the original model based on the fairness metric, the original sample, and the counterfactual sample.
This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The above and other features, advantages and aspects of embodiments of the present disclosure will become more apparent through the following detailed depictions with reference to the following figures. In the figures, like or similar reference numerals denote like or similar elements, wherein:
It is to be understood that all data related to a user involved in the present technical solution should be acquired and used after being authorized by the user. This means that, in the present technical solution, if personal information about a user needs to be used, explicit consent and authorization of the user are required before obtaining such data, otherwise relevant data collection and use will not be performed. It should also be understood that in the implementation of this technical solution, relevant laws and regulations should be strictly observed during the collection, use and storage of data, and necessary techniques and metrics should be taken to ensure the safety of data for users and the safe use of data.
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as being limited to the embodiments set forth herein, and instead, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
In the depictions of the embodiments of the present disclosure, the term “include” and its like should be understood to be open-ended, i.e., “include but not limited to”. The term “based on” should be understood as “based at least in part on. The term “one embodiment” or “the embodiment” should be understood as “at least one embodiment”. The terms “first”, “second” and the like, may refer to different or the same object unless explicitly stated otherwise. Other explicit and implicit definitions are also possibly included in the following text.
A fundamental problem with fairness of machine learning is the source of unfairness. In practice, this is also one of the problems that practitioners put forward first after calculating the fairness metric and finding the model unfair. While this problem sounds simple, it is difficult to determine the exact source of unfairness in a machine learning process. There might be many possible reasons for unfairness in an artificial intelligence model, including insufficient training data, lack of features, erroneous prediction goals, or inaccurate measurements of input features. Even for the most experienced artificial intelligence researchers and engineers, these problems are not so easy to solve.
The sources of unfairness are many, including data sampling bias or under-representation, data labeling bias, model architecture (or feature representation), distribution shift etc. Embodiments of the present disclosure focus on the most important and obvious source of bias—the training samples. It is because if the training samples of the model are biased, then it would be unlikely that it is very difficult for the model trained with these training samples to have high fairness unless the model is modified by paying high costs. Specifically, embodiments of the present disclosure concern how training samples would impact the unfairness of the model by paying attention to the following problems: how a fairness metric of the model would change if the training samples of the model were collected from different (e.g. demographic) populations; how a fairness metric of the model would change if the training samples of the model were labelled as different values; how a fairness metric of the model would change if values of some features of the training samples of the model were changed. Answering those questions can help practitioners explain the cause of the unfairness of the model in terms of training data, repair the training data to improve fairness, and detect biased or noisy training labels, under-represented population, and corrupted features that hurt fairness.
To this end, according to an embodiment of the present disclosure, a scheme for determining fairness impact of a sample on a model is provided. The scheme involves an original sample set, a validation sample set, and an original model trained using the original sample set. The scheme generates counterfactual samples by adjusting the original samples in the original sample set, and then first determines the fairness metric of the original model on the validation sample set, and then determines the fairness impact of the original samples on the original model based on the fairness metric, the original samples and the counterfactual samples. In this manner, the impact of each training sample on model fairness can be determined, helping practitioners accurately locate those training samples that have the greatest impact on model fairness so that practitioners can improve model fairness by repairing these training samples.
In the text herein, the population attribute, feature, and label are collectively referred to as a “concept”, which refers to a categorical variable that describes data property. For example, in some embodiments, it is possible to choose the population attribute as the concept, then counterfactually intervene on the population attribute to answer the question “what is the fairness impact if training data were sampled from a different population?” In some embodiments, it is possible to choose the feature 116 as the concept, and then counterfactually intervene on the feature 116 to answer the question “how will the fairness metric of the model change if values of some features of the training samples of the model are changed”. In some embodiment, it is also possible to choose the label 118 as the concept, and then counterfactually intervene on the label 118 to answer the question “what impact will be exerted on the fairness of the model if the value of the label of the training sample is changed”. In some embodiments, it is also possible to choose the existence of the training sample as the concept, and then observe the impact on the fairness of the model by, for example, marking the original sample 104 as removed. For example, in environment 100, counterfactual intervening may be performed on the population attributes 114, feature 116, or label 118 of the original sample 104 to generate a counterfactual sample 124, and then an adjusted sample set 122 may be generated by using the counterfactual sample 124 in place of the original sample 104. The adjusted sample set 122 comprises the counterfactual sample 124, the original sample 106, and the original sample 108.
As shown in
At block 204, the method 200 may determine a fairness metric of the original model on the validation sample set. For example, in the environment 100 shown in
At block 206, the method 200 may determine the fairness impact of the original sample on the original model based on the fairness metric, the original sample, and the counterfactual sample. For example, in the environment 100 shown in
In this manner, the method 200 can determine the fairness impact of each original sample on the original model 110 by making adjustments or intervention to each original sample in the original sample set 102, thereby helping practitioners accurately locate the set of samples in the original sample set 102 that have the greatest fairness impact on the original model 110 so that practitioners can improve the fairness of the model by repairing these training samples.
An overall causal diagram relating to concepts and a plurality of causal diagrams corresponding to intervening population attributes, intervening features, and intervening labels according to some embodiments of the present disclosure will be described with reference to
:={1, 2 . . . , c}, where C is a discrete concept encoded in the data (X, Y, A). The casual graph 300 illustrates how to quantify the impact of replacing an original sample (e.g., original sample 104 in
In addition to the three cases shown in
In some embodiments, to determine the fairness impact of the intervened original sample on the model, a loss for the original sample (also referred to as a first loss) may be determined based on the original sample and by using a loss function for generating the original model, a loss for the counterfactual sample (also referred to as a second loss) may be determined based on the counterfactual sample and using the loss function, and a fairness impact value indicating the fairness impact of the original sample on the original model may be determined based on a fairness metric of the original model on a verification data set, the loss for the original sample, and the loss for the counterfactual sample.
In some embodiments, to determine a fairness impact value, a loss function for training the original model may be utilized to generate a plurality of losses corresponding to a plurality of original samples in the original sample set, a Hessian Matrix for the original model may be determined based on the plurality of losses, and the fairness impact value is determined based on the Hessian Matrix, the fairness metric of the original model on the verification data set, the losses for the original samples, and the losses for the counterfactual samples.
In the text herein, Dtrain={zitr=(xitr,yitr)}i=1n is used to represent the training, sample set, where zitr represents the ith training sample, xitr represents the feature of zitr, and yitr represents the label of zitr; Dval={zival=(xival,yival)}i=1n is used to denote a validation sample set, where zival represents the ith validation sample, xival represents the feature of zival, yival represents the label of zival. It is assumed that the model is parameterized as θ∈Θ and there is a subset of the training sample set that the sample index is ={K1, . . . , Kk}. If the group
is scrambled by assigning a weight wi∈[0, 1] to each sample i∈
, {circumflex over (θ)}
is used to represent the generated counterfactual model. The fairness impact infl(Dval,
, {circumflex over (θ)}) of the reweighted group
in the training data on the model is defined as a difference in the fairness metric between the original model {circumflex over (θ)} (trained on the complete training data) and the counterfactual model {circumflex over (θ)}
. infl(Dval,
, {circumflex over (θ)}) may be expressed using Equation (1):
where lfair represents the fairness metric.
A closed-form solution to the fairness impact can be derived according to Equation (1). The first-order approximation of (1) may take the form of Equation (2) below:
where H{circumflex over (θ)} is the Hessian matrix for the original model {circumflex over (θ)}, i.e.,
and l is the original loss function for training the original model {circumflex over (θ)} (e.g., the original loss function may be a cross-entropy loss function in a classification task).
The fairness metric fair({circumflex over (θ)}) may quantify the fairness of the trained model {circumflex over (θ)}. In some embodiments, an approximate solution of
fair({circumflex over (θ)}) may be obtained using the surrogate loss of the model on the validation sample set. In these embodiments, the classifier corresponding to the model θ may be expressed as hθ, and the Demographic Parity (DP), as the population fairness metric, may then be approximated by Equation (3) as follows in the form of Equation (4) (assuming that the population attribute A and the classification task are binary):
where g is the log it of the predicted probability for class 1, ai is the population attribute of the ith sample.
To quantify the counterfactual effect of changing the concept c for each sample (x, y, a), mathematically, ({circumflex over (x)}, ŷ, â) is used to represent the counterfactual sample generated by intervening on the concept c. Given a training sample zitr:=(xi, yi, ai, ci), the counterfactual sample corresponding to the sample zitr when intervening on concept C=c′ may be defined by the following Equation (5):
where do(⋅) represents the do operation in the causal model.
In Equation (5) above, when the concept C overlaps with any one of (X, Y, A), the do(⋅) operation has a higher priority, and is assumed to automatically override the other dependencies. For example, when the concept is the population attribute (i.e., C=A), the following Equation (6) represents do(A=â) has a higher priority:
The counterfactual sample may be expressed as {circumflex over (z)}itr(c′)=({circumflex over (x)}i(c′),ŷi(c′),âi(c′),ĉi=c′), then the original sample zitr:=(xi,yi,ai,ci) is replaced with the counterfactual sample {circumflex over (z)}itr(c′) in the training data set, the counterfactual model {circumflex over (θ)}i,c′ trained on the adjusted sample set may be expressed by the following Equation (7):
where R(θ) represents the risk of the model θ and ϵ represents a small positive number.
On the validation sample set Dval,fair({circumflex over (θ)}) is used to represent the fairness metric of the original model {circumflex over (θ)}, and
fair({circumflex over (θ)}i,c′) is used to represent the fairness metric of the counterfactual model {circumflex over (θ)}i,c′. When the concept C of the original sample i is intervened as C′, the fairness impact value infl(Dval,{circumflex over (θ)}i,c′) of the original sample on the original model may be expressed by the following Equation (8):
In conjunction with Equation (2), an approximate solution to the fairness impact value infl(Dval,{circumflex over (θ)}i,c′) may be calculated by Equation (9) below:
where is the loss function of the original model {circumflex over (θ)} and H{circumflex over (θ)} is the Hessian matrix of the original model {circumflex over (θ)} on the original sample set.
In some embodiments, the product of the second item H{circumflex over (θ)}−1 and third item (∇(zitr;{circumflex over (θ)})−∇
({circumflex over (z)}itr(c′);{circumflex over (θ)})) in Equation (9) may be calculated using a Hessian vector product (HVP). Let v:=(∇
(zitr;{circumflex over (θ)})−∇
({circumflex over (z)}itr(c′);{circumflex over (θ)})), H−1v may be recursively calculated by the following Equation (10):
where Ĥ0 is the Hessian matrix approximated on a random batch and r is the number of recursive iterations.
Let t be the final recursive iteration, then the final fairness impact value is infl(Dval,{circumflex over (θ)}i,c′)≈−∇θfair({circumflex over (θ)})τĤt−1v, where
fair({circumflex over (θ)}) is the surrogate loss of the fairness metric (e.g., Equation (4)).
Alternatively, in some embodiments, when a plurality of counterfactual samples are intervened at a time, {circumflex over (z)}itr(c′,k), k=1, 2, . . . , E may be used to represent the kth sample of E samples, and an average counterfactual effect may be calculated by
In this way, sample-level intervention or adjustment can be made to samples in the original sample set, and the counterfactual model need not be trained on the adjusted sample set, but an approximate solution to the fairness impact value is determined by calculating the fairness metric of the original model on the validation dataset, the Hessian matrix for the original model, the loss of the original sample calculated using the original loss function, and the loss of the counterfactual sample calculated using the original loss function. Thus, the fairness impact of each sample in the original sample set on the original model can be determined at the sample level by avoiding consuming large computational and resource costs, and the fairness of the model may be improved by repairing samples with larger fairness impact values.
To further illustrate the principle that intervening on the concept (e.g., population attribute, feature, and label) of the sample can improve model fairness,
When intervening on the population attribute, feature, or label of the original sample (e.g., original sample 104 in
In some embodiments, when the intervening on the original sample is to change its population attribute, a counterfactual sample may be generated based on the changed population attribute and the original feature set (also referred to as a first feature set) of the original sample. In some embodiments, a new feature set (also referred to as a second feature set) of the counterfactual sample may be generated with a generative adversarial network (also referred to as a first generative adversarial network) based on the changed population attribute and the original feature set of the original sample, and a label of the counterfactual sample may be generated with the original model based on the new feature set of the counterfactual sample.
In
In some embodiments, the distribution of feature X may be mapped from a population attribute A=a to a population attribute A=a′. Then, the original sample set is divided by features into two groups, namely, a first group with features X|A=Q and a second group with features X|A=a′. Then, a generator Ga→a′ of the generative adversarial network 509 may be trained as the best transport mapping from features X|A=a to features X|A=a′, and meanwhile a discriminator Da→a′ of the generative adversarial network 509 is trained to determine whether a feature is a feature of a real sample or a feature generated by the generator Ga→a′, finally making the discriminator unable to distinguish between the mapped sample Ga→a′(X) and the real sample X|A=a′ by training. A training objective of this process may be expressed by the following Equation (11):
where n is the number of training samples and λ is the weight balancing the generator loss (i.e., G
2 norm) to make sure the mapped samples are not too far from the original distribution, and
D
In some embodiments, when the intervening on the original sample is to change its feature, a counterfactual sample may be generated based on the changed feature and the feature set of the original sample. In some embodiments, a feature set of the counterfactual sample may be generated with another generative adversarial network (also referred to as a second generative adversarial network) based on the changed feature and the feature set of the original sample, and a label of the counterfactual sample may be generated with the original model based on the feature set of the counterfactual sample.
In
In some embodiments, the concept C is used to represent a feature of features X. When the concept C is changed, other features in features X needs to be changed accordingly. Similar to training the generative adversarial network 509, the generative adversarial network 529 may be trained to learn a mapping from a set of samples of features X|C=c to a set of samples of features X|C=c′, and meanwhile the generator and discriminator of the generative adversarial network 529 are trained to enable the generator to generate features deceiving the discriminator as new features (e.g., feature 526 and feature 527 in
In some embodiments, when the intervening on the original sample is to change its label, a counterfactual sample corresponding to the original sample may be generated based on the feature of the original sample and the changed label.
Various embodiments of generating the counterfactual sample described above take into account causal dependencies between the concepts (i.e., the population attribute, feature and label) of the sample data, and can improve the rationality of the counterfactual sample by regenerating the feature of the counterfactual sample, particularly in the case of changing the population attribute and feature of the original sample, so that the accuracy of the evaluation of the impact of the original sample on model fairness can be improved. In addition, when the original sample is repaired using the generated counterfactual sample, the counterfactual sample with higher rationality can improve the performance and accuracy of the retrained model.
The above describes the process of generating the counterfactual sample and how to calculate the fairness impact value based on the original model, the original sample and the generated counterfactual sample. After determining the fairness impact of the intervention on the original sample on the original model, the original sample set may be updated based on the determined fairness impact to generate a model with higher fairness.
In some embodiments, a plurality of fairness impact values corresponding to a plurality of original samples may be determined by respectively changing the labels of the plurality of original samples in the original sample set. Then, a plurality of target samples having the greatest corresponding fairness impact values may be determined from the plurality of original samples based on the plurality of fairness impact values. Then, an updated sample set may be generated by changing the labels of the plurality of target samples, and an updated model may be generated based on the updated sample set.
In some embodiments, a plurality of fairness impact values corresponding to a plurality of original samples may be determined by respectively changing values of specified features of the plurality of original samples in the original sample set. Then, a plurality of target samples having the greatest corresponding fairness impact values may be determined from the plurality of original samples based on the plurality of fairness impact values. Then, an updated sample set may be generated by removing the plurality of target samples from the original sample set, and an updated model may be generated based on the updated sample set.
In some embodiments, a plurality of fairness impact values corresponding to a plurality of original samples may be determined by respectively changing population attributes of the plurality of original samples in the original sample set. When a proportion of fairness impact values greater than a predetermined value among the plurality of fairness impact values is greater than a predetermined proportion, an updated sample set may be resampled from different populations, and an updated model is generated based on the updated sample set.
In these ways, mislabeled labels in the original sample set can be repaired, discrimination and remedial metrics can be taken against fairness poisoning attack, and imbalanced sampling distributions in the training sample set can be discovered, so that the population balance of the sample set can be optimized by replacing the original sample with the counterfactual sample or re-collecting the training samples.
A detailed derivation process of Equation (2) will be described below. Assume the risk of a model θ may be expressed as R(θ):=1/nΣi=1n(ztr;θ), and the model trained on the complete training sample set may be expressed as {circumflex over (θ)}:=argminθR(θ). If a weight wi∈[0, 1] is assigned to each sample i∈
and then weighted by some small positive number ϵ, the resulting model can be expressed by the following Equation (12):
According to the first order condition of {circumflex over (θ)}, the following Equation (13) may be obtained:
When ϵ→( ), the following Equation (14) may be obtained with the Taylor expansion (and the first-order approximation):
According to the first order condition of {circumflex over (θ)}, ∇R({circumflex over (θ)})=0 may be obtained, and then these terms are rearranged to obtain the following Equation (15):
The following equation (16) may be obtained by taking the limit ϵ→( ) on both sides of Equation (15):
Finally, the fairness impact of assigning training sample i in population/C with weight wi may be determined by the following Equations (17), (18), (19) and (20):
It may be appreciated that at least one of many advantages that can be realized with the method or process as described above can be realized with the apparatus 600 of the present disclosure. For example, the impact of each training sample on model fairness can be determined to help a practitioner accurately locate those training samples that have the greatest impact on model fairness so that the practitioner can improve model fairness by repairing those training samples.
Various components in the device 700 are connected to an I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, or the like; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, an optical disk, or the like; and a communication unit 709 such as a network card, a modem, a wireless communication transceiver, or the like. The communication unit 709 allows the device 700 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunications networks.
The various methods or processes described above may be performed by the CPU/GPU 701. For example, in some embodiments, the method may be implemented as a computer software program tangibly embodied on a non-transitory machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program may be loaded into and/or installed onto the device 700 via the ROM 702 and/or the communication unit 709. When the computer program is loaded into RAM 703 and executed by CPU/GPU 701, one or more steps or actions in the above-described methods or processes may be performed.
In some embodiments, the methods and processes described above may be implemented as a non-transitory computer program product. The computer program product may include a computer readable storage medium having computer readable program instructions embodied thereon for performing aspects of the present disclosure.
The non-transitory computer readable storage medium may be a tangible device that may hold and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: a portable computer disk, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a Portable Compact Disk Read-Only Memory (CD-ROM), a Digital Versatile Disks (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing. The computer readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.
Computer readable program instructions described herein can be downloaded to respective computing/processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and/or a wireless network. The network can comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing/processing device.
Computer readable program instructions for carrying out operations of the present invention can be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language and procedural programming languages. The computer readable program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGA), or programmable logic arrays (PLA) can execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present disclosure.
These computer readable program instructions can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create method for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions can also be stored in a computer readable storage medium that can direct a computer, a programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable storage medium having instructions stored therein comprises an article of manufacture including instructions which implement aspects of the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational acts to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable apparatus, or other device implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams can represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the blocks can occur out of the order noted in the Figures. For example, two blocks shown in succession can, in fact, be executed substantially concurrently, or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts or carry out combinations of special purpose hardware and computer instructions.
The descriptions of the various embodiments of the present disclosure have been presented for purposes of illustration, but are not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the embodiments, the practical application or technical improvement over technologies found in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
Some example implementations of the present disclosure are listed below:
Example 1. A method for determining fairness impact of a sample on a model, comprising:
Example 2. The method according to Example 1, wherein determining the impact on fairness comprises:
Example 3. The method according to Examples 1-2, wherein determining the fairness impact value comprises:
Example 4. The method according to Examples 1-3, wherein adjusting the original sample comprises one of: changing a population attribute of the original sample, changing a feature of the original sample, changing a label of the original sample, or removing the original sample from the original sample set.
Example 5. The method according to Examples 1-4, wherein generating the counterfactual sample comprises:
Example 6. The method according to Examples 1-5, wherein generating the counterfactual sample further comprises:
Example 7. The method according to Examples 1-6, further comprising:
Example 8. The method according to Examples 1-7, wherein generating the counterfactual sample comprises:
Example 9. The method according to claims 1-8, wherein generating the counterfactual sample comprises:
Example 10. The method according to Examples 1-9, further comprising:
Example 11. The method according to Examples 1-10, wherein generating the counterfactual sample comprises:
Example 12. The method according to Examples 1-11, further comprising:
Example 13. The method according to Examples 1-12, further comprising:
Example 14. The method according to Examples 1-13, further comprising:
Example 15. An apparatus for determining fairness impact of a sample on a model, comprising:
Example 16. The apparatus according to Example 15, wherein determining the impact on fairness comprises:
Example 17. The apparatus according to Examples 15-16, wherein determining the fairness impact value comprises:
Example 18. The apparatus according to Examples 15-17, wherein adjusting the original sample comprises one of: changing a population attribute of the original sample, changing a feature of the original sample, changing a label of the original sample, or removing the original sample from the original sample set.
Example 19. The apparatus according to Examples 15-18, wherein generating the counterfactual sample comprises:
Example 20. The apparatus according to Examples 15-19, wherein generating the counterfactual sample further comprises:
Example 21. The apparatus according to Examples 15-20, further comprising:
Example 22. The apparatus according to Examples 15-21, wherein generating the counterfactual sample comprises:
Example 23. The apparatus according to claims 15-22, wherein generating the counterfactual sample comprises:
Example 24. The apparatus according to Examples 15-23, further comprising:
Example 25. The apparatus according to Examples 15-24, wherein generating the counterfactual sample comprises:
Example 26. The apparatus according to Examples 15-22, further comprising:
Example 27. The apparatus according to Examples 15-26, further comprising:
Example 28. The apparatus according to Examples 15-27, further comprising:
Example 29. An electronic device, comprising:
Example 30. The device according to Example 29, wherein determining the impact on fairness comprises:
Example 31. The device according to Examples 29-30, wherein determining the fairness impact value comprises:
Example 32. The device according to Examples 29-31, wherein adjusting the original sample comprises one of: changing a population attribute of the original sample, changing a feature of the original sample, changing a label of the original sample, or removing the original sample from the original sample set.
Example 33. The device according to Examples 29-32, wherein generating the counterfactual sample comprises:
Example 34. The device according to Examples 29-33, wherein generating the counterfactual sample further comprises:
Example 35. The device according to Examples 29-34, further comprising:
Example 36. The device according to Examples 29-35, wherein generating the counterfactual sample comprises:
Example 37. The device according to claims 29-36, wherein generating the counterfactual sample comprises:
Example 38. The method according to Examples 29-37, further comprising:
Example 39. The method according to Examples 29-38, wherein generating the counterfactual sample comprises:
Example 40. The device according to Examples 29-39, further comprising:
Example 41. The device according to Examples 29-40, further comprising:
Example 42. The device according to Examples 29-41, further comprising:
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter specified in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
Number | Date | Country | Kind |
---|---|---|---|
202310800831.6 | Jun 2023 | CN | national |