Abstract
Using search engines for web image retrieval is a tempting alternative to manual curation when creating an image dataset, but their main drawback remains the proportion of incorrect (noisy) samples retrieved. These noisy samples have been evidenced by previous works to be a mixture of in-distribution (ID) samples, assigned to the incorrect category but presenting similar visual semantics to other classes in the dataset, and out-of-distribution (OOD) images, which share no semantic correlation with any category from the dataset. The latter are, in practice, the dominant type of noisy images retrieved. To tackle this noise duality, we propose a two stage algorithm starting with a detection step where we use unsupervised contrastive feature learning to represent images in a feature space. We find that the alignment and uniformity principles of contrastive learning allow OOD samples to be linearly separated from ID samples on the unit hypersphere. We then spectrally embed the unsupervised representations using a fixed neighborhood size and apply an outlier sensitive clustering at the class level to detect the clean and OOD clusters as well as ID noisy outliers. We finally train a noise robust neural network that corrects ID noise to the correct category and utilizes OOD samples in a guided contrastive objective, clustering them to improve low-level features. Our algorithm improves the state-of-the-art results on synthetic noise image datasets as well as real-world web-crawled data.
Introduction
Training deep learning models on web-crawled images is a cost-effective but "noisy" endeavor. Datasets gathered via search engines typically suffer from two distinct types of label noise. In-Distribution (ID) Noise occurs when an image belongs to the dataset's general domain but is assigned the wrong label (e.g., a "cat" labeled as a "dog"). Out-of-Distribution (OOD) Noise involves images that share no semantic correlation with any category in the dataset (e.g., a "car" in an animal dataset).
Most traditional noise-robust algorithms treat all noise as ID noise, attempting to force a "correct" label onto every sample. This approach is counterproductive for OOD data, leading to model confusion. Conversely, simply discarding OOD data ignores its potential for helping the model learn fundamental visual features. This paper introduces SNCF (Spectral Noise clustering from Contrastive Features), a framework designed to distinguish between these noise types and leverage them appropriately.
The SNCF Framework
SNCF operates in two distinct phases: unsupervised noise detection and robust classification training. By separating the identification of noise from the training of the classifier, the model can apply specialized strategies for ID and OOD samples.
Phase 1: Unsupervised Noise Detection
The first stage involves training a model without labels using a contrastive objective (specifically iMix). This process maps images onto a unit hypersphere where the principles of alignment (keeping similar images together) and uniformity (spreading features across the space) naturally separate ID and OOD samples.
To operationalize this separation, SNCF employs Spectral Embedding for non-linear dimensionality reduction, followed by a modified OPTICS clustering algorithm. This allows the system to partition the data into three categories: clean samples, ID noisy outliers, and OOD clusters. Unlike previous methods that viewed OOD samples as random outliers, SNCF demonstrates that unsupervised contrastive learning causes OOD samples to form their own coherent clusters.
Phase 2: Robust Training
With the noise categorized, the final classification network is trained using a dual-objective approach:
- ID Correction: For samples identified as ID noise, the model uses consistency regularization—predicting labels based on multiple augmented views—to recover the true category.
- Guided Contrastive Loss: Rather than discarding OOD images, they are used in a secondary objective. By clustering similar OOD images together, the model learns robust, low-level visual features (like edges and textures) that improve overall generalization.
Experimental Results
SNCF was evaluated on several benchmarks, including CIFAR-100 (synthetically corrupted with ImageNet32/Places365), Controlled Noisy Web Labels (CNWL), and a 50-class subset of the massive Webvision 1.0 dataset.
- Superior Accuracy: On CIFAR-100 with 40% OOD and 40% ID noise, SNCF achieved 54.04% accuracy, significantly outperforming existing methods like JoSRC (41.53%) and DivideMix (35.90%).
- Real-World Performance: On the mini-Webvision dataset, SNCF reached 80.24% Top-1 accuracy, establishing a new state-of-the-art.
- Robustness: The system remains stable even under extreme corruption (up to 80%), where traditional methods often collapse.
Discussion and Conclusion
The core insight of this work is that OOD data is not merely "garbage" to be filtered out, but a valuable resource for representation learning. By using spectral embedding to "unfold" contrastive features, SNCF makes OOD clusters detectable and useful.
While the method introduces some computational overhead due to its two-stage nature and the requirement for an $N \times N$ similarity matrix in the spectral embedding step, its performance gains on highly noisy, real-world data are substantial. Future work may focus on optimizing the spectral embedding step to scale to datasets with tens of millions of images.
Summary updated