<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Sparse Adversarial Atack to Object Detection</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jiayu Bao</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Electronic Engineering, Tsinghua University</institution>
        </aff>
      </contrib-group>
      <fpage>28</fpage>
      <lpage>31</lpage>
      <abstract>
        <p>Adversarial examples have gained tons of attention in recent years. Many adversarial attacks have been proposed to attack image classifiers, but few work shift attention to object detectors. In this paper, we propose Sparse Adversarial Attack (SAA) which enables adversaries to perform efective evasion attack on detectors with bounded l0 norm perturbation. We select the fragile position of the image and designed evasion loss function for the task. Experiment results on YOLOv4 and FasterRCNN reveal the efectiveness of our method. In addition, our SAA shows great transferability across different detectors in the black-box attack setting. Codes are available at https://github.com/THUrssq/Tianchi04.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>INTRODUCTION</title>
      <p>
        Deep neural networks have achieved remarkable success in
computer vision tasks like image classification, object detection and
instance segmentation. Deep object detectors can be divided into
one-stage detectors and two-stage detectors. One-stage detectors
like YOLOv4 [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and SSD [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] take classification and regression as a
single step. Hence they are usually faster than two-stage detectors.
While two-stage detectors with region proposal process often have
better performance on accuracy than one-stage detectors.
      </p>
      <p>
        However, the finding that deep models are vulnerable to
adversarial examples [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] poses great concerns for the security of
deep models. In computer vision field, adversarial examples are
perturbed images which are designed purposely to fool the deep
neural models. Many adversarial attack methods have been
proposed to study the robustness of deep models but most of them [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]
[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] focus on image classifiers rather than the more widely used
object detectors. We believe adversarial attacks play a significant
role in improving the robustness of deep neural models. Existing
adversarial attacks usually change the category classification of an
image or an object [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], which is reasonable for classifiers but
deficient for detectors.
      </p>
      <p>Due to the complexity of object detection task, adversarial attacks
on object detectors can be more diversified than that of classifiers.
In this paper, we propose a pixel eficient evasion attack method
SAA for object detectors. Concretely, the perturbation generated by
our SAA can make all the objects in the image to evade detections
of target detectors. We design diferent loss functions according to
the model we attack and choose pivotal positions in the image to
make our adversarial perturbation sparse yet powerful.</p>
      <p>Experiment results on two state-of-the-art white-box detectors
and two unknown black-box detectors show that our SAA is a pixel
eficient adversarial attack with good transferability. Our method
outperforms many other methods in the same task and get 4th in
AIC Phase IVCIKM-2020: Adversarial Challenge on Object Detection
competition. The contributions of this work are as follows:
• We propose sparse adversarial attack (SAA) method to
perform evasion attack on object detectors.
• We design powerful evasion loss functions which can
perform pixel eficient adversarial attacks on both one-stage
and two-stage object detectors.
• Our method can be easily extended to multi-models. We
ensemble two of-the-shelf detectors and achieve considerable
transferability in black-box attack settings.
2</p>
    </sec>
    <sec id="sec-2">
      <title>METHOD</title>
      <p>
        In this section, we explain our SAA method, which applying sparse
adversarial patch on images to blind the detectors. The figure1 is an
illustration of our SAA framework which ensemble multiple
detectors to perform the evasion attack. To perform powerful adversarial
attacks using limited number of pixels, we purposely design the
position, shape and size of adversarial patch. For one-stage detector
(YOLOv4 [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]) and two-stage detector (FasterRCNN [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]), we design
evasion loss function respectively to enhance our attack power. The
rest of this section is organized as follows: section 2.1 illustrate our
patch design, section 2.2 expound the loss function in SAA and
section 2.3 shed light on optimizition details.
2.1
      </p>
    </sec>
    <sec id="sec-3">
      <title>Patch Design</title>
      <p>Our SAA can generate sparse adversarial noise. Concretely, we
apply perturbation with bounded 0 norm (no more than 2% of the
image size) on the image. The perturbation is sparse in space but is
eficient in fooling the detectors due to our purposely design of its
spatial distribution.</p>
      <p>
        In the training phase of detectors, the center of an object plays a
vital role in the detection of this object. Take the one-stage detector
YOLOv4 [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] as an illustration, which will allocate anchor box that
resemble ground truth mostly for an object. Even for two-stage
detectors and anchor-free detectors, object centerness directly relates
to the computation of intersection over union (IOU). Boxes that
deviate object centerness too much are more likely to be erased
during the non-maximum suppression (NMS) process.
      </p>
      <p>
        Traditional adversarial patches with square or circle shape [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]
[
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] are too concentrated in a local area of the image. They have
great physical realizability but are pixel ineficient in this task. We
argue that a highly centralized structure limits the success rate of
attacks especially when the 0 norm constraint is too strong.
      </p>
      <p>In view of those cases, we design a kind of cruciform patch
with it’s intersection locates at the centerness of object bounding
box. Exploiting the long-span patch, we can mislead the results of
detectors severely with very few pixels changed.</p>
      <p>Due to the dificulty of 0 norm constrained optimization problem,
we exploit a mask with values of 0 and 1 to decide the location of
the patch, also to limit 0 norm of the perturbation. We design the
mask empirically based on the assumption that object centerness is
a vulnerable area against adversarial attacks, combined with other
conditions of the patch (shape, size) mentioned before. Hence the
input of the detector is formulated as follows:
 =  ⊙ (1 − ) +  ⊙ 
(1)
Here  denotes clean image,  denotes adversarial patch,  is the
mask we design purposely and ⊙ denotes element-wise product
in this paper. As illustrated in figure 1, we include preprocesses of
detectors into the forward phase of our attack in order to optimize
the patch directly with gradient.
2.2</p>
    </sec>
    <sec id="sec-4">
      <title>Loss Function</title>
      <p>The goal of our SAA is erasing all the object detections in an image.
And we define this type of attack on object detectors as evasion
attack. The evasion attack is closely related to the definition of
positive sample (foreground) and negtive sample (background) of
the detector. We erase an object in an image by making it become a
negative sample of the target detector. Consequently we design loss
functions according to the definition of foreground and background
of target detectors.</p>
      <p>
        YOLOv4 [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] is a one-stage object detector with excellent speed
performance and considerable precision performance. YOLOv4 [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]
exploits a confidence branch to distinguish foreground and
background. The bounding box with its confidence lower than a
threshold in YOLOv4 [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] will be recognized as background and will be
discarded in the postprocess phase. Based on these principles, we
design the evasion loss function of YOLOv4 [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] as follows
 =
      </p>
      <p>
        max (  (, ))
 ∈, ∈
(2)
Here  denotes the set of all object categories,  denotes the set of
all bounding boxes and   is the object confidence in YOLOv4
[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. So the loss function extracts the maximum object confidence
of an image. We minimize it to achieve our attack purpose.
(3)
(4)
(5)
(6)
      </p>
      <p>
        FasterRCNN [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] is a typical two-stage object detector that firstly
extracts bounding box proposals before the subsequent
classification and regression processes. The definition of positive and
negative samples is more complex in FasterRCNN [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] than that of
YOLOv4 [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. However, we merely consider the inference phase of
FasterRCNN [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] to simplify our attack. That is, we increase the
softmax output probabililty of background while decrease that of
any other categories (foreground objects). However, FasterRCNN
[
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] typically generates more than one hundred thousand region
proposals by RPN, which is more than ten times that of YOLOv4
[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. The enormous number of region proposals makes it hard to
erase all the objects with an extremely limited attack budget. So we
make some compromises and design the total evasion loss function
of FasterRCNN [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] as follows
      </p>
      <p>
        = 1 ·1 + 2 ·2
where 1 and 2 are hyperparameters, and we have
where  denotes the set of all object categories,  denotes the set of
all bounding boxes predict by FasterRCNN [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] and  is the number
of elements of set . We design 1 to attack the bounding box
with highest object probability, which is hard in experiments, hence
2 is added to erase as many bounding boxes as possible.
      </p>
      <p>We ensemble the two detectors to train adversarial patches, thus
the final loss function we use is as follows. Without deliberately
balancing the weights of two terms in , we can achieve high
attack success rate.</p>
      <p>=  +   
With only 2% of pixels allowed to perturb, it’s hard to generate
adversarial examples with high attack success rate. We exploit
essential tricks in the training process of adversarial patch to generate
powerful adversarial examples.</p>
      <p>To overcome the preprocess distortions, we include preprocess
into the forward and backward phase of adversarial patch training,
which including image resize, image normalization and other
necessary processes. The strategy avoids unnecessary adversarial attack
enhancements and thus accelerate our adversarial patch training
process.</p>
      <p>We exploit multi-scale steps to update adversarial patch and set
all steps to integer multiples of 1/255. We accelerate the training
process tremendously by using large steps first. Also, it’s a great
way to avoid local minima in optimization. We decrease the update
step gradually to refine our adversarial patch as the training goes
on. It is worth mentioning that we set update steps to be special
values (integer multiples of 1/255) to filter out the quantification
efect.</p>
      <p>We also design multi thickness cruciform patch to adaptively
attack images with diferent number of object detections. We
believe thinner cruciform patch produce stronger attack efect for its
adversarial efect on a wider range of image feature. Experiment
results confirm its validity in practice.</p>
      <p>
        In experiments, we conduct two phases attack to FasterRCNN
[
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. At the first phase, we set 1 = 1 and 2 = 0 in    ,
aiming at suppress the bounding box with highest object probability.
Due to rough patch location selection, we rarely succeed in the first
phase to attack FasterRCNN [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. And the second phase will be
started once the first phase failed, we set 2 = 1 and 1 = 0 to attack
as many as bounding boxes as possible. We don’t set 1 ≠ 0 and
2 ≠ 0 together for better optimization of each term in   
at diferent phase.
3
      </p>
    </sec>
    <sec id="sec-5">
      <title>EXPERIMENTS</title>
      <p>
        We select 1000 images from MSCOCO2017 dataset with all images
resized to 500*500 size. And we choose YOLOv4 [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and FasterRCNN
[
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] as target models to conduct evasion attacks using our sparse
adversarial patch.
      </p>
      <p>In order to comprehensively evaluate the performance of our
attack method, we use evasion score as the evaluation indicator.
For an image  and its adversarial version  ′,the evasion score in
model  is defined as follows</p>
      <p>Í 
 (,  ′, ) = (2 − 5000 ) · (1 −
 ( (, ),  ( ′, ))
 (, )
)
(7)
where  is ℎ connected domain of adversarial patch and  (, )
denotes the number of bounding boxes of image  predicted by
detector . That means the fewer pixels you change and the more
bounding boxes that disappear, the higher the evasion score. You
get no more than 2000 evasion score in each detector.</p>
      <p>
        We ensemble two state-of-the-art object detectors YOLOv4 [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]
and FasterRCNN [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] to generate sparse adversarial examples
using our SAA. The FasterRCNN we choose is ResNet-50 [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] based
and FPN [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] is introduced to optimize feature extraction. We also
conduct experiments on two black-box detectors and achieve
considerable transferability. The evasion scores of these detectors are
listed in table 1. In white-box settings, our strategy achieve pretty
high evasion scores of more than 1000 on both YOLOv4 [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and
FasterRCNN [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Moreover we achieve 355.69 evasion score on
two completely diferent black-box detectors, without any
transferability enhancement strategy introduced.
      </p>
      <p>We also make preliminary attempts to design diferent shape of
the sparse patch, like what is shown in figure3, and get good results
in some cases. We argue that better design of sparse adversarial
patches is more efective in 0 norm bounded settings. And we
believe strategies like attention and saliency map can be exploited
to improve our method.
4</p>
    </sec>
    <sec id="sec-6">
      <title>CONCLUSION</title>
      <p>In this work, we propose a sparse adversarial attack on object
detectors. We design evasion loss functions to blind detectors with 0
norm bounded perturbations. Our method achieve very high attack
success rate on two state-of-art detectors and manifest considerable
transforability even in black-box settings. Even so, we believe that
our method can be further improved via selecting better locaions
of the adversarial patch in the image.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Alexey</given-names>
            <surname>Bochkovskiy</surname>
          </string-name>
          ,
          <string-name>
            <surname>Chien-Yao</surname>
            <given-names>Wang</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Hong-Yuan Mark Liao</surname>
          </string-name>
          .
          <year>2020</year>
          .
          <article-title>YOLOv4: Optimal Speed and Accuracy of Object Detection</article-title>
          . arXiv preprint arXiv:
          <year>2004</year>
          .
          <volume>10934</volume>
          (
          <year>2020</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Tom</surname>
            <given-names>B Brown</given-names>
          </string-name>
          , Dandelion Mané, Aurko Roy, Martín Abadi, and
          <string-name>
            <given-names>Justin</given-names>
            <surname>Gilmer</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Adversarial patch</article-title>
          .
          <source>arXiv preprint arXiv:1712.09665</source>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Nicholas</given-names>
            <surname>Carlini</surname>
          </string-name>
          and
          <string-name>
            <given-names>David</given-names>
            <surname>Wagner</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Towards evaluating the robustness of neural networks</article-title>
          .
          <source>In 2017 ieee symposium on security and privacy (sp)</source>
          .
          <source>IEEE</source>
          ,
          <fpage>39</fpage>
          -
          <lpage>57</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Kaiming</given-names>
            <surname>He</surname>
          </string-name>
          , Xiangyu Zhang, Shaoqing Ren, and
          <string-name>
            <given-names>Jian</given-names>
            <surname>Sun</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>Deep residual learning for image recognition</article-title>
          .
          <source>In Proceedings of the IEEE conference on computer vision and pattern recognition</source>
          .
          <volume>770</volume>
          -
          <fpage>778</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Lifeng</given-names>
            <surname>Huang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Chengying</given-names>
            <surname>Gao</surname>
          </string-name>
          ,
          <string-name>
            <surname>Yuyin Zhou</surname>
          </string-name>
          , Cihang Xie, Alan L Yuille,
          <string-name>
            <surname>Changqing Zou</surname>
          </string-name>
          , and Ning Liu.
          <year>2020</year>
          .
          <article-title>Universal Physical Camouflage Attacks on Object Detectors</article-title>
          .
          <source>In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition</source>
          .
          <fpage>720</fpage>
          -
          <lpage>729</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Tsung-Yi</surname>
            <given-names>Lin</given-names>
          </string-name>
          , Piotr Dollár, Ross Girshick, Kaiming He,
          <string-name>
            <surname>Bharath Hariharan</surname>
            , and
            <given-names>Serge</given-names>
          </string-name>
          <string-name>
            <surname>Belongie</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Feature pyramid networks for object detection</article-title>
          .
          <source>In Proceedings of the IEEE conference on computer vision and pattern recognition</source>
          .
          <volume>2117</volume>
          -
          <fpage>2125</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Wei</surname>
            <given-names>Liu</given-names>
          </string-name>
          , Dragomir Anguelov, Dumitru Erhan,
          <string-name>
            <given-names>Christian</given-names>
            <surname>Szegedy</surname>
          </string-name>
          , Scott Reed, Cheng-Yang
          <string-name>
            <surname>Fu</surname>
          </string-name>
          , and
          <string-name>
            <surname>Alexander C Berg</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>Ssd: Single shot multibox detector</article-title>
          .
          <source>In European conference on computer vision</source>
          . Springer,
          <fpage>21</fpage>
          -
          <lpage>37</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Xin</given-names>
            <surname>Liu</surname>
          </string-name>
          , Huanrui Yang, Ziwei Liu, Linghao Song,
          <string-name>
            <given-names>Hai</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>and Yiran</given-names>
            <surname>Chen</surname>
          </string-name>
          .
          <year>2018</year>
          .
          <article-title>Dpatch: An adversarial patch attack on object detectors</article-title>
          . arXiv preprint arXiv:
          <year>1806</year>
          .
          <volume>02299</volume>
          (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Aleksander</given-names>
            <surname>Madry</surname>
          </string-name>
          , Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and
          <string-name>
            <given-names>Adrian</given-names>
            <surname>Vladu</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Towards deep learning models resistant to adversarial attacks</article-title>
          .
          <source>arXiv preprint arXiv:1706.06083</source>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Shaoqing</surname>
            <given-names>Ren</given-names>
          </string-name>
          , Kaiming He,
          <string-name>
            <surname>Ross Girshick</surname>
            , and
            <given-names>Jian</given-names>
          </string-name>
          <string-name>
            <surname>Sun</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>Faster r-cnn: Towards real-time object detection with region proposal networks</article-title>
          .
          <source>IEEE transactions on pattern analysis and machine intelligence 39</source>
          ,
          <issue>6</issue>
          (
          <year>2016</year>
          ),
          <fpage>1137</fpage>
          -
          <lpage>1149</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Christian</surname>
            <given-names>Szegedy</given-names>
          </string-name>
          , Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and
          <string-name>
            <given-names>Rob</given-names>
            <surname>Fergus</surname>
          </string-name>
          .
          <year>2013</year>
          .
          <article-title>Intriguing properties of neural networks</article-title>
          .
          <source>arXiv preprint arXiv:1312.6199</source>
          (
          <year>2013</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Cihang</surname>
            <given-names>Xie</given-names>
          </string-name>
          , Jianyu Wang, Zhishuai Zhang, Yuyin Zhou, Lingxi Xie, and
          <string-name>
            <given-names>Alan</given-names>
            <surname>Yuille</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Adversarial examples for semantic segmentation and object detection</article-title>
          .
          <source>In Proceedings of the IEEE International Conference on Computer Vision</source>
          . 1369-
          <fpage>1378</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>