Data Augmentation with Diffusion for Open-Set Semi-Supervised Learning

Authors: sunghyun  ban
heesan  kong
kee-eung  kim
Venue: NeurIPS_cc_2024_Conference
Published: 2024-05-15 13:25:04

Abstract: Semi-supervised learning (SSL) seeks to utilize unlabeled data to overcome the limited amount of labeled data and improve model performance. However, many SSL methods typically struggle in real-world scenarios, particularly when there is a large number of irrelevant instances in the unlabeled data that do not belong to any class in the labeled data. Previous approaches often downweight instances from irrelevant classes to mitigate the negative impact of class distribution mismatch on model training. However, by discarding irrelevant instances, they may result in the loss of valuable information such as invariance, regularity, and diversity within the data. In this paper, we propose a data-centric generative augmentation approach that leverages a diffusion model to enrich labeled data using both labeled and unlabeled samples. A key challenge is extracting the diversity inherent in the unlabeled data while mitigating the generation of samples irrelevant to the labeled data. To tackle this issue, we combine diffusion model training with a discriminator that identifies and reduces the impact of irrelevant instances. We also demonstrate that such a trained diffusion model can even convert an irrelevant instance into a relevant one, yielding highly effective synthetic data for training. Through a comprehensive suite of experiments, we show that our data augmentation approach significantly enhances the performance of SSL methods, especially in the presence of class distribution mismatch.

Main paper: 
 introduction: 
 Deep neural networks (DNNs), trained using a large amount of labeled datasets, have shown to achieve remarkable performance in a variety of supervised learning tasks, such as image classification (LeCun et al., 2015; Krizhevsky et al., 2017) and object detection (Everingham et al., 2010; Lin et al., 2014) . Nonetheless, the intensive labor of annotating vast datasets often renders the construction of sufficiently large labeled datasets prohibitively expensive for numerous applications (Oliver et al., 2018) . To address this, semi-supervised learning (SSL) (Chapelle et al., 2009) has emerged as a viable approach, which aims to leverage abundant unlabeled data to overcome the limited availability of labeled data.Recent progress in SSL has made many noteworthy advancements, including techniques such as pseudo-labeling (Lee, 2013; Pham et al., 2021) , consistency regularization (Sajjadi et al., 2016; Tarvainen & Valpola, 2017; Sohn et al., 2020) , and entropy minimization (Grandvalet & Bengio, 2004; Miyato et al., 2018; Berthelot et al., 2019) . However, a common limitation of these methods is their reliance on the critical assumption that both unlabeled and labeled data instances are drawn Figure 1 : Transforming unlabeled data using a diffusion model. Initially, the unlabeled data includes classes like trees, fish, and mountains, which are irrelevant to the labeled data's classes such as trucks, cars, and ships. The reverse process with class conditioning resolves this mismatch while preserving the diversity of the original unlabeled samples. More examples can be found in Appendix H. from an identical distribution. This often leads to significant performance degradation when there is a class distribution mismatch, as noted in Oliver et al. (2018) . Given that real-world settings often deviate from this assumption (Guo et al., 2020) , it becomes crucial to address the class distribution mismatch for successfully applying SSL in realistic scenarios.A prevalent approach to mitigate the class distribution mismatch in SSL involves selectively utilizing unlabeled data through a weighting function which serves to reduce the influence of irrelevant unlabeled samples (Chen et al., 2020; Guo et al., 2020) . While these filtering methods are intuitively appealing and have shown their effectiveness in mitigating negative effect of the class distribution mismatch, they may result in the loss of valuable information such as invariance, regularity, and diversity within the data: even though the labeled data contains only white trucks, could we generate images of red trucks using the red bike images in the unlabeled dataset?In this paper, we propose a generative data augmentation approach that leverages a diffusion model to enrich labeled data using both labeled and unlabeled samples. A key challenge lies in utilizing the diversity of the unlabeled data to compensate the limited amount of labeled data, while minimizing the generation of samples that are irrelevant to the classes in the labeled dataset. To address this, we integrate diffusion model training with a discriminator that evaluates the relevance of each unlabeled instance. The discriminator's resulting score is used to assign weights to unlabeled instances, allowing those with higher relevance to contribute more significantly to the training of the diffusion model.In addition, drawing inspiration from the approach in Meng et al. (2022) , we add noise to each unlabeled sample and utilize them as guide images during the data generation process. As depicted in Figure 1 , we found that incorporating class conditions into this generation process can transform possibly irrelevant unlabeled samples into labeled samples while preserving key characteristics of the original unlabeled samples (e.g., outline, color arrangement, shape, etc.).Our extensive experimental results, utilizing CIFAR-10, CIFAR-100 (Krizhevsky & Hinton, 2009) , ImageNet-30 (Deng et al., 2009) , and ImageNet-100 (Cao et al., 2022) datasets with six baseline methods, demonstrate that our approach further improves the performance of recent SSL methods, especially under the class distribution mismatch. 
standard semi-supervised learning: 
 Semi-Supervised Learning (SSL) aims to leverage both labeled and unlabeled data to mitigate issues related to the scarcity and high annotation cost of labeled data. Since many SSL methods operate under the assumption that labeled and unlabeled data are sampled from an identical distribution, we refer to this as the standard SSL setting. Among the various approaches to the standard SSL setting, we briefly review two of the most representative methods: pseudo-labeling and consistency regularization.Pseudo-labeling (Scudder, 1965; McLachlan, 1975; Lee, 2013) is a technique where the modelpredicted labels of the unlabeled data are treated as if they were true labels. Essentially, this method simply converts unlabeled data into labeled data. On the other hand, consistency regularization (Bachman et al., 2014) has become a crucial component in recent SSL regimes. This approach applies data augmentation on the unlabeled data to regularize the model to yield similar outputs for augmented views of the same instance (Sajjadi et al., 2016; Laine & Aila, 2017; Sohn et al., 2020) .However, these methods often fail when there is a mismatch between the distributions of labeled and unlabeled data. In some cases, their performance may be even worse than simply discarding all the unlabeled data (Oliver et al., 2018) . The primary source of the problem is the presence of unlabeled instances that do not belong to any of the classes present in the labeled data, which we refer to as out-of-distribution (OOD) instances. They may exacerbate confirmation bias (Arazo et al., 2020) in pseudo-labeling approaches or intensify the overconfidence problem in consistency regularization approaches (Chen et al., 2020) .The open-set SSL setting refers to the practical yet challenging scenario where the class distributions of labeled and unlabeled dataset differ significantly. A prevalent solution to the class distribution mismatch is to filter out OOD instances from the unlabeled dataset. To achieve this, it is necessary to accurately identify them, despite the absence of label information. Uncertainty-Aware Self-Distillation (UASD), proposed by Chen et al. (2020) , formulates temporally ensembled networks and utilizes ensemble prediction to quantify predictive uncertainty of labels to identify OOD instances. DS3L (Guo et al., 2020) adopts a meta-learning approach to selectively use unlabeled data that enhances generalization performance. OpenMatch (Saito et al., 2021) leverages one-vs-all classifiers as the OOD detector to filter out OOD instances. Safe-Student (He et al., 2022) employs teacherstudent mechanism and introduces energy-discrepancy, a new scoring function for detecting OOD instances. The above methods follow the detect-and-filter paradigm, which is the dominant approach of open-set SSL, assuming that OOD instances are fundamentally harmful.In contrast to these detect-and-filter approaches, several studies share similar goals to ours, aiming to harness the potential of OOD unlabeled data rather than simply discarding them. T2T (Huang et al., 2021) incorporates a warm-up training step using OOD instances to perform a self-supervised pretext task for learning effective discriminative features. TOOR (Huang et al., 2022) introduces a weighting mechanism to evaluate the transferability of each OOD instance based on domain similarity and class tendency, and uses adversarial domain adaptation to align the feature distributions of transferable OOD instances and in-distribution (ID) instances. Fix-A-Step (Huang et al., 2023) leverages OOD instances to obtain useful data augmentation to promote diversity of training data, and integrate this idea into MixMatch (Berthelot et al., 2019) . IOMatch (Li et al., 2023) takes into consideration that the OOD detector may be unreliable, particularly when labeled data are scarce. It instead employs a multi-binary classifier to produce unified open-set pseudo-labels for labeled and unlabeled data, including OOD instances.Our approach significantly deviates from these open-set SSL methods. It is primarily centered on developing an effective data augmentation strategy from both labeled and unlabeled data, which can be used to transform an unlabeled OOD instance into a labeled ID instance.In this section, we provide a detailed comparison of DWD with diffusion-based methods, namely DPT (You et al., 2023) and DA-Fusion1 (Trabucco et al., 2024) .DPT is a simple yet effective method that integrates diffusion models into SSL. To generate semantically accurate images, they trained a semi-supervised classifier on partially labeled real images and used it to assign pseudo-labels for all the data. Subsequently, they trained a conditional diffusion model using the pseudo-labels to synthesize images and then re-trained the semi-supervised classifier using these generated images. However, they still rely on the fundamental assumption behind the standard SSL setting. When faced with mismatch in class distributions, they suffer from the confirmation bias in pseudo labels of OOD unlabeled images and become ineffective. In contrast, our approach addresses the class distribution mismatch by integrating the discriminator into the training of the diffusion model. DA-Fusion is a data augmentation method that utilizes a large pretrained text-to-image diffusion model (i.e., Stable Diffusion, Rombach et al., 2022) . Similar to ours, it also initiates the reverse process with partially noised real images rather than generating images from scratch. However, the purpose of the generation process is distinctly different from that of our approach. While DA-Fusion aims to augment given labeled samples with subtle visual details already contained in the pretrained diffusion model, our method properly trains a diffusion model to capture both the labeled data distribution and the diversity of unlabeled samples from the given datasets, and transforms irrelevant unlabeled samples into labeled ones. 
preliminaries: 
 Diffusion models (Sohl-Dickstein et al., 2015) incrementally add Gaussian noises to the data during its forward process and progressively removes this noise during the reverse process to reconstruct the original data. Given a data point x 0 , the forward process is defined as a Markov chain that produces a sequence of noisy samples x 1 , ..., x T according to a variance schedule β 1 , ..., β T :EQUATIONThe forward process exhibits a notable property in that x t at any arbitrary time step t ∈ {1, ..., T } can be obtained in closed form:EQUATIONwhere α t = 1 -β t , ᾱt = t i=1 α i and ϵ ∼ N (0, I). As the reverse process can be expressed using the same functional form when β t is sufficiently small (Feller, 1949; Sohl-Dickstein et al., 2015) , the reverse process is also defined as a Markov chain with learned Gaussian transitions starting at p(x T ) = N (x T , 0, I):p θ (x t-1 |x t ) := N (x t-1 ; µ θ (x t , t), Σ θ (x t , t)), p θ (x 0:T ) := p(x T ) T t=1 p θ (x t-1 |x t ) (3)Denoising Diffusion Probabilistic Models (DDPMs) Ho et al. (2020) propose to use a simplified Gaussian distribution parameterization of the reverse process, which sets Σ θ to time-dependent constants and reparameterizes the mean function approximator µ θ (x t , t) with noise predictor ϵ θ (x t , t) which predicts ϵ in (2). The reverse process is then learned by the following objective:EQUATIONFor the conditional DDPM, the primary modification is the incorporation of conditions c (such as classes or texts) as an additional input, expressed as ϵ θ (x t , c, t). This adaptation allows the diffusion model to take into account specific conditions or attributes during the reverse process, thereby enhancing its applicability to more targeted scenarios.Positive-Unlabeled (PU) Learning (Liu et al., 2002; Li & Liu, 2003; Du Plessis et al., 2015; Kiryo et al., 2017 ) is a binary classification task in a situation where negative labels are missing. It aims to train models using positive-labeled and unlabeled data to perform binary classification. The main idea involves indirectly estimating the model loss on negative samples using the class prior. Given that unlabeled data are drawn from p u (x) = µ p + (x) + (1 -µ) p -(x), where µ = p(Y = 1) is the class prior and p + (x) = p(x | Y = 1) and p -(x) = p(x | Y = -1) are positive and negative class-conditional densities, the loss can be reformulated as:EQUATIONHere, ℓ denotes a loss function and g represents the model.  
methodology: 
 In this section, we introduce our data augmentation method, which leverages a diffusion model to generate synthetic data to address the scarcity of labeled data. As previously discussed, we start with training the diffusion model on labeled and unlabeled data while mitigating the class distribution mismatch. Subsequently, we employ the reverse diffusion process to transform unlabeled samples into synthesized labeled samples.A simple training scheme for SSL data The diffusion model trained only on the labeled data will inevitably overfit and merely generate replications due to their limited amount. It is thus essential to train the diffusion model on both labeled and unlabeled data, while taking advantage of the label information. We adopt a class-conditional diffusion model, shown in Figure 2 , where labeled data are used for conditional training while unlabeled data are used for unconditional training, trained with the lossEQUATIONwhere α serves as a hyper-parameter that controls balance between labeled and unlabeled data, D l and D u represent labeled and unlabeled datasets. Intuitively, this straightforward objective aims to train the diffusion model to reconstruct not only the limited labeled data but also the abundant unlabeled data, thereby regularizing the model against overfitting to the labeled data. It is noteworthy that this approach shares similarities with the consistency regularization technique in the sense that the unlabeled data are utilized for regularization purposes.Discriminator However, when we train the diffusion model with the loss in ( 6), OOD unlabeled samples can have a negative impact on capturing important characteristics of the labeled data distribution. These samples should be made contribute less towards the overall training loss. In line with aforementioned filtering methods (Chen et al., 2020; Guo et al., 2020) , we leverage a discriminator to weigh the unlabeled data instances. The discriminator is tasked with differentiating between positive samples that are closely aligned with the distribution of labeled data and negative samples that are irrelevant. To train the discriminator, we adopt PU learning with the training lossEQUATIONwhere d ϕ denotes the discriminator parameterized by ϕ, and µ represents the ratio of positive samples among unlabeled samples, i.e. belonging to one of the classes in the labeled dataset. This ratio can either be estimated from the dataset (Menon et al., 2015; Jain et al., 2016; Christoffel et al., 2016) or treated as a hyperparameter.We then use the discriminator to assign weights on the unlabeled instances so that they align with the distribution of labeled data. A simple algebraic manipulation tells us that the following weight formula yields an unbiased loss estimation via importance sampling:Algorithm 1 Discriminator-Weighted Diffusion (DWD) -Training Input Labeled dataset D l and unlabeled dataset D u .Parameter Learning rate η θ , η ϕ , hyper-parameter µ, α, and total number of iterations K θ , K ϕ .Either pretrain the diffusion model ϵ θ on D u or acquire an off-the-shelf pretrained diffusion model. # Train the discriminator d ϕ using objective (7):for n = 0, 1, 2, ..., K ϕ do Sample a batch of data x l ∼ D l and x u ∼ D u . ϕ ← ϕ -η ϕ ∇ ϕ µ • E x l [-log d ϕ (x l ) + log (1 -d ϕ (x l ))] + E x u [-log (1 -d ϕ (x u))] end for # Finetune the diffusion model ϵ θ using the discriminator d ϕ and weighting function w from (8):for n = 0, 1, 2, ..., K θ do Sample a batch of data (x l , c) ∼ D l and x u ∼ D u . θ ← θ -η θ ∇ θ E x l ,t,ϵ [||ϵ θ (x l t , c, t) -ϵ|| 2 2 ] + α • E x u ,t,ϵ [w(x u ) • ||ϵ θ (x u t , t) -ϵ|| 2 2 ] end for Output Learned diffusion model ϵ θ and learned discriminator d ϕ .Proposition 4.1. Given an optimal discriminator d * , using the following importance weight on unlabeled data yields an unbiased estimation of the loss function with respect to the labeled data distribution:EQUATIONFor a detailed proof, please refer to Appendix A. The final training loss for the diffusion model then becomes:EQUATIONThe overall training scheme, referred to as Discriminator-Weighted Diffusion (DWD), is outlined in Algorithm 1.After training the diffusion model, a straightforward approach to generating synthetic data would be to start the reverse diffusion process from Gaussian noise. In our methodology, however, we begin the reverse process using a partially noised image of an unlabeled instance. As we will show in Section 5.3, we found that this approach leads to additional performance gains. It successfully transforms an OOD instance into an in-distribution sample while preserving some important characteristics in the original sample (see Figure 1 ). Thus we can exploit the diversity present in the unlabeled data when generating synthetic in-distribution data. The procedure is detailed in Algorithm 2 in the Appendix B.We can think of two usage scenarios for the samples generated from the diffusion model: we could take the samples as pseudo-labeled synthetic data to enrich the labeled data and employ a fully supervised learning method, or take the samples as a transformed unlabeled data by discarding the class conditions and employ an SSL method. In the latter case, we expect that the SSL method will perform better, since the class distribution mismatch has been mitigated. 
experiments: 
 To assess the effectiveness of DWD, we conduct experiments across a broad set of tasks in two settings.(1) DWD-SL: a fully supervised learning setting where the unlabeled dataset is converted to a pseudo-labeled dataset by replacing the instances with their transformations along with their class conditions as target labels; and (2) DWD-UT: an SSL setting where the unlabeled dataset is replaced by the transformed unlabeled samples and employ the baseline SSL method.Tasks The SixAnimal task Oliver et al. (2018) uses CIFAR-10 dataset to classify six animal classes (bird, cat, deer, dog, frog, and horse). Following the setup in Huang et al. (2023) , we sampled 400 images per class for the labeled dataset and included up to 4100 images per class in the unlabeled dataset. To investigate the impact of class distribution mismatch, we varied the mismatch percentage Table 1 : Performance comparison on four tasks. We report the mean accuracy averaged over three seeds, along with standard error. Top scores for each task are highlighted. ζ in the composition of the unlabeled dataset. For example, when ζ = 75%, the unlabeled dataset contains three non-animal classes and one animal classes. We refer Appendix C for further details on the composition of the unlabeled dataset.The CIFAR-10/100 task uses CIFAR-10 as the labeled dataset, and CIFAR-100 as the unlabeled dataset. While the whole CIFAR-100 was taken as the unlabeled dataset, we sampled 100 images per class from CIFAR-10 to simulate the scarce labeled data scenario. Notably, class labels in CIFAR-10 and CIFAR-100 do not exactly overlap, though there are similarities (e.g., "horse" in CIFAR-10 and "cattle" in CIFAR-100). Thus, this task complements the SixAnimal task, which had an exact class overlap between labeled and unlabeled data.The ImageNet-30 task uses the ImageNet-30 dataset Hendrycks et al. (2019) , which is a subset of ImageNet limited to 30 classes. Following Saito et al. (2021) , we selected 5% of the data from the first 20 classes (approximately 50 samples per class) based on the alphabetical ordering of class names for the labeled dataset, and used the remaining data as the unlabeled dataset.The ImageNet-100 task uses ImageNet-100 dataset, which sub-sampled 100 classes from ImageNet, as described in Cao et al. (2022) . We divided these classes equally into 50% ID and 50% OOD classes following alphabetical order. From each ID class, we selected a small portion (10%) as labeled data with the remaining data forming the unlabeled dataset. This task assesses the effectiveness on higher-resolution images with a greater diversity of classes. Please refer to Appendix D for extensive results under various sizes of labeled dataset.Baseline SSL methods Since we use DWD to transform the unlabeled dataset into a dataset devoid of class distribution mismatch, we comprehensively consider as baseline SSL methods those which operate under the standard setting as well as the open-set setting. The baseline SSL methods under the standard setting are MixMatch (Berthelot et al., 2019) , FixMatch (Sohn et al., 2020) , and Meta Pseudo Labels (MPL) (Pham et al., 2021) , and the methods under the open-set setting are OpenMatch (Saito et al., 2021) , Fix-A-Step (Huang et al., 2023) , and IOMatch (Li et al., 2023) .Table 1 reports the comparative performance of DWD-SL against various baseline SSL methods. The results clearly demonstrate that DWD-SL substantially surpasses the performance of methods for standard SSL. This suggests that DWD successfully captures both the inherent distribution of the labeled data and the diversity of the unlabeled data, yielding highly effective synthetic labeled data for training.Notably, DWD-SL even achieves competitive or superior results relative to open-set SSL methods. This advantage stems from DWD-SL's ability to transform the diversity of unlabeled data into labeled samples, rather than using this diversity merely as a form of regularization, as seen in baseline SSL methods. For further implementation details, please refer to Appendix C.Table 2 and Table 3 show the impact of DWD-UT on the performances of the baseline SSL methods.From the results, we can confirm that DWD-UT effectively addresses the performance degradation caused by the class distribution mismatch. Notably, the most significant improvement was observed in the MPL method. Given that MPL is based on pseudo-labeling, this result indicates that DWD-UT effectively mitigates the confirmation bias associated with pseudo-labeling of OOD instances in the unlabeled dataset.Figure 3 shows how performance degrades over the range of ζ in the SixAnimal task. We can clearly see that using DWD-UT makes SSL methods generally robust to the degree of class distribution mismatch, even though they operate under the assumption that there are no OOD instances in the unlabeled data. It is also notable that DWD-UT frequently outperforms DWD-SL, indicating a synergistic effect between DWD-UT and baseline SSL methods. This may be attributed the underlying data selection mechanism in the SSL methods (e.g. thresholding used in pseudo-labeling, weighting function in filtering-based methods), which also contribute to selectively strengthen the impact of synthetic data.Additionally, to provide direct evidence of DWD-UT's effectiveness in reducing the class distribution mismatch, we compute the minimum distance between each unlabeled data sample and the class centroids of labeled data in the latent space. We refer Appendix E for the results.We carried out a series of ablation studies on DWD-UT, assessing different training schemes for the diffusion model and varying noise levels for perturbing seed images. For these studies, we employed MPL as the baseline SSL method.Table 4 shows the results of ablation studies conducted on different training schemes for the diffusion model. Several observations can be drawn from these results. Firstly, the utilization of the discriminator to filter or reduce the weight of OOD instances culminates in a rather marginal performance improvement. Secondly, the incorporation of the diffusion model to generate synthetic data contributes to a substantial performance surge above the baseline, even when fine-tuned solely with the labeled data. This suggests that transforming irrelevant unlabeled data is more effective than simply filtering them out. Lastly, the extra step of fine-tuning the diffusion model with the unlabeled dataset and applying discriminative weighting also offers a nontrivial advantage.Table 5 shows the variations in performance with different noise levels during the data transformation process. The results indicate that introducing a moderate level of noise (t = 600 ∼ 800) to the unlabeled data during the forward diffusion process, as opposed to initiating from pure Gaussian noise (t = 1000), enhances performance. Therefore, it can be inferred from these findings that the efficacy of DWD-UT is contingent upon the balance between the level of noise and the information contained in the unperturbed data. We remark that the optimal noise level can differ among data instances. While we fixed the noise level to t = 600 in our experiments for simplicity, determining the noise level individually for each sample presents a potential avenue for future research.We conducted further experiments on the ImageNet-30 task to compare the performance of DWD with those of DPT and DA-Fusion. To ensure fairness in comparison, we equalized the implementation of the model structure, data generation process, and the number of augmented data. As shown in Table 6 , both DPT and DA-Fusion have demonstrated effectiveness, yet their performance falls short compared to that of DWD. This is because DPT, assuming no distribution shift, sometime generates wrongly labeled synthetic images due to the confirmation bias in pseudo labeld of OOD unlabeled images, and DA-Fusion only augments given labeled samples with subtle visual details (Please refer to Appendix I for examples). In contrast, DWD synthesizes new labeled samples by transforming diverse unlabeled data, successfully resolving the distribution mismatch.We also conducted additional experiments to analyze computational costs, investigate the effect of the number of generated data, and assess hyper-parameter sensitivity. For detailed experimental results and analysis, please refer to Appendix F. 
conclusion: 
 In this paper, we highlighted the potential of diffusion models for addressing class distribution mismatch in SSL. We introduced Discriminator-Weighted Diffusion (DWD), a semi-supervised training scheme that leverages a discriminator to identify OOD instances within the unlabeled data, facilitating effective training of the diffusion model. Our qualitative and quantitative results demonstrate that DWD captures both the characteristics of labeled data and the diversity of unlabeled data.Notably, DWD exhibits a unique capability to convert irrelevant samples into relevant ones, making it compatible with other SSL methods and illustrating the orthogonality of our approach. Our extensive experiments show that DWD significantly enhances SSL performance in scenarios with class distribution mismatch. We hope that DWD will inspire future research focused on addressing distribution mismatch from a data-centric perspective.A Derivation for Proposition 4.1Problem setting. We consider the two-sample problem setting of PU learning (Ward et al., 2009; Niu et al., 2016) . The discriminator d(x) aims to solve a binary classification problem to classify input data x into negative or positive class y. Let X ∈ R d and Y ∈ {-1, +1} denote the input and output random variables, p(x, y) be the joint probability density function of (X, Y ), andp + (x) = p(x | Y = +1), p -(x) = p(x | Y = -1) be the positive and negative conditional probability density functions respectively. The labeled and unlabeled data are assume to be sampled from p + (x) and p(x) = µ p + (x) + (1 -µ) p -(x) respectively, where µ = p(Y = +1) is class prior.Proof. The goal of the discriminator can be formulated as maximizing following objectiveEQUATIONFirst order optimality condition givesEQUATIONRearranging ( 11), we can easily show that the optimal discriminator d * (x) satisfiesEQUATIONSubstituting ( 12) to (8), we haveEQUATIONFinally, we can use w(x) as importance weights becauseE x0∼p(x) [w(x 0 )||ϵ θ (x t , t) -ϵ|| 2 2 ] = p + (x 0 ) p(x 0 ) p(x 0 )||ϵ θ (x t , t) -ϵ|| 2 2 dx = E x0∼p + (x) [||ϵ θ (x t , t) -ϵ|| 2 2 ] (14) 
safeguards: 
 Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)? 
new assets: 
 Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets? Answer: [Yes] Justification: We provide open source repository that is well documented. Guidelines:• The answer NA means that the paper does not release new assets.• Researchers should communicate the details of the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc. • The paper should discuss whether and how consent was obtained from people whose asset is used. • We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution. • For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review. 
 
 Appendix: The data generation process is detailed in Algorithm 2. In our experiments, we generate one image per unlabeled image. For the impact of the number of generated data, please refer to Appendix F. We chose to generate images before the classification task, rather than during each batch iteration of training the classification models. Additionally, while we described the sampling process in DDPM style, DPM-Solver2 (Lu et al., 2022) is utilized in implementation for computational efficiency.Algorithm 2 DWD -Image-Seeded Generation Input Unlabeled data x u and diffusion model ϵ θ . Parameter Time step t. Sample Gaussian noise: ϵ ∼ N (0, I) Forward diffusion process to time step t:x u t = √ ᾱt x u + (1 -ᾱt )ϵ Randomly select class condition c. # Reverse diffusion process starting at x u t : for i = t, t -1, ..., 1 do z ∼ N (0, I) if i > 1 else z = 0 x u i-1 = 1 √ αi x u i -1-αt √ 1-ᾱi ϵ θ (x u i , c, i) + √ β i z end for Output Transformed data x u0 and class condition cDiffusion model and discriminator. For all experiments, we use official implementation of latent diffusion model (Rombach et al., 2022) , which is publicly available3 . Since latent diffusion models perform diffusion processes in the embedded latent space, there is a trade-off between computational cost and generation quality depending on the downsampling factor f Rombach et al. (2022) . Therefore, we adjust f based on dataset scale: f = 2 for small-scale datasets and f = 8 for large-scale datasets. The batch sizes for labeled and unlabeled data, denoted as B l and B u respectively, are set to B l = 16, B u = 112 for small-scale datasets, and B l = 4, B u = 12 for large-scale datasets. We follow the Rombach et al. (2022) for other configuration such as learning rate, optimizer, scheduler, etc. After the pre-training phase, we train the models for 200K iterations for Cifar-10, and 1M iterations for ImageNet. For the discriminator, we employ the ResNet-18 He et al. ( 2016) followed by 2 MLP layers. We train the discriminator using AdamW Loshchilov & Hutter ( 2019) optimizer with 0.0002 initial learning rate and 0.0001 weight decay. We treat µ as a hyper-parameter, and set it within {0.25, 0.33, 0.5}. Another hyper-parameter α, which control the balance between labeled and unlabeled, we set 5 in all tasks.Common configuration for DWD-SL and DWD-UT. To ensure fair evaluation, task-specific settings were established for both DWD-SL and DWD-UT. For tasks associated with Cifar-10, the Wide ResNet-28-2 architecture Zagoruyko & Komodakis ( 2016)) was employed, with training conducted using the AdamW optimizer at an initial learning rate of 0.03 across 256 epochs 1,024 iterations per epoch. In the ImageNet-30 task, we follow the settings from Saito et al.( 2021) and Li et al.(2023) . Specifically, we employed the ResNet-18 architecture He et al. (2016) , and train for 100 epochs with 1,024 iterations per epoch using AdamW 0.1 initial learning rate.DWD-SL specific configuration. In all DWD-SL tasks, we maintained a 1:1 ratio between labeled and unlabeled samples within each batch. More specifically, we set B l = B u = 64 for SixAnimal and Cifar-10/100, and B l = B u = 32 for ImageNet-30. We applied RandAugment Cubuk et al. (2020) , widely used in the SSL field to achieve robust results, to both original labeled and DWD-SL data. Additionally, we applied label smoothing to the cross-entropy loss, following the approach used in MPL Pham et al. (2021) . The starting time step t for the reverse diffusion process was set to 600.DWD-UT specific configuration. For SixAnimal and Cifar-10/100 tasks, we used B l = 64 and B u = 448, while for ImageNet-30, we used B l = 32 and B u = 32. Since ImageNet-30 includes out-of-distribution (OOD) classes in the test set while standard SSL methods inherently cannot identify OOD classes, we removed OOD samples from the test set for a fair comparison. Additionally, IOMatch evaluates the performance using balanced accuracy, which classifies all OOD classes as a additional single class. This could also be an unfair comparison. Therefore, we evaluated only on the closed set for all tasks. Except aforementioned, we follow their papers for method-specific hyper-parameters and setting.Unlabeled data composition in SixAnimal with varying ζ. We configure the SixAnimal task exactly following Chapelle et al. ( 2009), Huang et al. (2023) . The Table 7 shows the composition of labeled / unlabeled set of SixAnimal task according to mismatch percentage (ζ). Different mismatch ratios of ID and OOD classes in the SixAnimal task. As shown in Figure 3 of our paper, we conducted experiments on the SixAnimal task across various ratios of ID and OOD classes (ζ = 50%, 75%, 100%). To extend these findings, we included additional experiments with a lower mismatch ratio, ζ = 25%. Since DWD is designed to address class distribution mismatch, its effectiveness is expected to decrease as the mismatch ratio lowers. However, we observed that DWD was still able to improve the baseline method in the ζ = 25% case, although the performance gain was relatively diminished. Varying the size of labeled data in the ImageNet-100 task. To broaden our evaluation, we conducted additional experiments on the ImageNet-100 dataset, varying the amount of labeled data. Specifically, we used either 10% or 30% of each ID class as labeled data, with the remaining samples forming the unlabeled set. As shown in Table 9 , DWD remains effective with different amounts of labeled data, demonstrating strong performance at both 10% and 30% sampling ratios. Notably, the performance gain is more pronounced at the 10% sampling ratio, as the advantages of data augmentation become clearer with smaller datasets. However, DWD's effectiveness may be constrained when labeled data is extremely limited, as the diffusion model may struggle to accurately represent the labeled data distribution. This limitation is also observed in other generative augmentation methods. We extract features (labeled, original unlabeled, transformed unlabeled) from four datasets using a pre-trained ResNet-50. The features were normalized, and the pair-wise Euclidean distances between each unlabeled sample and the nearest class centroid is visualized using Gaussian Kernel Density Estimation (KDE). As shown in Figure 4 , the minimum distances successfully decrease after DWD's data transformation. This result indicates that using DWD to transform unlabeled data does more than just make it look similar to labeled data; it also makes the data semantically similar in the latent space, showing a deeper level of similarity beyond just appearance. Computational cost analysis. The main limitation of our work is the additional computation required by incorporating the diffusion model. On the CIFAR-10/100 task, we measured the wall-clock times and memory consumption for each stage of DWD: pretraining, finetuning (including discriminator training), and sampling. We compare the computation costs with standard SSL methods, and the results are reported in Table 10 . The additional computation for DWD is not overly burdensome compared to the baselines. It is worth noting that while we include pretraining costs for completeness, these can be omitted when off-the-shelf pre-trained diffusion models are available. [Machine specification] GPU : NVIDIA GeForce RTX 3090 Ti, CPU :Intel(R) Core(TM) i9-10980XEEffect of the number of generated data. We conducted additional experiments using DWD-SL on the Cifar-10/100 task, varying the number of generated data denoted as N. The results are summarized in the Table 11 . Here, N = 60K corresponds to the original setting in the paper where one synthetic labeled sample per one unlabeled sample is generated. We observed further improvement at N = 120K, with a slight deterioration thereafter. Note that a similar trend was previously reported in Figure 7 (c) of Appendix G in You et al. (2023) . A reasonable explanation for the performance deterioration is that an excessive value of N could cause the classifier to be dominated by synthetic data, thereby neglecting real data, as suggested by You et al. (2023) . Hyper-parameters sensitivity. We conducted additional experiments on the SixAnimal task (ζ=75%) using DWD-SL to assess DWD's sensitivity to the hyper-parameters. Again, α serves as weight to control the balance between labeled and unlabeled data (Eq. 9) and µ is treated as positive sample ratio of unlabeled data to train discriminator (Eq. 7) in our training scheme. We observed that a wide range of α and µ values successfully outperform most of the baselines (refer to Table 1 in our paper). Regarding α, an extremely small value may cause the diffusion model training to focus excessively on the labeled data, failing to reflect the diversity of the unlabeled data and potentially leading to overfitting. Conversely, an extremely large value may cause the training to skew towards the unlabeled data, failing to properly capture the labeled data distribution. In our experiments, an α value around 3 achieves an appropriate trade-off. Regarding µ, the optimal value is near the true ratio 1 -ζ, as expected. I Generated Images from DPT and DA-Fusion Justification: There is no direct path to any negative application. Guidelines:• The answer NA means that there is no societal impact of the work performed.• If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact. • Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations. • The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster. • The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology. • If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML).Justification: There is no high risk for misuse.Guidelines:• The answer NA means that the paper poses no such risks.• Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters. • Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images. • We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort.12. Licenses for existing assets Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?Answer: [Yes] Justification: We cited the original paper that produced the dataset, and provided URL and license of the existing code we used.Guidelines:• The answer NA means that the paper does not use existing assets.• The authors should cite the original paper that produced the code package or dataset.• The authors should state which version of the asset is used and, if possible, include a URL. • The name of the license (e.g., CC-BY 4.0) should be included for each asset.• For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided. • If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswithcode.com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset. • For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided. • If this information is not available online, the authors are encouraged to reach out to the asset's creators.Although DA-Fusion is not a SSL algorithm, we include it as a supervised learning baseline due to its methodological similarity in utilizing image-to-image generation process.https://github.com/LuChengTHU/dpm-solver, MIT Licensehttps://github.com/CompVis/latent-diffusion, MIT License 


Decision: This paper focuses on the problem of open-set semi-supervised learning, where there is a large number of irrelevant instances in the unlabeled data that do not belong to any class in the labeled data. To solve the open-set semi-supervised learning problem, this paper proposes a data-centric generative augmentation approach that leverages a diffusion model to enrich labeled data using both labeled and unlabeled samples. Comprehensive experimental results demonstrate the effectiveness of the proposed approach.

After the authors' rebuttal, all the reviewers gave positive ratings to this paper (i.e., 3 x Weak Acceptance) and recognized that the proposed approach is novel and the performance is satisfactory. Therefore, I recommend accepting this paper as a poster presentation.

Please include the additional experimental results of the SixAnimal task and the ImageNet-100 task in the final version to further improve this paper.

Reviews: review: paper_summary: paper_summary: This paper proposes DWD, a new OSSL method that trains a diffusion model to transform OOD unlabeled data to ID images for SSL. DWD can mitigate the class mismatch problem in the OSSL task, which affects SSL performance.
strength_weakness: strength_weakness: 1. The experimental results are expected to be more extensive, for instance, using 1) different ratios of ID and OOD classes and 2) different ratios of labeled and unlabeled data on the same dataset to verify the method’s effectiveness. Such settings are common in recent OSSL methods like [1,2]

2. DWD does not truly enable the model to distinguish between ID and OOD data; instead, it eliminates the OOD samples from the data. Thus, DWD cannot handle potential unseen OOD samples in real-world scenarios.

3. DWD relies on the ratio of OODs in the unlabeled dataset as the prior knowledge to train the discriminator. Such prior knowledge is not always available in real-world scenarios.

[1] Li Z, Qi L, Shi Y, et al. Iomatch: Simplifying open-set semi-supervised learning with joint inliers and outliers utilization, ICCV 2023

[2] Saito K, Kim D, Saenko K. Openmatch: Open-set consistency regularization for semi-supervised learning with outliers, NeurIPS 2021
questions: questions: For the two usage scenarios of generated data in Sec 4.2, the authors claim that the performance is better when it is served as unlabeled data. This slightly contradicts my intuition. If the generated data is reliable, why does removing labels for training result in better performance?
limitations: limitations: Please refer to the weakness.
paper_summary: paper_summary: The paper proposes an approach that leverages a diffusion model to enrich labeled data using both labeled and unlabeled samples to try to solve the traditional ssl method struggling in the real-world scenarios, i.e., a large number of irrelevant instances in the unlabeled data that do not belong to any class in the labeled data. Specifically, authors combine diffusion model training with a discriminator, and convert an irrelevant instance into a relevant one. Empirically, the data augmentation approach which is proposed by this paper significantly enhances the performance of SSL methods.
strength_weakness: strength_weakness: 1. There is a lack of analysis regarding the structure and training methods of the diffusion model networks, such as DiT and DDPM. Is DiT also effective for DWD-UT and DWD-SL?
2. The ImageNet-30 dataset is small. It remains to be verified whether the method can perform well in an open semi-supervised setting.
questions: questions: 1. As mentioned in Weakness 2, can the method be applied effectively to larger datasets?
2. Can this method be applied to other generative model, such as GAN, Flow?
3. How about the generation performance? can author evaluate the common generation metric such as FID, IS?
limitations: limitations: yes
paper_summary: paper_summary: This paper aims to address the challenge of utilizing unlabeled data in SSL, especially when there is a mismatch in class distributions between labeled and unlabeled data. The authors propose to leverage diffusion models to convert unlabeled data, especially out-of-distribution data, into in-distribution samples. Besides, a discriminator is jointly trained to filter out potentially irrelevant data. Experiments on image classification tasks show that the proposed method can greatly improve the performance of existing SSL methods, especially in scenarios with large class distribution mismatch.
strength_weakness: strength_weakness: 1. The use of diffusion models introduces significant computational costs compared to standard SSL methods. While this is acknowledged, a more detailed analysis of the trade-offs between performance gains and computational cost would be valuable.

2. More comparisons with related generative augmentation in SSL are needed. The paper only compares with the two closely-related work, DPT and DA-Fusion, on one dataset (ImageNet-30). Comparisons to advanced data augmentation techniques used in SSL on more datasets would provide more context.

3. The experiments are limited to relatively two~three small-scale datasets (The SixAnimal dataset is sampled from CIFAR10). It's unclear how well the approach would scale to larger, more complex datasets.

4. The paper focuses primarily on successful cases. A discussion of scenarios where DWD might not work well or potential limitations would provide a more balanced view.

5. While the discriminator is a key component, the presentation of the discriminator and the related positive-unlabeled learning is a bit confusing. More explanation on how the discriminator is trained and why the PU learning is adopted would be helpful. Also, have you considered alternative designs for the discriminator? 

6. The method introduces several hyper-parameters, such as the $\alpha$, $\mu$. A more thorough discussion or analysis of the sensitivity to these parameters would strengthen the paper.
questions: questions: 1. The computation cost for different generative augmentation methods can be varied. How do you ensure the comparisons are fair?
2. How does the number of labeled data affect the effectiveness of the proposed method?
limitations: limitations: Some limitations are discussed in Appendix.

Comments: title: Official Comment by Authors
Official Comment by Authors
Official Comment by Authors
Response to [Q1]
comment: Thank you very much for the score improvement and your constructive feedback. We will further polish the paper in the final revision. Thank you!
We're pleased to know that your concerns have been resolved.
We will integrate all the points we talked about with you into the updated manuscript.
We're glad to hear that your concerns have been addressed, and we sincerely appreciate your positive review! 
We will incorporate all the findings discussed with you into the revised manuscript.
I thank the authors for their detailed responses and efforts to conduct additional experiments. I am inclined to accept this paper.
I appreciate the author's rebuttal and the efforts made to address my concern. I have no other problems.
Thank you for your response. This addresses my main concerns. I am now inclined to accept this paper and have increased my score to a weak accept. I look forward to seeing the final version. good luck!
As you pointed out, even when the types of diffusion models and training processes are standardized, the total computational cost can vary across different generative augmentation methods. This is because each method includes unique auxiliary processes (e.g., training a classifier with partially labeled data, and extracting features in DPT, training a discriminator in DWD) in addition to the common computational costs associated with training the diffusion model.

To ensure that the additional processes introduced in DWD do not compromise the fairness of comparisons, we conducted supplementary experiments to measure the extra cost of DWD compared to the extra cost of DPT on the CIFAR-10/100 tasks. The results are as follows:

|                          | Diffusion model training | Extra cost of DWD | Extra cost of DPT |
|--------------------------|-------------|------------------------|----|
| **Elapsed time (Hours)** | 21.8        | 1.7                    |1.1|
| **Memory (GB)**          | 8.0         | 2.9                    |2.0|

[Machine specification] GPU : NVIDIA GeForce RTX 3090 Ti, CPU : Intel(R) Core(TM) i9-10980XE

The results showed that the increase in computational cost due to the additional processes in DWD was similar to that of DPT. Therefore, we can ensure that the fairness of the comparison is not compromised.

**References**

[A] Bao et al., “All are worth words: a vit backbone for score-based diffusion models”, NeurIPS, 2022. Workshop on Score-Based Methods. 

[B] Peebles et al., "Scalable diffusion models with transformers." ICCV, 2023.

[C] Li et al., “Max-margin deep generative models for (semi-) supervised learning”, IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017.

[D] Li et al., “Triple generative adversarial networks,” IEEE Transactions on Pattern Analysis and Machine Intelligence, 2021.

[E] K Cao et al., “OPEN-WORLD SEMI-SUPERVISED LEARNING.”, ICLR 2022.

[F] Chen et al., “Semi-supervised learning under class distribution mismatch“, AAAI, 2020.

[G] Huang et al., “They are not completely useless: Towards recycling transferable unlabeled data for class-mismatched semi-supervised learning”, IEEE Transactions on Multimedia, 2022.

[H] You et al., “Diffusion Models and Semi-Supervised Learners Benefit Mutually with Few Labels”, NeurIPS, 2023.