Natural Color Fool: Towards Boosting Black-box Unrestricted Attacks

Shengming Yuan, Qilong Zhang, Lianli Gao, Yaya Cheng, Jingkuan Song

TL;DR

Natural Color Fool (NCF) is a novel black-box adversarial attack that manipulates image colors based on realistic distributions sampled from real-world datasets. By combining a semantic color library with gradient-based "neighborhood search," NCF achieves state-of-the-art transferability—fooling unknown models and defenses—while remaining completely imperceptible and natural-looking to the human eye.

Introduction & Motivation

Most adversarial attacks rely on adding small, high-frequency "noise" to pixels, constrained by an $L_p$-norm (meaning no pixel changes by more than a tiny mathematical amount). While technically small, these perturbations often look like unnatural "sand" or "fuzz" to humans and are easily neutralized by standard defense mechanisms like JPEG compression or denoising.

"Unrestricted" attacks, which make larger but semantically meaningful changes (like changing the color of a car from red to blue), are inherently stealthier. However, existing unrestricted color attacks often lack flexibility. They either use very small color shifts to stay "safe" or rely on manual intuition, which limits their transferability—the ability of an attack crafted on one model to successfully fool a different, unseen "black-box" model. The authors aim to bridge this gap by creating an attack that is both highly flexible (allowing large color shifts) and highly transferable, without sacrificing naturalness.

The Natural Color Fool (NCF) Framework

The NCF framework operates in the CIELab color space, which is more perceptually uniform than standard RGB, and follows a multi-step pipeline:

  1. Color Distribution Library: The authors built a library using the ADE20K dataset, extracting 20 dominant color distributions for various semantic classes (e.g., "mountain," "car," "sky").
  2. Semantic Mapping: For a target image, NCF uses a segmentation model (Swin-T) to identify distinct regions. It then "queries" the library to find realistic target colors for those specific regions.
  3. Monge-Kantorovich (MK) Solution: To apply these new colors, NCF uses the MK transportation solution to calculate a global transfer matrix ($T$). This ensures the color shift is smooth and maintains the original image's textures.
  4. Optimization:
    • Substitute Model Selection: NCF tries multiple color distributions and picks the one that most confuses a local "substitute" model.
  5. Neighborhood Search: It uses gradients from the substitute model to slightly fine-tune the transfer matrix $T$ within a small $\epsilon$ bound. This "nudges" the global color shift to be more adversarial while keeping it within the realm of natural-looking distributions.
  6. Initialization Reset: To avoid getting stuck in local optima, the process repeats $K$ times to find the best starting point.
The NCF pipeline involves semantic segmentation, color library querying, and gradient-based optimization.

Key Insights

  • Naturalness as a Constraint: Instead of limiting how much a pixel can change, NCF limits what it can change to. By forcing colors to come from a library of real-world distributions, the attack can make massive changes in RGB space that still look perfectly "correct" to a human observer.
  • Global vs. Local Vulnerabilities: Deep Neural Networks (DNNs) are surprisingly vulnerable to global, large-scale patterns. NCF exploits this by manipulating the entire color distribution of an object rather than individual pixels.
  • Bypassing Denoising Defenses: Because NCF doesn't rely on high-frequency noise, standard defenses like JPEG compression or feature denoising actually fail to stop it. In some cases, these defenses even make the attack more effective by further shifting the image away from the original distribution.

Experimental Results

Evaluated on an ImageNet-compatible dataset, NCF significantly outperforms previous state-of-the-art (SOTA) unrestricted attacks like ReColorAdv and ColorFool:

  • Normally Trained Models: On average, NCF improved attack success rates by 15.0% to 32.9% over competitors. For example, an attack crafted on a ResNet-18 model could fool a VGG-19 model 72.1% of the time.
  • Defense Models: NCF was remarkably effective against models specifically trained to resist attacks, outperforming SOTA methods by 10.0% to 25.3%.
  • Cross-Architecture Transfer: Attacks crafted on standard CNNs were highly successful at fooling Vision Transformers (ViTs), proving that color-based vulnerabilities are fundamental to how these models process visual information.
  • Image Quality: Quantitative metrics (such as NIMA scores) confirmed that NCF images are nearly indistinguishable from clean images in terms of aesthetic and technical quality.
Visual comparison of NCF against other unrestricted color attacks. NCF maintains high naturalness despite significant color shifts.

Limitations & Future Directions

Currently, the color library is discrete (20 sets per class), which might be insufficient to model the entire continuous color space perfectly. Additionally, the attack focuses purely on color. Future work could involve expanding the "unrestricted" philosophy to spatial transformations (like warping or rotation) to further expose model blind spots. Ultimately, the authors hope this highly transferable attack encourages the development of more robust AI safety measures.

Summary updated

BibTeX
@inproceedings{yuan2022natural,
  author = {Shengming Yuan and Qilong Zhang and Lianli Gao and Yaya Cheng and Jingkuan Song},
  title = {{Natural Color Fool: Towards Boosting Black-box Unrestricted Attacks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=-T5seeOMnM5},
}
Figure