<!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>Reasoning about algorithmic opacity</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ekaterina Kubyshkina</string-name>
          <email>ekaterina.kubyshkina@unimi.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mattia Petrolo</string-name>
          <email>mattia.petrolo@ufabc.edu.br</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Federal University of ABC, Alameda da Universidade</institution>
          ,
          <addr-line>s/n, São Bernardo do Campo, SP 09606-045</addr-line>
          ,
          <country country="BR">Brazil</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Milan, Philosophy Department</institution>
          ,
          <addr-line>Via Festa del Perdono, 7 20122, Milan</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>A recurring problem discussed in explainable AI is the so-called epistemic opacity problem, that is, a problem about the epistemic accessibility and reliability of algorithms. In the present work, we provide an original epistemological characterization of the opacity of algorithms based on a tripartite analysis of their components. Against this background, we introduce a formal framework by modifying the neighborhood semantics for evidence logic introduced in [1]. This setting allows one to reason about an agent's epistemic attitudes toward an algorithm and investigate what are the conditions that should be met to achieve epistemic transparency.</p>
      </abstract>
      <kwd-group>
        <kwd>Transparent AI</kwd>
        <kwd>epistemic opacity</kwd>
        <kwd>epistemic logic</kwd>
        <kwd>evidence models</kwd>
        <kwd>neighborhood semantics</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        The explosion in the use of computational algorithms in several domains of human life prompted
the development of explainable AI and, more in general, of what can be labelled as a
humancentered approach to algorithms to help shed some light on the nature of AI models. From this
perspective, as Seaver puts it, “it is not the algorithm, narrowly defined, that has sociocultural
efects, but algorithmic systems - intricate, dynamic arrangements of people and code” ([
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], pp.
418-419). A recurring problem discussed in this approach, in a form or another, is the so-called
epistemic opacity problem, that is, a problem about the epistemic accessibility and reliability of
algorithms. In the present work, our aim is to provide an original epistemological and logical
characterization of the epistemic opacity of algorithms, in order to investigate under which
conditions this form of opacity can be eliminated.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. A definition of epistemic opacity</title>
      <p>
        To characterize the epistemic opacity of algorithms, we follow the methodology proposed by
Durán and Formanek [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and adapt Humphreys’ definition of epistemically opaque process:
[A] process is epistemically opaque relative to a cognitive agent X at time t just in
case X does not know at t all of the epistemically relevant elements of the process
([
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], p. 618).
      </p>
      <p>© 2022 Author:Pleasefillinthe\copyrightclause macro</p>
      <p>
        This characterization of opacity crucially relies on the fact that an agent “X does not
know”, which, in turn, presupposes an account of what knowledge is. However,
unfortunately, Humphreys leaves this question open. Traditional epistemology takes knowledge as
corresponding to justified true belief. This analysis has been challenged by Gettier’s famous
counterexample (see [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]), which prevents one to consider luck-dependent cases as cases of
genuine knowledge. To avoid this problem, our characterization of opacity must take special
care in spelling out the nature of the justificatory component involved in the analysis. Moreover,
in order to specify what are the “epistemically relevant elements” of algorithms, the definition
has to take into account their specific structure. Cormen et al. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] describe an algorithm as
follows: “Informally, an algorithm is any well-defined computational procedure that takes some
value, or set of values, as input and produces some value, or set of values, as output” ([
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], p. 5).
Although informal and sketchy, this description highlights three fundamental elements of an
algorithm: its input, procedure, and output. We argue that a sound characterization of epistemic
opacity (and epistemic transparency) for algorithms has to take these elements into account.
Our proposal is as follows:
Definition 2.1 (Epistemological). An algorithm is epistemically opaque relative to an epistemic
agent A at time t just in case at t, A does not have
an epistemic justification for I,
or an epistemic justification for P,
or an epistemic justification for O;
where I, P, O express the algorithm’s input, procedure, and output, respectively.
      </p>
      <p>
        One important feature of the previous definition is that the components I, P, and O of the
algorithm are, at least in principle, independent. As a consequence, the lack of epistemic
justification for any component constitutes a suficient condition for epistemic opacity. Let
us clarify the definition via an example of a specific facial recognition algorithm used in
AI. Convolutional neural networks (CNN, see [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]) are a biologically-inspired class of neural
networks used in facial recognition. CNN consist of three layers: an input layer, an output layer,
and several hidden layers (e.g., convolutional layers, pooling layers, fully connected layers).
Following Definition 2.1, a CNN can be opaque for three diferent reasons. First, an agent
using the model might not know the set of images used to train the neural network. This
input opacity is external to the procedure of the algorithm and it depends on some choices
made by the algorithm’s designers, which are not necessarily accessible to the user. Thus,
input opacity is not about a single image inserted by the user, but rather about the relationship
established between this image and the dataset on which the algorithm is trained. Second, the
agent using the model might not have epistemic access to the procedures of the hidden layers.
For instance, she misses the information about what a convolution operation is. This procedure
opacity is internal to the algorithm and presupposes some form of epistemic access to the inner
working of the algorithm. Finally, the epistemic agent using the algorithm might notice that
the output does not fit with her current set of beliefs. For instance, she knows that two faces
are the same, despite the output of the CNN claims otherwise. This output opacity is external
to the procedure of the algorithm and it represents for the user a way to compare the output
with her previously acquired beliefs. In principle, the three conditions can occur separately,
but, in most of real-world algorithms, these forms of opacity are entangled, thus raising the
complexity of the epistemic opacity problem. On the basis of this characterization, in the vast
majority of cases, the algorithms with which we interact on a daily basis are epistemically
opaque. In what follows, we introduce a formal framework to reason about an agent’s epistemic
attitudes towards opaque algorithms and investigate what are the conditions that should be
met to achieve epistemic transparency.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. A formal framework</title>
      <p>Definition 2.1 can be considered as a tentative epistemological characterization of epistemic
opacity. However, to reason formally about the epistemic attitudes of an agent toward opacity,
one needs to recast that definition in logical terms. To do so, we will borrow some tools from
the toolkit of epistemic logic and match each component of Definition 2.1 with an epistemic
modality. Roughly, we consider that the fact that an agent has an epistemic justification for I
can be logically represented by   , that is, an agent “knows the input  ” of the algorithm. The
fact that an agent has an epistemic justification for P can be seen as □  , that is, the agent “has
an evidence for the procedure  ”. Finally, the fact that an agent has an epistemic justification
for O can be considered as  that is, the agent “believes in the output  ”. Let us now present
more carefully this formal framework.</p>
      <p>
        The semantics we are proposing is a modification of a neighborhood semantics for evidence
logic provided by van Benthem et al. [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. The main diference of our proposal from [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] is that we
need to fix three separate domains: for inputs, for procedures, and for outputs. For inputs we fix
a domain consisting of variables , , , ... ∈   . These variables denote some data inserted into
the algorithm. Practically, the data can be in a form of sentences, pictures, diagrams etc. For this
reason , , ... do not designate only propositions. For procedures we fix a domain consisting
of variables , ,  , ... ∈   . These variables denote procedures used by the algorithm. As
procedures are not just propositions, , ,  , ... are not just propositional variables. For the
outputs we fix a domain of propositional variables , ,  , ... ∈   by assuming that the outputs
of the algorithms always take propositional form.
      </p>
      <p>The language ℒ is defined as follows:
 ∶=  |  |  | ¬ |  ∧  |  |
□  |  
where  ∈   ,  ∈   ,  ∈   , and  in  is defined on the domain   ,  in □  is
defined on the domain   ,  in   is defined on the domain   .</p>
      <p>The intended interpretation of  is “the agent believes in the output  ,” where  stands for a
proposition. The interpretation of □  is “the agent has evidence for procedure  .” By “having
an evidence for a procedure” we mean that an agent has an understanding of a particular way
of producing an output based on a given input. The interpretation of   is “the agent knows
the data  ,” where by “knowing the data” we mean that the agent is aware of the inputs of the
algorithm. From this perspective, we are not dealing with propositional factive knowledge in
this case. For instance, an agent may know the data used by the algorithm as an input even if
these data are incorrect. In what follows, we indicate by  the union of   ,   , and   ,
and we add a superscript on variables   ,   ,   in order to mark them, respectively, as the
output, the procedure, and the input of the same algorithm  .</p>
      <p>
        In order to interpret the language ℒ we use the evidence models introduced by van Benthem
et al. [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>Definition 3.1.
worlds,  ⊆  × ( )
( ) for the set { |  }
∅ ∉ ( ) and  ∈ ( )</p>
      <p>.</p>
      <p>An evidence model is a tuple ℳ = ⟨ , ,  ⟩ , where  is a non-empty set of
is an evidence relation,  ∶  → ( ) is a valuation function. We write</p>
      <p>. Two constraints are imposted on the evidence sets: For each  ∈  ,
Definition 3.2. A  -scenario is a maximal collection  ⊆ ( ) that has the finite intersection
property: for each finite subfamily { 1, ...,   } ⊆  , ∩1≤≤   ≠ ∅.</p>
      <p>Definition 3.3. Let ℳ = ⟨ , ,  ⟩
as follows:</p>
      <p>be an evidence model. Truth of a formula  ∈ ℒ is defined
• ℳ,  ⊧  if  ∈  () ;
• ℳ,  ⊧  if  ∈  () ;
• ℳ,  ⊧  if  ∈  () ;
• ℳ,  ⊧ ¬ if ℳ,  ⊧ ̸  ;
• ℳ,  ⊧  ∧  if ℳ,  ⊧  and ℳ,  ⊧  ;
• ℳ,  ⊧ □  if there exists  such that   and for all  ∈  , ℳ,  ⊧  ;
• ℳ,  ⊧  if for each  -scenario  and for all  ∈ ∩ , ℳ,  ⊧  ;
• ℳ,  ⊧   if for all  ∈  , ℳ,  ⊧  .</p>
      <p>The satisfiability and validity are defined as usual.</p>
      <p>The main peculiarity of our approach lies in distinguishing three types of domains for
variables and limiting the application of each modal operator by its corresponding domain.
Technically, we have defined the same function for all the three types of variables, and the
evidence sets are defined so that they can contain any type of variables. However, conceptually,
satisfiability of each type of variables in a world represents diferent situations. In particular,
ℳ,  ⊧  means that proposition  is true in a world  , which is standard. By ℳ,  ⊧  we
mean that the procedure  belongs to the world  . This, in turn, by definition of ¬, means that
ℳ,  ⊧ ¬ should be interpreted as the fact that the procedure  does not belong to the world
 . Similarly, ℳ,  ⊧  means that  belongs to the world  , and ℳ,  ⊧ ¬ means that  does
not belong to the world  . These considerations are useful for understanding the definitions
of  , □ , and  . In particular, ℳ,  ⊧  means that after considering all the evidences for and
against  , the truth of  is consistent with these evidences. The condition for ℳ,  ⊧ □  states
that an agent has an evidence for a procedure  if  is present in some evidence set available in
 . Notice that it is possible that an agent has an evidence both for  and ¬ . This is in line with
our informal reading, because an agent can have evidences for a procedure being applicable
in a certain context, but inapplicable in some other. Finally, ℳ,  ⊧   means that the data is
present in all worlds considered by the agent, i.e., the agent has full access to the data in all
contexts.</p>
      <p>On the basis of the previous definitions, we are able to define opaque algorithms semantically.
We do not need to define an algorithm in our semantics, but we take it as a system  containing
all inputs, procedures, and outputs, associated with  . Following Definition 2.1, an opaque
algorithm ( ) is one for which the agent lacks a justification for at least of one of its components.
We can now rephrase this definition in logical terms.</p>
      <p>Definition 3.4 (Logical). An algorithm is epistemically opaque relative to an epistemic agent
in a world  ∈ ℳ if:
ℳ,  ⊧  if ℳ,  ⊧ ¬  1 ∨ ¬□  2 ∨ ¬ 3.</p>
      <p>Now we are able to provide semantic models for representing transparent and opaque
algorithms.</p>
      <p>Example 3.1 (Transparent algorithm). Let ℳ = ⟨ , ,  ⟩ such that  = { ,  1,  2,  3}, ( ) =
{{ ,  1,  2,  3}}, and  (  ) =  (  ) =  (  ) =  . Clearly, in this model we have ℳ,  ⊧  
ℳ,  ⊧ □   , and ℳ,  ⊧   . Thus, ℳ,  ⊧ ¬ .
 ,
Example 3.2 (Opaque algorithm - 1). In this example we provide a model for an algorithm,
the opaqueness of which is due to the lack of epistemic justification for the input, in presence
of epistemic justifications for the procedure and the output. Let ℳ = ⟨ , ,  ⟩ such that
 = { ,  1,  2,  3}, ( ) = {{ ,  1,  2,  3}, { ,  1,  2}}, and  (  ) = { ,  1,  3},  (  ) = { ,  1,  2},
 (  ) = { ,  1,  2,  3}. In this model we have ℳ,  ⊧ ¬   , because ℳ,  2 ⊧ ¬  ; and we have
ℳ,  ⊧ □   , ℳ,  ⊧   . Thus, ℳ,  ⊧  .</p>
      <p>Example 3.3 (Opaque algorithm - 2). Now we model a situation in which an algorithm is
opaque due to the lack of epistemic justification for the procedure, in presence of epistemic
justification of the input and of the output. Let ℳ = ⟨ , ,  ⟩ such that  = { ,  1,  2,  3},
( ) = {{ ,  1,  2,  3}, { ,  1,  2}}, and  (  ) = { ,  1,  2,  3},  (  ) = { 1},  (  ) = { ,  1,  2,  3}.
In this model, we have ℳ,  ⊧ ¬ □   , because for all  such that   there exist  ∈  such
that ℳ⊧ ̸  ; and we have ℳ,  ⊧    , ℳ,  ⊧   . Thus, ℳ,  ⊧  .</p>
      <p>Example 3.4 (Opaque algorithm - 3). Here we consider a model, in which an algorithm is
opaque because the agent lacks an epistemic justification for the output, in the presence of
the justifications both for the input and the procedure. Let ℳ = ⟨ , ,  ⟩ such that  =
{ ,  1,  2,  3}, ( ) = {{ ,  1,  2,  3}, { ,  1,  2}}, and  (  ) = { ,  1,  2,  3},  (  ) = { ,  1,  2},
 (  ) = { ,  1,  3}. We have ℳ,  ⊧ ¬  , because for  2 ∈ ∩ , ℳ,  2⊧ ̸  ; and we have
ℳ,  ⊧    , ℳ,  ⊧ □   . Thus, ℳ,  ⊧  .</p>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion and future work</title>
      <p>We provided an original epistemological definition of algorithmic opacity based on a tripartite
analysis of algorithms. On the basis of this definition, we introduced a formal framework that
allows one to analyze the epistemic attitudes of an agent towards a possibly opaque algorithm.
The transition from the epistemological to the formal framework is made by respecting the
tripartite structure of I, P, and O and by attributing to them the  , □ , and  modality, respectively.
Let us call this analysis the IPO model of algorithmic opacity. In future work, we aim at deepening
the IPO model, both from an epistemological and formal perspective. Regarding the former, in
the literature on algorithmic opacity, it is often pointed out that one of the major dificulties
in analyzing opacity is its multilayered nature. Some authors have proposed taxonomies for
diferent forms of epistemic opacity. For instance, Burrell [8] distinguishes between intentional,
illiterate, and intrinsic opacity. From this perspective, we intend to compare the epistemological
definition we introduced with the forms of opacity analyzed in the literature, in order to
understand whether our definition is general enough to encompass all possible forms of opacity.
From a formal point of view, we have adapted the evidence models to provide a general semantic
framework to reason about an agent’s epistemic attitudes toward an algorithm. The next natural
step in this investigation is to introduce a logical system for reasoning about opacity and prove
its completeness with respect to the evidence models. Moreover, recently, other approaches for
dealing with the notion of evidence were proposed, for instance by Carnielli and Rodrigues [9]
and Artemov [10]. Carnielli and Rodrigues [9] provide an interpretation of paraconsistent and
paracomplete logics in terms of evidence. Even though this reading permits one to deal with
possibly inconsistent evidence, which is also possible by using the semantics we adopted, the
relation between evidence and justification is less straightforward in this logical framework.
For this reason, we consider our approach more promising for the aims of the current work.
Artemov [10] introduced a logic of justification by supplementing the standard modalities of
epistemic and doxastic logic with explicit terms, which provide the reason for believing in a
proposition. It seems that the IPO model can also be represented in this framework. We leave
the task of adapting the logic of justification to the analysis of opaque algorithms for future
investigations.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgments</title>
      <p>The authors acknowledge the support of the Project PRIN2020 BRIO - Bias, Risk and Opacity
in AI (2020SSKZ7R) awarded by the Italian Ministry of University and Research (MUR). The
research of Ekaterina Kubyshkina is funded under the “Foundations of Fair and Trustworthy
AI” Project of the University of Milan. Mattia Petrolo gratefully acknowledges the support of
the French National Research Agency (ANR) through the Project ANR-20-CE27-0004.
M. Arbib (Ed.), The handbook of brain theory and neural networks, 2nd ed., The MIT press,
1998, pp. 255–258.
[8] J. Burrell, How the machine ‘thinks’: Understanding opacity in machine learning
algorithms, Big Data &amp; Society 2 (2016) 1–12.
[9] W. Carnielli, A. Rodrigues, An epistemic approach to paraconsistency: a logic of evidence
and truth, Synthese 196 (2019) 3789–3813.
[10] S. Artemov, The logic of justification, The Review of Symbolic Logic 1 (2008) 477–513.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>J. van Benthem</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Fernández-Duques</surname>
          </string-name>
          ,
          <string-name>
            <surname>E. Pacuit,</surname>
          </string-name>
          <article-title>Evidence logic: A new look at neighborhood structures</article-title>
          ,
          <source>Advances in Modal Logic</source>
          (
          <year>2012</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>N.</given-names>
            <surname>Seaver</surname>
          </string-name>
          ,
          <article-title>Knowing algorithms</article-title>
          , in: J.
          <string-name>
            <surname>Vertesi</surname>
          </string-name>
          , D. Ribes (Eds.),
          <string-name>
            <surname>Digital</surname>
            <given-names>STS</given-names>
          </string-name>
          :
          <string-name>
            <given-names>A Field</given-names>
            <surname>Guide</surname>
          </string-name>
          , Princeton University Press,
          <year>2019</year>
          , pp.
          <fpage>412</fpage>
          -
          <lpage>422</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>J.</given-names>
            <surname>Durán</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Formanek</surname>
          </string-name>
          ,
          <article-title>Grounds for trust: Essential epistemic opacity and computational reliabilism</article-title>
          ,
          <source>Minds and Machines</source>
          <volume>28</volume>
          (
          <year>2018</year>
          )
          <fpage>645</fpage>
          -
          <lpage>666</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>P. W.</given-names>
            <surname>Humphreys</surname>
          </string-name>
          ,
          <article-title>The philosophical novelty of computer simulation methods</article-title>
          ,
          <source>Synthese</source>
          <volume>169</volume>
          (
          <year>2009</year>
          )
          <fpage>615</fpage>
          -
          <lpage>626</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>E.</given-names>
            <surname>Gettier</surname>
          </string-name>
          ,
          <article-title>Is justified true belief knowledge?</article-title>
          ,
          <source>Analysis</source>
          <volume>23</volume>
          (
          <year>1963</year>
          )
          <fpage>121</fpage>
          -
          <lpage>123</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>T.</given-names>
            <surname>Cormen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. E.</given-names>
            <surname>Leiserson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Rivest</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Stein</surname>
          </string-name>
          , Introduction to Algorithms, Cambridge: MIT Press,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Y.</given-names>
            <surname>LeCun</surname>
          </string-name>
          , Y. Bengio,
          <article-title>Convolutional networks for images, speech, and time series</article-title>
          , in:
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>