Skip to main content
QUICK REVIEW

[Paper Review] Neighborhood Contrastive Learning for Novel Class Discovery

Zhun Zhong, Enrico Fini|arXiv (Cornell University)|Jun 20, 2021
Domain Adaptation and Few-Shot LearningComputer Science13 citations
TL;DR

This paper proposes Neighborhood Contrastive Learning (NCL) for Novel Class Discovery (NCD), leveraging local neighborhoods in feature space as pseudo-positives and generating hard negatives via mixing labeled and unlabeled features. The method achieves state-of-the-art performance, improving clustering accuracy by +13% on CIFAR-100 and +8% on ImageNet compared to prior methods.

ABSTRACT

In this paper, we address Novel Class Discovery (NCD), the task of unveiling new classes in a set of unlabeled samples given a labeled dataset with known classes. We exploit the peculiarities of NCD to build a new framework, named Neighborhood Contrastive Learning (NCL), to learn discriminative representations that are important to clustering performance. Our contribution is twofold. First, we find that a feature extractor trained on the labeled set generates representations in which a generic query sample and its neighbors are likely to share the same class. We exploit this observation to retrieve and aggregate pseudo-positive pairs with contrastive learning, thus encouraging the model to learn more discriminative representations. Second, we notice that most of the instances are easily discriminated by the network, contributing less to the contrastive loss. To overcome this issue, we propose to generate hard negatives by mixing labeled and unlabeled samples in the feature space. We experimentally demonstrate that these two ingredients significantly contribute to clustering performance and lead our model to outperform state-of-the-art methods by a large margin (e.g., clustering accuracy +13% on CIFAR-100 and +8% on ImageNet).

Motivation & Objective

  • To address the challenge of discovering novel classes in unlabeled data when a labeled dataset with disjoint classes is available.
  • To improve clustering performance in NCD by learning more discriminative representations through contrastive learning.
  • To overcome the limitation of standard contrastive learning by incorporating local neighborhood samples as additional pseudo-positives.
  • To enhance negative sampling by generating hard negatives through feature-space mixing of labeled and unlabeled samples.
  • To demonstrate that combining neighborhood contrastive learning with hard negative generation significantly boosts clustering accuracy on benchmark datasets.

Proposed method

  • NCL identifies k-nearest neighbors (KNNs) of a query sample in the feature space and treats them as pseudo-positives to strengthen the contrastive learning signal.
  • The method uses a memory bank to store features and enables efficient retrieval of KNNs for each query during training.
  • A contrastive loss is optimized over two types of positive pairs: augmented views of the same sample and KNNs from the same semantic class.
  • Hard negative samples are generated by mixing features from labeled and unlabeled samples in the feature space, creating diverse and challenging negatives.
  • The loss function combines the contrastive loss over augmented positives and pseudo-positives, with a learnable weight to balance contributions.
  • The framework is trained end-to-end using a Siamese network with a momentum encoder, enabling robust feature learning for clustering.

Experimental results

Research questions

  • RQ1Can local neighborhoods in the embedding space be reliably used as pseudo-positives for contrastive learning in the NCD setting?
  • RQ2Does incorporating multiple pseudo-positives from a sample's neighborhood improve clustering performance compared to standard contrastive learning with only two views?
  • RQ3Can mixing labeled and unlabeled features in the feature space generate effective hard negatives that improve contrastive learning?
  • RQ4How do the number of pseudo-positives and the number of hard negatives affect model performance in NCD?
  • RQ5Does the proposed NCL with hard negative generation outperform existing state-of-the-art methods on standard NCD benchmarks?

Key findings

  • NCL with pseudo-positives improves clustering accuracy by 12.9 percentage points on CIFAR-100 and 5.5 points on CIFAR-10 compared to the baseline.
  • Removing pseudo-positives (NCL w/o PP) reduces performance significantly, especially on CIFAR-10, where accuracy drops by 26.1 percentage points.
  • The addition of hard negative generation (HNG) further boosts performance, achieving a +17.2% accuracy gain on CIFAR-100 and maintaining +5.5% on CIFAR-10.
  • The optimal number of pseudo-positives is approximately half of |M|/C^u, with |M|=2000 and C^u=20 for CIFAR-100, yielding k1=50.
  • The best performance is achieved with a weight α=0.2 for the augmented-positive loss, and with N=5 iterations and k2=400 negative samples for HNG.
  • The method achieves state-of-the-art results, outperforming prior SOTA methods by a large margin on both CIFAR-100 and ImageNet benchmarks.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.