Beyond Cosine Similarity Magnitude-Aware CLIP for No-Reference Image Quality Assessment

Zhicheng Liao, Dongxu Wu, Zhenshan Shi, Sijie Mai, Hanwei Zhu, Lingyu Zhu, Yuncheng Jiang, Baoliang ChenarXiv 2025 · DOI

Introduction

No-Reference Image Quality Assessment (NR-IQA) aims to predict human perceptual quality without a reference image. While supervised models often overfit to specific distortions, zero-shot approaches using CLIP (Contrastive Language-Image Pre-training) have shown promise. These methods typically rely on the cosine similarity between an image embedding and text prompts like "a good photo." However, this approach ignores a critical piece of information: the magnitude of the feature vector.

The Hidden Signal: Why Magnitude Matters

The authors discover that the magnitude of CLIP embeddings is a powerful, overlooked indicator of perceptual quality. As image quality degrades, the "strength" or magnitude of the CLIP features tends to diminish. This occurs because distortions push images away from the clean data manifold learned during pre-training.

Correlation analysis showing how feature magnitude serves as a robust quality indicator compared to standard cosine similarity.

As shown in the scatter plots above, while cosine similarity is effective for high-quality images, feature magnitude remains highly discriminative even when semantic alignment breaks down in low-quality samples. However, raw magnitude is often biased by image content. To address this, the authors introduce a statistical normalization process.

MA-CLIP: A Dual-Cue Approach

The proposed Magnitude-Aware CLIP (MA-CLIP) framework utilizes two complementary signals to estimate quality without any specific IQA training:

  1. Semantic Cue ($Q_{sim}$): Standard cosine similarity between image and antonymic prompts ("good photo" vs. "bad photo").
  2. Magnitude Cue ($Q_{mag}$): Normalized embedding magnitude. To make the magnitude a reliable metric, MA-CLIP applies a Box-Cox transformation to stabilize variance and reduce semantic bias.
The MA-CLIP architecture, integrating semantic cues and normalized magnitude cues through adaptive fusion.

Finally, a Confidence-Guided Adaptive Fusion mechanism weights these cues based on the estimated quality level. This leverages the fact that cosine similarity is more reliable for high-quality images, while feature magnitude is more discriminative for heavily distorted ones.

Results and Impact

MA-CLIP was evaluated across 11 diverse benchmarks covering synthetic noise, real-world distortions, image restoration, and AI-generated content (AIGC). Key findings include:

  • State-of-the-Art Performance: MA-CLIP consistently outperformed existing zero-shot methods, achieving a massive +11.7% improvement in SRCC on the KonIQ-10k dataset.
  • Robust Generalization: The training-free model surpassed several supervised models on cross-dataset tests, proving that the magnitude cue is a universal feature of perceptual quality.
  • Versatility: The method proved effective for assessing both traditional photography and modern AI-generated imagery.

Conclusion

By unlocking the potential of embedding magnitude, MA-CLIP redefines the state-of-the-art for zero-shot IQA. This work suggests that the "strength" of a vision-language model's response is just as important as its "direction" when assessing perceptual quality. Future work may involve integrating these magnitude-aware cues into larger Multimodal Large Language Models (MLLMs) for more nuanced feedback.

Summary updated

BibTeX
@misc{liao2025beyond,
  author = {Zhicheng Liao and Dongxu Wu and Zhenshan Shi and Sijie Mai and Hanwei Zhu and Lingyu Zhu and Yuncheng Jiang and Baoliang Chen},
  title = {{Beyond Cosine Similarity Magnitude-Aware CLIP for No-Reference Image Quality Assessment}},
  year = {2025},
  eprint = {2511.09948},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.09948},
}
Figure