Pseudo-label filtering-based online domain change continual learning method and system
By dynamically adjusting the pseudo-label threshold, the performance degradation caused by low-quality pseudo-labels in CTTA is solved, the robustness and adaptability of the model in complex environments are improved, and stable classification prediction is achieved.
Patent Information
- Application Number
- PCT/CN2024/132584
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-29
- Filing Date
- 2024-11-18
- Publication Date
- 2026-02-05
AI Technical Summary
In existing CTTA technology, low-quality pseudo-labels cause the model's performance to decline during long-term adaptation, and there is a lack of effective pseudo-label filtering strategies to adapt to complex and ever-changing environmental conditions and data distributions.
A threshold filtering method based on binary classification is adopted, which combines a low initial threshold related to the number of categories, exponential moving average, and class prior alignment to dynamically adjust the pseudo-label threshold, filter low-quality pseudo-labels, and optimize the model.
This improves the model's robustness and adaptability in complex environments, ensures the quality of pseudo-labels, reduces error accumulation, and achieves stable classification prediction.
Smart Images

Figure CN2024132584_05022026_PF_FP_ABST
Abstract
Description
A Method and System for Continuous Learning of Online Domain Variation Based on Pseudo-Label Filtering Technical Field
[0001] This invention relates to the field of computer vision technology, and in particular to an online domain change continuous learning method and system based on pseudo-label filtering. Background Technology
[0002] With the rapid development of deep learning technology, the challenges faced by models in practical deployment are also increasing. Especially in complex scenarios such as autonomous driving and environmental monitoring, models need to be able to adapt to constantly changing environmental conditions and data distributions. To address this, Test-Time Adaptation (TTA) technology has emerged, allowing models to adapt to new target domains through unsupervised learning without accessing the source data.
[0003] However, traditional Test-Time Adaptation (TTA) methods are typically limited to static or short-term environmental changes, exhibiting limited adaptability to long-term or continuously changing environments. Therefore, Continuous Test-Time Adaptation (CTTA), as an online continuous form of TTA, has received widespread attention in recent years. CTTA technology aims to enable models to adapt to changes in the distribution of data in the target domain in real time and continuously, thereby maintaining efficiency and robustness in unsupervised real-world applications.
[0004] In the implementation of CTTA, pseudo-labeling is a commonly used method. Pseudo-labeling generates predicted labels (pseudo-labels) for samples in the target domain and uses these pseudo-labels to optimize the model, thereby promoting the model's adaptation to the target domain. Particularly in methods based on the Mean Teacher (MT) structure, pseudo-labeling is widely used to improve the model's short-term structural domain adaptation ability under TTA conditions. The MT structure further strengthens the role of pseudo-labels in the model adaptation process by generating a consistent loss for predictions.
[0005] However, while pseudo-labeling techniques have achieved significant success in short-term TTA applications, they face major challenges in long-term CTTA applications. Over time, the quality of generated pseudo-labels gradually declines due to uncertainties in model predictions and environmental changes. These low-quality pseudo-labels may lead to error accumulation during model adaptation, resulting in performance degradation. Therefore, effectively filtering out these low-quality pseudo-labels in CTTA has become a pressing issue.
[0006] Currently, setting a threshold is a simple and intuitive method for filtering pseudo-labels. However, in unsupervised CTTA tasks, due to the unknown distribution of target domain data and the unavailability of test data, it is impractical to filter pseudo-labels by finely adjusting a fixed threshold. This necessitates seeking a more flexible and adaptive pseudo-label filtering strategy to adapt to the complex and ever-changing environmental conditions and data distribution in CTTA.
[0007] In summary, CTTA technology and the challenges it faces in pseudo-labeling pose new requirements for the continuous adaptation and robustness of current deep learning models in practical deployments. Designing effective pseudo-label filtering strategies to overcome the problems caused by low-quality pseudo-labels in long-term CTTA applications is one of the important directions of current research. Summary of the Invention
[0008] To address this issue, this invention provides an online domain change continuous learning method and system based on pseudo-label filtering, which solves the problem in the prior art that it is difficult to effectively filter low-quality pseudo-labels using a fixed threshold due to the lack of supervision information and the uncertainty of the target domain data distribution.
[0009] To address the aforementioned problems, embodiments of the present invention provide an online domain change continuous learning method based on pseudo-label filtering, the method comprising:
[0010] Acquire source data and a pre-trained model, use the pre-trained model to predict the source data, and generate pseudo-labels;
[0011] Based on binary classification, a lemma for threshold-based pseudo-label filtering in online domain change continuous learning is derived, and threshold setting principles in online domain change continuous learning are designed based on the lemma.
[0012] The principles for setting thresholds in continuous learning of online domain changes include:
[0013] Principle 1: Considering that a high threshold may lead to a low sampling rate and slow convergence speed, a low initial threshold related to the number of categories should be adopted;
[0014] Principle 2: Given the fluctuations in model confidence, use the exponential moving average of the confidence level based on each training time step as the intra-domain baseline confidence estimate, and use the exponential decay algorithm to adjust the inter-domain threshold τ. t To maintain β and τ t The positive correlation between them, where β is a positive parameter reflecting the model's learning state;
[0015] Principle 3: Given that different categories may show closer category centroids during continuous domain changes, set a fine threshold for pseudo-label filtering, calculate the expected prediction value of the model for each category to estimate the confidence of a given category, and adjust the threshold accordingly.
[0016] The design uses a threshold setting principle to filter out false labels with low confidence in model predictions, while introducing a class prior alignment method to encourage fair predictions of samples in the unknown domain.
[0017] The filtered pseudo-labels are used to update and optimize the model, resulting in classification predictions in continuous learning of online domain changes.
[0018] Preferably, a lemma for threshold-based filtering of pseudo-labels in continuous learning of online domain changes is derived based on binary classification, specifically including:
[0019] For any target domain in the continuous target domain adaptation process Consider a binary classification problem where the true distribution is an even mixture of two Gaussian distributions, meaning the pseudo-label Y can also be positive (+1) or negative (-1). Input... It has the following conditional distribution:
[0020] In the formula, N(,) represents the conditional distribution, i.e., the Gaussian distribution; μ1 and μ2 represent the mean. X represents the variance; X represents the true data category.
[0021] pass Calculate the confidence score, where β is a positive parameter reflecting the model's learning state, which gradually changes during training as the model's confidence increases or decreases; x represents a sample; s(x) represents the confidence score.
[0022] In the scenario where a fixed threshold τ∈(1 / 2,1) is used to generate pseudo-labels, if s(x)>τ, then sample x is assigned a pseudo-label of +1; if s(x)<1-τ, then sample x is assigned a pseudo-label of -1; if 1-τ≤(x)≤τ, then sample x is assigned a pseudo-label of 0.
[0023] The probability distribution of the pseudo-label Y is as follows: P(Y=0)=1-P(Y=1)-P(Y=-1);
[0024] In the formula, φ(·) is the cumulative distribution function of a standard normal distribution; P(·) represents the probability.
[0025] Preferably, the method of using a low initialization threshold related to the number of categories is as follows:
[0026] In the formula, τ0(c) represents the low initialization threshold; c represents the category; and N represents the number of categories.
[0027] Preferably, given the fluctuations in model confidence, an exponential moving average of the confidence level based on each training time step is used as the intra-domain baseline confidence estimate, and an exponential decay algorithm is used to adjust the inter-domain threshold τ. t To maintain β and τ t The positive correlation between them specifically includes:
[0028] In the formula, ED(,) represents the exponential decay algorithm; EMA(·) represents the exponential moving average; t represents the training time step; λ∈(0,1) is the momentum decay of EMA; α is the ED factor; Q represents the pre-trained model f θ (·) is an abbreviation for predictions after strong data enhancement; Represents the mathematical expectation; Where B represents the batch size and b represents the number of samples in the batch.
[0029] Preferably, the expected prediction value of the model for each category is calculated to estimate the confidence level of a given category, and the threshold is adjusted accordingly, specifically including:
[0030] In the formula, p t (c) is a list containing all class thresholds;
[0031] The final set pseudo-label threshold τ t (c) as follows:
[0032] Preferably, a prior alignment approach is introduced to encourage fair predictions of samples in the unknown domain by the model, specifically including:
[0033] Let the distribution in the pseudo-labels be the expectation of the model's predictions for unlabeled data, and use the histogram distribution U(C) and the strong augmented data ratio R between the expected probability and the probability distribution. Q Ratio of weakly augmented data to R q For each prediction Q and q on the unlabeled data, normalization is performed to calculate the loss weight for each sample to offset the negative impact of imbalance. The calculation formula is as follows:
[0034] in
[0035] In the formula, q represents the pre-trained model f θ (·) Abbreviation for predictions after weak enhancement; Hist B (·) represents a histogram; U(C) Q , Let represent the histogram distributions of strong and weak reinforcement, respectively; C represents the set of categories;
[0036] Loss during the nth iteration The class prior alignment is expressed as:
[0037] In the formula, Normalize(·) represents the normalization operation, which normalizes the prediction proportion weights in the batch to ensure that the sum of normalized probabilities is 1.0. Class prior alignment encourages the allocation of greater weights to predictions with fewer pseudo-labels and smaller weights to predictions with more pseudo-labels, thereby mitigating the prediction imbalance problem.
[0038] Preferably, the filtered pseudo-labels are used to update and optimize the model, and the model's target loss... for:
[0039] In the formula, 1(·>τ) is the thresholding index function based on confidence level; The loss is symmetric cross-entropy.
[0040] Model's task loss for:
[0041] In the formula, w u and w c Represent and The loss weight.
[0042] This invention also provides an online domain change continuous learning system based on pseudo-label filtering. This system is used to implement the above-mentioned online domain change continuous learning method based on pseudo-label filtering, specifically including:
[0043] The data preparation and pseudo-label generation module is used to acquire source data and pre-trained models, use the pre-trained models to predict the source data, and generate pseudo-labels.
[0044] The threshold setting principle design module is used to derive a lemma for threshold-based filtering of pseudo-labels in continuous learning of online domain changes based on binary classification, and to design the threshold setting principle in continuous learning of online domain changes based on the lemma.
[0045] The principles for setting thresholds in continuous learning of online domain changes include:
[0046] Principle 1: Considering that a high threshold may lead to a low sampling rate and slow convergence speed, a low initial threshold related to the number of categories should be adopted;
[0047] Principle 2: Given the fluctuations in model confidence, use the exponential moving average of the confidence level based on each training time step as the intra-domain baseline confidence estimate, and use the exponential decay algorithm to adjust the inter-domain threshold τ.t To maintain β and τ t The positive correlation between them, where β is a positive parameter reflecting the model's learning state;
[0048] Principle 3: Given that different categories may show closer category centroids during continuous domain changes, set a fine threshold for pseudo-label filtering, calculate the expected prediction value of the model for each category to estimate the confidence of a given category, and adjust the threshold accordingly.
[0049] The pseudo-label filtering and class prior alignment module is used to filter pseudo-labels with low confidence in model prediction by using the designed threshold setting principle, and at the same time, it encourages the model to make fair predictions for samples in the unknown domain by introducing a class prior alignment method.
[0050] The model update and optimization module is used to update and optimize the model using the filtered pseudo-labels to obtain classification prediction results in online domain change continuous learning.
[0051] This invention also provides an electronic device, which includes a processor, a memory, and a bus system. The processor and the memory are connected through the bus system. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to implement the online domain change continuous learning method based on pseudo-label filtering described above.
[0052] This invention also provides a computer storage medium storing a computer software product, the computer software product including several instructions for causing a computer device to execute the above-described online domain change continuous learning method based on pseudo-label filtering.
[0053] As can be seen from the above technical solutions, this invention application has the following beneficial effects:
[0054] (1) This invention proposes an innovative adaptive threshold setting method, which dynamically adjusts the filtering threshold of pseudo-labels by considering the number of categories, the fluctuation of model confidence, and the characteristics of categories in continuous domain changes. This method effectively solves the problems of low sampling rate and slow convergence speed that may be caused by high thresholds, while ensuring the quality of pseudo-labels. The adaptive threshold setting not only improves the robustness of the model, but also enables it to better adapt to the environment of online domain changes.
[0055] (2) This invention introduces exponential moving average (EMA) and exponential decay (ED) strategies to evaluate and adjust the confidence level of unlabeled data. This strategy ensures a positive correlation between the threshold and the model confidence level, allowing the threshold to automatically adjust as the model's learning state changes. This method improves the accuracy and efficiency of pseudo-label filtering, enabling the model to continuously learn and optimize during online domain changes.
[0056] (3) This invention also proposes a class-balanced regularization objective and a class prior alignment method to encourage the model to generate different predictions across all classes. This method addresses the issue of class centroids approaching each other during continuous domain transitions, reducing error accumulation caused by continuous domain shifts. Simultaneously, the class prior alignment method encourages the model to make fair predictions for samples in unknown domains, further improving the quality of pseudo-labels and the model's robustness. This comprehensive approach enables the model to maintain stable performance and continue learning even when facing complex online domain transitions. Attached Figure Description
[0057] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the embodiments will be briefly described below. Referring to the accompanying drawings will provide a clearer understanding of the features and advantages of the present invention. The drawings are illustrative and should not be construed as limiting the present invention in any way. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort. Wherein:
[0058] Figure 1 is a flowchart of an online domain change continuous learning method based on pseudo-label filtering provided in the embodiment;
[0059] Figure 2 is a flowchart of the pseudo-label filtering in this invention;
[0060] Figure 3 is a flowchart of the adaptive threshold in the CTTA process of this invention;
[0061] Figure 4 shows the effect of the class prior alignment method used in the embodiment on the bi-monthly dataset;
[0062] Figure 5 is a comparison chart of the quality and quantity of pseudo-labels between the present invention and other advanced methods in the embodiments;
[0063] Figure 6 is a block diagram of an online domain change continuous learning system based on pseudo-label filtering provided in the embodiment. Detailed Implementation
[0064] 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.
[0065] Example 1
[0066] Before delving into the specific implementation of the computational method of this invention, we first need to clarify several basic concepts in deep learning algorithms, which are crucial for understanding the innovation of this invention.
[0067] First, Continuous Online Testing and Learning (COLT) is a learning approach for addressing real-world challenges. In reality, the training and testing data for models often do not come from the same distribution, a phenomenon known as domain shift. For example, a model might be trained on images taken during the day but needs to be tested on images taken at night. Traditional domain adaptation methods rely on acquiring target domain data before testing for adaptive training, which is impractical in many real-world applications because target domain data may only be available at the time of testing and may continuously change. Therefore, COLT aims to enable models to continuously adapt to new and changing data distributions during testing.
[0068] Secondly, pseudo-label filtering learning is an effective strategy for addressing the problem of scarce labeled data. In many practical applications, obtaining large amounts of precisely labeled data is both expensive and time-consuming, while unlabeled data is relatively easy to obtain. To fully utilize this unlabeled data, semi-supervised and self-supervised learning methods have emerged. Pseudo-labels are a key technique in these methods; they utilize a pre-trained model to predict unlabeled data and use these predictions as pseudo-labels. Subsequently, these pseudo-labels, along with labeled data, are used for further training of the model, thereby improving its performance. However, the quality of pseudo-labels varies, and directly using all pseudo-labels may lead to a decline in model performance. Therefore, pseudo-label filtering learning emphasizes selecting high-quality pseudo-labels during training to improve the effectiveness of learning and the robustness of the model.
[0069] In summary, the method of this invention is based on the ideas of continuous online test learning and pseudo-label filtering learning, aiming to design a continuous learning method that can adapt to changes in data distribution online and effectively filter pseudo-labels to improve model performance.
[0070] As shown in Figure 1, this embodiment of the invention proposes an online domain change continuous learning method based on pseudo-label filtering, which includes:
[0071] Step S1: Obtain source data and pre-trained model, use the pre-trained model to predict the source data, and generate pseudo-labels;
[0072] Step S2: Based on binary classification, derive the lemma for threshold-based pseudo-label filtering in continuous learning of online domain changes, and design the threshold setting principle in continuous learning of online domain changes based on the lemma;
[0073] The principles for setting thresholds in continuous learning of online domain changes include:
[0074] Principle 1: Considering that a high threshold may lead to a low sampling rate and slow convergence speed, a low initial threshold related to the number of categories should be adopted;
[0075] Principle 2: Given the fluctuations in model confidence, use the exponential moving average of the confidence level based on each training time step as the intra-domain baseline confidence estimate, and use the exponential decay algorithm to adjust the inter-domain threshold τ. t To maintain β and τ t The positive correlation between them, where β is a positive parameter reflecting the model's learning state;
[0076] Principle 3: Given that different categories may show closer category centroids during continuous domain changes, set a fine threshold for pseudo-label filtering, calculate the expected prediction value of the model for each category to estimate the confidence of a given category, and adjust the threshold accordingly.
[0077] Step S3: Filter out false labels with low confidence in model prediction using the designed threshold setting principle, and encourage the model to make fair predictions for samples in the unknown domain by introducing a class prior alignment method.
[0078] Step S4: Update and optimize the model using the filtered pseudo-labels to obtain the classification prediction results in continuous learning of online domain changes.
[0079] As can be seen from the above technical solution, this invention proposes an online domain change continuous learning method based on pseudo-label filtering, which significantly improves the robustness and adaptability of the model under continuous domain changes. Through a finely designed threshold setting principle combined with a class prior alignment method, this invention effectively identifies and retains high-quality pseudo-labels, while dynamically adjusting the threshold to adapt to changes in the model's learning state. This ensures that the model can continuously learn and optimize in complex and ever-changing online environments, thereby achieving more stable and accurate classification predictions in the field of computer vision.
[0080] In step S1, source data and a pre-trained model are obtained, the pre-trained model is used to predict the source data, and pseudo-labels are generated.
[0081] In this embodiment, in step S2, a lemma for threshold-based filtering of pseudo-labels in continuous learning of online domain changes is derived based on binary classification, and a threshold setting principle in continuous learning of online domain changes is designed based on the lemma.
[0082] Specifically, in continuous target domain adaptation, this invention applies existing source data. The pre-trained model is parameterized, where and It consists of the dataset and the corresponding label set. After good training, the goal of continuous target domain adaptation is to respond to the constantly changing target domain during the testing phase. This is achieved without accessing any source data. The invention accomplishes this by dynamically filtering pseudo-labels, where the pseudo-labels are generated by a pre-trained model f. θ (·) was generated online. For ease of later description of the equations, we use Q and q to represent the model f. θ (·) is an abbreviation for predictions after strong and weak data enhancement.
[0083] For any target domain in the continuous target domain adaptation process Consider a binary classification problem where the true distribution is an even mixture of two Gaussian distributions, meaning the pseudo-label Y can also be positive (+1) or negative (-1). Input... It has the following conditional distribution:
[0084] In the formula, N(,) represents the conditional distribution, i.e., the Gaussian distribution; μ1 and μ2 represent the mean. X represents the variance; X represents the true data category.
[0085] pass Calculate the confidence score, where β is a positive parameter reflecting the model's learning state, which gradually changes during training as the model's confidence increases or decreases; x represents a sample; and s(x) represents the confidence score.
[0086] In a scenario where a fixed threshold τ∈(1 / 2,1) is used to generate pseudo-labels, if s(x)>τ, then sample x is assigned a pseudo-label of +1; if s(x)<1-τ, then sample x is assigned a pseudo-label of -1; if 1-τ≤(x)≤τ, then sample x is assigned a pseudo-label of 0.
[0087] The probability distribution of the pseudo-label Y is as follows: P(Y=0)=1-P(Y=1)-P(Y=-1);
[0088] In the formula, φ(·) is the cumulative distribution function of a standard normal distribution; P(·) represents the probability.
[0089] Furthermore, based on the lemma design, the threshold setting principles in continuous learning of online domain changes specifically include:
[0090] Principle 1 (Low Initialization): Considering that a high threshold may lead to a low sampling rate and slow convergence speed, a low initialization threshold related to the number of categories is adopted.
[0091] Specifically, based on the principle of low initialization, this invention addresses the issues of low sampling rate and slow convergence speed that high thresholds may cause by proposing a low initialization threshold setting method closely related to the number of categories. Specifically, considering that the utilization rate of high-quality data (1-P(Y=0)) is directly affected by the threshold τ, as τ increases, the data utilization rate decreases accordingly. Especially in the testing phase, if the β value is small, using a high threshold will further limit the sampling rate and convergence speed. Therefore, this invention emphasizes using a relatively small initialization threshold to improve efficiency, and experiments have verified that multiple low thresholds can effectively improve performance, although the results show diversity. Given the impracticality of adjusting the threshold in the testing phase, this invention ultimately chooses a low initialization strategy related to the number of categories to set the threshold τ, which is both simple and effective, ensuring efficient data utilization and rapid algorithm convergence.
[0092] One method that uses a low initialization threshold related to the number of categories is:
[0093] In the formula, τ0(c) represents the low initialization threshold; c represents the category; and N represents the number of categories.
[0094] Principle 2 (Positively Correlated with Model Confidence): Given the fluctuations in model confidence, an exponential moving average of the confidence level based on each training time step is used as the intra-domain baseline confidence estimate, and an exponential decay algorithm is used to adjust the inter-domain threshold τ. t To maintain β and τ t The positive correlation between them ensures the stability of the sampling rate during changes in the online domain, where β is a positive parameter reflecting the model's learning state, specifically including:
[0095] In the formula, ED(,) represents the exponential decay algorithm; EMA(·) represents the exponential moving average; t represents the training time step; λ∈(0,1) is the momentum decay of EMA; α is the ED factor; Q represents the pre-trained model f θ (·) is an abbreviation for predictions after strong data enhancement; Represents the mathematical expectation; Where B represents the batch size and b represents the number of samples in the batch.
[0096] Specifically, principle two focuses on the positive correlation between model confidence and threshold adjustment to address the challenges posed by changes in the online domain. Given the volatility of model confidence during training, this invention innovatively employs the exponential moving average (EMA) of confidence at each training time step as a stable estimate of the intra-domain base confidence. Simultaneously, to maintain β (a positive parameter reflecting the model's learning state) and the inter-domain threshold τ... t To address the positive correlation between them, this invention introduces an exponential decay (ED) algorithm to dynamically adjust τ. t This ensures that the sampling rate remains stable despite fluctuations in sample distribution and domain changes. This strategy effectively addresses the issue of fluctuating utilization of high-quality data (1-P(Y=0)) due to inconsistent model confidence levels within and between domains. In particular, during the adaptation process of continuous target domains, by adaptively adjusting the threshold, it avoids the situation of incorrectly filtering a large number of high-quality pseudo-labels due to a fixed threshold, thereby improving the adaptability and performance of the model.
[0097] Principle 3 (Impact of Class Differentiation on Threshold): Given that different classes may exhibit closer class centroids during continuous domain variations, a fine-grained threshold is set for pseudo-label filtering. The expected prediction value of the model for each class is calculated to estimate the confidence level of a given class, and the threshold is adjusted accordingly. Specifically, this includes:
[0098] In the formula, p t (c) is a list containing all class thresholds.
[0099] The final set pseudo-label threshold τ t (c) as follows:
[0100] Specifically, Principle 3 emphasizes the importance of setting fine-grained thresholds for different categories in scenarios with continuous domain variations for pseudo-label filtering. Given that different categories may exhibit closer class centroids in a dynamic target domain due to domain bias, this increases the risk of unlabeled samples being mispredicted. To address this challenge, this invention proposes to accurately estimate the confidence level of a given category by calculating the expected prediction value of the model for each category c, and dynamically adjust the threshold accordingly. Experimental results show that using multiple thresholds for pseudo-label filtering, while stabilizing the number of fluctuations in pseudo-label quality, actually increases the overall number. This indicates that fine-grained threshold settings can more effectively adapt to the diversity between categories and their potential adjacency relationships, thereby improving the utilization rate of high-quality data (1-P(Y=0)) while ensuring sample availability, especially when class centroids are close, reducing losses due to misprediction. Therefore, the core of Principle 3 lies in distinguishing the impact of categories on thresholds and optimizing the pseudo-label filtering process through fine-grained threshold settings.
[0101] In step S3, the designed threshold setting principle is used to filter out false labels with low model prediction confidence, while a class prior alignment method is introduced to encourage the model to make fair predictions for samples in the unknown domain. (See Figures 2 and 3.)
[0102] When setting the threshold according to Principle 3, class diversity is ignored, meaning that different classes exhibit different domain transfers due to varying learning difficulties. This invention further proposes Class Prior Alignment (CPA) to encourage a more uniform distribution of pseudo-labels across different classes. Let the distribution of pseudo-labels be the expectation of the model's predictions for unlabeled data. This invention uses the ratio R of strongly augmented data between the histogram distribution U(C) and the expected probability. Q Ratio of weakly augmented data to R q For each prediction Q and q on the unlabeled data, normalization is performed to calculate the loss weight for each sample to offset the negative impact of imbalance, as follows:
[0103] in
[0104] In the formula, q represents the pre-trained model f θ (·) Abbreviation for predictions after weak enhancement; Hist B (·) represents a histogram; U(C) Q , Let represent the histogram distributions of strong and weak reinforcement, respectively; C represents the set of categories;
[0105] Loss during the nth iteration The class prior alignment is expressed as:
[0106] In the formula, Normalize(·) represents a normalization operation that normalizes the prediction weights in a batch, ensuring that the sum of the normalized probabilities is 1.0. Class prior alignment encourages assigning greater weights to predictions with fewer pseudo-labels and less weights to predictions with more pseudo-labels, thereby mitigating the prediction imbalance problem.
[0107] As can be seen from Figure 4, this method can better distinguish class boundaries on bi-monthly datasets.
[0108] In step S4, the filtered pseudo-labels are used to update and optimize the model, yielding the classification prediction results in continuous learning of online domain changes, as shown in Figure 5. The model's target loss... for:
[0109] In the formula, 1(·>τ) is the thresholding index function based on confidence level; This is the symmetric cross-entropy loss.
[0110] Model's task loss for:
[0111] In the formula, w u and w c Represent and The loss weights. This invention utilizes and It balances the information gaps in the neural network, thereby reducing classification errors.
[0112] To verify the advantages of the method of the present invention, the following explanation is based on experiments.
[0113] Dataset and Source Model (Pre-trained Model) Setup: This invention evaluates the robustness of machine learning models to corruption and perturbation in input data using three benchmark datasets (CIFAR-10-C, CIFAR-100-C, and ImageNet-C) in the field of image processing. CIFAR-10-C and CIFAR-100-C extend the original CIFAR-10 and CIFAR-100 datasets, respectively, containing 32x32 color images from 10 and 100 classes, and introducing 15 different corruption types, each applied to the test images at 5 severity levels, generating 10,000 test images for each dataset. ImageNet-C extends the ImageNet dataset, applying 15 corruption types to its validation images. All datasets are used to test the model's performance when faced with various corruption and perturbation conditions. This invention strictly adheres to CTTA settings, does not directly access source data, and evaluates multiple comparative experimental models online, including Cotta, TENT, AdaContrast, and DSS. These models are all evaluated based on a maximum damage severity level of five. During the evaluation process, model predictions are generated before being adapted to the current test stream. To ensure the breadth and impartiality of the evaluation, this invention uses standard pre-trained WideResNet, ResNeXt-29, and ResNet-50 as source models for each dataset.
[0114] By utilizing adaptive thresholding for pseudo-label filtering, this invention successfully reduced the average error on CIFAR100-C and ImageNet-C from 32.5% to 30.1%, and from 66.8% to 59.4%, compared to Cotta. To further investigate the effectiveness of this invention on baselines, its adaptation performance on ImageNet-C was also evaluated for 10 different sequences. Compared to Cotta, the average error reduction was 3% for more than 10 different sequences, indicating that the method of this invention is more robust to the order of the target structural domain sequences. The experimental results are shown in Tables 1, 2, and 3.
[0115] Table 1 Experimental results on the CIFAR10-C dataset
[0116] Table 2 Experimental Results of CIFAR100-C Dataset
[0117] Table 3 Experimental results on the ImageNet-C dataset
[0118] Example 2
[0119] As shown in Figure 6, this invention provides an online domain change continuous learning system based on pseudo-label filtering. This system is used to implement the online domain change continuous learning method based on pseudo-label filtering in Embodiment 1 above, and specifically includes:
[0120] The data preparation and pseudo-label generation module 100 is used to acquire source data and pre-trained models, use the pre-trained models to predict the source data, and generate pseudo-labels.
[0121] The threshold setting principle design module 200 is used to derive the lemma for threshold-based filtering of pseudo-labels in continuous learning of online domain changes based on binary classification, and to design the threshold setting principle in continuous learning of online domain changes based on the lemma.
[0122] The principles for setting thresholds in continuous learning of online domain changes include:
[0123] Principle 1: Considering that a high threshold may lead to a low sampling rate and slow convergence speed, a low initial threshold related to the number of categories should be adopted;
[0124] Principle 2: Given the fluctuations in model confidence, use the exponential moving average of the confidence level based on each training time step as the intra-domain baseline confidence estimate, and use the exponential decay algorithm to adjust the inter-domain threshold τ. t To maintain β and τ t The positive correlation between them, where β is a positive parameter reflecting the model's learning state;
[0125] Principle 3: Given that different categories may show closer category centroids during continuous domain changes, set a fine threshold for pseudo-label filtering, calculate the expected prediction value of the model for each category to estimate the confidence of a given category, and adjust the threshold accordingly.
[0126] The pseudo-label filtering and class prior alignment module 300 is used to filter pseudo-labels with low confidence in model prediction by using the designed threshold setting principle, and at the same time, it encourages the model to make fair predictions of samples in the unknown domain by introducing a class prior alignment method.
[0127] The model update and optimization module 400 is used to update and optimize the model using the filtered pseudo-labels to obtain classification prediction results in continuous learning of online domain changes.
[0128] This embodiment provides an online domain change continuous learning system based on pseudo-label filtering, used to implement the aforementioned online domain change continuous learning method based on pseudo-label filtering. Therefore, the specific implementation of the online domain change continuous learning system based on pseudo-label filtering can be found in the previous section on the implementation of the online domain change continuous learning method based on pseudo-label filtering. For example, the data preparation and pseudo-label generation module 100, the threshold setting principle design module 200, the pseudo-label filtering and class prior alignment module 300, and the model update and optimization module 400 are respectively used to implement steps S1, S2, S3, and S4 in the aforementioned online domain change continuous learning method based on pseudo-label filtering. Therefore, its specific implementation can be referred to the descriptions of the corresponding embodiments. To avoid redundancy, further details are omitted here.
[0129] Example 3
[0130] This invention also provides an electronic device, which includes a processor, a memory, and a bus system. The processor and the memory are connected through the bus system. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to implement the online domain change continuous learning method based on pseudo-label filtering described above.
[0131] Example 4
[0132] This invention also provides a computer storage medium storing a computer software product, the computer software product including several instructions for causing a computer device to execute the above-described online domain change continuous learning method based on pseudo-label filtering.
[0133] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0134] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more flowchart illustrations and / or one or more block diagrams.
[0135] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.
[0136] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A continuous online domain change learning method based on pseudo-label filtering, characterized in that, include: Acquire source data and a pre-trained model, use the pre-trained model to predict the source data, and generate pseudo-labels; Based on binary classification, a lemma for threshold-based pseudo-label filtering in online domain change continuous learning is derived, and threshold setting principles in online domain change continuous learning are designed based on the lemma. The threshold setting principles in the design of continuous learning of online domain changes include: Principle 1: Considering that a high threshold may lead to a low sampling rate and slow convergence speed, a low initial threshold related to the number of categories should be adopted; Principle 2: Given the fluctuations in model confidence, use the exponential moving average of the confidence level based on each training time step as the intra-domain baseline confidence estimate, and use the exponential decay algorithm to adjust the inter-domain threshold τ. t To maintain β and τ t The positive correlation between them, where β is a positive parameter reflecting the model's learning state; Principle 3: Given that different categories may show closer category centroids during continuous domain changes, set a fine threshold for pseudo-label filtering, calculate the expected prediction value of the model for each category to estimate the confidence of a given category, and adjust the threshold accordingly. The design uses a threshold setting principle to filter out false labels with low confidence in model predictions, while introducing a class prior alignment method to encourage fair predictions of samples in the unknown domain. The filtered pseudo-labels are used to update and optimize the model, resulting in classification predictions in continuous learning of online domain changes.
2. The online domain change continuous learning method based on pseudo-label filtering according to claim 1, characterized in that, The lemma derived from binary classification for threshold-based pseudo-label filtering in continuous learning of online domain changes specifically includes: For any target domain in the continuous target domain adaptation process Consider a binary classification problem where the true distribution is an even mixture of two Gaussian distributions, meaning the pseudo-label Y can also be positive (+1) or negative (-1). Input... It has the following conditional distribution: In the formula, N(,) represents the conditional distribution, i.e., the Gaussian distribution; μ1 and μ2 represent the mean. X represents the variance; X represents the true data category. pass Calculate the confidence score, where β is a positive parameter reflecting the model's learning state, which gradually changes during training as the model's confidence increases or decreases; x represents a sample; s(x) represents the confidence score. In the scenario where a fixed threshold τ∈(1 / 2,1) is used to generate pseudo-labels, if s(x)>τ, then sample x is assigned a pseudo-label of +1; if s(x)<1-τ, then sample x is assigned a pseudo-label of -1; if 1-τ≤(x)≤τ, then sample x is assigned a pseudo-label of 0. The probability distribution of the pseudo-label Y is as follows: P(Y=0)=1-P(Y=1)-P(Y=-1); In the formula, φ(·) is the cumulative distribution function of a standard normal distribution; P(·) represents the probability.
3. The online domain change continuous learning method based on pseudo-label filtering according to claim 1, characterized in that, The method of using a low initialization threshold related to the number of categories is as follows: In the formula, τ0(c) represents the low initialization threshold; c represents the category; and N represents the number of categories.
4. The online domain change continuous learning method based on pseudo-label filtering according to claim 3, characterized in that, Given the fluctuations in model confidence, an exponential moving average of the confidence based on each training time step is used as the intra-domain baseline confidence estimate, and an exponential decay algorithm is used to adjust the inter-domain threshold τ. t To maintain β and τ t The positive correlation between them specifically includes: In the formula, ED(,) represents the exponential decay algorithm; EMA(·) represents the exponential moving average; t represents the training time step; λ∈(0,1) is the momentum decay of EMA; α is the ED factor; Q represents the pre-trained model f θ (·) is an abbreviation for predictions after strong data enhancement; Represents the mathematical expectation; Where B represents the batch size and b represents the number of samples in the batch.
5. The online domain change continuous learning method based on pseudo-label filtering according to claim 4, characterized in that, The model calculates the expected prediction value for each category to estimate the confidence level for a given category, and adjusts the threshold accordingly. Specifically, this includes: In the formula, p t (c) is a list containing all class thresholds; The final set pseudo-label threshold τ t (c) as follows:
6. The online domain change continuous learning method based on pseudo-label filtering according to claim 5, characterized in that, By introducing a prior-alignment approach, the model is encouraged to make fair predictions for samples in the unknown domain. Specifically, this includes: Let the distribution in the pseudo-labels be the expectation of the model's predictions for unlabeled data, and use the histogram distribution U(C) and the strong augmented data ratio R between the expected probability and the probability distribution. Q Ratio of weakly augmented data to R q For each prediction Q and q on the unlabeled data, normalization is performed to calculate the loss weight for each sample to offset the negative impact of imbalance. The calculation formula is as follows: in In the formula, q represents the pre-trained model f θ (·) Abbreviation for predictions after weak enhancement; Hist B (·) represents a histogram; U(C) Q , Let represent the histogram distributions of strong and weak reinforcement, respectively; C represents the set of categories; Loss during the nth iteration The class prior alignment is expressed as: In the formula, Normalize(·) represents the normalization operation, which normalizes the prediction proportion weights in the batch to ensure that the sum of normalized probabilities is 1.
0. Class prior alignment encourages the allocation of greater weights to predictions with fewer pseudo-labels and smaller weights to predictions with more pseudo-labels, thereby mitigating the prediction imbalance problem.
7. The online domain change continuous learning method based on pseudo-label filtering according to claim 6, characterized in that, The model is updated and optimized using the filtered pseudo-labels; the model's target loss... for: In the formula, 1(·>τ) is the thresholding index function based on confidence level; The loss is symmetric cross-entropy. Model's task loss for: In the formula, w u and w c Represent and The loss weight.
8. An online domain change continuous learning system based on pseudo-label filtering, characterized in that, The system is used to implement the online domain change continuous learning method based on pseudo-label filtering as described in any one of claims 1 to 7, specifically including: The data preparation and pseudo-label generation module is used to acquire source data and pre-trained models, use the pre-trained models to predict the source data, and generate pseudo-labels. The threshold setting principle design module is used to derive a lemma for threshold-based filtering of pseudo-labels in continuous learning of online domain changes based on binary classification, and to design the threshold setting principle in continuous learning of online domain changes based on the lemma. The threshold setting principles in the design of continuous learning of online domain changes include: Principle 1: Considering that a high threshold may lead to a low sampling rate and slow convergence speed, a low initial threshold related to the number of categories should be adopted; Principle 2: Given the fluctuations in model confidence, use the exponential moving average of the confidence level based on each training time step as the intra-domain baseline confidence estimate, and use the exponential decay algorithm to adjust the inter-domain threshold τ. t To maintain β and τ t The positive correlation between them, where β is a positive parameter reflecting the model's learning state; Principle 3: Given that different categories may show closer category centroids during continuous domain changes, set a fine threshold for pseudo-label filtering, calculate the expected prediction value of the model for each category to estimate the confidence of a given category, and adjust the threshold accordingly. The pseudo-label filtering and class prior alignment module is used to filter pseudo-labels with low confidence in model prediction by using the designed threshold setting principle, and at the same time, it encourages the model to make fair predictions for samples in the unknown domain by introducing a class prior alignment method. The model update and optimization module is used to update and optimize the model using the filtered pseudo-labels to obtain classification prediction results in online domain change continuous learning.
9. An electronic device, characterized in that, The electronic device includes a processor, a memory, and a bus system. The processor and the memory are connected through the bus system. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to implement the online domain change continuous learning method based on pseudo-label filtering as described in any one of claims 1 to 7.
10. A computer storage medium, characterized in that, The computer storage medium stores a computer software product, which includes several instructions for causing a computer device to execute the online domain change continuous learning method based on pseudo-label filtering as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Wheat scab spore detection method based on semi-supervised learning
CN116821698A
Target domain data processing method, device and equipment based on context awareness
CN117726887A
Training method for semi-supervised learning model, image processing method, and device
US20230196117A1
Percentile-based pseudo-label selection for multi-label semi-supervised classification
US20240071056A1
Cited By
Cross-process analog integrated circuit parameter reverse design method, device and medium
CN122088438A
Multi-source remote sensing scene classification method based on dynamic sample selection
CN122223451A