<!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>
      <journal-title-group>
        <journal-title>June</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Towards Explainable Security for ECA Rules</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Bernardo Breve</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gaetano Cimino</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vincenzo Deufemia</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Salerno</institution>
          ,
          <addr-line>via Giovanni Paolo II, Fisciano (SA), 84084</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2022</year>
      </pub-date>
      <volume>06</volume>
      <issue>2022</issue>
      <fpage>0000</fpage>
      <lpage>0002</lpage>
      <abstract>
        <p>With the rise in popularity of smart objects and online services, the use of Trigger-Action Platforms for the definition of custom behaviors is growing significantly. These platforms enable end-users to create Event-Condition-Action (ECA) rules for triggering actions upon event occurrences on physical devices or online services in diferent domains. ECA rules could easily expose end-users to security risks mainly due to their low level of knowledge and awareness. To alleviate this problem, classification models can be used for identifying possible security issues that ECA rules could inflict when triggered. However, the results produced by these classifiers may not be understood by end-users. This position paper provides first insights concerning the application of AI models for generating natural language explanations according to the identified risks of ECA rules.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;trigger-action platforms</kwd>
        <kwd>ECA rules</kwd>
        <kwd>security</kwd>
        <kwd>explainable AI</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Many works have addressed these issues by carefully categorizing the types of harm that
could be inflicted [
        <xref ref-type="bibr" rid="ref1 ref2 ref3 ref4">1, 2, 3, 4</xref>
        ]. An approach for their detection is the use of Artificial Intelligence
(AI) techniques, since they allow for analyzing the semantic and contextual information in
which an ECA rule is applied. In [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], we firstly evaluated the feasibility of classifying ECA rules
by training a classification model on manually labeled rules with respect to four classes of risk
[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Such a solution provides many advantages over static approaches, such as the analysis of
the information flow [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], which performs a static services analysis without considering the
context where a rule is employed.
      </p>
      <p>
        The results produced by classification models are dificult to understand without expert
knowledge. Thus, it is fundamental to provide end-users with valid explanations describing the
risks connected to a rule in a comprehensible manner, with the aim of enhancing the end-users
trust. Such a task can be faced by employing the Explainable Security (XSec) paradigm, which is
inspired by the eXplainable Artificial Intelligence (XAI) research field [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>This position paper highlights existing AI techniques that can be used for generating natural
language explanations clarifying why an ECA rule might cause harm.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Generation of explanations</title>
      <p>
        Over the last few years, the need for solutions supporting end-users in understanding the results
of AI techniques is progressively increasing. To this end, the Defense Advanced Research Projects
Agency proposed the XAI paradigm [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], which deals with elucidating, in total transparency, the
reason behind the outputs of an AI model.
      </p>
      <p>
        Many XAI-based solutions have been proposed in the literature. For instance, Ribeiro et al.
introduced Local Interpretable Model-Agnostic Explanations (LIME) [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], a technique that can
faithfully explain the results of any AI model using a linear model. More specifically, we can
use LIME to plot information about a model prediction, such as the probability distribution over
target classes, the relevance of each feature of an instance in the classification task, and the set
of words in a sentence that leads the model towards a specific decision. Similarly, Lundberg et
al. presented SHapley Additive exPlanations (SHAP) [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], an additive feature attribution method
based on Shapley values and game theory. SHAP makes it possible to identify the predictive
power of features and the relationships between them and the target class.
      </p>
      <p>Although these solutions allow for increasing end-user confidence and trust in prediction
models by providing knowledge that can be easily interpreted, they may be inefective for the
audience we consider. Indeed, it is worth noting that such solutions arise intending to define
visual representations that facilitate end-users to comprehend model decisions in producing
a specific output (e.g., which features lead to a prediction rather than another). Instead, in
the context of ECA rules, we need to explain to end-users the scenarios in which a rule could
become dangerous for their privacy or security.</p>
      <p>
        Inspired by the XAI paradigm, Viganò et al. proposed a new paradigm: XSec [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. The latter
aims to explain reasoning about privacy and security vulnerabilities and concrete attacks on
systems. The authors suggest several approaches to produce diferent explanations according
to the levels of detail required by the stakeholders. For instance, explanations for a system
analyst might be presented with a low level of abstraction, such as explanation trees, attack
trees, formal languages, and so forth. Instead, non-expert end-users need easily understandable
explanations, so a higher level of abstraction must be adopted.
      </p>
      <p>A possible solution is using natural language explanations, which are immediately
understandable by all types of end-users and can be customized according to the context of the use
of rules. Figure 1 shows an example of the process yielding the generation of explanations
for risky ECA rules. In particular, features concerning an ECA rule, i.e., event, condition, and
action, are considered by a classification module, which identifies the class of risk. Finally, the
XAI module will generate an explanation by considering both the ECA rule characteristics and
the identified risk.</p>
      <p>ECA Rule
A nyoeuwreinmbaoixlin atWtaicthhmaennt</p>
      <p>Event Condition</p>
      <p>Upload file to
OneDrive
Action</p>
      <p>Risky
ECA rules
classifier</p>
      <p>Identified risk</p>
      <p>XAI Module</p>
      <p>Explanation
"An attacker might send a malicious file
that will be automatically synchronized
across multiple devices, increasing the
chance for an end-user to open it."</p>
      <p>
        The automatic generation of textual explanations is faced by another branch of XAI, called
Explainable AI with Natural Language Explanations (Natural-XAI) [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. The latter aims to build
AI models capable of generating sentences that justify the ground-truth predictions inferred by
classification models. Several approaches could be adopted to generate textual explanations
that express the reason involving the risks associated with ECA rules. Among them, language
models represent an efective way to achieve this goal since they can produce a structured
text relating the risk and the rule’s context of use. The existing models difer in the way they
manipulate the data. For instance, Text-to-Text-Transfer-Transformer (T5) [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] is a model that
can generate a sentence by taking a list of keywords as input. Thus, it is required to employ a
further module for extracting the keywords from the rules’ information. On the other hand,
a model as Generative Pre-trained Transformer 2 (GPT-2) [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] requires the definition of a
specific format for the rules to produce the textual explanations corresponding to the risks.
Concerning this matter, one approach that could be exploited is prompt-based learning [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
The latter focuses on finding the most appropriate prompt to adopt with a language model in
order to manipulate its behavior and predict the desired output. Recently, models capable of
jointly generating the prediction and explanation for a given instance are becoming increasingly
popular [14, 15]. These models provide an advantage with respect to the necessity of applying
in combination two diferent models, i.e., a classifier and a language model.
      </p>
      <p>At the workshop, we will present how language models can be adopted to achieve the
discussed goals.</p>
    </sec>
    <sec id="sec-3">
      <title>Acknowledgments</title>
      <p>This work has been supported by the Italian Ministry of University and Research (MUR) under
grant PRIN 2017 “EMPATHY: Empowering People in deAling with internet of THings ecosYstems”
[14] L. A. Hendricks, Z. Akata, M. Rohrbach, J. Donahue, B. Schiele, T. Darrell, Generating
visual explanations, in: European conference on computer vision, Springer, 2016, pp. 3–19.
[15] D. H. Park, L. A. Hendricks, Z. Akata, A. Rohrbach, B. Schiele, T. Darrell, M. Rohrbach,
Multimodal explanations: Justifying decisions and pointing to the evidence, in: Proceedings
of the IEEE Conference on Computer Vision and Pattern Recognition, 2018, pp. 8779–8788.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>I.</given-names>
            <surname>Bastys</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Balliu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Sabelfeld</surname>
          </string-name>
          ,
          <article-title>If this then what? Controlling flows in IoT apps</article-title>
          ,
          <source>in: Proceedings of ACM SIGSAC Conference on Computer and Communications Security, ACM</source>
          ,
          <year>2018</year>
          , p.
          <fpage>1102</fpage>
          -
          <lpage>1119</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>M.</given-names>
            <surname>Surbatovich</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Aljuraidan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Bauer</surname>
          </string-name>
          ,
          <string-name>
            <surname>A. Das</surname>
            ,
            <given-names>L. Jia,</given-names>
          </string-name>
          <article-title>Some recipes can do more than spoil your appetite: Analyzing the security and privacy risks of IFTTT recipes</article-title>
          ,
          <source>in: Proceedings of the 26th International Conference on World Wide Web</source>
          ,
          <year>2017</year>
          , p.
          <fpage>1501</fpage>
          -
          <lpage>1510</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>C.</given-names>
            <surname>Cobb</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Surbatovich</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Kawakami</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Sharif</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Bauer</surname>
          </string-name>
          ,
          <string-name>
            <surname>A. Das</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Jia</surname>
          </string-name>
          ,
          <article-title>How risky are real users' IFTTT applets?</article-title>
          ,
          <source>in: Proceedings of the Sixteenth USENIX Conference on Usable Privacy and Security</source>
          , USENIX Association, USA,
          <year>2020</year>
          , pp.
          <fpage>505</fpage>
          -
          <lpage>529</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Q.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Datta</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Bates</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. A.</given-names>
            <surname>Gunter</surname>
          </string-name>
          ,
          <article-title>Charting the attack surface of trigger-action iot platforms</article-title>
          ,
          <source>in: Proceedings of the 2019 ACM SIGSAC conference on computer and communications security</source>
          ,
          <year>2019</year>
          , pp.
          <fpage>1439</fpage>
          -
          <lpage>1453</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>B.</given-names>
            <surname>Breve</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Cimino</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Deufemia</surname>
          </string-name>
          ,
          <article-title>Towards a classification model for identifying risky IFTTT applets</article-title>
          , in: G. Desolda,
          <string-name>
            <given-names>V.</given-names>
            <surname>Deufemia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Matera</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Paternò</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Zancanaro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Vernero</surname>
          </string-name>
          (Eds.),
          <source>Proceedings of the 2nd International Workshop</source>
          on Empowering People in
          <article-title>Dealing with Internet of Things Ecosystems co-located with with INTERACT 2021, Bari</article-title>
          , Italy, Online / Bari, Italy,
          <year>September 30</year>
          ,
          <year>2021</year>
          , volume
          <volume>3053</volume>
          <source>of CEUR Workshop Proceedings, CEUR-WS.org</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>33</fpage>
          -
          <lpage>37</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>D.</given-names>
            <surname>Gunning</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Stefik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Choi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Miller</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Stumpf</surname>
          </string-name>
          , G.-
          <string-name>
            <given-names>Z.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <article-title>Xai-explainable artificial intelligence</article-title>
          ,
          <source>Science Robotics</source>
          <volume>4</volume>
          (
          <year>2019</year>
          )
          <article-title>eaay7120</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>M. T.</given-names>
            <surname>Ribeiro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Singh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Guestrin</surname>
          </string-name>
          ,
          <article-title>" why should i trust you?" explaining the predictions of any classifier</article-title>
          ,
          <source>in: Proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining</source>
          ,
          <year>2016</year>
          , pp.
          <fpage>1135</fpage>
          -
          <lpage>1144</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>S. M.</given-names>
            <surname>Lundberg</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.-I.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <article-title>A unified approach to interpreting model predictions</article-title>
          ,
          <source>Advances in neural information processing systems</source>
          <volume>30</volume>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>L.</given-names>
            <surname>Vigano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Magazzeni</surname>
          </string-name>
          ,
          <article-title>Explainable security</article-title>
          ,
          <source>in: 2020 IEEE European Symposium on Security and Privacy Workshops (EuroS&amp;PW)</source>
          , IEEE,
          <year>2020</year>
          , pp.
          <fpage>293</fpage>
          -
          <lpage>300</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>O.-M. Camburu</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          <string-name>
            <surname>Rocktäschel</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          <string-name>
            <surname>Lukasiewicz</surname>
          </string-name>
          , P. Blunsom, e
          <article-title>-snli: Natural language inference with natural language explanations</article-title>
          ,
          <source>Advances in Neural Information Processing Systems</source>
          <volume>31</volume>
          (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>C.</given-names>
            <surname>Rafel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Shazeer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Roberts</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Narang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Matena</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Zhou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. J.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <article-title>Exploring the limits of transfer learning with a unified text-to-text transformer</article-title>
          , arXiv preprint arXiv:
          <year>1910</year>
          .
          <volume>10683</volume>
          (
          <year>2019</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>A.</given-names>
            <surname>Radford</surname>
          </string-name>
          ,
          <string-name>
            <surname>J. Wu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Child</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Luan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Amodei</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I.</given-names>
            <surname>Sutskever</surname>
          </string-name>
          , et al.,
          <article-title>Language models are unsupervised multitask learners</article-title>
          ,
          <source>OpenAI blog 1</source>
          (
          <year>2019</year>
          )
          <article-title>9</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>P.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Yuan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Fu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Jiang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Hayashi</surname>
          </string-name>
          , G. Neubig,
          <article-title>Pre-train, prompt, and predict: A systematic survey of prompting methods in natural language processing</article-title>
          ,
          <source>arXiv preprint arXiv:2107.13586</source>
          (
          <year>2021</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>