Title: Towards Distribution-Agnostic Generalized Category Discovery
Venue: NeurIPS 2023
Accepted: yes
Keywords: Generalized Category Discovery

Open-world Recognition

Long-tail Learning

Contrastive Learning
Abstract: Data imbalance and open-ended distribution are two intrinsic characteristics of the real visual world. Though encouraging progress has been made in tackling each challenge separately, few works dedicated to combining them towards real-world scenarios. While several previous works have focused on classifying close-set samples and detecting open-set samples during testing, it's still essential to be able to classify unknown subjects as human beings. In this paper, we formally define a more realistic task as distribution-agnostic generalized category discovery (DA-GCD): generating fine-grained predictions for both close- and open-set classes in a long-tailed open-world setting. To tackle the challenging problem, we propose a Self-**Ba**lanced **Co**-Advice co**n**trastive framework (BaCon), which consists of a contrastive-learning branch and a pseudo-labeling branch, working collaboratively to provide interactive supervision to resolve the DA-GCD task. In particular, the contrastive-learning branch provides reliable distribution estimation to regularize the predictions of the pseudo-labeling branch, which in turn guides contrastive learning through self-balanced knowledge transfer and a proposed novel contrastive loss. We compare BaCon with state-of-the-art methods from two closely related fields: imbalanced semi-supervised learning and generalized category discovery. The effectiveness of BaCon is demonstrated with superior performance over all baselines and comprehensive analysis across various datasets. Our code is publicly available.

Towards Distribution-Agnostic Generalized Category Discovery

Abstract

Data imbalance and open-ended distribution are two intrinsic characteristics of the real visual world. Though encouraging progress has been made in tackling each challenge separately, few works dedicated to combining them towards real-world scenarios. While several previous works have focused on classifying close-set samples and detecting open-set samples during testing, it's still essential to be able to classify unknown subjects as human beings. In this paper, we formally define a more realistic task as distribution-agnostic generalized category discovery (DA-GCD): generating fine-grained predictions for both close- and open-set classes in a long-tailed open-world setting. To tackle the challenging problem, we propose a SelfBa lanced Co -Advice co n trastive framework (BaCon), which consists of a contrastive-learning branch and a pseudo-labeling branch, working collaboratively to provide interactive supervision to resolve the DA-GCD task. In particular, the contrastive-learning branch provides reliable distribution estimation to regularize the predictions of the pseudo-labeling branch, which in turn guides contrastive learning through self-balanced knowledge transfer and a proposed novel contrastive loss. We compare BaCon with state-of-the-art methods from two closely related fields: imbalanced semi-supervised learning and generalized category discovery. The effectiveness of BaCon is demonstrated with superior performance over all baselines and comprehensive analysis across various datasets. Our code is available at: https://github.com/JianhongBai/BaCon .

1 Introduction

Data imbalance [82, 79, 45] and open-ended distribution [14, 72, 17] are inherently intertwined with each other in the real visual world [40]. On the one hand, the frequency of different objects exhibits long-tailed distribution [48, 54] where a small portion of classes dominate the distribution and many classes are associated with only a few examples, as observed in healthcare [42, 75], autonomous driving [41, 36] and species classification [59]. On the other hand, humans or intelligent agents constantly encounter novel visual instances. Such complicated intertwined context poses great challenges to develop effective visual algorithms [28, 55] that apply to real-world scenarios [1, 12].

Tremendous efforts have been devoted to addressing the challenges of long-tail and open-set learning. In long-tail learning (LTL), previous works aim to highlight minority categories by re-sampling [53, 83, 16] or re-weighting [5, 26] approaches, debiasing model prediction from a statistical perspective [49, 43], decoupling feature learning and classifier training [29], or generalizing to semi-supervised [33, 31, 69] and self-supervised [38, 27, 81] scenarios. For open-world learning, existing work can be divided into three sub-domains based on how to handle open-set samples. Robust semi-supervised

learning (SSL) [46] assumes that out-of-distribution (OOD) samples may undesirably appear in the unlabeled set, and several techniques [20, 77, 9] are designed to reject these potential open-set samples to improve model robustness. Another line of methods [3, 23, 37, 34, 61, 44, 64] attempt to detect them with close-set knowledge during testing and formulate the task as OOD detection. Furthermore, generalized category discovery (GCD) [60] suggests to classify open-set samples into each class [4, 56, 70]. An earlier work OLTR [40] manage to integrate LTL and open-world learning towards more realistic visual recognition. OLTR handles close-set data imbalance and is aware of open-set instances similar to OOD detection. However, this approach does not meet the requirements for real-world recognition scenarios as: a) it works in a fully-supervised manner and does not effectively utilize a large amount of unlabeled data in the real world. b) it can only detect unseen (open-set) samples rather than classifying them with novel visual concepts.

In this work, we consider a real-world yet more challenging setting: we assume that only a portion of classes are collected and manually annotated (known classes) while massive unlabeled data from both known and open-set categories (novel classes) are available in the real world (Figure 1c). These two types of data, both long-tailed, form the semi-supervised training set, and the model is expected to classify all known and novel classes in a balanced test set, as illustrated in Figure 1. We name this setting Distribution-Agnostic Generalized Category Discovery (DA-GCD) and contrast it with other related settings in Table 1. DA-GCD differs from previous open-world tasks because it considers realistic long-tail settings. It also differs from the pioneering work OLTR [40] by further considering the semi-supervised setting and classifying novel classes, as in up-to-date open-world settings [60, 4].

The DA-GCD setting presents significant challenges that cannot be resolved with existing methods. Firstly, as confirmed by numerous studies in the field of long-tail learning, imbalanced datasets lead to severe performance degradation and model bias [79, 29, 27]. This issue is even more challenging in DA-GCD, where the prior dataset distribution is unavailable in open-world scenarios. Therefore, most LTL methods [43, 50] could not be directly extended to resolve the DA-GCD task. Meanwhile, since only unlabeled samples are available for novel classes (as shown in Figure 1c), the performance on these open-set classes is severely limited. Existing contrastive-based methods in GCD[60, 56] struggle to optimize the feature space of unlabeled samples, resulting in poor alignment and uniformity [66]. Lastly, GCD methods lack tailored designs for imbalanced datasets, leading to significant performance degradation on long-tailed datasets (as discussed in Section 5.2).

To conquer the aforementioned challenges, we propose BaCon, a novel SelfBa lanced Co -Advice co n trastive framework. BaCon comprises a contrastive-learning branch and a pseudo-labeling branch, which work collaboratively to provide interactive supervision to tackle the imbalanced recognition task under open-world scenarios. Specifically, the contrastive-learning branch provides distribution estimation during training, which is used to regularize the prediction results of the linear classifier for better pseudo-labeling. On the other hand, the generated pseudo-labels are further sampled and debiased to re-balance and provide additional supervision for the contrastive-learning branch. To fuse the knowledge of the two branches and learn a better feature space, we design a novel pseudo-label-based contrastive loss that clusters samples based on their positiveness scores.

We make the following major contributions. 1) We formulate a more realistic DA-GCD task that unifies long-tail and open-world learning and identify unique challenges that cannot be adequately addressed by existing techniques in both fields. 2) We design a novel selfBa lanced Co -advice co n trastive (BaCon) framework for DA-GCD, which comprises a contrastive-learning branch and pseudo-labeling branch that work collaboratively to tackle the data imbalance and classify novel (open-set) categories simultaneously. 3) We conduct extensive experiments on various datasets and perform fine-grained comparisons with SOTA baselines to validate the effectiveness of BaCon.

2 Related Works

Open-World Learning tackling the scenario where some unknown (open-set) visual concepts or categories are involved during training or real-world applications. OOD detection [37, 24, 39], as a well-known sub-field, considering a distributional shift (either semantic shift [23] or covariate shift [35]) between the train and test stage, with the goal of detecting these OOD samples during testing. Robust semi-supervised learning [46, 20, 77, 9] apply different techniques to reject undesirable OOD samples in the unlabeled set to improve model robustness. More recently, a line of work [60, 4, 56, 70, 52, 51] propose to classify the open-set samples according to their visual concepts. Nevertheless, these methods are built on the class balance assumption, and we observe a consistent performance degradation when generalizing to DA-GCD scenarios. Distribution-agnostic recognition is also investigated by [73], which focuses on the task of novel category discovery.

Long-Tail Learning refers to a scenario where the majority of samples belong to a few classes, while the minority classes have only a small number of samples [63, 15]. Early research on long-tail learning mainly focused on fully-supervised scenarios, with representative methods that highlight the minority samples via re-sampling [53, 83, 16], re-weighting [5, 26], or knowledge transferring [68, 11, 76]. Long-tail learning under semi-supervised [33, 31, 69] and self-supervised [2, 74, 38, 27, 81, 78] settings are also widely investigated and have notable achievements. However, the requirement of the dataset distribution obstructs the application of fully/semi-supervised methods in DA-GCD, while self-supervised methods would disregard the available label information for known samples.

Contrastive Learning [8, 22, 18] provide distinctive and transferable representations by controlling the instance similarity in feature space, achieving significant progress in recent years. The following literature generalizes the idea to different scenarios [30, 62, 27], implements it for solving various downstream tasks [7, 71], and provides theoretical support [66, 67]. However, few attempts have been made at contrastive-based open-world recognition. GCD [60] proposes performing supervised CL on labeled samples and unsupervised CL on all data. OpenCon [56] generating pseudo-positive pairs for closely aligned representations, but this paradigm could lead to another dilemma: the representations and pseudo-labels are interdependent, which means an inferior feature space (e.g., lack of intra-class consistency) could lead to false positive pairs, and in turn deteriorate the learning of feature space. In short, those methods are incompatible with the proposed DA-GCD setting and have inferior representations for samples belonging to novel classes.

3 Preliminaries

3.1 Problem Formulation

As illustrated in Figure 1a, our training set is composed of a labeled subset D l = { ( x l i , y l i ) } ∈ X ×Y l and an unlabeled subset D u = { ( x u i , y u i ) } ∈ X × Y u , where we don't have the label information for any images in novel classes, i.e., Y l = {Y k } , Y u = Y = {Y k ∪ Y n } . Both D l and D u present a long-tail distribution with imbalance ratio ρ l , ρ u ≫ 1 . The objective of DA-GCD is to assign labels on a disjoint balanced test set containing all classes in Y u . The total number of classes in the whole dataset D is commonly regarded as a known prior [60, 4, 70], as we can effectively estimate it through off-the-shelf methods [21].

3.2 Revisiting Contrastive Learning

Contrastive-based representation learning methods [8, 22, 18, 30] aim to find an embedding function f to acquire optimal feature representation z ∈ R d of the input image x ∈ R CHW with z = f ( x ) , such that z retains the discriminative semantic information of the input image. The general contrastive learning loss can be defined as:

where D is the training set. P ( i ) is the set of indices of positive pairs in A ( i ) , |·| denotes the operation to compute the cardinality, and τ is a hyper-parameter. In unsupervised learning, the positive set is formulated as the two views of the same image [8, 22]. [30] further generalizes the contrastive loss into supervised scenarios where the positive set is the images that share the same ground truth label.

4 Self-Balanced Co-Advice Contrastive Framework

As illustrated in Figure 2, we design a two-branch structure framework for DA-GCD. In Section 4.1, we propose the contrastive-learning branch to estimate the training distribution and further regularize the outputs of the pseudo-labeling branch. We then describe techniques for self-balanced knowledge transfer from the pseudo-labeling branch to the contrastive-learning branch in Section 4.2. Finally, in Section 4.3, a novel contrastive loss is proposed for better novel class learning.

4.1 Regularize Predictions with Dynamic Distribution Estimation

To enhance and re-balance the contrastive representation learning, we propose to learn an auxiliary classifier for pseudo-labeling. Our pseudo-labeling branch includes a cross-entropy loss L s on labeled data, a semi-supervised objective L u (e.g., cross pseudo supervision in [70]) on all samples, and a regularization term L reg to align the predictions with the data distribution to avoid non-activated classifiers. However, the distribution of the training set is agnostic in DA-GCD, and simply using the distribution of labeled set π D l or a balance prior results in inferior performance (Table 6a). Furthermore, we observed that estimating the distribution from the pseudo-labeling branch itself could accumulate the estimation error and deteriorate model performance.

To this end, we perform estimation on the contrastive-learning branch as an alternative to avoid the accumulation of estimation bias. Concretely, we perform k-means clustering on all samples in the training set D to obtain C clusters with size n , where C = |Y| , and normalized the sample number n to frequency π e , i.e., π e = n / ∑ C c =1 ( n [ c ]) . Moreover, we also need to determine the corresponding relationship between clusters and categories. Therefore, we use the Hungarian optimal assignment algorithm [32] to map |Y l | clusters to each known class. For the remaining |Y| - |Y l | clusters, we sort them by the cluster size and assign them sequentially to the novel classes. 1 Finally, we regularize the mean prediction of the pseudo-labeling branch with the aligned estimated distribution π e :

where B refers to the batch size during training, f cls denote the backbone and the linear classifier of the auxiliary branch, KL[ · ∥ · ] is the Kullback-Leibler (KL) divergence between the two distributions, and p ∈ [0 , 1] is a hyper-parameter used to smooth the target long-tailed distribution. To balance estimation accuracy and computation overhead, we re-estimate the dataset distribution every r epoch. The overall training objective of the pseudo-labeling branch is as follows:

Contrastive

backbone

Classification

backbone

Re-estimate

every

𝑟𝑟

epochs

Clustering &

Alignment

Pseudo-

labels

𝓛𝓛

𝒔𝒔

+

𝓛𝓛

𝒖𝒖

Contrastive

feature

𝓛𝓛

𝑪𝑪𝑪𝑪

𝒖𝒖

+

𝓛𝓛

𝑪𝑪𝑪𝑪

𝒔𝒔

Sampling &

Debiasing

Pseudo-labeling Branch

Contrastive-learning Branch

Co-advise Mechanism

positiveness

score

𝐰𝐰

Estimated

Distribution

𝝅𝝅

𝓛𝓛

𝓛𝓛

𝑪𝑪𝑪𝑪

𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔

Projector

Classifier

Clustering

Contrastive

backbone

Features

Balanced

test-set

Test-time Forward

Dataset Composition

Unlabeled Set

(

Known

classes

+ Novel

classes

)

Labeled Set

(

Known

classes

)

Pair-wise

co-efficient

4.2 Self-Balanced Knowledge Transfer: Debiasing and Sampling

In Section 4.1, we regularize the pseudo-labeling branch with the estimated dataset distribution π e acquired from the contrastive-learning branch. In this step, we aim to transfer the knowledge from the pseudo-labeling branch to the contrastive-learning branch in turn and further enhance the representation learning, which is also beneficial to the estimation of data distribution π . However, the long-tail distribution of the underlying dataset places additional requirements on knowledge transferring. On one hand, we should ensure that the knowledge to be transmitted is not affected by the long-tailed distribution. Meanwhile, we hope that this process can help the contrastive-learning branch cope with the issue of data imbalance and the lack of supervision for novel classes.

We design a debiasing and sampling step of the pseudo-labels to meet the two aforementioned requirements respectively for knowledge transfer. First, we apply post-hoc logits adjustment [43] based on the estimated distribution to the predicted logits f cls ( x i ) to eliminate the bias caused by long-tailed distribution:

where ˜ p i denotes the rectified class probability prediction of sample x i , and k is a hyper-parameter in [43]. Next, in order to re-balance the learning process and filter low-precision pseudo-labels, we propose to sample the unlabeled instances. Specifically, we sample the pseudo-labels of unlabeled instances in a training batch ˜ p B = { ˜ p i : i = 1 , · · · , B } according to their prediction class c , where c i = arg max ˜ p i . Formally, the class-wise sampling rate SR c can be defined as:

where π e is the estimated distribution introduced in Section 4.1, Y B ⊆ Y k denotes the set of labels which involved in the current batch, and α, β ∈ [0 , 1] are two hyper-parameters. Setting α = β = 0 means sampling all pseudo-labels, while α = β = 1 means setting the sampling rate to be inversely proportional to the estimated number of samples in its category. Note that we prioritize selecting samples with higher prediction confidence in each class to remove the potentially false pseudo-labels. The sampled instances { M ( D u ) } complement the original long-tailed distribution to serve as a re-balance term for the labeled subset {D l } and also provide additional supervision for novel classes. With this debiasing and sampling step, the sampled instances {D l ∪ M ( D u ) } and their corresponding rectified pseudo-labels mitigate the impact of the imbalance issue and compensate the unlabeled open-set samples simultaneously.

4.3 Pseudo-label-based Soft Contrastive Learning

In Section 4.1 and Section 4.2, we generate pseudo-labels via the pseudo-labeling branch with help from the contrastive-learning branch. Those pseudo-labels could provide additional information to improve the contrastive-learning branch as well. In particular, we adopt a soft contrastive strategy to fully leverage the probabilistic information in pseudo-labels. We design a pair-wise positiveness score to adjust the contribution of different samples to the anchor instance. For image pair ( x i , x j ) , the positiveness score w ij = Sim( ˜ p i , ˜ p j ) . w ij is obtained by calculating the similarity of the rectified class probability distribution between x i and x j . In practice, We implement the similarity metric with the dot product operation, which can be mathematically interpreted as the probability of instance x i and x j belonging to the same class. We compare different definitions of the positiveness score in Section 5.4. Finally, we formulate the soft contrastive loss by incorporating w into Eq. 1:

Claim 1. Assume we train a model θ with the proposed soft contrastive loss, and x i and x j are two samples within a training batch B . The optimal value of the contrastive logit p ∗ ij is w ij ∑ | B | k =1 w ik , where w ij is the corresponding positiveness score for the sample pair ( x i , x j ) in Eq. 6.

The proof can be found in Appendix A. Claim 1 indicates that minimizing Eq. 6 encourages the similarity of features between two samples to be proportional to the corresponding positiveness score. In this way, we effectively transfer knowledge from the pseudo-labeling branch to contrastive learning. The overall training objective of the contrastive-learning branch consists of an unsupervised CL loss on all samples, a supervised CL loss on labeled instances, and the proposed soft CL loss on both labeled and sampled unlabeled subset:

The pipeline of our method is illustrated in Figure 2, and the pseudo-code of BaCon can be found in Appendix B. It's worth noting that the backbone of the two branches is shared and frozen during training (except for the last block). Therefore the two-branch structure only slightly increases computational overheads. During inference, we only utilize the backbone of the contrastive-learning branch and obtain predictions via k-means clustering on the backbone features.

5 Expriments

5.1 Experimental Setup

Data Preparation We conduct experiments on four popular datasets. CIFAR-10-LT/CIFAR-100-LT are long-tail subsets sampled from the original CIFAR10/CIFAR100 [10]. We set the imbalance ratio to 100 in default. ImageNet-100-LT is proposed by [27] with 12K images sampled from ImageNet-100 [57] with Pareto distribution. Places-LT [40] contains about 62.5K images sampled from the large-scale scene-centric Places dataset [80] with Pareto distribution. For each dataset, we first sub-sample |Y k | classes from the whole long-tail datasets to stimulate known classes and treat the rest as novel classes, then sub-sample 50% instances in each known class as D l and concentrate others with all samples in novel classes to form D u . The default |Y k | for CIFAR-10-LT, CIFAR-100-LT, ImageNet-100-LT, Places-LT are 5, 80, 50, 182 respectively. We also evaluate BaCon with different ratios of |Y k | and |Y n | , set up D l with few annotated samples, ρ l = ρ u in E.

̸

Evaluation Protocols and Metrics Following previous works [60, 4], we calculate the accuracy by assigning the model prediction (cluster result) ˆ y to ground truth y via the Hungarian assignment algorithm [32]. With the assignment fixed, we report the overall classification accuracy on Y k (Old), Y n (New), and Y k ∪ Y n (All). To observe the impact of long tail distribution on performance, we evenly divide Y k and Y n into three disjoint groups { Many, Median, Few } respectively in terms of the number of instances of each class. We also calculate the standard deviation (Std) of the accuracy of the three groups, which quantitatively analyze the balancedness of a feature space [27].

Training Settings Following GCD [60], we load a DINO [6] pre-trained ViT-B/16 [13] as the backbone for both branches and only fine-tune the last block for all datasets. The classification head and projector are randomly initialized. To achieve a fair comparison, we replace the backbone model of all baseline methods with the ViT pre-trained by DINO (the same as ours), and † denotes adapted methods. More training details can be found in Appendix C.

5.2 Migration of Existing Methods to DA-GCD

Here we first state that migrating existing methods from two similar scenarios (GCD [60] and imbalanced SSL [31]) to the proposed DA-GCD result in inferior performance due to the co-occurrence of data imbalance and open-set samples. Existing GCD methods, whether based on classifier [60] or non-parametric classification methods [70], are insufficient in addressing the issue of data imbalance. In Table 2, we report two SOTA methods (GCD [60] and SimGCD [70]) performances on the balanced set D b and its long-tailed counterpart D i . It's observed that they exhibit significant performance degradation (especially on minority classes) on D i compared to their performance on D b . While imbalanced SSL methods [33, 31] can barely classify novel class samples under the DA-GCD setting.

5.3 BaCon's Accuracy, Balancedness and Versatility

The results of the BaCon in various datasets are presented in Table 3. BaCon-O and BaCon-S refer to training the pseudo-labeling branch in ORCA-style [4] and SimGCD-style [70] respectively. We compare BaCon with two SOTA imbalanced-SSL methods ABC [33] and DARP [31], and five latest open-world recognition techniques including contrastive-based methods GCD [60] and OpenCon [56] and classifier-based methods TRSSL [52], ORCA [4] and SimGCD [70]. 2 As shown in Table 3, BaCon significantly outperforms all these methods by a large margin under various datasets. Specifically, on CIFAR-100-LT, BaCon-S outperforms the best baseline by 17.5% and 5.0% on novel classes accuracy and overall accuracy respectively.

(a) DINO.

(b) GCD.

(c) Ours.

To better evaluate the impact of dataset imbalance, we make a fine-grained comparison in Table 4. The lower standard deviation of the performance of { Many , Median , Few } on both known and novel classes suggest BaCon yields a more balanced feature space. Besides, our method significantly improves the performance of the minority classes without sacrificing the accuracy of the majorities.

̸

We also report the performance of BaCon when the training set has a different imbalance ratio ρ in Table 5. Note that we set the imbalance ratio of D l and D u to be the same, i.e., ρ l = ρ u = ρ . Empirical results with ρ l = ρ u are in Appendix E. Notably, BaCon achieves the best overall accuracies on all settings, indicating the universal effectiveness across various scenarios, and the performance gain becomes more evident under extremely imbalanced data. Also, open-world recognition emphasizes novel class learning, where BaCon achieves a more notable performance gain.

Table 6: BaCon ablation experiments. For each ablation, we report test accuracy (%) of known, novel and all classes, denote as 'Old', 'New', and 'All'. Our default settings are marked in orange .

5.4 Analysis and Ablation Study

The effectiveness of L reg Recall in Section 4.1, we propose to regularize the predictions of the pseudo-labeling branch by the estimated train-set distribution. In Table 6a, we show the performance of the pseudo-labeling branch on ImageNet-100-LT with different estimation strategies. 'Oracle' denotes we use the true distribution π of D (unknown in practice) as the target distribution in Eq. 2, and it serves as an upper bound of the performance. Compared to previous works (ORCA and SimGCD) that use a balance prior, regularizing the predictions with oracle long-tailed distribution significantly improves the performance on both known and novel categories, showing the importance of the distribution estimation process. Meanwhile, the similar results achieved by our estimation strategy imply π e could be a reliable proxy to π . Furthermore, we investigate whether two alternative estimation strategies could help the pseudo-labeling branch: 1), only regularize known classes prediction with π D l 2), perform k-means clustering on the feature of the pseudo-labeling branch, and they all results in inferior accuracy and could in turn deteriorate the contrastive learning process.

The effectiveness of sampling & debiasing In Section 4.2, we suggest adjusting the prediction logits according to the estimated distribution for debiasing and sampling unlabeled instances for re-balancing. We adopt step-by-step ablation experiments to the proposed approaches in Table 6b. 'Baseline' refers to not using the proposed pseudo-label-based contrastive loss, and it leads to inferior performance on novel classes since they only get supervision from the self-supervised contrastive loss. 'Vanilla' means incorporates the designed pseudo-label-based loss into the optimization objective with Eq. 7 without the debiasing and sampling module. It brings performance gain on novel classes due to the leverage of additional supervision in pseudo labels. Finally, we achieve higher test accuracy on both known and novel classes by combining the two techniques together.

Definition of the pseudo-label based contrastive loss In Section 4.3, we design a novel soft contrastive loss based on pseudo-labels to transfer the knowledge of f cls into f con . As an opposite, we could also construct the loss in a hard manner where we formulate the positive pairs on top of the prediction class with the largest logit and further perform the supervised contrastive loss. Intuitively, the hard design discards the probability distribution information and is more susceptible to the potential false pseudo-labels, while the soft contrastive loss utilized in our method could help alleviate the influence of erroneous pseudo-labels. The empirical results also support the intuition, as shown in Table 6c, the proposed L s CL (soft) outperforms the supervised CL loss (hard) by a large margin. This phenomenon is also observed in knowledge distillation [25, 65] that transferring knowledge by using soft labels rather than one-hot predictions achieves better performance.

Changing of metrics and hyper-parameters The proposed soft CL loss introduces a pair-wise co-efficient to adjust the contribution of different samples to the anchor instance. We apply various similarity metrics on the pseudo-labels of x i and x p to calculate the positiveness score w ip . The results are exhibited in Table 6e, we incorporate dot product in BaCon due to the superior performance

in practice. We also show the effect of hyper-parameters involved in BaCon. Table 6d shows the empirical results of changing estimate interval r . We observe similar accuracy when scaling r , hence we use a relatively large interval to reduce the computational overhead. Table 6f shows the classification accuracy when changing k in Eq. 4.

Feature Visualization We adopt the widely-used T-distributed stochastic neighbor embedding (tSNE) [58] for feature space visualization. We show the feature space of BaCon (ours) with DINO [6] pre-trained model (without fine-tuning) and GCD [60] in Figure 3, different colors represent data belonging to distinct categories. Compare to vanilla DINO (Figure 3a) and GCD fine-tuned model (Figure 3b), BaCon has more compact features for samples within the same category, suggesting better intra-class consistency, and also a larger margin between different classes.

6 Conclusion and Limitations

In this paper, we formulate a more realistic DA-GCD task that unifies long-tailed and open-world learning, and design a novel framework BaCon for DA-GCD to fight against data imbalance and classify open-set categories simultaneously. Extensive experiments on various datasets verify the effectiveness of the proposed method. There are nevertheless some limitations. First, our work focuses on the imbalanced open-world classification task, how to extend to object detection and instance segmentation is also worth exploring. Second, while the computation increment is not severe, how to further accelerate the proposed method will be explored in the future. We hope our work can promote the research on imbalanced open-set recognition in real-world applications.

References

Dario Amodei, Chris Olah, Jacob Steinhardt, Paul Christiano, John Schulman, and Dan Mané. Concrete problems in ai safety. arXiv preprint arXiv:1606.06565 , 2016.

Jianhong Bai, Zuozhu Liu, Hualiang Wang, Jin Hao, YANG FENG, Huanpeng Chu, and Haoji Hu. On the effectiveness of out-of-distribution data in self-supervised long-tail learning. In The Eleventh International Conference on Learning Representations , 2022.

Abhijit Bendale and Terrance E Boult. Towards open set deep networks. In Proceedings of the IEEE conference on computer vision and pattern recognition , pages 1563-1572, 2016.

Kaidi Cao, Maria Brbic, and Jure Leskovec. Open-world semi-supervised learning. In International Conference on Learning Representations , 2022.

Kaidi Cao, Colin Wei, Adrien Gaidon, Nikos Arechiga, and Tengyu Ma. Learning imbalanced datasets with label-distribution-aware margin loss. Advances in neural information processing systems , 32, 2019.

Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers. In Proceedings of the IEEE/CVF international conference on computer vision , pages 9650-9660, 2021.

Krishna Chaitanya, Ertunc Erdil, Neerav Karani, and Ender Konukoglu. Contrastive learning of global and local features for medical image segmentation with limited annotations. Advances in Neural Information Processing Systems , 33:12546-12558, 2020.

Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In International conference on machine learning , pages 1597-1607. PMLR, 2020.

Yanbei Chen, Xiatian Zhu, Wei Li, and Shaogang Gong. Semi-supervised learning under class distribution mismatch. In Proceedings of the AAAI Conference on Artificial Intelligence , volume 34, pages 3569-3576, 2020.

Yin Cui, Menglin Jia, Tsung-Yi Lin, Yang Song, and Serge Belongie. Class-balanced loss based on effective number of samples. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition , pages 9268-9277, 2019.

Yin Cui, Yang Song, Chen Sun, Andrew Howard, and Serge Belongie. Large scale fine-grained categorization and domain-specific transfer learning. In Proceedings of the IEEE conference on computer vision and pattern recognition , pages 4109-4118, 2018.

Thomas G Dietterich. Steps toward robust artificial intelligence. Ai Magazine , 38(3):3-24, 2017.

Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929 , 2020.

Nick Drummond and Rob Shearer. The open world assumption. In eSI Workshop: The Closed World of Databases meets the Open World of the Semantic Web , volume 15, page 1, 2006.

Marawan Elbatel, Robert Martí, and Xiaomeng Li. Fopro-kd: Fourier prompted effective knowledge distillation for long-tailed medical image recognition. arXiv preprint arXiv:2305.17421 , 2023.

Yonatan Geifman and Ran El-Yaniv. Deep active learning over the long tail. arXiv preprint arXiv:1711.00941 , 2017.

Chuanxing Geng, Sheng-jun Huang, and Songcan Chen. Recent advances in open set recognition: A survey. IEEE transactions on pattern analysis and machine intelligence , 43(10):36143631, 2020.

Jean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec, Pierre Richemond, Elena Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Guo, Mohammad Gheshlaghi Azar, et al. Bootstrap your own latent-a new approach to self-supervised learning. Advances in neural information processing systems , 33:21271-21284, 2020.

Lan-Zhe Guo and Yu-Feng Li. Class-imbalanced semi-supervised learning with adaptive thresholding. In International Conference on Machine Learning , pages 8082-8094. PMLR, 2022.

Lan-Zhe Guo, Zhen-Yu Zhang, Yuan Jiang, Yu-Feng Li, and Zhi-Hua Zhou. Safe deep semisupervised learning for unseen-class unlabeled data. In International Conference on Machine Learning , pages 3897-3906. PMLR, 2020.

Kai Han, Andrea Vedaldi, and Andrew Zisserman. Learning to discover novel visual categories via deep transfer clustering. In Proceedings of the IEEE/CVF International Conference on Computer Vision , pages 8401-8409, 2019.

Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition , pages 9729-9738, 2020.

Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and out-of-distribution examples in neural networks. In International Conference on Learning Representations , 2017.

Dan Hendrycks, Mantas Mazeika, and Thomas Dietterich. Deep anomaly detection with outlier exposure. In International Conference on Learning Representations , 2018.

Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531 , 2015.

Muhammad Abdullah Jamal, Matthew Brown, Ming-Hsuan Yang, Liqiang Wang, and Boqing Gong. Rethinking class-balanced methods for long-tailed visual recognition from a domain adaptation perspective. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition , pages 7610-7619, 2020.

Ziyu Jiang, Tianlong Chen, Bobak J Mortazavi, and Zhangyang Wang. Self-damaging contrastive learning. In International Conference on Machine Learning , pages 4927-4939. PMLR, 2021.

Bingyi Kang, Yu Li, Sa Xie, Zehuan Yuan, and Jiashi Feng. Exploring balanced feature spaces for representation learning. In International Conference on Learning Representations , 2021.

Bingyi Kang, Saining Xie, Marcus Rohrbach, Zhicheng Yan, Albert Gordo, Jiashi Feng, and Yannis Kalantidis. Decoupling representation and classifier for long-tailed recognition. In International Conference on Learning Representations , 2020.

Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. Supervised contrastive learning. Advances in neural information processing systems , 33:18661-18673, 2020.

Jaehyung Kim, Youngbum Hur, Sejun Park, Eunho Yang, Sung Ju Hwang, and Jinwoo Shin. Distribution aligning refinery of pseudo-label for imbalanced semi-supervised learning. Advances in neural information processing systems , 33:14567-14579, 2020.

Harold W Kuhn. The hungarian method for the assignment problem. Naval research logistics quarterly , 2(1-2):83-97, 1955.

Hyuck Lee, Seungjae Shin, and Heeyoung Kim. Abc: Auxiliary balanced classifier for classimbalanced semi-supervised learning. Advances in Neural Information Processing Systems , 34:7082-7094, 2021.

Kimin Lee, Kibok Lee, Honglak Lee, and Jinwoo Shin. A simple unified framework for detecting out-of-distribution samples and adversarial attacks. Advances in neural information processing systems , 31, 2018.

Da Li, Yongxin Yang, Yi-Zhe Song, and Timothy M Hospedales. Deeper, broader and artier domain generalization. In Proceedings of the IEEE international conference on computer vision , pages 5542-5550, 2017.

Kaican Li, Kai Chen, Haoyu Wang, Lanqing Hong, Chaoqiang Ye, Jianhua Han, Yukuai Chen, Wei Zhang, Chunjing Xu, Dit-Yan Yeung, et al. Coda: A real-world road corner case dataset for object detection in autonomous driving. In European Conference Computer Vision , pages 406-423. Springer, 2022.

Shiyu Liang, Yixuan Li, and R Srikant. Enhancing the reliability of out-of-distribution image detection in neural networks. In International Conference on Learning Representations , 2018.

Hong Liu, Jeff Z HaoChen, Adrien Gaidon, and Tengyu Ma. Self-supervised learning is more robust to dataset imbalance. In International Conference on Learning Representations , 2021.

Weitang Liu, Xiaoyun Wang, John Owens, and Yixuan Li. Energy-based out-of-distribution detection. Advances in neural information processing systems , 33:21464-21475, 2020.

Ziwei Liu, Zhongqi Miao, Xiaohang Zhan, Jiayun Wang, Boqing Gong, and Stella X Yu. Largescale long-tailed recognition in an open world. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition , pages 2537-2546, 2019.

Jiageng Mao, Minzhe Niu, Chenhan Jiang, Hanxue Liang, Jingheng Chen, Xiaodan Liang, Yamin Li, Chaoqiang Ye, Wei Zhang, Zhenguo Li, et al. One million scenes for autonomous driving: Once dataset. arXiv preprint arXiv:2106.11037 , 2021.

Yassine Marrakchi, Osama Makansi, and Thomas Brox. Fighting class imbalance with contrastive learning. In Medical Image Computing and Computer Assisted Intervention-MICCAI 2021: 24th International Conference, Strasbourg, France, September 27-October 1, 2021, Proceedings, Part III 24 , pages 466-476. Springer, 2021.

Aditya Krishna Menon, Sadeep Jayasumana, Ankit Singh Rawat, Himanshu Jain, Andreas Veit, and Sanjiv Kumar. Long-tail learning via logit adjustment. In International Conference on Learning Representations , 2021.

Yifei Ming, Ying Fan, and Yixuan Li. Poem: Out-of-distribution detection with posterior sampling. In International Conference on Machine Learning , pages 15650-15665. PMLR, 2022.

Kemal Oksuz, Baris Can Cam, Sinan Kalkan, and Emre Akbas. Imbalance problems in object detection: A review. IEEE Transactions on Pattern Analysis & Machine Intelligence , 43(10):3388-3415, 2021.

Avital Oliver, Augustus Odena, Colin A Raffel, Ekin Dogus Cubuk, and Ian Goodfellow. Realistic evaluation of deep semi-supervised learning algorithms. Advances in neural information processing systems , 31, 2018.

Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. 2017.

William J Reed. The pareto, zipf and other power laws. Economics letters , 74(1):15-19, 2001.

Jiawei Ren, Cunjun Yu, Xiao Ma, Haiyu Zhao, Shuai Yi, et al. Balanced meta-softmax for longtailed visual recognition. Advances in neural information processing systems , 33:4175-4186, 2020.

Jiawei Ren, Cunjun Yu, Xiao Ma, Haiyu Zhao, Shuai Yi, et al. Balanced meta-softmax for longtailed visual recognition. Advances in neural information processing systems , 33:4175-4186, 2020.

Mamshad Nayeem Rizve, Navid Kardan, Salman Khan, Fahad Shahbaz Khan, and Mubarak Shah. Openldn: Learning to discover novel classes for open-world semi-supervised learning. In European Conference on Computer Vision , pages 382-401. Springer, 2022.

Mamshad Nayeem Rizve, Navid Kardan, and Mubarak Shah. Towards realistic semi-supervised learning. In European Conference on Computer Vision , pages 437-455, 2022.

Li Shen, Zhouchen Lin, and Qingming Huang. Relay backpropagation for effective learning of deep convolutional neural networks. In European conference on computer vision , pages 467-482. Springer, 2016.

Merrielle Spain and Pietro Perona. Measuring and predicting importance of objects in our visual world. . , 2007.

Yiyou Sun, Chuan Guo, and Yixuan Li. React: Out-of-distribution detection with rectified activations. Advances in Neural Information Processing Systems , 34:144-157, 2021.

Yiyou Sun and Yixuan Li. Opencon: Open-world contrastive learning. Transactions of Machine Learning Research , 2023.

Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive multiview coding. In European conference on computer vision , pages 776-794. Springer, 2020.

Laurens Van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research , 9(11), 2008.

Grant Van Horn, Oisin Mac Aodha, Yang Song, Yin Cui, Chen Sun, Alex Shepard, Hartwig Adam, Pietro Perona, and Serge Belongie. The inaturalist species classification and detection dataset. In Proceedings of the IEEE conference on computer vision and pattern recognition , pages 8769-8778, 2018.

Sagar Vaze, Kai Han, Andrea Vedaldi, and Andrew Zisserman. Generalized category discovery. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition , pages 7492-7501, 2022.

Sagar Vaze, Kai Han, Andrea Vedaldi, and Andrew Zisserman. Open-set recognition: A good closed-set classifier is all you need. In International Conference on Learning Representations , 2022.

Haobo Wang, Ruixuan Xiao, Yixuan Li, Lei Feng, Gang Niu, Gang Chen, and Junbo Zhao. Pico: Contrastive label disambiguation for partial label learning. In International Conference on Learning Representations , 2022.

Hualiang Wang, Siming Fu, Xiaoxuan He, Hangxiang Fang, Zuozhu Liu, and Haoji Hu. Towards calibrated hyper-sphere representation via distribution overlap coefficient for longtailed learning. In European Conference on Computer Vision , pages 179-196. Springer, 2022.

Hualiang Wang, Yi Li, Huifeng Yao, and Xiaomeng Li. Clipn for zero-shot ood detection: Teaching clip to say no. arXiv preprint arXiv:2308.12213 , 2023.

Huan Wang, Suhas Lohit, Michael N Jones, and Yun Fu. What makes a" good" data augmentation in knowledge distillation-a statistical perspective. Advances in Neural Information Processing Systems , 35:13456-13469, 2022.

Tongzhou Wang and Phillip Isola. Understanding contrastive representation learning through alignment and uniformity on the hypersphere. In International Conference on Machine Learning , pages 9929-9939. PMLR, 2020.

Yifei Wang, Qi Zhang, Yisen Wang, Jiansheng Yang, and Zhouchen Lin. Chaos is a ladder: A new theoretical understanding of contrastive learning via augmentation overlap. In International Conference on Learning Representations , 2021.

Yu-Xiong Wang, Deva Ramanan, and Martial Hebert. Learning to model the tail. Advances in neural information processing systems , 30, 2017.

Chen Wei, Kihyuk Sohn, Clayton Mellina, Alan Yuille, and Fan Yang. Crest: A classrebalancing self-training framework for imbalanced semi-supervised learning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition , pages 10857-10866, 2021.

Xin Wen, Bingchen Zhao, and Xiaojuan Qi. A simple parametric classification baseline for generalized category discovery. arXiv preprint arXiv:2211.11727 , 2022.

Saining Xie, Jiatao Gu, Demi Guo, Charles R Qi, Leonidas Guibas, and Or Litany. Pointcontrast: Unsupervised pre-training for 3d point cloud understanding. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part III 16 , pages 574-591. Springer, 2020.

Jingkang Yang, Kaiyang Zhou, Yixuan Li, and Ziwei Liu. Generalized out-of-distribution detection: A survey. arXiv preprint arXiv:2110.11334 , 2021.

Muli Yang, Liancheng Wang, Cheng Deng, and Hanwang Zhang. Bootstrap your own prior: Towards distribution-agnostic novel class discovery. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition , pages 3459-3468, 2023.

Yuzhe Yang and Zhi Xu. Rethinking the value of labels for improving class-imbalanced learning. Advances in neural information processing systems , 33:19290-19301, 2020.

Zhixiong Yang, Junwen Pan, Yanzhan Yang, Xiaozhou Shi, Hong-Yu Zhou, Zhicheng Zhang, and Cheng Bian. Proco: Prototype-aware contrastive learning for long-tailed medical image classification. In Medical Image Computing and Computer Assisted Intervention-MICCAI 2022: 25th International Conference, Singapore, September 18-22, 2022, Proceedings, Part VIII , pages 173-182. Springer, 2022.

Xi Yin, Xiang Yu, Kihyuk Sohn, Xiaoming Liu, and Manmohan Chandraker. Feature transfer learning for face recognition with under-represented data. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition , pages 5704-5713, 2019.

Qing Yu, Daiki Ikami, Go Irie, and Kiyoharu Aizawa. Multi-task curriculum framework for open-set semi-supervised learning. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XII 16 , pages 438-454. Springer, 2020.

Yifan Zhang, Bryan Hooi, Lanqing Hong, and Jiashi Feng. Self-supervised aggregation of diverse experts for test-agnostic long-tailed recognition. Advances in Neural Information Processing Systems , 35:34077-34090, 2022.

Yifan Zhang, Bingyi Kang, Bryan Hooi, Shuicheng Yan, and Jiashi Feng. Deep long-tailed learning: A survey. arXiv preprint arXiv:2110.04596 , 2021.

Bolei Zhou, Agata Lapedriza, Aditya Khosla, Aude Oliva, and Antonio Torralba. Places: A 10 million image database for scene recognition. IEEE transactions on pattern analysis and machine intelligence , 40(6):1452-1464, 2017.

Zhihan Zhou, Jiangchao Yao, Yan-Feng Wang, Bo Han, and Ya Zhang. Contrastive learning with boosted memorization. In International Conference on Machine Learning , pages 27367-27377. PMLR, 2022.

Xiangxin Zhu, Dragomir Anguelov, and Deva Ramanan. Capturing long-tail distributions of object subcategories. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition , pages 915-922, 2014.

Yang Zou, Zhiding Yu, BVK Kumar, and Jinsong Wang. Unsupervised domain adaptation for semantic segmentation via class-balanced self-training. In Proceedings of the European conference on computer vision (ECCV) , pages 289-305, 2018.

A Proof for Claim 1

Proof. We start with recalling some related notations and definitions. In Section 4.3, we design a novel soft contrastive loss by incorporating a pair-wise positiveness score w in Eq. 1:

where D is the training set, A ( i ) is the index of the set of instances involved in the same batch, z i is the contrastive feature for instance x i , and τ is the temperature hyper-parameter.

For each instance x i , the soft contrastive loss L soft CL ( x i ) can be written as:

where C i = 1 ∑ j ∈ A ( i ) w ij is a constant value for fixed w , then the contrastive logit p ij is defined as:

Then, we omit the constant C in Eq. 9 and solve the optimization problem with the Lagrange multiplier. The problem is defined as follows:

where n refers to the number of instances in the training batch, i.e., n = | B | = | A ( i ) | . The Lagrangian function of Eq. 11 and its corresponding partial derivatives are:

From Eq. 13, the optimal value of p ij is p ∗ ij = w ij ∑ n k =1 w ik , which concludes the proof for Claim 1.

Claim 1 indicates that minimizing Eq. 6 encourages the similarity of features between two samples to be proportional to the corresponding positiveness score. In this way, we effectively transfer knowledge from the pseudo-labeling branch to contrastive learning.

B Pseudo-code

We summarize the pipeline of selfBa lanced Co -advice co n trastive framework (BaCon) in Algorithm 1, and the source code can be found here.

Algorithm 1 The overall pipeline of BaCon.

After training, we test the model via k-means clustering on the backbone feature of the contrastivelearning branch. The test strategy is summarized in Algorithm 2.

Algorithm 2 The test stage strategy of BaCon. Input : The balanced test set D t = { ( x i , y i ) } ∈ X × Y , fine-tuned backbone of the contrastivelearning branch f b . Output : Classification accuracy Acc . for x i ∈ D t do Obtain the feature of x i via f b ( x i ) end for t

Perform k-means clustering on all the features of test samples with the cluster number C = |D | ; Calculate the optimal assignment between clusters and classes by Hungarian algorithm [32]; Compute the test accuracy Acc based on the optimal assignment.

C Detailed Experimental Settings

In this section, we provide a comprehensive overview of the experimental setup, expanding upon the details presented in Section 5.1.

C.1 Benchmark Datasets

In Section 5.3, we present our experimental findings based on four generic long-tailed image recognition datasets. CIFAR-10-LT and CIFAR-100-LT, which are first introduced by [10]. Both datasets are long-tail subsets sampled from the original CIFAR-10 and CIFAR-100. The imbalance ratio is defined as the ratio between the number of instances in the largest class and the smallest class. In our experiments, we default the imbalance ratio to 100 to reflect the performance disparities between classes. ImageNet-100-LT, proposed by [27], which comprises 12K images sampled from the ImageNet-100 dataset [57] using a Pareto distribution. The instance number of each class in the training set ranges from 1,280 to 5. We also incorporate the Places dataset [80], a large-scale scene-centric dataset, in our experiments. We utilize Places-LT [40], which consists of approximately 62.5K images sampled from the Places dataset using a Pareto distribution. The training set of Places-LT is ranging from 4,980 to 5. A summary of the dataset statistics is provided in Table 7.

C.2 Construction of Training and Testing Sets

To construct the training set for distribution-agnostic generalized category discovery (DA-GCD), we first sub-sample |Y k | classes from the entire long-tail datasets (introduced in Section C.1) to stimulate known classes and treat the rest as novel classes, then sub-sample 50% instances in each known class as D l and concentrate others with all samples in novel classes to form D u . The default |Y k | for CIFAR-10-LT, CIFAR-100-LT, ImageNet-100-LT, and Places-LT are 5, 80, 50, and 182 respectively. Our default training set of each dataset is summarized in Table 8. We also evaluate BaCon with different Y k , different labeled ratios r l (default r l = 50% ), and different imbalance ratios of both labeled set and unlabeled set.

For the test set, we use a disjoint balanced set as a common practice in the field of long-tail learning [29, 31, 27]. It's worth noting that the test set contains both known and novel classes, and the model is required to classify test set instances to every single class.

C.3 Implementation Details of BaCon

We implement all our techniques using PyTorch [47] and conduct the experiments using a RTX3090 GPU. Following GCD [60], we load a DINO [6] pre-trained ViT-B/16 [13] as the backbone for both

branches. The classification head and projector are randomly initialized. We only fine-tune the last block of the backbone, the classification head in the pseudo-labeling branch, and the projector in the contrastive-learning branch. We use the output of [CLS] token with a dimension of 768 as the backbone feature for an input image. The classifier is implemented with a single fully-connected layer, and we use the cosine classifier due to its competent empirical results in long-tail learning [29]. The projector is an MLP with an output feature dimension of 65536. We train with a batch size of 256, and an initial learning rate of 0.1 decayed with a cosine schedule. We train for 200 epochs on each dataset. The temperature τ is set to 1.0, the hyper-parameter p and k is set to 0.5, the sampling rates α = 0 . 8 , β = 0 . 5 , and the re-estimate interval r is 10 (epochs). We use dot product as the similarity metric to define the positiveness score w .

D Introduction of Baseline Methods

In our paper, we formally define a more realistic task called distribution-agnostic generalized category discovery (DA-GCD) and design a novel framework BaCon for the challenge setting. To evaluate the effectiveness of BaCon, we compare the proposed method with SOTA techniques in two closely related fields: imbalanced semi-supervised learning (imbalanced SSL) and generalized category discovery (GCD). In this section, we provide a detailed introduction of baseline methods (including ABC [33] and DARP [31] in imbalanced SSL; GCD [60], ORCA [4], OpenCon [56], and SimGCD [70] in GCD).

Imbalanced SSL [31, 33, 69, 19] considers the scenario where the training set has a long-tailed distribution and only a small subset of data is labeled. DARP [31] suggests refining pseudo-labels to the long-tailed distribution of the training set, and further designing a method to estimate the unknown distribution based on the assumption that the confusion matrix for labeled data and the unlabeled part are almost the same. Unfortunately, their assumption does not always hold in practice since the model tends to overfit the labeled samples. ABC [33] introduces an auxiliary balanced classifier to mitigate the data imbalance issue. Nevertheless, they also require the class-wise data distribution which is agnostic (due to the presence of open-set class samples) in DA-GCD.

Generalized category discovery (GCD), formulated by [60], is a new-raised domain in open-set learning. GCD manages to jointly recognize known categories contained in the manually annotated subset as well as novel (open-set) classes which appeared in the unlabeled set. Note that GCD classified the open-set samples into fine-grained categories according to their visual concept, which is different from OOD detection [37, 24, 39]. The pioneering work GCD [60] proposes to leverage the pre-trained ViT and contrastive learning to learn a discriminative feature space and further obtain predictions by the proposed semi-k-means clustering strategy. ORCA [4] suggests balancing the learning rate of known and novel classes by an uncertainty adaptive margin mechanism. OpenCon [56] attempts to supervise the unlabeled instances by generating pseudo-positive pairs for closely aligned representations. But this paradigm could lead to another dilemma: the representation and pseudo-label are interdependent, which means, an inferior feature space (e.g., lack of intra-class consistency) could lead to false positive pairs, which deteriorate the learning of feature space in turn. A recent work SimGCD [70], argues that parametric classification could achieve better performance with elaborately designed pseudo-labeling techniques. However, the aforementioned methods in GCD are built on the class balance assumption, and we observe a consistent performance degradation when generalizing to DA-GCD scenarios.

E More Empirical Results

In this Section, we provide more empirical results on different datasets, and experimental settings to further verify the effectiveness of the proposed BaCon.

E.1 Results with Different Ratio of Known and Novel Classes

Here we show the accuracy when changing the number of known (close-set) and novel (open-set) classes. A small |Y k | means fewer categories have manually labeled samples (illustrated in Figure 1), making the learning process more difficult. The performance is reported in Table 9. It's revealed that BaCon achieves the best accuracies on all settings, and brings larger performance gain under more challenging settings, i.e., few known classes and a large number of novel categories (outperforms best baseline ∼ 7% overall accuracy on CIFAR-100-LT when |Y k | = 20 ). Note the default |Y k | for CIFAR-10-LT, CIFAR-100-LT, ImageNet-100-LT, and Places-LT are 5, 80, 50, and 182 respectively.

E.2 Results on Few-annotated Scenarios

In Table 10, we also conduct experiments under few-annotated scenarios, i.e., r l = { 10% , 30% , 50% } . The annotation ratio r l is computed by r l = # labeled samples in a known class # all samples in a known class , since we only have access to manually annotated images from known categories (illustrated in Figure 1c), and all novel class instances are unlabeled. Note that we set r l = 50% in default in the main paper.

E.3 Results with Different Imbalance Ratio on Labeled and Unlabeled Set

̸

In Table 5, we report the performance of BaCon and baseline methods in GCD when the training set has a different imbalance ratio ρ . Now, we further set the imbalance ratio of labeled data and unlabeled data to be unequal ( ρ l = ρ u ), which is common in practice. For example, in medical image processing, the labeled data and unlabeled parts may come from hospitals in different countries. When it comes to autonomous driving, the occurrence frequency of stones or pedestrians may slightly change when the training data is from city areas or mountain roads.

The results are summarized in Table 11. We set the imbalance ratio of labeled data to 100 and vary the value of ρ u across different settings, namely { 20 , 50 , 100 , 150 } . It's observed that the proposed BaCon outperforms all baseline methods by a large margin, indicating that BaCon is robust to the shift of imbalance ratio between labeled and unlabeled samples.

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper presents a novel real-world driven problem setting named long-tailed open-world classification (LT-OPC) setting, where a model should predict both closed-set and open-set classes with long-tailed distribution. To address such challenges, a Self-Balanced Co-Advice contrastive framework (BaCon) is proposed, where both contrastive learning branch and pseudo-labeling branch provide supervision for the LT-OPC task. First, the contrastive learning branch estimates the training distribution of a data to regularize the pseudo-labeling branch. In the pseudo-labeling phase, a debiasing and sampling phase is designed to resolve the data imbalance and insufficient supervision for the novel classes. In final, pseudo-label branch further provides supervision to the contrastive learning branch, in the form of  pseudo-label-based soft contrastive learning objective. A series of experiments are carried out under the proposed setting and the effectiveness of each of the proposed component is studied.\n\nSTRENGTHS:\n- The proposed LT-OPC setting with long-tailed distribution data considers a more practical scenario in real world, compared to the traditional semi-supervised learning and generalized category discovery setting.\n\n- It seems that the contrastive learning strategy and pseudo-labeling strategy with interaction between them are well designed to deal with the proposed LT-OPC setting. The ablation results from the Table 6 can support its design.\n\n- Experimentally, the proposed BaCon framework shows competitive results from the baseline methods in imbalanced SSL and generalized category discovery setting.\n\nWEAKNESSES:\n- It is unclear that the proposed problem setting of LT-OPC is novel. There have been some published works that tried to combine semi-supervised learning and generalized category discovery setting in the context of open-world semi-supervised learning [C1, C2], but any discussions or comparisons with them are not provided in this paper. To my view, the only difference is whether the training data has long-tailed distributions or not, which can weaken the task novelty of this work.\n\n- It is unclear that the comparisons with imbalanced SSL methods are fair. To my understanding, the model trained with the proposed BaCon objective gets supervision for the novel classes from the unlabeled data with the pseudo-labeling term, while the baseline SSL methods do not. In that sense, it is natural that the proposed method shows higher accuracy in ‘New’ category classes. Any clarification or opinion from the authors is expected. In addition, for the imbalanced SSL baselines, both DARP and ABC do not contain contrastive branch. To make the comparison more fair, considering additional SSL baselines including contrastive learning branch is necessary [C3, C4].\n\n- For the training the baseline methods, is the training setup identical to the procedure in the proposed BaCon method? Training BaCon model relies on transformer architecture with strong pretraining method of DINO. It is unclear that the training protocol for the other baseline methods is the same with BaCon for fair comparison.\n\n- Due to combining two different mechanisms, which are pseudo-labeling and contrastive learning, many hyper-parameters are introduced. How those values can be determined in a new dataset without simply tuning the real test set of each benchmark? Considering a real-world scenario, the prior for the novel class categories can be prohibited. To simplify the question, can a model tuned with a dataset including both known classes and novel classes (e.g., validation data) generalize to a new dataset including 'unseen' novel classes (e.g., test data)? Detailed discussion on such assumption would be appreceated.\n\n---\n\nReferences\n\n[C1] Rizve, Mamshad Nayeem, et al. \"Openldn: Learning to discover novel classes for open-world semi-supervised learning.\" *European Conference on Computer Vision*. Cham: Springer Nature Switzerland, 2022.\n\n[C2] Rizve, Mamshad Nayeem, Navid Kardan, and Mubarak Shah. \"Towards realistic semi-supervised learning.\" *European Conference on Computer Vision*. Cham: Springer Nature Switzerland, 2022.\n\n[C3] Park, Jongjin, et al. \"Opencos: Contrastive semi-supervised learning for handling open-set unlabeled data.\" *European Conference on Computer Vision*. Cham: Springer Nature Switzerland, 2022.\n\n[C4] Zheng, Mingkai, et al. \"Simmatch: Semi-supervised learning with similarity matching.\" *Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition*. 2022.\n\nQUESTIONS:\n- The notation of $\\mathcal{Y}_{n}$ in line 113 is used without definition.\n\n- What exact type of loss function is utilized for the pseudo-labeling loss $\\mathcal{L}_{u}$ from the equation 3?\n\n- It can be found that the codes are attached, but it is unclear the codes can be executable. If you decided to include the codes in the submission, making the codes more understandable would be appreciated.\n\nLIMITATIONS:\nBrief limitation of the work can be found, but potential negative societal impact has not been addressed.", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 2, "DATE": "2023-07-04"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper proposes a combination of contrastive learning and semi-supervised learning approach to label images in open-world classification. The classes are assumed to be long-tailed, as is the case in real-world cases. Not all the classes have a labeled example, but the number of classes are assumed to be known beforehand. \n\nThe proposed method follows a \"two branch structure\", which one branch doing contrastive learning, and another doing pseudo-labeling.\n\nSTRENGTHS:\n1. A highly relevant problem statement for real-world application of image classification\n2. Thorough comparison against related works, both in conceptual differences and in evaluation\n3. Soft contrastive loss is an interesting idea\n\nWEAKNESSES:\nSome of the algorithmic steps are not clearly described. Questions listed below.\n\nQUESTIONS:\n1. Line 146: What do you mean sample number n? \n2. Line 146: What does the symbol (n^c) mean? Are you doing \"n choose c\" or \"n raised to c\"? \n3. How is Hungarian optimal assignment used in the context of the problem? How do you define \"cost\" in the adjacency matrix? The citation provided does not explain this. \n4. What is the \"align\" operation in equation 2? \n5. Why does equation 4 lead to a \"post-hoc logits adjustment\"? It is better to assume the reader has not read citation 39 and explain the concept briefly\n6. How is equation 5 leading to \"we prioritize selecting samples with higher prediction confidence in each class\"? Line 179.\n7. Line 183. How do you mitigate imbalance issue with this sample process? Even the ground truth labels are highly skewed.\n8. What is A(i) in equation 1 and 6?\n\nLIMITATIONS:\nGood paper overall. I would like to see a clearer explanation of methods as listed above.\nThe experiments where the number of classes are unknown are perhaps of higher importance, but they have been pushed to Appendix. It would be good to include a summary in the main paper.", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-07"}

comments: SUMMARY:
This paper tackles long-tailed open-world classification problem. It handles data imbalance in the long-tailed problem, and it also needs to handle the closed-world/open-world classifications.  For open-world classifications, there are only unlabeled data. Moreover, it assumes that unlabeled data can come from the "closed-world"classes as well.

It proposes a framework, called "Self-Balanced Co-Advice contrastive framework (BaCon)", to tackle data imbalance and handle the open-set classifications. The framework consists of a contrastive-learning branch and a pseudo-labeling branch, and the two branches also work collaboratively. Experiments are performed on image classification datasets.

STRENGTHS:
The proposed problem of "long-tailed open-world classification" is valid. Both "long-tailed" and "open-world" are popular and important problems in vision.  This paper combines problems and approaches from a couple of previous works. The proposed approaches may work.

WEAKNESSES:
The proposed problem setting is not very novel. For example, the previous work of "Large-scale long-tailed recognition in an open world" (reference [36]) handles long-tailed problems in an open world. Also the paper "Generalized Category Discovery" (reference [52]) proposes "the unlabelled images may come from labelled classes or from novel ones."

The proposed approach is not novel. For example, the contrastive learning idea has been used in the "Generalized Category Discovery" (reference [52]).  Or the key insights need to be clearly stated.

QUESTIONS:
The experiments are done on CIFAR, ImageNet, and Places datasets. Are there any experiments on other fine-grained long-tailed datasets?

LIMITATIONS:
yes
TITLE: Official Review
SOUNDNESS_CORRECTNESS: 2
DATE: 2023-07-07

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper studies the long-tailed recognition in the presence of open-set samples, which is never studied by previous works. Moreover, existing long-tailed learning methods can not be directly extended to open-set classification. To solve this problem, the authors design a new method termed BaCon, which utilizes contrastive learning to help estimate the label distribution and generate pseudo-labels for the unlabeled data, thus relieving the data imbalance and providing more data supervision. Besides, a pseudo-label-based contrastive loss is proposed to cluster similar samples for better open-set classification. The authors conduct experiments on multiple long-tailed datasets including CIFAR10/100-LT, ImageNet100-LT, and Places-LT. The results show that BaCon can obviously improve performance, especially when the imbalance ratio is high.\n\nSTRENGTHS:\n1. This paper firstly studies the long-tailed recognition with unlabeled data in both open-set and close-set samples. This studied problem is more complex and the performances of most previous methods are not satisfactory, indicating the necessity of proposing a corresponding method.\n\n2. The authors propose a new method for long-tailed open-set classification. The experimental results demonstrate the superiority of the proposed method compared to most existing methods.\n\n3. The authors conduct several ablation studies to verify the effectiveness of each component.\n\nWEAKNESSES:\n1. The studied problem is novel. However, the motivation is insufficient. By simply integrating open-set classification methods with re-balancing strategies, the long-tailed problem may be alleviated. The authors should also compare with the simply integrated baseline methods, or explain the difficulty of the integration.\n\n2. The pseudo-labeling module is important since it can affect the additional supervision and the pseudo-label-based contrastive loss. So how to ensure the quality of the pseudo-label? What if the pseudo-label is incorrectly assigned? To verify the quality of the pseudo-label, I suggest the authors calculate the accuracy of the pseudo-labels for both head and tail classes and report the results.\n\n3. Some typos. The title of Section 5 should be \"Experiments\". In Table 4, GCD performs better in Many and Med shots, but the results are not bolded.\n\nQUESTIONS:\nSee \"Weaknesses\".\n\nLIMITATIONS:\nThe authors have discussed the limitations in the main paper.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 2, "DATE": "2023-07-11"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper introduces and provides a formal definition for a real-world task, the long-tailed open-world classification (LT-OPC): it entails generating predictions for old and novel classes within a long-tailed open-world context. The proposed method incorporates a contrastive-learning branch and a pseudo-labeling branch to offer mutual guidance. Specifically, the contrastive-learning branch ensures reliable distribution estimates to standardize the pseudo-labeling branch's predictions. This subsequently directs contrastive learning via self-balanced knowledge transfer via a novel soft contrastive loss. The paper shows its effectiveness compared to methodologies from related fields of imbalanced semi-supervised learning and generalized category discovery.\n\nSTRENGTHS:\n- Clarity: This paper is well-structured and clearly presents the motivation and method.  \n\n-  Significance: The problem of long-tailed open-world classification is a significant real-world problem that this paper strives to define and address. \n\n- Originality: The paper introduces an intriguing concept, \"soft contrastive learning,\" which makes it possible to benefit from pseudolabeling and soft labels for contrastive learning. The pseudolabeling branch provides the contrastive branch with classification signals, while the contrastive branch standardizes the distribution of pseudolabeling branch.\n\n- Quality: The supplementary material and experiments offer a detailed analysis, enhancing the paper's value.\n\nWEAKNESSES:\n- It is not a weakness, but since the OLTR work already exists, it is better to use a more distinct name for the problem the paper addresses. Especially since this problem is more in line with generalized category discovery, a different name for the problem seems less confusing.  \n- Ablations studies could be more well explored, and the explanation of the trends seen in Table 6 can be improved and explain these trends with more depth. \n- Calling theorem 1 a theorem does not seem mathematically correct. It is solving a constrained optimization problem specific to the method.  \n- Also, in the proof of theorem 1 in supplemental, is it correct to omit $C$ for a more rigorous consideration because it depends on $w_{ij}$, which depends on $z_i$ and $z_j$s?\nResults for other methods are by applying code of other methods to the new datasets. Since methods like ORCA on cell dataset, GCD and SimGCD on Herbarium have a decent performance. Since Herbarium or cell datasets are long-tailed, comparing these methods on the same datasets and report numbers from their paper seems a more fair comparison. \n- Although the number of experiments is enough, the numbers have not been explained and reasoned about. Since numbers for different methods have drastic changes, a section to analyze these numbers (at least in supplemental) seems necessary. \n- Minor: there are a few mistakes in the tables: (Table 4/known/Many/GCD: 75.9) (Table4/known/Med/SimGCD: 72.8) (Table5/CIFAR10-LT $\\rho =150$/ OpenCon: 83.2) (Table5/CIFAR100-LT$\\rho =150$/ BaCon-O: 66.8) should be bold \n\nAlso, indicating the second-best method or improvement can be beneficial for the reader to see the efficacy of the paper’s contributions.\n\nQUESTIONS:\n1- In Table 4, the Std for ABC, DARP, and other methods are strangely high. Is there any reason for this? Also, why ORCA performs poorly in comparison to other methods? Since the results in their paper are reasonable, there might be something unfair to their method, especially in Table 4. Having 0.3 for \"few\" classes looks pretty odd compared to the highest number, 65.3. The same goes for SimGCD, which should have close results to GCD because of their high similarity.   \n\n2- There is a large gap between the paper's results and the next one in cifar100-LT, especially for new classes, and also, the model has a higher accuracy for new categories than the old ones, which seems quite strange. Is there any particular intuitive reason for this? \n\n3-  The reason behind the paper outperforming other methods with this high margin has yet to be explored and explained well. It is necessary to explain why methods behave the way the paper has reported for each dataset. Also, numbers for each dataset have drastic variances between different methods. It is worthwhile to investigate and explain the reasons for these differences so that they become more comprehensible.\n\n4- While it is interesting to consider common unseen categories, as in Figure 1, however, the real-world data usually has the long-tailed categories as unseen. With this new way of considering the open world, a model that assigns most novel samples to the most common novel category or, in other words, detects the open world samples and then assigns them to the most common category will triumph over a model which considers the unknown categories all in long-tailed. For instance, ORCA has this uniform objective loss, which is in direct contrast with the way data has been assigned (maybe this is the reason for ORCA's poor performance in the tables), while for the real world, the more traditional long-tailed split is in fact more plausible. Although Data preparation is explained in the paper, is it similar to how Figure 1 has depicted? Are there any experiments to also compare methods against traditional long-tailed versions of datasets?\nAlso, a base method that only detects open-world samples and assigns them to the most common novel categories might help to decipher how much of this assignment is just because of the model's knowledge of common novel categories.\n\nLIMITATIONS:\nThe limitations of the work have been adequately addressed.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-26"}