<!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>Debated Backpropagation</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Isaac James</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Christopher Stone</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alice Toniolo</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>School of Computer Science, University of St Andrews</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Dialogue has long been used in human society to explain seemingly opaque concepts. In this paper we focus on how to better explain training models for neural networks, to entertain as well as inform. We present a multi-agent argumentation-based dialogue system to generate human understandable dialogue to explain backpropagation. The system incorporates a model of agent personality and introduces social elements between agents to produce characterful discussion. Natural language templates are used to render utterances in English.</p>
      </abstract>
      <kwd-group>
        <kwd>Backpropagation</kwd>
        <kwd>Explanation</kwd>
        <kwd>Argumentation</kwd>
        <kwd>Dialogue</kwd>
        <kwd>NLG</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        Explainability in machine learning (ML) is not guaranteed by using an effective model.
In fact, often the highest performing models (e.g. Deep Learning) are the least
explainable. The issue of explainability in ML is pervasive, and is seen to affect the methods
used to train models as well as how they perform [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
      </p>
      <p>
        In this paper, we seek to improve the explainability of one such training algorithm
for neural networks, backpropagation, using dialogue as a means of explanation.
Dialogue and argumentation are commonly used in human society to inform, persuade and
deliberate over the course of action. To the same effect, dialogue can be used in
computational systems to resolve conflict between cooperating software agents [
        <xref ref-type="bibr" rid="ref14 ref17">14,17</xref>
        ].
      </p>
      <p>
        We propose a multi-agent system incorporating the elements of a neural network
and backpropagation algorithm. The system includes a logical model of dialogue for
agents to explain their preferred steps in the algorithm and a Natural Language
Generation method for rendering these dialogues in a human understandable format. The
system can also be configured to support other dialogue topics and agent personalities
using a well defined interface. We define our own set of agents to give identity and
character to our dialogue participants. Moreover, we give these agents personality and
organise them in a social structure, with the aim of generating convincingly human
dialogue that entertains as well as informs. Our method presents the initial steps to a novel
approach to explaining an ML algorithm in an entertaining way.
Many current ML techniques, including neural networks, focus on constructing
models in their internal representations [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. These systems are difficult to explain as the
models are opaque. Nevertheless, explainability plays a major role in optimising and
producing scientific outcomes [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]. Roscher et al. [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] presents two general forms of
explanation: scientific explanations, which include the data, model and output obtained;
and algorithmic explanations, which aim to “reveal underlying causes to the decision
of an ML method”. Existing research often focuses on scientific explanations either by
embedding the generation of the explanations in the training algorithms or by creating
an additional layer over existing algorithms to explain how a decision is computed [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
In this research we follow the latter approach, but apply it to explaining training rather
than the decisions made by the trained model.
      </p>
      <p>
        In developing explanations, Roscher et al. [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] argues that explainability cannot be
achieved solely by an explanation generated via an algorithm. Among other approaches,
argumentation-based reasoning has recently been adopted for generating explainable
systems due to the capabilities of argumentation to provide justifications for a decision
(see [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] for a survey). When explanations are structured as argumentation frameworks,
dialogue can be built upon them to provide means to interactively explore or challenge
the explanations (e.g. [
        <xref ref-type="bibr" rid="ref13 ref17">13,17</xref>
        ]). We are concerned with explaining the steps of a
backpropagation algorithm and what actions it dictates on the basis of the current state of the
system. Among the types of dialogue proposed by Walton and Krabbe [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ], the closest
to our objectives are inquiry and deliberation. We adopt Riley’s et al. [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] framework for
multi-agent dialogues over actions, in which inquiry dialogue over beliefs is combined
with persuasion dialogue over actions. Our dialogue does not deliver explanations, but
the steps of backpropagation are externalised in a dialogical form, similar to [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
      </p>
      <p>
        Two additional dimensions are important in our work to enhance user engagement
and support understanding of how a training algorithm works. Engagement with ML
explanations has been sought through different means, including gamification of ML
tasks (e.g., [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]) and storytelling [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. In creating our narratives, we consider dialogue
based explanations as argumentative speeches using rhetoric elements [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] whose
informative and persuasive nature appeals to users’ emotions to create engagement. Research
on agent personality supports this task (e.g., [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]). Naturally, human normative
reasoning is strongly influenced by emotion, which in turn is influenced by one’s personality.
Agent personality models can be used to simulate emotions. There exist many
personality models generally consisting of a set of dimensions [
        <xref ref-type="bibr" rid="ref6 ref7">6,7</xref>
        ].
      </p>
      <p>
        Finally, we deliver the rendered debates using a systematic approach for
producing natural language text from non-textual data by borrowing techniques from Natural
Language Generation (NLG) [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. Generating a natural language text usually requires
choosing the contents of an utterance and preparing the plan of the entire text before
the final realisation of sentences [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. However, template-based systems are able to map
non-linguistic input directly to the realised sentences, omitting the need for an
intermediate plan [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ]. A dialogue system usually has to formulate one or at most a sequence
of a few sentences at a time [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. Thus, template-based systems can be useful for
generating dialogues where the contents of an utterance are already decided (for example,
by a dialogue move) and a limited set of sentence templates will suffice. NLG has been
demonstrated in different argumentation systems for explanations, e.g. [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], but with
less focus on the narrative output as in our approach.
      </p>
      <p>We observed that there exists a wealth of related work in the areas of machine
learning explainability, argumentation for explainability and multi-agent dialogue systems.
However, current work at the intersection of these fields, in particular using multi-agent
dialogue systems to explain an ML algorithm in an entertaining way, is limited. In this
research, we describe an initial system to address this gap.
3</p>
    </sec>
    <sec id="sec-2">
      <title>A model of agents to discuss backpropagation</title>
      <p>Here we present our general approach to deliver a dialogue based explanation of the
backpropagation algorithm in an entertaining and easy to access way.
3.1</p>
      <sec id="sec-2-1">
        <title>Neural Networks</title>
        <p>
          A neural network is composed of a number of neurons connected via directed links
[
          <xref ref-type="bibr" rid="ref16">16</xref>
          ]. Each link has a numeric weight associated with it. A neuron i connected to
neuron j has weight wi;j . The output of a neuron i is its activation value. To obtain the
activation of neuron j, the weighted sum of the inputs is first calculated. This linear
component is then transformed by a nonlinear component [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ], called the activation
function, g, to obtain the activation value aj = g( j + bj ). Here, neuron j is
associated with a bias value, bj . The bias is added to the weighted sum of inputs given to the
activation function, which serves to adjust the activation higher or lower independent
of the activations of the previous layer. Our neural network uses a sigmoid activation
function, which outputs in the range (0, 1).
        </p>
        <p>The goal of training a neural network is to set the weights and biases in order to
minimise the error at the output layer. This error is a measure of how close the output is
to the desired output, which is calculated using a loss function, L(w; b), where w and
b are matrix representations of the weights and biases. For a multi-layer feedforward
network, training can be achieved using backpropagation. At each step, the gradient of
the loss function is computed with respect to the weights and biases. The negation of
this gradient (the direction of steepest descent) is then used to update the weights and
biases. This process is repeated until training converges on a minimal possible loss.</p>
        <p>In this paper, we train a neural network for a classification task. Output targets are
one-hot encoded, resulting in a target of 1 or 0 for each individual output neuron. For
the purpose of later promoting discussion around whether these targets are met, we
introduce the concept of tolerance, which is the minimal difference required between
an output neuron’s activation and its target for the neuron to be deemed on target.
3.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Backpropagation dialogue in agent society</title>
        <p>We construct our system around the idea of an agent society. Let us regard the natural
hierarchy of a neural network’s elements: the network itself, its layers and their
respective neurons. We map this structure onto the concept of a labouring agent society, with
each element represented by a single agent (see Fig. 1). The neuron agents reside at the
lowest level, working to change weights and biases, and are concerned mainly by the
personal impact of these changes on themselves and their immediate neighbours. Above
them, the layer and network agents concentrate on the bigger picture: training outcomes
and errors, guiding the lower levels towards improving these results. The single network
agent at the top is the most accountable, responsible for setting goals and
communicating these to the layer agents. The layer agents form the ‘middle-management’ and must
mediate the debate of the many neuron agents, whilst directing them to perform actions
to meet the goals set by the network.</p>
        <p>In backpropagation, the error in each output neuron is propagated back to connected
hidden neurons according to the strength of the respective connections. The hidden
neurons are therefore made responsible for some fraction of the output neuron’s error. This
notion of responsibility can be incorporated into an agent’s personality. For example,
their individual contribution to the overall training error might interact with their sense
of moral or social responsibility to the other agents to influence their choices in a
dialogue game. Agent roles and their social relationships are encoded within our
application of the belief and personality framework of an agent.</p>
        <p>With the aim to convey an explanation of the steps of the backpropagation
algorithm, our dialogue can be structured as follows:
1. Begin with the network agent stating an overall goal (e.g., a desired classification).
2. Proceed with the network agent inquiring as to whether the goal has been met.
3. Participants then exchange relevant information to discover the answer to the inquiry.
4. If the goal has not been met, participants argue about what action to take until
consensus is reached.</p>
        <p>
          This dialogue incorporates two of the argumentation dialogue types proposed by
Walton and Krabbe [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ]: deliberation and inquiry. Through inquiry, agents may
discover what is currently blocking the satisfaction of the goal, which can be used to
inform a choice of action in the deliberation phase that follows.
3.3
        </p>
      </sec>
      <sec id="sec-2-3">
        <title>Our agent framework</title>
        <p>
          Our approach to represent the dialogue uses the framework from Riley et al [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ]
extended for our objectives. An agent x is equipped with the following components:
1. Epistemic knowledge: facts and defeasible rules to enable an agent’s epistemic
reasoning. Facts represent information regarding the current state of the
backpropagation algorithm from which agents form b-arguments.
2. Normative knowledge: action rules formalised as an Action-Based Alternating
Transition System (AATS) to enable an agent to decide what to do in order to reach the
stated goal. From actions agents form a-arguments.
3. Inquiry dialogue protocol rules: enabling agents to collectively discover the status
of the target goal using b-arguments; for example whether a neuron should activate.
4. Deliberation dialogue protocol rules: enabling agents to collectively decide what to
do to reach the target goal (e.g. modify the activation threshold) using a-arguments.
5. An agent personality and role, modelled as a vector of binary personality
dimensions, which determine what arguments take priority in the dialogue and how this
is rendered in natural language.
6. A set of Natural language templates that are instantiated on the basis of the agent
personality and role.
        </p>
        <p>The following section will present how we instantiated this framework in our work.
4</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>A Multi-Agent System to Explain Backpropagation</title>
      <p>
        We implemented our system in Python, on the basis of Nielsen’s code [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. The network
uses a sigmoid activation function and uses mini-batch stochastic gradient descent.
4.1
      </p>
      <sec id="sec-3-1">
        <title>Agents</title>
        <p>Our agent model encapsulates an agent’s epistemic knowledge, normative knowledge
and personality dimensions. In our system we have five agent types: Network (NT),
Layer (Li), Input Neuron (INi), Hidden Neuron (HNij) and Output Neuron (ONi). The
symbols i; j indicate numerical indices that identify individual layer and neuron agents.</p>
        <p>The network agent NT encapsulates the neural network, including the
backpropagation algorithm. NT is also responsible for initialising and storing the other agent
objects in the society, including the layers and neurons, as well as updating the values
of their beliefs to reflect the current state of the network. For example, NT will update
the weight, bias and activation beliefs of the neuron agents to ensure that they are
consistent with the latest values. NT is also capable of updating its own beliefs between
training iterations, such as the target classification of a training sample.</p>
        <p>The layer agents Lis are responsible for deriving knowledge relevant to individual
neuron agents from NT’s beliefs, such as activation targets for individual output neurons
using a target class known to the network. The neuron agents Nis are responsible for
harbouring most of the normative knowledge in the society. Nis know about the weights
and biases in the network and what actions can be performed to modify them.
4.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Agent Personality</title>
        <p>We model agent personalities as a vector of binary personality dimensions. These
dimensions can be associated with certain modifications to an agent’s knowledge
framework, altering what information they may share in an inquiry or what actions they may
propose during deliberation. Thus, an agent’s personality is self-contained within the
agent’s knowledge framework, allowing the dialogue protocols to remain generic.</p>
        <p>Personality dimensions may also be used to alter the natural language templates
used for certain facts. This allows different personalities to be superimposed onto the
same sequence of moves via changes in natural language. An optional ‘intent’ with
an asserted fact or action argument, represents the intention of the agent behind the
assertion and indicate the template variant to be used by the natural language generator.
4.3</p>
      </sec>
      <sec id="sec-3-3">
        <title>Agent knowledge</title>
        <p>Agent Configuration. An agent configuration file allows an agent to store the
knowledge base in a concise data-interchange format, JSON. Configuration files make the
system accessible to less-technical users by providing a way to edit an agent’s
knowledge base to craft different dialogues without the need to write any code. The agent
configuration files include the required sections: facts, rules and AATS, below:
{ "facts": { "all": [...], "pa" : [...], "pb" : [...] },
"rules": { "all": [...], "!pa": [...] },
"AATS" : { "all": [...] }}</p>
        <p>Knowledge definitions within these sections can be optionally associated with
personality traits pi, as shown. These form a key-value pair, with the personality trait string
as the key and array of knowledge definitions as the value. A prefix ! specifies that
knowledge applies to all agents that do not display a particular personality trait.</p>
        <p>n !
Epistemic knowledge. The belief system represents an agent’s epistemic knowledge
and is formed by defeasible facts, literals denoted as , and defeasible rules 1 ^ ::: ^
0 where 1; :::; n are the premises and 0 is the conclusion.</p>
        <p>Facts. An agent maintains facts representing ground predicates listed in facts and
including any predicates instantiated by the network agent. A fact 1 has a structure
subject (X1 ; : : : ; Xn; Value; Intent ) where xi represents the agents which the fact
relates to. These identifiers are important in our domain to be used in the fact’s natural
language template to refer to agents by name. In the configuration file we represent these
facts as $X1 ... $Xn subject(Value)#Intent strings with a different
structure for ease of manipulation. The string $self represents the name of the agent the
knowledge belongs to. Neuron specific references can also be used in a neuron
configuration file, such as $otherNeuronInLayer and $nextLayerNeuron, which act
as wildcards that can apply to multiple other neurons. The following fields are optional:
Value specifies a numerical value for the fact and Intent associates an intention
with a fact. Intent has no meaning in the context of the logical system and is only
referred to during NLG to select the template used to render the fact in a sentence.</p>
        <p>Facts instantiated by the network agent have named values specific to neuron agents:
– X1 activation &amp; X1 bias: neuron X1’s last activation and bias values.
– X1 X2 weight: weight value of the link between neuron X1 and a neuron X2 in
the proceeding layer.
– X1 target: value of 0 or 1, representing output neuron X1’s target activation on
the last training sample.
– X1 tolerance: value in the range [0; 0:5) representing how close neuron X1’s
activation value must be to the target for it to be deemed on target.</p>
        <p>An example of fact is $self $ON1 weight indicating that the connection this weight
is associated with is between the neuron agent ($self) and output neuron 1 ($ON1).
Rules. Rules are represented as 1 ^ ::: ^ n ! 0. In addition, special rules act
as enablers for other rules, which is fundamental in generating a coherent dialogue.
We define specific derivation enabling rules of the form r1 : 1 ^ ::: ^ n ! such
that r2 : ^ 1 ^ ::: ^ n ! but for simplicity we represent this with rule names
1 ^ ::: ^ n ! r2. This facilitates more finely grained control over the order of rule
assertions in the inquiry dialogue. To prevent issues with non-terminating defeasible
derivations, the definition of a nested rule is constrained to ensure that no fact acting as
a rule’s premise can occur in its conclusion as part of another rule.</p>
        <p>In the configuration file, rules 1 ^ ::: ^ n ! 0 are represented as strings of the
form premises -&gt; conclusion. In premises &amp; and ! are used in place of ^
and :. A clause may consist of one or more numerical facts combined with Pythonic
mathematical notation to construct a boolean sub-expression. For example, consider a
rule string known to a neuron agent:</p>
        <p>$self_targetIs1 &amp; $self_activation &lt; 0.5 -&gt; $self_activationTooLow
This specifies that for the claim to be valid, the neuron agent’s target activation must be
1 ($self targetIs1) and its actual activation ($self activation) must be a
value less than 0.5. The claim is $self activationTooLow, which is true if the
neuron agent’s activation fell below its target.</p>
        <p>
          Normative knowledge. For deliberation dialogue, we need to bestow agents with
normative knowledge about the effects of actions. Following [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ], for an agent x an AATS
is composed by a set of finite states Qx, where q0x 2 Qx is the initial state and qtx 2 Qx
is the goal. Actions in the set Acx can be applied if their preconditions are satisfied
in a state qix. A state x(qi; ai) results by the performance of ai from state qi. We do
not consider values in this work. The initial state of an agent’s AATS can be derived
from the defeasible facts agreed upon by all agents, which are discovered during the
inquiry dialogue combining epistemic to practical reasoning. In our implementation of
AATS, each transition is represented with source and destination states, and the
action that links the two states. Actions are represented as strings, optionally
composed with a separating underscore. This underscore indicates a special case of a fact
modification action. The modification is represented by the substring preceding the first
underscore (for example, increase or decrease) and the numerical fact to which
the modification is applied is represented by the substring following the first underscore.
For example, the transition below states that if the agent’s activation is below target, the
agent can increase its bias so that the activation is no longer too low.
        </p>
        <p>{"source": ["$self_activationTooLow"],
"action": "increase_$self_bias",
"destination": ["!$self_activationTooLow"]}
4.4</p>
      </sec>
      <sec id="sec-3-4">
        <title>Dialogue</title>
        <p>
          In order for agents to participate in the dialogue, they must be able to construct
arguments on the basis of their beliefs and AATS. Following [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ], two types of arguments
are formed by an agent given the epistemic and normative knowledge.
A defeasible derivation of a belief from facts and rules is represented with b-arguments,
while an a-argument can be constructed when an agent wishes to argue for an action:
– A belief argument is denoted B = h ; i, where is a defeasible belief and is
a minimally consistent set of beliefs from which can be derived.
– An action argument constructed by an agent x from its AATS is a 4-tuple A =
hqx; a; qy; pi, where qx = q0x is the start state, a 2 Acx is the proposed action,
x(qx; a) = qy is the end state and p 2 qtx is the goal.
        </p>
        <p>Our dialogue is a combination of deliberation and inquiry. The deliberation protocol
begins with an inquiry sub-dialogue whose topic is the set of facts that make up the
deliberation goal. The aim of this inquiry is to collectively discover relevant information
to the goal. After this, the agents move to deliberation where the goal is a target state
for the physical system after the deliberated actions are performed.</p>
        <p>In a dialogue, an agent x can make the moves: open hx; open; dialogue( ; ; )i;
assert hx; assert; i; and close hx; close; dialogue( ; ; )i. The type of dialogue
protocol is described by dialogue( ; ; ): if = inquiry, is a set of propositions
whose truth values are to be found; if = deliberation, is a state representing the
goal. is the set of participants, is either a set of a-arguments or b-arguments
depending on which has not yet been asserted. A commitment store, CSx, stores an
agent x’s exchanged information. The global commitment store, CSg, is the union of
the commitment stores of all agents participating in the dialogue.</p>
        <p>In the inquiry each agent asserts all its relevant beliefs that are not already present
in CSg. Relevant means that either this is a fact, a premise of a rule in the global
commitment store, or a rule of which conclusion is a relevant defeasible fact. For the
remainder of the dialogue, each agent checks whether any of its asserted defeasible rule
are fully supported by the information in CSg. For a supported rule, an agent will assert
the rule conclusion as a b-argument if the conclusion is not already present in CSg. If
the agent cannot assert anything new then they will instead move to close the dialogue.</p>
        <p>In the deliberation dialogue, CSg is set to the sub-dialogue store after the inquiry is
complete. If it is discovered during the inquiry that all the goal propositions are satisfied,
then no action needs to be taken and the protocol can terminate early. Otherwise, the
protocol proceeds with each agent asserting relevant a-arguments formed from their
AATS. Each agent determines the start state q0x CSg using information in CSg, q0x
is the largest possible subset of CSg in Qx. If any action transitions exist in its AATS
from q0x to the end state, the goal, then the agent will assert an a-argument to propose
the action. Algorithms 1-2 demonstrate these protocols.</p>
        <p>In our implementation, CSg acts as a blackboard in the system, broadcasting agent
assertions. To determine the agent speaking order, we leverage a token-ring algorithm
in which a token is exchanged among the participants of the dialogue in some fixed
order, starting from the network agent NT. However, this choice has a cost in generating
natural language. For example, unlike direct messages, broadcast messages have no
specific recipient associated with them. Therefore, when generating natural language
from a broadcast message, we may have to infer who the intended recipient is using
information in the message if we wish to address a specific agent.
4.5</p>
      </sec>
      <sec id="sec-3-5">
        <title>Natural Language Generation</title>
        <p>
          We implement the rendering of dialogues into natural language using a template-based
NLG system [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ]. Templates, provided for each fact and action, are sentences with zero
        </p>
      </sec>
      <sec id="sec-3-6">
        <title>Algorithm 1: INQUIRY</title>
        <p>Input: A list = (x1; x2; :::; xn) of agents
An initiator xI 2
A list = ( 1; 2; :::; n) (the topic)</p>
        <p>A global commitment store CSg
Output: A list of moves
moves fhxI ; open; dialogue(inq; ; )ig
cnloospeasrtici0p,atnts0 j j
while closes &lt; no participants do
xi [t]</p>
        <p>RelevantBeliefs(xi; ; CSg) [
SupportedBArguments(xi; ; CSg)</p>
        <p>CSg
if j j &gt; 0 then
moves
CSg
closes
else closes closes + 1
t (t + 1) (mod no participants)
return moves</p>
        <p>moves [ fhxi; assert; ig
CSg [
0</p>
        <sec id="sec-3-6-1">
          <title>Algorithm 2: DELIBERATION</title>
          <p>Input: A list = (x1; x2; :::; xn) of agents</p>
          <p>An initiator xI 2</p>
          <p>A list = ( 1; 2; :::; n) (the topic)
Output: A list of moves
CmSovges ; fhxI ; open; dialogue(del; ; )ig
cnloospeasrtici0p,atnts0 j j
moves moves [ Inquiry( ; xI ; ; CSg)
while closes &lt; no participants do
xi [t]</p>
          <p>SupportedAArguments(xi; ; CSg)</p>
          <p>CSg
if j j &gt; 0 then
moves moves [ fhxi; assert; ig
CSg CSg [
closes 0
else closes closes + 1
t (t + 1) (mod no participants)
return moves
or more slots that can be replaced with interchangeable words or phrases to produce
varied output. Additionally, identifiers in these slots are replaced by specific values, such
as the numerical value of the associated fact or names from the agent list. Similar to the
agent configuration files, these template strings can be defined in a separate JSON file,
grouped via fact names. This file also includes the various strings that can be substituted
in the place of the template slots. These non-terminal nodes are synonyms or variations
of specific words that help producing a diverse, but equivalent, set of sentences.</p>
          <p>In the inquiry dialogue, we generate sentences for assertions of defeasible facts,
including those asserted as the claim of a b-argument, using templates for each fact. We
do not immediately generate sentences for the assertion of defeasible rules, including
those asserted as the support of a b-argument. If a rule is later used as a support, then
sentences will be generated for the premise assertions, so we can avoid first generating
a sentence for the rule to introduce these premises.</p>
          <p>In the deliberation dialogue, we generate sentences for asserted a-arguments using
templates for each action. Here, it is not necessary to generate sentences to describe
either the AATS start state, which is a combination of facts already asserted in the
dialogue, or the end state, which is the goal that was stated in the opening sentence.</p>
          <p>For example, the natural language template for the weight fact X1 X2 weight and
the action ‘increase’ are shown below. The fact includes substitutions for the names of
the neuron agents that share the weight and the value of the weight.</p>
          <p>weight: "the weight between X 1 and X 2 is VALUE"
increase: "I’ll increase FACT"
5</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>An example application</title>
      <p>In this section we present an application of our dialogue system. The deliberation goal
is for a specific output neuron agent to meet its activation target on a given training
sample. The neural network is trained on the Iris flower dataset from the UCI Machine
Learning Repository1 using four input features to identify three classes.
Epistemic knowledge. In the inquiry portion of the dialogue, agents will discover
whether the output neuron agent is on target before deliberating. This target, an
activation of either 0 or 1, will first be passed down the social hierarchy.</p>
      <sec id="sec-4-1">
        <title>Listing 1.1: Network agent belief base</title>
        <p>Listing 1.2: Layer agent belief base
1 ‘‘rules”: f
2 ‘‘all”: [‘‘targetClass1 −&gt; targetIsSetosa”,
3 ‘‘targetClass2 −&gt; targetClassVersicolor”,
4 ‘‘targetClass3 −&gt; targetClassVirginica”]
5 g
1 ‘‘rules”: f
2 ‘‘all”: [‘‘targetIsSetosa −&gt; ON1 targetIs1”,
3 ‘‘targetIsSetosa −&gt; ON2 targetIs0”,
4 ‘‘targetIsSetosa −&gt; ON3 targetIs0”,
5 ‘‘targetIsVersicolor −&gt; ON1 targetIs0”, ...]g</p>
        <p>At the highest level, the network agent is given knowledge of the class labels
(Listing 1.1). The layer agents are then given rules to translate the target class label into
target activations for individual output neuron agents (Listing 1.2).</p>
        <p>Listing 1.3 shows how the output neuron agent determines whether their activation
is on target, using the rules in lines 5-10.</p>
        <p>Listing 1.3: Output neuron agent belief base
1 ‘‘facts”: f
2 ‘‘!forgetful”: [‘‘$self tolerance(0.1)”],
3 ‘‘forgetful”: [‘‘$self isForgetful”, ‘‘$self tolerance(0.4)”]g,
4 ‘‘rules”: f
5 ‘‘all”: [‘‘$self targetIs1 &amp; $self act &gt; (1 − $self tolerance) −&gt; $self onTarget”,
6 ‘‘$self targetIs0 &amp; $self act &lt; $self tolerance −&gt; $self onTarget”,
7 ‘‘$self targetIs1 &amp; $self act &lt; (1 − $self tolerance) −&gt; $self actTooLow”,
8 ‘‘$self targetIs0 &amp; $self act &gt; $self tolerance −&gt; $self actTooHigh”,
9 ‘‘$self actTooHigh −&gt; !$self onTarget”,
10 ‘‘$self actTooLow −&gt; !$self onTarget”],
11 ‘‘!forgetful”: [‘‘$other isForgetful −&gt;
12 $other targetIs1 &amp; $other act &lt; (1 − $self tolerance#correction) −&gt; $other actTooLow#correction”,
13 ‘‘$other isForgetful −&gt;
14 $other targetIs1 &amp; $other act &gt; $self tolerance#correction −&gt; $other actTooLow#correction”]g
Forgetfulness demonstrates an example of personality dimension. Observe that the true
value of the tolerance is known to all non-forgetful output neuron agents (line 2),
whereas a forgetful agent will ‘misremember’ a more lenient version (line 3). In lines
11-14 we introduce the rules for non-forgetful agents which allow them to correct others
that may have incorrectly determined themselves to be on target. Note that these rules
are nested; the outer premise prevents an agent from asserting their belief of the
tolerance unless another agent is forgetful. The correction intent is attached to the true value
of the tolerance, which is later used to formulate the natural language as a correction.
Normative Knowledge. In the deliberation portion of the dialogue, agents suggest
actions to help the output neuron agent meet its target. We let hidden neuron agents
propose weight changes for their connections to help a neuron agent in the next layer meet
their target. As an example, the increase weight action is shown in Listing 1.4. The
source state for this transition is the next neuron’s activation being too low.</p>
      </sec>
      <sec id="sec-4-2">
        <title>1 https://archive.ics.uci.edu/ml/datasets/iris</title>
        <p>Dialogue. We illustrate here two different dialogues that may be generated from the
example application (see Table 1). In Dialogue A, ON1 has a stubborn personality.
When it is discovered that they are not on target, a hidden neuron in the preceding layer
suggests an action. ON1 refuses, insisting on its own course of action. In Dialogue B,
ON1 has a forgetful personality. When they incorrectly find themselves to be on target,
another ON corrects them. During deliberation, a hidden neuron then suggests an action.
6</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Conclusions</title>
      <p>A multi-agent dialogue system was demonstrated as a means of enriching
backpropagation with dialogue. The generic dialogue framework ensures the ease of extending the
system to support further examples. Our flexible system can produce entertaining and
informative dialogue to help explain the mechanics of backpropagation.</p>
      <p>
        Possible future work includes extending the dialogue topics to provide more variety
in the system’s output and improve explainability of related aspects of backpropagation,
such as error propagation or overfitting. Extended topics could focus on using
information aggregated over the course of many training iterations, preventing dialogue from
becoming repetitive over the course of many epochs. Evaluation with users would help
establish the advantages that this approach provides in understanding backpropagation
and assess the usefulness of specific explanations as perceived by users. Depending on
the familiarity of these users with ML concepts, such as neural networks, these studies
could also help identify where dialogues may require additional preamble to explain
the technical concepts discussed by agents. Currently, the model of personality is
limited; no partial dimensions or model of emotional state was implemented. The model of
agent personality could be adapted to adhere to a more flexible model, such as the PEN
[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] model, and used to extend the model of dialogue to support moral argumentation for
agents to support their normative reasoning. Finally, the current dialogue system is not
able to influence the training of the neural network. Actions proposed in deliberation
could be used to dynamically modify the training to better explain the consequences of
various modifications on performance.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Biran</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cotton</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Explanation and justification in machine learning: A survey</article-title>
          .
          <source>In: Proceedings of the IJCAI-17 Workshop on Explainable AI (XAI)</source>
          .
          <source>vol. 8</source>
          , pp.
          <fpage>8</fpage>
          -
          <lpage>13</lpage>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Blair</surname>
            ,
            <given-names>J.A.</given-names>
          </string-name>
          :
          <article-title>Rhetoric, dialectic, and logic as related to argument</article-title>
          .
          <source>Philosophy &amp; Rhetoric</source>
          <volume>45</volume>
          (
          <issue>2</issue>
          ),
          <fpage>148</fpage>
          -
          <lpage>164</lpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Castelfranchi</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosis</surname>
            ,
            <given-names>F.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Falcone</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pizzutilo</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Personality traits and social attitudes in multiagent cooperation</article-title>
          .
          <source>Applied Artificial Intelligence</source>
          <volume>12</volume>
          (
          <issue>7-8</issue>
          ),
          <fpage>649</fpage>
          -
          <lpage>675</lpage>
          (
          <year>1998</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Cˇyras</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rago</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Albini</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Baroni</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Toni</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <string-name>
            <surname>Argumentative</surname>
            <given-names>XAI</given-names>
          </string-name>
          :
          <article-title>A survey</article-title>
          .
          <source>In: Proceedings of the 30th International Joint Conference on Artificial Intelligence</source>
          (
          <year>2021</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Di</given-names>
            <surname>Nunzio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.M.</given-names>
            ,
            <surname>Maistro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Zilio</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.</surname>
          </string-name>
          :
          <article-title>Gamification for machine learning: The classification game</article-title>
          .
          <source>In: Proceedings of the 3rd GamifIR'16 Workshop</source>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Egges</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kshirsagar</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Magnenat-Thalmann</surname>
          </string-name>
          , N.:
          <article-title>A model for personality and emotion simulation</article-title>
          . In: Palade,
          <string-name>
            <given-names>V.</given-names>
            ,
            <surname>Howlett</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.J.</given-names>
            ,
            <surname>Jain</surname>
          </string-name>
          ,
          <string-name>
            <surname>L</surname>
          </string-name>
          . (eds.)
          <source>Knowledge-Based Intelligent Information and Engineering Systems</source>
          . pp.
          <fpage>453</fpage>
          -
          <lpage>461</lpage>
          . Springer Berlin Heidelberg (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Eysenck</surname>
            ,
            <given-names>H.J.:</given-names>
          </string-name>
          <article-title>Biological dimensions of personality</article-title>
          . (
          <year>1990</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Faiella</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ricciardi</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Gamification and learning: a review of issues and research</article-title>
          .
          <source>Journal of e-Learning and Knowledge Society</source>
          <volume>11</volume>
          (
          <issue>3</issue>
          ) (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Gatt</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Krahmer</surname>
          </string-name>
          , E.:
          <article-title>Survey of the state of the art in natural language generation: Core tasks, applications and evaluation</article-title>
          .
          <source>J. of Artificial Intelligence Research</source>
          <volume>61</volume>
          ,
          <fpage>65</fpage>
          -
          <lpage>170</lpage>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Gunning</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Aha</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>DARPA's explainable artificial intelligence (XAI) program</article-title>
          .
          <source>AI</source>
          Magazine
          <volume>40</volume>
          (
          <issue>2</issue>
          ),
          <fpage>44</fpage>
          -
          <lpage>58</lpage>
          (
          <year>Jun 2019</year>
          ). https://doi.org/10.1609/aimag.v40i2.
          <fpage>2850</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Mykowiecka</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Natural-language generation-an overview</article-title>
          .
          <source>International Journal of ManMachine Studies</source>
          <volume>34</volume>
          (
          <issue>4</issue>
          ),
          <fpage>497</fpage>
          -
          <lpage>511</lpage>
          (
          <year>1991</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Nielsen</surname>
            ,
            <given-names>M.A.</given-names>
          </string-name>
          :
          <article-title>Neural Networks and Deep Learning</article-title>
          . Determination Press (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Oren</surname>
          </string-name>
          , N.,
          <string-name>
            <surname>van Deemter</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vasconcelos</surname>
          </string-name>
          , W.W.:
          <source>Argument-Based Plan Explanation</source>
          , pp.
          <fpage>173</fpage>
          -
          <lpage>188</lpage>
          . Springer International Publishing (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Riley</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Atkinson</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Payne</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Black</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          :
          <article-title>An implemented dialogue system for inquiry and persuasion</article-title>
          . In: Modgil,
          <string-name>
            <given-names>S.</given-names>
            ,
            <surname>Oren</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            ,
            <surname>Toni</surname>
          </string-name>
          ,
          <string-name>
            <surname>F</surname>
          </string-name>
          . (eds.)
          <article-title>Theorie and Applications of Formal Argumentation</article-title>
          . pp.
          <fpage>67</fpage>
          -
          <lpage>84</lpage>
          . Springer Berlin Heidelberg (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Roscher</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bohn</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Duarte</surname>
            ,
            <given-names>M.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Garcke</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>Explainable machine learning for scientific insights and discoveries</article-title>
          .
          <source>IEEE Access 8</source>
          ,
          <fpage>42200</fpage>
          -
          <lpage>42216</lpage>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Russell</surname>
            ,
            <given-names>S.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Norvig</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <source>Artificial Intelligence: A Modern Approach</source>
          .
          <volume>3</volume>
          <fpage>edn</fpage>
          . (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Sklar</surname>
            ,
            <given-names>E.I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Azhar</surname>
            ,
            <given-names>M.Q.</given-names>
          </string-name>
          :
          <article-title>Explanation through argumentation</article-title>
          .
          <source>In: Proceedings of the 6th International Conference on Human-Agent Interaction</source>
          . p.
          <fpage>277</fpage>
          -
          <lpage>285</lpage>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18. van Deemter,
          <string-name>
            <given-names>K.</given-names>
            ,
            <surname>Theune</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Krahmer</surname>
          </string-name>
          , E.:
          <article-title>Real versus template-based natural language generation: A false opposition? Computational linguistics 31(1</article-title>
          ),
          <fpage>15</fpage>
          -
          <lpage>24</lpage>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Walton</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Krabbe</surname>
            ,
            <given-names>E.C.W.:</given-names>
          </string-name>
          <article-title>Commitment in Dialogue: Basic Concepts of Interpersonal Reasoning</article-title>
          . State University of New York Press (
          <year>1995</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>