On the Provable Importance of Gradients for Language-Assisted Image Clustering

Bo Peng, Jie Lu, Guangquan Zhang, Zhen FangarXiv 2025 · OpenReview

Abstract

Language-assisted Image Clustering (LaIC) leverages textual semantics to enhance visual representation discriminability. A central challenge in LaIC is identifying "positive" nouns—those semantically relevant to the images—from unlabeled, noisy corpora. While existing methods use intuitive heuristics based on CLIP's feature space, they lack theoretical grounding. We introduce GradNorm, a gradient-based framework that measures noun relevance through the magnitude of back-propagated gradients. We provide rigorous theoretical error bounds for GradNorm and demonstrate that it generalizes previous filtering strategies. Empirically, GradNorm achieves state-of-the-art performance across diverse benchmarks.

Introduction

Image clustering is a fundamental task in computer vision, traditionally relying on visual features alone. Recent advances in Vision-Language Models (VLMs) like CLIP have enabled Language-assisted Image Clustering (LaIC), where text serves as a guiding signal. However, LaIC faces a "Catch-22": effective text guidance requires knowing which nouns describe the images, but ground-truth labels are unavailable in unsupervised settings.

Previous approaches attempted to filter relevant nouns from large databases like WordNet using heuristics such as cosine similarity or softmax probability. These methods often suffer from neural network overconfidence and lack a formal theoretical basis. To address this, we propose GradNorm, which utilizes gradient magnitudes as a more reliable signal for semantic relevance.

The GradNorm Framework

GradNorm operates in two primary stages:

  1. Gradient-Based Filtering:
    • Initial "pseudo-labels" are generated by running k-means on CLIP image features.
  2. A single-layer linear classifier is trained on these features.
  3. Candidate nouns from a "wild" corpus are evaluated by feeding their CLIP features into this classifier.
  4. The gradient magnitude (norm of the back-propagated gradient) of the cross-entropy loss is calculated for each noun. A small gradient indicates the noun aligns well with the learned visual structure ("positive"), while a large gradient suggests a poor fit ("negative").
  5. Clustering with Text Counterparts:
    • The highest-ranked positive nouns are used to construct a "text counterpart" for each image.
  6. Final clustering is performed using k-means on the concatenated vector of visual and text features.

Mathematically, GradNorm provides a unifying framework; we prove that existing methods like Maximum Softmax Probability (TAC) and cosine similarity (SIC) are special, sometimes degenerate, cases of the GradNorm score.

Theoretical Foundation

A key contribution of this work is the first rigorous theoretical error bound ($Err_{pos}$) for noun selection in LaIC. We quantify the separability of positive nouns and prove that as the dataset size ($N$) and the number of positive samples ($B_k$) increase, the probability of selection error approaches zero. This provides a solid mathematical justification for using gradient norms over simple probability scores.

Experimental Results

GradNorm was evaluated on a wide range of benchmarks, including classical datasets (CIFAR, ImageNet), complex textures (DTD), and fine-grained categories (Food-101, Stanford Cars).

  • SOTA Performance: GradNorm consistently outperforms the previous state-of-the-art, TAC. For instance, on CIFAR-20, it achieved 60.6% ACC (a 4.8% gain). On ImageNet-Dogs, it reached 81.2% ACC (a 6.1% gain).
  • Robustness: The method shows superior performance on challenging benchmarks like DTD and UCF-101, surpassing TAC by an average of 3.2% in Accuracy.

Hyper-parameter Sensitivity

While GradNorm is robust, its performance is influenced by temperature parameters $\kappa$ and $\tau$. The following figures illustrate the sensitivity of clustering metrics (ACC, NMI, ARI) to these parameters on the DTD and CIFAR-20 datasets.

Sensitivity of performance to the hyper-parameter $\kappa$ on DTD and CIFAR-20.
Sensitivity of performance to the hyper-parameter $\tau$ on DTD and CIFAR-20.

Conclusion

GradNorm establishes a theoretically grounded and empirically superior framework for language-assisted image clustering. By leveraging the optimization signal of gradients, it overcomes the limitations of probability-based filtering. Future work includes reducing dependency on specific VLM backbones and exploring more complex classifier architectures to further enhance semantic discovery.

Summary updated

Abstract

This paper investigates the recently emerged problem of Language-assisted Image Clustering (LaIC), where textual semantics are leveraged to improve the discriminability of visual representations to facilitate image clustering. Due to the unavailability of true class names, one of core challenges of LaIC lies in how to filter positive nouns, i.e., those semantically close to the images of interest, from unlabeled wild corpus data. Existing filtering strategies are predominantly based on the off-the-shelf feature space learned by CLIP; however, despite being intuitive, these strategies lack a rigorous theoretical foundation. To fill this gap, we propose a novel gradient-based framework, termed as GradNorm, which is theoretically guaranteed and shows strong empirical performance. In particular, we measure the positiveness of each noun based on the magnitude of gradients back-propagated from the cross-entropy between the predicted target distribution and the softmax output. Theoretically, we provide a rigorous error bound to quantify the separability of positive nouns by GradNorm and prove that GradNorm naturally subsumes existing filtering strategies as extremely special cases of itself. Empirically, extensive experiments show that GradNorm achieves the state-of-the-art clustering performance on various benchmarks.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
CIFAR-20GradNormACC60.6%LaIC clustering; the cited statement does not specify the evaluation split or backbone.
Source quote
L28: Extensive experiments on multiple benchmarks demonstrate the empirical effectiveness of our proposed GradNorm method. For example, GradNorm achieves 60.6% ACC and 81.2% ACC on CIFAR-20 and ImageNet-Dog datasets, respectively, outperforming the latest TAC \cite{26} by 4.8% and 6.1%. Additionally, on three more challenging datasets (DTD, UCF-101, and ImageNet-1K), our method surpasses TAC \cite{26} by an average of 3.2%, 1.7%, and 2.4% in terms of ACC, NMI, and ARI, respectively.
ImageNet-DogGradNormACC81.2%LaIC clustering; the cited statement does not specify the evaluation split or backbone.
Source quote
L28: Extensive experiments on multiple benchmarks demonstrate the empirical effectiveness of our proposed GradNorm method. For example, GradNorm achieves 60.6% ACC and 81.2% ACC on CIFAR-20 and ImageNet-Dog datasets, respectively, outperforming the latest TAC \cite{26} by 4.8% and 6.1%. Additionally, on three more challenging datasets (DTD, UCF-101, and ImageNet-1K), our method surpasses TAC \cite{26} by an average of 3.2%, 1.7%, and 2.4% in terms of ACC, NMI, and ARI, respectively.
BibTeX
@misc{peng2025provable,
  author = {Bo Peng and Jie Lu and Guangquan Zhang and Zhen Fang},
  title = {{On the Provable Importance of Gradients for Language-Assisted Image Clustering}},
  year = {2025},
  eprint = {2510.16335},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.16335},
}
Figure