Multi-target learning model training method, device and equipment based on fair perception
By calculating and screening the correlation of evaluation indicators of machine learning models and adjusting training indicators, the problem of inapplicability of evaluation indicators in the existing technology is solved, and better model training adaptability and effect are achieved.
Patent Information
- Application Number
- CN202411014402.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-12-31
AI Technical Summary
The predefined evaluation metrics in the prior art are not suitable for training machine learning models, cannot match the data sets used during training, and are not suitable for each round of training.
By obtaining the preset evaluation metric values of the pre-trained machine learning model, compute the correlation between the evaluation metrics, filter out the target evaluation metrics, and adjust the model training based on these target metrics until the number of iterations or time is reached.
This enables the evaluation indicators to more realistically evaluate the model after each round of training, and is suitable for the next round of model training, improving the adaptability and effectiveness of model training.
Smart Images

Figure CN119227829A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machine learning, and in particular to a fairness-aware multi-objective learning model training method, device, and equipment. Background Art
[0002] Each iterative training of the machine learning model must calculate the indicator value of the evaluation indicator of the model, so as to perform the next round of iterative training based on the indicator value. For example, the evaluation indicators include indicators for evaluating the fairness of the machine learning model and indicators for evaluating the accuracy of the machine learning model. In the prior art, evaluation indicators are defined through prior knowledge or a large amount of computing cost before training the machine learning model. Since the evaluation indicators are defined before training the machine learning model, the pre-defined evaluation indicators may not match the data set used in training, nor may they be applicable to each round of training. Therefore, the pre-defined evaluation indicators are not applicable to the training of machine learning models.
[0003] In summary, the pre-defined evaluation metrics in the prior art are not suitable for the training of machine learning models.
[0004] Therefore, the prior art still needs to be improved and enhanced. Summary of the invention
[0005] In order to solve the above technical problems, the present invention provides a fairness-aware multi-objective learning model training method, device, and equipment, which solves the problem that the pre-defined evaluation indicators in the prior art are not suitable for machine learning model training.
[0006] To achieve the above object, the present invention adopts the following technical solutions: In a first aspect, the present invention provides a fairness-aware multi-objective learning model training method, which includes: Obtain each pre-trained machine learning model, and determine the indicator value of each preset evaluation indicator of each of the pre-trained machine learning models; Determining correlation information between the preset evaluation indicators based on the indicator values of the preset evaluation indicators, and selecting a target evaluation indicator from the preset evaluation indicators based on the correlation information; According to the target evaluation indicator, a trained machine learning model is determined.
[0007] In one implementation, determining the indicator value of each preset evaluation indicator of each pre-trained machine learning model includes: The pre-trained machine learning model is trained on a validation data set to obtain index values of a fairness evaluation index and an accuracy evaluation index of the pre-trained machine learning model, and the index values of the fairness evaluation index and the accuracy evaluation index are used as index values of each preset evaluation index.
[0008] In one implementation, the step of selecting a target evaluation indicator from the preset evaluation indicators based on the correlation information includes: According to the correlation information, target evaluation indicators with no correlation or negative correlation are screened out from the preset evaluation indicators.
[0009] In one implementation, determining the trained machine learning model based on the target evaluation indicator includes: According to the index value of the target evaluation index of each of the pre-trained machine learning models on the validation data set, a plurality of parent models are selected from each of the pre-trained machine learning models; Combine the parameters of several parent models to obtain a child model; Train the offspring model on the training data set to obtain the initial training model; Based on the initial training model, a trained machine learning model is obtained.
[0010] In one implementation, the training of the offspring model on the training data set to obtain the initial training model includes: Adding noise to the parameters of the offspring model to obtain the updated offspring model; The updated offspring model is trained on the training data set to obtain an initial training model.
[0011] In one implementation, obtaining a trained machine learning model based on the initial training model includes: Calculating a first indicator value of each target evaluation indicator of each of the initial training models on a validation data set; Calculating a second indicator value of each of the target evaluation indicators of each of the pre-trained machine learning models on the validation data set; According to the first indicator value and the second indicator value, a preliminary selected model is selected from each of the initial training models and each of the pre-trained machine learning models; Iteratively update the target evaluation index, and train the preliminary model according to the target evaluation index after iterative update until the number of iterations or iteration time is reached to obtain a trained machine learning model.
[0012] In one implementation, the machine learning model is a model for screening resumes or a model for predicting test scores.
[0013] In a second aspect, an embodiment of the present invention further provides a multi-objective learning model training device based on fairness perception, wherein the device includes the following components: An indicator value calculation module, used to obtain each pre-trained machine learning model and determine the indicator value of each preset evaluation indicator of each pre-trained machine learning model; An indicator screening module, used to determine the correlation information between each of the preset evaluation indicators according to the indicator value of each of the preset evaluation indicators, and screen out a target evaluation indicator from each of the preset evaluation indicators according to the correlation information; The model training module is used to determine the trained machine learning model based on the target evaluation indicator.
[0014] In the third aspect, an embodiment of the present invention also provides a terminal device, wherein the terminal device includes a memory, a processor, and a fairness-awareness-based multi-objective learning model training program stored in the memory and executable on the processor, and when the processor executes the fairness-awareness-based multi-objective learning model training program, the steps of the fairness-awareness-based multi-objective learning model training method described above are implemented.
[0015] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which is stored a fairness-aware multi-objective learning model training program. When the fairness-aware multi-objective learning model training program is executed by a processor, the steps of the fairness-aware multi-objective learning model training method described above are implemented.
[0016] Beneficial effect: The present invention first calculates the index value of each preset evaluation index of the pre-trained machine learning model (that is, the machine learning model after being pre-trained), and then calculates the correlation of each preset evaluation index based on the index value of each preset evaluation index, and based on the correlation, selects the target evaluation index from each preset evaluation index, and finally performs the next round of training on the machine learning model based on the target evaluation index. From the above analysis, it can be seen that the present invention calculates the correlation between each evaluation index after each round of training, and tries to select evaluation indicators with small correlation, no correlation or even negative correlation based on the correlation, so that these evaluation indicators can more truly evaluate the model after each round of training, so as to better perform the next round of model training according to the evaluation results, that is, the present invention adjusts the evaluation indicators during the model training process, which can make the evaluation indicators better suitable for model training. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is the overall flow chart of the present invention; Figure 2 A structural diagram of a fairness-aware multi-objective learning model training device provided by the present invention; Figure 3 This is a block diagram of the internal structure principle of the terminal device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The following is a clear and complete description of the technical solution of the present invention in combination with the embodiments and the accompanying drawings. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0019] Research has found that each iterative training of a machine learning model requires calculating the indicator value of the model's evaluation indicator in order to perform the next round of iterative training based on the indicator value. For example, the evaluation indicators include indicators for evaluating the fairness of machine learning models and indicators for evaluating the accuracy of machine learning models. Prior art defines evaluation indicators through prior knowledge or a large amount of computational cost before training machine learning models. Since the evaluation indicators are defined before training machine learning models, the pre-defined evaluation indicators may not match the data set used during training, nor may they be applicable to each round of training. Therefore, the pre-defined evaluation indicators are not applicable to the training of machine learning models.
[0020] In order to solve the above technical problems, the present invention provides a fairness-aware multi-objective learning model training method, device, and equipment, which solves the problem that the pre-defined evaluation indicators in the prior art are not suitable for machine learning model training. In specific implementation, first obtain each pre-trained machine learning model, and determine the index value of each preset evaluation indicator of each pre-trained machine learning model; then, based on the index value of each preset evaluation indicator, determine the correlation information between each preset evaluation indicator, and based on the correlation information, select the target evaluation indicator from each preset evaluation indicator; finally, determine the trained machine learning model based on the target evaluation indicator.
[0021] For example, first randomly initialize the machine learning model to obtain 6 initialized machine learning models. The 6 initialized machine learning models have the same model structure, but different model parameters. Then train the 6 initialized machine learning models on the training data set to obtain 6 pre-trained machine learning models. The 6 pre-trained machine learning models also have the same model structure, but different model parameters. Then verify the 6 pre-trained machine learning models on the validation data set, that is, calculate the index values of the preset evaluation indicators of the 6 pre-trained machine learning models. If the preset evaluation indicators include , , , , . Calculate the index value of each preset evaluation index of each pre-trained machine learning model on the validation data set to obtain the index value of each index , For the Pre-trained machine learning models Preset evaluation indicators There are 30 indicator values in total. Based on these 30 indicator values, calculate , , , , The correlation between them is used to screen out the target evaluation indicators with no correlation or negative correlation. , , These three target evaluation indicators will be used in the next round of model training. , , These three target evaluation indicators evaluate the model to adjust the model parameters according to the evaluation results. Repeat the above training, and update the target evaluation indicators according to the correlation of the indicators each time until the number of iterations or training time is reached, and terminate the training to obtain a trained machine learning model.
[0022] The fairness-aware multi-objective learning model training method of this embodiment can be applied to a terminal device. Figure 1 As shown in , the fairness-aware multi-objective learning model training method specifically includes the following steps: S100, obtaining each pre-trained machine learning model, and determining the indicator value of each preset evaluation indicator of each of the pre-trained machine learning models.
[0023] S200, determining correlation information between the preset evaluation indicators according to the indicator values of the preset evaluation indicators, and selecting a target evaluation indicator from the preset evaluation indicators according to the correlation information.
[0024] S300: Determine a trained machine learning model based on the target evaluation indicator.
[0025] The model training method based on steps S100, S200, and S300 can be used to train a resume screening model. The specific process is as follows: The machine learning model is used to screen resumes. The index values of each fairness evaluation index and each accuracy evaluation index of each pre-trained machine learning model are calculated on the validation data set. Then, based on the values of each index, the correlation between each fairness evaluation index and each accuracy evaluation index is determined, and the target evaluation index with no correlation or negative correlation is screened out. The target evaluation index includes the fairness evaluation index, or the target evaluation index includes the accuracy evaluation index, or the target evaluation index includes the fairness evaluation index and the accuracy evaluation index. Finally, the model is trained on the basis of the pre-trained machine learning model according to the screened evaluation index until the training is completed to obtain the trained machine learning model. The validation data set includes the resume information of the sample resume and the label of the sample resume. The label is used to characterize whether the sample resume meets the requirements. The fairness evaluation indicators include the screening accuracy for male resumes and the screening accuracy for female resumes, and the accuracy evaluation indicators include the screening accuracy for all resumes.
[0026] The model training method based on steps S100, S200, and S300 can also be used to train a student score prediction model, that is, a machine learning model is used to predict student scores. The verification data set is an LSAT data set. The fairness evaluation indicators include the score prediction accuracy for male students and the score prediction accuracy for female students. The accuracy evaluation indicators include the score prediction accuracy for all students.
[0027] Embodiment 1. In this embodiment, the detailed steps of step S100 include: training the pre-trained machine learning model on a verification data set, obtaining the index value of the fairness evaluation index and the index value of the accuracy evaluation index of the pre-trained machine learning model, and using the index value of the fairness evaluation index and the index value of the accuracy evaluation index as the index values of each preset evaluation index.
[0028] When the validation data set includes data sets of several individuals, the fairness evaluation index includes the accuracy index of predicting each individual, and the accuracy evaluation index includes the accuracy index of predicting all individuals. The index value of the individual fairness evaluation index : ; In the formula, For the The dataset where individuals predict correctly, For the The number of individual datasets.
[0029] For the The dataset where individuals predict correctly, For the The number of individual data sets, m is the total number of individuals. The smaller it is, the better the fairness of the model is, that is, the better the performance of the model is.
[0030] The indicator value y of the accuracy evaluation indicator: ; Predict the correct dataset for all individuals, is the total number of data sets. The larger y is, the better the performance of the model is.
[0031] Embodiment 2, based on embodiment 1, step S200 in this embodiment includes the following specific steps: according to the indicator value of each of the preset evaluation indicators, determining the correlation information between each of the preset evaluation indicators, and according to the correlation information, screening out target evaluation indicators with no correlation or negative correlation from each of the preset evaluation indicators.
[0032] That is, after the pre-training round, the validation set is used to evaluate the indicator values of each preset evaluation indicator of each pre-trained machine learning model. According to the indicator values, the correlation between the preset evaluation indicators is calculated, and the target evaluation indicators with no correlation or negative correlation are screened out. After each round of training, the indicators must be screened.
[0033] When the number of iterative training is T, if the preset evaluation indicators include Fa fairness evaluation indicators and 1 accuracy evaluation indicator, and if the number of models is n, then the indicator values generated by the current iteration can form T n*(Fa+1) matrices, and each value in the matrix represents the performance of each corresponding model in terms of fairness indicators and accuracy indicators. Based on these matrices, a (Fa+1)*(Fa+1) relationship matrix can be obtained, and the values in the matrix represent the correlation between the indicators.
[0034] Embodiment 3, based on embodiment 1 or embodiment 2, in this embodiment, step S300 includes the following specific steps S301 to S308: S301, selecting a plurality of parent models from each of the pre-trained machine learning models according to the index value of the target evaluation index of each of the pre-trained machine learning models on the verification data set.
[0035] Each pre-trained machine learning model includes models , these n models have the same structure but different model parameters. The multi-objective evolutionary algorithm A is used to select operators , select from n machine learning models The target evaluation index includes the fairness evaluation index and the accuracy evaluation index, and the model with the largest accuracy evaluation index and the smallest fairness evaluation index is selected. model as the parent model, that is, this The fairness evaluation index value of the model is less than the remaining n- The index value of the model, and this The accuracy evaluation index of the model is greater than the remaining n- The index value of the model.
[0036] S302, combining parameters of several parent models to obtain a child model.
[0037] Will The parent model is crossover operator The purpose of crossover is to randomly select The parameters of the two models are taken from the parent model, new parameters are generated based on the parameters of the two models, and the new parameters are used as the model The parameters of one of the models in The parameters of two models are taken from the parent model to update the parameters of other models until the child model is obtained. .
[0038] For example, the parent model includes model 1, model 2, model 3, and model 4. Include Model , , , , , according to the parameters of model one and model two, generate new parameter one, and assign the new parameter one to model We get the offspring model ; Generate new parameter 2 based on the parameters of model 1 and model 3, and assign the new parameter to model We get the offspring model ; Based on the parameters of model one and model four, generate new parameter three and assign the new parameter three to the model We get the offspring model ; Generate new parameter 4 based on the parameters of model 2 and model 4, and assign new parameter 4 to model We get the offspring model ; Based on the parameters of model three and model four, generate new parameter five and assign the new parameter five to the model We get the offspring model .
[0039] S303, adding noise to the parameters of the offspring model to obtain the updated offspring model.
[0040] Adding noise to the parameters of the offspring model is to enhance the exploration ability of the model.
[0041] S304, training the updated offspring model on the training data set , and get the initial training model.
[0042] The initial training model is the offspring model after training .
[0043] S305: Calculate the first indicator value of each target evaluation indicator of each of the initial training models on the validation data set.
[0044] The offspring model after training Calculate the first indicator value of each target evaluation indicator on the validation set.
[0045] S306, calculating the second indicator value of each of the target evaluation indicators of each of the pre-trained machine learning models on the verification data set.
[0046] Pre-trained machine learning models Calculate the second indicator value of each target evaluation indicator on the validation set.
[0047] S307: Filter out a preliminary model from each of the initial training models and each of the pre-trained machine learning models according to the first indicator value and the second indicator value.
[0048] That is, the multi-objective evolutionary algorithm is based on the new model and old models The prediction accuracy and fairness index evaluation value of And population diversity evaluation selects n to replace the old model and become the new , new That is the primary model.
[0049] S308, iteratively update the target evaluation indicator, and train the preliminary model according to the target evaluation indicator after iterative update until the number of iterations or iteration time is reached to obtain a trained machine learning model.
[0050] In summary, the present invention first calculates the index value of each preset evaluation index of the pre-trained machine learning model (that is, the machine learning model after being pre-trained), and then calculates the correlation of each preset evaluation index based on the index value of each preset evaluation index, and based on the correlation, selects the target evaluation index from each preset evaluation index, and finally performs the next round of training on the machine learning model based on the target evaluation index. From the above analysis, it can be seen that the present invention calculates the correlation between each evaluation index after each round of training, and tries to select evaluation indicators with small correlation, no correlation or even negative correlation based on the correlation, so that these evaluation indicators can more truly evaluate the model after each round of training, so as to better perform the next round of model training according to the evaluation results, that is, the present invention adjusts the evaluation indicators during the model training process, which can make the evaluation indicators better suitable for model training.
[0051] This embodiment also provides a multi-objective learning model training device based on fairness perception, such as Figure 2 As shown, the device comprises the following components: The index value calculation module 01 is used to obtain each pre-trained machine learning model and determine the index value of each preset evaluation index of each pre-trained machine learning model; The indicator screening module 02 is used to determine the correlation information between the preset evaluation indicators according to the indicator values of the preset evaluation indicators, and screen out the target evaluation indicator from the preset evaluation indicators according to the correlation information; The model training module 03 is used to determine the trained machine learning model based on the target evaluation index.
[0052] Based on the above embodiments, the present invention further provides a terminal device, whose principle block diagram can be shown as follows: Figure 3 As shown. The terminal device includes a processor, a memory, a network interface, and a display screen connected through a system bus. Among them, the processor of the terminal device is used to provide computing and control capabilities. The memory of the terminal device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the terminal device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a multi-objective learning model training method based on fairness perception is implemented. The display screen of the terminal device can be a liquid crystal display screen or an electronic ink display screen.
[0053] Those skilled in the art will understand that Figure 3The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the terminal device to which the scheme of the present invention is applied. The specific terminal device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0054] In one embodiment, a terminal device is provided. The terminal device includes a memory, a processor, and a fairness-aware multi-objective learning model training program stored in the memory and executable on the processor. When the processor executes the fairness-aware multi-objective learning model training program, the following operation instructions are implemented: Obtain each pre-trained machine learning model, and determine the indicator value of each preset evaluation indicator of each of the pre-trained machine learning models; Determining correlation information between the preset evaluation indicators based on the indicator values of the preset evaluation indicators, and selecting a target evaluation indicator from the preset evaluation indicators based on the correlation information; According to the target evaluation indicator, a trained machine learning model is determined.
[0055] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0056] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A fairness-aware multi-objective learning model training method, characterized in that: include: Obtain each pre-trained machine learning model, and determine the indicator value of each preset evaluation indicator of each of the pre-trained machine learning models; Determining correlation information between the preset evaluation indicators based on the indicator values of the preset evaluation indicators, and selecting a target evaluation indicator from the preset evaluation indicators based on the correlation information; According to the target evaluation indicator, a trained machine learning model is determined.
2. The fairness-aware multi-objective learning model training method according to claim 1, characterized in that: Determining the indicator value of each preset evaluation indicator of each pre-trained machine learning model includes: The pre-trained machine learning model is trained on a validation data set to obtain index values of a fairness evaluation index and an accuracy evaluation index of the pre-trained machine learning model, and the index values of the fairness evaluation index and the accuracy evaluation index are used as index values of each preset evaluation index.
3. The fairness-aware multi-objective learning model training method according to claim 1, characterized in that: The step of selecting a target evaluation indicator from each of the preset evaluation indicators based on the correlation information includes: According to the correlation information, target evaluation indicators with no correlation or negative correlation are screened out from the preset evaluation indicators.
4. The fairness-aware multi-objective learning model training method according to any one of claims 1 to 3, characterized in that: Determining the trained machine learning model based on the target evaluation indicator includes: According to the index value of the target evaluation index of each of the pre-trained machine learning models on the validation data set, a plurality of parent models are selected from each of the pre-trained machine learning models; Combine the parameters of several parent models to obtain a child model; Train the offspring model on the training data set to obtain the initial training model; Based on the initial training model, a trained machine learning model is obtained.
5. The fairness-aware multi-objective learning model training method according to claim 4, characterized in that: The step of training the offspring model on the training data set to obtain the initial training model includes: Adding noise to the parameters of the offspring model to obtain the updated offspring model; The updated offspring model is trained on the training data set to obtain an initial training model.
6. The fairness-aware multi-objective learning model training method according to claim 4, characterized in that: The step of obtaining a trained machine learning model based on the initial training model includes: Calculate the first indicator value of each target evaluation indicator of each of the initial training models on the validation data set; Calculating a second indicator value of each of the target evaluation indicators of each of the pre-trained machine learning models on the validation data set; According to the first indicator value and the second indicator value, a preliminary selected model is selected from each of the initial training models and each of the pre-trained machine learning models; Iteratively update the target evaluation index, and train the preliminary model according to the target evaluation index after iterative update until the number of iterations or iteration time is reached to obtain a trained machine learning model.
7. The fairness-aware multi-objective learning model training method according to claim 1, characterized in that: The machine learning model is a model for screening resumes or a model for predicting test scores.
8. A fairness-aware multi-objective learning model training device, characterized in that: The device comprises the following components: An indicator value calculation module, used to obtain each pre-trained machine learning model and determine the indicator value of each preset evaluation indicator of each pre-trained machine learning model; An indicator screening module, used to determine the correlation information between each of the preset evaluation indicators according to the indicator value of each of the preset evaluation indicators, and screen out a target evaluation indicator from each of the preset evaluation indicators according to the correlation information; The model training module is used to determine the trained machine learning model based on the target evaluation indicator.
9. A terminal device, characterized in that: The terminal device includes a memory, a processor, and a fairness-awareness-based multi-objective learning model training program stored in the memory and executable on the processor. When the processor executes the fairness-awareness-based multi-objective learning model training program, the steps of the fairness-awareness-based multi-objective learning model training method as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a fairness-aware multi-objective learning model training program. When the fairness-aware multi-objective learning model training program is executed by the processor, the steps of the fairness-aware multi-objective learning model training method according to any one of claims 1 to 7 are implemented.
