Unsupervised Learning for Class Distribution Mismatch
Authors: Pan Du
Wangbo Zhao
Xinai Lu
Nian Liu
Zhikai Li
Chaoyu Gong
Suyun Zhao
Hong Chen
Cuiping Li
Kai Wang
Yang You
Venue: ICML 2025 poster (2025)
Keywords: unsupervised learning
class distribution mismatch
machine learning
diffusion model
Primary area: general_machine_learning->unsupervised_and_semisupervised_learning
TL;DR: unsupervised learning for class distribution mismatch

Abstract: Class distribution mismatch (CDM) refers to the discrepancy between class distributions in training data and target tasks. Previous methods address this by designing classifiers to categorize classes known during training, while grouping unknown or new classes into an "other" category. However, they focus on semi-supervised scenarios and heavily rely on labeled data, limiting their applicability and performance. 
To address this, we propose Unsupervised Learning for Class Distribution Mismatch (UCDM), which constructs positive-negative pairs from unlabeled data for classifier training. Our approach randomly samples images and uses a diffusion model to add or erase semantic classes, synthesizing diverse training pairs. Additionally, we introduce a confidence-based labeling mechanism that iteratively assigns pseudo-labels to valuable real-world data and incorporates them into the training process. 
Extensive experiments on three datasets demonstrate UCDM’s superiority over previous semi-supervised methods. Specifically, with a 60\% mismatch proportion on Tiny-ImageNet dataset, our approach, without relying on labeled data, surpasses OpenMatch (with 40 labels per class) by 35.1%, 63.7%, and 72.5% in classifying known, unknown, and new classes.

Unsupervised Learning for Class Distribution Mismatch
Pan Du
Wangbo Zhao 92
Xinai Lu Nian Liu 4
Zhikai Li
Chaoyu Gong?
Suyun Zhao
Hong Chen'
Cuiping Li Kai Wang?
Yang You?
Abstract
(a)
SCDM
SCDM
UCDM
teeting faok training
wil
Class distribution mismatch (CDM) refers to the discrepancy between class distributions in training data and target tasks. Previous methods address this by designing classifiers categorize classes known during training, while grouping unknown or new classes into an "other" category. However, they focus on semi-supervised scenarios and heav- ily rely on labeled data, limiting their applicability and performance. To address this, we propose Unsupervised Learning for Class Distribution Mismatch (UCDM), which constructs positive- negative pairs from unlabeled data for classifier training. Our approach randomly samples images and uses diffusion model to add or erase se- mantic classes, synthesizing diverse training pairs. Additionally, we introduce a confidence-basee la- beling mechanism that iteratively assigns pseudo- labels to valuable real-world data and incorporates them into the training process. Extensive experi- ments on three datasets demonstrate UCDM's 's su- periority over previous semi- superviee methods. Specifically, with a 60% mismatch proportion on Tiny-ImageNer dataset, our approach, without re- lying on labeled data, surpasses OpenMatch (with 40 labels per class) by 35.1%, 63.7%, and 72.5% in classifying known, unknown, and new classes.
labsled
date
chese
closed-sel
open-set
known class
known class
unknown class
new class
accurazy (%)
+27.0
+15
+94 9
465
40
UASD (8CDM)))
cura (UCDM)
OpenhMrchh (SCIM))
Figure 1. (a) Examples of SSL for closed-set task (SCDMcT). open-set task (SCDM), and our proposed unsupervised learning for class distribution mismatch (UCDM), where no labels are used during training. (b) Accuracy of methods on closed-ser set open- set tasks. In the closed set task, samples are classified into known classes, while in the open-set task, they may classified as unified "other" class, including both unknown and new categories.
increasing attention in recent years. It tracks the practical problem where the class distribution of the available training dataset fails to align with the requirements of the target task (Yang et al., 2022; Fan et al., 2023; Ma et al., 2023).
Previous researches on CDM primarily concentrate on semi- supervised learning (SSL), which requires access to both la- beled and unlabeled data (Berthelot et al., 2019; Sohn et al., 2020). In this context, the categories present in the labeled data are referred to as known classes, while the unlabeled data contains not only the known classes but also additional unknown classes that are absent in the labeled data. As illustrated in Fig. (a), based on differences in the target tasks, these SSL methods fall into two groups: (i) The first group focuses on Closed-set Task (SCDMcT), where the goal is classify instances solely among the known classes present in the labeled data (Chen et al., 2020; Guo et al., 2020; Huang et al., 2021; Yang et al., 2022). Mainstream approaches typically tackle SCDMcT challenge by filter- ing out unknown categories from the unlabeled data, thus mitigating their negative influence. (ii) The second group extends SCDMeT the Open-set Task (SCDM), where the
1. Introduction
Class distribution mismatch (CDM) (Guo et al., 2020; Saito et al., 2021; Du et al., 2022; Li et al., 2023) has garnered
"Corresponding author School of Information, Renmin Univer- sity of China, and Engineering Research Center Database and Business Intelligence, MOF, China Naaiiona University of Singa- pore 'School of Agricultural Economics and Rural Development, Remmin University of China 'Independent Researcher Institute of Automation, Chinese Academy of Sciences. Correspondence to: Wangbo Zhao < <wangbo. zhao96 @ gmail. gmail.com>> Suyun Zhao <zhaosuyun @ ruc.edu..n>. Pan Du <du__an@@ 163.com>.
Proceedings of the ndnd International Conference Machine Learning. Vancouver, Canada. PMLR 267, 2025. Copyright 20255 by the author(s).

---

Unsupervised Learning for Class Distribution Mismatch
objective extends beyond classifying known classes also identifying unknown classes and any new categories that are absent from the labeled data unified "other" class during testing (Saito et al., 2021; Li et al., 2023). Methods in this category often employ one-vs-all classifiers to distinguish whether instances belong to known classes
Tiny-ImageNer with 60% mismatch proportion as shown in Fig. 1 (b), our approach outperforms UASD (Chen et al., 2020), SCDMcT method, by 27.0% on the closed-set task. For open-set tasks, our approach surpasses Open- Match (Saito et al., 2021), a classic SCDM method, by 5.0%, 91.4%, and 89.5% in the classification of known, unknown, and new classes, respectively. These results highlight the robustness of UCDM in both closed-set and open-set tasks, positioning it as a promising direction for advancing CDM.
However, the requirement for labeled data constrains both the application and performance of these approaches. First, their heavy reliance on labeled data renders them impractical in scenarios where ground truth labels are unavailable. This dependency necessitates significant human and financial costs and may even require domain-specific knowledge (Gi- daris et al., 2018: Zhang et al., 2023a). More importantly, training with limited labeled data restricts their performance to capture key features of known classes when extending SCDMer to open-set tasks, SCDM methods (Saito et al., 2021; Li et al., 2023). This is because they primarily train one-vs-all classifiers by treating labeled instances from a specific known class as positives and all other labeled in- stances as negatives. As a result, the model strugeles to dis- tinguish samples from unknown categories outside the data manifold, leading to unstable performance. As illustrated in Fig. 1 (b), on the open-set task of the Tiny-ImageNet (Deng et al., 2009) dataset, OpenMatch (Saito et al., 2021), a rep- resentative SCDM method, effectively classifies known- classes instances, while its performance for consolidating unknown and new classes into a unified "other" class is notably subpar. Hence, developing methods for open-set tasks without relying on ground truth labels imperative.
2. Related Work
2.1. SSL under Class Distribution Mismatch
SSL methods for class distribution mismatch can be di- vided into two branches: one addressing closed-set tasks (SCDMcT) and another tackling open-set tasks (SCDM).
SCDMcr methods train classifiers classify known-class instances by filtering unknown-class samples from un- labeled data. Prediction consistency is exploited by D (Guo et al., 2020), which identifies consistency loss discrepancies between augmented views, and UASD (Chen et al., 2020), which averages predictions from a temporally ensembled classifier. Confidence- -bsed methods, such as CCSSL (Yang et al., 2022) and SSB (Fan al., 2023), clas- sify instances with maximum probabilities below threshold as unknown. T2T (Huang et al., 2021) judge whether image embeddings align with pseudo-labels using a cross-modal matching model, while OSP (Wang et al., 2023) extend it by excluding unknown-class pixels from features.
To alleviate this problem, we introduce Unsupervised Learn- ing for Class Distribution Mismatch (UCDM), which op- erates without ground truth labels in the training data and utilizes only a predefined set of class names from known classes. In this context, we aim to construct positive- negative pairs for training the classifier without any hu- man annotation, adhering to the unsupervised learning setting (Goodfellow et al., 2016). First, we theoretically demonstrate that diffusion models (Ho et al., 2020) can erase semantic classes from images. Given an original image, this capability enables us to generate negative instances by re- moving the semantic class from the image, corresponding to the positive instances guided by class prompts. Subse- quently, through a confidence-basee based labeling mechanism, valuable real images are paired with the generated images to incorporate them into the training process. This approach ef- fectively mitigates the reliance on labeled data and provides a training framework to tackle the CDM problem.
SCDM methods classify known-elass instances while group- ing unknown or new-class instances into a unified "other" class. MTCF (Yu et al., 2020) trains detector to distinguish known from other classes. A prototype- based approach (Ma et al., 2023) builds prototypes for unknown-class instances using distance functions. OpenMatch (Saito et al., 2021) and IOMatch (Li et al., 2023) use multi- multi-binary classifiers trained in a one-vs-all manner, treating known-class instances as positives and others as negatives. Combining these outputs with a closed-set classifier generates probability distribu- tion over known and other classes.
However, the reliance on labeled data limits both the appli- cability and performance of these methods, while unsuper- vised learning settings remain unexplored.
2.2. Diffusion- Generation Methods
Image synthesis (Azizi et al., 2023; Dai et al., 2023; Tian et al., 2024) has gained significant attention due to the ability of diffusion models (Rombach et al., 2022; Ramesh et al., 2022; Saharia et al., 2022) to generate high-quality data.
Extensive experiments on diverse datasets, includ- ing CIFAR-10 (Krizhevsky et al., 2009), CIFAR- 100 (Krizhevsky et al., 2009), and Tiny-ImageNet (Deng al., 2009), demonstrate that our method achieves superior performance without relying on labeled data. Notably,
A classic strategy in image synthesis involves enriching prompts (Dunlap et al., 2023; Sanyıldız et al., 2023; Shipard
2

---

Unsupervised Learning for Class Distribution Mismatch
al., 2023) to guide the diffusion model, thereby expanding datasets. Another approach modifies real image embeddings by injecting learnable perturbations, creating variants en- riched with novel information (Zhang et al., 2023b).
DPM's relationship to score-based generative models has been well established in (Song et al., 2020b; Kim al,, 2022; Luo, 2022), which can be formulated as:
co(0;; () = -v1 āi Var. px)))
(3)
Recently, diffusion models have been integrated with SSL. DPT (You et al., 2024) employs text-to-image paradigm, establishing a cyclical process where the SSL classifier is retrained with generated samples, and the updated classifier produces pseudo-labels However, it assumes matching class distributions between training data and the target task. Similarly, DWD (Ban et al., 2024) enhances known-class classification by training a diffusion model with labeled and unlabeled data to transform irrelevant unlabeled samples into known classes.
co( ,, = - ai v. lo (a C).
(4)
where a; = II as and p-)-) denotes the data distribution parameterized by 8. Va. log po(x;) and Va, log po(#, C) represent the gradient of the oog-lielihood with respect to xy in the unconditional and conditional settings, respectively. These gradients indicate the direction in the data space that maximizes the corresponding likelihood.
further train the diffusion model.
3.2. Problem Definition of UCDM
Our approach differs fundamentally from these methods. First, it avoids retraining the diffusion model. Second, it generates positive and negative instances without human an- notations, enabling classifier training in the UCDM setting.
Overview of training and testing datasets. The training dataset D consists of unlabeled samples, with ground truth labels drawn from the label sets Vanowa and y Vunknown- In the proposed unsupervised learning for class distribution mis- match (UCDM), only a predefined set of class names from Mknow is accessible, while ground truth labels for D remain unavailable. Here, Vanown = f1, ..., K} represents the set of K known classes, while Vunknown denotes the set of unknown classes, with Vknown n Vunknown = 0. Images in the test dataset includes categories from the known classes Vanown. unknown classes Vunknown- and new classes Vnew where Vnew O (Dknown U Vunknown)
3. Unsupervised Learning for CDM
Sec. 3.1 provides an overview of diffusion probabilistic mod- els, followed by the UCDM problem definition in Sec. 3.2. Sec. 3.3 and Sec. 3.4 introduce the positive and negative instance generation pipelines using diffusion models, and Sec. 3.5 details classifier training using generated instances.
3.1. Preliminary
Classifier architecture. Our ultimate goal is to accurately assign instances from known classes to K distinct categories and group instances from both unknown and new classes into a unified "other" class. To achieve this, our target classifier comprises three components: (i) a shared feature encoder; (ii) a fully connected layer with a shape of 2K, serving as an open-set classifier comprising K binary classi- fiers. The j-th binary classifier predicts the probability that instance belongs to known class j. denoted as p(j æ); (iil) a fully connected layer with shape of K, serving as a closed-set classifier, producing the probability pOi x) for K- K-way classification in the closed-set task.
Diffusion probabilistic models (DPMs) (Ho et al., 2020; Rombach et al., 2022; Ramesh et al., 2022; Saharia et al., 2022; Zhao et al., 2024b; 2025), involve forward diffusion process and a reverse denoising process. Given a sample x, the forward process gradually adds Gaussian noise to x to produce n, as increases from 0 until T, which can be formulated as:
Iz- = Va + VI arE, E (0, 1),
(L)
where a₁ [1 B,) and {B:)T denotes fixed or learned variance schedule. In the reverse process, noise is removed from æ, using a learned noise estimator eø (z,, t,,,tCC conditioned on C, yielding 2;-1 as:
However, training each binary classifier requires both pos- itive and negative instances, and the closed-set classifier requires positive instances both of which not available in our unsupervised scenario. To address this challenge, we propose diffusion- instance generation method that effectively creates sufficient positive-negative pairs based on seed samples randomly drawn from the training set.
04
21-1-
Et at
Coraa, (2)
where si(a,, a1-1, ot) denotes the constant schedule that depends on the fixed parameters at, 0:-1, and ot, and Co, t, C) = c0(2,, + + (c,(xx,t,C) co (xx,, t)]. Here, co(æ;, !) represents the DPM without condition, and and or control the strength of conditional guidance and ran- dom noise 4, respectively (Ho et al., 2020; Ho & Salimans, 2022). If o. = and 7 = for all t. yielding the Denoising Diffusion Implicit Model (DDIM) (Song et al., 2020a).
3.3. Positive Instance Generation
We consider that effective positive instances for training should meet the following criteria:
(i) The generated images should avoid domain shifts, remain-
3

---

Unsupervised Learning for Class Distribution Mismatch
positive instance ganeration
postvo
significantly from their corresponding positive instances.
forward
conditional reverse
(ii) They should share similar visual trits-such structure and woth their corresponding positives.
negallive
seed
conditiina Inverse
unconditional reverse
Erasing semantic class via conditional inversion. To achieve property (i), we aim to erase the semantic class y, i.e., the class of positive instance, from the seed sample. Un- conditional DDIM inversion (Song et al., 2020a; Kim et al., 2022) adds noise eg (ztt,)) predicted by an unconditional DPM to the real image, mapping it to latent vector from which the image can be reconstructed via unconditional re- verse process. Hence, by modifying this inversion process to crase class-specific semantics, we satisfy property (i).
negative instance generation
(b) positiva instance gomeration
poativa
forward
conditinal reverse
dog
negative
conditional Inverse
unconditional reverse
negative Instance generation
Figure 2.
Pipelines for instance generation. (a) and (b) show that the semantic class in the prompt can be synthesized in the positive instance pipeline or crased in the negative instance pipeline for given seed sample. If the seed sample lacks the specified semantic class, the generated image resembles the original image.
The essence of erasing semantic class lies minimiz- ing the likelihood of instance belonging to the positive in- stance's ' class y. Inspired by Eq. (4), we propose conditional DDIM inversion, which employs a conditional DPM (Ho & Salimans, 2022) to map a real image to a noise vector in- stead of a random one. As demonstrated in Theorem 3.1, this process approximately moves vo in the negative gradient di- rection of Σi= [Ve, æe log po (xx))* + Va, po 2x,)*.) with step sizes regulated by the noise schedule 8;- Notably,
ing consistent with the characteristics of natural images.
(ii) The diversity of generated images should be sufficient within each category.
(iii) They must belong to one of the K known classes with clearly identified categories.
Va, log po x::) represents the data-space gradient that reduces the likelihood of æ; belonging to y, thereby driving the noise vector to progressively diverge from the semantics of y. The detailed proof can be found in Appendix A.5.
To this end, we propose a diffusion-driven positive instance generation pipeline based on a text-to-image DPM model.
Specifically, to address property (i) and generate images as realistic training data, we randomly drive a sample from the training set and progressively add noise using Eq. (1) in the forward process to obtain noise vector rather than a random one. This ensures that the noise vector forms a Gaussian centered around the seed sample, thereby preserving the information of the seed sample (Luo, 2022; He et al., 2022). To achieve property (ii), we set 0r during the reverse process, introducing random noise in each step to enrich the diversity of the generated instances (Ho et al., 2020; Song et al., 2020a). Lastly, property (iii) is achieved through conditional generation guided by class prompt. Given a known class y E Vknowwn we construct the prompt C., as "A photo of a [CLASS]." where [CLASS] corresponds to the name of the class y.. Then the conditional reverse process for positive instances formulated as Eq. (2). As illustrated in Fig. 2, this ensures that the generated instances exhibit the target semantics without introducing domain shift.
Theorem 3.1. (Conditional DDIM (Song al., 2020a) inversion: progressive movement of the noise vector away from semantic class): Let ah denote the noise vector at time step in the conditional inversion, and let Cyy be the prompt of class y. Define ó, = Eø( tt (e)))e(( t, Cyy, where ca a conditional DPM. When inverting the real image Do to noise vector Dt via conditional DDIM, i.e., setting or = 0 Dandd 7 1 in Eq. (2), we obtain:
X = Vo,X0
Vx, logpo(x:)* + Vx, logpoly xx)"
1=0
9;
6i+11
Vūi+t
0=0
(5)
where 8; ===ven Vaa(a 14+1 ) ( 0) controls the mag- nitude of each gradient step based the noise schedule.
3.4. Negative Instance Generation
Hence, we adopt the conditional DDIM inversion process to erase the given semantic class, where the formula for w; is derived from Theorem 3.1 and Eq. (2), as in Eq. (6). Since & cannot be directly computed and is empirically shown to be negligible (Song et al., 2020a; Wallace et al., 2023), as further supported in the Appendix A.4, we approximate ea (xx, t, C2)) by ca (0 C,C)) Smaller values of 6, indi- cate that x; more closely follows the idealized trajectory
To enhance the model's ability to capture key features of known classes and push samples from unknown classes outside the data manifold, the positive-negative pairs should provide effective contrast (Tack et al., 2020). Thus, negative instances should satisfy the following properties:
(i) They should belong to distinct semantic classes, differing
4

---

Unsupervised Learning for Class Distribution Mismatch
defined by the deterministic componetts.
classifier
0tt -t-
(6)
closed-set prediction
multi-binary prediction
04-1
multi-iian closed-stt
prediction
prediction
CCC P RA
Preserving visual characteristics in the unconditional re-
k
verse process. Furthermore, the term -Va log p(ar)* in Theorem 3.1 drives 2; toward regions of lower log- likelihood probability density, causing distribution shift from 2o. This deviation disrupts the preservation of visual characteristics, in contrast to the property (ii).
confidence-beel labeling
classiffer
update
Pr
Pbr
(2r, M)
K
K+1
constructing pairs
Phosea
Paslosen
Inspired by Eq. (3), we reverse Ey using an unconditional DPM. As shown in Theorem 3.2, the resulting image To effectively preserves the visual features of 2g while approx- imately removing only the class-specifie semantics, since 5n and 6, are negligible (Song al., 2020a; Wallace al., 2023), as detailed in Appendix A.4 and Appendix A.7.
training data update
frazen
backward other class
known class
Figure 3.
The framework for training unsupervised elassifier
based on generated positive and negative instances.
3.5. Unsupervised Classifier Training
Theorem 3.2. (Unconditional DDIM reverse: progres- sive recovery of visual characteristics): Let io denote the image generated by the unconditional DDIM reverse process starting from the conditional inversion noise vec- tor It. Under the assumptions of Theorem 3.1, let & = co co(,,, t)- 1o( Reversing at to Po via uncondi- tional DDIM with o₁ and 7 in Eq. (2), we have:
To differentiate known classes from unknown and new classes, we train the open-set classifier using both posi- tive and negative instance sets. Specifically, we employ the loss function Lopen LGpen-D) to maximize the probability of positive instances being assigned to their respective classes, i.e., p(y| (z), while minimizing the prohability of their corre- sponding negative counterparts.
20 X0-
xx log (o)lx)))
To ensure the categorization of know classes, we constrain the open-set classifier with the loss function Lbj to assign the maximum probability the corresponding class for each sample in the positive instance set Dp. In addition, we also train closed-set classifier C on the positive instance set Dp p with the loss function to tackle the closed-set task.
Va 1=0
[8t01 8141]
Vai(1 a3+1)
Hence, supported by Theorem 3.2, we utilize unconditional DDIM to reverse the conditional noise vector Φ, into new image To. In this process, h;-1 is formulated as Eq. (8), derived from Eq. (2) with = O. To mitigate potential image degradation caused by semantic removal and preserve visual fidelity, we introduce random noise with oe = 0.2.
Thus, the loss function for the generated data is defined as:
C
(Dp,DN) = A1 (Dp.DD) generatee
-A2 CC + C
open
where λι and 22 control the trade-off for each objective. For further details on each loss function, refer to Appendix A.
Confidence- labeling. To leverage real images ef- fectively, we propose a labeling mechanism that combines otther-robability-
E.
01)0 ()+
Ot
(8)
and known-probalee probarility-diiveeeee con- fidences. Instances with high confidences are selected, as- signed pseudo-labels, and incorporated into the training.
The generation of negative instances is illustrated in Fig. 2, with the diffusion-driven process detailed in Algorithml of Appendix A.3. Theorems 3.1 and 3.2 confirm the reliability of both positive and negative instances, further supported by results in Sec. 4.3 and visualizations in Appendix B.13.
From the other- prteer-rrbbaabtt--tiie not belonging to any known class is assigned to the unified "other" class. The probability of this is computed by integrat- ing the predictions of K binary classifiers: p(y E Vother x)) II [1 p(j æ)). where p(j x) is the proba- bility that the j-th classifier predicts the sample as class j. Accordingly, the probability of belonging to a known class
perspective, instance
Consequently, with a randomly selected seed sample from the training set and prompt for a known class y, we can generate positive instance labeled and a negative in- stance not belonging to y, following Sec. 3.3 and Sec. 3.4,
is p(y E Vinown x)) = 1 p(y E Vother x))
respectively. This enables the construction of positive (Dp) and negative (Dx) instance sets for subsequent training.
The probability P(j x;) represents the likelihood of an
5

---

Unsupervised Learning for Class Distribution Mismatch
Table 1. The average accuracy of methods on the closed-set task across CIFAR-10, CIFAR-100, and Tiny--mageNct datasets, with mismatch proportions ranging from 20% to 75%. The best and second-bes best results are highlighted in bold and underlined, respectively.
CIFAR-10
CIFAR-
Tiny-Imm ImageNet
method
20%
40%
60%
75%
20%
40%
60%
75%
20%
40%
60%
75%
D
65.6
67.3
66.6
68.3
23.9
22.7
23.4
24.4
24.5
25.7
26.3
25.7
UASD
82.2
78.2
79.3
68.8
26.2
24.4
22.8
20.4
5.4
5.6
5.3
7.5
CCSSL
97.9
96.0
95.7
94.3
48.9
47.9
45.6
46.0
26.7
23.4
25.8
24.4
T2T
54.7
53.9
50.6
48.7
40.5
41.0
41.7
38.0
MCTF
62.0
64.7
61.2
71.8
56.3
55.6
56.6
56.6
29.1
29.4
23.1
26.2
IOMatch
96.6
92.9
89.8
86.1
29.4
30.3
31.1
32.4
31.4
32.9
32.8
32.8
OpenMatch
92.8
91.0
68.5
73.4
17.3
10.8
10.3
6.1
14.0
10.3
10.9
12.2
Ours
95.2
93.5
95.6
96.7
53.7
49.3
50.9
49.9
36.9
32.4
32.3
35.4
*T2T is excluded from CIFAR-I0 it not applicable binary classification.
instance belonging to the j-th known class in the closed- set task. Thus, the open-set task, the probability for the j-th known class is p(y E Vknown x) pp( æ;), leading
4. Experiments
4.1. Experimental Setups
to the K + l-way distribution q E RK++ for an instance, formulated as:
Datasets. Following previous works (Chen et al., 2020; Li al., 2023), we employ three benchmark datasets, including CIFAR-10 (Krizhevsky
al., 2009), CIFAR- 100 (Krizhevsky et al., 2009), and Tiny-ImageNeet (Deng et al., 2009). More details please refer to Appendix C.I.
ply Vknown [ 2)), if K, if = K + 1.
=
ply Vother x):
(10)
Settings. (i) We vary the mismatch proportion -ieo, the per- centage of unknown-class instances in training data across 0%. 20%, 40%, 60%, and 75%. Results for 0% mismatch are provided in Appendix B.1, with detailed class counts in Appendix C.I. (it) For all SSL baselines, 40 labeled samples per known class are randomly selected, and the remaining known-class and selected unknown-class instances form the unlabeled set based on the mismatch proportion.
From the known-probability-diiee perspective (Li et al., 2023), both p(j x) and p(j x)) estimate the likelihood that an instance belongs to the j-th known class. The prob- ability of an instance belonging to the j-th known class is p(j a²) x p(j æ) while the probability of belonging to the "other" class is 1 ブド p(j x) x p( æt). Thus, the class probability distribution q E RK+1 in open-set task is:
Evaluations. Our evaluation conducted on the closed-set task and open-set task.
p x) x p(i x), - p(j m) xixpiil vl)
isis K, j= K 1.
ij =
For the closed-set task, we report known-class accuracy K K-way classification, where test instances belong exclu- sively to known classes and are classified accordingly.
(11)
If the top-confidence class in both q and is the j-th class and their scores exceed a threshold 8, a pseudo-label j is assigned. The labeled sample is then added to Dknown or Dunknown, depending on whether j is a known or unknown class, and removed from the original training set D.
For the open-set task, leveraging Fq. (10), we evaluate a test set containing known, unknown, and new classes in a K + 1-way classification setting, reporting: (i) known-class accuracy, reflecting correct classification of instances into their respective classes; (ii) unknown-class accuracy, mea- suring the assignment of instances from unknown classes to the unified "other" class; (iii) new-class accuracy, assessing generalization by categorizing instances from new classes to the unified "other" class; (iv) balance score, defined as the mean accuracy minus standard deviation, which captures performance and volatility across these accuracies.
Meanwhile, for the known-class set Danown: negative in- stances are selected from DN to form D'y, while positive instances are selected from Dp for the unknown-class set Dunknown forming D'p. These selected instances are then removed from Dp and DN. The total loss is Eq. (12).
C C ) C (lamma D'y) +
((Dp.Pammm)) generated
generated
(12)
Unlike prior work (Saito et al., 2021; Li et al., 2023), which evaluates only unknown/new classes reports average re- call, we individually assess and report all three metrics and introduce the balance score to measure overall performance.
The classifier training pipeline is shown in Fig. 3, with the Algorithm 2 in Appendix A.3; see Appendix A.2 for pair construction details.
6

---

Unsupervised Learning for Class Distribution Mismatch
Table The halance score (hala.) and average accuracy on known (kno.), unknown (unko.), ) and new classes for the open-set task on the -0 dataset across mismatch proportions from 20% to 75%. A higher balance score indicates better and more balanced performance across the known, unknown, and new classes. The best and second- best results are highlighted in bold and underlined, respectively.
20%
40%
60%
75%
method
accuracy
bala.
accuracy
bala.
accuracy unkno.
bala.
accuracy
bala.
kno.
unkno.
new
kno.
unkno.
new
kno.
new
kno.
unkno.
new
D
65.6
0.0
0.0
-16.0
67.3
0.0
0.0
-16.4
66.6
0.0
0.0
-16.3
68.3
0.0
0.0
-16.7
UASD
82.2
0.0
0.0
-20.1
78.2
0.0
0.0
-19.1
79.3
0.0
0.0
-19.4
68.8
0.0
0.0
-16.8
CCSSL
97.9
0.0
0.0
-23.9
96.0
0.0
0.0
-23.4
95.7
0.0
0.0
-23.4
94.3
0.0
0,0
-23.0
T2T
0.0
MCTF
54.7
0.0
0.0
-13.3
62.4
0.0
0.0
-15.2
83.2
0.0
0.0
-20.3
71.8
0.0
0.0
-17.5
10Match
96.2
1.6
6.0
-18.8
91.5
3.2
6.1
-16.6
87.5
7.7
6.3
-12.6
84.1
7.3
6.0
-12.3
OpenMatch
43.1
36.8
35.8
34.7
67.3
27.8
20.0
13.0
47.4
50.8
52.3
47.7
71.3
1.2
4.4
-14.0
Ours
92.4
100.0
97.9
92.9
90.4
100.0
99.8
91.2
94.0
100.0
100.0
94.6
95.8
100.0
99.1
96.1
*T2T
excluded is not applicable to binary classification.
Table The balance score (bala.) and average accuracy on known (kno.). unknown (unko.), and new classes for the open-set task on the 110AR-10 across mismatch proportions from 20% to 75%. A higher balance score indicates better and more balanced performance across the known, unknown, and new classes. The best and second-best results are highlighted bold and underlined. respectively.
20%
40%
60%
75%
method
accuracy
bala.
accuracy
bala.
accuracy
hala.
accuracy
bala.
kno.
unkno.
new
kno.
unkno.
new
kno.
unkno.
new
kno.
unkno.
new
D
23.9
0.0
0.0
-5.8
22.7
0.0
0.0
-5.5
23.4
0,0
0.0
-5.7
24.5
0.0
0.0
-6.0
UASD
26.2
0.0
0.0
-6.4
24.4
0.0
0.0
-6.0
22.8
0.0
0.0
-5.6
20.4
0.0
0.0
-5.0
CCSSL
48.9
0.0
0.0
-11.9
47.9
0.0
0.0
-11.7
45.6
0.0
0.0
-11.1
46.0
0.0
0.0
-11.2
T2T
54.7
0.0
0.0
-13.4
53.9
0.0
0.0
-13.2
50.6
0.0
0.0
-12.4
48.7
0.0
0.0
-11.9
MCTF
0.0
98.7
98.8
8.8
8.9
35.8
34.9
11.3
40.2
0.7
-8.8
56.6
0.0
0.0
-13.8
1OMatch
0.0
100.0
100.0
9.0
0.0
100.0
100.0
9.0
0.0
100.0
100.0
9.0
0.0
100,0
100.0
9.0
OpenMatch
15.6
18.5
17.8
15.8
10.4
7.8
7.6
7.1
10.0
6.6
5.9
4.4
33.5
33.5
7.0
Ours
40.0
94.8
94.6
44.8
39.3
86.0
90.1
43.6
45.1
70.4
79.1
47.2
44.5
74.6
75.9
47.2
Baseline methods. We evaluate our approach against four SCDMcT methods: UASD (Chen al., 2020), L (Guo et al., 2020), T2T (Huang et al., 2021), and CCSSL (Yang al., 2022), and three SCDM methods: MTCF (Yu al., 2020), OpenMatch (Saito et al., 2021), and IOMatch (Li et al., 2023).
and underlined, respectively.
Performance on closed-set task. Tab. shows the closed- set task results on CIFAR-10, CIFAR-100, and Tiny- ImageNet across mismatch proportions from 20% to 75%. From the results, we have following two key observations. (i) UCDM achieves the second- highest accuracy at least twice on each dataset and outperforms all compared meth- ods on CIFAR-10 at a 75% mismatch proportion, high- lighting its ability to train an effective closed-set classifier without relying on ground truth labels. (ii) As the mismatch proportion increases, UCDM consistently improves, demon- strating its robustness across varying mismatch proportions.
Implementation Details, All experiments utilize the pre- trained Stable Diffusion 2.0 model (Rombach et al., 2022) as the DPM generator, without further optimization. Follow- ing (Chen et al., 2020; Guo et al., 2020; Saito al., 2021), the classifier adopts the WideResNett28-22 (Zagoruyko & Komodakis, 2016) backbone. Each method is run three times per dataset, and the mean accuracy is reported. For more details, please refer to Appendix C.2. The code is available at https: / com/ RUC-DWBI-ML, r research/tree ma i /tt///CDDMaaaaaaa ManDD---aatte master.
Performance on open-set task. Tab. 2, Tab. 3, and Tab. 4 present open-set results, including balance scores and accu- racies for known, unknown, and new classes on CIFAR- 10, CIFAR-100 and Imay-lmageNet. From the results, we ob- serve that UCDM achieves the highest balance score across all settings in the three datasets. This demonstrates its ca- pability to maintain high mean accuracy and low standard deviation across known, unknown, and new classes, even on the more challenging Tiny-ImageNet benchmark.
4.2. Experimental Results
CIFAR-10 includes known, 6 unknown, and 2 new classes. CIFAR-100 harder with 20 known, 60 unknown, and 20 new. Imag-ena is the most complex, with 20 known, 80 unknown, and 100 new classes. The highest and second- highest accuracies, along with the balance score, are bolded
In contrast, SCDMcT methods fail to classify unknown and
7

---

Unsupervised Learning for Class Distribution Mismatch
Table The halance score (hala.) and average accuracy on known (kno.), unknown (unko.), and new classes for the open-set task the Tiny-Imm ImageNet across mismatch proportions from 20% to 75%. A higher balance score indicates better and more balanced performance across the known, unknown, and new classes. The best and second- results are highlighted bold and underlined, respectively.
20%
40%
60%
75%
method
accuracy
bala.
accuracy
bala.
accuracy
bala.
accuracy
bala.
kno.
unkno.
new
kno.
unkno.
new
kno.
unkno.
new
kno.
unkno.
new
DS
24.5
0.0
0.0
-6.0
25.7
0.0
0.0
-6.3
26.3
0.0
0.0
-6.4
25.7
0.0
0.0
-6.3
UASD
5.3
0.0
0.0
-1.3
6.8
0.0
0.0
-1.7
5.2
0.0
0.0
-1.3
6.7
0.0
0.0
-1.6
CCSSL
26.7
0.0
0.0
-6.5
23.4
0.0
0.0
-5.7
25.8
0.0
0.0
-6.3
24.4
0.0
0.0
-6.0
T2T
40.5
0.0
0.0
-9.9
41.0
0.0
-10.0
41.7
0.0
0.0
-10.2
38.0
0.0
-9.3
MCTF
0.9
4.5
92.6
-99.3
19.1
0.9
8.1
0.2
24.2
0.1
-5.8
26.6
0.0
0.0
-6.5
1OMatch
0.0
100,0
100.0
8.9
0.0
100.0
100.0
8.9
0.0
100.0
100.0
8.9
0.0
100.0
100,0
8.9
OpenMatch
13.3
20.6
24.0
13.8
9.8
22.4
23.6
11.0
10.8
3.5
5.9
3.0
10.8
35.2
33.7
12.9
Ours
21.9
86.8
86.7
27.6
17.3
95.3
94.6
24.2
15.8
94.9
95.4
22.9
16.8
88.5
88.7
23.2
100
closed-set task
open-set task
-oa---aaaas sesuracyyaa (96)
closed-set task
open-set task
100
100
accuracy (%)
75
balanos score(
10Match
OpenMalich
Seaeeeee Conoooo score(
97
50
oure
80
50
(DD, Dul gonerated
10Match OpenMatch pure
25
(D,, Duj generated
Masoeo Bigl generated
96
0
confidence
threshold
60
confidence threshold
1000
2000
0
1000
2000
dosed-settkoww known unknown
new
balance
count per class
label count per class
(a)
(c)
Figure 4. Ablation studies: (a) shows the ablation study on learning objectives, demonstrating the effectiveness of each component. (b) compares method with SSL across varying label counts, highlighting its cost-saving potential. (c) analyzes the sensitivity to the confidence threshold, suggesting a higher threshold for stable performance.
new classes into unified "other" category. resulting in zero accuracy for these tasks. Meanwhile, SCDM methods ex- hibit low balance scores due to either low mean accuracy or high standard deviation when classifying known, unknown, and new classes. UCDM, however, demonstrates robustness across varying mismatch proportions and datasets.
Table 5. Compare pipeline with random noise-based instances on CIFAR-10 10 (60% mismatch), reporting known-class accuracy (closed-set) and balance score (open-set). UCDM,1, Dositive',neaatee pipeline if selected; otherwise, random noise applied. Best and second-best results are bolded and underlined.
variants
UCDM,
UCDM,
known-class
balance
I
95.6
94.6
4.3. Ablation Studies
II
x
82.9
72.8
III
V
X
90.0
79.3
Learning objectives. Fig. 4 (a) evaluates loss components on CIFAR-10 (60% mismatch), reporting known-class accu- racy for the closed-set task, and balance score and accuracies for known, unknown, and new classes in the open-set task.
IV
X
X
84.8
71.5
The results highlight two key observations: (i) Generat- ing positive instances with our pipeline yields the best (I) and second-best (III) performance, demonstrating its ef- fectiveness. (fi) Randomly generating positive negative instances significantly reduces the balance score, as seen in II, III, and IV, due to the lack of effective comparisons.
The results reveal two key findings: (i) UCDM achieves the best results across all evaluation criteria when optimized with the full loss component L, demonstrating its effective- ness. (ii) Realistic images play crucial role in improv- ing the classification performance of known classes. For instance, when comparing the framework optimized with (Dp,Dx)
Comparison with SSL under varying label counts per class. Fig. (b) compares method with SCDM methods like 10Match and OpenMatch using varying label counts per class on CIFAR-10 10 with 60% mismatch proportion.
ggncraaee + C ('aann,Ds) Dx) ((Dp.Dx), gensraated to generated there is a notable improvement performance for known classes.
Effectiveness of nositive-negative instance generation. Tab. 5 shows the comparison between instance generation from random noise and our method,
The results show that UCDM, without labels, outperforms IOMatch and OpenMatch (with 2,000 labels per class) in bal- ance score. Additionally, it achieves superior known-class
8

---

Unsupervised Learning for Class Distribution Mismatch
accuracy on the closed-set task compared OpenMatch with 500 labels per class. These findings highlight UCDM's effectiveness and its ability to reduce annotation costs.
References
Azizi, S.,, Kornblith, S., Saharia, C., Norouzi, M., and Fleet, D. J. Synthetic data from diffusion models improves imagenet classification. arXiv preprint arXiv:2304.08-466 2023.
Confidence threshold. Fig. (c) analyzes the sensitivity of the confidence threshold in safiddnce--bsse labeling. The results show that the model remains robust with a threshold above 0.95. However, performance, especially in the open- set task, declines below 0.95 due to incorrect pseudo-labels. We recommend using higher threshold (c.g.. 6 = 0.98, as in our experiments) to ensure stable performance.
Ban, S., Kong, H., and Kim, K.-E. Data augmentation with diffusion for open-ser set semi-supervised learning. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024.
Berthelot, D., Carlini, N., Goodfellow, I., Papernot, N., Oliver, A., and Raffel, C. A. Mixmatch: A holistic ap-
5. Conclusion
proach to semi-supervised learning. Advances in neural
Previous studies on CDM focus on SCDMer and SCDM, where the reliance labeled data limits their applicabil- ity to unsupervised scenarios and hinders performance in open-set tasks. To overcome this, we propose Unsupervised Learning for Class Distribution Mismatch (UCDM), which uses a diffusion model to create or erase semantic classes in unlabeled images, generating positive and negative pairs for classifier training. We also provide two theorems to the- oretically support this approach. This framework mitigates the need for ground truth labels and extends applicability to unsupervised settings. Extensive experiments on various tasks and datasets show UCDM's 's superior performance.
information processing systems, 32, 2019.
Chen, Y., Zhu, X., Li, W., and Gong, S. Semi-supervised learning under class distribution mismatch. In Proceed- ings of the AAAI Conference on Artificial Intelligence. volume 34, pp. 5569-3576, 2020.
Dai, G., Zhang, Y., Wang, Q. Du, Q.. Yu, Z., Liu, Z., and Huang, S. Disentangling writer and character styles for handwriting generation. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 5977-5986, 2023.
Limitations and future work Limited prompt variability restricts positive instance diversity in UCDM. Integrating large language model could improve this.
Deng, J., Dong, W., Socher, Li, Li. K., and Fei-Fei, L. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference computer vision and pattern recognition, pp. 248.255, leee, 2009.
Acknowledgements
Du, P., Chen, H., Zhao, S., Chai, S., Chen, H., and Li, C. Contrastive active learning under class distribution mismatch. JEEE Transactions on Pattern Analysis and Machine Intelligence, pp. 1-13, 2022. doi: 10.1109/ TPAMM.2022.3188807
This work is supported by the National Key Research & Develop
National Natural Science Foundation of China(U23A20299, U24B20144, 62276270, 62322214, 62172424, 62076245), Beijing Natural Science Foundation(4212022 Program of China Scholarship Coun- cil, and the Outstanding Innovative Talents Cultivation Funded Programs 2024 of Renmin University of China. Meanwhile, it is supported by the NUS startup grant (Presi- dential Young Professorship), Singapore MOE Tier-1 grant, ByteDance grant, ARCTIC grant, SMI grant (WBS num- ber: A8001 104-00000, Alibaba grant, and Google grant for TPU usage. It is also partially supported by the Opening Fund of Hebei Key Laboratory of Machine Learning and Computational Intelligence.
Dunlap, L., Umino, A., Zhang, H.,, Yang, J., Gonzalez, J. E.. and Darrell, T. Diversify your vision datasets with automatic diffusion- based augmentation. Advances in neural information processing systems, 36:79024-79034, 2023.
Fan, Y., Kukleva, A., Dai, D., and Schiele, B. Ssb: Simple but strong baseline for boosting performance of open- set semi-supervised learning. In Proceedings of the IEEE/CVF International Conference Computer Vision, pp. 16068-16078, 2023.
Impact Statement
Gidaris, S., Singh, P., and Komodakis, N. Unsupervised rep- resentation learning by predicting image rotations. arXiv preprint 103.0718, 2018
This paper advances the field of machine learning with a particular focus on unsupervised class distribution mismatch. While the work carries many potential societal implications, none deemed necessary to emphasize explicitly here.
Goodfellow, I., Bengio, Y., Courville, A., and Bengio, Y. Deep learning, volume 1. MIT press Cambridge, 2016.

---

Unsupervised Learning for Class Distribution Mismatch
Guo, L.-Z.,, Zhang, Z.-Y., Jiang, Y., Li, Y--F, and Zhou, Z.- H. Safe deep semi-supervised learning for unseen-class unlabeled data. In International Conference Machine Learning, Pp. 3897-3906. PMLR, 2020.
diffusion models. In Proceedings of the IEEE/CVF con- ference on computer vision and pattern recognition, pp. 10684-10695, 2022.
Saharia, C., Chan, W., Saxena, S., Li, I.., Whang. J., Denton, E. L., Ghasemipour, K., Gontijo Lopes, R., Karagol Ayan, B., Salimans, T., et al. Photorealistic text-to-iman dif- fusion models with deep language understanding. Ad- vances neural information processing systems, 35: 36479-36494, 2022.
He, R., Sun, S., Yu, X.. Xue, C., Zhang, W. Torr, P., Bai, S., and Qi, X. Is synthetic data from generative models ready for image recognition? arXiv preprint arXiv:2210007574, 2022.
Ho, J. and Salimans, T. Classifier-free diffusion guidance. arXiv preprint arXiv:2207. 2598,, 2022.
Saito, K., Kim, D., and Saenko, K. Openmatch: open-set consistency regularization for semi-supervised learning with outliers. In Proceedings of the 35th International Conference on Neural Information Processing Systems, pp. 25956-25967, 2021.
Ho, J., Jain, A., and Abbeel, P. Denoising diffusion proba- bilistic models. Advances in neural information process- ing systems, 33:6840-688 6851, 2020.
Huang, J., Fang. C., Chen, W., Chai, Z., Wei, X., Wei, P., Lin, L.,, and Li, G. Trash to treasure: Harvesting ood data with cross-modal matching for open-set semi-supervised learning. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 8310-8319, 2021.
Sarryıldiz, M. B., Alahari, K., Larlus, D., and Kalantidis, Y. Fake it till you make it: Learning transferable represen- tations from synthetic imagenet clones. In Proceedings of the IEEE/CVF Conference Computer Vision and Pattern Recognition, pp. 801 1-8021, 2023.
Shipard, J., Wiliem, A., Thanh, K. N., Xiang, W., and Fookes, C. Diversity is definitely needed: Improving model-agnostic zero-shot classification via stable diffu- sion. Proceedings of the IEEE/CVF Conference on Computer Vision and Puttern Recognition, pp. 769-778, 2023.
Kim, G., Kwon, T., and Ye, C. Diffusionclip: Text- guided diffusion models for robust image manipulation. In Proceedings of the IEEF/CVE conference on computer vision and pattern recognition, pp. 2426-2435, 2022.
Krizhevsky, A., Hinton, G., et al. Learning multiple layers of features from tiny images. 2009.
Sohn, K., Berthelot, D., Carlini, N., Zhang, Z., Zhang, H., Raffel, C. A., Cubuk, E. D., Kurakin, A., and Li, C.-L. Fixmatch: Simplifying semi-supervised learning with consistency and confidence. Advances in neural informa- tion processing systems, 33:596-608, 2020.
Li, Z., Qi, L., Shi, Y., and Gao, Y. lomatch: Simplifying open-set semi-supervised learning with joint inliers and outliers utilization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 15870- 15879, 2023.
Song. J., Meng, C., and Ernon, S. Denoising diffusion im- plicit models. arXiv preprint arXiv:2010.02500 2020a.
Luo, C. Understanding diffusion models: A unified perspec- tive. arXiv preprint arXiv:2208. /970, 2022.
Song, Y., Sohl-Dickstein, J., Kingma, P., Kumar, A., Er- mon, S., and Poole, B. basre-based generative modeling through stochastic differential equations. arXiv preprint arXiv:2011.1344 2020b.
Ma, Q., Gao, J., Zhan, B., Guo, Y., Zhou, J., and Wang, Y. Rethinking safe sumi-super learning: Transferring the open-set problem to a close-set one. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 16370-16379, 2023.
Tack, J., Mo, S., Jeong, J., and Shin, J. Csi: Novelty de- tection via contrastive learning on distributionally shifted instances. In 34th Conference on Neural Information Prucessing Systems (NeurIPS) 2020. Neural Information Processing Systems, 2020.
Oliver, A., Odena, A., Raffel, C., Cubuk, E. D.,, and Good- fellow, I. J. Realistic evaluation of deep sumi-supervised learning algorithms. In Proceedings of the 32nd Inter- national Conference on Neural Information Processing Systems, pp. 3239-325000 2018
Tian, Y., Fan, L., Isola, P., Chang, H., and Krishnan, D. Stablerep: Synthetic images from text-to-image models make strong visual representation learners. Advances in Neural Information Processing Systems, 36, 2024.
Ramesh, A., Dhariwal, P., Nichol, A., Chu, C., and Chen, M. Hierarchical text-conditional image generation with clip latents. 2022.
Wallace, B., Gokul, A., and Naik, N. Edict: Exact diffusion inversion via coupled transformations. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 22532-22541 2023.
Rombach, R., Blattmann, A., Lorenz, D., Esser, P., and Ommer, High-resolution image synthesis with latent
10

---

Unsupervised Learning for Class Distribution Mismatch
Wang. Y., Qiao, P., Liu, C., Song, G., Zheng, X., and Chen, J. diitr--disttibute semantic pruning for robust semi- supervised learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 23849-2222 23858, 2023.
Zhao, W., Tang, J., Han, Y., Song, Y., Wang, K., Huang, G., Wang, F,, and You, Y. Dynamic tuning towards parameter and inference efficiency for vit adaptation. arXiv preprint arXiv:2403. 1808, 2024c.
Zhao, W., Han, Y., Tang, J., Wang, K., Luo, H., Song, Y., Huang, G., Wang, F., and You, Y. Dydit++: Dynamic dif- fusion transformers for efficient visual generation. arXiv preprint arXiv:2504.06803 2025.
Yang, F. Wu, K., Zhang, S., Jiang, G., Liu, Y., Zheng, F., Zhang, W., Wang, C., and Zeng, L. Class-aware contrastive semi-supervised learning. In Proceedings of the IEEE/CVF Conference Computer Vision and Pattern Recognition, pp. 14421-14430 2022.
Zhao, X., Krishnateja, K., Iyer, R., and Chen, F. Robust semi-supervised learning with of distribution data. arXiv preprint arXiv:2010.0365: 2020.
You, Z., Zhong. Y., Bao, F., Sun, J., Li, C., and Zhu, Diffusion models and semi-supervised learners benefit mutually with few labels. Advances in Neural Information Processing Systems, 36, 2024.
Zhao, X., Krishnateja, K., Iyer, R., and Chen, How out-of- distribution data hurts sami-supervised learning. In 2022 IEEE International Conference on Data Mining (ICDM), pp. 763-772. IEEE, 2022b.
Yu, Q.. Ikami, D., Irie, G., and Aizawa, K. Multi-task cur- riculum framework for open-set semi-supervised learning. In Computer Vision ECCC 2020: 16th European Con- ference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XII 16, pp. 438 454. Springer, 2020.
Zagoruyko, S. and Komodakis, N. Wide residual networks. In British Machine Vision Conference 2016. British Ma- chine Vision Association, 2016.
Zhang, Y., Wang, Z., and He, W. Class relationship em- bedded learning for source-free unsupervised domain adaptation. In Proceedings of the IEEE/CVF Conference Computer Vision and Pattern Recognition (CVPR), pp. 7619-7629, June 2023a.
Zhang. Y., Zhou, D., Hooi, B., Wang, K., and Feng, Expanding small-scale datasets with guided imagination. Advances in neural information processing systems, 36: 76558-76618, 2023b.
Zhao, W., Zhang, J., Li, L., Barnes, N., Liu, N., and Han, J. Weakly supervised video salient object detection. In Proceedings of the IEEF/CVF conference on computer vision and pattern recognition, pp. 16826-16835, 2021.
Zhao, W., Wang, K., Chu, X., Xue, F., Wang, X., and You, Y. Modeling motion with multi-modal features for text-based video segmentation. In Proceedings of the JEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11737-11744 2022a.
Zhao, W. Han, Y., Tang, J., Li, Z., Song, Y., Wang. K., Wang, Z., and You, Y. A stitch in time saves nine: Small vlm is precise guidance for accelerating large vlms. arXiv preprint arXiv:2412.0332 2024a.
Zhao, W., Han, Y., Tang. J., Wang, K., Song, Y., Huang. G., Wang, F., and You, Y. Dynamic diffusion transformer. arXiv preprint arXiv:2410.03.. 2024b.

---

Unsupervised Learning for Class Distribution Mismatch
We organize our appendix follows.
Algorithm:
Loss function and pseudo-code
Section A.1: Details of loss function
Section A.2: Details on constructing pairs real and generated images
Section A.3: Pseudo-Code for diffusion- driven data generation and classifier training
Proof
Section A.4: Empirical evidence of negligible 6, and &
Section A.5: Proof of Theorem 3.1
Section A.6: Proof of the forward process in negative instance generation
Section A.7: Proof of Theorem 3.2
Additional experimental results:
Mismatch settings
Section B.1: Experimental results on 0% mismatch proportion across different datasets
Section B.2: Experimental results on categories with varying proportions
Sensitive and ablation analysis
Section B.3: Experimental results generated positive instances with varying parameter
Section B.4: Experimental results on generated negative instances with varying parameter og
Section B.5: Analysis of the sensitivity to weights in the loss function
Section B.6: Evaluation of the impact of the batch normalization layer on model training
Section B.7: Evaluation of pseudo-label reliability in selected instances
Visualization
Section B.8: Visualization of generated positive images from random noise
Section B.9: Visualization of generated negative images from random noise
Section B. 10: Visualization of generated positive images with varying parameter di
Section B. Visualization of generated negative images with varying parameter dr
Section B. Visualization of DDIM Inversion and Negative Instances Generation in UCMD
Section B.13: Visualization of generated positive and negative images in UCDM
Section B. Visualizzii of generated harder training pairs
Experimental settings:
Section C.I: Dataset details
Section C.2: Training details
12

---

Unsupervised Learning for Class Distribution Mismatch
A. Algorithm
A.I. Details Loss Function
multi-binary prediction
p(y 2/x)
0.8
C NN)
softmax to dim1
0.2
2K
reshape
ply 2/xx
binary classifier
dim1 1:2
classification of known classes
ply 2 xx
dim0:K
DDr
softmax to dim0
0.1 0.2
p(y = 2
closed-set prediction
softmax
0.3
0.2
LD closed
classification of known classes
K
Figure 5. Schematic diagram of loss functions.
To provide clear understanding of the loss computation mechanism, we illustrates the process of deriving the loss function from the logits in Fig. 5.
For the open-set task, we train an open-set classifier using both the positive and negative instance sets with the loss function (Dp.Dx) which aims maximize the probability of positive instances being correctly assigned to their respective classes, Lopen
i.e. p(y)æ), while minimizing the probability of assigning them to their corresponding negative counterparts, shown in Eq. (13).
C C(Pp (Dp.DN) open
1
Σ
-logp(ylæ)
1
Σ
- log ply az)
Drp
[DN
(13)
(x.y)DD
(æ.y)EDN
Simultaneously. to improve the identification of known classes, we impose constraint on the multi-binary prediction for dimension O, ensuring that the probability corresponding to the ground truth label is maximized, as shown in Eq. (14).
((Pr)
Σ
logp(ylæ),
open
Dpp
(14)
(E.D)DD
Additionally, for the closed-set task, we train closed-set classifier by minimizing the loss function Eq. (15).
C.
closed
Dpp
1
Σ
log((y))),
(15)
(2.
Consequently, the loss function for the generated dataset is defined as:
L (Dp.Dx) generated
Ai A(DDD.DD X2 (Dr) +
(Dp) closed
13

---

Unsupervised Learning for Class Distribution Mismatch
where and 22 control the trade-off for each objective.
A.2. Details on constructing pairs of real and generated images.
(a) generate positive and negative instances
seed positive negative label
seed positive negative label
generate positive
1
1
and negative
2
2
instance
training set 'D
K
K
(b) confidence-based labeling
( 1 ...
label: 2
2
confidence- based labeling
D known
(
2
K+1
training set D
label: K+1
K+1
D Dunknown
(c) update training set
remove labeled data"
training set 'D
training set 'D
(d) construct pair for real image and generated image
seed positive negative label
seed positive negative label
!
construct pairs
pair
D known
K
seed positive negative label
seed positive negative label
K+1 )
construct
pair
2
pairs
ran random sampling
D Dunknown
K
Figure 6. Schematic diagram for constructing positive and negative pairs.
In Fig. 6, we present toy example to visualize the process of constructing pairs.
In the first step, as shown in Fig, 6 (a), generate K positive and negative instances for each seed sample from the training set, where K denotes the number of known classes. Each positive and negative instance derived from the same seed sample forms pair.
In the second step, as shown Fig. (b), we adopt a confidence- based labeling mechanism to assign pseudo-labels to high-confidence samples. These samples are then removed from the training set, as depicted in Fig. (c). Instances with
14

---

Unsupervised Learning for Class Distribution Mismatch
pseudo-labels corresponding known classes form the known while those with the pseudo-label K are placed in unkkowa-
Finally, we aim to construct pairs for real images from Dknown and D unknown- as shown in Fig. 6 (d), For an instance from Dknown we select a generated negative instance based on the seed sample æ that has the same pseudo-label as æ to serve as its negative counterpart. For an instance a: from unknown. we randomly sample generated positive instance corresponding to æ to serve as its positive counterpart. Meanwhile, the remaining generated instances based on æ not participate in training.
A.3. Pseudo-Code for Diffusion-Drivee Data Generation and Classifier Training
To facilitate a better understanding of our problem setup and proposed method UCDM, we provide the pseudo code below.
Algorithm Diffusion-based data generation
Sample generation stage
Input: training set D, the prompt set of known classes C, diffusion model, positive instance set Dp, negative instance set DN
Initialize Dp 0, Dx for in D do
for Cy in C do
Forward æ to noise vectors रT and Er using Eq. (1) and Eq. (6), respectively. Forward Ør and Cy to diffusion model to obtain &g using Eq. (2), and add &g to Dp.
Forward ær to the diffusion model to obtain To using Eq. (8), and add my DN-
end for end for
15

---

Unsupervised Learning for Class Distribution Mismatch
Algorithm 2 UCDM:
Unsupervised Learning for Class Distribution Mismatch
Training classifier stage
Input: Training set D. positive instance Dp, negative instance DN. set of real instances with pseudo-labels from
known classes known. set of real instances with pscudo-labels from unknown classes Punknown- known-class set D known negative instances of DAnown: '' positive instances of 'D Dunknown: D'p, confidence-based labeling epoch et, classifier
Initialize Denown = 0, Dunknown
0. D'p 0, D'x = 0
for epoch = 1, 2, do for S in (D, Dnown, Dunknown) do
if S * @ then Sample from S. if S = D) then
Sample B, and B, from Dp and DN, where Bp and B,, indicate the generated positive and negative instance set based on æ and prompt set C.
else if S D known then
Sample z from D'x as a negative instance, where é is generated based on æ and Cy, with y being the pseudo- label of
else if S
unkkown then
Sample z from D/p positive instance, where & is generated based and Cy, with y being randomly sampled from (1.2..... Kj.
end if
Train classifier with sampled data using Eq. (12).
end if end for
Confidence-based labeling if epoch = c. then
for æ: in 'D do
Forward æ to the classifier to obtain q and using Eq. (10) and Eq. (11),
if arg max arg max q and max 2 and max q 2 then Assign pseudo-label arg max q to æ.
if arg max q E Vknown then
Add (æx arg max q) D Panown- and select negatives from Dy add D'x else
Add (x, arg max q) to Dunknown and seleet positives from Dp to add Djp end if
Remove æ from D and corresponding instances from Dp and Dx-
end if
end for
end if
end for
Return: classifier
16

---

Unsupervised Learning for Class Distribution Mismatch
A.4. Empirical evidence of negligible ó, and 6,
To assess the negligibility of 6, and 8,, we compute the I-cosine similarity between e(x,, I, Cy) and e(x;-1, t, Cy), as well as between c(x,, t) and e( t), over 20 DDIM steps. As shown in Tab. 6, the results indicate near-perfect alignment, validating that both óe and 6, are negligible in practice.
Table
Values of 6, and 8, across diffusion steps condition and uncondition settings.
Step
2
5
6
7
8
9.
10
11
12
13
14
15
16
17
18
19
20
4c-2
3e-2
2c-2 2c-2
le-2
8e-3 5e-3
3e-3
3e-3
2c-3
2c-3
2e-3
2e-3
2e-3
1e-3
le-3
1c-3
le-3
le-3 4e-4
8,
4e-2 3e-2
2e-2
2e-2
le-2 8e-3
Se-3
3e-3
3e-3
3e-3
2e-3
2e-3
2e-3
2e-3
1e-3
le-3
1e-3
1e-3
le-3 4e-4
A.5. Proof of Theorem 3.1
Proof. According to Eq. (2), when 7 = 1 and o; = 0, we have the following formula:
a1-1 at
xt-1
04
We then represent 22 as:
1
I--1 +
Voi
Vaa="
co( t Cy)
0x-1
0t-1
V 04-1
Ot
12-22 +
vat-1
1
-1
c0 10(1-116-1,,,,
04-2
04-1
01-2
1
+
Va
-1
c0(2e, t, Cy)
at
a1-1
( Va02 1012-1-1 /
/
V ac-1
0n
0t-1
02-2
01-2
01-3
-t-3
+
val_2
-Von- -1 co
20(x--2,t-2,000 (16)
+ Vai-1
1
1
-1
c c0(
ar-1
ar-2
1
Vor
c0 < L, Cy)
a
01-1
V 00e-101-2...0
0:00-1...0
Va
V aii
V
1
-1
eo (2x Cy).
0:-1
Let (,, i, c & 8; Then, we have
to(x,,tCCy) = --I ao Voggooo 11) 3)
Sc,
which leads to:
t-1
Vai(1 x++1) (v
D1
0,04-11.. ..... 01
(ai.
1
1
Væ, log po (2, 11)
0q-101-2....
....0 a0
aj
i=0
(17)
t-1
/a
1
1
8141.
a1+1
a
0
17

---

Unsupervised Learning for Class Distribution Mismatch
Let 8; var(1 āit1)
(Voz.,
1). for 0 Osist- 1. Then the above expression simplifies to:
1-1
8;
va
vw log
1
81+1.
(18)
1 v aa+1
200
0
Applying Bayes' theorem, the conditional term can be rewritten as:
1-1
pol(z))o(y x+.)
8; d++1
V0
Va log
(19)
(o())
va++1
1=0
Since the gradient of log Po()) with respect to a; is zero, we obtain:
n logpo(a;))* + Vay log x;,"a
+
91
8 5 1
(20)
v
/0+11
==0
The proof is complete.
A.6. Proof of the Forward Process in Negative Instance Generation
Proof. From Eq. (2), when 1 and
O, the following equation holds:
at-1
1h-1
var- 04- 02e
at
Thus, we can represent mn as:
at Pt-1 + 0t- Cy))
Ct
V
a4-1
Since to Cy) is not directly accessible, adopt forward Fuler approximation, replacing co t, Cyy) with (, Cy) following DDIM (Song et al., 2020a). As result, obtain:
Et V al 1 + Varbaan 0), c0 (0 Cy))
The proof is complete.
A.7. Proof of Theorem 3.2
Proof. We begin with the following equation:
Q4-1
Dt-1
Et
/--1
Voa at
1
ea (ā t)
(21)
at
ar-1
Rearranging, we obtain:
04 V
3;
1.
Voi
1
a:-1
0it1
Following a similar derivation process as in Eq. (16), we obtain Eq. (22):
ar04--1...0
1 - 1
21 V 01-101-2....0
I
Vas
V a;
co(ã,, i).
(22)
04-1
mm1
18

---

Unsupervised Learning for Class Distribution Mismatch
Let (0 <0( () = 8G. Based on Eq. (3), have:
co(#;; t)
ai Va log (o + 84.
Therefore, we obtain the following equation for :c;
1-1 8;
St = v0 Va, log po log
(8:)
(23)
v1 04+1
1=0
In the initial reversion step, where H, De, have:
po V llogpo(x.).
Since
1
V loggpo(t))
V log (o(
V1 αz 8, and V po(s))(>) V log (2
8,,
v1 - az
obtain:
1
V 1o) = V (o
8r +
8
v1 d4
v1 αt
By induction, we get:
f-1
(oggp((;-_)) = Vlogpo(Ez-N) +
85+1 - 85+1 -
Cj+1
1 j
or more generally:
[-1
V (og) = V loggo((x;)
+ Σ
6āt - 8541
as+1
Substituting into Eq. (23), we get:
3. = va Ve log po
8
00ز1 63+1
0
(24)
/1 āj+l
v1 aitl
1=
Meanwhile, the corresponding equation from Theorem 3.1 is:
t-1
xt = Van
a. log + Ve, (x) +
8;
8,41
(25)
ai41
1=
i=0
Equating both sides, we obtain:
Va
Va, log log Va, (ygl)( +
8t
8,41
/1 ai+1
1=0
(26)
t-1
[-]
= Varão
Va, logpo(>;:)*
ΣΣ
8;
5541 - 65+1
+
8;
0
vI 0.+1
1=0 j=i
aj+1
1=
Solving for Lo. we arrive at:
To = Fo
2; log (y)
5541 8ب41
(27)
Va 1=0
Vai(1 az+1)
The proof is complete.
19

---

Unsupervised Learning for Class Distribution Mismatch
B. Additional Experimental Results
B.1. Experimental Results on 0% Mismatch Proportion across Different Datasets
Tab. 7 presents the results of our proposed method and the compared methods with a 0% mismatch proportion on CIFAR-10, CIFAR-ION 100, and Tmae-lmageNet.
For the open-set task, observe that UCMD achieves the highest balance score, demonstrating excellent performance even with 0% mismatch proportion, where instances from unknown categories are present. This further highlights the effectiveness of the techniques used for generating negative instances. Additionally, we find that MCTF and IOMatch exhibit the same balance score on CIFAR-10, but the high standard deviation in IOMatch results in its lower performance, while MCTF's low mean accuracy contributes to the balance score.
For the closed-set task, we find that UCMD performs slightly below the best accuracy under 0% mismatch proportion. This is because, compared other mismatch proportions, the number of training instances smallest in the 0% mismatch scenario, leading reduced count of generated positive instances (one realistic instance generates one positive instance for each class). Performance could be further improved by generating more positive instances.
The average accuracy of methods on the known class (kno.) for the closed-set task, and the balance score (bala.), as well as the accuracy of known (kno.), unknown (unko.), and classes for the open-set task across the CIFAR- 10, CIFAR- 100, and Eny-ImageNet datasets, with a 0% mismatch proportion. The best and second-best results are highlighted in bold and underlined, respectively.
Table
CIFARIO
CIFARI00
Lmny-lmaeeNet
method
closed-set
open-set
closed-set kno.
open-set
closed-set, kno.
open-set
kno.
kno.
unkno.
new
bala.
kno.
unkno.
new
bala.
kno.
unkno.
new
bala.
D
70.3
70.3
0.0
0.0
-17.2
21.1
21.1
0.0
0.0
-5.2
25.4
25.4
0.0
0.0
-6.0
UASD
78.0
78.0
0.0
0.0
-9.00
26.8
26.8
0.0
0.0
-6.6
5.1
5.4
0.0
0.0
-1.3
CCSSL
98.1
98.1
0.0
0.0
-24.0
50.4
50.4
0.0
0.0
-12.3
24.3
124.3
0.0
0.0
-5,9
T2T
54.0
54.0
0.0
0.0
-13.2
40.6
400.6
0.0
0.0
-9.9
MCTF
51.9
51.3
0.0
0.0
-1.55
60.1
0.0
100.0
100.0
8.9
31.7
0.0
0.0
100.0
-24.4
1OMatch
96.7
96.0
12.7
5.1
-12.5
30.7
0.0
100.0
100.0
8.9
32.4
0.0
100.0
100.0
8.9
OpenMatch
96.3
95.5
7.5
3.6
-16.4
7.1
6.8
14.5
12.4
7.3
25.6
24.99
20.0
19.5
18.4
Ours
94.2
91.0
100.0
96.7
91.3
46.7
33.3
92.6
92.2
38.5
32.2
166.3
91.4
89.9
22.9
B.2. Experimental Results on Categories with Varying Proportions
To assess the impact of the proportions of known, unknown, and classes, we conduct experiments by varying the number of these categories while keeping the total instance count fixed. The results presented in Tab. 8, Tab. 9, and Tab. 10, respectively.
Impact of known classes, We investigate the influence of the number of known classes by setting it to 2, 4, and 6, respectively, as presented in Tab.
The experimental results lead to three key observations: (i) As the number of known classes increases, the performance of all methods declines, primarily due to the increased complexity of the classification task. (ii) For the closed-set task, method shows competitive performance, achieving results comparable to the best- rest-performing methods across various numbers of known classes. (iii) For the open-set task, UCDM achieves the highest balance score across all settings and outperforms all other methods in terms of accuracy for classifying both known and new classes.
These findings underscore the robustness and adaptability of the proposed method in handling varying numbers of known classes across both closed-set and open-set tasks.
Impact of unknown classes. We investigate the effect of varying the number of unknown classes by setting it to 2, 4, and 6, as detailed in Tab. 9.
The experimental results lead to two important observations: (i) UCDM demonstrates robustness to varying numbers of unknown categories, primarily due to its negative instance generation pipeline. By erasing semantic class information from images and generating instances that closely resemble the original ones, this approach ensures effective handling of the challenges posed by different proportions of unknown categories. (ii) UCMD achieves the second-hin highest accuracy for the
20

---

Unsupervised Learning for Class Distribution Mismatch
Table The average accuracy of methods the known class (kno.) for the closed-set task, the balance (bala.), and the accuracy of known (kno.), unknown (unko.), and new classes for the open-set task on the CIFAR-I0 dataset, with varying proportions of known classes. The item "4/2/2" denotes four known classes, two unknown classes, and two new classes. The best and second-best results are highlighted in bold and underlined, respectively.
2/2/2
4/2/2
6/2/2
method
closed-set
open-set
closed-set
open-set
closed-set
open-set
kno.
kno.
unkno. new
bala.
kno.
kno.
unkno.
new
bala.
kno.
kno.
unkno.
new
bala.
D
72.7
72.7
0.0
0.0
-17.7
51.4
51.4
0.0
0.0
-12.5
42.1
42.1
0.0
0.0
-00.3
UASD
79.2
79.2
0.0
0.0
-19.3
56.4
56.4
0.0
0.0
-13.8
42.8
142.8
0.0
0.0
-10.5
CCSSL
96.4
96.4
0.0
0.0
-23.5
79.1
19.1
0.0
0.0
-19.3
65.5
65.5
0.0
0.0
-16.0
T2T
81.4
81.4
0.0
0.0
-19.9
69.6
69.6
0.0
0.0
-17.0
MCTF
62.7
62.7
0.0
0.0
-1.33
61.8
161.9
0.0
0.0
-15.1
52.1
151.9
0.0
0.0
-1.77
OpenMatch
70.2
61.1
49.8
37.9
38.0
68.8
60.1
15.6
34.0
14.2
35.9
24.9
76.7
55.4
26.3
1OMatch
90.0
18..8
7.1
6.1
-13.2
72.0
66.4
12.6
17.4
2.3
56.4
26.77
65.4
54.4
28.9
Ours
93.2
19.9
100.0
98.1
92.5
75.9
69.1
95.2
98.9
71.5
64.3
56.7
96.5
94.4
60.2
Table 9. The average accuracy of methods on the known class (kno.) for the closed-sct task, the balance score (bala.), and the accuracy of known (kno.), unknown (unko.), and new classes open-set task CIFAR-10 dataset, with varying proportions of unknown classes. The item "2/4/2" indicates two known, four unknown, and two new classes. The best and second-best results are highlighted in bold and underlined, respectively.
2/2/2
2/4/2
2/6/2
method
closed-set
open-set unkno.
closed-set kno.
open-set
closed-set set
open-set
kno.
kno.
new
bala.
kno.
unkno.
new
bala.
kno.
kno.
unkno.
new
bala.
DS
72.7
72.7
0.0
0.0
-17.7
67.1
67.1
0.0
0.0
-1..4
71.8
71.8
0.0
0.0
-17.5
UASD
79.2
19.22
0.0
-1.3
79.0
19.0
0.0
-1.3
74.0
74.0
0.0
-18.1
CCSSL
96.4
96.4
0.0
0.0
-23.5
97.2
19.22
0.0
0.0
-23.7
97.0
19..0
0.0
0.0
-23.7
T2T
MCTF
62.7
62.77
0.0
-15.3
65.8
65.8
0.0
0.0
-16.0
54.3
14.33
0.0
0.0
-13.3
OpenMatch
70.2
61.1
49.8
37.9
38.0
76.8
75.9
2.6
3.1
-15.1
75.7
73.5
15.0
11.9
-1.3
1OMatch
90.0
7.1
-13.2
89.4
187.1
6.3
-14.2
187.3
6.2
5.8
-13.8
Ours
93.2
91.9
100.0
98.1
92.5
94.5
19.1
100.0
97.5
89.8
95.9
194.9
100.0
99.2
95.3
Table The average accuracy methods on the known class (kno.) for the closed-set task, balance score (bala.), and the accuracy of known (kno.), unknown (unko.), and new classes for the open-set task the CIFAR-10 dataset, with varying proportions of new classes. item "2/2/4" denotes two known, two unknown, four new classes. best and second-best results are highlighted bold and underlined, respectively.
2/2/2
2/2/4
2/2/6
method
closed-set kno.
open-set
closed-sct kno.
open-set
closed-sct kno.
open-set unkno.
kno.
unkno. new
bala.
kno.
unkno.
new
bala.
kno.
new
bala.
D
72.7
72.7
0.0
-17.7
72.7
72.7
0.0
-17.7
72.7
72.7
0.0
-17.7
UASD
79.2
79.2
0.0
0.0
- -9933
79.2
79.2
0.0
0.0
-19.3
79.2
79.2
0.0
0.0
-19.3
CCSSL.
96.4
96.4
0.0
-23.5
96.4
0.0
-3.55
19.44
-23.5
T2T
MCTF
62.7
62.7
0.0
0.0
-15.3
62.7
62.7
0.0
0.0
-15.3
62.7
62.7
0.0
0.0
-15.3
OpenMatch
70.2
61.1
49.8
37.9
38.0
61.1
49.8
42.2
41.5
61.1
49.8
43.1
42.2
10Match
90.0
87.8
7.1
6.1
-13.2
90.0
87.8
7.1
7.9
-12.1
90.0
187.8
7.1
7.8
-12.1
Ours
93.2
91.9
100.0
98.1
93.2
91.9
100.0
100.0
92.6
93.2
191.9
100.0
100.0
92.6
21

---

Unsupervised Learning for Class Distribution Mismatch
closed-set task and the highest balance score for the open-set task across all settings. This suggests that UCMD remains unaffected by variations in the count of unknown categories.
Impact of new classes. We explore the impact of varying the number of new classes by setting it to 2, 4, and 6, as shown in Tab. 10.
From the results, we observe that UCMD demonstrates strong generalization performance, remaining insensitive to the count of new classes, and achieves the best balance score. This indicates that the proposed method robust changes in the number of new classes and can effectively handle open-set classification tasks.
B.3. Experimental Results on Generated Positive Instances with Varying Parameter oe
We evaluate the impact of random noise strength o, the positive instance generation pipeline by setting it to 0 and (our setting), as shown Fig. 7.
The results show that setting o, 1 yields the best performance in both known-class accuracy the closed-set task and balance score on the open-set task. This indicates that increasing the strength of random noise in the positive instance generation pipeline introduces more diversity into the training process.
closed-set task
open-set task
100
100
known-dlass accuracy (%)
98
98
balance score(%)
96
96
92
92
0
1
0:
0: 1
method
method
Figure 7. Experimental results comparing the generated positive instances with random noise strengths or and a (our setting),
respectively, on CIFAR- 10 with 60% mismatch proportion.
B.4. Experimental Results on Generated Negative Instances with Varying Parameter
We evaluate the impact of random noise strength o, in the negative instance generation pipeline by setting it to 1 and 0.2 (our setting), as shown in Fig. 8.
The results show that setting o; = 0.2 yields the best performance, especially in terms of the balance score. This suggests that using a smaller a, in the negative instance generation pipeline helps achieve a more effective contrast with positive instances.
B.5. Analysis the Sensitivity to Weights in the Loss Function
investigate the impact of the parameters Å and d2, which balance the weights detection and classification tasks, on CIFAR-I0 with a 60% mismatch proportion, illustrated in Fig. To reflect overall performance the open-set task, report the balance score.
The results reveal the following findings: (i) The solid-line trend remains stable across all tasks with varying \1, indicating that performance is largely insensitive to this parameter. However, values between and tend to yield better results. (ii) When 2₂ is set between and 5, the results consistently surpass those achieved with X = 1, particularly in the closed-set task. This suggests that tuning X2 based on the classification task's 's complexity can improve performance. (ii)) The trends observed in the closed-set task align closely with those in the open task, highlighting the interdependence between detection
22

---

Unsupervised Learning for Class Distribution Mismatch
closed-set task
open-set task
100
100
95
95
balance score(%)
acouracy(%)
90
85
80
80
= 1
=
0.2
1
= 0.2
method
method
Figure 8. Experimental results comparing the generated negative instances with random noise strengths = 1 and de = 0.2 (our sctting), respectively, on CIFAR-I0 10 with 60% mismatch proportion.
closed-set task
open-set task
known--lass accuracy (%)
100
100
balance score(%)
90
90
80
weight open task A = 2)
weight of open task (A2 2) weight of closed task Az(A1 1)
70
70
weight closed task (21
2
3
Figure Loss weight configurations.
and classification tasks.
B.6. Evaluation of the Impact of the Batch Normalization Layer Model Training
Several studies (Oliver al., 2018; Zhao et al., 2020; 2021; 2022b;a; 2024c:a) demonstrate the significant impact of noisy data models with batch normalization (BN). Noisy data affects the estimation of the mean and variance during the BN process, leading to poor BN representations and preventing the model from learning optimal BN parameters (Tim and Br.). Therefore, we suggest updating the parameters Yon and Bon when training solely with generated positive and negative instances. This approach helps mitigate the negative impact of instances with incorrect pseudo-labels and enables the model to learn better BN parameters.
Tab. 10 compares our method with variant approach of updating BN during training for the closed-set and open-set tasks on CIFAR-I0 with 60% mismatch proportion. Clearly, our method outperforms the latter both tasks. This demonstrates that training with generated positive and negative instances contributes to learning better BN representations and facilitates more effective model training.
B.7. Evaluation of Pseudo-Label Reliability in Selected Instances
To evaluate the reliability of pssulo-laaells assigned to the selected instances in the confidence- based labeling mechanism, we present the count of instances with accurate pseudo-labels and the count of selected instances on CIFAR-10 under (%% and 75% mismatch proportions in Fig. 11
From the results, we have the following two findings.
(i) The proportion instances with accurate pseudo-labels relative to the selected instances is consistently high under both
23

---

Unsupervised Learning for Class Distribution Mismatch
100
accuracy (%)
60
40
ours
update batch normalization layer
closed-set
known
unknown
new
balance
Figure 10. Ablation study of batch normalization layer.
2000
class 0
incorrect pseudo labels
class 0
correct pseudo- labels
Sample count
class incorrect paeudo-labels
1500
class correct pseudo labels
class 2
incorrect pseudo-labals
class 2 correct pesudo-labels
1000
500
0
2
4
7
Sample labeling rounds
(a) 0% mismatch proportion.
600
class 0
incomrect pseudo-labels
class correct pseudo labels
Sample count
class 1 Incorrect psaudo-lsbels
class 1 correct pseudo-labels
400
class 2 incomrect pseudo-labels
class 2 correct psoudo-labels
200
0
0
3
4
7
8
Sample labeling rounds
(b) 75% mismatch proportion.
Figure 11. Counts of selected samples and correctly beeudollbbeld samples categories for each selection round, with class representing the unified other category in testing, including both unknown classes from the training data and new classes introduced during testing.
24

---

Unsupervised Learning for Class Distribution Mismatch
0% and 75% mismatch proportions, highlighting the effectiveness of the confidence-based labeling. Notably, under 0% mismatch proportion, instances in class 2 have accurate pseudo-labels, all instances belong to the known classes.
(ii) As the selection rounds progress, the number of selected instances decreases, while the proportion of instances with accurate pseudo-labels among the selected instances increases. This indicates that the model becomes more stable over successive rounds.
B.8. Visualization of Generated Positive Images from Random Noise
We compare the positive instances generated by UCDM, starting from the seed sample, with those produced using conditional guidance starting from random noise, as shown in Fig. 12.
Notably, the positive instances generated by UCDM not only exhibit the semantic class specified in the prompt but also preserve the style of the seed sample, effectively mitigating the potential negative impact of domain shift.
Meanwhile, the "papillon" images correspond to dog in the original image, while the randomly generated images depict butterfly. This discrepancy arises from polysemy-mulippe semantic meanings physical instantiations of class names used as prompts. However, our method starts from the latent of the original image, exhibiting the expected semantics.
original
UCDM
random
original
UCDM
random
[CLASS]] " dduck"
[CLASS]: "sky"
[CLASS]: "cat"
[CLASS]: "papillon"
[CLASS]: "dog" "
[CLASS]:
"crown"
[CLASS] is unrelated to the semantic original picture
[CLASS] is related to the semantic of original image
Figure 12. Visualization of positive instances generated by UCDM and random noise, with the prompt "A photo of [CLASS]" The specific "[CLASS]" is indicated below each image.
B.9. Visualization of Generated Negative Images from Random Noise
We compare the negative instances generated by UCDM with those produced using unconditional guidance starting from random noise, as shown in Fig. 13.
is evident that when the semantic class in the images unrelated to the prompt, UCDM tends to preserve the semantics of the original image. In contrast, when the semantic class in the image matches the prompt, UCDM effectively erases the semantic class. However, the randomly generated images fail achieve this behavior.
25

---

Unsupervised Learning for Class Distribution Mismatch
original
UCDM
random
original
UCDM
random
[CLASS]: "cat"
[CLASS]:
[CLASS]: "dog"
[CLASS]:
[CLASS]: "cat"
[CLASS]]
[CLASS]: "apple" [CLASS]:
[CLASS]: "cat"
[CLASS]:
[CLASS]: "violin"
[CLASS]: ""
[CLASS] unrelated to the semantic class of original image
[CLASS] is related to the semantic of original image
Figure 13. Visualization of negative instances generated by UCDM, with the prompt "A photo of [CLASS]", and random noise, The specific "[CLASS]" is indicated below each image.
26

---

Unsupervised Learning for Class Distribution Mismatch
1010. Visualization of Generated Positive Images with Varying Parameter or
We present visualizations of positive instances generated by UCDM under varying levels of random noise strength (at). with the prompt set to "A photo of a [CLASS]", as shown in Fig. 14.
From the results, we observe that as the random noise strength o; increases, the generated images exhibit greater diversity while preserving the style and key visual characteristics, such as structure and color, of the original ones.
original
o = 0.0
0, = 0.2
0, = 0.4
0 = 0.6
0, = 0.8
0, = 1.0
creating semantic class "automobile"
creating semantic class "dog"
creating semantic class "man"
creating semantic class "cat"
Figure 14, Visualization of positive instances generated by UCDM under varying random noise strengths (o,), with the prompt "A photo of [CLASS]" Here, "[CLASS]" is specified as "automobile", "dog". "man", and "cat".
B.11. Visualization of Generated Negative Images with Varying Parameter de
We visualize the negative instances generated by UCDM under varying levels of random noise strength (oz), with the prompt set to "A photo of a dog", in Fig. 15.
The results indicate that as the random noise strength a, increases, the discrepancy between the generated image and the original one also grows. For images that do not match the semantic class, the original image may become distorted when a: 0.4. Conversely, for images that do match the semantic class, the visual fidelity of the generated images improves.
27

---

Unsupervised Learning for Class Distribution Mismatch
original
0, 0.0
0, = 0.2
0, = 0.4
0 0.6
0, 0.8
0, = 1.0
Erasing semantic class "dog"
Figure 15. Visualization of negative instances generated by UCDM under varying random noise strengths (ot). with the prompt "A photo of dog".
28

---

Unsupervised Learning for Class Distribution Mismatch
B.12. Visualization of DDIM Inversion and Negative Instances Generation in UCMD
We compare our generated negative instance with instances generated using DDIM inversion and unconditional reverse, as shown in Fig. 16.
As illustrated in Fig. 16, the difference between DDIM inversion and conditional inversion creates distinct gap between the two generated images, Our negative generation pipeline effectively erases the semantic class, while DDIM inversion preserves the original image. This demonstrates that the semantic class erased conditional inversion, as formally stated in Theorem 3.1.
DDIM
unconditional
inversion
reverse
conditional
unconditional
inversion
reverse
DDIM
unconditional
inversion
reverse
conditional
unconditional
inversion
reverse
DDIM
unconditional
inversion
reverse
conditional
unconditional
inversion
reverse
Figure 16. Visualization of negative instances generated by UCDM and DDIM inversion, using the prompt "A photo of a [CLASS]." Here, [CLASS] is set to "A photo of [CLASS]". Here, [CLASS] set "dog". "hot air balloon". and "tree". respectively.
29

---

Unsupervised Learning for Class Distribution Mismatch
B.13. Visualization of Generated Positive and Negative Images in UCMD
We present visualizations of the positive and negative instances generated by UCDM in Fig. 17, Fig. 18, Fig. 19, and Fig. 20, using seed samples from the ImageNet (Deng et al., 2009) dataset.
The results demonstrate that our negative instance generation pipeline effectively removes the semantic class from the images while preserving the original image characteristics if they do not match the semantic class.
In addition, our positive instance generation pipeline produces instances that retain the style of the original image and accurately reflect the semantic class specified in the prompt. Furthermore, the generated positive instances exhibit diversity.
negative generation pipeline: erasing semantic class deer
original
dog
horse
bird
cat
positive generation pipeline: creating semantic class
negative generation pipeline: erasing semantic class
original
dog
deer
horse
bird
cat
positive generation pipeline: creating semantic class
Figure Visualization of positive and negative instances generated by UCDM. where the seed sample a bird, semantic classes such as "dog", "deer", "horse", "bird", and "cat" are created or erased using the prompt "A photo of [CLASS]".
30

---

Unsupervised Learning for Class Distribution Mismatch
negative generation pipeline: erasing semantic class
original
dog
deer
horse
bird
cat
MANAUUCA
positive generation pipeline: creating semantic class
negative generation pipeline: erasing semantic class
original
dog
deer
horse
bird
cat
positive generation pipeline: creating semantic class
Figure Visualization positive and negative instances generated by UCDM, where seed sample airplane, and semantic classes such "dog", "deer", "horse", "bird", and "cat" are created or erased using the prompt "A photo of a [CLASS]".
31

---

Unsupervised Learning for Class Distribution Mismatch
negative generation pipeline: erasing semantic class
original
dog
deer
horse
bird
cat
positive generation pipeline: creating semantic class
negative generation pipeline: erasing semantic class
original
dog
deer
horse
bird
cat
positive generation pipeline: creating semantic class
Figure Visualization of positive and negative instances generated by UCDM, where the seed sample a car, and semantic classes such "dog". "deer", "horse", "bird", and "cat" are created or erased using the prompt "A photo of [CLASS]".
32

---

Unsupervised Learning for Class Distribution Mismatch
negative generation pipeline: erasing semantic class dog
original
deer
horse
bird
cat
GONINIC ESTPE
CON OTTONO
positive generation pipeline: creating semantic class
negative generation pipeline: erasing semantic class dog
original
deer
horse
bird
cat
positive generation pipeline: creating semantic class
Figure Visualization of positive negative instances generated by UCDM, where seed sample a hot balloon, semantic
classes such "dog", "deer", "horse", "bird", and "cat" are created or erased using the prompt "A photo of a [CLASS]".
33

---

Unsupervised Learning for Class Distribution Mismatch
B.14. Visualization of generated harder training pairs
By designing more specific prompts to critical features, generate harder training pairs with high visual similarity and improved contrast. As shown in Fig. 21, this highlights the effectiveness of UCDM in producing challenging examples for training.
positive
seed
negative
positive
seed
negative
buttons
erase
alarm clock
erase pointer
hole
positive
seed
negative
positive
seed
negative
laptop
erase keyboard
gloves
erase finger
highly similar positive and negative samples
highly similar positive and negative samples
Figure 21. Generated hard training pairs where positive and negative instances are highly similar. Negative instances are created by guiding the generation process with carefully designed prompt, such "erase hole from button." This approach removes crucial features from seed samples and shifts the original semantics.
34

---

Unsupervised Learning for Class Distribution Mismatch
C. Experimental Settings
The section provides detailed overview of the datasets and training procedures.
C.1. Dataset Details
This section provides detailed information about the datasets, including CIFAR-10 (Krizhevsky et al., 2009), CIFAR- 100 (Krizhevsky et al., 2009), and Siny-ImageNet (Deng et al., 2009). The CIFAR-IO and CIFAR-I00 100 dataset comprises 50,000 training and 10,000 testing images of 10 and 100 categories, respectively. Tiny-mmagNNet is the subset of ImageNet that contains 100,000 training and 10,000 testing images across 200 categories.
The known, unknown, and new classes in CIFAR-10, CIFAR-100, and Tiny-ImageNet are detailed in Tab. 11, Tab. 12, and Tab. 13, respectively. Additionally, Tab. 14 and Tab. 15 present the instance counts for known, unknown, and new classes across the training and testing sets of CIFAR-I0, CIFAR- 100, and Tiny-ImageNet, respectively.
Table 11. The class names of known, unknown, and new classes in CIFAR-10.
type
class name
known class airplane, automobile bird, cat, deer, dog, frog,
unknown class
new class
horse, ship, truck
Table 12, The class names of known, unknown, and new classes in CIFAR 100.
type
class name
bear, camel, cattle, chimpanzee, flatfish, girl, house, keyboard, leopard, lion, mouse, poreupine, possum, rabbit, raccoon, shrew, skunk, squirrel, tiger, wolf, apple, aquarium fish, baby, beaver, bed, bee, bectle, bicycle, bottle, bowl, boy. bridge, bus, butterfly, can, castle, caterpillar, chair, clock, cloud, cockroach, couch, crab, crocodile, cup, dinosaur, dolphin, elephant, forest, fox, hamster, kangaroo, lamp, lawn mower, lizard, lobster, man, maple tree, motorcycle, mountain, mushroom, oak tree, orange, orchid, otter, palm tree, pear, pickup truck, pine tree, plain, plate, poppy, ray, road, rocket, sea, seal, shark, skyscraper, snail, snake, spider, streetcar, sunflower, sweet pepper, table, tank, telephone, television, tractor, train, trout, tulip, turtle, wardrobe, whale, willow tree, woman, worm
known class
unknown class
new class
35

---

Unsupervised Learning for Class Distribution Mismatch
Table 13. The class names known, unknown, and new classes in Tiny-ImageNet.
type
class name
goldfish, fire salamander, American bullfrog, tailed frog, American alligator, boa constrictor, trilobite, scorpion, southern black widow, tarantula, centipede, goose, koala, jellyfish, brain coral. snail, slug, sea slug, American lobster, spiny lobster
known class
black stork, king penguin, albatross, dugong, Chihuahua, Yorkshire Terrier, Golden Retriever, Labrador Retriever, German Shepherd Dog, Standard Poodle, tabby cat, Persian cat, Egyptian Mau, cougar, lion, brown bear, ladybug, fly, bee, grasshopper, stick insect, cockroach, praying mantis, dragonfly, monarch butterfly, sulphur butterfly, sea cucumber, guinea pig, pig. ox, bison, bighor sheep, gazelle, arabian camel, orangutan, chimpanzee, baboon, African bush elephant, red panda, abacus, academic gown, altar, apron, backpack, baluster/ handrail, barbershop. barn, barrel, basketball, bathtub, station wagon, lighthouse, beaker, beer bottle, bikini, binoculars, birdhouse, bow tic, brass memorial plaque, broom, bucket, high-speed train. butcher shop, candle, cannon, cardigan, automated teller machine, CD player, chain, storage chest, Christmas stocking, cliff dwelling, computer keyboard, candy store, convertible, construction crane, dam, desk, dining table, drumstick dumbhell, flagpole, fountain, freight car, frying pan, fur coat, gas mask or respirator, go-kart, gondola, hourglass, iPod, rickshaw, kimono, lampshade, lawn mower, lifehoat, limousine, magnetic, compass, maypole, military uniform, miniskirt, moving van, metal nail, neck brace, ohelisk, oboe, pipe organ, parking meter, payphone, picket fence, pill bottle, plunger, pole, police van, poncho, soda bottle, potter's wheel, missile, punching bag, fishing casting reel. refrigerator, remote control, rocking chair, rugby ball, sandal, school bus, scoreboard, sewing machine, snorkel, sock, sombrero, space heater, spider web, sports car, through arch bridge, stopwatch, sunglasses, suspension bridge, swim trunks / shorts, syringe, teapot, teddy bear, thatched roof, torch, tractor, triumphal arch, trolleybus, turnstile, umbrella, vestment, viaduct, volleyball, water jug, water lower, wok, wooden spoon, comic book, plate, guacamole, ice cream, popsicle, pretzel, mashed potatoes, cauliflower, bell pepper, mushroom, orange, lemon, banana, pomegranate, meatloaf, pizza, pot pie, espresso, mountain, cliff, coral reef, lakeshore, beach, acorn
unknown class
new class
Table 14. The counts of instances for known (kno.) and unknown (unkno.) classes in the training sets of CIFAR-10, CIFAR-100, and Tiny-ImageNet datasets, with mismatch proportions ranging from 0% to 75%.
category
20%
40%
60%
75%
dataset
kno. unkno.
kno.
unkno.
kno.
unkno.
kno.
unkno.
kno.
unkno.
kno.
unkno.
CIFAR-10
2
5
10,000
0
10,000
2,500
10,000
6,667
10,000
15,000
10,000
3,0000
CIFAR-100
20
60
10,000
10,000
2,500
10.000
6.667
10,000
15,000
10,000
3,0000
Tiny- Einy-ImageNet
20
80
10,000
0
10,000
2,500
10,000
6.667
10,000
15,000
10,000
3,0000
Table 15. The counts of instances for known (kno.), unknown (unkno.), and new classes in the testing sets of CIFAR-1O, CIFAR- 100, and Tiny-ImageNe datasets.
category unkno.
count unkno.
dataset
kno.
new
kno.
new
CIFAR-10
2,000
2,000
2,000
CIFAR-100
20
60
20
2,000
2,000
2,000
Tiny-ImageNet
20
80
100
1,000
1,000
1,000
36

---

Unsupervised Learning for Class Distribution Mismatch
C.2. Training Details
The details of generation pipelines and classifier training are shown in Tab. 16 and Tab, 17, respectively.
Table 16. Details of generation pipelines.
config
value
model
stable diffusion 2.0 model (Romhach al., 2022)
prompt Cy
photo of [CLASS]
inference steps
20
text guidance strength
7.5
random noise strength (positive pipeline) (o+)
1.0
random noise strength (negative pipeline) (arx)
0.2
Table 17. Details of classifier training.
config
value
model
WideResNet-28-2 (Zagoruyko & Komodakis, 2016)
data augmentation
random horizontal flipping and normalization optimized over the initial 100 iterations Adam
batch normalization
optimizer
epoch
400
input size
32 x 32
batch size
learning rate
5 10
loss weight A
loss weight (2(CIFAR-100 10)
2
loss weight As(CIFAR-100) loss weight
5
20
interval for confidence-basee labeling (in epochs)
every 40 epochs
infidence-basedd labeling round
10
37


Reviews:
[{"review_id": "Aa1szPhE36", "reviewer": "Reviewer_ikXz", "summary": "The paper addresses the problem of class distribution mismatch (CDM), where training and target task class distributions differ.\nPrevious methods rely on labeled data in semi-supervised settings, limiting applicability.\nThe authors propose ​Unsupervised Learning for CDM (UCDM), which uses a diffusion model to synthesize positive-negative instance pairs from unlabeled data.", "questions": "", "limitations": "", "rating": 2, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "> Q1: Rationale behind the proposed motivation: While positioned as an unsupervised method, the use of a conditional diffusion model to generate positive-negative instance pairs appears to implicitly incorporate label information through the class-conditional generation process. This creates potential ambiguity in maintaining true unsupervised learning principles, as conventional unsupervised approaches (e.g., self-supervised learning) typically evaluate through linear probing without explicit class guidance during representation learning.\n\nThank you for your insightful question.\n\nOur problem and method align with unsupervised learning **as defined in Deep Learning[1]**. Additionally, **class-conditional generation** and **explicit class guidance** in unsupervised learning have been extensively **explored in existing studies** across various tasks.\n\n+ **Definition of unsupervised learning**: Our method trains the classifier with generated images and pseudo-labels **without any human annotation**, **following Deep Learning[1]**, which defines unsupervised learning as \"most attempts to extract information from a distribution that does not require human labor to annotate examples.\"\n\n+ **With class-conditional generation:** Our approach aligns with **unsupervised domain adaptation[4,5]**, where **class names** and **conditional diffusion models generate target data** for training. This further confirms that introducing class-conditional generation is still considered unsupervised.\n\n+ **With explicit class guidance in unsupervised learning:** The \"class name\" setting in our method is commonly adopted in the unsupervised fine-tuning of multimodal models [2,3], where models are adapted to unlabeled target data, assuming **target class names are known**, but the mapping to the unlabeled data is not. Accordingly, this assumption is rational as well as widespread.\n\nWe summarize the **commonalities** between existing unsupervised studies and our work as follows.\n\nmethod  | class names known | unsupervised |conditional diffusion model\n-|-|-|-\nPouf [2]| ✅ | ✅ | ❌（pretrained CLIP）\nUEO [3]|✅ | ✅ | ❌（pretrained CLIP）\nDATUM [4] | ✅ | ✅ | ✅\nDACDM [5] | ✅ | ✅ | ✅\nours | ✅ | ✅ | ✅\n\n\n**Conclusion:**\n\nOur method adheres to the principles of unsupervised learning, as it **does not rely on manually annotated labels**. \n\n\nWe greatly appreciate your valuable feedback, we will **supplement the following description in paragraph 4 of Section 1:** \"In this context, we aim to construct positive-negative pairs for training the classifier without any human annotation, adhering to the unsupervised learning setting [1].\".\n\n\n\n**Reference:**\n\n[1] Deep learning. Cambridge: MIT press 2016.\n\n[2] Pouf: Prompt-oriented unsupervised fine-tuning for large pre-trained models. ICML 2023.\n\n[3] Realistic Unsupervised CLIP Fine-tuning with Universal Entropy Optimization. ICML 2024.\n\n[4] One-shot unsupervised domain adaptation with personalized diffusion models. CVPR 2023.\n\n[5] Domain-guided conditional diffusion model for unsupervised domain adaptation.\nNeural Networks 2025.\n\n\n> Q2: Figure clarity: Figure 3 is overly complex and difficult to follow; simplifying the training diagram would improve readability.\n\n\nThank you for your helpful suggestion. \n\nFigure 3 illustrates the **classifier training pipeline** based on unlabeled data and generated instances.  To facilitate readability, we have **simplified the figure in the revised version, highlighting the following three stages**:\n   - **Stage 1:** Generated positive and negative instances are used to **create training pairs** for classifier training, following Eq. (9).  \n   - **Stage 2:** The trained classifier(frozen) **selects confident real images from unlabeled data for pseudo-labeling**, using Eq. (10) and Eq. (11).\n   - **Stage 3:** Training pairs are **constructed using both selected and generated data**, and the classifier is further trained following Eq. (12), similar to Stage 1.  \n\nThe updated figure can be found at https://anonymous.4open.science/r/Rebuttal-UCDM-7787/Figure3-Simplified%20framework.pdf. Please feel free to check it.", "claims_and_evidence": "Yes, the claims are supported by clear and convincing evidence.\n\n**Superiority over semi-supervised methods**: Results in Tables 1–4 show consistent improvements across datasets and mismatch proportions.\n\n**Label-free effectiveness**: Ablation in Fig. 4(b) demonstrates UCDM outperforms labeled baselines.", "methods_and_evaluation_criteria": "My primary concern lies in the **rationale behind the proposed motivation**: While positioned as an unsupervised method, the use of a conditional diffusion model to generate positive-negative instance pairs appears to implicitly incorporate label information through the class-conditional generation process.\nThis creates potential ambiguity in maintaining true unsupervised learning principles, as conventional unsupervised approaches (e.g., self-supervised learning) typically evaluate through linear probing without explicit class guidance during representation learning.", "theoretical_claims": "Yes, I checked the correctness of the proof for the Theorem 3.1.", "experimental_designs_or_analyses": "Yes, the experimental designs and analyses are sound and valid.\n\n**Comprehensive evaluation**: Covers both closed/open-set tasks across multiple datasets.\n\n**Ablation studies**: Tests loss components (Fig. 4a) and instance generation strategies (Table 5).", "relation_to_broader_scientific_literature": "The work connects to: Semi-supervised CDM methods and Diffusion models.", "essential_references_not_discussed": "No critical omissions detected in cited literature.", "other_strengths_and_weaknesses": "Figure clarity: Figure 3 is overly complex and difficult to follow; simplifying the training diagram would improve readability.", "other_comments_or_suggestions": "No additional comments.", "questions_for_authors": "None.", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "AUds5HjRv2", "reviewer": "Reviewer_d4vy", "summary": "The paper deals with learning with synthetic data from a stable diffusion model with labels that are obtained from prompting the model. The generated labels are only partially available to the model, i.e. the data is split in three subsets \"known\", \"unknown\" and \"knew\", where the known label categories are available during training time, while unknown and new labels are not known. However, data from the unknown category is available during training, while that of 'new' aren't. The main contribution of the authors approach is the generation of positive and negative pairs, on which the classifier then is trained contrastively. These pairs are obtained by a novel noising / denoising strategy, where for the negative sample the denoising is performed with respect to a non task specific score function in the diffusion process, whereas for the positive sampling the denoising is conditional. The formulae for the respective drift terms in the stochastic equations are derived.\nThe authors then eveluate their models on three datasets (Cifar10, Cifar100 and Tiny imageNet). The task is to classify the knowns correctly and to push the unknowns and new categories in an unknown class. The authors compare their model with various competitor models and find competitive performance for their own model that is often as good or better than the SOTA. Ablation studies on the various components are provided.\n\n# # will raise score by one, as the authors provided new evidence that the noise terms are nearly constant in practice supporting their assumptions. Also the mathematical notation in the proofs has improved, although I'm still lacking a formal argument, why the delta-terms should be small  (and in which sense)", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "> Q1:Unvalidated assumptions of noise estimators.\n\nThanks for your question. \n\nThe assumption **follows existing works[1,2,3]**. We further **verify its validity** as follows.\n+ **Same assumption in DDIM and DDIM inversion.** DDIM[1] solves diffusion ODEs via **forward Euler, where $\\epsilon(\\mathbf{x}\\_t,t)\\approx\\epsilon(\\mathbf{x}\\_{t-1},t)$**. DDIM inversion applies the same in reverse[2,3]. The approximation quality depends on $\\mathbf{x}\\_t-\\mathbf{x}\\_{t-1}$ and $\\epsilon\\_{\\theta}$’s sensitivity to $\\mathbf{x}\\_t$[2]. \n+ **Validation.** We analyze the **discrepancy between $\\epsilon(\\mathbf{x}\\_t, t)$ and $\\epsilon(\\mathbf{x}\\_{t-1}, t)$**, measured by ***1-cosine similarity***, over 20 DDIM steps. Results show **near-perfect alignment**, consistent with **Fig.S10 in [3]**.  \nstep|1|2|3|4|5|6|7|8|9|10|11|...|14|15|...|19|20\n-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-\n**condition**|4e-2|3e-2|2e-2|2e-2|1e-2|8e-3|5e-3|3e-3|3e-3|2e-3|2e-3|...|2e-3|1e-3|...|1e-3|4e-4\n**uncondition**|4e-2|3e-2|2e-2|2e-2|1e-2|8e-3|5e-3|3e-3|3e-3|3e-3|2e-3|...|2e-3|1e-3|...|1e-3|4e-4\n\nIn the revision, we will **supplement this validation to Appendix A.7**.\n\n**Reference:**\n\n[1] Denoising Diffusion Implicit Models,ICLR 2021.\n\n[2] Fixed-point inversion for text-to-image diffusion models,CoRR 2023.\n\n[3] Edict: Exact diffusion inversion via coupled transformations,CVPR 2023.\n\n> Q2:Competitor models yield 0 precision on sub-tasks, raising model selection concerns.\n\nThanks for your question. \n+ **Our method and all compared ones focus on class distribution mismatch(CDM)**, ensuring a fair and reasonable comparison. \n+ **Two key factors** explain the poor performance: \nmethod|reason for poor accuracy  \n-|-  \n$\\text{DS}^3\\text{L}$, UASD, CCSSL, T2T|**Designed for closed-set task**, unable to handle unknown or new classes  \nMCTF, IOMatch, OpenMatch|**Dependence on labeled data** causes imbalanced accuracy across known, unknown, and new classes  \n+ The **Unsupervised CDM setting is newly proposed**, and the performance gap highlights our method's strength in tackling this problem.\n\n> Q3: Small size of used datasets. \n\nThanks for your suggestion. \n\nWhile we **follow the same dataset evaluation as recent works**, we have additionally **evaluate on a larger dataset** to further validate the effectiveness of our method, as recommended.\n+ **Dataset selection:** The datasets used are common in recent studies, ensuring fairness. ImageNet-30(39k images, 30 classes) used in some methods are smaller than Tiny-ImageNet(100k images, 200 classes) in our study.\nmethod|CIFAR10|CIFAR100|Tiny-ImageNet|Larger dataset\n-|-|-|-|-\n$\\text{DS}^3\\text{L}$|✅|❌|❌|❌\nIOMatch|✅|✅|ImageNet-30|❌\nOpenMatch|✅|✅|ImageNet-30|❌\nMCTF|✅|❌|✅|❌\nUASD|✅|✅|✅|❌\nours|✅|✅|✅|✅(below)\n+ **Large-scale evaluation:** We test on 763,577 images from a combination of CIFAR10, SVHN, Flower-102, and Food-101 datasets. Results show our method **performs well on large datasets**.\nmethod|close(acc.)|open(kno.)|open(unkno.)|open(new.)|open(bala.)\n-|-|-|-|-|-\nCCSSL|57.7|57.7|0|0|-14.1\nT2T|60|60|0|0|-15.6\nIOMatch|46.7|20.4|36.3|75.6|15.7\nOpenMatch|19.8|17.7|18.9|12.5|13\nours|53|48.3|100|83.4|50.8\n\n> Q4:Small image sizes in experiments.\n\nThanks for your suggestion. \n\nThe image size **follows prior works** like MCTF and UASD. As recommended, we **test on Tiny-ImageNet with $224 \\times 224 \\times 3$**, and the results show **similar trends** to those in the paper:\nmethod|close(acc.)|open(kno.)|open(unkno.)|open(new.)|open(bala.) \n-|-|-|-|-|-\nCCSSL|24.2|24.2|0|0|-5.9 \nT2T|27.5|0|0|0|-6.7 \nIOMatch|31.8|5.8|96.6|96.6|13.9 \nOpenMatch|9.5|8.6|6.4|7.8|6.5 \nours|35|14.5|88.8|87.8|21.1 \n\n> Q5:Relation to domain generalization(DG) and its competitiveness.\n\nThanks for your suggestion. \n\nWe compare our setup with DG and open DG to clarify key differences and also compare it with a representative open DG method.\n\n+ **Relation to DG.**  DG handles **domain shifts** (e.g., cartoon vs. natural images) **without class mismatch**. Open DG adds class mismatch but **requires labeled data from multiple domains**, while our setup is based entirely on unlabeled data.\nproblem|unlabeled data|training set domains|train-test class mismatch|data shift\n-|-|-|-|-\nDG|❌|≥ 1|❌|✅ \nOpen DG|❌|>1|✅|✅ \nours|✅|1|✅|❌\n+ **Comparison with open DG method DAML[1]** on cross-dataset. Unlike ours, **DAML is fully supervised** with ground truth for all data, including unknown classes—an ideal but **unrealistic scenario for unsupervised methods**. Even so, our method achieves **comparable accuracy on unknown and new classes**, showing its effectiveness without labeled data.\nmethod|close(acc.)|open(kno.)|open(unkno.)|open(new.)|open(bala.)\n-|-|-|-|-|-\nDAML|81.5|62.3|99.9|85.5|63.6\nours|53|48.3|100|83.4|50.8\n\nWe appreciate this suggestion and will **supplement a DG review and this experiment in the revised version**.\n\n**Reference:**\n\n[1] Open domain generalization with domain-augmented meta-learning,CVPR 2021.", "claims_and_evidence": "The claims are supported by mathematical theorems, which are however partially require assumptions on the noise estimators that are not checked and are rather loosely formulated (noise estimators over several steps are approximately constant). The numerical evidence given is a little strange, as many competitor models do not work at all on some sub-tasks (0-precision entries in tables), which permits the question if the comparison with these models is well chosen.", "methods_and_evaluation_criteria": "The evaluation on three datasets is ok, but all of them are small. Some competitor models seem not to perform at all on the given task.", "theoretical_claims": "I found the Theorems 3.1 and 3.2 hard to evaluate, as the validity of the assumptions is unclear. Theorem 3.1 is from prior work. The calculation leading to Theorem 3.2 itself is ok.", "experimental_designs_or_analyses": "The Experiments only deal with rather small image sizes - experiments on the proper ImageNet would have made the case stronger.", "relation_to_broader_scientific_literature": "The relation to the broader literature is well done.", "essential_references_not_discussed": "None that I have in mind.", "other_strengths_and_weaknesses": "The set up here is close to domain generalization from syn to real and a look into the literature in this feield would be a nice idea.", "other_comments_or_suggestions": "If the conditions of the theorems can not be properly stated, one perhaps should not call these theorems. An at least empirical checking of the validity of assumptions would be solicited. I have the feeling that a strorng DG metod could be rather competitive in this field. \n\nThe style of writing is sometimes unclear and should be improved.\n\nThis review should be seen as a low confidence review.", "questions_for_authors": "None.", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "Pn6qsxEACq", "reviewer": "Reviewer_Zj2u", "summary": "This paper proposes an Unsupervised Learning for Class Distribution Mismatch (UCDM), which constructs positive-negative pairs from unlabeled data for classifier training. The method randomly samples images and uses a diffusion model to add or erase semantic classes, synthesizing diverse training pairs. Extensive experiments on three datasets demonstrate UCDM’s superiority over previous semi-supervised methods.\n\n## update after rebuttal\nI appreciate the authors' detailed response. I will maintain the current positive score.", "questions": "", "limitations": "", "rating": 4, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "> Q1: For small Weaknesses, \"Imagenet: A large-scale hierarchical image database.\" appears twice in the references.\n\nThank you for your careful review. We will correct this in the final version.\n\n\n> Q2: How can authors effectively ensure that the generated images are truly positive or negative samples for generating tasks?\n\nThank you for your insightful question. \n\nOur **theoretical analysis** ensures that the generated images are truly positive or negative samples. Furthermore, our **experimental results** as well as **visualizations** further verify this. The details are presented below:\n\n+ **Theoretical analysis:** Theorem 3.1 and 3.2 guarentee that our method can erase semantics in images for negative instance generation. For positive instances, we exploit a conditional diffusion model, starting from a seed sample-based initialization, to ensure the generated images resemble data distributions and exhibit the target semantics.\n+ **Experimental results:** If the generated images contained a high proportion of false positives or false negatives, the performance would be unsatisfactory. As shown in the ablation study in Figure 4(a), **utilizing only the generated images to train the classifier improves performance**, quantitatively confirming the correctness of the generated images.\n+ **Visualizations:** Section B.13 in the Appendix demonstrates that the generated images **closely align with the expected characteristics** of positive and negative samples, providing qualitative validation of the label correctness of the generated images.\n\n**Conclusion:**\n\nIn the revision, we will **include the above analysis in the conclusion of Section 3.4 as follows:** \"The theoretical analysis outlined in Theorems 3.1 and 3.2, along with the diffusion-driven approach for positive instance generation, confirms the reliability of both the generated negative and positive instances. This is further supported by the experimental results in Sec. 4.3 and the visualizations presented in Appendix B.13.\".\n\n> Q3: Have the authors explored how to generate hard samples in the proposed method, namely those that are more helpful in improving model performance?\n\nThank you for your insightful question!\n\nWe incorporate hard samples into training through a **confidence-based labeling module that identified difficult real instances**, as shown in Section 3.5. These hard examples are then paired with generated images for training. By progressively **lowering the confidence threshold, increasingly difficult examples** are introduced during training. The results of our exploration of this approach are presented below:\n\n**Experimental results:**\n\n+ The ablation study results (Figure 4(a)) show that integrating these **hard training pairs effectively improves performance** (pink bar), particularly when compared to training solely with generated images (green bar).\n+ As shown in Figure 4(c), incorporating **an excessive number of harder samples** (by lowering the confidence threshold) **leads to unstable performance**. This is because the pseudo-labels for hard samples are assigned based on the classifier's predictions. When too many hard samples are included, the risk of incorrect pseudo-labels increases, leading to performance instability.\n\n**Future exploration:**  \n\nThank you for the valuable suggestion. Your insight motivates us to further refine **positive and negative instance generation** to construct **harder training pairs**. This can be achieved by **designing more specific prompts** to erase critical features, improving the contrast between positive and negative samples.  \n\nWe **have already generated highly similar positive and negative pairs** and provide examples in https://anonymous.4open.science/r/Rebuttal-UCDM-7787/Figure-Generated%20hard%20training%20pairs.pdf. We plan to further explore this direction in future work.", "claims_and_evidence": "Yes, as the authors have stated, the experimental results presented demonstrate UCDM’s superiority over previous semi-supervised methods. Specifically, with a 60% mismatch proportion on Tiny-ImageNet dataset, our approach, without relying on labeled data, surpasses OpenMatch (with 40 labels per class) by 35.1%, 63.7%, and 72.5% in classifying known, unknown, and new classes.", "methods_and_evaluation_criteria": "Yes, exploring class distribution mismatch in an unsupervised manner does have certain significance.", "theoretical_claims": "Yes, the proposed method operates without ground truth labels in the training data and utilizes only a predefined set of class names from known classes.", "experimental_designs_or_analyses": "Yes, it is a reasonable design to test separately on closed-set and open-set tasks.", "relation_to_broader_scientific_literature": "Class distribution mismatch is a valuable field, and solving this problem in an unsupervised manner is a direction worth exploring. However, due to my limited knowledge in this field, I am unable to identify the relationship between this work and other existing works.", "essential_references_not_discussed": "No", "other_strengths_and_weaknesses": "The overall description of the manuscript is clear, and unsupervised class distribution mismatch is a meaningful task. For small Weaknesses, \"Imagenet: A large-scale hierarchical image database.\" appears twice in the references.", "other_comments_or_suggestions": "No", "questions_for_authors": "1. How can authors effectively ensure that the generated images are truly positive or negative samples for generating tasks?\n2. Have the authors explored how to generate hard samples in the proposed method, namely those that are more helpful in improving model performance?", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Meta-review: The paper uses a diffusion model to construct positive-negative pairs from unlabeled data for classifier training to handle class distribution mismatch. The paper received three reviews and an author rebuttal was submitted. The basis of noise estimator approximations in the theoretical justifications is initially questioned by d4vy, but deemed to be satisfactory with the rebuttal clarifications. The additional experimental results for larger datasets and higher resolution images were also acknowledged to be sufficient. Zj2u supports acceptance based on the presentation and the author rebuttal well-addresses the question on utilization of hard samples. The validity of calling the method unsupervised is questioned by ikXz given the use of a conditional diffusion model that may incorporate the label definition, which the author rebuttal clarifies as a terminology used in prior literature with the intent that no human annotation is used. This is an acceptable position, but the authors are encouraged to include the rebuttal clarifications in a revised version. In balance, the ACs agree with the reviewer majority that the paper brings novel technical contributions and is sufficiently supported by empirical observations. So, the paper is recommended for acceptance at ICML. The authors are encouraged to include the further clarifications and experiments from the rebuttal in the final version of the paper.
Decision: Accept (poster)