Model training method and apparatus for suspicious training data, device, and medium
Patent Information
- Application Number
- PCT/CN2025/084594
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-03-13
- Filing Date
- 2025-03-25
- Publication Date
- 2026-09-17
Smart Images

Figure CN2025084594_17092026_PF_FP_ABST
Abstract
Description
Model training method and device for suspicious training data, equipment and medium
[0001] The present application is based on a Chinese invention application No. 202510299344.5, entitled "Model training method and device for suspicious training data, equipment and medium" and filed on March 13, 2025, and claims priority thereto. TECHNICAL FIELD
[0002] The present application is applicable to the field of data processing, and particularly relates to a model training method and device for suspicious training data, equipment and medium. BACKGROUND
[0003] In the training process of a machine learning model, the quality of training data plays a crucial role in the performance and reliability of the model. However, training data often faces threats from malicious attacks. In recent years, attacks on training data have attracted increasing attention in the industry. Attackers often embed carefully planned errors or modify data labels in training data to tamper with important data for model training, thereby misleading the learning process of the model, causing the model to learn incorrect patterns during the training phase, and possibly producing misleading results in the subsequent prediction phase. Therefore, how to effectively detect and repair errors in training data to improve the accuracy of the trained model has become a problem to be solved. SUMMARY
[0004] In view of this, the embodiments of the present application provide a model training method and device for suspicious training data, equipment and medium to solve the problem of how to effectively detect and repair errors in training data to improve the accuracy of the trained model.
[0005] In a first aspect, the embodiments of the present application provide a model training method for suspicious training data, comprising:
[0006] Obtaining a relationship data set and a model to be trained, determining attributes in the relationship data set and attribute values of each tuple corresponding to the attributes, and performing data pre-cleaning on attribute values of all tuples corresponding to the attributes to obtain abnormal attribute values and corrected attribute values corresponding to the abnormal attribute values;
[0007] For any tuple, evaluating the training loss of the tuple on the model to obtain a loss evaluation result, and evaluating the support degree of the tuple on the prediction result of the model on tuples other than the tuple to obtain a support degree evaluation result;
[0008] Determining a target attribute from all attributes, and screening all tuples according to the abnormal attribute values, the attribute values of the target attribute, the loss evaluation result and the support degree evaluation result to obtain tuples to be repaired corresponding to the target attribute.
[0009] According to all the modified attribute values, the attribute values of the target attribute in each to-be-repaired tuple are repaired, the step of evaluating the training loss of any tuple on the model is executed until the repair is completed, a target relationship dataset is obtained, the model is trained according to the target relationship dataset, and a target model is obtained.
[0010] In a second aspect, an embodiment of the present application provides a model training device for suspicious training data, which comprises:
[0011] A pre-cleaning module is configured to obtain a relationship dataset and a to-be-trained model, determine attributes in the relationship dataset and attribute values of corresponding attributes of each tuple, and perform data pre-cleaning on attribute values of all corresponding attributes of tuples to obtain abnormal attribute values and modified attribute values corresponding to the abnormal attribute values.
[0012] An evaluation module is configured to evaluate the training loss of any tuple on the model to obtain a loss evaluation result, and evaluate the support degree of the tuple to the prediction result of the model on tuples other than the tuple to obtain a support degree evaluation result.
[0013] An identification module is configured to determine a target attribute from all attributes, and filter all tuples according to the abnormal attribute values, the attribute values of the target attribute, the loss evaluation result and the support degree evaluation result to obtain to-be-repaired tuples corresponding to the target attribute.
[0014] A repair training module is configured to repair the attribute values of the target attribute in each to-be-repaired tuple according to all the modified attribute values, execute the step of evaluating the training loss of any tuple on the model until the repair is completed, obtain a target relationship dataset, train the model according to the target relationship dataset, and obtain a target model.
[0015] In a third aspect, an embodiment of the present application provides a computer device, which comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor implements the model training method for suspicious training data according to the first aspect when executing the computer program.
[0016] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the model training method for suspicious training data according to the first aspect.
[0017] Compared with the prior art, the beneficial effects of the embodiments of the present application are that: the present application obtains abnormal attribute values and corrected attribute values corresponding to the abnormal attribute values by performing data pre-cleaning on the attribute values of all tuple corresponding attributes in the relationship data set, for any tuple, evaluates the training loss of the tuple on the model to be trained to obtain a loss evaluation result, and evaluates the support degree of the tuple on the prediction result of the model on tuples other than the tuple to obtain a support degree evaluation result, determines a target attribute from all attributes, and according to the abnormal attribute values, the attribute values of the target attribute, the loss evaluation result and the support degree evaluation result, all tuples are screened to obtain the to-be-repaired tuples corresponding to the target attribute, and according to all the corrected attribute values, the attribute values of the target attribute in each to-be-repaired tuple are repaired, and the step of evaluating the training loss of any tuple on the model is returned until the repair is completed, a target relationship data set is obtained, and the model is trained according to the target relationship data set to obtain a target model.
[0018] Among them, the error identification and repair in the relationship data set is realized automatically, on the basis of detecting all potential errors by pre-cleaning the attribute values, further for any target attribute, according to the abnormal attribute values obtained by data pre-cleaning, the attribute values of the target attribute, the loss evaluation result and the support degree evaluation result of the tuple, more refined screening is performed to obtain the to-be-repaired tuples corresponding to the target attribute (the tuples whose target attribute corresponding attribute values are poisoned attacks and need to be repaired), so as to repair the to-be-repaired tuples, which not only effectively identifies and repairs the poisoning errors in the relationship data set, but also maintains the data distribution of the relationship data set, while reducing the additional errors introduced by data cleaning, so that when the model is trained based on the repaired target relationship data set, the accuracy of the trained model is improved, and since the model can better learn the real distribution of the data during training, the robustness of the trained model is also improved. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0020] Fig. 1 is a schematic diagram of an application environment of a model training method for suspicious training data provided by an embodiment of the present application;
[0021] Fig. 2 is a flowchart of a model training method for suspicious training data provided by an embodiment of the present application;
[0022] FIG. 3 is a schematic diagram of a relationship data set according to an embodiment of the present application;
[0023] FIG. 4 is a flowchart of a model training method for suspicious training data according to an embodiment of the present application;
[0024] FIG. 5 is a flowchart of a model training method for suspicious training data according to an embodiment of the present application;
[0025] FIG. 6 is a flowchart of a model training method for suspicious training data according to an embodiment of the present application;
[0026] FIG. 7 is a flowchart of a model training method for suspicious training data according to an embodiment of the present application;
[0027] FIG. 8 is a flowchart of a model training method for suspicious training data according to an embodiment of the present application;
[0028] FIG. 9 is a structural diagram of a model training apparatus for suspicious training data according to an embodiment of the present application;
[0029] FIG. 10 is a structural diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] In the following description, for the purposes of explanation and not limitation, specific details are set forth, such as particular sequences of steps, techniques, etc. in order to provide a thorough understanding of the embodiments of the application. However, it will be apparent to those skilled in the art that the application can be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known methods, devices, circuits, and
[0031] It is to be understood that the terminology "includes", "has", "holds", "contains" and / or "comprising", "comprised of", "comprising", "comprises" when used in this specification and in the following claims, specifies the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0032] It is also to be understood that the terminology "and / or" when used in this specification and in the following claims, refers to at least one of the items, lists of items, and / or terms, and that it is not intended to exclude any combination of one or more of the associated listed items and / or terms.
[0033] As used in the specification and the appended claims, the term "if' can be interpreted as meaning "when" or "upon" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrase "if it is determined" or "if [the described condition or event] is detected" can be interpreted to mean "upon determining" or "in response to determining" or "upon detecting [the described condition or event]" or "in response to detecting [the described condition or event]" depending on the context.
[0034] In addition, in the description of the present application and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0035] In the present application, the reference "one embodiment" or "some embodiments" and the like means that the specific features, structures or characteristics described in connection with the embodiment are included in one or more embodiments of the present application. Therefore, the statements "in one embodiment", "in some embodiments", "in other some embodiments", "in further some embodiments" and the like appearing in different places in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "include", "contain", "have" and their variants mean "include but not limited to", unless otherwise specifically emphasized.
[0036] The embodiments of the present application can acquire and process related data based on artificial intelligence technology. Among them, artificial intelligence is to use digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0037] The basic technology of artificial intelligence generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. The software technology of artificial intelligence mainly includes computer vision technology, robot technology, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc.
[0038] It should be understood that the size of the serial number of each step in the following embodiments does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0039] In order to illustrate the technical solutions of the present application, the following will be described by specific embodiments.
[0040] The model training method for suspicious training data provided in the embodiment one of the present application can be applied in the application environment as shown in FIG. 1, wherein the server and the client communicate, the server provides the model training service of suspicious training data, and the client triggers the model training task of suspicious training data to the server. The client includes but is not limited to a palm computer, a desktop computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cloud computer device, a personal digital assistant (PDA) and the like. The computer device corresponding to the server can be realized by an independent server or a server cluster composed of multiple servers.
[0041] Referring to FIG. 2, it is a flowchart of the model training method for suspicious training data provided in the embodiment two of the present application. The model training method for suspicious training data is applied to the server in FIG. 1, and the server connects the client to obtain the relationship data set and the model to be trained sent by the client. As shown in FIG. 2, it can include the following steps:
[0042] In step S201, the relationship data set and the model to be trained are obtained, the attributes in the relationship data set and the attribute values corresponding to each tuple attribute are determined, the data pre-cleaning is performed on all attribute values corresponding to the attributes of the tuples, and the abnormal attribute values and the corrected attribute values corresponding to the attribute values are obtained.
[0043] In the embodiment of the present application, the suspicious training data can be the training data that may be attacked by poisoning, that is, there may be error data or tampered data labels intentionally embedded by attackers in the suspicious training data, so as to mislead the learning process of the model when the model is trained according to the suspicious training data. The embodiment of the present application aims to effectively detect and repair the errors introduced by poisoning attacks in the suspicious training data, so as to improve the accuracy of the trained model.
[0044] The relationship data set can be the suspicious training data, which is a collection of relational data, organizes data in the form of a table, includes tuples of multiple record data information, each tuple is composed of a single or multiple attributes and corresponding attribute values, the attribute can be a variable or field describing the characteristics of the tuple record, and the attribute value can be a specific numerical value of the attribute.
[0045] The model to be trained can refer to a model to be trained based on training data, for example, the model can be a machine learning-based classification model; the abnormal attribute value can refer to an error attribute value detected through data pre-cleaning, the abnormal attribute value obtained through data pre-cleaning includes error attribute values introduced by ordinary noise and poisoning attacks, and the corrected attribute value can refer to an attribute value obtained by repairing the attribute value through data cleaning.
[0046] As shown in FIG. 3, a schematic diagram of a relational data set provided by Embodiment Two of the application is shown, the relational data set includes four tuples, each tuple represents a person granted a loan by a bank, and is classified by a risk label, and the serial numbers are t1, t2, t3 and t4 in turn, each tuple corresponds to seven attributes of age, savings account, housing, credit limit, job, status and purpose and one risk label.
[0047] Specifically, through the data pre-cleaning tool, the attribute values of the attributes corresponding to all tuples in the relational data set can be cleaned to obtain abnormal attribute values and corrected attribute values.
[0048] In step S202, for any tuple, the training loss of the tuple on the model is evaluated to obtain a loss evaluation result, and the support degree of the tuple to the prediction result of the model on tuples other than the tuple is evaluated to obtain a support degree evaluation result.
[0049] In the embodiments of the application, the loss evaluation result can refer to the result of evaluating the training loss of the tuple on the model, the prediction result can refer to the predicted value of the tuple by the model, and the support degree evaluation result can refer to the evaluation result of the support degree of the tuple to the prediction result of the model on tuples other than the tuple.
[0050] Specifically, for any tuple, the loss value of the tuple when training the model is evaluated, the loss values of all tuples when training the model are obtained to obtain the loss evaluation result, and the support degree of the tuple to the prediction result of the model on other tuples is evaluated, and the support degree of all tuples to the prediction result of the model on other tuples is obtained to obtain the support degree evaluation result.
[0051] In step S203, a target attribute is determined from all attributes, all tuples are filtered according to the abnormal attribute value, the attribute value of the target attribute, the loss evaluation result and the support degree evaluation result, and the tuples to be repaired corresponding to the target attribute are obtained.
[0052] In the embodiments of the application, the target attribute can refer to any attribute in the relational data set, and the tuple to be repaired can refer to a tuple whose attribute value of the target attribute is attacked by poisoning and needs to be repaired.
[0053] Specifically, the attribute values that have been poisoned typically have the following characteristics: 1) Anomalousness, meaning that tuples containing poisoned attribute values have high training loss in the early stages of model training (i.e., the first few training cycles); 2) Influence, meaning that tuples containing poisoned attribute values have a significant impact on the model's prediction results on other tuples. Therefore, in the process of selecting the tuples to be repaired (poisoned tuples) corresponding to the target attribute, we can determine the tuples with high training loss based on the loss assessment results, determine the tuples that have a significant impact on the model's prediction results on other tuples based on the support assessment results, and determine the attribute values that are anomalous from all the attribute values corresponding to the target attribute based on the anomalous attribute values obtained from the data pre-cleaning and screening, and further determine the tuples in which they belong. Based on the determined tuples with high training loss and tuples with significant influence, we can select the tuples corresponding to the target attribute that are anomalous from the tuples in which the target attribute corresponds to the anomalous attribute values.
[0054] Step S204: Based on all the corrected attribute values, repair the attribute values of the target attribute in each tuple to be repaired, return to the step of evaluating the training loss of the tuple on the model for any tuple, until the repair is completed, obtain the target relation dataset, train the model based on the target relation dataset, and obtain the target model.
[0055] In this embodiment of the application, the target relation dataset may refer to the dataset after error detection and repair of the relation dataset, and the target model may refer to the model trained based on the target relation dataset.
[0056] Specifically, for any tuple to be repaired, the attribute value of the target attribute in the tuple to be repaired is determined, and the attribute value is repaired to the corrected attribute value. After the attribute values of the target attributes in all tuples to be repaired are repaired, the process returns to step S202 above, which evaluates the training loss of the tuple on the model for any tuple. The target attributes in the relation dataset are traversed sequentially, and the tuples to be repaired for the corresponding target attributes are selected and the attribute values in the tuples to be repaired are repaired until the repair is completed. For example, the traversal of all attributes in the relation dataset is completed, or the traversal ends due to resource limitations, etc., to obtain the target relation dataset. The model is trained using the target relation dataset as the training set to obtain the target model.
[0057] Optionally, the attribute values targeted by poisoning attacks also possess the characteristic of being imperceptible; that is, the attribute values targeted by poisoning attacks typically appear in attributes of tuples that are not easily detected, thus avoiding detection. Therefore, based on the three characteristics of the attribute values targeted by poisoning attacks—abnormality, influence, and imperceptibility—the overall process of this model training method for suspicious training data can be as follows:
[0058] 1) data pre-cleaning is performed on attribute values of all attributes corresponding to all tuple pairs in the relational dataset to obtain abnormal attribute values and corrected attribute values corresponding to the attribute values;
[0059] 2) for any tuple, a training loss value of the tuple on the model is calculated, and high-loss tuples are screened according to the training loss value to form a high-loss tuple set, denoted as AT; an attribute list sorted according to perceptibility of all attributes in the relational dataset is obtained, and an attribute is selected as a target attribute from the attribute list starting from the least perceptible attribute, for any attribute value of the target attribute, if the attribute value is an abnormal attribute value, a tuple in which the attribute value is located is determined as an abnormal tuple corresponding to the target attribute, and all abnormal tuples form an abnormal tuple set corresponding to the target attribute, denoted as D cot ; an intersection operation is performed on the high-loss tuple set and the abnormal tuple set, denoted as AT∩D cot ;
[0060] 3) for any tuple, a meta-model corresponding to the tuple is trained, and high-support tuples corresponding to the tuple are screened according to a parameter vector of the meta-model to form a high-support tuple set, denoted as IT, and an intersection operation is performed on a result of the intersection operation of the high-support tuple set and the high-loss tuple set and the abnormal tuple set to obtain a to-be-repaired tuple corresponding to the target attribute, denoted as AT∩D cot ∩IT;
[0061] 4) for any to-be-repaired tuple, a corrected attribute value of a target attribute corresponding to an attribute value in the to-be-repaired tuple is determined, the attribute value in the to-be-repaired tuple corresponding to the target attribute is modified to the corrected attribute value, and the content in 2), 3) and 4) above is executed until all attributes in the attribute list are traversed or the traversal is ended due to resource limitation, a target relational dataset is obtained, and the model is trained according to the target relational dataset to obtain a target model.
[0062] This application embodiment automatically identifies and repairs errors in relational datasets. Based on data pre-cleaning to detect all potential errors in attribute values, it further refines the selection of tuples to be repaired (tuples whose attribute values have been poisoned and require data repair) for any target attribute, according to the abnormal attribute values obtained from data pre-cleaning, the attribute value of the target attribute, the loss assessment results of the tuples, and the support assessment results. This allows for targeted repair of the tuples, effectively identifying and repairing poisoning errors in the relational dataset while maintaining the data distribution of the relational dataset. It also reduces additional errors introduced by data cleaning. Therefore, when training a model based on the repaired target relational dataset, it improves the accuracy of the trained model and enhances its robustness because the model can better learn the true distribution of the data during training.
[0063] Referring to Figure 4, which is a flowchart illustrating a model training method for suspicious training data provided in Embodiment 3 of this application, as shown in Figure 4, the step S201 above, which involves pre-cleaning the attribute values of all tuples to obtain abnormal attribute values and corresponding corrected attribute values, may include the following steps:
[0064] Step S401: For any tuple and attribute, input the tuple and attribute into a preset data pre-cleaning function, and output the corrected attribute value corresponding to the attribute value of the tuple.
[0065] Step S402: If the attribute value of the corresponding attribute of the tuple is different from the corrected attribute value of the corresponding attribute of the tuple, then the attribute value of the corresponding attribute of the tuple is determined to be an abnormal attribute value.
[0066] In this embodiment of the application, the preset data pre-cleaning function may refer to a function that pre-sets the data pre-cleaning tool.
[0067] Specifically, let the preset data pre-cleaning function be C(t,A), any tuple be t, and the relational dataset be D. train , t∈D train For any attribute A, the attribute value of tuple t corresponding to attribute A is t[A], and the modified attribute value is v;
[0068] The principle formula for this data pre-cleaning can be: Among them, S cov For abnormal attribute values, that is, for any t∈D train And A, let t∈D trainGiven A and input C(t,A), output the corrected attribute value v of t[A]. If t[A] is different from the corrected attribute value v of t[A], then t[A] is determined to be an abnormal attribute value. Traverse all tuples and attributes in the relation dataset to obtain all abnormal attributes and their corresponding corrected attribute values.
[0069] In this embodiment, by performing data pre-cleaning on the attribute values of all tuples according to the data pre-cleaning function, abnormal attribute values and corresponding corrected attribute values are obtained. This achieves full noise detection of the relation dataset, that is, it identifies all potential erroneous attribute values in the relation dataset, including erroneous attribute values introduced by ordinary noise and poisoning attacks. This provides an accurate data foundation for subsequent screening of tuples to be repaired, improves the accuracy of the screening process, and thus improves the accuracy of the target relation dataset obtained after repair and the target model trained based on the target relation dataset.
[0070] Referring to Figure 5, which is a flowchart illustrating a model training method for questionable training data provided in Embodiment 4 of this application, as shown in Figure 5, step S202 above, which evaluates the training loss of any tuple on the model to obtain the loss evaluation result, may include the following steps:
[0071] Step S501: For any tuple, calculate the training loss value of the tuple on the model.
[0072] Step S502: Based on the training loss value, all tuples are filtered to obtain high-loss tuples. All high-loss tuples are combined into a high-loss tuple set, and the high-loss tuple set is used as the loss evaluation result.
[0073] In this embodiment of the application, the training loss value can refer to a numerical value used to quantify the difference between the model's predicted result and the actual result on the tuple, the high loss tuple can refer to the tuple obtained by filtering according to the training loss value, and the high loss tuple set can refer to the set of all high loss tuples.
[0074] Specifically, during a pre-set number of forward and backward propagation processes in the simulated training of the model based on the relational dataset, for any given tuple, the average loss of that tuple is monitored and calculated. This average loss is taken as the training loss value of that tuple on the model. Based on the training loss value, all tuples are sorted in descending order. The tuples with the highest training loss values (e.g., 50%) are designated as high-loss tuples. All high-loss tuples are combined into a high-loss tuple set, and this high-loss tuple set is used as the loss evaluation result.
[0075] In this embodiment, by calculating the training loss value of each tuple on the model, a set of high-loss tuples that meet the abnormal characteristics of the poisoning attack (i.e., tuples containing the attribute values of the poisoning attack have high training loss in the early stage of model training) is selected based on the training loss value. This provides an accurate data foundation for the subsequent selection of tuples to be repaired, improves the accuracy of the selection process, and thus improves the accuracy of the target relation dataset obtained after repair and the target model trained based on the target relation dataset.
[0076] Referring to Figure 6, which is a flowchart illustrating a model training method for questionable training data provided in Embodiment 5 of this application, as shown in Figure 6, the step S202 above, which evaluates the support of tuples for the model's prediction results on tuples other than the tuples themselves, to obtain the support evaluation result, may include the following steps:
[0077] Step S601: Based on the relation dataset and the model, train the meta-model corresponding to the tuple.
[0078] Step S602: Obtain the parameter vector of the meta-model.
[0079] Step S603: Based on the parameter vector, filter all tuples to obtain the high support tuples corresponding to the tuples, form a high support tuple set for all the high support tuples corresponding to the tuples, and use the high support tuple set as the support evaluation result.
[0080] In this embodiment of the application, the meta-model can refer to the model corresponding to the tuples obtained by training the relational dataset and the model. For any tuple, each element in the parameter vector of the meta-model corresponding to the tuple is used to represent the support of any tuple (including the tuple) for the model's prediction result on the tuple. The high support tuple can refer to the tuples obtained by filtering according to the parameter vector. The set of high support tuples can refer to the set of all high support tuples.
[0081] Specifically, for any tuple t, based on the relation dataset and the model, the meta-model M corresponding to that tuple t is trained. t Let the meta-model M be denoted as M. t The parameter vector is θ t , where θ t Contains |D train | Value θ t [i], each θ t The value of [i] is between [-1, 1], representing the prediction result M of the model on tuple t for the pair of tuples with id i in the relation dataset. t The support of θ t The closer the value of [i] is to 1, the stronger the positive support; the closer it is to -1, the stronger the negative support. For this tuple t, from the meta-model M corresponding to this tuple t...t The parameter vector θ t In the dataset, the tuples corresponding to the highest (e.g., the top 40%) and lowest (e.g., the bottom 10%) values are selected as high-support tuples. This yields all high-support tuples that have the greatest positive and negative impact on the prediction of tuple t. The high-support tuples of all tuples in the relation dataset are then combined to form a high-support tuple set, which is then used as the support evaluation result.
[0082] In this embodiment, a meta-model corresponding to a tuple is trained based on the relation dataset and the model. Based on the parameter vector of the meta-model, a set of high-support tuples that meet the influence characteristics of the poisoning attack (i.e., tuples containing attribute values of the poisoning attack have a significant impact on the model's prediction results on other tuples) is selected. This provides an accurate data foundation for the subsequent selection of tuples to be repaired, improves the accuracy of the selection process, and thus improves the accuracy of the target relation dataset obtained after repair and the target model trained based on the target relation dataset.
[0083] Referring to Figure 7, which is a flowchart illustrating a model training method for questionable training data provided in Embodiment Six of this application, as shown in Figure 7, step S601 above, which trains the meta-model corresponding to the tuple based on the relation dataset and the model, may include the following steps:
[0084] Step S701: Randomly sample the relation dataset according to the preset sampling ratio to obtain a subset of relation data.
[0085] Step S702: For any subset of relational data, generate a binary vector of the relational data subset.
[0086] Step S703: Train the sub-model corresponding to the subset of relational data based on the subset of relational data.
[0087] Step S704: For any tuple, use each sub-model to predict the tuple and obtain the prediction result of the corresponding sub-model for the tuple.
[0088] Step S705: Associate the binary vector of the relational data subset with the prediction result of the corresponding sub-model of the relational data subset for the tuple to form a sample. Based on all samples, train the meta-model corresponding to the tuple.
[0089] In this embodiment, a relational data subset can refer to a set of tuples obtained by sampling a relational dataset according to a preset sampling ratio. The preset sampling ratio can refer to a pre-set ratio for sampling the relational dataset each time. For example, if the preset sampling ratio is 0.8, then the number of tuples in the relational data subset obtained after each sampling of the relational dataset is 80% of the number of tuples in the relational dataset. For any relational data subset, each element in the binary vector of the relational data subset is used to indicate whether each tuple in the relational dataset has been sampled into the relational data subset. For example, if there are 100 tuples in the relational dataset, then the binary vector is a 100-dimensional vector, where the j-th bit is 1 to indicate that the j-th tuple in the relational dataset has been sampled into the relational data subset, and the j-th bit is 0 to indicate that the j-th tuple in the relational dataset has not been sampled into the relational data subset. A sub-model can refer to a model corresponding to the relational data subset trained based on the relational data subset, and the sub-model has the same model architecture as the model to be trained.
[0090] Specifically, based on a preset sampling ratio, multiple subsets of relational data are randomly sampled from the relational dataset, denoted as s1, s2, ..., s... n n is a positive integer. Each subset of relational data contains tuples with a preset sampling ratio of the relational dataset. For any subset of relational data, a binary vector of that subset is generated, and a sub-model corresponding to that subset is trained based on that subset, denoted as M1, M2, ..., Mn. n For any tuple t, each sub-model is used to predict the tuple, and the prediction results of the corresponding sub-model for the tuple are denoted as M1(t), M2(t), ..., M... n (t) associates the binary vector of the relational data subset with the prediction result of the corresponding sub-model of the relational data subset for the tuple to form a sample. Based on the samples formed by the binary vectors of all relational data subsets and the prediction results of the corresponding sub-models of all relational data subsets for the tuple, the meta-model corresponding to the tuple is trained.
[0091] For example, if a relational dataset contains three tuples, t1, t2, and t3, and random sampling yields two relational data subsets, s1 = {t1, t2} and s2 = {t2, t3}, then the binary vector of s1 is 1_s1 = [1, 1, 0], and the binary vector of s2 is 2_s2 = [0, 1, 1]. For each of the two relational data subsets, two sub-models M1 and M2 are trained respectively. For tuple t1, the prediction result of sub-model M1 for tuple t1 is M1(t1) = 0.9, and the prediction result of sub-model M2 for tuple t1 is M2(t1) = 0.3. Then, 1_s1 = [1, 1, 0] is associated with M1(t1) = 0.9 to form a sample, and 2_s2 = [0, 1, 1] is associated with M2(t1) = 0.3 to form another sample. Based on the two samples formed, the meta-model corresponding to tuple t1 is trained.
[0092] In this embodiment, a subset of relational data is obtained by sampling the relational dataset. For any subset of relational data, a binary vector of the subset and a sub-model of the subset are generated and trained. For any tuple, each sub-model is used to predict the tuple, and the prediction result of the corresponding sub-model for the tuple is obtained. The binary vector of the subset of relational data and the prediction result of the corresponding sub-model for the tuple are associated to form a sample. Based on all samples, a meta-model corresponding to the tuple is trained. Each element in the parameter vector of the meta-model represents the support of any tuple for the model's prediction result on that tuple. This provides an accurate data foundation for selecting a set of tuples with high support, improves the accuracy of the selection process, and thus improves the accuracy of the target relational dataset obtained after repair and the target model trained based on the target relational dataset.
[0093] Referring to Figure 8, which is a flowchart illustrating a model training method for suspicious training data provided in Embodiment 7 of this application, as shown in Figure 8, step S203 above, which filters all tuples based on abnormal attribute values, target attribute values, loss assessment results, and support assessment results to obtain the tuples to be repaired corresponding to the target attribute, may include the following steps:
[0094] Step S801: For any attribute value of the target attribute, if the attribute value is an abnormal attribute value, then determine that the tuple containing the attribute value is the abnormal tuple corresponding to the target attribute, and form a set of abnormal tuples corresponding to the target attribute by combining all abnormal tuples.
[0095] Step S802: Based on the abnormal tuple set, loss assessment results, and support assessment results, the tuples are filtered to obtain the tuples to be repaired corresponding to the target attribute.
[0096] In this embodiment of the application, an abnormal tuple can refer to a tuple whose corresponding attribute value is an abnormal attribute value, and the set of abnormal tuples can refer to the set of all abnormal tuples.
[0097] Specifically, for any attribute value of the target attribute, if the attribute value is an abnormal attribute value, then the tuple containing the attribute value is determined to be an abnormal tuple corresponding to the target attribute. All abnormal tuples corresponding to the target attribute are formed into a set of abnormal tuples corresponding to the target attribute. The set of high-loss tuples calculated in steps S501 to S502 and the set of high-support tuples obtained in steps S601 to S603 are obtained. The intersection of the set of abnormal tuples, the set of high-loss tuples and the set of high-support tuples is calculated to obtain the tuple to be repaired corresponding to the target attribute.
[0098] In this embodiment, for any target attribute, the intersection of the set of anomalous tuples, the set of high-loss tuples, and the set of high-support tuples corresponding to the target attribute is calculated. Based on the set of anomalous tuples corresponding to the target attribute that contain all potential errors, the tuples corresponding to the target attribute that simultaneously meet the anomalous characteristics and influence characteristics of a poisoning attack are more finely screened to obtain the tuples to be repaired corresponding to the target attribute. This effectively screens and identifies poisoning errors in the relation dataset, improves the accuracy of the screening process, and thus improves the accuracy of the repaired target relation dataset and the target model trained based on the target relation dataset.
[0099] Corresponding to the model training method for suspicious training data in the above embodiments, Figure 9 shows a structural block diagram of the model training device for suspicious training data provided in Embodiment 8 of this application. The above-mentioned model training device for suspicious training data is applied to the server in Figure 1. The server connects to the client to obtain the relational dataset and the model to be trained sent by the client. For ease of explanation, only the parts related to the embodiments of this application are shown.
[0100] Referring to Figure 9, the model training device for questionable training data includes:
[0101] The pre-cleaning module 91 is used to acquire the relation dataset and the model to be trained, determine the attributes in the relation dataset and the attribute values of each tuple, perform data pre-cleaning on the attribute values of all tuples, and obtain abnormal attribute values and corrected attribute values of the corresponding attribute values.
[0102] Evaluation module 92 is used to evaluate the training loss of any tuple on the model to obtain a loss evaluation result, and to evaluate the support of the tuple for the prediction results of the model on tuples other than the tuple to obtain a support evaluation result.
[0103] The identification module 93 is used to determine a target attribute from all attributes, and to filter all tuples according to the abnormal attribute value, the attribute value of the target attribute, the loss assessment result and the support assessment result to obtain the tuple to be repaired corresponding to the target attribute.
[0104] The repair training module 94 is used to repair the attribute value of the target attribute in each tuple to be repaired according to all the corrected attribute values, return to the step of evaluating the training loss of the tuple on the model for any tuple, until the repair is completed, obtain the target relation dataset, and train the model according to the target relation dataset to obtain the target model.
[0105] Optionally, the cleaning module 91 includes:
[0106] The correction unit is used to input the tuple and the attribute into a preset data pre-cleaning function for any tuple and attribute, and output the corrected attribute value corresponding to the attribute value of the tuple;
[0107] An outlier determination unit is used to determine that the attribute value of the tuple corresponding to the attribute is the outlier attribute value if the attribute value of the tuple corresponding to the attribute is different from the corrected attribute value of the attribute value of the tuple corresponding to the attribute.
[0108] Optionally, evaluation module 92 includes:
[0109] The loss calculation unit is used to calculate the training loss value of any tuple on the model.
[0110] The loss filtering unit is used to filter all tuples according to the training loss value, obtain high loss tuples, form a high loss tuple set from all high loss tuples, and use the high loss tuple set as the loss evaluation result.
[0111] Optionally, evaluation module 92 includes:
[0112] The first training unit is used to train the meta-model corresponding to the tuple based on the relation dataset and the model.
[0113] A vector acquisition unit is used to acquire the parameter vector of the meta-model, wherein each element in the parameter vector represents the support of any tuple for the model's prediction result on that tuple;
[0114] The vector filtering unit is used to filter all tuples according to the parameter vector, obtain the high support tuples corresponding to the tuples, form a high support tuple set for all the high support tuples corresponding to the tuples, and use the high support tuple set as the support evaluation result.
[0115] Optionally, the first training unit includes:
[0116] The sampling subunit is used to randomly sample the relation dataset according to a preset sampling ratio to obtain a subset of relation data;
[0117] A vector generation subunit is used to generate a binary vector of any subset of relational data, wherein each element in the binary vector is used to indicate whether each tuple in the relational dataset is sampled into the subset of relational data.
[0118] The second training subunit is used to train a sub-model corresponding to the relational data subset based on the relational data subset, wherein the sub-model has the same architecture as the model.
[0119] The prediction subunit is used to predict the tuple using each sub-model for any tuple, and obtain the prediction result of the corresponding sub-model for the tuple.
[0120] A sample forming subunit is used to associate the binary vector of the relational data subset with the prediction result of the corresponding submodel of the relational data subset on the tuple to form a sample. Based on all samples, the metamodel corresponding to the tuple is trained.
[0121] Optionally, the recognition module 93 includes:
[0122] An abnormal tuple determination unit is used to determine, for any attribute value of the target attribute, if the attribute value is the abnormal attribute value, the tuple containing the attribute value is the abnormal tuple corresponding to the target attribute, and all abnormal tuples are used to form a set of abnormal tuples corresponding to the target attribute.
[0123] The tuple filtering unit is used to filter the tuples according to the abnormal tuple set, the loss assessment result and the support assessment result to obtain the tuples to be repaired corresponding to the target attribute.
[0124] Optionally, the tuple filtering unit includes:
[0125] The union calculation unit is used to calculate the union of the abnormal tuple set, the high loss tuple set, and the high support tuple set to obtain the tuple to be repaired corresponding to the target attribute.
[0126] In one embodiment, a computer device, which may be a server, is provided, and its internal structure diagram is shown in Figure 10. The computer device includes a processor, memory, a network interface, and a database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, a readable storage medium, and the database. The internal memory provides an environment for the operation of the operating system and the readable storage medium. The database stores relational datasets and models to be trained. The network interface communicates with external terminals via a network connection. When executed by the processor, the readable storage medium implements a model training method for questionable training data.
[0127] In one embodiment, a computer device is provided, including a memory, a processor, and a readable storage medium stored on the memory and operable on the processor. When the processor executes the readable storage medium, it implements the steps of the model training method for suspicious training data in the above embodiments, such as steps S201-S204 shown in FIG2, or the steps shown in FIG3 to 8. To avoid repetition, these steps will not be described again here. Alternatively, when the processor executes the readable storage medium, it can implement the functions of each module / unit in this embodiment of the model training apparatus for suspicious training data, such as the functions of the pre-cleaning module 91, evaluation module 92, identification module 93, and repair training module 94 shown in FIG9. To avoid repetition, these functions will not be described again here.
[0128] In one embodiment, one or more readable storage media storing computer-readable instructions are provided. When executed by one or more processors, these computer-readable instructions cause the processors to perform the steps of the model training method for suspicious training data described in the above embodiments, such as steps S201-S204 shown in FIG2, or the steps shown in FIG3 to 8. To avoid repetition, these steps will not be described further here. Alternatively, the functions of each module / unit in this embodiment of the model training apparatus for suspicious training data when the processor executes the readable storage medium may be described, such as the functions of the pre-cleaning module 91, evaluation module 92, identification module 93, and repair training module 94 shown in FIG9. To avoid repetition, these functions will not be described further here.
[0129] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by instructing related hardware through a readable storage medium. The readable storage medium can be stored in a non-volatile computer-readable storage medium, which, when executed, can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application 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. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0130] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0131] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A model training method for suspicious training data, wherein, include: Obtain the relation dataset and the model to be trained, determine the attributes in the relation dataset and the attribute values of each tuple, perform data pre-cleaning on the attribute values of all tuples, and obtain abnormal attribute values and corrected attribute values of the corresponding attribute values. For any tuple, evaluate the training loss of the tuple on the model to obtain a loss evaluation result, and evaluate the support of the tuple for the model's prediction results on tuples other than the tuple to obtain a support evaluation result. A target attribute is determined from all attributes. Based on the abnormal attribute value, the attribute value of the target attribute, the loss assessment result, and the support assessment result, all tuples are filtered to obtain the tuples to be repaired corresponding to the target attribute. Based on all corrected attribute values, the attribute value of the target attribute in each tuple to be repaired is repaired. Then, the step of evaluating the training loss of the tuple on the model for any given tuple is returned until the repair is completed, resulting in the target relation dataset. The model is then trained based on the target relation dataset to obtain the target model.
2. The model training method for suspicious training data according to claim 1, wherein, The step of pre-cleaning the attribute values of all tuples to obtain abnormal attribute values and corresponding corrected attribute values includes: For any tuple and attribute, input the tuple and attribute into a preset data pre-cleaning function, and output the corrected attribute value corresponding to the attribute value of the tuple; If the attribute value of the tuple corresponding to the attribute is different from the corrected attribute value of the attribute value of the tuple corresponding to the attribute, then the attribute value of the tuple corresponding to the attribute is determined to be the abnormal attribute value.
3. The model training method for suspicious training data according to claim 1, wherein, The step of evaluating the training loss of any tuple on the model to obtain a loss evaluation result includes: For any tuple, calculate the training loss value of the tuple on the model; Based on the training loss value, all tuples are filtered to obtain high-loss tuples. All high-loss tuples are then combined into a high-loss tuple set, which is then used as the loss evaluation result.
4. The model training method for suspicious training data according to claim 3, wherein, The evaluation of the support of the tuple for the model's prediction results on tuples other than the tuple itself yields a support evaluation result, including: Based on the relation dataset and the model, a meta-model corresponding to the tuple is trained. Obtain the parameter vector of the meta-model, where each element in the parameter vector represents the support of any tuple for the model's prediction result on that tuple; Based on the parameter vector, all tuples are filtered to obtain the high-support tuples corresponding to the tuples. The high-support tuples corresponding to all tuples are formed into a high-support tuple set, and the high-support tuple set is used as the support evaluation result.
5. The model training method for suspicious training data according to claim 4, wherein, The step of training the meta-model corresponding to the tuple based on the relation dataset and the model includes: According to a preset sampling ratio, the relation dataset is randomly sampled to obtain a subset of relation data; For any subset of relational data, generate a binary vector of the relational data subset, where each element in the binary vector represents whether each tuple in the relational dataset is sampled into the relational data subset; Based on the subset of relational data, a sub-model corresponding to the subset of relational data is trained, and the sub-model has the same architecture as the model. For any tuple, each sub-model is used to predict the tuple, and the prediction result of the corresponding sub-model for the tuple is obtained. The binary vector of the relational data subset and the prediction result of the corresponding sub-model of the relational data subset for the tuple are associated to form a sample. Based on all samples, the meta-model corresponding to the tuple is trained.
6. The model training method for suspicious training data according to claim 4, wherein, The step of filtering all tuples based on the abnormal attribute value, the attribute value of the target attribute, the loss assessment result, and the support assessment result to obtain the tuples to be repaired corresponding to the target attribute includes: For any attribute value of the target attribute, if the attribute value is the abnormal attribute value, then the tuple containing the attribute value is determined to be the abnormal tuple corresponding to the target attribute, and all abnormal tuples are combined to form the abnormal tuple set corresponding to the target attribute. Based on the set of abnormal tuples, the loss assessment results, and the support assessment results, the tuples are filtered to obtain the tuples to be repaired corresponding to the target attribute.
7. The model training method for suspicious training data according to claim 6, wherein, The step of filtering the tuples based on the abnormal tuple set, the loss assessment result, and the support assessment result to obtain the tuples to be repaired corresponding to the target attribute includes: The union of the abnormal tuple set, the high-loss tuple set, and the high-support tuple set is calculated to obtain the tuple to be repaired corresponding to the target attribute.
8. A model training device for suspicious training data, wherein, include: The pre-cleaning module is used to acquire the relation dataset and the model to be trained, determine the attributes in the relation dataset and the attribute value of each tuple, perform data pre-cleaning on the attribute values of all tuples, and obtain abnormal attribute values and corresponding corrected attribute values. The evaluation module is used to evaluate the training loss of any tuple on the model to obtain a loss evaluation result, and to evaluate the support of the tuple for the model's prediction results on tuples other than the tuple to obtain a support evaluation result. The identification module is used to determine a target attribute from all attributes, and to filter all tuples based on the abnormal attribute value, the attribute value of the target attribute, the loss assessment result and the support assessment result to obtain the tuple to be repaired corresponding to the target attribute. The repair training module is used to repair the attribute value of the target attribute in each tuple to be repaired based on all the corrected attribute values, return to the step of evaluating the training loss of the tuple on the model for any tuple, until the repair is completed, obtain the target relation dataset, and train the model based on the target relation dataset to obtain the target model.
9. A computer device comprising a memory, a processor, and a readable storage medium stored in the memory and operable on the processor, wherein, When the processor executes the readable storage medium, it performs the following steps: Obtain the relation dataset and the model to be trained, determine the attributes in the relation dataset and the attribute values of each tuple, perform data pre-cleaning on the attribute values of all tuples, and obtain abnormal attribute values and corrected attribute values of the corresponding attribute values. For any tuple, evaluate the training loss of the tuple on the model to obtain a loss evaluation result, and evaluate the support of the tuple for the model's prediction results on tuples other than the tuple to obtain a support evaluation result. A target attribute is determined from all attributes. Based on the abnormal attribute value, the attribute value of the target attribute, the loss assessment result, and the support assessment result, all tuples are filtered to obtain the tuples to be repaired corresponding to the target attribute. Based on all corrected attribute values, the attribute value of the target attribute in each tuple to be repaired is repaired. Then, the step of evaluating the training loss of the tuple on the model for any given tuple is returned until the repair is completed, resulting in the target relation dataset. The model is then trained based on the target relation dataset to obtain the target model.
10. The computer device according to claim 9, wherein, The step of pre-cleaning the attribute values of all tuples to obtain abnormal attribute values and corresponding corrected attribute values includes: For any tuple and attribute, input the tuple and attribute into a preset data pre-cleaning function, and output the corrected attribute value corresponding to the attribute value of the tuple; If the attribute value of the tuple corresponding to the attribute is different from the corrected attribute value of the attribute value of the tuple corresponding to the attribute, then the attribute value of the tuple corresponding to the attribute is determined to be the abnormal attribute value.
11. The computer device according to claim 9, wherein, The step of evaluating the training loss of any tuple on the model to obtain a loss evaluation result includes: For any tuple, calculate the training loss value of the tuple on the model; Based on the training loss value, all tuples are filtered to obtain high-loss tuples. All high-loss tuples are then combined into a high-loss tuple set, which is then used as the loss evaluation result.
12. The computer device according to claim 11, wherein, The evaluation of the support of the tuple for the model's prediction results on tuples other than the tuple itself yields a support evaluation result, including: Based on the relation dataset and the model, a meta-model corresponding to the tuple is trained. Obtain the parameter vector of the meta-model, where each element in the parameter vector represents the support of any tuple for the model's prediction result on that tuple; Based on the parameter vector, all tuples are filtered to obtain the high-support tuples corresponding to the tuples. The high-support tuples corresponding to all tuples are formed into a high-support tuple set, and the high-support tuple set is used as the support evaluation result.
13. The computer device according to claim 12, wherein, The step of training the meta-model corresponding to the tuple based on the relation dataset and the model includes: According to a preset sampling ratio, the relation dataset is randomly sampled to obtain a subset of relation data; For any subset of relational data, generate a binary vector of the relational data subset, where each element in the binary vector represents whether each tuple in the relational dataset is sampled into the relational data subset; Based on the subset of relational data, a sub-model corresponding to the subset of relational data is trained, and the sub-model has the same architecture as the model. For any tuple, each sub-model is used to predict the tuple, and the prediction result of the corresponding sub-model for the tuple is obtained. The binary vector of the relational data subset and the prediction result of the corresponding sub-model of the relational data subset for the tuple are associated to form a sample. Based on all samples, the meta-model corresponding to the tuple is trained.
14. The computer device according to claim 12, wherein, The step of filtering all tuples based on the abnormal attribute value, the attribute value of the target attribute, the loss assessment result, and the support assessment result to obtain the tuples to be repaired corresponding to the target attribute includes: For any attribute value of the target attribute, if the attribute value is the abnormal attribute value, then the tuple containing the attribute value is determined to be the abnormal tuple corresponding to the target attribute, and all abnormal tuples are combined to form the abnormal tuple set corresponding to the target attribute. Based on the set of abnormal tuples, the loss assessment results, and the support assessment results, the tuples are filtered to obtain the tuples to be repaired corresponding to the target attribute.
15. The computer device according to claim 14, wherein, The step of filtering the tuples based on the abnormal tuple set, the loss assessment result, and the support assessment result to obtain the tuples to be repaired corresponding to the target attribute includes: The union of the abnormal tuple set, the high-loss tuple set, and the high-support tuple set is calculated to obtain the tuple to be repaired corresponding to the target attribute.
16. One or more readable storage media storing computer-readable instructions, wherein, When the computer-readable instructions are executed by one or more processors, the one or more processors cause the processors to perform the following steps: Obtain the relation dataset and the model to be trained, determine the attributes in the relation dataset and the attribute values of each tuple, perform data pre-cleaning on the attribute values of all tuples, and obtain abnormal attribute values and corrected attribute values of the corresponding attribute values. For any tuple, evaluate the training loss of the tuple on the model to obtain a loss evaluation result, and evaluate the support of the tuple for the model's prediction results on tuples other than the tuple to obtain a support evaluation result. A target attribute is determined from all attributes. Based on the abnormal attribute value, the attribute value of the target attribute, the loss assessment result, and the support assessment result, all tuples are filtered to obtain the tuples to be repaired corresponding to the target attribute. Based on all corrected attribute values, the attribute value of the target attribute in each tuple to be repaired is repaired. Then, the step of evaluating the training loss of the tuple on the model for any given tuple is returned until the repair is completed, resulting in the target relation dataset. The model is then trained based on the target relation dataset to obtain the target model.
17. The readable storage medium according to claim 16, wherein, The step of pre-cleaning the attribute values of all tuples to obtain abnormal attribute values and corresponding corrected attribute values includes: For any tuple and attribute, input the tuple and attribute into a preset data pre-cleaning function, and output the corrected attribute value corresponding to the attribute value of the tuple; If the attribute value of the tuple corresponding to the attribute is different from the corrected attribute value of the attribute value of the tuple corresponding to the attribute, then the attribute value of the tuple corresponding to the attribute is determined to be the abnormal attribute value.
18. The readable storage medium according to claim 16, wherein, The step of evaluating the training loss of any tuple on the model to obtain a loss evaluation result includes: For any tuple, calculate the training loss value of the tuple on the model; Based on the training loss value, all tuples are filtered to obtain high-loss tuples. All high-loss tuples are then combined into a high-loss tuple set, which is then used as the loss evaluation result.
19. The readable storage medium according to claim 18, wherein, The evaluation of the support of the tuple for the model's prediction results on tuples other than the tuple itself yields a support evaluation result, including: Based on the relation dataset and the model, a meta-model corresponding to the tuple is trained. Obtain the parameter vector of the meta-model, where each element in the parameter vector represents the support of any tuple for the model's prediction result on that tuple; Based on the parameter vector, all tuples are filtered to obtain the high-support tuples corresponding to the tuples. The high-support tuples corresponding to all tuples are formed into a high-support tuple set, and the high-support tuple set is used as the support evaluation result.
20. The readable storage medium according to claim 19, wherein, The step of training the meta-model corresponding to the tuple based on the relation dataset and the model includes: According to a preset sampling ratio, the relation dataset is randomly sampled to obtain a subset of relation data; For any subset of relational data, generate a binary vector of the relational data subset, where each element in the binary vector represents whether each tuple in the relational dataset is sampled into the relational data subset; Based on the subset of relational data, a sub-model corresponding to the subset of relational data is trained, and the sub-model has the same architecture as the model. For any tuple, each sub-model is used to predict the tuple, and the prediction result of the corresponding sub-model for the tuple is obtained. The binary vector of the relational data subset and the prediction result of the corresponding sub-model of the relational data subset for the tuple are associated to form a sample. Based on all samples, the meta-model corresponding to the tuple is trained.