Using Feature Alignment Can Improve Clean Average Precision And Adversarial Robustness In Object Detection

Weipeng Xu, Hongcheng Huang, Shaoyou PanICIP 2020 · DOI

Abstract

The 2D object detection in clean images has been a well studied topic, but its vulnerability against adversarial attack is still worrying. Existing work has improved robustness of object detectors by adversarial training, at the same time, the average precision (AP) on clean images drops significantly. In this paper, we propose that using feature alignment of intermediate layer can improve clean AP and robustness in object detection. Further, on the basis of adversarial training, we present two feature alignment modules: Knowledge-Distilled Feature Alignment (KDFA) module and Self-Supervised Feature Alignment (SSFA) module, which can guide the network to generate more effective features. We conduct extensive experiments on PASCAL VOC and MS-COCO datasets to verify the effectiveness of our proposed approach.

Introduction

Deep learning models, including state-of-the-art object detectors, are notoriously fragile when faced with adversarial attacks—small, intentional pixel perturbations that are invisible to humans but cause models to fail. The standard defense is Adversarial Training (AT), where a model is trained on these "attacked" images. However, AT comes with a heavy price: a massive drop in performance on clean images. In some cases, researchers have seen a 25-point drop in Average Precision (AP) on standard benchmarks. This research aims to break this "robustness-accuracy" trade-off, seeking a method that protects the model without sacrificing its ability to detect objects in normal conditions.

Proposed Method: Feature Alignment

The core proposal is that the instability caused by adversarial attacks can be mitigated by stabilizing the network's intermediate layers. The authors introduce Feature Alignment (FA), consisting of two primary modules:

  1. Knowledge-Distilled Feature Alignment (KDFA): This uses a "Teacher" network (already trained on clean data). During training, the "Student" network is forced to make its intermediate features for an adversarial image match the Teacher's features for the corresponding clean image.
  2. Self-Supervised Feature Alignment (SSFA): Here, the network acts as its own reference. It attempts to maximize the similarity between the features it generates for a clean image and its adversarial counterpart at the end of the backbone.
Overview of the proposed Feature Alignment framework featuring KDFA and SSFA modules.

To prevent the model from finding "shortcuts," a stop-gradient operation is used on the clean image branch during self-supervised alignment. High-dimensional features are projected into a lower-dimensional manifold using global average pooling before calculating cosine similarity losses.

Experimental Results

The researchers evaluated their approach on PASCAL VOC and MS-COCO benchmarks using both YOLO-v3 and Faster R-CNN-FPN. They used a metric called acAP (the mean of clean AP and adversarial AP) to measure the overall balance.

  • PASCAL VOC (Faster R-CNN): The Feature Alignment (FA) method achieved an acAP of 0.500, significantly higher than vanilla adversarial training (0.454) and previous state-of-the-art methods like TOD (0.470).
  • PASCAL VOC (YOLO-v3): FA reached 0.481 acAP, compared to 0.463 for vanilla AT.
  • MS-COCO (YOLO-v3): On this harder dataset, FA achieved 0.315 acAP, outperforming the standard baseline (0.305) and vanilla AT (0.290).

Crucially, the method consistently maintained higher "clean AP" while simultaneously improving "advAP" (adversarial AP) compared to other defense strategies.

Key Insights and Visual Analysis

The authors argue that by constraining the middle layer, they effectively limit how much a small change in input (the attack) can change the output, a concept rooted in Lipschitz continuity.

Grad-CAM visualizations comparing standard detection, adversarial training, and the proposed Feature Alignment.

As shown in the Grad-CAM visualizations above, Feature Alignment helps the model ignore the "background noise" introduced by an attacker and stay focused on the actual object features. While standard models or basic AT might be distracted by perturbations, the FA-enhanced models maintain attention on the relevant semantic regions, leading to more robust and accurate detections.

Conclusion

While a performance gap still exists between clean and adversarial samples, Feature Alignment significantly narrows it. By stabilizing the backbone's feature extraction, the subsequent detection heads can perform more reliably. Future work will explore aligning different intermediate layers and testing on a wider variety of architectures.

Summary updated

BibTeX
@inproceedings{xu2020using,
  author = {Weipeng Xu and Hongcheng Huang and Shaoyou Pan},
  title = {{Using Feature Alignment Can Improve Clean Average Precision And Adversarial Robustness In Object Detection}},
  booktitle = {ICIP},
  year = {2020},
  doi = {10.1109/icip42928.2021.9506689},
}
Figure