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 Chen
TL;DR
No-Reference Image Quality Assessment using CLIP often relies on semantic similarity $Q_{sim}$, which ignores embedding magnitude and can miss degradations. The authors introduce MA-CLIP, a magnitude-aware framework that computes $Q_{mag}$ from absolute CLIP features via Box-Cox normalization (parameter $\lambda$) and fuses it with $Q_{sim}$ through a confidence-guided mechanism using $\Delta=Q_{sim}-Q_{mag}$ and logits $\gamma_{sim}=1.0+\alpha\Delta$, $\gamma_{mag}=0.6-\alpha\Delta$ to produce final $Q$. The approach is training-free and achieves state-of-the-art zero-shot IQA performance across diverse datasets (synthetic, authentic, IR, and AIGC content), with backbone-agnostic gains. This work demonstrates that internal magnitude cues in pretrained vision-language models can be leveraged, with simple normalization and fusion, to deliver robust and generalizable perceptual quality assessment without task-specific supervision.
Abstract
Recent efforts have repurposed the Contrastive Language-Image Pre-training (CLIP) model for No-Reference Image Quality Assessment (NR-IQA) by measuring the cosine similarity between the image embedding and textual prompts such as "a good photo" or "a bad photo." However, this semantic similarity overlooks a critical yet underexplored cue: the magnitude of the CLIP image features, which we empirically find to exhibit a strong correlation with perceptual quality. In this work, we introduce a novel adaptive fusion framework that complements cosine similarity with a magnitude-aware quality cue. Specifically, we first extract the absolute CLIP image features and apply a Box-Cox transformation to statistically normalize the feature distribution and mitigate semantic sensitivity. The resulting scalar summary serves as a semantically-normalized auxiliary cue that complements cosine-based prompt matching. To integrate both cues effectively, we further design a confidence-guided fusion scheme that adaptively weighs each term according to its relative strength. Extensive experiments on multiple benchmark IQA datasets demonstrate that our method consistently outperforms standard CLIP-based IQA and state-of-the-art baselines, without any task-specific training.
