Defense Against Adversarial Attacks on No-Reference Image Quality Models with Gradient Norm Regularization

Yujia Liu, Chenxi Yang, Dingquan Li, Jianhao Ding, Tingting JiangCVPR 2024

Abstract

The task of No-Reference Image Quality Assessment (NR-IQA) is to estimate the quality score of an input image without additional information. NR-IQA models play a crucial role in the media industry, aiding in performance evaluation and optimization guidance. However, these models are found to be vulnerable to adversarial attacks, which introduce imperceptible perturbations to input images, resulting in significant changes in predicted scores. In this paper, we propose a defense method to improve the stability in predicted scores when attacked by small perturbations, thus enhancing the adversarial robustness of NR-IQA models. We present theoretical evidence showing that the magnitude of score changes is related to the $\ell_1$ norm of the model's gradient with respect to the input image. Building upon this, we propose a norm regularization training strategy aimed at reducing the $\ell_1$ norm of the gradient. Experiments on four NR-IQA baseline models demonstrate the effectiveness of our strategy in reducing score changes in the presence of adversarial attacks.

Introduction: The Vulnerability of NR-IQA

No-Reference Image Quality Assessment (NR-IQA) is a vital task in modern tech, used to automatically score the quality of images in everything from social media feeds to online advertising—all without needing a "perfect" original for comparison. However, like many Deep Neural Networks, these models have a "glass jaw": they are highly susceptible to adversarial attacks.

An attacker can add a tiny, invisible amount of noise to a high-quality image to make a model rate it as "trash," or conversely, make a blurry, low-quality ad appear "perfect" to the system. This poses a real threat to the reliability of automated content moderation and advertising platforms.

Adversarial attacks on NR-IQA models cause large score changes despite minimal visual differences.

Methodology: Norm Regularization Training (NT)

The authors propose a defense strategy called Norm regularization Training (NT). Their approach is built on a solid mathematical foundation: they prove that the maximum change in a model's predicted score is directly related to the $\ell_1$ norm of the model’s gradient with respect to the input image. By forcing this sensitivity to stay low during training, the model becomes more robust.

The "Finite Difference" Trick

Standard gradient regularization usually requires "double backpropagation," which is computationally expensive. To make this practical, the authors used a clever approximation:

  1. They estimate the gradient norm using finite differences.
  2. Instead of calculating the exact second derivative, they perturb the image slightly in the direction of the gradient sign and measure how much the score changes.
  3. This approximation is then added to the standard loss function, allowing the model to learn robustness without a massive computational overhead.

Experimental Results

The experiments were conducted on the LIVEC (LIVE In the Wild) dataset, using four state-of-the-art architectures: HyperIQA, DBCNN, LinearityIQA, and MANIQA.

Quantitative Performance

The researchers tested their defense against four different attack methods (FGSM, Perceptual Attack, UAP, and Kor. Attack).

  • Dramatic Score Stability: For the DBCNN model under an FGSM attack, the error (RMSE) between the original score and the attacked score dropped from 32.778 down to 19.065 when the defense was applied.
  • Rank Preservation: The SROCC (a measure of how well the model ranks images by quality) improved significantly under attack. For HyperIQA under FGSM, the SROCC jumped from a dismal 0.043 to a much more reliable 0.941.
Comparison of score stability between standard DBCNN and DBCNN with Norm Regularization Training (NT).

Key Insights and Limitations

  • The $\ell_1$ Connection: While $\ell_2$ regularization is common, this paper highlights that for $\ell_\infty$-bounded adversarial attacks, the $\ell_1$ norm of the gradient is the specific "dial" that needs to be turned down.
  • The Robustness Trade-off: Increasing a model's robustness against attacks typically leads to a slight decrease in its accuracy on "clean," unattacked images.
  • White-Box vs. Black-Box: The defense is significantly more effective against "white-box" attacks (where the attacker knows the model's internals) than "black-box" attacks.

Future Work

The authors acknowledge that this study focused exclusively on No-Reference models. They plan to explore whether these techniques can be adapted for Full-Reference (FR-IQA) models and how to maintain "prediction monotonicity"—ensuring that as image quality objectively decreases, the score always decreases.

Conclusion

This work marks the first attempt to defend against adversarial attacks on NR-IQA models. By regularizing the gradient norm, the proposed method significantly stabilizes quality scores against imperceptible image perturbations, providing a much-needed security layer for automated media pipelines.

Summary updated

BibTeX
@inproceedings{liu2024defense,
  author = {Yujia Liu and Chenxi Yang and Dingquan Li and Jianhao Ding and Tingting Jiang},
  title = {{Defense Against Adversarial Attacks on No-Reference Image Quality Models with Gradient Norm Regularization}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
  url = {https://openreview.net/forum?id=DXsHVqaWNV},
}
Figure