Model training method and device, electronic equipment, storage medium and program product
By selecting the samples with the highest information content for labeling and employing incremental learning and asynchronous background cleanup processes, the problems of noise data accumulation and high-cost retraining in active learning are solved, achieving an efficient and self-cleaning model training process and improving model training efficiency and response speed.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- MAGIC VISION INTELLIGENT TECH (WUHAN) CO LTD
- Filing Date
- 2026-03-31
- Publication Date
- 2026-04-28
AI Technical Summary
In existing technologies, active learning models lack effective mechanisms for identifying and removing low-quality data during training, leading to the accumulation of noisy data, degradation of model performance, high retraining costs, low efficiency of manual review, lack of dynamic self-cleaning capabilities, and impact on iteration efficiency.
By selecting and labeling samples with the highest information content, and employing incremental learning and asynchronous background purification processes, harmful samples are dynamically identified and removed. Quality control is carried out in stages to achieve model self-purification and efficient training.
Significantly reduces annotation costs, improves model training efficiency, enhances response speed and throughput, reduces computational overhead, and enables closed-loop self-cleaning of models and flexible data management.
Smart Images

Figure CN121936632A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine learning technology, specifically to model training methods, apparatus, electronic devices, storage media, and program products. Background Technology
[0002] Active learning, as an effective technique for reducing annotation costs, has been widely applied in various fields such as image segmentation and defect classification.
[0003] In related technologies, sampling or core set methods based on uncertainty select new samples to add to the training set. However, these methods lack mechanisms for identifying and removing low-quality data already in the training set. Once low-quality or mislabeled data is selected and added to the training set, its negative impact accumulates, polluting model weights and causing a gradual degradation in model performance. Furthermore, when harmful samples are found in the training set, these technologies typically require retraining the entire model, wasting computational resources and time. Additionally, quality control methods in these technologies rely entirely on manual review; unclassified images must first undergo manual synchronous classification, hindering the data flow into the training set and severely impacting the iterative efficiency of active learning.
[0004] Therefore, there is an urgent need for a model training method that has data purification capabilities and high efficiency. Summary of the Invention
[0005] This invention provides a model training method, apparatus, electronic device, storage medium, and program product to solve the problems of poor model self-cleaning ability and low training efficiency in related technologies.
[0006] In a first aspect, the present invention provides a model training method, the method comprising: Obtain the current model; the current model includes multiple sub-models; The current model is used to query the unlabeled data pool, and the samples with the highest number of target data with the most information are selected and labeled to obtain the labeled sample set. Each sample in the labeled sample set is subjected to a quality assessment, and suspicious samples are added to the audit list. The labeled sample set is added to the current training set to form an updated training set; the training set includes multiple mutually exclusive data partitions. The incremental learning approach is used to train the current model using the updated training set, obtain the current model for the next round, and return the steps for obtaining the current model. The following cleanup process will be executed asynchronously in the background: Continuously respond to manual verification of suspicious samples in the audit list and filter out harmful samples; When the number of harmful samples reaches a preset forgetting threshold, harmful samples are removed from the current training set to form a new current training set. Based on the new current training set, the sub-models corresponding to the data slices with removed harmful samples are locally retrained to generate a cleaned model and replace the current model.
[0007] In one optional implementation, the step of performing a quality assessment on each sample in the labeled sample set to obtain suspicious samples and add them to the audit list includes: Calculate the prediction confidence for each sample in the labeled sample set; Analyze whether the features of each sample deviate from the core distribution of the labeled sample set; When the prediction confidence of a sample is lower than a preset confidence threshold or the sample deviates from the core distribution of the labeled sample set, the sample is marked as a suspicious sample. Add all suspicious samples to the audit list.
[0008] In an optional implementation, the method further includes: Obtain the historical accuracy of the sample annotator corresponding to the annotation in each sample; Obtain the complexity metric for each sample; The reliability probability of a sample is predicted based on its prediction confidence, whether it deviates from the core distribution of the labeled sample set, the historical accuracy of the labeler of the corresponding sample, and the complexity index. When the probability of a sample is credible is lower than the probability of being suspicious, the sample is marked as a suspicious sample.
[0009] In one optional implementation, the step of performing local retraining on the sub-models corresponding to the data slices with removed harmful samples based on the new current training set, generating a cleaned-up model and replacing the current model, includes: The multiple data slices of the new current training set are identified separately, and the data slices that have had harmful samples removed are selected. By independently training the corresponding sub-model for each data shard that has had harmful samples removed, the retrained sub-model is obtained; The retrained sub-models are aggregated with the unretrained sub-models to generate a cleaned-up model. Replace the current model with the purification model.
[0010] In an optional implementation, the method further includes: When the number of samples in the training set reaches a preset size threshold, a new data shard is created. Data shards that have reached the maximum number of samples are marked as cold shards, and updates to the sub-models corresponding to the cold shards are stopped. When a cold slice contains a harmful sample, the harmful sample is removed from the cold slice to obtain the cold slice after the harmful sample is removed; By independently training the corresponding sub-models after removing harmful samples from the cold slices, the retrained sub-models are obtained.
[0011] In an optional implementation, the method further includes: Monitor the performance metrics of the current model; the performance metrics include at least accuracy, false positive rate, and false negative rate; When the performance index of the current model is detected to be less than the preset performance threshold, the priority of manual verification of samples in the audit list is increased, and the preset forgetting threshold is decreased.
[0012] Secondly, the present invention provides a model training apparatus, the apparatus comprising: The model acquisition module is used to acquire the current model; the current model includes multiple sub-models. The sample filtering module is used to query the unlabeled data pool using the current model, filter out the target number of samples with the highest information content, and label them to obtain a labeled sample set. The quality assessment module is used to perform quality assessment on each sample in the labeled sample set and add suspicious samples to the audit list. The training set update module is used to add the labeled sample set to the current training set to form an updated training set; the training set includes multiple mutually exclusive data partitions. The training module is used to train the current model using an incremental learning approach with the updated training set, obtain the current model for the next round, and return the steps for obtaining the current model. The device also includes a background asynchronous purification module, used for: Continuously respond to manual verification of suspicious samples in the audit list and filter out harmful samples; When the number of harmful samples reaches a preset forgetting threshold, harmful samples are removed from the current training set to form a new current training set. Based on the new current training set, the sub-models corresponding to the data slices with removed harmful samples are locally retrained to generate a cleaned model and replace the current model.
[0013] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the model training method of the first aspect or any corresponding embodiment described above.
[0014] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the model training method of the first aspect or any corresponding embodiment thereof.
[0015] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the model training method of the first aspect or any corresponding embodiment thereof.
[0016] The technical solution provided by this invention may include the following beneficial effects: The model training method provided by this invention, by selecting and labeling the target number of samples with the highest information content, can prioritize the labeling of samples most helpful to model improvement, significantly reducing the total labeling cost; by performing quality assessment on each sample in the labeled sample set to obtain suspicious samples and continuously responding to manual verification of suspicious samples in the audit list to filter out harmful samples, the quality control is divided into two stages: algorithmic initial screening and manual verification, realizing dual filtering, dynamically removing harmful samples, and improving the efficiency of quality assessment; by using incremental learning to train the current model, the need for training from scratch each time is avoided, the model convergence rhythm is accelerated, and all new data can be used for training immediately regardless of whether there are suspicious samples, improving the system's response speed and throughput; By setting up an asynchronous background cleanup process, the model update process and the manual verification process are decoupled, solving the problem of manual verification blocking the learning process in related technologies and improving model training efficiency. By performing local retraining when the number of harmful samples reaches a preset forgetting threshold, full retraining is not required, which effectively reduces the frequency of machine forgetting and computational overhead, improves model cleanup efficiency, and achieves closed-loop self-cleaning of the model. By setting up the addition of suspicious samples in the training set to the audit list and the removal of harmful samples from the training set, a dynamic data flow mechanism between the training set and the audit list is established, which allows samples to be added first and then reviewed, and samples with problems to be removed in time, realizing flexible management of training data and achieving model cleanup during model training. Attached Figure Description
[0017] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of the first process of the model training method according to an embodiment of the present invention; Figure 2This is a schematic diagram of a second process for a model training method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the third process of the model training method according to an embodiment of the present invention; Figure 4 This is a structural block diagram of a model training device according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.
[0021] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0022] Active learning, as an effective technique for reducing annotation costs, has been widely applied in various fields such as image segmentation and defect classification.
[0023] In related technologies, the following drawbacks exist when applying active learning for model training: 1. Accumulation of noisy data. In related technologies, sampling or core set methods based on uncertainty select new samples to be added to the training set. They mainly focus on how to select new samples, but lack a mechanism for identifying and removing low-quality data that has already entered the training set. Once low-quality or mislabeled data is selected and added to the training set, its negative impact will continue to accumulate, polluting the model weights and causing the model performance to gradually degrade.
[0024] 2. High retraining costs. When harmful samples are found in the training set, the solution in related technologies is usually to retrain the entire model, which wastes computing resources and time. Especially in scenarios with large amounts of data and complex models, full retraining requires a lot of computing resources and time, which cannot meet the needs of rapid model iteration and deployment.
[0025] 3. Low efficiency of manual review. The quality control mechanisms in related technologies mostly rely on synchronous manual review, that is, each batch of candidate samples must be manually confirmed before they can be added to the training, which seriously slows down the iteration speed of active learning and becomes a bottleneck for system throughput.
[0026] 4. Lack of dynamic self-purification capability. Related technologies lack a mechanism to continuously detect and remove harmful samples without stopping the system or blocking the learning process, resulting in the system's inability to maintain the purity and robustness of the model during long-term operation.
[0027] According to an embodiment of the present invention, a model training method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0028] This embodiment provides a model training method that can be used on laptops, desktop computers, industrial control computers, etc. Figure 1 This is a flowchart of a model training method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps: Step S101: Obtain the current model.
[0029] The current model is the target model that needs to be trained. The current model includes multiple sub-models, and each sub-model is trained separately and then aggregated into the overall model.
[0030] Steps S101 to S105 constitute the main process loop, used for model training. Upon the initial execution of this main process loop, the obtained current model is the initial model, which is pre-trained using an initial labeled dataset.
[0031] Step S102: Use the current model to query the unlabeled data pool, filter out the target number of samples with the highest information content and label them to obtain the labeled sample set.
[0032] An unlabeled data pool refers to a large-scale collection of raw data that has not yet been labeled manually or automatically in machine learning tasks. For example, in parking, driving, and fusion perception scenarios, this unlabeled data pool may include RGB images and continuous frame video streams captured by vehicle cameras, point cloud data captured by 3D sensing devices (such as LiDAR, stereo vision systems, structured light cameras, etc.), distance and angle information captured by millimeter-wave radar, GPS / IMU positioning data (vehicle position, attitude, acceleration, etc.), semantic annotation information (such as target categories and bounding boxes labeled in images or point cloud data), audio data captured by microphones (sirens, horns, voice, etc.), text description information (such as maintenance logs, driver speech transcription, annotations, etc.), and metadata (such as timestamps, vehicle numbers, weather conditions, etc.).
[0033] The current model can query each unlabeled sample in the unlabeled data pool through methods such as uncertainty sampling, representativeness sampling, and expected gradient length (EGL) to obtain the information content of each unlabeled sample. This information content is used to indicate the degree of uncertainty of the current model regarding the unlabeled samples. Then, the current model can select the target number of samples with the highest information content from the unlabeled data pool, and then label these samples through manual or automatic labeling methods to form a labeled sample set based on the labeled samples.
[0034] When the main process loop is executed for the first time, the unlabeled data pool needs to be established in advance.
[0035] Step S103: Perform a quality assessment on each sample in the labeled sample set and add suspicious samples to the audit list.
[0036] Quality assessment methods from relevant technologies can be used to assess the quality of each sample in the labeled sample set. Samples with questionable quality assessment results are identified as potential low-quality samples awaiting manual verification, i.e., questionable samples. This audit list is used to cache questionable samples for use in the background asynchronous cleanup process.
[0037] When the main process loop is executed for the first time, the audit list needs to be initialized to empty beforehand.
[0038] Step S104: Add the labeled sample set to the current training set to form an updated training set.
[0039] The training set consists of multiple mutually exclusive data shards, each used to train a corresponding sub-model. The number of data shards and the capacity of each data shard can be determined according to actual needs.
[0040] Step S105: Using incremental learning, train the current model with the updated training set to obtain the current model for the next round, and return to the step of obtaining the current model.
[0041] Incremental learning refers to a model's ability to gradually absorb knowledge from new data and update its parameters without retraining on the entire historical dataset, thus achieving continuous evolution. In this approach, each time the updated training set is obtained in the main process loop, the current model is trained using the updated training set to obtain the current model for the next round, and then the process returns to step S101 to execute the next round of the main process loop.
[0042] Step S106: Continuously respond to manual verification of suspicious samples in the audit list and filter out harmful samples.
[0043] Steps S106 to S108 are background asynchronous process loops used to execute the purification process asynchronously in the background. This background asynchronous process loop is asynchronous with the main process loop, and they run independently without blocking each other or strictly in sequence.
[0044] During the execution of the background asynchronous process loop, human annotators or audit experts can continuously manually verify each suspicious sample in the audit list through the human audit terminal, and make final confirmation on the suspicious samples that have passed the initial screening in step S103, thereby identifying and marking the real harmful samples, such as mislabeled or low-quality samples, and providing a reliable basis for subsequent machine forgetting.
[0045] Step S107: When the number of harmful samples reaches the preset forgetting threshold, harmful samples are removed from the current training set to form a new current training set.
[0046] By setting a preset forgetting threshold, machine forgetting is only performed when the number of harmful samples accumulates to that threshold, reducing resource consumption caused by frequent retraining and optimizing resource utilization. Other conditions that trigger machine forgetting can also be set, such as removing harmful samples from the current training set at preset time intervals to form a new current training set, and promptly replacing the original current training set with the new one to ensure the training process is not affected by harmful samples.
[0047] Step S108: Based on the new current training set, perform local retraining on the sub-models corresponding to the data slices with removed harmful samples to generate a cleaned model and replace the current model.
[0048] Only data shards containing harmful samples will negatively impact the model training process. Therefore, local retraining should only be performed on the sub-models corresponding to data shards containing harmful data. Harmful samples may be distributed across multiple data shards. It is necessary to identify the data shards from which harmful samples have been removed, perform local retraining on the sub-models corresponding to the data shards from which harmful samples have been removed, and then aggregate all the sub-models to form a cleaned model. The current model should be replaced with the cleaned model in a timely manner to ensure that the current model is not affected by harmful samples.
[0049] The model training method provided in this embodiment, by selecting and labeling the target number of samples with the highest information content, can prioritize the selection of samples most helpful to model improvement, significantly reducing the total labeling cost; by performing quality assessment on each sample in the labeled sample set to obtain suspicious samples and continuously responding to manual verification of suspicious samples in the audit list to filter out harmful samples, the quality control is divided into two stages: algorithmic initial screening and manual verification, realizing dual filtering, dynamically removing harmful samples, and improving the efficiency of quality assessment; by using incremental learning to train the current model, the need for training from scratch each time is avoided, the model convergence pace is accelerated, and all new data can be used for training immediately regardless of whether there are suspicious samples, improving the system's response speed and throughput; By setting up an asynchronous background cleanup process, the model update process and the manual verification process are decoupled, solving the problem of manual verification blocking the learning process in related technologies and improving model training efficiency. By performing local retraining when the number of harmful samples reaches a preset forgetting threshold, full retraining is not required, which effectively reduces the frequency of machine forgetting and computational overhead, improves model cleanup efficiency, and achieves closed-loop self-cleaning of the model. By setting up the addition of suspicious samples in the training set to the audit list and the removal of harmful samples from the training set, a dynamic data flow mechanism between the training set and the audit list is established, which allows samples to be added first and then reviewed, and samples with problems to be removed in time, realizing flexible management of training data and achieving model cleanup during model training.
[0050] This embodiment provides a model training method that can be used on laptops, desktop computers, industrial control computers, etc. Figure 2 This is a flowchart of a model training method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps: Step S201: Obtain the current model.
[0051] The current model includes multiple sub-models.
[0052] Optionally, based on the SISA (Sharded, Isolated, Sliced, and Aggregated) machine forgetting framework, the training set is divided into multiple mutually exclusive data shards, each of which is used to train a sub-model of the current model.
[0053] Optionally, before obtaining the current model for the first round, a system initialization operation is performed to obtain the initial audit list, initial confidence threshold, initial unlabeled pool, and initial labeled sample set, and the initial model is trained using the initial labeled sample set to obtain the current model for the first round.
[0054] Step S202: Use the current model to query the unlabeled data pool, filter out the target number of samples with the highest information content and label them to obtain the labeled sample set.
[0055] Optionally, an uncertainty-based sampling method or a representative core set method can be used to query the unlabeled data pool using the current model and select the sample with the highest information content. For example, the representative core set method can use the k-center algorithm to select representative samples; in the uncertainty-based sampling method, the sample with the highest predicted entropy is selected as the sample with the highest information content. The formula for calculating the predicted entropy is as follows:
[0056] in, Represents the entropy value. Let c represent a random variable, and c represent the c-th sample. That is to say , where represents the predicted value of the c-th sample.
[0057] Step S203: Perform a quality assessment on each sample in the labeled sample set and add suspicious samples to the audit list.
[0058] Optionally, a high recall algorithm filter is used to assess the quality of each sample in the labeled sample set. Specifically, first, the predicted confidence of each sample in the labeled sample set is calculated; then, it is analyzed whether the features of each sample deviate from the core distribution of the labeled sample set; next, when the predicted confidence of a sample is lower than a preset confidence threshold or the sample deviates from the core distribution of the labeled sample set, the sample is marked as a suspicious sample; finally, all suspicious samples are added to the audit list. An example formula for filtering according to the predicted confidence threshold is as follows:
[0059] in, Model representing time t For input samples The original prediction score output after inference, softmax represents the normalization operation, and max represents the extraction of the maximum value.
[0060] Optionally, the Mahalanobis distance between the sample features and the feature centers of the training set can be calculated and compared with a preset Mahalanobis distance threshold. If the distance exceeds the preset threshold, the sample is considered a suspicious sample because its features deviate from the core distribution of the labeled sample set. An example formula for calculating the Mahalanobis distance is as follows:
[0061] in, Represents the feature centers of the training set. This represents the inverse of the covariance matrix among the variables in the sample, and the superscript T indicates the transpose of the vector. The sample to be calculated can be a model. The mean and covariance matrix of the extracted intermediate layer feature vectors or other embedding models can also be calculated from the training set feature vectors.
[0062] Furthermore, the reliability probability of a sample can be predicted, and based on this reliability probability, a decision can be made as to whether to label the sample as suspicious. Specifically, the historical accuracy of the labeler corresponding to each sample is obtained; the complexity index of each sample is obtained; then, based on the sample's prediction confidence, whether it deviates from the core distribution of the labeled sample set, the historical accuracy of the labeler, and the complexity index, a model with relevant prediction capabilities is used to predict the reliability probability of the sample; finally, the reliability probability of the sample is compared with a preset suspicious probability threshold. When the reliability probability of a sample is lower than the suspicious probability threshold, the sample is labeled as suspicious. The historical accuracy of the labeler is calculated using a time-decay weighted average, with recent performance given higher weight. The model with relevant prediction capabilities can be a lightweight classifier, including any of logistic regression, random forest, or small neural networks.
[0063] Optionally, in parking, driving, and fusion perception scenarios, cross-modal semantic consistency analysis can be performed on multimodal samples collected by multiple onboard sensors. Samples with significant conflicts can be identified as suspicious samples and added to an audit list. For example, for multimodal samples containing images and text descriptions, video and voice logs, or sensor fusion inputs, time alignment preprocessing is performed, and then a pre-trained multimodal coding model is used to calculate the embedding space alignment between different modalities. The multimodal coding model is a CLIP-type architecture, which extracts the vector representations of image regions and corresponding text descriptions. Then, the cosine similarity score between modalities is calculated. If it is lower than a preset similarity threshold, a conflict alarm is triggered. For example, during driving, if the camera image is labeled "pedestrian ahead," but the driver's voice log records "no one is passing," and the radar does not detect a moving target, it is judged as a potential mislabeling. In the parking assistance system, if the ultrasonic sensor shows "obstacle on the right," but the label is "no obstacle, parking is possible," and the surround view image is blurry, it is considered a low-quality sample. In the fusion perception task, if the lidar point cloud shows structural cracks, but the maintenance work order text describes it as "exterior intact," a semantic inconsistency score is output. If the semantic consistency score is lower than the first threshold, the sample is automatically added to the audit list. When the semantic consistency score is higher than the second threshold, it is considered a high-confidence sample, and the manual verification process is skipped.
[0064] Step S204: Add the labeled sample set to the current training set to form an updated training set.
[0065] The training set consists of multiple mutually exclusive data slices, and the current training set is used to indicate the training set for the current loop round.
[0066] Optionally, the labeled sample set can be added to the current training set using a random allocation method, with each sample in the labeled sample set randomly added to a data shard in the current training set; or, the labeled sample set can be added to the current training set using a round-robin allocation method, with each sample in the labeled sample set being added to a data shard in the current training set in turn; or, the labeled sample set can be added to the current training set using a load balancing allocation method, dynamically adjusting the data shard added to each sample in the labeled sample set based on the size and capacity of each data shard in the current training set.
[0067] Step S205: Using incremental learning, train the current model with the updated training set to obtain the current model for the next round, and return to the step of obtaining the current model.
[0068] Training the current model directly with the updated training set to obtain the current model for the next round ensures that the active learning process is not blocked by manual verification of the asynchronous background cleanup process, thus improving model training efficiency.
[0069] Step S206: Continuously respond to manual verification of suspicious samples in the audit list and filter out harmful samples.
[0070] The purification process is executed asynchronously in the background, which consists of steps S206 to S208.
[0071] This manual verification is performed by the labelers in the background to check whether suspicious samples are labeled incorrectly. For example, are there any mislabeled samples (such as labeling a pedestrian as a bicycle), missed detections (such as obscured vehicles not being labeled), or time misalignments (such as multiple sensors not being synchronized). Suspicious samples that are confirmed to be labeled incorrectly are identified as harmful samples.
[0072] Step S207: When the number of harmful samples reaches the preset forgetting threshold, harmful samples are removed from the current training set to form a new current training set.
[0073] Query the data shard to which each harmful sample belongs, and remove the corresponding harmful sample from the data shard to obtain a new current training set.
[0074] Step S208: Based on the new current training set, perform local retraining on the sub-models corresponding to the data slices with removed harmful samples to generate a clean model and replace the current model.
[0075] Specifically, step S208 includes: Step S2081: Identify the multiple data segments of the new current training set and filter out the data segments that have had harmful samples removed.
[0076] Data shards that have had harmful samples removed are identified as data shards affected by harmful samples, while other data shards that have not had harmful samples removed are identified as data shards unaffected by harmful samples.
[0077] Step S2082: Train the corresponding sub-model independently for each data shard that has had harmful samples removed, and obtain the retrained sub-model.
[0078] The sub-models are retrained by removing the data slices containing harmful samples, resulting in retrained sub-models; the sub-models corresponding to the data slices containing data slices containing harmful samples are kept unchanged and are not retrained.
[0079] Step S2083: Aggregate the retrained sub-model with the unretrained sub-model to generate a clean model.
[0080] Integrate the retrained sub-models with other unretrained sub-models to generate a cleaned model.
[0081] Step S2084: Replace the current model with the purification model.
[0082] Once the cleaned model is obtained, it is used to replace the current model in the current round's main process loop, ensuring that the current model is not affected by harmful samples as much as possible and improving the model's accuracy.
[0083] Optionally, incremental data sharding management can be configured to dynamically expand the training set and separate hot and cold data by marking the hotness or coldness of data shards. Specifically, when the number of samples in the training set reaches a preset threshold, a new data shard is created; data shards that have reached their maximum number of samples are marked as cold shards, updates are stopped, and the sub-models corresponding to cold shards are frozen to reduce computational load and save resources; other data shards are marked as hot shards, and new samples are only added to the currently active hot shards. The parameters of frozen sub-models can be saved to persistent storage, and the corresponding memory and computing resources can be released.
[0084] When a cold segment contains harmful samples, the harmful samples are removed from the cold segment to obtain a cold segment with the harmful samples removed. A corresponding sub-model is then independently trained using this cold segment to obtain a retrained sub-model. This ensures that even when a cold segment contains harmful samples, effective forgetting can still be achieved through retraining the corresponding sub-model. Furthermore, health checks can be performed periodically on each cold segment to calculate the density of potentially harmful samples. When the density exceeds a harmful sample threshold, a batch forgetting task can be planned in advance.
[0085] Optionally, a meta-controller can be used to dynamically adjust the active learning sampling strategy and the machine forgetting trigger threshold based on the model's performance changes on the validation set. Specifically, the performance metrics of the current model are monitored; these metrics include at least accuracy, false positive rate, and false negative rate. When the performance metrics of the current model are detected to be lower than the preset performance threshold, the priority of manual verification of samples in the audit list is increased, and the preset forgetting threshold is decreased. When the model performance is detected to be stable for a long period of time but without significant progress (i.e., "learning stagnation"), it is determined to be insufficient exploration, and incentive-based sampling adjustments are performed. For example, the query strategy is adjusted to favor samples in regions of higher uncertainty, or the sampling range is expanded to long-tail scenarios (such as pedestrian detection in extreme weather or blind spots in nighttime parking), or diversity constraints are introduced to exclude instances in the candidate samples that are highly similar to the embeddings of existing training samples. For example, in the driving perception stage, if small obstacles (such as tire fragments) are continuously missed in high-speed scenarios, the uncertainty sampling weight of the relevant area will be automatically increased; in the automatic parking stage, if the corner pole recognition accuracy fails to improve in multiple consecutive cycles when reversing into the parking space, cases of "corner poles being mislabeled as shadows" in historical annotations will be reviewed first; in the fusion perception task, when the consistency between visual and radar prediction results is consistently low, a multimodal conflict special audit process will be triggered, and the sampling ratio of cross-modal samples will be temporarily increased.
[0086] The model training method provided in this embodiment offers an asynchronous quality audit process, decoupling quality control into two stages: "algorithm initial screening" and "human verification," achieving non-blocking auditing. It also provides a batch machine forgetting mechanism, triggering machine forgetting in batches based on thresholds to reduce forgetting frequency and integrating the SISA framework for efficient cleanup. Furthermore, it offers a dynamic data management mechanism, designing a "first-in, then-audit; identify, then remove" data flow strategy to achieve dynamic cleanup of the training set. Finally, it provides a closed-loop self-cleaning learning system, deeply integrating active learning and machine forgetting to form a "learning-audit-forgetting" closed loop with long-term self-maintenance capabilities. This model training method is applicable to tasks such as parking, driving, and fusion perception in autonomous driving, and can also be extended to fields such as image recognition, defect detection, and speech processing.
[0087] As one or more specific application embodiments of the present invention, the optimal implementation scheme or the scheme that the inventors most want to embody is described in combination with the specific application scenario.
[0088] Figure 3 This is a flowchart of a model training method according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps: Step 1: System Initialization. Prepare the initial labeled dataset L0 as the seed set; train the initial model M0 using the initial labeled dataset L0; establish a large-scale unlabeled data pool U; initialize the audit list (shadow set) S to be manually verified. Set the batch size threshold N_ to trigger machine forgetting. threshold For example, setting N_ threshold =100.
[0089] Step Two: Active Learning and Fast Update Loop (Main Loop). First, query and label the data. Using the current model M_t, query the most valuable data X_query from the unlabeled data pool U and label it to obtain D_new. The query strategy can employ uncertainty-based sampling or a representative core set-based approach. Next, a high-recall algorithm is used for initial screening. For each sample in D_new, a high-recall algorithm filter is used for quality assessment, calculating the prediction confidence of each sample and selecting those below a threshold θ. low The sample data is analyzed to determine the degree of deviation between the sample characteristics and the core distribution. All suspicious samples D_suspect are added to the audit list S. Finally, an immediate model update is performed, directly adding the entire D_new (including normal and suspicious samples) to the training set and updating the model using incremental learning to obtain the updated model M_t+1 for the t-th round (t is an integer starting from 0). This step ensures that the learning process is not blocked by the quality audit.
[0090] Step 3: Asynchronous Quality Audit and Forgetting Loop (Secondary Loop). Parallel manual auditing: In a background process running concurrently with the main loop, samples in the audit list S are continuously manually verified to confirm their labeling accuracy. Harmful data continues to accumulate: Manually confirmed harmful samples (such as mislabeled samples) are moved into the confirmed harmful dataset D_bad. When |D_bad|≥N_threshold, a batch machine forgetting process is triggered. During batch machine forgetting, all samples in D_bad are removed from the current training set. Then, the SISA machine forgetting framework is used to perform efficient forgetting sharding, dividing the training dataset into multiple mutually exclusive shards for local retraining. Only the shards containing D_bad samples are retrained. Model aggregation is then performed, and the updated shard models are re-aggregated into a purified model M_purified. Finally, the processed D_bad samples are removed from the audit list S, and M_purified is used as the new current model to continue the main loop.
[0091] The above-described solution, through initial screening with a high recall algorithm and subsequent manual verification, effectively identifies and removes harmful samples from the training set, solves the noise accumulation problem, and improves model robustness. Compared with traditional active learning systems, it reduces the impact of noisy data and improves the model's accuracy on the test set. By adopting the SISA machine forgetting framework, only partial data slices need to be retrained instead of the entire model, reducing computational time overhead. The asynchronous processing architecture ensures that manual verification no longer blocks the main learning process (main process). This parallel processing method can improve the overall throughput of the system, and the batch processing mechanism reduces the trigger frequency of machine forgetting, further optimizing resource utilization. This solution can be widely applied in multiple fields such as image segmentation, defect classification, and speech recognition. Especially in industrial scenarios with inconsistent data quality, it can effectively maintain model performance and reduce maintenance costs.
[0092] This embodiment also provides a model training apparatus for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0093] This embodiment provides a model training device, such as Figure 4 As shown, it includes: The model acquisition module 401 is used to acquire the current model, which includes multiple sub-models. The sample filtering module 402 is used to query the unlabeled data pool using the current model, filter out the target number of samples with the highest information content, and label them to obtain a labeled sample set. The quality assessment module 403 is used to perform a quality assessment on each sample in the labeled sample set and add suspicious samples to the audit list. The training set update module 404 is used to add the labeled sample set to the current training set to form an updated training set; the training set includes multiple mutually exclusive data partitions. Training module 405 is used to train the current model using the updated training set in an incremental learning manner, obtain the current model for the next round, and return the steps for obtaining the current model. The device also includes a background asynchronous purification module 406, used for: Continuously respond to manual verification of suspicious samples in the audit list and filter out harmful samples; When the number of harmful samples reaches a preset forgetting threshold, harmful samples are removed from the current training set to form a new current training set. Based on the new current training set, the sub-models corresponding to the data slices with removed harmful samples are locally retrained to generate a cleaned model and replace the current model.
[0094] In one alternative implementation, the quality assessment module is further used for: Calculate the prediction confidence for each sample in the labeled sample set; Analyze whether the features of each sample deviate from the core distribution of the labeled sample set; When the prediction confidence of a sample is lower than the preset confidence threshold or the sample deviates from the core distribution of the labeled sample set, the sample is marked as a suspicious sample. Add all suspicious samples to the audit list.
[0095] In an optional implementation, the device further includes a confidence probability prediction module for: Obtain the historical accuracy of the sample annotator corresponding to the annotation in each sample; Obtain the complexity metric for each sample; The reliability probability of a sample is predicted based on its prediction confidence, whether it deviates from the core distribution of the labeled sample set, the historical accuracy of the labeler of the corresponding sample, and the complexity index. When the probability of a sample is credible is lower than the probability of being suspicious, the sample is marked as a suspicious sample.
[0096] In one alternative implementation, the background asynchronous cleanup module is further configured to: The multiple data slices of the new current training set are identified separately, and the data slices that have had harmful samples removed are selected. By independently training the corresponding sub-model for each data shard that has had harmful samples removed, the retrained sub-model is obtained; The retrained sub-models are aggregated with the unretrained sub-models to generate a cleaned-up model. Replace the current model with this cleansing model.
[0097] In an optional implementation, the device further includes a data fragmentation management module for: When the number of samples in the training set reaches a preset size threshold, a new data shard is created. Data shards that have reached the maximum number of samples are marked as cold shards, and updates to the sub-models corresponding to the cold shards are stopped. When a cold slice contains a harmful sample, the harmful sample is removed from the cold slice to obtain the cold slice after the harmful sample is removed; By independently training the corresponding sub-models after removing harmful samples from the cold slices, the retrained sub-models are obtained.
[0098] In an optional implementation, the device further includes a model performance monitoring module for: Monitor the performance metrics of the current model; these metrics should include at least accuracy, false positive rate, and false negative rate. When the performance metrics of the current model are detected to be less than the preset performance threshold, the priority of manual verification of samples in the audit list is increased, and the preset forgetting threshold is decreased.
[0099] The model training apparatus provided in this embodiment of the invention can execute the model training method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the method. Further functional descriptions of the various modules and units described above are the same as in the corresponding embodiments described above, and will not be repeated here.
[0100] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0101] The following is a detailed reference. Figure 5 This diagram illustrates a suitable structural schematic for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from memory 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the electronic device. The processor 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0102] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.
[0103] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a memory 508, or installed from a ROM 502. When the computer program is executed by the processor 501, it performs the functions defined in the model training method of the embodiments of the present invention.
[0104] Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0105] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the model training method shown in the above embodiments is implemented.
[0106] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0107] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the invention.
Claims
1. A model training method, characterized in that, The method includes: Obtain the current model; the current model includes multiple sub-models; The current model is used to query the unlabeled data pool, and the samples with the highest number of target data with the most information are selected and labeled to obtain the labeled sample set. Each sample in the labeled sample set is subjected to a quality assessment, and suspicious samples are added to the audit list. The labeled sample set is added to the current training set to form an updated training set; the training set includes multiple mutually exclusive data partitions. The incremental learning approach is used to train the current model using the updated training set, obtain the current model for the next round, and return the steps for obtaining the current model. The following cleanup process will be executed asynchronously in the background: Continuously respond to manual verification of suspicious samples in the audit list and filter out harmful samples; When the number of harmful samples reaches a preset forgetting threshold, harmful samples are removed from the current training set to form a new current training set. Based on the new current training set, the sub-models corresponding to the data slices with removed harmful samples are locally retrained to generate a cleaned model and replace the current model.
2. The model training method according to claim 1, characterized in that, The process of performing a quality assessment on each sample in the labeled sample set, and adding suspicious samples to the audit list, includes: Calculate the prediction confidence for each sample in the labeled sample set; Analyze whether the features of each sample deviate from the core distribution of the labeled sample set; When the prediction confidence of a sample is lower than a preset confidence threshold or the sample deviates from the core distribution of the labeled sample set, the sample is marked as a suspicious sample. Add all suspicious samples to the audit list.
3. The model training method according to claim 2, characterized in that, The method further includes: Obtain the historical accuracy of the sample annotator corresponding to the annotation in each sample; Obtain the complexity metric for each sample; The reliability probability of a sample is predicted based on its prediction confidence, whether it deviates from the core distribution of the labeled sample set, the historical accuracy of the labeler of the corresponding sample, and the complexity index. When the probability of a sample is credible is lower than the probability of being suspicious, the sample is marked as a suspicious sample.
4. The model training method according to any one of claims 1 to 3, characterized in that, The step of performing local retraining on the sub-models corresponding to the data slices with removed harmful samples based on the new current training set, generating a cleaned model and replacing the current model, includes: The multiple data slices of the new current training set are identified separately, and the data slices that have had harmful samples removed are selected. By independently training the corresponding sub-model for each data shard that has had harmful samples removed, the retrained sub-model is obtained; The retrained sub-models are aggregated with the unretrained sub-models to generate a cleaned-up model. Replace the current model with the purification model.
5. The model training method according to claim 4, characterized in that, The method further includes: When the number of samples in the training set reaches a preset size threshold, a new data shard is created. Data shards that have reached the maximum number of samples are marked as cold shards, and updates to the sub-models corresponding to the cold shards are stopped. When a cold slice contains a harmful sample, the harmful sample is removed from the cold slice to obtain the cold slice after the harmful sample is removed; By independently training the corresponding sub-models after removing harmful samples from the cold slices, the retrained sub-models are obtained.
6. The model training method according to any one of claims 1 to 3, characterized in that, The method further includes: Monitor the performance metrics of the current model; the performance metrics include at least accuracy, false positive rate, and false negative rate; When the performance index of the current model is detected to be less than the preset performance threshold, the priority of manual verification of samples in the audit list is increased, and the preset forgetting threshold is decreased.
7. A model training device, characterized in that, The device includes: The model acquisition module is used to acquire the current model; the current model includes multiple sub-models. The sample filtering module is used to query the unlabeled data pool using the current model, filter out the target number of samples with the highest information content, and label them to obtain a labeled sample set. The quality assessment module is used to perform quality assessment on each sample in the labeled sample set and add suspicious samples to the audit list. The training set update module is used to add the labeled sample set to the current training set to form an updated training set; the training set includes multiple mutually exclusive data partitions. The training module is used to train the current model using an incremental learning approach with the updated training set, obtain the current model for the next round, and return the steps for obtaining the current model. The device also includes a background asynchronous purification module, used for: Continuously respond to manual verification of suspicious samples in the audit list and filter out harmful samples; When the number of harmful samples reaches a preset forgetting threshold, harmful samples are removed from the current training set to form a new current training set. Based on the new current training set, the sub-models corresponding to the data slices with removed harmful samples are locally retrained to generate a cleaned model and replace the current model.
8. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the model training method of any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the model training method according to any one of claims 1 to 6.
10. A computer program product, characterized in that, Includes computer instructions for causing a computer to perform the model training method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for automatically solving data conflict, electronic equipment and medium
CN120336339A
Method and device for solving catastrophic memory of forgotten learning based on knowledge distillation
CN120525005A
Toxic speech detection method and system based on forgetting learning
CN121501995A
Systems and methods for machine unlearning
US20250165863A1