Weakly-Supervised Contrastive Learning for Imprecise Class Labels

Zi-Hao Zhou, Jun-Jie Wang, Tong Wei, Min-Ling Zhang

This paper tackles a fundamental bottleneck in representation learning: the reliance on perfect labels. While supervised contrastive learning is powerful, it often fails when faced with the "messy" labels typical of real-world datasets.

TL;DR

The authors propose Weakly-Supervised Contrastive Learning (WSC), a framework that replaces binary "positive/negative" sample pairs with a continuous "semantic similarity" score. By framing representation learning as a graph spectral clustering problem, WSC effectively utilizes noisy or partial labels to achieve state-of-the-art performance in highly ambiguous settings.

What Problem Does This Paper Address?

Contrastive learning works by pulling "positive" pairs (like two different crops of the same cat) closer in embedding space while pushing "negative" pairs (a cat and a plane) apart.

In a fully supervised setting, we treat all images of the same class as positives. However, real-world data is rarely that clean. Annotations are often:

  1. Noisy: An image of a dog is mistakenly labeled as a cat.
  2. Partial: An image is given a set of candidate labels (e.g., {Cat, Dog, Fox}) because the annotator isn't sure.

Traditional contrastive methods struggle here because they force a binary choice. If you treat a mislabeled "dog" as a positive example for the "cat" class, you degrade the model's feature space. This paper asks: How can we leverage these "imprecise" labels without letting their errors ruin the learned representations?

Methods

The core innovation is moving from discrete labels to continuous semantic similarity.

Instead of saying two images are either "same" (1) or "different" (0), the authors assign a similarity score between 0 and 1. This represents the likelihood that two samples belong to the same category.

The Graph-Theoretic Framework

The authors model the dataset as a graph where:

  • Vertices are augmented data points.
  • Edge Weights are defined by the semantic similarity.

They derive a novel Weakly-Supervised Contrastive (WSC) loss based on graph spectral clustering. Essentially, the model tries to learn features such that the similarity between feature vectors matches the estimated semantic similarity of the labels.

As shown below, this approach generalizes contrastive learning into a single, flexible framework by allowing fractional similarities (like 1/2) for ambiguous pairs:

Weakly-Supervised Contrastive Learning (WSC) uses continuous similarity scores (e.g., 1/2) instead of strict binary positive/negative pairs.

Iterative Refinement

To handle the imprecision, the framework doesn't just trust the initial weak labels. It uses the model's own predictions and "environmental information" (like noise transition matrices) to iteratively refine the semantic similarity scores during training.

Key Insights and Ideas

  • Softening the Blow of Errors: By using a continuous scale, a "partial label" doesn't have to be a hard positive or negative. It can be a "maybe," which prevents the model from over-committing to incorrect supervisory signals.
  • Spectral Connection: The paper provides a rigorous theoretical bridge between contrastive loss and spectral graph theory. They prove that their WSC loss can approximate the performance of fully supervised learning even under "mild" (imperfect) conditions.
  • The Variance-Bias Trade-off: Their analysis reveals that while adding supervised information reduces "bias" (helping the model cluster classes better), it can increase "variance" if the labels are too noisy. Finding the right balance is key to performance.

Key Results

The WSC framework consistently outperformed existing state-of-the-art (SOTA) methods across several challenging benchmarks (CIFAR-10/100, CUB-200, Clothing1M), particularly when the data was most ambiguous.

Noisy Label Learning (NLL)

On CIFAR-100 with a staggering 90% noise rate, WSC achieved a classification accuracy of 61.32%, surpassing the previous best method (TCL) by 6.85%.

Table showing WSC outperforming baselines across various noise types and ratios on CIFAR datasets.

Partial Label Learning (PLL)

In partial label settings on CIFAR-100, WSC showed an improvement of 7.8% over the next best method when the ambiguity was high. Qualitatively, t-SNE visualizations show that WSC produces much tighter, more distinct clusters than competing methods under high-noise conditions.

Limitations and Future Work

  • Hyperparameter Tuning: The performance depends on balancing self-supervised and supervised components. While the authors provide defaults, these may need adjustment for new domains.
  • Scalability: While the batch-based implementation is efficient, the underlying graph-theoretic assumptions might face challenges in extremely large-scale streaming data scenarios.
  • Future Directions: The authors suggest extending this "continuous similarity" concept to other areas, such as multi-modal matching (e.g., improving CLIP with noisy image-text pairs) and Multiple Instance Learning (MIL).

Summary updated

BibTeX
@inproceedings{zhou2025weakly,
  author = {Zi-Hao Zhou and Jun-Jie Wang and Tong Wei and Min-Ling Zhang},
  title = {{Weakly-Supervised Contrastive Learning for Imprecise Class Labels}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=Y19ngWhN0b},
}
Figure