A method, electronic device, and medium for debiasing based on local search
By adjusting the cluster centers and local search algorithm through a clustering analysis method based on local search, the unfairness problem in machine learning models is solved, and fairness is improved without sacrificing utility, thus providing a fairer and more responsible artificial intelligence technology.
Patent Information
- Application Number
- CN202211524805.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-30
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2042-11-30
AI Technical Summary
Existing machine learning algorithms suffer from unfairness in classification prediction, especially exhibiting bias in sensitive attributes such as gender, leading to negative social impacts. Existing methods often lose utility when trying to improve fairness.
A clustering analysis method based on local search is adopted. By adjusting the cluster centers and the local search algorithm, the distribution of sensitive attributes of each cluster is ensured to be uniform, reducing intra-cluster distance and increasing inter-cluster distance, thereby improving the fairness of the dataset.
Without significantly sacrificing model utility, this method improves the decision-making fairness of machine learning models, provides individual fairness guarantees, eliminates bias, and enhances the fairness and utility of the model.
Smart Images

Figure CN115795327B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of artificial intelligence, and particularly relates to a local search-based debiasing method, an electronic device and a medium. BACKGROUND
[0002] The progress of human science and technology is accompanied by the vigorous development of artificial intelligence. Artificial intelligence technologies represented by machine learning are increasingly involved in decision-making activities and social governance in people's work. Machine learning helps people solve various complex classification prediction problems encountered in work by virtue of its powerful data processing capability. The application in these typical scenarios reduces the work intensity of practitioners and social managers, and brings positive economic and social benefits. Therefore, machine learning is also gradually penetrating into people's daily life activities, helping people to free themselves from heavy and repetitive single activities by using its powerful ability.
[0003] As machine learning and its related technologies are increasingly applied to decision-making tasks such as credit issuance, cumulative offender prediction, etc., they help practitioners and decision-makers improve work efficiency and promote economic development, bringing more positive social impact. However, recent studies have shown that many existing methods have unfair problems in classification prediction, which means that the prediction classification results will be different because of the difference in sensitive attributes, especially the problem of gender. These unfairnesses are reflected in, for example, the resume screening in recruitment, and the resume screening results of certain positions may have a much higher proportion of men than women. It can also be seen that biased decisions made by machine learning algorithms can have many negative impacts on society, and as artificial intelligence is widely penetrating into all aspects of people's production and life, it is particularly important to improve the fairness of machine learning algorithms.
[0004] The main reason for the unfairness of the decision suggestions provided by artificial intelligence technology to cause bias and even discrimination is that the model and algorithm used by machine learning does not consider fairness in the process of prediction and classification, so it is urgent to reduce the bias and unfairness in the model and algorithm, and fairness is often inconsistent with the optimization goal of maximizing utility, so the solution is mostly focused on finding a balance between the two to achieve better fairness and greater utility. The current bias elimination work in the model and algorithm mainly focuses on learning fair representation using adversarial training technology, and the role of learning representation is to filter out information related to sensitive attributes, and this series of work is mainly carried out on supervised learning, and the utility is usually characterized by the accuracy of the target task. In unsupervised learning, especially in clustering analysis, some studies improve the algorithm by embedding fairness constraints to achieve the purpose of improving fairness. Some existing methods improve the algorithm or the model to improve fairness, but the obvious shortcomings of the existing methods include weak support for large data sets, and the utility is obviously lost to improve fairness.
[0005] In view of the fact that biased decision results are easy to be made when using artificial intelligence technology to make classification decisions, and the limitations of existing methods to reduce bias, a local search-based debiasing method is studied to help the application of artificial intelligence technology in people's production and life, which has extremely important theoretical and practical significance. SUMMARY
[0006] The purpose of the present application is to overcome the shortcomings of the prior art and provide a local search-based debiasing method, an electronic device and a medium.
[0007] The purpose of the present application is achieved by the following technical solutions: the first aspect of the embodiment of the present application provides a local search-based debiasing method, which comprises the following steps:
[0008] (1) obtaining original data and marking the category attribute in the original data to obtain a marked data set, denoted as data set X;
[0009] (2) performing local search-based clustering analysis on the data set X selected in step (1), using P to represent the point set of clustering, for a point x in the point set P with a size of n, let r(x) be the radius, so that there are at least n / k points from P in the sphere with x as the center and r(x) as the radius; so that the sample points of different clusters in the data set X are as different as possible, that is, the intra-class distance is as small as possible and the inter-class distance is as large as possible; the distribution of sensitive attributes of each cluster group is as uniform as possible to improve the fairness of the data set X, and the debiasing based on local search is completed.
[0010] The second aspect of the embodiment of the present application provides an electronic device, comprising a memory and a processor, the memory is coupled with the processor; wherein the memory is used for storing program data, and the processor is used for executing the program data to realize the bias elimination method based on local search.
[0011] The third aspect of the embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize the bias elimination method based on local search.
[0012] The present application has the beneficial effects that: based on the individual fairness angle, the present application proposes a bias elimination method based on local search, which is realized by a clustering analysis method based on local search, for a point x in a point set P with a size of n, let r(x) be a radius, so that the sphere with x as the center and r(x) as the radius has at least n / k points from P, that is, if k random points are selected from P as the center, each point x in P has a center within the radius r(x), which improves the existing clustering method, the present application method makes the sample points in different clusters in the data set as different as possible, that is, the intra-class distance is as small as possible, and the inter-class distance is as large as possible. The distribution of sensitive attributes of each cluster group is as uniform as possible, which improves the fairness of the data set. The individual fairness of the point x in P is guaranteed, so as to achieve the purpose of bias elimination and improve the decision fairness of the machine learning model. BRIEF DESCRIPTION OF DRAWINGS
[0013] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and all other drawings obtained by those skilled in the art without creative labor on the premise of the drawings can also be within the protection scope of the present application.
[0014] Figure 1 A flowchart of a bias elimination method based on local search. DETAILED DESCRIPTION
[0015] In order to make the purpose, technical scheme and advantages of the present application more clear and clear, the present application will be further described in detail in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0016] The present application will be described in detail below in combination with the drawings. The features in the following embodiments and implementation manners can be combined with each other without conflict.
[0017] In machine learning, when a sensitive attribute set (such as gender, region, etc.) is included in the data set, the prediction results of the same algorithm may be different in different scenarios. Fairness learning is to protect or hide certain sensitive attributes while maintaining the original learning utility.
[0018] In unsupervised learning, the clustering algorithm is to group sample points into different clusters, so that the sample points in each cluster are as similar as possible, and the sample points in different clusters are as different as possible, that is, the intra-class distance is as small as possible, and the inter-class distance is as large as possible. In fairness clustering analysis, fairness refers to the distribution of sensitive attributes in each cluster being as uniform as possible, such as the male-female ratio of samples in a cluster being as balanced as possible, so that the fairness is better; on the contrary, if all the samples distributed in a cluster are male, then the sensitive attribute distribution of this cluster is not balanced, so the fairness is poor.
[0019] As shown in Figure 1 The application provides a debiasing method based on local search, which specifically comprises the following steps:
[0020] (1) Obtain the original data, and mark the category attributes in the original data to obtain a marked data set, denoted as data set X; the original data is a text data set with sensitive attributes;
[0021] In this embodiment, the Adult data set is selected as the original data set, and there are 14 sample attributes in the Adult data set. The category attributes in the Adult data set are marked, and the task attributes and sensitive attributes are marked. In this case, the gender attribute is marked as a sensitive attribute, and the male in the gender attribute is replaced by the number 1, and the female is replaced by 0. The annual income classification is marked as a task attribute, and the annual income classification exceeding 50K is replaced by the number 0, and the annual income classification not exceeding 50K is replaced by the number 1. A marked data set is obtained, denoted as data set X;
[0022] Without debiasing based on local search, the data of the data set X is directly clustered and trained, and the trained model has a high degree of bias, and the fairness performance is also poor.
[0023] (2) Perform clustering analysis based on local search in the data set X selected in step (1), and use P to represent the point set of clustering. For a point x in the point set P with a size of n, let r(x) be the radius, so that the sphere with x as the center and r(x) as the radius has at least n / k points from P, that is, if k random points are selected from P as the center, then each point x e P has a center within the radius r(x). So that the sample points of different clusters in the data set X are as different as possible, that is, the intra-class distance is as small as possible, and the inter-class distance is as large as possible; the distribution of sensitive attributes in each cluster is as uniform as possible, so as to improve the fairness of the data set X, and complete the debiasing based on local search.
[0024] The above steps improve the existing clustering algorithm, so that the sample points in different clusters in the data set are as different as possible, that is, the intra-class distance is as small as possible, and the inter-class distance is as large as possible. The distribution of sensitive attributes of each cluster is as uniform as possible, improving the fairness of the data set. And individual fairness is provided for point x∈P, so as to achieve the purpose of bias elimination and improve the decision fairness of the machine learning model.
[0025] The step (2) specifically comprises the following sub-steps:
[0026] (2.1) Find a set of k feasible centers about the critical sphere B in the data set X selected in step (1). Use P to represent the point set of clustering, and the parameter k represents the allowed number of clustering centers. For each x∈P, B(x,r)={y∈P:d(x,y)≤r} is represented as a point set contained in a sphere with radius r around x. The minimum radius corresponding to each clustering center number k is recorded as a c, that is, c=argmin x∈Z r k (x), traverse each c, and divide the sample into the corresponding center cluster: Find the point greater than 6α·r k (x) in d(x,c), where α is the Gaussian mixture coefficient. The value range of the number of clustering centers k is k∈[5,30], and clustering analysis is performed every 5.
[0027] (2.2) Construct an initial center set S'. Let Select the points in the point set P but not in the initial center set S', and record the point with the maximum distance to the center in these points as a set z, that is, z=argmax x∈P\S′ d(x,S′), and then take the union of the initial center set S' and the set z to update the feasible center set S', that is, S'=S'∪{z}.
[0028] (2.3) Local search update. Iterate, and in each iteration j, check whether there is a maximum t size exchange (that is, replace t'≤t centers in the current center S j with t' centers outside the center set S j , Sj is a subset of the feasible center set S', and t is the number of centers in the current center set), and the result is recorded in a set of feasible centers S' about B. If there is such a set S' that the clustering cost is increased by a factor of more than 1 / (1-ε) than the clustering cost centered on S j , that is, cost(S')≤(1-ε)·cost(S j ). Then let S j+1S' and continue the next iteration; if not, then stop the iteration and output the current set of centers S j where the cost function is the average distance of the training examples to their assigned cluster centers, which is calculated as follows:
[0029]
[0030] where, is the distance between x (i) and the center of the cluster it belongs to, and n is the size of the point set.
[0031] In this example, the application of the local search algorithm to the clustering analysis will make the original machine learning model improve its fairness performance without significant loss of its effectiveness. Here, the effectiveness is measured using the cost function, and the smaller the cost function is at each clustering, the higher the effectiveness of the method.
[0032] When the effectiveness of the model gradually increases and approaches a plateau, it indicates that the training of the machine learning model for this clustering is stable; when the effectiveness of the model continues to rise without converging, it indicates that the center of the classification needs to be increased and the training needs to continue.
[0033] In summary, the method of the present application makes the sample points in different clusters in the data set as different as possible, i.e., the intra-class distance is as small as possible and the inter-class distance is as large as possible. The distribution of sensitive attributes in each cluster is as uniform as possible, improving the fairness of the data set. The method of the present application provides individual fairness guarantees for point x P, thereby achieving the purpose of bias elimination and improving the decision fairness of the machine learning model while controlling the effectiveness of the machine learning model from decreasing significantly. It helps the application of deep learning models in people's production and life and provides a new idea and guidance for researching more fair and more responsible artificial intelligence technology.
[0034] Those skilled in the art will appreciate that embodiments of the application can be provided as methods, systems, or computer program products. Accordingly, the application can be embodied in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the application can be embodied in the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk memory, CD-ROMs, optical storage media, etc.) having computer usable program code embodied therein.
[0035] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks. Figure 1 one or more flow or blocks.
[0036] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks. Figure 1 one or more flow or blocks. Figure 1 one or more flow or blocks.
[0037] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks. Figure 1 one or more flow or blocks.
[0038] The above description is only preferred embodiments of the present application, and is not used to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for debiasing based on local search, characterized in that, The method comprises the following steps: (1) obtaining original data, and marking a category attribute in the original data to obtain a marked data set, denoted as data set ; the original data is a text data set with sensitive attributes; (2) Perform local search-based clustering analysis on the dataset X selected in step (1), using P to represent the set of points in the cluster. For a dataset of size X... point set Points in ,make With radius, such that The radius of the center is The sphere contains at least one source of The goal is to ensure that the sample points of different clusters in dataset X are as dissimilar as possible, i.e., the intra-class distance is as small as possible and the inter-class distance is as large as possible; the distribution of the sensitive attributes of each cluster should be as uniform as possible to improve the fairness of dataset X and complete the bias removal based on local search. The step (2) specifically comprises the following sub-steps: (2.1) Find a set of critical spheres in the dataset X selected in step (1) of feasible centers: Let P denote the set of clustered points, parameter denote the number of centers allowed for clustering; for each , let denote the set of points contained in a sphere of radius centered at ; let the minimum radius corresponding to each cluster center number be denoted as a , i.e. , traverse each , and put the sample into the corresponding center cluster: , find the points in that are greater than , where is the Gaussian mixture coefficient; (2.2) Constructing initial center set Let Select points in point set but not in initial center set , and let the point with the largest distance to the center among these points be , i.e. , and then update the initial center set by taking the union of the initial center set and set , i.e. ; (2.3) selecting a feasible center set from the feasible center set obtained in step (2.2) according to a clustering cost; and According to the clustering cost; the step (2.3) is specifically: The feasible center set obtained in step (2.2) Perform local search update: replace the current centers in by a new set of centers outside the feasible center set , and record the result in a set of feasible center sets with respect to the critical sphere B; if there exists such a feasible center set such that its clustering cost is less than 1 - ε times the clustering cost centered at , i.e. ; then let and continue the next iteration; if not, then stop the iteration and output the current center set 2. The method of claim 1, wherein, The clustering cost in the step (2.3) is calculated by a cost function, and the calculation formula is as follows: ; wherein is the center point of the cluster to which the point belongs, is the size of the point set.
3. The method of claim 1, wherein, The step (2.1) cluster center number The value range of .
4. An electronic device comprising a memory and a processor, characterized in that, The memory is coupled with the processor; wherein the memory is used for storing program data, and the processor is used for executing the program data to realize the method for removing bias based on local search in any one of claims 1-3.
5. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to realize the method for removing bias based on local search in any one of claims 1-3.
Citation Information
Patent Citations
Data depolarization method and device based on prejudice neurons
CN115034371A
Deep learning model depolarization method and device based on data set sensitive attribute reconstruction
CN115310606A