# A Unifying Framework for Learning Argumentation Semantics

Zlatina Mileva1, Antonis Bikakis2, Fabio Aurelio D’Asaro3, Mark Law1,
Alessandra Russo1

###### Abstract

Argumentation is a very active research field of Artificial Intelligence
concerned with the representation and evaluation of arguments used in
dialogues between humans and/or artificial agents. Acceptability semantics of
formal argumentation systems define the criteria for the acceptance or
rejection of arguments. Several software systems, known as argumentation
solvers, have been developed to compute the accepted/rejected arguments using
such criteria. These include systems that learn to identify the accepted
arguments using non-interpretable methods. In this paper we present a novel
framework, which uses an Inductive Logic Programming approach to learn the
acceptability semantics for several abstract and structured argumentation
frameworks in an interpretable way. Through an empirical evaluation we show
that our framework outperforms existing argumentation solvers, thus opening up
new future research directions in the area of formal argumentation and human-
machine dialogues.

## Introduction

Argumentation is a typical human activity, which involves the use of arguments
for resolving a conflict of opinion or for drawing conclusions based on
evidence, which may be incomplete or contradictory. Understanding how humans
reason with arguments has many real-world applications (e.g., in Artificial
Intelligence (Atkinson et al. 2017)). This is why argumentation has become a
well-established area within the field of knowledge representation and
reasoning. The study of argumentation in AI has mainly focused on developing
formal models of argumentation and methods for supporting argumentative tasks
such as identifying arguments, evaluating arguments and drawing conclusions
from them. Formal argumentation models fall within two general categories:
abstract models, which treat arguments as atomic entities without an internal
structure, with the Abstract Argumentation Framework (AAF; Dung 1995) being
the most prominent example; and structured models, which make explicit the
premises and the claims of arguments as well as the relationship between them,
with the Assumption-Based Argumentation Framework (ABA; Toni 2014) being a
characteristic example. The acceptability semantics of each such model is a
formal specification of the criteria for accepting or rejecting an argument in
a given framework.

Argumentation solvers compute acceptable arguments in a given framework. These
can be of two types. The first type are solvers that are based on manually
designed algorithms that implement the acceptability semantics, e.g., by
reducing the problem of computing acceptable arguments into another formalism.
Two such solvers are ASPARTIX (Egly, Gaggl, and Woltran 2010), based on Answer
Set Programming (ASP; Lifschitz 2019), and $\mu$-toksia (Niskanen and
Järvisalo 2020), which is SAT-based. The second type includes approximate
solvers, which typically use Machine Learning or Deep Learning techniques to
learn the argumentation semantics from data. One such example is the solver
described in (Craandijk and Bex 2020), which uses Deep Learning to learn the
argumentation semantics for AAF. Deep Learning techniques have proved to be
very effective, but lack transparency, thus leaving the tasks of learning
argumentation semantics in an interpretable way an open research problem.

This paper aims to address this problem by proposing a framework for learning
the argumentation semantics for a variety of argumentation frameworks in an
efficient and interpretable way. The proposed framework uses an Inductive
Logic Programming approach, called Learning from Answer Sets (LAS; Law, Russo,
and Broda 2019), to learn answer set programs that capture the acceptability
semantics of several argumentation frameworks from a small set of examples. We
prove that the learned answer set programs are equivalent to the manually
engineered ASP encodings of acceptability semantics used in ASPARTIX. We also
show that they exhibit better performance with respect to computation time
compared to ASPARIX and $\mu$-toksia, and better accuracy and efficieny with
respect to the size of the learning dataset, compared to a state-of-the-art
approximate solver.

The paper is organized as follows. In the next section, we provide the
necessary background information on Argumentation and Learning Answer Set
Programs. We then present our framework and show how it can be used to learn
ASP encodings for admissible, complete, grounded, preferred and stable
semantics of four argumentation frameworks: AAF, Bipolar Argumentation
Frameworks, Value-based Argumentation Frameworks and ABA. In the Evaluation
section, we present the results of the empirical evaluation that compares our
frameowork with state-of-the-art argumentation solvers. Specifically, our
framework learns argumentation semantics, which, at the time of inference, are
much faster than the manually engineered ASPARTIX ASP encodings. Moreover,
this is achieved in a more data-efficient manner compared to the large
datasets required by approximate Deep Learning methods. Consequently, our
framework provides the best of both worlds for the considered cases. The paper
concludes by discussing possible future directions for this research.

## Background

### Argumentation

The study of argumentation in AI has mostly focused on formal models of
argumentation and computational methods for supporting argumentative tasks,
such as identifying arguments, evaluating arguments, etc. One of the most
influential models of argumentation is _Abstract Argumentation Frameworks_
(AAF; Dung 1995). Its main characteristic is that it models arguments as
atomic entities (without an internal structure), and the acceptability of an
argument depends only on the attacks it receives from other arguments. An AAF
is defined as a pair $\langle Arg,att\rangle$ consisting of a set of arguments
$Arg$ and a binary attack relation $att$ on this set; for any two arguments
$a,b\in Arg$, we say that $a$ attacks $b$ when $(a,b)\in att$. Acceptability
semantics for AAFs are defined in terms of extensions, i.e., sets of arguments
that we can reasonably accept. An extension of an AAF, $S\subseteq Arg$ is
called: _conflict-free_ iff it contains no arguments attacking each other;
_admissible_ iff it is conflict-free and defends all its elements, i.e., for
each argument $b\in Arg$ attacking an argument $a\in S$ there is an argument
$c\in S$ attacking $b$; _complete_ iff it is admissible and contains all the
arguments it defends; _grounded_ iff it is minimal (w.r.t. set inclusion)
among the complete extensions; _preferred_ iff it is maximal among the
admissible extensions; _stable_ iff it is conflict-free and attacks all the
arguments it does not contain.

_Bipolar Argumentation Frameworks_ (BAF; Cayrol and Lagasquie-Schiex 2009)
extend AAFs with the notion of support between arguments. This is modelled as
an additional binary relation on $Arg$, $sup$, which is disjoint from $att$.
For two arguments $a_{1},a_{n}\in Arg$, $a$ is a _supported defeat_ for $b$
iff there is a sequence of arguments $a_{1},\dots,a_{n}\in Arg$ ($n\geq 1$)
such that $(a_{i},a_{i+1})\in sup$ for $i\leq n-2$ and $(a_{n-1},a_{n})\in
att$; $a$ is a _secondary defeat_ for $b$ iff there is a sequence of arguments
$a_{1},\dots,a_{n}\in Arg$ ($n\geq 2$), such that $(a_{1},a_{2})\in att$ and
$(a_{i},a_{i+1})\in sup$ for $i\geq 2$. An argument $a\in Arg$ is _defended_
by $S\subseteq Arg$ iff for each argument $b\in Arg$ that is a supported or
secondary defeat for $a$, there exists $c\in S$ that is a supported or
secondary defeat for $b$. The acceptability semantics of BAF are the same with
AAF, but using the revised notions of defeat and defense.

_Value-based Argumentation Frameworks_ (VAF; Bench-Capon 2003) is another
extension of AAFs that assigns (social, ethichal, etc.) values to arguments
and uses preferences on values to resolve conflicts among arguments. Formally,
a VAF (additionally to $Arg$ and $att$) includes a non-empty set of values,
$V$, a function $val:Arg\mapsto V$ and a preference relation $valpref\subseteq
V\times V$, which is transitive, irreflexive and assymetric. A preference
relation on $Arg$, $pref$, is induced from $valpref$: for any two arguments
$a,b\in Arg$, where $val(a)=u$ and $val(b)=v$, $(a,b)\in pref$ when $(v,u)\in
valpref^{+}$ (the transitive closure of $valpref$). VAF uses the same
acceptability semantics with AAF and BAF, but based on a different notion of
defeat and defense: an argument $a$ is a _defeat_ for argument $b$ iff $a$
attacks $b$ and $(b,a)\notin pref$. An argument $a\in Arg$ is _defended_ by
$S\subseteq Arg$ iff for each argument $b\in Arg$ that defeats $a$, there
exists $c\in S$ that defeats $b$.

_Assumption-based Argumentation Frameworks_ (ABA; Toni 2014) belong to a
different family of argumentation frameworks where arguments are not treated
as abstract entities. Instead, arguments are constructed from available
knowledge, and attacks among arguments are derived from their internal
structure. An ABA framework is a tuple
$\langle\mathcal{L},\mathcal{R},\mathcal{A},\overline{\phantom{a}}\rangle$,
where $\mathcal{L}$ is a logical language, $\mathcal{R}$ a set of rules
$\phi_{1},\dots,\phi_{n}\rightarrow\phi$ over $\mathcal{L}$,
$\mathcal{A}\subseteq\mathcal{L}$ a non-empty set of assumptions, and
$\overline{\phantom{b}}$ a total mapping from $\mathcal{A}$ to $\mathcal{L}$,
denoting e.g., that $\overline{a}$ is the contrary of $a$. We restrict our
focus to flat ABA frameworks, where no rule has an assumption in its head. An
argument $A\vdash\psi$ is a deduction of $\psi\in\mathcal{L}$ from a set of
assumptions $A\subseteq\mathcal{A}$ using a set of rules $R\in\mathcal{R}$. An
argument $A\vdash\psi$ attacks another argument
$A^{\prime}\vdash\psi^{\prime}$ iff $\psi=\overline{q}$ for some $q\in
A^{\prime}$. For the computation of acceptable arguments in a flat ABA
framework we use the acceptability semantics of AAFs.

### Learning Answer Set Programs

Learning from Answer Sets (LAS; Law, Russo, and Broda 2019) is a logic-based
machine learning approach that extends the field of Inductive Logic
Programming (Muggleton 1991) with systems (Law, Russo, and Broda 2018; Law et
al. 2020) capable of learning from examples interpretable knowledge
represented as answer set programs. Typically, an answer set program includes
four types of rules: normal rules, choice rules, hard and weak constraints
(Gelfond and Kahl 2014). In this paper we consider answer set programs
composed of normal rules and hard constraints. Given any (first-order logic)
atoms
$\mbox{$\mathtt{h}$},\mbox{$\mathtt{b_{1}}$},\ldots,\mbox{$\mathtt{b_{n}}$},\mbox{$\mathtt{c_{1}}$},\ldots,\mbox{$\mathtt{c_{m}}$}$,
a _normal rule_ is of the form
$\mathtt{h\operatorname{\mathtt{:-}}b_{1},\ldots,b_{n},\operatorname{\;\mathtt{not}\;}c_{1},\ldots,\operatorname{\;\mathtt{not}\;}c_{m}}$,
where $\mathtt{h}$ is the _head_ ,
$\mbox{$\mathtt{b_{1}}$},\ldots,\mbox{$\mathtt{b_{n}}$},\mbox{$\mathtt{c_{1}}$},\ldots,\mbox{$\mathtt{c_{m}}$}$
(collectively) is the _body_ of the rule and
“$\operatorname{\;\mathtt{not}\;}$” represents negation as failure. Rules of
the form
$\mathtt{\operatorname{\mathtt{:-}}b_{1},\ldots,b_{n},\operatorname{\;\mathtt{not}\;}c_{1},\ldots,\operatorname{\;\mathtt{not}\;}c_{m}}$
are called _constraints_. The Herbrand Base of an answer set program $P$,
denoted $HB_{P}$, is the set of ground (variable free) atoms that can be
formed from predicates and constants in $P$. The subsets of $HB_{P}$ are
called the (Herbrand) _interpretations_ of $P$. Given a program $P$ and an
interpretation $I$, the _reduct_ of $P$, denoted $P^{I}$, is constructed from
the grounding of $P$ in three steps: firstly, remove rules whose bodies
contain the negation of an atom in I; secondly, remove all negative literals
from the remaining rules; and finally, replace the head of any constraint with
$\bot$ (where $\bot\not\in HB_{P}$). Any $I\subseteq HB_{P}$ is an _answer
set_ of $P$ iff it is the minimal model of $P^{I}$. We denote with $AS(P)$ the
set of answer sets of a program $P$.

In addition to the above rules, the answer set solver _clingo_ (Gebser and et
al. 2019) also supports _heuristic statements_. In this paper, we consider
heuristic statements of the form
$\mathtt{\operatorname{\mathtt{\\#}}heuristic\ a.\ [1@1,false]}$, where
$\mathtt{a}$ is an atom. When combined with suitable flags in clingo, rather
than computing the full set of answer sets, clingo will return the set of
answer sets which, when projected over the ground instances of the atoms in
the heuristic statements, are subset-minimal. Given any program $P$ containing
heuristic statements, we write $AS^{*}(P)$ to refer to these subset-minimal
answer sets.

The ILASP system (Law 2018) for solving LAS tasks has recently been updated
with support for learning heuristic statements (using the \--learn-heuristics
flag). We now present a modified version of the notion of a _context-dependent
learning from answer sets_ (Law, Russo, and Broda 2016) task, formalising the
heuristic learning task. A partial interpretation, $e_{pi}$, is a pair of sets
of ground atoms $\left\langle e^{inc}_{pi},e^{exc}_{pi}\right\rangle$, called
inclusions and exclusions, respectively. An interpretation $I$ _extends_
$e_{pi}$ iff $e_{pi}^{inc}\subseteq I$ and $e_{pi}^{exc}\cap I=\emptyset$.
Examples come in the form of _context dependent partial interpretations_
(CDPI). A CDPI example $e$ is a pair $\langle e_{pi},e_{ctx}\rangle$, where
$e_{pi}$ is a partial interpretation and $e_{ctx}$ is an answer set program
called the context of $e$. An answer set program $P$ is said to _accept_ $e$
if there is at least one answer set $A$ in $AS^{*}(P\cup e_{ctx})$ that
extends $e_{pi}$. A LAS framework uses _mode declarations_ as a form of
language bias to specify the space of possible answer set programs that can be
learned, referred to as _hypothesis space_. Informally, a _mode bias_ is a
pair of sets of mode declarations $\langle M_{h},M_{b}\rangle$, where $M_{h}$
(resp. $M_{b}$) are called the head (resp. body) mode declarations. Together
they characterise the predicates and type of arguments that could appear as
head and body conditions of the rules to learn. For a full definition of mode
bias, the reader is referred to (Law 2018).

######  Definition 1.

A _context-dependent learning from answer sets_ ($ILP^{context}_{LAS}$) task
is a tuple $T=\langle B,S_{M},\langle E^{+},E^{-}\rangle\rangle$, where $B$ is
an answer set program, $S_{M}$ is a hypothesis space, $E^{+}$ and $E^{-}$ are
finite sets of CDPIs called, respectively, positive and negative examples. A
hypothesis $H\subseteq S_{M}$ is a solution of $T$ (written $H\in
ILP^{context}_{LAS}(T)$) if and only if: (i) ${H\subseteq S_{M}}$; (ii)
${\forall e^{+}\in E^{+}}$, $B\cup H$ accepts $e^{+}$; and (iii) ${\forall
e^{-}\in E^{-}}$, $B\cup H$ does not accept $e^{-}$. Such a solution is called
_optimal_ if no smaller solution exists.

## Unifying Framework For Learning Argumentation Semantics

Our focus is on developing a unifying approach for learning definitions of
semantics of argumentation frameworks from examples of arguments that are in
or out of the extensions of given frameworks. We focus on the stable,
complete, admissible grounded and preferred semantics of AAFs, BAFs and VAFs
defined in the previous section. For this, our unifying framework uses the
following predicates: $\mathtt{arg}$, $\mathtt{att}$, $\mathtt{support}$,
$\mathtt{val}$, $\mathtt{valpref}$, $\mathtt{in}$, $\mathtt{out}$,
$\mathtt{pref}$, $\mathtt{defeated}$, $\mathtt{not\\_defended}$ and
$\mathtt{supported}$, where atom $\mathtt{arg(X)}$ denotes that $\mathtt{X}$
is an argument; $\mathtt{att(X,Y)}$ denotes an attack from $\mathtt{X}$ to
$\mathtt{Y}$; $\mathtt{support(X,Y)}$ denotes that $\mathtt{X}$ supports
$\mathtt{Y}$; $\mathtt{val(X,V)}$ denotes that the value $\mathtt{V}$ is
assigned to argument $\mathtt{X}$; $\mathtt{valpref(U,V)}$ denotes a
preference of value $\mathtt{U}$ over value value $\mathtt{V}$;
$\mathtt{in(X)}$ denotes that that argument $\mathtt{X}$ is in an extension,
while $\mathtt{out(X)}$ denotes that $\mathtt{X}$ is out of an extension for
the semantics to be learned; $\mathtt{pref(X,Y)}$ denotes that argument
$\mathtt{X}$ is preferred over argument $\mathtt{Y}$; $\mathtt{defeated(X)}$,
$\mathtt{not\\_defended(X)}$ and $\mathtt{supported(X)}$ denote defeated,
undefended and supported arguments, respectively.

Recall from Definition 1 that in our setting a learning task is a tuple
$\langle B,S_{M},\langle E^{+},E^{-}\rangle\rangle$. We now define these
components in the context of our unifying framework for learning argumentation
semantics. We refer to this unifying framework as $LAS_{arg}$.

The set of positive and negative context-dependent examples, $E^{+}$ and
$E^{-}$, of $LAS_{arg}$ include examples that have as inclusion and exclusion
sets, in and out facts; and as context, properties about the arguments that
vary according to the argumentation framework under consideration. Consider,
for example, the case of an AAF argumentation framework. A positive and a
negative context-dependent example are, for instance, of the form
$e^{+}=\\#pos(\\{out(a),$ $out(b)\\},$ $\\{in(a),$ $in(b)\\}$, $\\{arg(a).$
$arg(b).$ $att(a,b).$ $att(b,a).\\})$, and $e^{-}=\\#neg(\\{in(a),$
$in(b)\\},$ $\\{\\},$ $\\{arg(a).$ $arg(b).$ $att(a,b).$ $att(b,a).\\})$. In
these $\\#pos$ and $\\#neg$ statements, the first pair of curly braces
specifies the set of inclusions, the second pair specifies the set of
exclusions, and the third pair defines the context. In both examples, the
context contains two arguments, $a$ and $b$, that attack each other. In the
positive example $e^{+}$, both arguments are labelled as being $\mathtt{out}$,
but not $\mathtt{in}$. In the negative example $e^{-}$, $a$ and $b$ are
labelled as $\mathtt{in}$ in the inclusion set, indicating that there should
be no extension of the argumentation framework that accepts both of them as in
arguments. In the case of BAF and VAF argumentation frameworks, examples may
also contain $\mathtt{support}$, $\mathtt{val}$ or $\mathtt{valpref}$ facts in
the context.

The background knowledge $B$ of $LAS_{arg}$ includes additional definitions
for special constructs of the argumentation frameworks under consideration.
Specifically, it contains definitions for $\mathtt{defeated}$,
$\mathtt{not\\_defended}$ and $\mathtt{supported}$ arguments, and a
$\mathtt{pref}$ relation over arguments. The most general form of background
knowledge is shown in Listing Unifying Framework For Learning Argumentation
Semantics.

Listing 1: Background knowledge $B$
---
1 | $\mathtt{support(X,Z)\operatorname{\mathtt{:-}}support(X,Y),support(Y,Z).}$
2 | $\mathtt{supported(X)\operatorname{\mathtt{:-}}support(Y,X),in(Y).}$
3 | $\mathtt{valpref(X,Y)\operatorname{\mathtt{:-}}valpref(X,Z),valpref(Z,Y).}$
4 | $\mathtt{pref(X,Y)\operatorname{\mathtt{:-}}valpref(U,V),val(X,U),val(Y,V).}$
5 | $\mathtt{pref(X,Y)\operatorname{\mathtt{:-}}pref(X,Z),pref(Z,Y).}$
6 | $\mathtt{defeat(X,Y)\operatorname{\mathtt{:-}}att(Z,Y),support(X,Z).}$
7 | $\mathtt{defeat(X,Y)\operatorname{\mathtt{:-}}att(X,Z),support(Z,Y).}$
8 | $\mathtt{defeat(X,Y)\operatorname{\mathtt{:-}}att(X,Y),not\;pref(Y,X).}$
9 | $\mathtt{defeated(X)\operatorname{\mathtt{:-}}in(Y),defeat(Y,X).}$
10 | $\mathtt{not\\_defended(X)\operatorname{\mathtt{:-}}defeat(Y,X),not\;defeated(Y).}$

The hypothesis space $S_{M}$ of $LAS_{arg}$ has to be defined so as to capture
the search space of the rules that might encode possible argumentation
semantics. We define the hypothesis space $S_{M}$ through mode declarations,
as shown in Listing Unifying Framework For Learning Argumentation Semantics.

Listing 2: Hypothesis space $S_{M}$
---
1 | $\mathtt{\operatorname{\mathtt{\\#}}modeh(in(var(arg))).}$
2 | $\mathtt{\operatorname{\mathtt{\\#}}modeh(out(var(arg))).}$
3 | $\mathtt{\operatorname{\mathtt{\\#}}modeb(in(var(arg))).}$
4 | $\mathtt{\operatorname{\mathtt{\\#}}modeb(out(var(arg))).}$
5 | $\mathtt{\operatorname{\mathtt{\\#}}modeb(arg(var(arg)),(positive)).}$
6 | $\mathtt{\operatorname{\mathtt{\\#}}modeb(att(var(arg),var(arg))).}$
7 | $\mathtt{\operatorname{\mathtt{\\#}}modeb(defeated(var(arg))).}$
8 | $\mathtt{\operatorname{\mathtt{\\#}}modeb(not\\_defended(var(arg))).}$
9 | $\mathtt{\operatorname{\mathtt{\\#}}modeb(supported(var(arg)).}$

Since we look for definitions for the predicates $\mathtt{in}$ and
$\mathtt{out}$, these predicates appear as arguments of a mode head
declaration (Lines 1–2 in Listing Unifying Framework For Learning
Argumentation Semantics). All the predicates of our unifying framework can
appear in the body of the learned rules, and are therefore included as
arguments of mode body declarations (Lines 3–8 in Listing Unifying Framework
For Learning Argumentation Semantics).

Given a $LAS_{arg}$ task $T$, a learned argumentation semantics is an optimal
solution of $T$ according to Definition 1. Such solution is computed by
running the ILASP system111We run ILASP with the command ILASP --version=4
--learn-heuristics semantics.las..

### Learning the Semantics of AAF

In this section, we illustrate in detail the case of learning the semantics of
AAF. Positive and negative examples have inclusion sets that contain _in_ and
_out_ labelings of the arguments, specified in the context, which are
consistent with the particular AAF semantics.

The background knowledge of the unified LAS task encoding can be simplified
for AAF. These simplifications make it possible to obtain more compact
encodings, thus improving their overall performance in both learning and
inference. Consider the background knowledge $B$ given in Listing Unifying
Framework For Learning Argumentation Semantics. Since AAFs do not use the
predicates $\mathtt{valpref}$, $\mathtt{val}$ and $\mathtt{support}$, examples
of learning AAFs semantics will not include any fact for these predicates.
Rules in lines 1–5 do not produce any instances of the predicates
$\mathtt{supported}$ and $\mathtt{pref}$. Similarly, rules in lines 6 and 7 do
not produce any instances of the predicate $\mathtt{defeat}$. Only the rule in
line 8 may produce instances of $\mathtt{defeat}$. As there are no instances
of the predicate $\mathtt{pref}$, the rule in line 8 is equivalent to
$\mathtt{defeat(Y,X)\operatorname{\mathtt{:-}}att(Y,X)}$. From this simplified
rule, if we have $\mathtt{att(Y,X)}$, then we also have
$\mathtt{defeat(Y,X)}$, and this is the only definition of the predicate
$\mathtt{defeat}$ that can produce it. This means that we can rewrite the rule
in line 9 as $\mathtt{defeated(X)\operatorname{\mathtt{:-}}in(Y),att(Y,X)}$
and the rule in line 10 as
$\mathtt{not\\_defended(X)\operatorname{\mathtt{:-}}att(Y,X),not\;defeated(Y)}$.
The definition of $\mathtt{defeat}$ (rule in line 8) can be dropped since this
predicate does not occur in the body of any rule. Thus, in the case of AAFs,
the simplified background knowledge will include only two rules, instead of
the $10$ rules included in Listing Unifying Framework For Learning
Argumentation Semantics. We refer to the simplified background knowledge for
AAFs as $B_{AAF}$, and show it in Listing Learning the Semantics of AAF.

Listing 3: Simplified background knowledge $B_{AAF}$
---
1 | $\mathtt{defeated(X)\operatorname{\mathtt{:-}}in(Y),att(Y,X).}$
2 | $\mathtt{not\\_defended(X)\operatorname{\mathtt{:-}}att(Y,X),not\;defeated(Y).}$

From sets of positive and negative examples that are consistent with AAFs
semantics and using the simplified background knowledge $B_{AAF}$, our
$LAS_{arg}$ task accepts as optimal solutions the answer set programs given in
listings Learning the Semantics of AAF–Learning the Semantics of AAF for the
stable, the complete, the admissible, the grounded and the preferred
semantics, respectively. These learned programs, together with the simplified
background knowledge $B_{AAF}$, provide the full learned AAF semantics. Note
that the same optimal hypotheses would be learned if the initial full
background knowledge $B$ was used instead.

Listing 4: Stable semantics
---
1 | $\mathtt{out(X)\operatorname{\mathtt{:-}}defeated(X).}$
2 | $\mathtt{in(X)\operatorname{\mathtt{:-}}arg(X),not\;out(X).}$
Listing 5: Complete semantics
---
1 | $\mathtt{out(X)\operatorname{\mathtt{:-}}not\\_defended(X).}$
2 | $\mathtt{in(X)\operatorname{\mathtt{:-}}arg(X),not\;out(X),not\;defeated(X).}$
Listing 6: Admissible semantics
---
1 | $\mathtt{out(X)\operatorname{\mathtt{:-}}defeated(X).}$
2 | $\mathtt{out(X)\operatorname{\mathtt{:-}}arg(X),not\;in(X).}$
3 | $\mathtt{in(X)\operatorname{\mathtt{:-}}arg(X),not\;out(X),not\;not\\_defended(X).}$
Listing 7: Grounded semantics
---
1 | $\mathtt{in(X)\operatorname{\mathtt{:-}}arg(X),not\;not\\_defended(X).}$
2 | $\mathtt{out(X)\operatorname{\mathtt{:-}}not\\_defended(X).}$
3 | $\mathtt{\operatorname{\mathtt{\\#}}heuristic\;in(X).\;[1@1,false]}$
Listing 8: Preferred semantics
---
1 |  $\mathtt{in(X)\operatorname{\mathtt{:-}}arg(X),not\;defeated(X)}$,
|  $\mathtt{not\;not\\_defended(X).}$
2 | $\mathtt{out(X)\operatorname{\mathtt{:-}}not\\_defended(X).}$
3 | $\mathtt{\operatorname{\mathtt{\\#}}heuristic\;out(X).\;[1@1,false]}$

#### Equivalence with ASPARTIX

The following theorem proves the equivalence between our full learned
admissible, complete and stable AAF semantics and the corresponding ASPARTIX
encodings, showing the soundness of our unifying learning framework with
respect to AAF.

######  Theorem 1.

Let $F$ be an ASP representation of an AAF. Let $T_{\sigma}=\langle
B_{AAF},S_{M},\langle E^{+},E^{-}\rangle\rangle$ be a learning task for the
$\sigma$-semantics of AAF, where $\sigma$ stands for admissible, complete or
stable. Let $H_{\sigma}$ be a solution to $T_{\sigma}$, and
$P_{\sigma}=B_{AAF}\cup H_{\sigma}$ be the full learned $\sigma$-semantics.
Let $S_{\sigma}$ be the ASP encoding of the $\sigma$-semantics in ASPARTIX.
Then, $AS(P_{\sigma}\cup F)=AS(S_{\sigma}\cup F).$

We have used a similar approach to learn the full BAF and VAF semantics. The
background knowledge of our unifying framework can be similarly simplified
obtaining the $B_{BAF}$ and $B_{VAF}$ programs given in Listings Equivalence
with ASPARTIX and Equivalence with ASPARTIX, respectively.

Listing 9: Simplified background knowledge $B_{BAF}$
---
1 | $\mathtt{support(X,Z)\operatorname{\mathtt{:-}}support(X,Y),support(Y,Z).}$
2 | $\mathtt{supported(X)\operatorname{\mathtt{:-}}support(Y,X),in(Y).}$
3 | $\mathtt{defeat(X,Y)\operatorname{\mathtt{:-}}att(Z,Y),support(X,Z).}$
4 | $\mathtt{defeat(X,Y)\operatorname{\mathtt{:-}}att(X,Z),support(Z,Y).}$
5 | $\mathtt{defeat(X,Y)\operatorname{\mathtt{:-}}att(X,Y).}$
6 | $\mathtt{defeated(X)\operatorname{\mathtt{:-}}in(Y),defeat(Y,X).}$
7 | $\mathtt{not\\_defended(X)\operatorname{\mathtt{:-}}defeat(Y,X),not\;defeated(Y).}$
Listing 10: Simplified background knowledge $B_{VAF}$
---
1 | $\mathtt{valpref(X,Y)\operatorname{\mathtt{:-}}valpref(X,Z),valpref(Z,Y).}$
2 | $\mathtt{pref(X,Y)\operatorname{\mathtt{:-}}valpref(U,V),val(X,U),val(Y,V).}$
3 | $\mathtt{pref(X,Y)\operatorname{\mathtt{:-}}pref(X,Z),pref(Z,Y).}$
4 | $\mathtt{defeat(X,Y)\operatorname{\mathtt{:-}}att(X,Y),not\;pref(Y,X).}$
5 | $\mathtt{defeated(X)\operatorname{\mathtt{:-}}in(Y),defeat(Y,X).}$
6 | $\mathtt{not\\_defended(X)\operatorname{\mathtt{:-}}defeat(Y,X),not\;defeated(Y).}$

Interestingly, the learned solutions for the $T_{\sigma}$ of BAFs and VAFs
frameworks are the same as that of AAF. By adding these learned solutions to
the simplified background knowledge, $B_{BAF}$ and $B_{VAF}$, we get the
corresponding full learned semantics for BAF and VAF, respectively.

### Applying $LAS_{arg}$ to Flat ABA Frameworks

In this section, we show how our unified framework $LAS_{arg}$ can also be
applied to ABA. Recall that ABA involves structured arguments. The definition
of ABA includes rules, assumptions and a contrary relation. To use our unified
$LAS_{arg}$ task, we have developed a 2-step algorithm for translating a flat
ABA framework to an AAF. The first step constructs arguments from assumptions
and rules. The second step uses the contrary relation to compute the attack
relations. The unified $LAS_{arg}$ task can then be applied to the resulting
AAF.

#### Step 1: Constructing Arguments.

We write an answer set program that encodes rules and assumptions of a given
ABA framework and produces the arguments of the framework as answer sets. Each
argument has one root and one or more assumptions. To represent assumptions,
we use the predicate $\mathtt{as(X)}$. To represent rules, we use the
predicate $\mathtt{holds(X)}$. For example, we encode the rule $r\leftarrow
s,t$ as $\mathtt{holds(r):-holds(s),holds(t)}$. We also use $\mathtt{root(X)}$
to express that $X$ is the root of the argument, and $\mathtt{assume(X)}$ to
express that $X$ is an assumption in the argument.

Consider, for example, the ABA framework defined by
$\mathcal{L}=\\{p,q,r,s,t\\}$, $\mathcal{R}=\\{r\leftarrow s,t,\,\,s\leftarrow
p,\,\,t\leftarrow q\\}$, $\mathcal{A}=\\{p,q\\}$, $\bar{p}=t$ and $\bar{q}=r$.
This translates to lines 1–5 in Listing Step 1: Constructing Arguments.. Lines
6–10 are auxiliary definitions required for the learning task.

Listing 11: Step 1 - Construct Arguments
---
1 | $\mathtt{as(p).}$
2 | $\mathtt{as(q).}$
3 | $\mathtt{holds(r)\operatorname{\mathtt{:-}}holds(s),holds(t).}$
4 | $\mathtt{holds(s)\operatorname{\mathtt{:-}}holds(p).}$
5 | $\mathtt{holds(t)\operatorname{\mathtt{:-}}holds(q).}$
6 | $\mathtt{0\\{assume(X)\\}1\operatorname{\mathtt{:-}}as(X).}$
7 | $\mathtt{holds(X)\operatorname{\mathtt{:-}}assume(X).}$
8 | $\mathtt{1\\{root(X):holds(X)\\}1.}$
9 | $\mathtt{\operatorname{\mathtt{\\#}}heuristic\;assume(X).\;[1,false]}$
10 | $\mathtt{\operatorname{\mathtt{\\#}}heuristic\;root(X).\;[1,true]}$
11 | $\mathtt{\operatorname{\mathtt{\\#}}show\;root/1.}$
12 | $\mathtt{\operatorname{\mathtt{\\#}}show\;assume/1.}$

For each assumption, we decide whether to assume it (Line 6 in Listing 11) and
if we assume it, then it holds (Line 7 in Listing 11). Moreover, we have
exactly one root, but for something to be a root, it has to hold (Line 8 in
Listing 11). Heuristics statements in Lines 9 and 10 are used to favor answer
sets that set the atom $\mathtt{assume(X)}$ to false and $\mathtt{root(X)}$ to
true. During the search for answer sets, the solver sets one of the
$\mathtt{assume}$ or $\mathtt{root}$ atoms to the desired truth value (false
for $\mathtt{assume}$ and true for $\mathtt{root}$). By running the solver
with the enumeration mode flag (\--enum=domrec), whenever an answer set is
found, the solver adds constraints stating that any further answer sets must
be “better” in at least one way – either by making one of the
$\mathtt{assume}$ atoms that is true in the previous answer set false, or by
making one of the $\mathtt{root}$ atoms that is false in the previous answer
set true. As there is exactly one $\mathtt{root}$ atom per answer set, all
answer sets that are minimal over the $\mathtt{assume}$ atom for each root are
computed. This is exactly what we are looking for, since to construct the
arguments, we want to find one proof for each root (starting from
assumptions), that involves a minimal number of assumptions.

Each answer set of the program in Listing Step 1: Constructing Arguments.
describes an argument with the predicates $\mathtt{root(X)}$ and
$\mathtt{assume(X)}$, which give the root and the assumptions in the argument.
When we solve this program with clingo222We run clingo with support for
heuristics with the command clingo 0 const_args.lp --heuristic=domain
--enum=domrec, where constr_args.lp is the program in Listing Step 1:
Constructing Arguments.., we get answer sets
$\mathtt{\\{assume(p),root(p)\\},\\{assume(q),}$
$\mathtt{root(q)\\},\\{assume(p),root(s)\\},\\{assume(q),root(t)\\}}$,
$\mathtt{\\{assume(p),assume(q),root(r)\\}}$.

### Step 2: Finding the Attack Relations

After completing Step 1, we assign an index to each argument, which makes them
easier to encode. We follow the output ordering of the answer sets in clingo.
In the example above, this process results in the following assignments: $1$
to $\mathtt{\\{assume(p),root(p)\\}}$, $2$ to
$\mathtt{\\{assume(q),root(q)\\}}$, $3$ to $\mathtt{\\{assume(p),root(s)\\}}$,
$4$ to $\mathtt{\\{assume(q),root(t)\\}}$ and $5$ to
$\mathtt{\\{assume(p),assume(q),root(r)\\}}$. Let $\mathtt{root(N,X)}$ denote
that $X$ is a root in the argument with index $N$, and let $\mathtt{as(N,X)}$
denote that $X$ is an assumption in the same argument. Let
$\mathtt{contr(P,Q)}$ express that $P$ is the contrary of $Q$ in the ABA
framework. Thus, the framework in the example above translates to lines 1–11
of Listing Step 2: Finding the Attack Relations.

Listing 12: Step 2 - Generate Attacks
---
1 | $\mathtt{root(3,s).}$
2 | $\mathtt{root(4,t).}$
3 | $\mathtt{root(5,r).}$
4 | $\mathtt{as(1,p).}$
5 | $\mathtt{as(2,q).}$
6 | $\mathtt{as(3,p)}$
7 | $\mathtt{as(4,q).}$
8 | $\mathtt{as(5,p).}$
9 | $\mathtt{as(5,q).}$
10 | $\mathtt{contr(p,t).}$
11 | $\mathtt{contr(q,r).}$
12 | $\mathtt{att(X,Y)\operatorname{\mathtt{:-}}contr(P,Q),root(X,Q),as(Y,P).}$
13 | $\mathtt{\operatorname{\mathtt{\\#}}show\;att/2.}$

Finally, to find the attack relations, we must introduce one last rule (line
12). This rule states that if an assumption is contrary to a root, then there
is an attack from the argument containing the assumption towards the argument
containing the root. By solving the program in Listing Step 2: Finding the
Attack Relations with clingo, we obtain one answer set:
$\mathtt{\\{att(4,1),att(4,3),att(4,5),att(5,2),att(5,4),}$
$\mathtt{att(5,5)\\}}$. We now have an AAF representation of the original ABA
framework. At this point we can apply the unified LAS task to learn the
semantics of the ABA framework.

## Evaluation

In this section, we evaluate the performance of our method by comparing it
with two argumentation solvers and a Deep Learning technique for learning
argumentation semantics. We evaluate the accuracy, the dataset size needed for
learning AAFs’ semantics and the time required for computing extensions from
learned versus engineered encodings.

### Time Performance for Computing AAF Extensions

To evaluate time performance, we randomly generate 5 different argumentation
frameworks, containing $10$, $50$, $100$, $500$, and $700$ arguments,
respectively, as well as random attacks between them. The solver $\mu$-toksia
does not support finding all possible extensions for a given semantics – it
finds one extension only. Therefore, in our experiment, we measure the time it
takes to find one extension only333We use the command clingo -n 1 asp.lp to
limit clingo to finding just one single extension, where asp.lp is the
relevant ASP encoding.. For each argumentation framework, we construct answer
set programs using our full learned and the ASPARTIX encoding for the given
semantics. We record the time taken to complete the task for each
argumentation framework. Similarly, we measure the time required for
$\mu$-toksia to find a single extension, limited to the stable, complete, and
preferred semantics, since $\mu$-toksia does not support the admissible and
the grounded semantics. Figures 1–3 show running times for the stable, the
complete and the preferred semantics, respectively. Table 13 shows running
times for the admissible and the grounded semantics.

Figure 1: Time (in seconds) it takes each solver to find one stable extension
of frameworks of different sizes

Figure 2: Time (in seconds) it takes each solver to find one preferred
extension of frameworks of different sizes

.

Figure 3: Time (in seconds) it takes each solver to find one complete extension of frameworks of different sizes. Note that all times are $\leq 0.2$ seconds and thus the difference between methods is negligible. # args | Semantics | Our Encoding | ASPARTIX
---|---|---|---
10 | Admissible | 0.00875 | 0.00711
Grounded | 0.00945 | 0.01027
50 | Admissible | 0.02897 | 0.02263
Grounded | 0.02418 | 0.0322
100 | Admissible | 0.04941 | 0.06767
Grounded | 0.05999 | 0.10709
500 | Admissible | 0.11218 | 0.17430
Grounded | 0.11550 | 5.76034
700 | Admissible | 0.12039 | 0.21234
Grounded | 0.10434 | 16.07983
Table 13: Time (in seconds) it takes each solver to find one extension of the
argumentation framework for the given semantics (best times are highlighted in
bold).

For smaller frameworks, our method is not faster than the other solvers, and
$\mu$-toksia is the quickest. However, as we increase the number of arguments
in the framework, the time $\mu$-toksia needs to find a stable or a preferred
extension increases drastically. ASPARTIX shows a similar trend: it exhibits a
significantly worse performance for the preferred and grounded semantics as
the framework size approaches $700$ arguments. A possible explanation for this
behavior is that ASPARTIX encodings for the preferred and grounded semantics
are complex and involve many auxiliary predicates. On the other hand, our
learned encoding is much simpler and more compact.

Regarding the complete semantics, the performance of ASPARTIX and $\mu$-toksia
does not deteriorate as the size of the framework increases. This is unlike
what occurs with the preferred, grounded, and stable semantics. However, the
variations in the time performance between the three methods are minimal; this
becomes obvious by comparing Figure 3, according to which all methods take
less than $0.2$ seconds, with Figures 1 and 2.

Our approach exhibits remarkable scalability, outperforming both ASPARTIX and
$\mu$-toksia. As the number of arguments in the framework increases, the
incremental time required to find an extension remains exceptionally small.

### Accuracy for Finding AAF Extensions

We investigate the accuracy of our method by applying the learned ASP encoding
to compute the extensions of an argumentation framework for the given
semantics. For this we use the Matthew’s correlation coefficient (MCC) as
evaluation metric. The closer the MCC is to 1, the more accurate our method
is. We use the extensions computed by the ASPARTIX encodings as ground truth
to evalaute the accuracy of our approach. We generate $1000$ random
frameworks, that contain between $5$ and $25$ arguments with randomly
generated attacks. For each example framework we use clingo to compute the
answer sets using our learned encodings and the ASPARTIX encodings. The final
result is that for $1000$ out of the $1000$ frameworks we generated, the
answers sets of the two answer set programs are exactly the same, which means
$100\%$ accuracy and an MCC metric value of $1$.

Compared to the Deep Learning algorithm (Craandijk and Bex 2020), which was
trained on one million examples and tested on a randomly generated set of
$1000$ frameworks (each containing between $5$ and $25$ arguments as before),
our method stands out significantly. While the Deep Learning algorithm reaches
an MCC of $1$ only for grounded semantics, achieving MCC values of $0.998$ for
both stable and preferred semantics, and $0.999$ for complete semantics, our
approach demonstrates an advantageous performance across these areas.

### Amount of Data Needed for Learning

Our method displays remarkable efficiency by requiring significantly fewer
examples to learn the encoding of each semantics compared to the Deep Learning
model. Specifically, we use only $7$ examples to learn the admissible
semantics, $8$ for both the stable and the complete semantics, $16$ for the
preferred semantics, and $27$ for the grounded semantics, consistently
achieving perfect accuracy ($MCC=1$). In contrast, when training the Deep
Learning model on $30$ examples, which exceeds the number required by our
method for any of the semantics, the MCC metric remains much lower than $1$.
In fact, the maximum MCC achieved is $0.39$ for the grounded semantics.

Table 14 shows MCC for each semantics after training the Deep Learning method
on $30$ examples, for frameworks with $5$ to $25$ arguments. Despite training
for $100$ epochs, extending the training time does not improve the outcome.
The results consistently fall short of those achieved by our method.

| Stable | Preferred | Complete | Grounded
---|---|---|---|---
MCC | 0.05386 | 0.30265 | 0.21286 | 0.38847
Table 14: MCC metric on the test set, after training on 30 examples, for each
of the AAF semantics, supported by the Deep Learning model.

Furthermore, the size of the frameworks we use for learning is small. For the
preferred and the grounded semantics, the frameworks contain at most $5$
arguments, while for the stable, the admissible and the complete semantics at
most $4$.

### Compactness and Interpretability

Using ILASP, we have learned a streamlined and intelligible representation of
each semantics. The rules we have learned are not only concise but are also
transparent, making them easily explainable. In comparison, the ASPARTIX
encodings contain more rules, especially for the grounded and the preferred
semantics. For instance, while we employ $5$ rules for each of these two
semantics in AAF, ASPARTIX’s encodings use $13$ and $33$ rules, respectively.
Additionally, the analyzed state-of-the-art Deep Learning algorithm is not
interpretable and does not achieve perfect accuracy even when training on very
large datasets.

## Conclusion and Future Work

Thia paper presents a novel approach for learning acceptability semantics of
argumentation frameworks, which relies on Learning from Answer Sets. We
constructed a unified framework for learning the semantics of four
argumentation frameworks. We proved equivalence of the semantics learned by
our $LAS_{arg}$ framework with the manually engineered ASPARTIX encodings for
the stable, the complete and the admissible semantics. In addition, empirical
evaluations demonstrate better accuracy and scalability of our learned
encodings of semantics when compared to other state-of-the-art methods.

The achievements delineated in this paper pave the way for multiple avenues of
further research. First and foremost, we intend to explore the learning of
domain-specific custom semantics. Recognizing that individual reasoning about
the acceptability of arguments may vary widely in real-world contexts, our
framework is designed to accommodate these unique perspectives, extending
beyond the five known semantics considered within this study. Moreover, our
ambitions extend to practical applications, where the learned encodings can be
harnessed to ascertain accepted arguments from real-world dialogues. This can
be achieved by integrating our method with other Machine Learning or Natural
Language Processing tools dedicated to argument extraction from dialogues.
These advancements may open up exciting possibilities for both theoretical
exploration and practical utilization.

## References

  * Atkinson et al. (2017) Atkinson, K.; Baroni, P.; Giacomin, M.; Hunter, A.; Prakken, H.; Reed, C.; Simari, G.; Thimm, M.; and Villata, S. 2017.  Towards Artificial Argumentation.  _AI Magazine_ , 38(3): 25–36.
  * Bench-Capon (2003) Bench-Capon, T. J. M. 2003.  Persuasion in Practical Argument Using Value-based Argumentation Frameworks.  _Journal of Logic and Computation_ , 13(3): 429–448.
  * Cayrol and Lagasquie-Schiex (2009) Cayrol, C.; and Lagasquie-Schiex, M. 2009.  Bipolar abstract argumentation systems.  In Simari, G. R.; and Rahwan, I., eds., _Argumentation in Artificial Intelligence_ , 65–84. Springer.
  * Craandijk and Bex (2020) Craandijk, D.; and Bex, F. 2020.  Deep Learning for Abstract Argumentation Semantics.  In _Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence_. International Joint Conferences on Artificial Intelligence Organization.
  * Dung (1995) Dung, P. M. 1995.  On the acceptability of arguments and its fundamental role in nonmonotonic reasoning, logic programming and n-person games.  _Artificial Intelligence_ , 77(2): 321–357.
  * Egly, Gaggl, and Woltran (2010) Egly, U.; Gaggl, S. A.; and Woltran, S. 2010.  Answer-set programming encodings for argumentation frameworks.  _Argument & Computation_, 1(2): 147–177.
  * Gebser and et al. (2019) Gebser, M.; and et al. 2019.  Potassco guide version 2.2.0.
  * Gelfond and Kahl (2014) Gelfond, M.; and Kahl, Y. 2014.  _Knowledge Representation, Reasoning, and the Design of Intelligent Agents: The Answer-Set Programming Approach_.  Cambridge, UK: Cambridge University Press.
  * Law (2018) Law, M. 2018.  _Inductive Learning of Answer Set Programs_.  Ph.D. diss., Dept. of Computer Science, Imperial College London, London, United Kingdom.
  * Law et al. (2020) Law, M.; Russo, A.; Bertino, E.; Broda, K.; and Lobo, J. 2020.  Fastlas: scalable inductive logic programming incorporating domain-specific optimisation criteria.  In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 34, 2877–2885.
  * Law, Russo, and Broda (2016) Law, M.; Russo, A.; and Broda, K. 2016.  Iterative Learning of Answer Set Programs from Context Dependent Examples.  _Theory Pract. Log. Program._ , 16(5-6): 834–848.
  * Law, Russo, and Broda (2018) Law, M.; Russo, A.; and Broda, K. 2018.  Inductive Learning of Answer Set Programs from Noisy Examples.  _Advances in Cognitive Systems_.
  * Law, Russo, and Broda (2019) Law, M.; Russo, A.; and Broda, K. 2019.  Logic-Based Learning of Answer Set Programs.  In _Reasoning Web. Explainable Artificial Intelligence - 15th International Summer School 2019, Bolzano, Italy, September 20-24, 2019, Tutorial Lectures_ , 196–231.
  * Lifschitz (2019) Lifschitz, V. 2019.  _Answer set programming_.  Springer Heidelberg.
  * Muggleton (1991) Muggleton, S. 1991.  Inductive Logic Programming.  _New Generation Computing_ , 8(4): 295–318.
  * Niskanen and Järvisalo (2020) Niskanen, A.; and Järvisalo, M. 2020.  $\mathrm{\mu}$-toksia: An Efficient Abstract Argumentation Reasoner.  In _Proceedings of the 17th International Conference on Principles of Knowledge Representation and Reasoning, KR 2020, Rhodes, Greece, September 12-18, 2020_ , 800–804.
  * Toni (2014) Toni, F. 2014.  A tutorial on assumption-based argumentation.  _Argument & Computation_, 5(1): 89–117.