Category-wise Attack: Transferable Adversarial Examples for Anchor Free Object Detection

Quanyu Liao, Xin Wang, Bin Kong, Siwei Lyu, Youbing Yin, Qi Song, Xi WuarXiv 2020

Abstract

Adversarial research in object detection has primarily focused on instance-wise attacks against anchor-based models. This paper introduces Category-wise Attack (CA), a novel framework targeting anchor-free detectors by perturbing high-level semantic heatmaps. By shifting focus from individual instances to entire object categories, CA achieves a 14x speedup over existing methods while demonstrating superior transferability to black-box architectures. We propose two variants: Sparse Category-wise Attack (SCA) for minimal pixel perturbation and Dense Category-wise Attack (DCA) for robustness. Evaluations on PascalVOC and MS-COCO show that CA can effectively blind detectors to specific classes with over 99% success rate in white-box settings and significant performance degradation in black-box transfers.

Introduction

Adversarial attacks involve adding imperceptible "noise" to an image to make a machine learning model fail. In object detection, most existing attacks are instance-wise: if an image has five cars, the attacker tries to hide each car one by one. This is computationally expensive and often results in "overfitting" the noise to a specific model, making the attack fail if the victim uses a different detector (poor transferability).

Furthermore, most research has focused on anchor-based detectors (like Faster R-CNN), which rely on predefined bounding boxes. Newer anchor-free detectors (like CenterNet), which identify objects via keypoints and heatmaps, have been largely ignored. This work fills this gap by creating an efficient, category-level attack that exploits the fundamental way these modern models perceive the world.

Comparison between Instance-wise Attack (left), which targets individual objects, and Category-wise Attack (right), which targets entire classes.

Methodology

The core innovation is the Category-wise Attack (CA). Instead of focusing on bounding boxes, the authors target the heatmaps that anchor-free detectors use to estimate the probability of an object's presence at every pixel. Because anchor-free models rely on heatmaps for both localization and classification, a successful attack on the heatmap effectively "erases" the object from the model's reality.

Visualization of the overall heatmap and individual category heatmaps (Person, Car, Truck, etc.) that serve as the primary targets for the attack.

The authors propose two specific algorithms:

  1. Sparse Category-wise Attack (SCA): Optimized for the $L_0$ norm, this method seeks to change the fewest number of pixels possible (often <1% of the image) to achieve the attack. It uses a linear solver to iteratively find the most "informative" pixels to perturb.
  2. Dense Category-wise Attack (DCA): Optimized for the $L_\infty$ norm, this creates a subtle, widespread mist of noise across the image. It aggregates the gradients of all detected instances in a category to create a global perturbation.

Crucially, they don't just attack the pixels where an object is detected; they also attack "potential pixels"—neighboring areas with high probability scores. This prevents the detector from simply "shifting" its detection to a nearby pixel to avoid the noise.

Experimental Results

The researchers evaluated their methods on the PascalVOC and MS-COCO benchmarks across various architectures, including CenterNet, CornerNet, Faster R-CNN, and SSD300.

  • Effectiveness: In white-box settings, DCA achieved an Attack Success Rate (ASR) of over 99% on the MS-COCO dataset.
  • Efficiency: DCA is roughly 14 times faster than the previous state-of-the-art attack (DAG).
  • Black-Box Transfer: Attacks generated on a CenterNet model proved remarkably effective against anchor-based models like Faster R-CNN, dropping its mean Average Precision (mAP) from 0.71 down to 0.44. This suggests that despite different architectures, these models share similar high-level semantic vulnerabilities.
  • Robustness: The DCA method is particularly robust to JPEG compression, making it a viable threat for real-world, web-based images.

Conclusion

Category-wise attacks represent a significant shift in adversarial research, moving from instance-level perturbations to systematic class-level blinding. The high transferability of these attacks between anchor-free and anchor-based models poses a serious security risk. Future work must focus on developing "category-aware" adversarial defenses to mitigate these vulnerabilities.

Summary updated

BibTeX
@misc{liao2020category,
  author = {Quanyu Liao and Xin Wang and Bin Kong and Siwei Lyu and Youbing Yin and Qi Song and Xi Wu},
  title = {{Category-wise Attack: Transferable Adversarial Examples for Anchor Free Object Detection}},
  year = {2020},
  eprint = {2003.04367},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2003.04367},
}
Figure