<!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>Fooling an Automatic Image Quality Estimator</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Benoit Bonnet</string-name>
          <email>benoit.bonnet@inria.fr</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Teddy Furon</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Patrick Bas</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Univ. Lille, CNRS</institution>
          ,
          <addr-line>Centrale Lille, UMR 9189, CRIStAL, Lille</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Univ. Rennes</institution>
          ,
          <addr-line>Inria, CNRS, IRISA Rennes</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2020</year>
      </pub-date>
      <fpage>14</fpage>
      <lpage>15</lpage>
      <abstract>
        <p>This paper presents our work on the 2020 MediaEval task: “Pixel Privacy: Quality Camouflage for Social Images". Blind Image Quality Assessment (BIQA) is an algorithm predicting a quality score for any given image. Our task is to modify an image to decrease its BIQA score while maintaining a good perceived quality. Since BIQA is a deep neural network, we worked on an adversarial attack approach of the problem.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>INTRODUCTION</title>
      <p>
        The internet is flooded with images. This is especially true with the
growth of social networks over the last decade. All this data is used
to perform analysis to bring out new trends or to train predictive
models. When it comes to images, deep neural networks vastly lead
the landscape of machine learning. These deep neural networks
are especially known to thrive on big datasets. This leads to the
idea that more data leads to better models. While there certainly is
truth to that afirmation, better learning mostly comes out of better
data. Good data is data that both fits the task ( e.g. people, places,
objects detection) and whose quality is good. Due to the amount of
available data, a human could not perform this cherry-picking of
good data. Automated classifiers like BIQA [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] have been trained
to assess the quality of an image. This classifier was trained on
images whose quality was labeled based on the perceived quality of
the media (e.g. resolution, compression artifacts). To protect one’s
data, images can be manipulated and slightly modified to defeat the
automatic quality assessment [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. We chose an adversarial attack
approach to achieve this goal.
      </p>
    </sec>
    <sec id="sec-2">
      <title>APPROACH Adversarial Examples</title>
      <p>
        Adversarial examples were first introduced by Szegedy et al. [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] in
early 2014. They are usually studied in the case of image
classification: An attack efectively crafts a perturbation of an image to a
small extent but enough to fool even the best classifiers.
      </p>
      <p>In this setup, an original image 0 is given as an input to the
trained neural network to estimate the probabilities (ˆ (0)) of
being from class  ∈ {1, . . . ,  }. The predicted class is given by:
ˆ(0) = arg max ˆ (0).</p>
      <p>(1)
The classification is correct if ˆ(0) =  (0) the ground truth class
for 0. The goal of an attack is to craft an imperceptible perturbation
 such that the adversarial sample  = 0 +  verifies ideally:
★ = arg</p>
      <p>min
:ˆ()≠ (0)
∥ −  ∥,</p>
      <p>Where ∥ · ∥ is a measure of distortion, in most cases the
Euclidean distance. A small distortion makes it less likely for human
to perceive that the image was manipulated.</p>
      <p>BIQA is a deep neural network and as such is vulnerable to
adversarial attacks. However BIQA is not a classifier returning a class
prediction but a regressor giving a quality score ( ) ∈ [0, 100].
The notion of adversarial sample thus needs to be redefined. In our
case, we set a target score  ∈ [0, 100]. Regardless of the original
score ( ), our adversarial sample now ideally verifies:
★ = arg :mi(n)&lt; ∥ −  ∥,
2.2
An original image 0 in the spatial domain (e.g. PNG format) is
a 3-dimensional discrete tensor: 0 ∈ {0, 1, . . . , 255} (with  =
3 ×  × , 3 color channels,  rows and  columns of pixels). The
main objective of this task is to craft images:  ∈ {0, 1, . . . , 255} .
This additional constraint to the attack is yet not easy to enforce.</p>
      <p>In a deep neural network, this input image is first preprocessed
onto a range domain that usually reduces variance of the data.
Its purpose is to ease the learning phase and thus to increase the
performance of a deep neural network. This preprocessing is defined
by design before the training stage and cannot be modified at testing.
In the case of BIQA, the range domain is [−0.5, 0.5] .</p>
      <p>Most attacks of the literature are performed in this domain
without consideration of the transformation it represents. This leads
to an adversarial sample  ∈ [0, 255] after reverting the
preprocessing. To save this adversarial sample  as an image, the first
step is then to round it which will erase most of the perturbation
in the case of a low-distortion attack. Rounding is therefore likely
to remove the adversarial property of the sample.</p>
      <p>
        Paper [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] addresses this problem presenting a post-processing
added on top of any attack to eficiently quantize a perturbation: It
keeps the adversarial property while lowering the added distortion.
The method is based on a classification loss to ensure adversariality
defined as follows:
      </p>
      <p>( ) = log(ˆ (0) ( )) − log(ˆˆ() ( )).</p>
      <p>To adapt this method to the context of BIQA, we only need to
redefine it to:</p>
      <p>( ) = ( ) −  .</p>
      <p>For a given x,  ( ) &lt; 0 ensures x scores under the target  .
(2)
(3)
(4)
(5)
3</p>
    </sec>
    <sec id="sec-3">
      <title>EXPERIMENTAL WORK</title>
      <p>
        In this task, we know the classifier (BIQA) and its parameters. We
are therefore in a white-box setup. Most modern attacks are
developed in this scenario, from the most basic FGSM [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and IFGSM [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]
to the most advanced PGD [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], C&amp;W [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], BP [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. FGSM is a
noniterative attack bringing a fast solution of the problem. Our work
used this attack in the early stages as a proof of concept bringing
a quick further understanding of the problem. Artifacts were
visible. Instead all the results reported here are crafted using more
the advanced PGD attack [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] in its 2 optimization version. One
input parameter is the distortion budget. We run the attack over 7
iterations with diferent distortion budgets (whose maximum value
is set to 2000). A binary search quickly finds an adversarial sample
with the lowest distortion.
3.1
      </p>
    </sec>
    <sec id="sec-4">
      <title>JPEG compression</title>
      <p>
        The final images will be evaluated on their JPEG [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] counterpart.
This compression is done with a quality factor of 90. However there
are many image compression sofwares providing diferent results.
We used the command line $ convert to simulate this compression.
      </p>
      <p>Tables 1 and 2 show for diferent methods both   and  
respectively the percentage of images successfully beating the
target score in the PNG domain and the JPEG domain. Additionally
Table 2 shows results of the jury as well.
3.2</p>
      <p>
        Quantization
3.2.1 Spatial domain. The work [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] serves as a baseline for
quantization. We only slightly adapt it as stated in Sect. 2.2. Table 1
reports our results for two target scores:  = 30 and  = 50. It
appears that the perturbation crafted in the pixel domain is fragile
when facing a JPEG compression.
      </p>
      <p>
        3.2.2 DCT domain. The final image being evaluated after a JPEG
compression, we explore a method adapting the quantization [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]
to the DCT domain. Using the same notations [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]: Let  denote
the image in the DCT domain,  =  +  is the result of an
initial attack like PGD, and  =  +  +  the final quantized
transformed coefcients. We solve a Lagrangian formulation:
 =  +  + arg min  () +  (),

(6)
where  is the Lagrangian multiplier controlling the tradeof
between the distortion  () and  () defined in (5). The distortion
 () is defined as the squared 2 norm of added perturbation:
 () = ∥Δ × ( + ) ∥2.
      </p>
      <p>The quantization noise  is s.t.  +  +  ∈ ΔZ , where Δ ∈ N
is the quantization step matrix for JPEG QF=90. If we use a first
order approximation of  (), we can develop (6) in a second-degree
polynomial function. For any coeficient  , this function is locally
minimized by:
★(  ) = − (  ) −   (  ) , (7)
2Δ(  )
where  = ∇ () |=0 the gradient computed at  = 0. This
minimum however does not enforce ( + ★) ∈ Z . A simple
rounding of ( + ) will then finalize the quantization. Finally we
need to control a maximum allowed distortion. If  gets big,  (  )
become a very high value which is not desirable. The final value
for the quantized perturbation in the DCT domain is thus bounded
by [− Δ , Δ1 ]. These images were submitted to the jury.</p>
      <p>1
4</p>
    </sec>
    <sec id="sec-5">
      <title>RESULTS AND ANALYSIS</title>
      <p>Tables 1 and 2 show the importance of considering the JPEG
compression. When the image is quantized by the 2 optimization in
the spatial domain, most images will successfully be adversarial
images. However, very few of them remain adversarial after the
JPEG compression. The BIQA score on most images increases up to
10 points. If the quantization is done in the DCT domain, most of
them remain adversarial and the task is successful. It is however
obviously more dificult to beat a lower target score  . An
interesting property of the DCT quantization is that it creates typical
JPEG artifacts as seen on Figure 1. This is especially true in low
frequency images since it is harder to remain undetectable in a such
situation.
5</p>
    </sec>
    <sec id="sec-6">
      <title>DISCUSSION AND OUTLOOK</title>
      <p>
        The MediaEval task was a good opportunity to extend our previous
work [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] to 1) a regressor BIQA, and 2) in the DCT domain. Saving
the DCT coeficients directly into a JPEG image is more consistent as
it ofers a better control on adversariality. Another dificulty of this
task was the lack of knowledge about the compression algorithm.
We therefore worked in a ‘gray’ box setup. The results showed
that JPEG compression have a big efect on the BIQA score of, at
least, adversarial images (and probably any other quality estimator).
Hopefully our JPEG compression is close to the one used in the
contest which allowed transferability of our adversarial images.
Pixel Privacy: Quality Camouflage for Social Images
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Benoît</given-names>
            <surname>Bonnet</surname>
          </string-name>
          , Teddy Furon, and
          <string-name>
            <given-names>Patrick</given-names>
            <surname>Bas</surname>
          </string-name>
          .
          <year>2020</year>
          .
          <article-title>What If Adversarial Samples Were Digital Images?</article-title>
          .
          <source>In Proc. of ACM IH&amp;MMSec '20</source>
          .
          <fpage>55</fpage>
          -
          <lpage>66</lpage>
          . https://doi.org/10.1145/3369412.3395062
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <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 IEEE Symp. on Security and Privacy.</source>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Ian</surname>
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Goodfellow</surname>
            , Jonathon Shlens, and
            <given-names>Christian</given-names>
          </string-name>
          <string-name>
            <surname>Szegedy</surname>
          </string-name>
          .
          <year>2015</year>
          .
          <article-title>Explaining and Harnessing Adversarial Examples</article-title>
          .
          <source>In ICLR</source>
          <year>2015</year>
          , San Diego, CA, USA,.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>V.</given-names>
            <surname>Hosu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Lin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Sziranyi</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D.</given-names>
            <surname>Saupe</surname>
          </string-name>
          .
          <year>2020</year>
          .
          <article-title>KonIQ-10k: An Ecologically Valid Database for Deep Learning of Blind Image Quality Assessment</article-title>
          .
          <source>IEEE Transactions on Image Processing</source>
          <volume>29</volume>
          (
          <year>2020</year>
          ),
          <fpage>4041</fpage>
          -
          <lpage>4056</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Alexey</given-names>
            <surname>Kurakin</surname>
          </string-name>
          , Ian Goodfellow, and
          <string-name>
            <given-names>Samy</given-names>
            <surname>Bengio</surname>
          </string-name>
          .
          <year>2017</year>
          . Adversarial Machine Learning at Scale. (
          <year>2017</year>
          ).
          <source>arXiv:cs.CV/1611.01236</source>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Zhuoran</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Zhengyu</given-names>
            <surname>Zhao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Martha</given-names>
            <surname>Larson</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Laurent</given-names>
            <surname>Amsaleg</surname>
          </string-name>
          .
          <year>2020</year>
          .
          <article-title>Exploring Quality Camouflage for Social Images</article-title>
          .
          <source>In Working Notes Proceedings of the MediaEval Workshop.</source>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <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>2018</year>
          .
          <article-title>Towards Deep Learning Models Resistant to Adversarial Attacks</article-title>
          .
          <source>In ICLR</source>
          <year>2018</year>
          , Vancouver, BC, Canada.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Christian</given-names>
            <surname>Szegedy</surname>
          </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>2014</year>
          .
          <article-title>Intriguing properties of neural networks</article-title>
          . (
          <year>2014</year>
          ).
          <source>arXiv:cs.CV/1312.6199</source>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>G. K.</given-names>
            <surname>Wallace</surname>
          </string-name>
          .
          <year>1992</year>
          .
          <article-title>The JPEG still picture compression standard</article-title>
          .
          <source>IEEE Transactions on Consumer Electronics</source>
          <volume>38</volume>
          ,
          <issue>1</issue>
          (
          <year>1992</year>
          ),
          <article-title>xviii-xxxiv</article-title>
          . https://doi.org/10.1109/30.125072
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Hanwei</surname>
            <given-names>Zhang</given-names>
          </string-name>
          , Yannis Avrithis, Teddy Furon, and
          <string-name>
            <given-names>Laurent</given-names>
            <surname>Amsaleg</surname>
          </string-name>
          .
          <year>2020</year>
          .
          <article-title>Walking on the Edge: Fast, Low-Distortion Adversarial Examples</article-title>
          .
          <source>IEEE Transactions on Information Forensics and Security (Sept</source>
          .
          <year>2020</year>
          ). https://doi.org/10.1109/TIFS.
          <year>2020</year>
          .3021899
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>