Methods, apparatuses, electronic devices, and media for generating fairness output

CN116976465BActive Publication Date: 2026-09-18FACE CUTE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310943818.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-28
Publication Date
2026-09-18
Estimated Expiration
2043-07-28

Smart Images

  • Figure CN116976465B_ABST
    Figure CN116976465B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to a method, apparatus, electronic device and medium for generating fairness output. The method comprises determining a baseline classification output for input data. The method further comprises generating a passover output for the input data based on the input data and the baseline classification output, wherein the passover output indicates whether to pass over the baseline classification output. The method further comprises generating a flip output for the input data based on the input data and the baseline classification output in response to the passover output indicating not to pass over the baseline classification output, wherein the flip output indicates whether to flip the baseline classification output. In addition, the method further comprises generating a fairness output for the input data based on the baseline classification output and the flip output. The method can make the output meet fairness while not affecting the accuracy of the output, and achieve both at the same time, so that the model can better play a role.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and more particularly to methods, apparatus, electronic devices, and media for generating fairness output. Background Technology

[0002] As artificial intelligence algorithms are applied to various sectors of society to assist or replace people in making decisions, especially in high-impact fields such as the judiciary and healthcare, decision-making efficiency has been greatly improved and user experience enhanced.

[0003] In recent years, the fairness of artificial intelligence (AI) algorithms has received considerable attention. People hope that the decision-making outcomes of AI algorithms will be fair or unbiased. The unfairness of AI algorithm decisions can stem from factors such as the distribution of training data and model structure. However, to enable AI algorithms to better serve society, existing algorithms need to be improved to train more equitable AI algorithm models. Summary of the Invention

[0004] Embodiments of this disclosure provide a method, apparatus, electronic device, and medium for generating fairness outputs.

[0005] According to a first aspect of this disclosure, a method for generating a fairness output is provided. The method includes determining a baseline classification output for input data. The method further includes generating a rejection output for the input data based on the input data and the baseline classification output, wherein the rejection output indicates whether the baseline classification output is rejected. The method further includes generating a flipped output for the input data based on the input data and the baseline classification output in response to the rejection output indicating that the baseline classification output is not rejected, wherein the flipped output indicates whether the baseline classification output is flipped. Furthermore, the method includes generating a fairness output for the input data based on the baseline classification output and the flipped output.

[0006] According to a second aspect of this disclosure, an apparatus for generating a fairness output is provided. The apparatus includes a baseline output determination module configured to determine a baseline classification output for input data. The apparatus also includes a rejection output generation module configured to generate a rejection output for the input data based on the input data and the baseline classification output, wherein the rejection output indicates whether the baseline classification output is rejected. The apparatus further includes a flip output generation module configured to generate a flip output for the input data based on the input data and the baseline classification output in response to a rejection output indicating that the baseline classification output is not rejected, wherein the flip output indicates whether the baseline classification output is flipped. Furthermore, the apparatus includes a fairness output generation module configured to generate a fairness output for the input data based on the baseline classification output and the flip output.

[0007] According to a third aspect of this disclosure, an electronic device is provided. The electronic device includes a processor and a memory coupled to the processor, the memory having instructions stored therein, which, when executed by the processor, cause the electronic device to perform the method according to the first aspect.

[0008] In a fourth aspect of this disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores one or more computer instructions, wherein the one or more computer instructions are executed by a processor to implement the method according to the first aspect.

[0009] The summary section is intended to present the chosen concepts in a simplified form, which will be further described in the detailed description below. The summary section is not intended to identify key or principal features of the claimed subject matter, nor is it intended to limit the scope of the claimed subject matter. Attached Figure Description

[0010] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:

[0011] Figure 1 A schematic diagram of an example environment that may be implemented according to embodiments of the present disclosure is shown;

[0012] Figure 2 A flowchart is shown illustrating a method for generating fairness output according to certain embodiments of the present disclosure;

[0013] Figure 3 A flowchart illustrating a method for constructing an integer programming model according to some embodiments of the present disclosure is shown;

[0014] Figure 4 A schematic diagram illustrating the process of training an agent model according to some embodiments of the present disclosure is shown;

[0015] Figure 5 A schematic diagram illustrating a process for generating a fairness output for input data according to some embodiments of the present disclosure;

[0016] Figure 6 A schematic diagram illustrating a process for adjusting numerical programming according to certain embodiments of the present disclosure is shown;

[0017] Figure 7 A block diagram of an apparatus for generating fairness output according to some embodiments of the present disclosure is shown; and

[0018] Figure 8 A block diagram of an electronic device according to some embodiments of the present disclosure is shown.

[0019] In all the accompanying figures, the same or similar reference numerals denote the same or similar elements. Detailed Implementation

[0020] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0021] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosure, based on the prompt message. It is understood that the above notification and user authorization process is merely illustrative and does not limit the implementation of this disclosure; other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0022] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0023] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0024] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc., may refer to different or the same objects unless explicitly stated. Other explicit and implicit definitions may also be included below.

[0025] With societal development, artificial intelligence (AI) algorithms are playing a significant role in various major fields, greatly improving decision-making efficiency and user experience. While the accuracy of AI algorithms has long been a focus, in recent years, the fairness of AI algorithms has also become crucial. This includes ensuring fairness and impartiality in decision-making within these algorithmic models, and protecting the interests of various groups. These issues directly impact public trust in machine learning. Failure to appropriately adjust and improve the fairness of AI algorithms could hinder the application and deployment of AI technologies and systems.

[0026] Existing fairness-based AI algorithms, such as fairness classifiers, improve model fairness but at the expense of model accuracy. While this improves the fairness metric, it harms the model's accuracy, which is not the ideal outcome.

[0027] To address this, embodiments of this disclosure provide a scheme for generating fair output. This scheme first generates a baseline classification output for the input data, then determines whether to discard the baseline classification output based on the data and the baseline classification output. Furthermore, when it is determined not to discard the baseline classification output, the scheme also determines whether to flip the baseline classification output by considering the input data and the baseline classification output, ultimately generating a fair output. Thus, the final output of this scheme satisfies fairness without affecting the accuracy of the output, achieving a balance between the two, thereby allowing the model to function more effectively.

[0028] Figure 1 A schematic diagram of an example environment 100 in which embodiments of the present disclosure may be implemented is shown. (See diagram for reference.) Figure 1 As shown, the example environment 100 includes a computing device 110, which can be a user terminal, mobile device, computer, etc., or it can be a computing system, a single server, a distributed server, or a cloud-based server. The example environment 100 can receive data 150-1, 150-2, 150-3, and 150-4 (collectively referred to as data 150, individually or collectively). Data 150 can be a sample of data to be predicted, possessing various different data characteristics, to be processed by the computing device 110 to obtain corresponding results.

[0029] like Figure 1 As shown, example environment 100 also includes a fairness classifier 120. The fairness classifier 120 is used to make fairness decisions on data 150, considering both accuracy and fairness during processing to ensure that the result satisfies fairness requirements without compromising accuracy. The fairness classifier 120 includes a baseline classifier 130 and a surrogate model 140. The baseline classifier can be a trained optimized classifier, which can be used to obtain the baseline output of data 150, such as the baseline classification result of data 150. The baseline classifier 130 can include machine learning models, such as logistic regression models, decision tree models, support vector machine models, Bayesian models, and K-nearest neighbor models, or deep learning models, such as convolutional neural networks, recurrent neural networks, and generative adversarial networks. This baseline output is the decision made by a regular optimized classifier, without considering fairness factors; therefore, the result is unusable in scenarios where fairness is considered. The surrogate model 140 can further process the baseline output of the baseline classifier 130 to obtain fairness outputs 160-1, 160-2, 160-3, and 160-4 (which may be referred to individually or collectively as fairness output 160). The abstention model 141 and the flip model 142 in the surrogate model 140 can process the baseline output by considering factors of fairness and accuracy to obtain fairness output 160. Fairness output 160 can be the same as the baseline output, or it can abandon the prediction of the given data sample (i.e., abstain), or it can flip the baseline output. Since the baseline output is a probability value, "flip" in this paper refers to the result obtained by subtracting the probability value from 1.

[0030] Figure 2 A flowchart of a method 200 for generating fairness output according to certain embodiments of the present disclosure is shown. At 202, a baseline classification output is determined for the input data. For example, as... Figure 1 The description describes determining a baseline classification output through a baseline classifier 130. The baseline classifier can be a machine learning classifier or a deep learning classifier. This baseline classification output can be used to determine the classification result of the input data, but the classification result may not be fair, for example, it may not meet the fairness index.

[0031] In step 204, based on the input data and the baseline classification output, a discard output is generated for the input data, where the discard output indicates whether to discard the baseline classification output. For example, as... Figure 1 The abandonment model 141 shown generates an abandonment output for the input data based on the input data and the baseline classification output. The abandonment output can indicate whether to abandon the baseline classification output.

[0032] In step 206, in response to the abandon output indication not to abandon the baseline classification output, a flipped output is generated based on the input data and the baseline classification output, where the flipped output indicates whether the baseline classification output is flipped. For example, as... Figure 1 As shown, the flip model 142 generates a flipped output for the input data based on the input data and the baseline classification output. The flipped output can indicate whether the baseline classification output should be flipped.

[0033] In step 208, a fairness output is generated based on the baseline classification output and the flipped output, tailored to the input data. For example, as... Figure 1 The fairness output 160 shown is generated by adjusting the baseline classification output through the proxy model 140.

[0034] In this way, Method 200 adjusts the baseline classification output by using the abstention output and the flip output to generate a fair output, so that the output results satisfy the fairness without harming the accuracy of the model, thus achieving both simultaneously and allowing the model to perform better.

[0035] Figure 3 A flowchart of a method 300 for constructing an integer programming model according to some embodiments of the present disclosure is shown. At 302, an optimization objective for integer programming is constructed. To more clearly define the optimization objective and constraints of integer programming in conjunction with a baseline classifier, the relevant definitions of the baseline classifier and the surrogate model are described first, followed by a description of how to construct the optimization objective for integer programming.

[0036] In some embodiments, an image classification model can be trained, and a dataset can be defined. Dataset The training set includes image data and has variables X, Z, Y, where X represents image features, Z represents protected features for the image (e.g., image origin), and Y represents the ground truth label (i.e., binary classification label). N data samples can be, for example, (x1, z1, y1), (x2, z2, y2), ..., (x... N , z N y N The baseline classifier can then be h: → [0, 1], where h represents the baseline classifier, which maps the training data X to the binary classification result. Such a baseline model can be optimized using Equation 1:

[0037]

[0038] S = h(X) ∈ [0, 1] provides the confidence level for each data sample. The binary classification result for each data sample is defined based on a threshold. For example, when h(X) is less than t0, the classification label is 0, and when h(X) is greater than t0, the classification label is 1.

[0039] In some embodiments of this disclosure, a proxy model is introduced, wherein the proxy model includes a waiver model h. A : [X, h(X)] → {0, 1} and the flipped model h F [X, h(X)] → {0, 1}. The abstention model is used to decide whether to abandon the prediction of a certain data sample. When the prediction result of the abstention model is 0, i.e., h... A (X, h(X)) = 0, indicating that the data sample should be abandoned for prediction; when the prediction result of the abandonment model is 1, i.e. h A (X, h(X)) = 1 indicates that the data sample should continue to be processed. The flip model is used to determine whether to flip the baseline output, as defined in Equation 2:

[0040]

[0041] Based on the above description of the baseline classifier and surrogate model, we construct the optimization objective of integer programming as follows:

[0042]

[0043] The optimization objective of integer programming is to minimize the error rate in order to improve the model accuracy. At the same time, the parameters of the abstention model and the flip model are introduced into the optimization objective to optimize the parameters of the abstention model and the flip model.

[0044] In section 302, multiple constraints are constructed for integer programming. When constructing these constraints, since the embodiments of this disclosure aim to ensure the model meets fairness requirements without affecting its accuracy, lossless constraints are included. Furthermore, the constraints include fairness constraints and abandonment rate constraints. The fairness constraint defines a threshold that the difference between different sample subsets in the model's prediction results must meet. For example, in the example used to determine image classification, it is desirable that the proportion of positive samples in the prediction results is similar for images from different sources, i.e., the model is fair to images from different sources. The abandonment rate constraint limits the proportion of abandoned prediction samples to improve the model's usability; too many abandoned samples may reduce the model's usability. After adding multiple constraints, the integer programming is as follows:

[0045]

[0046]

[0047] Where e′z =(1+η) z )e z , The error rate h and δ of the baseline classifier are z .η z It is the slack in the constraint that makes Referring to the integer programming problem described above, there are three constraints: the first constraint is fairness, the second constraint is abandonment rate, and the third constraint is losslessness.

[0048] In some embodiments, integer programming can be further improved to more conveniently solve integer programming problems. For example, for N data samples in a dataset, define ω = {ω n} N and f = {f n} N , where f n ∈{0,1} and ω n ∈{0, 1}. Solving the improved integer programming problem will return the discard result ω={ω n} N and the result of the flip f = {f n} N The improved integer programming definition is as follows:

[0049]

[0050] In 306, based on integer programming, the abstention and reversal results are obtained. In some embodiments, by solving the improved integer programming, the abstention result ω={ω n} N and the flip result f n ∈{0, 1}, for example, ω can be {1,1,0,1,…,0}, where “0” indicates that the corresponding data sample needs to be discarded, while “1” indicates that the corresponding data sample should continue to be processed (not discarded). In addition, f can be {1,0,0,1,…,1}, where “0” indicates that the baseline classification probability value of the corresponding data sample needs to be flipped.

[0051] Method 300 defines an integer programming problem, and by solving the integer programming problem, the rejection and flipping results for each data sample in the training dataset are obtained. The following will... Figure 4The text describes training a surrogate model using the abstention result as the training objective and a flip result as the training objective. Since the abstention and flip results are obtained by solving integer programming problems with constraints on fairness, abstention rate, and losslessness, they contain the optimization objective of integer programming and pattern information from multiple constraints. Training the surrogate model using these results allows it to learn to improve model fairness without compromising accuracy.

[0052] Figure 4 A schematic diagram of a process 400 for training an agent model according to some embodiments of the present disclosure is shown. Figure 4 As shown, the protection feature 402, the ground truth label 404, and the baseline output 406 are processed by integer programming 410 to solve the integer programming problem. For example, in the example used to determine the image category, the protection feature 402 can be the source of the image, the ground truth label 404 can be the category of the image, and the baseline output can be the probability value of the image being classified into each category using the baseline classifier. Figure 4 For illustrative purposes, the sample size shown is 6 (i.e., the length of each vector), and it can be understood that in actual use, more or fewer data samples can be processed.

[0053] By solving the integer programming problem 410, a rejection result 420 is obtained. This rejection result indicates whether to abandon prediction for each training data point in the training data 422. For example, as... Figure 4 As shown, the abstention result 420 is [1,1,0,1,0,1], which indicates that predictions for X1, X2, X4, and X6 in the training data 422 should not be abandoned, while predictions for X3 and X5 in the training data 422 should be abandoned. Then, the abstention result 420 is used as the training objective to train the abstention model 426, so that the abstention model 426 can learn the pattern in the integer programming 410.

[0054] Furthermore, by solving the integer programming problem 410, a flipping result 430 is obtained. This flipping result indicates whether the baseline output of each training data point in the training data 432 should be flipped. For example, as... Figure 4 As shown, the flipping result 430 is [0,1,1,0,1,1], which indicates that the baseline outputs of X1 and X4 in the training data 432 are not flipped, while the baseline outputs of X2, X3, X5, and X6 in the training data 432 are flipped. Then, the flipping result 430 is used as the training target to train the flipping model 436, so that the flipping model 436 can learn the pattern in the integer programming 410.

[0055] After training the proxy model, it can be verified under what conditions the proxy model satisfies fairness metrics, such as equal odds. Furthermore, reasonableness constraints can be introduced to ensure that the flipped model itself does not exceed the baseline optimal performance. For example, reasonableness constraints can be defined as follows:

[0056]

[0057] In addition, an equal abandonment rate constraint can be introduced, such that the abandonment rate is similar for each training subset in the training data. The equal abandonment rate constraint can be defined as follows:

[0058]

[0059] In the embodiments of this disclosure, the abstention model and the flip model are referred to as surrogate models because both are trained using the results obtained from integer programming as training objectives. During the inference phase, the abstention model and the flip model are used to process the baseline output, which can be considered as "surrogates" of the integer programming, hence the name surrogate models. In process 400, since the abstention result and the flip result are obtained by solving an integer programming problem with constraints on fairness, abstention rate, and losslessness, they contain the optimization objective of the integer programming and pattern information of multiple constraints. Training the surrogate model using the abstention result and the flip result allows the surrogate model to learn to improve model fairness without compromising accuracy.

[0060] Figure 5 A schematic diagram illustrates a process 500 for generating a fairness output for input data using a proxy model, according to some embodiments of this disclosure. For example... Figure 5 As shown, input data 502 is first fed into baseline classifier 504 to obtain baseline output 506. For example, in an example of binary classification of images, input data 502 can be image data, including multiple features of the image; baseline classifier 504 can be a machine learning or deep learning classifier used to perform binary classification on the input image; baseline output 506 can be the classification probability value obtained by baseline classifier 504 for input data 502. For example, 0.9 indicates that the probability of classifying X1 in input data 502 as a positive sample is 0.9. Therefore, baseline classification 504 can obtain baseline output 506 for input data 502, but this baseline output 506 may contain unfair classification results.

[0061] like Figure 5As shown, input data 502 and baseline output 506 are input into surrogate model 510, which includes abstention model 512 and flip model 514. First, the abstention model receives input data 502 and baseline output 506, and obtains the abstention output for input data 502 through abstention model 512. In some embodiments, when the abstention output for a certain data in input data 502 is "0", it indicates that prediction for that data should be abandoned (e.g., ...). Figure 5 (As shown by the arrow below the abstention model 512 in the example), the fairness output for this data is "NA", indicating that prediction of this data should be abandoned. For example, in the image classification example, when the abstention model 512 receives the image data and the baseline output for the image data, the generated abstention output is "0". Then the abstention model 512 determines that classifying this image data will affect fairness, so it abandons prediction of this image, and the fairness output for this image is "NA".

[0062] Continue to refer to Figure 5 When prediction of input data 502 is not abandoned, input data 502 and baseline output 506 are fed into flipping model 514 in surrogate model 510 to determine whether to flip baseline output 506. In some embodiments, when the flipping output generated by flipping model 514 is "0", the baseline output 506 is not flipped; when the flipping output is "1", the baseline output 506 is flipped. After passing through the flipping model, the final fairness output 520 is obtained. For example, in the example of classifying image data, when flipping model 514 receives image data and a baseline output for that image data (e.g., 0.9), it instructs not to flip the baseline output for that image data (i.e., flip the output to "0"), so the label of the corresponding fairness output is "1". However, when flipping model 514 instructs to flip the baseline output for that image data (i.e., flip the output to "1"), the baseline output is flipped to obtain 0.1, so the label of the corresponding fairness output is "0".

[0063] Therefore, through process 500, the abstention model and flipping model in the surrogate model are used to adjust the baseline output to obtain a fair output, thus solving the problem of unfairness in the baseline output. Simultaneously, the surrogate model is trained using integer programming that constrains fairness and accuracy; therefore, the surrogate model in the embodiments of this disclosure does not affect the model's accuracy while generating fair output. Furthermore, since integer programming also constrains the abstention rate, the surrogate model only abandons a small portion of the input data, and the proportion of abandonment can be adjusted, thus avoiding the situation where a large amount of data is abandoned, leading to poor model usability.

[0064] Figure 6A schematic diagram of a process 600 for adjusting integer programming according to certain embodiments of the present disclosure is shown. In some embodiments, due to the solving of integer programming problems (e.g., Figure 3 In Method 300, the integer programming input only includes the protected features, true labels, and baseline output, without directly using the features of the input data. This leads to randomness in solving the integer programming problem. Especially when dealing with two different input data sets, the corresponding protected features, true labels, and baseline outputs are identical. Therefore, the solutions obtained for both input data sets are optimal for integer programming, which hinders the complete capture of feature information and negatively impacts the training of the abstention and flipping models.

[0065] To address the randomness in integer programming solutions, process 600 incorporates predictive adjustment after solving the integer programming problem. The core idea of ​​predictive adjustment is to avoid predicting input data with the lowest baseline output predicted by the baseline classifier, based on the optimal score learned from the integer programming problem. Among the remaining samples, we further select and reverse the sample with the lowest baseline output. Conversely, samples with higher baseline outputs are unaffected by this process. Figure 6 As shown, the baseline outputs generated by the baseline classifier are sorted to obtain a descending baseline output of 602. Then, data samples with baseline outputs below a first threshold are discarded, as shown below. Figure 6 As shown, when the first threshold is 0.6, both 0.55 and 0.5 in the baseline output 602 are less than the first threshold. Regardless of whether the abstention result corresponding to the data sample is 0, its abstention result is adjusted to 0. In other words, data samples whose predicted baseline output is less than the first threshold are abandoned. For the remaining data samples, the data samples whose baseline output is less than the second threshold are flipped. When the second threshold is 0.75, regardless of whether the flip result corresponding to the data sample is 1, its flip result is adjusted to 1. In other words, for data samples whose baseline output is less than the second threshold, the corresponding fairness output result 608 is obtained through this data adjustment operation.

[0066] Figure 7 A block diagram of an apparatus 700 for generating fairness output according to some embodiments of the present disclosure is shown. Figure 7As shown, the apparatus 700 includes a baseline output determination module 702 configured to determine a baseline classification output for input data. The apparatus 700 also includes a discard output generation module 704 configured to generate a discard output for the input data based on the input data and the baseline classification output, wherein the discard output indicates whether to discard the baseline classification output. The apparatus 700 further includes a flip output generation module 706 configured to generate a flip output for the input data based on the input data and the baseline classification output in response to a discard output indication not to discard the baseline classification output, wherein the flip output indicates whether to flip the baseline classification output. Furthermore, the apparatus 700 includes a fairness output generation module 708 configured to generate a fairness output for the input data based on the baseline classification output and the flip output.

[0067] Figure 8 A block diagram of an electronic device 800 according to certain embodiments of the present disclosure is shown. Figure 8 A block diagram of an electronic device 800 according to certain embodiments of the present disclosure is shown. Device 800 may be the device or apparatus described in the embodiments of the present disclosure. Figure 8 As shown, device 800 includes a central processing unit (CPU) and / or a graphics processing unit (GPU) 801, which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) 802 or loaded from storage unit 808 into random access memory (RAM) 803. The RAM 803 can also store various programs and data required for the operation of device 800. The CPU / GPU 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804. Although not shown in... Figure 8 As shown, device 800 may also include a coprocessor.

[0068] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0069] The various methods or processes described above can be executed by CPU / GPU 801. For example, in some embodiments, the methods can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by CPU / GPU 801, one or more steps or actions in the methods or processes described above can be performed.

[0070] In some embodiments, the methods and processes described above can be implemented as a computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of this disclosure.

[0071] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example, but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0072] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, a local area network (LAN), a wide area network (WAN), and / or a wireless network, to an external computer or external storage device. The network may include copper cables, fiber optic cables, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0073] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​and conventional procedural programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0074] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0075] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0076] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0077] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical applications, or technical improvements to the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

[0078] The following are some example implementations of this disclosure.

[0079] Example 1. A method for generating fairness output, including

[0080] Determine the baseline classification output for the input data;

[0081] Based on the input data and the baseline classification output, a rejection output is generated for the input data, wherein the rejection output indicates whether to abandon the baseline classification output;

[0082] In response to the abandonment output indication not to abandon the baseline classification output, a flipped output is generated based on the input data and the baseline classification output, wherein the flipped output indicates whether to flip the baseline classification output; and

[0083] Based on the baseline classification output and the flipped output, a fairness output is generated for the input data.

[0084] Example 2. The method described in Example 1 further includes:

[0085] In response to determining that the abandonment output indicates to abandon the baseline classification output, the baseline classification output is abandoned.

[0086] Example 3. The method according to any one of Examples 1-2, wherein generating the fairness output for the input data includes:

[0087] In response to the flip output instruction, the baseline output is flipped, and the fairness output that flips the baseline classification output is generated; and

[0088] In response to the flip output instruction, the baseline output is not flipped, and the same fairness output as the baseline classification output is generated.

[0089] Example 4. The method according to any one of Examples 1-3, wherein the baseline classification output is generated via a baseline classifier, the abstention output is generated via a abstention model in a surrogate model, the flip output is generated via a flip model in the surrogate model, and the baseline classifier, the abstention model, and the flip model are included in a fairness classifier.

[0090] Example 5. The method according to any one of Examples 1-4 further includes:

[0091] Based on the baseline classifier and training data in the fairness classifier, integer programming is used to determine the rejection and flip results for the training data, wherein the integer programming at least defines lossless constraints for the fairness classifier; and

[0092] Based on the baseline classifier, the training data, the abstention results, and the flip results, the flip model and the abstention model in the fairness classifier are generated, wherein the flip model and the abstention model are used to adjust the baseline results from the baseline classifier.

[0093] Example 6. The method according to any one of Examples 1-5, wherein determining the abstention result and the reversal result using the integer programming model includes:

[0094] Based on the baseline classifier and the training data, the integer programming model is constructed; and

[0095] The integer programming model is used to determine the abstention result and the reversal result.

[0096] Example 7. The method according to any one of Examples 1-6, wherein constructing the integer programming model comprises:

[0097] Construct an optimization objective for the integer programming model; and

[0098] Construct multiple constraints for the integer programming model, wherein the multiple constraints include at least a lossless constraint for the fairness classifier.

[0099] Example 8. The method according to any one of Examples 1-7, wherein the optimization objective includes an accuracy objective, and wherein the plurality of constraints further includes a fairness constraint and an abandonment rate constraint.

[0100] Example 9. The method according to any one of Examples 1-8, wherein generating the flip model and the abstention model comprises:

[0101] Based on the baseline classifier, the training data, and the abstention results, the abstention model in the proxy model is generated; and

[0102] Based on the baseline classifier, the training data, and the flipping result, the flipping model in the surrogate model is generated.

[0103] Example 10. The method according to any one of Examples 1-9 further includes:

[0104] Based on the baseline classifier, determine the baseline classification result for the training data; and

[0105] Based on the baseline classification results, the abstention results and the flip results are adjusted.

[0106] Example 11. The method according to any one of Examples 1-10, wherein the multiple constraints of the integer programming model are adjustable by multiple parameters.

[0107] Example 12. An apparatus for generating fairness output, comprising:

[0108] The baseline output determination module is configured to determine the baseline classification output for the input data;

[0109] An abstention output generation module is configured to generate an abstention output for the input data based on the input data and the baseline classification output, wherein the abstention output indicates whether to abandon the baseline classification output;

[0110] A flipped output generation module is configured to, in response to the discard output indication not to discard the baseline classification output, generate a flipped output for the input data based on the input data and the baseline classification output, wherein the flipped output indicates whether to flip the baseline classification output; and

[0111] The fair output generation module is configured to generate a fair output for the input data based on the baseline classification output and the flipped output.

[0112] Example 13. The apparatus according to any one of Examples 12, further comprising:

[0113] The baseline output abstention module is configured to abandon the baseline classification output in response to determining that the abstention output indication is to abandon the baseline classification output.

[0114] Example 14. The apparatus according to any one of Examples 12-13, wherein generating the fairness output for the input data comprises:

[0115] A baseline output flipping module is configured to flip the baseline output in response to the flipped output instruction, generating the fairness output that flips the baseline classification output; and

[0116] The baseline output holding module is configured to not flip the baseline output in response to the flip output indication, and to generate the same fairness output as the baseline classification output.

[0117] Example 15. The apparatus according to any one of Examples 12-14, wherein the baseline classification output is generated via a baseline classifier, the abstention output is generated via a abstention model in a surrogate model, the flip output is generated via a flip model in the surrogate model, and the baseline classifier, the abstention model, and the flip model are included in a fairness classifier.

[0118] Example 16. The apparatus according to any one of Examples 12-15, further comprising:

[0119] The first result determination module is configured to determine, based on the baseline classifier and training data in the fairness classifier, an integer programming method to determine the rejection and flip results for the training data, wherein the integer programming method at least defines lossless constraints for the fairness classifier; and

[0120] The first model generation module is configured to generate the flip model and the abstention model in the fairness classifier based on the baseline classifier, the training data, the abstention result, and the flip result, wherein the flip model and the abstention model are used to adjust the baseline result from the baseline classifier.

[0121] Example 17. The apparatus according to any one of Examples 12-16, wherein determining the abstention result and the flip result using the integer programming model comprises:

[0122] An integer programming construction module is configured to construct the integer programming model based on the baseline classifier and the training data; and

[0123] The second result determination module is configured to act as an agent to determine the abstention result and the reversal result using the integer programming model.

[0124] Example 18. The apparatus according to any one of Examples 12-17, wherein constructing the integer programming model comprises:

[0125] An optimization objective building module is configured to build an optimization objective for the integer programming model; and

[0126] The objective constraint construction module is configured to construct a plurality of constraints for the integer programming model, wherein the plurality of constraints includes at least a lossless constraint for the fairness classifier.

[0127] Example 19. The apparatus according to any one of Examples 12-18, wherein the optimization objective includes an accuracy objective, and wherein the plurality of constraints further includes a fairness constraint and an abandonment rate constraint.

[0128] Example 20. The apparatus according to any one of Examples 12-19, wherein generating the flip model and the abstention model comprises:

[0129] The abstention model generation module is configured to generate the abstention model in the proxy model based on the baseline classifier, the training data, and the abstention results; and

[0130] The flip model generation module is configured to generate the flip model in the surrogate model based on the baseline classifier, the training data, and the flip result.

[0131] Example 21. The apparatus according to any one of Examples 12-20, further comprising:

[0132] The baseline result determination module is configured to determine the baseline classification result for the training data based on the baseline classifier; and

[0133] The first result adjustment module is configured to adjust the abstention result and the flip result based on the baseline classification result.

[0134] Example 22. The apparatus according to any one of Examples 12-21, wherein the multiple constraints of the integer programming model are adjustable by multiple parameters.

[0135] Example 23. An electronic device comprising:

[0136] Processor; and

[0137] A memory coupled to the processor, the memory having instructions stored therein, which, when executed by the processor, cause the electronic device to perform actions, the actions including:

[0138] Determine the baseline classification output for the input data;

[0139] Based on the input data and the baseline classification output, a rejection output is generated for the input data, wherein the rejection output indicates whether to abandon the baseline classification output;

[0140] In response to the abandonment output indication not to abandon the baseline classification output, a flipped output is generated based on the input data and the baseline classification output, wherein the flipped output indicates whether to flip the baseline classification output; and

[0141] Based on the baseline classification output and the flipped output, a fairness output is generated for the input data.

[0142] Example 24. According to the device described in Example 23, the action further includes:

[0143] In response to determining that the abandonment output indicates to abandon the baseline classification output, the baseline classification output is abandoned.

[0144] Example 25. The device according to any one of Examples 23-24, wherein generating the fairness output for the input data includes:

[0145] In response to the flip output instruction, the baseline output is flipped, and the fairness output that flips the baseline classification output is generated; and

[0146] In response to the flip output instruction, the baseline output is not flipped, and the same fairness output as the baseline classification output is generated.

[0147] Example 26. The device according to any one of Examples 23-25, wherein the baseline classification output is generated via a baseline classifier, the abstention output is generated via a abstention model in a surrogate model, the flip output is generated via a flip model in the surrogate model, and the baseline classifier, the abstention model, and the flip model are included in a fairness classifier.

[0148] Example 27. The device according to any one of Examples 23-26, further comprising:

[0149] Based on the baseline classifier and training data in the fairness classifier, integer programming is used to determine the rejection and flip results for the training data, wherein the integer programming at least defines lossless constraints for the fairness classifier; and

[0150] Based on the baseline classifier, the training data, the abstention results, and the flip results, the flip model and the abstention model in the fairness classifier are generated, wherein the flip model and the abstention model are used to adjust the baseline results from the baseline classifier.

[0151] Example 28. The device according to any one of Examples 23-27, wherein determining the abstention result and the flip result using the integer programming model includes:

[0152] Based on the baseline classifier and the training data, the integer programming model is constructed; and

[0153] The integer programming model is used to determine the abstention result and the reversal result.

[0154] Example 29. The device according to any one of Examples 23-28, wherein constructing the integer programming model comprises:

[0155] Construct an optimization objective for the integer programming model; and

[0156] Construct multiple constraints for the integer programming model, wherein the multiple constraints include at least a lossless constraint for the fairness classifier.

[0157] Example 30. The device according to any one of Examples 23-29, wherein the optimization objective includes an accuracy objective, and wherein the plurality of constraints further includes a fairness constraint and an abandonment rate constraint.

[0158] Example 31. The device according to any one of Examples 23-30, wherein generating the flip model and the abstention model comprises:

[0159] Based on the baseline classifier, the training data, and the abstention results, the abstention model in the proxy model is generated; and

[0160] Based on the baseline classifier, the training data, and the flipping result, the flipping model in the surrogate model is generated.

[0161] Example 32. The device according to any one of Examples 23-31, further comprising:

[0162] Based on the baseline classifier, determine the baseline classification result for the training data; and

[0163] Based on the baseline classification results, the abstention results and the flip results are adjusted.

[0164] Example 33. The device according to any one of Examples 23-32, wherein the multiple constraints of the integer programming model are adjustable by multiple parameters.

[0165] Example 34. A computer-readable storage medium having stored thereon one or more computer instructions, wherein the one or more computer instructions are executed by a processor to implement the method according to any one of Examples 1 to 11.

[0166] Example 35. A computer program product tangibly stored on a computer-readable medium and comprising computer-executable instructions that, when executed by a device, cause the device to perform the method according to any one of Examples 1 to 11.

[0167] Although this disclosure has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A method for generating fairness output, comprising: Use an image classification model to determine the baseline classification output for the input image; Based on the input image and the baseline classification output for the input image, a rejection output for the input data is generated, wherein the rejection output indicates whether the baseline classification output for the input image is abandoned in order to generate a fair output that meets the fairness requirements; In response to the abandonment output indication not to abandon the baseline classification output, a flipped output for the input image is generated based on the input image and the baseline classification output, wherein the flipped output indicates whether the baseline classification output is flipped; as well as Based on the baseline classification output and the flipped output, a fairness output is generated for the input image, such that for different subsets of the input image, the proportion of positive samples in the fairness output satisfies the fairness requirement.

2. The method according to claim 1, further comprising: In response to determining that the abandonment output indicates to abandon the baseline classification output, the baseline classification output is abandoned.

3. The method of claim 2, wherein generating the fairness output for the input image comprises: In response to the flip output instruction, the baseline classification output is flipped, and the fairness output that flips the baseline classification output is generated; as well as In response to the flip output instruction, the baseline classification output is not flipped, and the same fairness output as the baseline classification output is generated.

4. The method of claim 1, wherein the baseline classification output is generated via the image classification model, the abstention output is generated via the abstention model in the surrogate model, the flip output is generated via the flip model in the surrogate model, and the image classification model, the abstention model, and the flip model are included in a fairness classifier.

5. The method according to claim 4, further comprising: Based on the image classification model and training data in the fairness classifier, integer programming is used to determine the rejection and flip results for the training data, wherein the integer programming at least limits the lossless constraints for the fairness classifier; as well as Based on the image classification model, the training data, the abstention result, and the flip result, the flip model and the abstention model in the fairness classifier are generated, wherein the flip model and the abstention model are used to adjust the baseline result from the image classification model.

6. The method of claim 5, wherein determining the abstention result and the reversal result using the integer programming model comprises: Based on the image classification model and the training data, the integer programming model is constructed. as well as The integer programming model is used to determine the abstention result and the reversal result.

7. The method of claim 6, wherein constructing the integer programming model comprises: Construct an optimization objective for the integer programming model; as well as Construct multiple constraints for the integer programming model, wherein the multiple constraints include at least a lossless constraint for the fairness classifier.

8. The method of claim 7, wherein the optimization objective includes an accuracy objective, and wherein the plurality of constraints further includes a fairness constraint and an abandonment rate constraint.

9. The method of claim 5, wherein generating the flip model and the abstention model comprises: Based on the image classification model, the training data, and the abstention result, the abstention model in the proxy model is generated; as well as Based on the image classification model, the training data, and the flipping result, the flipping model in the proxy model is generated.

10. The method of claim 5, further comprising: Based on the image classification model, determine the baseline classification result for the training data; as well as Based on the baseline classification results, the abstention results and the flip results are adjusted.

11. The method of claim 8, wherein the multiple constraints of the integer programming model are adjustable via multiple parameters.

12. An apparatus for generating a fairness output, comprising: The baseline output determination module is configured to use an image classification model to determine the baseline classification output for the input image; An abstention output generation module is configured to generate an abstention output for the input image based on the input image and the baseline classification output for the input image, wherein the abstention output indicates whether the baseline classification output for the input image is abandoned in order to generate a fair output that meets the fairness requirements; A flip output generation module is configured to generate a flip output for the input image based on the input image and the baseline classification output in response to the discard output indication not to discard the baseline classification output, wherein the flip output indicates whether to flip the baseline classification output; as well as The fair output generation module is configured to generate a fair output for the input image based on the baseline classification output and the flipped output, such that for different subsets of the input image, the proportion of positive samples in the fair output satisfies the fairness requirement.

13. An electronic device, comprising: processor; as well as A memory coupled to the processor, the memory having instructions stored therein, which, when executed by the processor, cause the electronic device to perform the method according to any one of claims 1 to 11.

14. A computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions are executed by a processor to implement the method according to any one of claims 1 to 11.