11institutetext: Department of Computer Science, University of Manchester, UK
11email:  {simon.kolker, louise.dennis, ramon.fragapereira,
<EMAIL_ADDRESS>
# Uncertain Machine Ethical Decisions Using Hypothetical Retrospection

Simon Kolker  Louise Dennis  Ramon Fraga Pereira  Mengwei Xu

###### Abstract

We propose the use of the hypothetical retrospection argumentation procedure,
developed by Sven Hansson, to improve existing approaches to machine ethical
reasoning by accounting for probability and uncertainty from a position of
Philosophy that resonates with humans.

Actions are represented with a branching set of potential outcomes, each with
a state, utility, and either a numeric or poetic probability estimate. Actions
are chosen based on comparisons between sets of arguments favouring actions
from the perspective of their branches, even those branches that led to an
undesirable outcome. This use of arguments allows a variety of philosophical
theories for ethical reasoning to be used, potentially in flexible combination
with each other.

We implement the procedure, applying consequentialist and deontological
ethical theories, independently and concurrently, to an autonomous library
system use case. We introduce a a preliminary framework that seems to meet the
varied requirements of a machine ethics system: versatility under multiple
theories and a resonance with humans that enables transparency and
explainability.

##  1 Introduction

Autonomous machines are an increasingly prevalent feature of the modern world.
From spam filters [25] and fraud detectors [3], to drivers [29], medical
practitioners [40] and soldiers [37], machines are being developed to automate
tasks. Any decision affecting real people has the potential for ethical
impact. Therefore machines are increasingly recognised as ethical agents. Moor
[31] categorises such machines as either _implicitly_ or _explicitly ethical_.
Implicit ethical agents are built and situated by humans to have a neutral or
positive effect, like an ATM machine; they do not utilise concepts of right
and wrong in their internal decision making. As autonomous systems make more
decisions with more responsibility, they need to reason about ethics
explicitly. Allen et al. identify two strategies for designing explicitly
ethical systems [4]: bottom-up approaches train systems to make ethical
decisions with learning techniques based on data from human decision making;
top-down approaches encode principles and theories of moral behaviour (often
drawn from philosophy) into rules for a selection algorithm, generally using
techniques from the field of symbolic Artificial Intelligence (AI).

In this paper, we propose and implement a top-down, explicitly ethical
approach.

When an action is taken in the real world, its exact results are typically
uncertain. As such, a top-down machine ethics system needs a mechanism for
handling uncertainty over outcomes. There are mechanisms for handling
uncertainty in AI, including Bayesian methods, Dempster-Shafer theory, fuzzy
logics and others [33]. Nevertheless, it is currently unclear how they might
integrate with machine ethics; there may be unanticipated philosophical
implications.

Instead, we opted to operationalise and implement Sven Hansson’s hypothetical
retrospection procedure [23]. Originating in philosophy, the procedure was
designed to guide ethical reasoning under uncertainty. It favours no specific
ethical theory, but systematises the foresight argument pattern, extending an
assessor’s perspective to judge decisions by the circumstances in which they
were made. Therefore, arguments can be grounded in a variety of ethical
theories. Over the past ten years, the field of machine ethics has implemented
many such theories [38], yet there is no consensus over which is most
effective. Philosophy too has not agreed which is morally correct, leaving
implementers to choose from the perspective of stakeholder requirements and
preferences. Thus, a mechanism for handling uncertainty that adapts to
different ethical theories is desirable.

We outline the procedure via an example from Hansson [23]. Suppose an agent is
given the choice between an apple and flipping a coin. If the coin lands
heads, they win a free holiday to Hawaii. If the coin lands tails, they get
nothing. Selecting the coin is clearly a valid choice. How might this decision
be justified? Under hypothetical retrospection, we list each possible outcome:
choosing the apple; choosing to toss the coin and winning Hawaii; choosing to
toss the coin and losing. Next, we hypothetically retrospect from each
outcome’s endpoint. Intuitively, the objective is to find an action whose
outcomes do not lead the agent to regret the ethical implications of their
action.111We recognise there is little ethical impact in this decision,
besides maximising utility. It serves as an abstract example where one
decision openly defeats another. First, consider the coin’s outcomes: after
winning Hawaii, there cannot be regret since Hawaii is the best outcome; after
losing the agent has nothing, which is the worst outcome, but there is no
regret since the agent justifies that they had a good chance of winning
Hawaii, which is far better than an apple. Now, consider choosing the apple.
Here, the agent regrets that they missed a chance of a holiday worth far more
than an apple. We saw that choosing the coin did not lead to such regret.
Therefore, the procedure advises we pick the coin, matching our intuition.

This paper operationalises the hypothetical retrospection procedure, and the
foresight argument pattern it is based on. We implement and evaluate it with
moral theories from Philosophy. We consider Deontology, which specifies a set
of actions that are strictly forbidden [2], and a theory of consequentialism,
which specifies an action is good if its consequences maximise good for the
greatest number of people [32]. We illustrate our approach with the novel
scenario of an autonomous library system. We demonstrate the system’s
potential for explainability and versatility, while discussing issues and
future work.

In Section 2, we will cover related work in the area and highlight this
paper’s contribution. In Section 3, we will cover background on symbolic
argumentation and uncertainty in ethical philosophy. In Section 4 we will
recap Hansson’s description of hypothetical retrospection; in Section 5 we
overview the implementation, including notation, the representation of
probability and the argumentation model. Section 6 describes our test case of
the autonomous library system, its formalism, and our results. Finally, in
Section 7 we will identify the system’s potential benefits and its shortfalls,
left for future work.

##  2 Related Work

This is not the first attempt at building a top-down explicitly ethical
machine. Tolmeijer et al. presents an exhaustive survey of implementations as
of 2020, but finds the effect of uncertainty is rarely addressed [38]. Dennis
et al. developed a framework suggesting how an autonomous system should act in
unforeseen circumstances, with no positive outcomes. However, it does not
address uncertainty between the likelihood of outcomes [18]. Probabilistic
reasoning, such as Bayesian networks [36] and Markov models [17], has been
applied to machine ethics, mostly with regards to maximising expected utility
[15]. There are a number of criticisms of this approach which we will touch on
in Section 3. Killough et al. goes further, architecting agents sensitive to
utility risk and reward, with an ability to dynamically adjust risk-tolerance
for the environment [27].

This paper is interested in a framework that incorporates a variety of
philosophical ethical theories and allows for the combination of multiple
theories, such as Deontology [2], Contractualism [7] and Virtue Ethics [24].
Different philosophical theories can advise on different courses of action,
not only in tricky dilemma situations but sometimes even in situations where
the moral choice seems intuitively obvious. There has been some work within
machine ethics on comparing and combining different theories. For instance,
Sholla et al. weights different principles and then uses fuzzy logic to decide
between their recommendations [35]. Ecoffet and Lehman [20] use a voting
procedure in which different ethical theories vote on recommendations but
struggle with the difficulty of comparing utilitarian theories that return a
score for actions with deontological theories that tend to return a judgement
that the action is either permissible or impermissible. Our framework enables
a flexible approach in which the construction of an argument can treat all
ethical theories equally, or allow one to have precedence over another. The
HERA project [28] is of interest here – while it does not combine ethical
theories it provides a single framework in which many theories can be
formalised and operationalised, allowing their recommendations to be compared.
Cointe et. al [16] do something similar with an Answer-Set Programming
approach though focused, in this case, on enabling the agent to make moral
judgements about others. These systems could, potentially, be integrated into
our argumentation framework to supply judgements on the rightness of an action
and its consequences from the perspective of a particular moral theory.

Atkinson and Bench-Capon have developed a framework for ethical argumentation
[8]. Like our work, assessments of action’s outcomes are modelled as
arguments. However, Atkinson and Bench-Capon’s work remains concerned with
epistemic conflicts between arguments (i.e. disputes between the truth of
argument’s circumstances) and annotates attacks and defends within the
argumentation framework with values, aligning it with the philosophical theory
of Virtue Ethics. Our work pivots away, focused purely on the ethical
conflicts between arguments. We can assume epistemic truth because arguments
are based only on potential, purely hypothetical, versions of events, each
created from a single, shared set of information. This allows us to address
moral conflict directly. It also lets us build uncertainty into the
argumentation mechanism, instead of delegating it to a detail of argument
attacks.

##  3 Background

The effect of uncertainty on machine ethics has been relatively unexplored
largely due to the lack of research on how uncertainty impacts ethics in
general. As Altham explains, there seems to be a gap in moral theory for
uncertain situations [5]. He postulates this could be due to a belief among
philosophers that no special principles are required; moral philosophy decides
the virtues and it is up to decision theory to decide how they should be
maximised under uncertainty.

Hansson shows that utilitarian theories are straightforward in this regard
[23]. These theories judge decisions based on numeric utilities assigned to
their consequences. Expected utility utilitarianism uses probabilities as
weights to discount the utility of improbable outcomes. Hansson critiques this
adaptation for the same reason as actual utilitarianism: its assumption that
outcomes can be appraised in terms of a single number (or at least done so
both easily and accurately) often produces unintuitive outcomes. In the Apple-
Coin scenario from Section 1, although it is evident that a trip to Hawaii
holds more value than an apple, the extent of the difference in value remains
uncertain. Adding more apples, such as 100, 1000, or 1001, does not
necessarily make the deal any more appealing. In other words, apples and
holidays are not proportionally comparable. There is no method of assigning
relative utilities to all possible states. Brundage briefly surveys other
critiques against consequentialist theories. First, they fail to account for
personal social commitments, i.e. to friends and family. Second, they do not
consider individual differences and rights, tending to favour the majority
over any minority. Lastly, they place excessive demands on individuals to
contribute to others [13].

Traditional deontological systems [2] are made of principles which should
never be violated. Hansson shows that any form of probabilistic absolutism,
where an action is not permitted if there is any chance of a rule violation,
would be too restrictive. Therefore, an approach involving probability
thresholds is often suggested. Here, an action is only forbidden when the
probability that it violates a law exceeds some limit. The exact value of this
limit is open for debate. It is tempting to suggest the limit should have some
relation to the action’s potential benefits, but this could soon reduce to
some elaborate form of utilitarianism, adamantly against the essence of the
original theory.

Noticeably, most humans do not consciously rely on one philosophical, moral
theory to make their decisions [12]. Nor do we think it is our place to choose
a single theory to apply to machine ethics. As such, one of Hansson’s key
contributions is providing an argumentation procedure that can frame multiple,
possibly conflicting theories rationally. To model this, we look to the study
of abstract argumentation. Dung creates a framework of logically generated,
non-monotonic arguments [19]. They can discredit each other with attacks,
modelled as a binary relation between the arguments. Dung goes on to specify
properties of a well-founded framework; he gives procedures for believing
arguments based on their membership to framework extensions. This paper will
take only take the simple structure of Dung’s framework. We leave it to
Hansson’s philosophy to define attacks and select arguments.

##  4 Hypothetical Retrospection

Hypothetical Retrospection systematises ethical decision making with uncertain
outcomes such that its judgements resonate with humans. In this section, we
overview Hansson’s description of the procedure from [23], before we
operationalise it in Section 5.

Much of moral philosophy can be interpreted as an attempt to extend a decision
maker’s perspective. In promoting empathy, we invoke a perspective extending
argument pattern to consider other’s perceptions of our actions. For cases of
uncertainty, Hansson argues it is instead helpful to extend our perspective
with future perceptions of our actions. This means viewing, or hypothetically
retrospecting on, a choice from the endpoint of its major foreseeable
outcomes. As a result, the hypothetical outcomes, or the potential branches of
future development, can be referred to in a valid argument about what to do in
the present. Although Hansson proposes moral arguments that go beyond utility,
duty or rights based calculations, the procedure is highly compatible.

Hansson determines each action’s branches of future development like a search
problem. Theoretically, a decision’s effects may be infinitely complex and
far-reaching. The major search principle, therefore, is to find the most
probable future developments which are the most difficult to defend morally.
This will increase the chance of considering unethical scenarios. Branches
should be developed to an endpoint sufficiently far to capture all morally
relevant information. Intermediate information must be captured too: rule
violations occurring before the point of retrospection still need to be
considered. Additionally, and for the sake of comparison, branches should be
described with the same type of information where possible222The way in which
consequences are discussed here may seem to exclude non-consequentialist
theories. Hansson emphasizes that this is not the case. In his approach,
consequences are broadly defined and their information includes agency, virtue
intentions, and any other information necessary for moral appraisal.. Hansson
sees no reason not to create alternate branches based on the uncertainty of
the decision maker’s own future choices, considering human’s inability to
control their future actions. Whether an autonomous system has uncertainty
over its future actions depends on the nature of the agent and its application
architecture.

Our implementation assesses actions assuming their potential branches are
provided. In future work, a planning algorithm could be adapted to the
requirements above. For instance, the Probabilistic Planning Domain Definition
Language (PPDDL) [39] is able to formalise different stochastic planning
settings, e.g., Markov Decision Process (MDP) [22], Stochastic Shortest Path
problems (SSP) [11], and Fully Observable Non-Deterministic planning [14].
This was superseded recently by the Relational Dyanamic Influence Diagram
Language (RDDL) [34] which has been adopted by the International Probabilistic
Planning Competition (IPPC)333https://ataitler.github.io/IPPC2023/ and is thus
the target input language for many planning implementations.

Using their potential branches, actions can be assessed with a selection of
ethical theories. Hansson stresses we are not to assess actions in isolation;
assessments are purely comparative. This is because decisions are not made in
isolation. Given a choice between actions A and B, choosing A is choosing
A-instead-of-B. Building action assessments from comparisons ensures all
morally relevant information is taken into account.

Actions are compared by hypothetically retrospecting from the endpoint of each
action’s potential branches of future development. We search for an action
which never leads an agent to morally regret its choice in retrospect. Hansson
argues against the term regret since it is considered a psychological
reaction; humans often feel regret for actions they did not commit, or that
they could not have known were wrong. By regret, therefore, we mean that the
decision making was logically flawed under retrospection. As a result, we use
the term _negative retrospection_ to reflect this more technical definition.
By hypothetically retrospecting between actions’ branches, we search for an
action which does not lead to negative retrospection, or has full
acceptability among its branches. If no such action exists, one should be
selected that maximises acceptability in its most probable branches.

Therefore, Hypothetical Retrospection’s decisions are based on relevant
ethical information using moral arguments resonate with humans.

##  5 Implementation

###  5.1 Formalism

We define an ethical decision problem as a tuple $\langle
A,B,S,U,F,I,m\rangle$, composed of an ethical environment and a set of
available actions, each with a set of potential branches of future
development.

An environment’s ethically relevant properties are represented by the set $S$
of Boolean variables; the set $I$ defines the initial truth assignment to $S$,
before actions are taken. For example, in the Coin-Apple scenario there are
three state variables in $S$: $s_{1}$ represents whether or not we have an
apple, $s_{2}$ whether or not we have gambled, and $s_{3}$ is whether or not
we won a trip to Hawaii. In the initial state $I$, all these variables are
false.

Ethical information for consequentialist and deontological theories are
formalised with sets $U$ and $F$. To capture the issue from Section 1, where
different event outcomes have an immeasurably greater/lower utility, we have
introduced the notion of utility classes.

######  Definition 1 (Utility Class)

A utility class is an unordered set of individual utility assignments
represented as tuples of $\langle s_{k},\phi,v\rangle$, where $s_{k}$ denotes
a state variable in $S$ and $v\in\mathbb{R}$ represents the variable’s utility
when assigned Boolean value $\phi$.

The ordered set $U$ contains utility classes in descending order of
importance. Where $i<j$, all the positive utilities in $u_{i}$ are considered
greater than any utility in $u_{j}$; all the negative utilities in $u_{i}$ are
considered less than any utility in $u_{j}$. To reiterate, the absolute
utilities in lower indexed classes are immeasurably greater. In the Coin-Apple
example, there are two utility classes in $U$. The first contains the utility
assignment, $\langle s_{3},True,1\rangle$ representing a utility of 1 for
getting the Hawaii holiday. The second class has utilities immeasurably lower.
It contains one assignment, $\langle s_{1},True,1\rangle$ representing a
utility of 1 for getting the apple.

The set $F$ describes the states forbidden by a given deontological theory.
This is not the same as defining a negative utility in $U$ since utilities can
be outweighed by a greater positive utility. In deterministic decision making
environments, forbidden states can not be outweighed. They could represent,
for instance, that someone was deceived, that a law (e.g., trespass) was
broken, and so on – any action or outcome that can not be justified. The
formalism assumes that the high-level rules have been translated into domain-
level rules, applicable to the state variables in $S$.

######  Definition 2 (Forbidden State)

A Forbidden State is a tuple $\langle s,\phi\rangle$ where $s\in S$ is a state
variable forbidden from being assigned the Boolean value $\phi$.

In the Coin-Apple scenario, $F$ could contain a forbidden state, $\langle
s_{2},True\rangle$ representing a rule against gambling.

With an environment of ethical values, we define set $A$ of available actions
and set $B$ of all potential branches of future development. We define a
mapping, $m$, that associates every action with its potential branches of
future development. Each branch, $b\in m(a)$ is an ordered sequence of
_events_ that could occur after action $a$.

######  Definition 3 (Event)

An event is a tuple of $\langle s,\phi,p\rangle$ where $s\in S$, $\phi$ is the
new Boolean value of $s$, and $p$ is the probability that the event occurs.

An event therefore represents the change in value of one state variable in
$S$. A branch is a sequence of events that can occur after the action is
taken.

For the Coin-Apple example, there are two available actions in $A$. Action
$a_{1}$ represents choosing the apple. It maps to one branch $b_{1}\in
m(a_{1})$, containing one event, $\langle s_{1},True,1\rangle$—if we choose to
have an apple, we gain an apple; we have not gambled nor won a holiday to
Hawaii. Action $a_{2}$ represents flipping the coin. It maps to two branches,
$b_{2},b_{3}\in m(a_{2})$. The branch $b_{2}$ contains one event, $\langle
s_{2},True,1\rangle$—we gambled, but we have no apple and no holiday to
Hawaii. The branch $b_{3}$ is the sequence of events $\langle
s_{2},True,1\rangle$ then $\langle s_{3},True,0.5\rangle$—first we gambled,
then we won a holiday to Hawaii. The Coin-Apple problem is shown in Figure 1.

Figure 1: Diagram for Coin-Apple scenario. Event nodes represent True
assignment to a state variable. Actions map to a set of branches, represented
by rows of event nodes.

We define the ethical decision problem and a permissible action. The
definition of acceptability depends on the ethical theories under
consideration (see Section 5.3).

######  Definition 4 (Ethical Decision Problem)

An ethical decision problem is a tuple of $\langle A,B,S,U,F,I,m\rangle$ where
$A$ stands for a set of available actions, $B$ the set of all potential
branches of future development, $S$ the set of Boolean state variables, $U$ an
ordered set of _utility classes_ , $F$ a set of forbidden state assignments,
$I$ the initial assignment of Boolean values to the variables in $S$,
representing the initial state, and $m:A\rightarrow{\cal P}(B)$ (where ${\cal
P}$ is the powerset function) is a mapping of actions to potential branches of
development.

######  Definition 5 (Permissible Action)

Given an ethical decision problem, defined as a tuple of $\langle
A,B,S,U,F,I,m\rangle$, a permissible action is an action, $a\in A$, such that
for all potential branches of future development $b\in m(a)$, there is
acceptability over their events in state space $S$. If no such actions exist,
action $a$ is permissible if it maximises the cumulative probability of its
acceptable branches.

###  5.2 Probability Representation

In many scenarios, while a person may have an intuition that some events are
more probable than others, their exact probabilities are unknown. This is most
common when interacting with humans and complex systems. Our implementation
supports the use of estimative as well as exact probability estimates. Kent
found that intelligence reports tend to use poetic words like probable or
unlikely [26]. The issue is that people have different interpretations of
their meaning. Kent defined a relation for poetic words to mathematical
probability ranges, as given in Table 1 from [26]. Our implementation supports
both estimative and exact probabilities.

100% Certainty
---
The General Area of Possibility | 93% | Give or take 6% | Almost Certain
75% | Give or take 12% | Probable
50% | Give or take 10% | Chances about even
| 30% | Give or take 10% | Probably not
| 7% | Give or take 5% | Almost certainly not
0% Impossibility
Table 1: Mathematical to poetic relation from Kent’s estimative probability
[26].

###  5.3 Argumentation Model

Hansson does not give steps for comparing action’s potential branches of
future development in [23]. For our implementation, we chose to build
comparative moral assessments with a simple argumentation network, based
partially on the work of Atkinson et al. [9]. Here, arguments are generated
logically from an _argument scheme_. For an action $a\in A$, selected in
initial state $I$, resulting in the branch $b\in m(a)$ with probability $p$,
the following argument is generated:

“From the initial state $I$, it was acceptable to perform action $a$,
resulting in consequences $b$ with probability p.”

For notation, this is written $Argument(b)$. We view this as a default
argument that any action is acceptable. In our running example, the
retrospective argument below is generated for $b_{3}$, tossing the coin and
winning the Hawaii holiday.

“From the initial state $I$, where $s_{1}=s_{2}=s_{3}=False$, it was
acceptable to perform the action $a_{2}$, resulting in consequences with
$s_{2}=s_{3}=True$ with probability 0.5.”

To determine an argument’s validity, we search for attacks from other actions’
arguments. Incoming attacks imply negative retrospection for not choosing an
attacking action. To formalise Hansson’s retrospection, we generate attacks by
posing critical questions on arguments’ claims [9]. For the branches $b_{1}\in
m(a_{1})$, $b_{2}\in m(a_{2})$ and any generic moral principle, the following
critical questions are asked for $Argument(b_{1})$ to attack
$Argument(b_{2})$.

CQ1

Did $b_{2}$ violate a moral principle that $b_{1}$ did not?

CQ2

Did $a_{2}$ hold a greater probability of breaking the moral principle than
$a_{1}$?

$Argument(b_{1})$ only attacks $Argument(b_{2})$ if both of these questions
are answered positively. They represent negative retrospection for missing the
chance to avoid violating a principle. The critical questions are asked both
ways between all arguments supporting different actions, for every moral
principle under consideration. The time and space complexity of answering the
questions will differ for different theories. The critical questions for
embedding utilitarianism and a generic deontological do-no-harm principle are
given as follows:

  * •

Utilitarian CQ1: Did $b_{2}$ bring greater utility value than $b_{1}$?

  * •

Utilitarian CQ2: Did $a_{2}$ expect greater utility value than $a_{1}$?

  * •

Do-no-harm CQ1: Did $b_{2}$ cause harm where $b_{1}$ did not?

  * •

Do-no-harm CQ2: Did $a_{2}$ expect greater probability of causing harm than
$a_{1}$?

After searching for attacks on all branches, an action should be selected with
complete acceptability. If no such action exists, an action should be selected
with maximal acceptability, i.e. summing the probability of each non-attacked
argument and selecting an action with a maximal sum.

###  5.4 Algorithm

Given an ethical decision problem, we implemented Algorithm 1 to argument
retrospective arguments made from the perspective of actions’ potential
branches of future development. Our implementation has no planning element,
searching for action’s branches as discussed in Section 4. This is left for
future work. Instead, we pass an ethical decision problem to an implementation
of Algorithm 1 and a permissible action is output. We implement a Web-App with
Flask and Python 3.8.9 to graph retrospection and alter utilities and
deontological laws. The source code is available on GitHub at
https://github.com/sameysimon/HypotheticalRetrospectionMachine.

Algorithm 1 Arguments action’s potential branches of future development.
Returns index of action with maximum acceptability.

Input Ethical Decision Problem $\langle A,B,S,U,F,I,m\rangle$
Output Permissible Action $a\in A$

1:array $acceptability$ $\leftarrow$ $[1,...,1]$ of size $length(A)$

2:array $attacked$ $\leftarrow$ $[False,...,False]$ of size $length(B)$

3:for each $A_{i},A_{j}$ in {$(A_{i},A_{j})|A_{i},A_{j}\in A$ and $A_{i}\neq
A_{j}$} do

4: for each $b_{k}$ in $m(A_{i})$ do

5: for each $b_{l}$ in $m(A_{j})$ do

6: if $b_{k}$ attacks $b_{l}$ and not $b_{l}$ attacks $b_{k}$ in Critical
Questions then

7: $attacked[l]\leftarrow True$

8: end if

9: if $b_{l}$ attacks $b_{k}$ and not $b_{k}$ attacks $b_{l}$ in Critical
Questions then

10: $attacked[k]\leftarrow True$

11: end if

12: end for

13: end for

14:end for

15:for each $A_{i}\in A$ do

16: for each $b_{k}\in m(A_{i})$ do

17: if $attacked[k]$ then

18: $acceptability[i]$ $\leftarrow$ $acceptability[i]-Probability(b_{k})$

19: end if

20: end for

21:end for

22:return $\leftarrow$ $\operatorname*{arg\,max}_{i}(acceptability[i])$

##  6 Autonomous Library Test Case

To demonstrate our implementation, we present an uncertain ethical decision
problem and discuss our results under five sets of ethical considerations.

Suppose a student logs onto their University’s autonomous library to revise
for a test the next morning. All the other students started revision a month
ago. As the student constructs various search terms for a recommendation, the
system recognises that all other students have taken out the same book,
implying it is very useful. Should the autonomous library use this data to
recommend the book, allowing the student to revise quicker on the night before
the test? If other students find out, they may feel unfairly treated; students
who wait for a reference would get the same credit as those who find it
themselves.

We model the scenario as an ethical decision problem, $\langle
A,B,S,U,F,I,m\rangle$, with two actions in $A$ mapping to ten branches in $B$,
acting across four state variables in $S$. For action $a_{1}$, to recommend
the book, student data is compromised, the truth of which is represented by
Boolean variable $s_{1}$. Given a recommendation, there is a 0.6 chance the
book is used, represented by $s_{2}$. If they have the book, there is a 0.7
chance they will pass, $s_{3}$, otherwise there is a 0.3 chance they will
pass, $s_{3}$. Finally, there is a 0.05 chance other students will find out
their data was compromised, $s_{4}$. If the system ignores the book, with
action $a_{2}$, there is a 0.3 chance the student will pass 444There is
discourse on whether a decision to act should be judged the the same as a
decision not to act [21]. We consider ignoring the book an action, an act of
discrimination for example, which is assessed the same as the act to
recommend.. Figure 2 is a decision tree labelled with probabilities and branch
notation.

Figure 2: Decision tree of possible events in Autonomous Library problem.
Triangles represent actions and boxes variable assignments, ¬ represents
$False$ assignment.

An argument is generated from each branch’s endpoint, representing positive
retrospection. Using the argument scheme from Section 5, $Argument(b_{1})$ is
the following:

“From the initial state, $I$, where $s_{1}=s_{2}=s_{3}=s_{4}=False$, it was
acceptable to perform the action, $a_{1}$, resulting in consequences with
$s_{1}=s_{2}=s_{3}=True$ and $s_{4}=False$, with probability 0.399.”

The argument claims it was acceptable to recommend the book, resulting in a
data protection violation ($s_{1}$), the student reading the book ($s_{2}$)
and passing the test ($s_{3}$), with the data breach kept a secret
($s_{4}=False$), at a probability of 0.399.

###  6.1 Consequentialism with One Assignment

First we test our implementation considering the ethical theory of
consequentialism. We set $U$ to have one utility class with one utility
assignment,
$\langle passesTest,1,True\rangle$. The only value is the student passing.
Intuitively, the action maximising the probability of passing should be
chosen; hypothetical retrospection agrees. The argumentation graph in Figure 3
shows the retrospection.

Recommend book$b_{1}$$b_{2}$$b_{3}$$b_{4}$$b_{5}$$b_{6}$$b_{7}$$b_{8}$Ignore
book$b_{9}$$b_{10}$ Figure 3: Graph of retrospection between hypothetical
branches of development with only the utility of the student passing in
consideration. Incoming edges on an argument represent negative retrospection
for not selecting the attacking argument’s attack.

Every branch has acceptability, except $b_{10}\in m(a_{2})$ where the student
fails after the system chooses ignore, with 0 utility and 0.3 probability
(‘probably not’ in Kent’s words). This branch has a lower utility than the
four recommend branches where the student passes: $b_{1},b_{2},b_{5},b_{6}\in
m(a_{1})$. They cause $Argument(b_{10})$ to answer Critical Question 1
positively when attacked by these arguments. Since recommend has a greater
utility expectation, or a greater probability of the student passing,
$Argument(b_{10})$ cannot defend itself in Critical Question 2. Thus, there is
no reason to select ignore; from the perspective of $b_{10}$’s endpoint there
is negative retrospection. There are no other attacks. Therefore by
hypothetical retrospection action $a_{1}$, recommend, should be selected.

###  6.2 Consequentialism with Two Equal Assignments

Now we consider two utility assignments of the same class: $\langle
passesTest,1,True\rangle$ and $\langle othersFindOut,-1,True\rangle$. This
invokes the risk of others finding out their data was used, with others
finding out judged as bad as the student passing is good. Retrospection is
shown in Figure 4.

Recommend book$b_{1}$$b_{2}$$b_{3}$$b_{4}$$b_{5}$$b_{6}$$b_{7}$$b_{8}$Ignore
book$b_{9}$$b_{10}$

Figure 4: Graph of retrospection between hypothetical branches of development
with the cost of others finding out data was compromised equaling the utility
of the student passing.

Again, only branch $b_{10}\in m(a_{2})$ has negative retrospection, after the
action to ignore and the student failing. However, only two of recommend’s
branches have greater utility, $b_{1},b_{5}\in m(a_{1})$. Action recommend has
a greater utility expectation, so ignore cannot be defended. Therefore,
recommend is selected.

###  6.3 Consequentialism with Unequal Assignments

The utility of students discovering the data compromise can be lowered such
that recommend’s expected utility is lower than ignore’s, for example with the
assignment $\langle othersFindOut,-5,True\rangle$. Now, attacks fire the other
way, displayed in Figure 5. When recommend is chosen and other students find
out, as in $b_{2},b_{4},b_{6},b_{8}\in m(a_{1})$, the utility is lower than
ignore’s branches. There is no defence since ignore has a greater utility
expectation. Recommend can lead to the highest utility branches with $b_{1}$
and $b_{5}$, but unlike before, $b_{10}$ defends citing its higher utility
expectation. Thus, ignore is selected with full acceptability.

Recommend book$b_{1}$$b_{2}$$b_{3}$$b_{4}$$b_{5}$$b_{6}$$b_{7}$$b_{8}$Ignore
book$b_{9}$$b_{10}$

Figure 5: Graph of retrospection between hypothetical branches of development
with the cost of others finding data was compromised outweighing the utility
of passing.

Deciding utilities is difficult without further details, i.e. the student’s
grades, data preferences, etc. Ideally, branches would be developed until
enough morally relevant information is described, but this is not always
computationally viable. Even so, exact utilities are subjective. We confront
this issue with utility classes. Supposing $othersFindOut$ has utility
immeasurably lower than $passesTest$, we form two classes. The first has
assignment $\langle othersFindOut,-1,True\rangle$; the second has $\langle
passesTest,1,True\rangle$. The resulting retrospection is the same as in
Figure 5, with the cost of others’ knowledge outweighing the benefits of
passing.

###  6.4 Deontology with Consequentialism

Finally we consider a deontological theory against the misuse of others’ data.
This could be the UK Law, requiring under the Data Protection Act that
personal data is to only be used for specified, explicit purposes [1].
Otherwise, there could be a violation of the Doctrine of Double Effect, having
four conditions [30]: 1. that the action in itself from its very object be
good or at least indifferent; 2. that the good effect and not the evil effect
be intended; 3. that the good effect be not produced by means of the evil
effect; 4. that there be a proportionately grave reason for permitting the
evil effect. If we consider non-consensual use of students’ data as bad and
helping a student to pass the exam to be good, then the fact that the bad
effect is required in order to bring about the good effect breaks the third
condition above, and, therefore, is not permissible. We build on our first
test in Figure 3 which selected recommend with utility assignment $\langle
passesTest,1,True\rangle$. Adding forbidden state $\langle
dataProtectionViolation,True\rangle$ to $F$ results in the retrospection shown
by Figure 6. Every argument from ignore attacks every argument from recommend
since ignore avoids violating the law.

Recommend book$b_{1}$$b_{2}$$b_{3}$$b_{4}$$b_{5}$$b_{6}$$b_{7}$$b_{8}$Ignore
book$b_{9}$$b_{10}$

Figure 6: Graph of retrospection between potential branches of development
with one consequentialist assignment and one deontological law.
Consequentialist attacks are dashed blue; deontological attacks are solid
black.

Under utilitarianism, recommend is still chosen with the same attacks on
$Argument(b_{10})$ as before. This conflict represents a moral dilemma, where
no choice is normatively inferior to another [23]. The aim is to maximise
acceptability amongst the most probable branches. Since all arguments from
recommend are attacked, there is 0 acceptability; one argument from ignore is
attacked with 0.7 probability meaning ignore is selected with a maximal
acceptability of 0.3.

##  7 Discussion

Our goal here is to extend the typical approach to machine ethics, which is
the assessment of a single action from the perspective of a single ethical
theory, often without any account of probability or uncertainty. We have
formalised Hansson’s hypothetical retrospection procedure, systematising moral
assessments as comparisons between consequences. This forms richer judgements
beyond the evaluation of utilities. Furthermore, our moral assessments are
comparisons between retrospective justifications of hypothetical consequences.
One might ask how this differs from directly analysing the properties of
consequences? For machines, it gives a procedure for selecting actions and
providing justifications. For humans, it offers a resonance that allows us to
make clearer judgements [23]. It also allows us, in the future, to build on
existing work for evaluating actions from the perspective of individual
ethical theories and combining those judgements into arguments. Essentially
our proposal extends, rather than replaces, existing mechanisms for evaluating
actions against a single ethical theory.

The retrospective procedure formalised by the critical questions resembles
real life discussion: a claim against an argument and a chance to refute. Say
someone takes action $a_{2}$ in preference to $a_{1}$ and a principle is
broken. Following retrospective argumentation through the critical questions a
dialogue similar to the following takes place:

  1. 1.

You should have chosen $a_{1}$ because it didn’t break this moral principle.

  2. 2.

No, because there is a greater probability of breaking some other principle
with $a_{1}$. If I was given the decision again, I would make the same choice

Real life discussion may not be so civil, but if facts were agreed upon, this
is the logical dialogue. Resonance with real life has utility for agent
transparency and explainability, important for ethical AI [10] and stakeholder
buy-in.

Our implementation could be adapted into a module on top of an existing
autonomous system, possibly similar to Arkin’s governor architecture [6]. The
implementation is also theory-neutral, allowing multiple principles and
theories to be considered at once, more analogous to human decision-making.
Implementational work remains, not least the integration into a planning
system to generate branches, but also evaluation against a wider range of
ethical theories (e.g. Virtue Ethics) to see how easily they answer the
critical questions. We also wish to develop the evaluation of action’s
consequences along branches, not just at the branches end – for instance, if
someone is made unhappy as a consequence of some action, but then we
compensate them by the end of the branch, can we ignore that we caused them
(albeit temporary) unhappiness?

Our current implementation has a fairly simple approach to the integration of
ethical theories. Some theories are directly incompatible, potentially leading
to “worst of both worlds” solutions. Additionally, the use of utility classes
needs careful handling. When utilities are of a greater class, they are
prioritised, no matter how remote their probabilities. Extending the Coin-
Apple scenario, suppose an agent is offered a free apple every day – as
opposed to some number of apples all at once, or suppose the chance of winning
the Hawaii holiday is extremely low, or both. The justification for
sacrificing a lifetime supply of apples for a small chance of a holiday is
considerably weaker than sacrificing one apple for a 50/50 chance of a
holiday. Expected utility clearly has a part to play, even if the calculation
of such utilities is non-trivial. The difficultly in estimating utilities, and
the fact that utilities may depend upon unknown factors such as a person’s
financial situation, mean there is uncertainty in the evaluation of state
utilities which our framework currently does not address.

There will be some computational complexity in searching and representing
actions’ potential branches of future development. In Section 4, we note
Hansson’s principles for optimising search but it remains to be seen if this
can be practically implemented to keep planning tractable for common problems.

Nevertheless we believe the hypothetical retrospection framework practically
handles many of the issues in machine ethics – particularly the handling of
uncertainty and the lack of any real agreement on the best moral theory.

## Acknowledgements

We would like to thank the University of Manchester for funding and EPSRC,
under project Computational Agent Responsibility (EP/W01081X/1).

## Open Data Statement

This work is licensed under a Creative Commons Attribution 4.0 International
License. The tools/examples shown in this paper and instructions on
reproducibility are openly available on GitHub at:
https://github.com/sameysimon/HypotheticalRetrospectionMachine

## References

  * [1] Data protection. Ministry of Justice, https://www.gov.uk/data-protection
  * [2] Alexander, L., Moore, M.: Deontological Ethics. In: Zalta, E.N. (ed.) The Stanford Encyclopedia of Philosophy. Metaphysics Research Lab, Stanford University, Winter 2021 edn. (2021)
  * [3] Alhaddad, M.M.: Artificial intelligence in banking industry: A review on fraud detection, credit management, and document processing. ResearchBerg Review of Science and Technology 2(3), 25–46 (2018)
  * [4] Allen, C., Smit, I., Wallach, W.: Artificial morality: Top-down, bottom-up, and hybrid approaches. Ethics and information technology 7(3), 149–155 (2005)
  * [5] Altham, J.E.: Ethics of risk. In: Proceedings of the Aristotelian Society. vol. 84, pp. 15–29. JSTOR (1983)
  * [6] Arkin, R.C.: Governing lethal behavior: Embedding ethics in a hybrid deliberative/reactive robot architecture. In: Proceedings of the 3rd ACM/IEEE international conference on Human robot interaction. pp. 121–128 (2008)
  * [7] Ashford, E., Mulgan, T.: Contractualism. In: Zalta, E.N. (ed.) The Stanford Encyclopedia of Philosophy. Metaphysics Research Lab, Stanford University, Summer 2018 edn. (2018)
  * [8] Atkinson, K., Bench-Capon, T.: States, goals and values: Revisiting practical reasoning. Argument and Computation 7(2-3), 135–154 (2016). https://doi.org/10.3233/aac-160011
  * [9] Atkinson, K., Bench-Capon, T., McBurney, P.: Justifying practical reasoning. In: Proceedings of the fourth international workshop on computational models of natural argument (CMNA 2004). pp. 87–90 (2004)
  * [10] Balasubramaniam, N., Kauppinen, M., Hiekkanen, K., Kujala, S.: Transparency and explainability of ai systems: ethical guidelines in practice. In: Requirements Engineering: Foundation for Software Quality: 28th International Working Conference (REFSQ). pp. 3–18. Springer (2022)
  * [11] Bertsekas, D.P., Tsitsiklis, J.N.: An analysis of stochastic shortest path problems. Mathematics of Operations Research 16(3), 580–595 (1991)
  * [12] Białek, M., Neys, W.D.: Dual processes and moral conflict: Evidence for deontological reasoners’ intuitive utilitarian sensitivity. Judgment and Decision Making 12(2), 148–167 (2017)
  * [13] Brundage, M.: Limitations and risks of machine ethics. Journal of Experimental & Theoretical Artificial Intelligence 26(3), 355–372 (2014)
  * [14] Cimatti, A., Pistore, M., Roveri, M., Traverso, P.: Weak, strong, and strong cyclic planning via symbolic model checking. Artificial Intelligence 147(1-2), 35–84 (2003)
  * [15] Cloos, C.: The utilibot project: An autonomous mobile robot based on utilitarianism. AAAI Fall Symposium - Technical Report (01 2005)
  * [16] Cointe, N., Bonnet, G., Boissier, O.: Ethical judgment of agents’ behaviors in multi-agent systems. In: Proceedings of the 2016 International Conference on Autonomous Agents and Multiagent Systems. p. 1106–1114. AAMAS ’16, International Foundation for Autonomous Agents and Multiagent Systems, Richland, SC (2016)
  * [17] Davis, M.H.: Markov models and optimization. Routledge (2018)
  * [18] Dennis, L., Fisher, M., Slavkovik, M., Webster, M.: Formal verification of ethical choices in autonomous systems. Robotics and Autonomous Systems 77, 1–14 (2016)
  * [19] Dung, P.M.: On the acceptability of arguments and its fundamental role in nonmonotonic reasoning, logic programming and n-person games. Artificial intelligence 77(2), 321–357 (1995)
  * [20] Ecoffet, A., Lehman, J.: Reinforcement learning under moral uncertainty. In: Meila, M., Zhang, T. (eds.) Proceedings of the 38th International Conference on Machine Learning. Proceedings of Machine Learning Research, vol. 139, pp. 2926–2936. PMLR (18–24 Jul 2021), https://proceedings.mlr.press/v139/ecoffet21a.html
  * [21] Foot, P.: The problem of abortion and the doctrine of the double effect. Oxford Review 5, 5–15 (1967)
  * [22] Hansen, E.A., Zilberstein, S.: Lao${}^{\mbox{*}}$: A heuristic search algorithm that finds solutions with loops. Artificial Intelligence 129(1-2), 35–62 (2001)
  * [23] Hansson, S.: The ethics of risk: Ethical analysis in an uncertain world. Springer (2013)
  * [24] Hursthouse, R., Pettigrove, G.: Virtue Ethics. In: Zalta, E.N., Nodelman, U. (eds.) The Stanford Encyclopedia of Philosophy. Metaphysics Research Lab, Stanford University, Winter 2022 edn. (2022)
  * [25] Karim, A., Azam, S., Shanmugam, B., Kannoorpatti, K., Alazab, M.: A comprehensive survey for intelligent spam email detection. IEEE Access 7, 168261–168295 (2019). https://doi.org/10.1109/ACCESS.2019.2954791
  * [26] Kent, S.: Words of estimative probability. Studies in intelligence 8(4), 49–65 (1964)
  * [27] Killough, R., Bauters, K., McAreavey, K., Liu, W., Hong, J.: Risk-aware planning in bdi agents. In: International Conference on Agents and Artificial Intelligence. vol. 2, pp. 322–329. SciTePress (2016)
  * [28] Lindner, F., Bentzen, M.M., Nebel, B.: The hera approach to morally competent robots. In: 2017 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS). pp. 6991–6997. IEEE (2017)
  * [29] Ma, Y., Wang, Z., Yang, H., Yang, L.: Artificial intelligence applications in the development of autonomous vehicles: a survey. IEEE/CAA Journal of Automatica Sinica 7(2), 315–329 (2020). https://doi.org/10.1109/JAS.2020.1003021
  * [30] Mangan, J.T.: An historical analysis of the principle of double effect. Theological Studies 10(1), 41–61 (1949)
  * [31] Moor, J.H.: The Nature, Importance, and Difficulty of Machine Ethics, p. 13–20. Cambridge University Press (2011)
  * [32] Mosdell, M.: Act-Consequentialism. Encyclopedia of Global Justice, Springer Netherlands pp. 2–2 (2011)
  * [33] Saffiotti, A.: An ai view of the treatment of uncertainty. The Knowledge Engineering Review 2(2), 75–97 (1987)
  * [34] Sanner, S., et al.: Relational dynamic influence diagram language (rddl): Language description. Unpublished ms. Australian National University 32, 27 (2010)
  * [35] Sholla, S., Mir, R.N., Chishti, M.A.: A fuzzy logic-based method for incorporating ethics in the internet of things. International Journal of Ambient Computing and Intelligence (IJACI) 12(3), 98–122 (2021)
  * [36] Stephenson, T.A.: An introduction to bayesian network theory and usage. Tech. rep., Idiap (2000)
  * [37] Szabadföldi, I.: Artificial intelligence in military application–opportunities and challenges. Land Forces Academy Review 26(2), 157–165 (2021)
  * [38] Tolmeijer, S., Kneer, M., Sarasua, C., Christen, M., Bernstein, A.: Implementations in machine ethics: A survey. ACM Computing Surveys (CSUR) 53(6), 1–38 (2020)
  * [39] Younes, H.L.S., Littman, M.L.: Ppddl1.0: An extension to pddl for expressing planning domains with probabilistic effects. In: Technical Report –Carnegie Mellon University (2004)
  * [40] Yu, K.H., Beam, A.L., Kohane, I.S.: Artificial intelligence in healthcare. Nature biomedical engineering 2(10), 719–731 (2018)


# DETECTA 2.0: RESEARCH INTO NON-INTRUSIVE METHODOLOGIES SUPPORTED BY INDUSTRY
4.0 ENABLING TECHNOLOGIES FOR PREDICTIVE AND CYBER-SECURE MAINTENANCE IN
INDUSTRIAL SMES ††thanks: Project funded by: Spanish Ministry of Industry,
Trade and Tourism through the line of aid to Innovative Business Groupings, in
its 2023 call for applications.

Álvaro Huertas-García
Funditec
Madrid, Spain
<EMAIL_ADDRESS>
Javier Muñoz
Funditec
Madrid, Spain
<EMAIL_ADDRESS>
Enrique De Miguel Ambite
Funditec
Madrid, Spain
<EMAIL_ADDRESS>
Marcos Avilés Camarmas
Elliot Cloud
Logroño, Spain
<EMAIL_ADDRESS>
José Félix Ovejero
Industrias Maxi
Valladolid, Spain
<EMAIL_ADDRESS>
Use footnote for providing further information about author (webpage,
alternative address)— _not_ for acknowledging funding agencies.

###### Abstract

The integration of predictive maintenance and cybersecurity represents a
transformative advancement for small and medium-sized enterprises (SMEs)
operating within the Industry 4.0 paradigm. Despite their economic importance,
SMEs often face significant challenges in adopting advanced technologies due
to resource constraints and knowledge gaps. The DETECTA 2.0 project addresses
these hurdles by developing an innovative system that harmonizes real-time
anomaly detection, sophisticated analytics, and predictive forecasting
capabilities.

The system employs a semi-supervised methodology, combining unsupervised
anomaly detection with supervised learning techniques. This approach enables
more agile and cost-effective development of AI detection systems,
significantly reducing the time required for manual case review.

At the core lies a Digital Twin interface, providing intuitive real-time
visualizations of machine states and detected anomalies. Leveraging cutting-
edge AI engines, the system intelligently categorizes anomalies based on
observed patterns, differentiating between technical errors and potential
cybersecurity incidents. This discernment is fortified by detailed analytics,
including certainty levels that enhance alert reliability and minimize false
positives.

The predictive engine uses advanced time series algorithms like N-HiTS to
forecast future machine utilization trends. This proactive approach optimizes
maintenance planning, enhances cybersecurity measures, and minimizes unplanned
downtimes despite variable production processes.

With its modular architecture enabling seamless integration across industrial
setups and low implementation costs, DETECTA 2.0 presents an attractive
solution for SMEs to strengthen their predictive maintenance and cybersecurity
strategies.

00footnotetext: Project funded by: Spanish Ministry of Industry, Trade and
Tourism through the line of aid to Innovative Business Groupings, in its 2023
call for applications.

_K_ eywords Digital Twin $\cdot$ Machine Learning $\cdot$ Cybersecurity
$\cdot$ Predictive Maintenance $\cdot$ Industry 4.0 $\cdot$ SME

##  1 Introduction

In the context of Industry 4.0, the integration of predictive maintenance
(PdM) and cybersecurity for small and medium enterprises (SMEs) represents a
crucial advancement towards more reliable and secure operations, since SMEs
play an important role in the economy of societies. This integration leverages
cutting-edge technologies and methodologies to enhance operational efficiency
and safeguard against cyber threats.

Industry 4.0 has transformed predictive maintenance by employing cyber-
physical systems (CPS) and the Internet of Things (IoT). These technologies
facilitate real-time monitoring and diagnostics, enabling SMEs to preemptively
address potential failures and reduce downtime. The use of machine learning
models for fault diagnosis further enhances the accuracy and reliability of
predictive maintenance systems [1, 2].

The digital nature of Industry 4.0 exposes SMEs to new cyber risks. To address
these, it is vital to integrate robust cybersecurity measures within the
predictive maintenance frameworks. This includes using secure cyber-physical
systems that provide not only operational efficiencies but also ensure the
integrity and confidentiality of industrial data. Advanced algorithms and
cybersecurity protocols are essential to protect against data breaches and
cyber attacks [3].

The DETECTA project, in its second phase, aims to deepen and expand the
horizons of Industry 4.0, introducing innovative and non-intrusive
methodologies that capitalise on the potential of advanced digital
technologies for predictive maintenance and cybersecurity. In an industrial
world rapidly moving towards greater connectivity and digitalization,
especially in the post-pandemic context, the need to keep production systems
not only efficient and productive but also safe and resilient has become
imperative.

Funditec, as a central pillar of this endeavour, has positioned itself at the
forefront of sustainable technological development. In the course of DETECTA
PHASE 1, the foundations of knowledge were laid to successfully address the
challenges inherent to anomaly detection and cybersecurity in industrial
environments. Through a collaborative approach bringing together clusters,
SMEs, and technology centres, significant innovations have been generated that
not only encompass the implementation of the Digital Twin and artificial
intelligence for predictive maintenance but also better management of
cybersecurity in the value chain.

Figure 1: Visualization of system architecture for PdM and cybersecure SMEs in
Industry 4.0

##  2 Preliminary Analysis: Predictive Maintenance and Cybersecurity in SMEs

This section outlines the applications of predictive maintenance and
cybersecurity in small and medium-sized enterprises (SMEs) in the automotive
industry, based on literature, state-of-the-art reviews, and preliminary
analyses conducted during DETECTA Phase II across 15 SMEs. This preliminary
analysis is done thanks to the survey conducted by the partners from AEI de
Ciberseguridad y Tecnologías Avanzadas111https://www.aeiciberseguridad.es/ and
automotive cluster FACYL222https://www.facyl.es/.

###  2.1 Predictive Maintenance (PdM)

Predictive maintenance (PdM) is becoming increasingly vital for small- and
medium-sized enterprises (SMEs) aiming to optimize their industrial
operations. PdM leverages continuous monitoring and historical data analysis
to forecast potential equipment failures before they occur. This foresight is
particularly critical for SMEs where unplanned downtime can severely affect
operational efficiency and business reputation [4]. The ability to anticipate
and mitigate these disruptions enhances productivity and reduces maintenance
costs by addressing problems proactively. Research, including [5], highlights
the significant efficiencies PdM introduces in manufacturing processes by
minimizing operational interruptions.

Implementing PdM depends on data gathered from sensors embedded within the
machinery. These sensors track various operational parameters, offering
instant insights into the condition and performance of the equipment. The
previous DETECTA project’s Phase I [6] illustrates how SMEs, through AI and
advanced analytics integration, can expediently process and analyze large
volumes of sensor data to inform decision-making processes.

Despite these advantages, SMEs face substantial challenges in adopting
predictive maintenance technologies. Issues such as limited access to
necessary technologies, data scarcity, and a lack of expertise can impede
effective implementation [7].

####  2.1.1 PdM Practices in SMEs

The DETECTA project conducted a market and business survey to assess the
current state of technology implementation among SMEs, revealing varied data
integration and analysis levels. Although most firms now capture real-time
data, particularly those with production processes, the study found that a
significant proportion of data still needs to be analyzed due to resource
constraints. Specifically, 67% of companies do not analyze data in real-time,
and 40% typically analyze data post-incident, which undermines the proactive
nature of PdM.

Real-time data availability statistics show that only 20% of companies have
comprehensive real-time data across their production processes, while 40% have
partial data, and 27% lack real-time data altogether. Data collection methods
vary, with 20% of enterprises using company-placed sensors, 33% utilizing
machine-integrated sensors, and the remaining using manual digital or paper-
based methods.

These findings indicate a significant gap between data collection and
analysis, underscoring the challenges SMEs face in transitioning to data-
driven maintenance strategies. Without adequate analysis, predictive
maintenance’s potential to transform operations and reduce downtime remains
largely unexplored.

###  2.2 Digital Twin and Cybersecurity

####  2.2.1 Digital Twin Technology in Smart Manufacturing

Digital Twin technology has emerged as a pivotal element in smart
manufacturing, providing dynamic and consistent virtual models of physical
entities. These models simulate the characteristics, behavior, life, and
performance of their physical counterparts with high fidelity, allowing for
real-time operation and prediction. A significant study by the ARC Advisory
Group revealed that utilizing digital twins for predictive maintenance can
reduce equipment breakdowns by up to 70% and decrease maintenance costs by
approximately 25% [8].

Recent literature emphasizes the growing application of digital twins in
industrial settings for predictive maintenance. These models adapt to changes
in the environment and operations, enhancing the accuracy and timeliness of
predictions [9]. Furthermore, the integration of digital twins with
cybersecurity frameworks for industrial control systems has proven beneficial
in improving intrusion detection and enabling real-time responses [10].

However, digital twins face challenges such as high energy demands and
security vulnerabilities in cyber-physical systems. Efforts to enhance the
energy efficiency and security features of digital twins are crucial [11].
Moreover, combining artificial intelligence with digital twins has been shown
to improve maintenance planning and system reliability significantly [12].
Systematic reviews advocate for the development of advanced digital twin
models to overcome computational and data-related challenges [13].

####  2.2.2 Cybersecurity Challenges and Measures

The adoption of digital twin technology introduces specific cybersecurity
risks, particularly the threat of cyber-attacks on the virtual representations
of physical assets. Effective security measures are essential to safeguard the
digital twin and its generated data, thereby preventing unauthorized access
and data breaches that could adversely affect the physical systems. These
measures include implementing robust access controls, encrypting data, and
continuous threat monitoring.

Data quality remains a paramount challenge in maintaining the integrity of
digital twins. Ensuring the accuracy, reliability, and consistency of the data
used to create and update these models is critical for their effectiveness.

####  2.2.3 Cybersecurity Practices in SMEs

The DETECTA project’s preliminary analysis survey provides quantitative
insights into the adoption of technologies like digital twins and predictive
maintenance among SMEs. The survey indicates that while many SMEs are
integrating new technologies, they encounter significant obstacles related to
costs, expertise, and time constraints. Cybersecurity is a crucial concern,
with considerable investments in training and risk management. However,
vulnerabilities in supply chain security remain an issue. Survey results show
varying levels of employee cybersecurity training within SMEs, 27% rate their
training as very high, 46% as high, 20% as medium, 7% as low.

The importance of early anomaly detection is also highlighted, with 60% of
companies considering it critical to distinguish between technical faults and
cyberattacks early on. Furthermore, 60% of surveyed companies have
comprehensive risk analyses and proactive protocols covering all employees,
but less than half manage cybersecurity actively within their supply chain.

DETECTA project is situated at the vertex of the cutting edge technologies
demand aligning with modern frameworks propose the integration of predictive
maintenance and cybersecurity into a unified system that encompasses data
analytics, machine learning, and IoT. This approach not only predicts
equipment failures but also anticipates potential cyber threats, ensuring a
comprehensive defense mechanism for industrial operations [14].

Figure 2: Digital Twin graphical interface created using the open-source
software Grafana.

###  2.3 Research Questions and Contributions

Following a thorough literature review and preliminary analysis of the current
state of Industry 4.0, the DETECTA Phase 2 project builds upon the insights
and innovations uncovered in DETECTA Phase 1 [6].

The project aims to refine and expand the methodologies and technological
tools that enhance the efficiency, safety, and resilience of industrial
processes. The project focuses on advanced sensing and monitoring, detailed
analysis, and the accurate detection and prediction of production anomalies.
The objectives are pursued through the integration of advanced Industry 4.0
technologies, such as big data analytics, machine learning, and deep learning
within the IoT domain, with a special focus on strengthening cybersecurity and
trust.

DETECTA Phase 2 demonstrates the practical implementation of these
methodologies through a case study involving a predictive maintenance solution
combined with digital twin technology on a milling machine used by the
automotive SME Industrias Maxi333https://www.industrias-maxi.es/ in Spain. The
technical research and development undertaken to address the challenges
identified in the preliminary stages of the project are discussed in the
following sections. This discussion provides insights into the practical
implications and benefits of integrating predictive maintenance and digital
twin technologies in industrial settings.

Figure 3: General Schema of the Decision Support and Alert System

##  3 Case of Study: Anomaly Detection in Milling Machine

###  3.1 IoT Data Acquisition: Digital Twin

The Heidenhain iTNC 5301 milling machine, designed for five-axis machining
with computer numerical control (CNC), has been selected for the development
of a digital twin. This machine features extensive sensorization, which is
essential for gathering the real-time data necessary for creating an accurate
digital twin in an industrial setting.

Data from the milling machine is captured in real-time through IoT agents or
connectors utilizing the LSV2 communication protocol. This protocol enables
the connectors to interface seamlessly with the machine, allowing efficient
data access and transmission without the need for detailed knowledge of the
machine’s memory locations or data types. The interaction with the milling
machine is managed using Python and the PyLSV2 library, providing the
flexibility required to handle complex data types and memory positions that
are difficult to manage using the manufacturer’s standard software development
kit (SDK).

The collected data is processed and stored in a PostgreSQL database, ensuring
robust data management. Visualization and monitoring of this data are
facilitated through Grafana, which offers real-time data visualization
capabilities that are well-integrated with PostgreSQL, enhancing the ability
to monitor and analyze data effectively.

As shonw in Figure 2, the digital twin features a virtual interface that
provides real-time monitoring of crucial operational and diagnostic
indicators. This interface enables the visualization of various machining
processes and allows operators to apply filters to assess different machine
states and operations, thereby improving decision-making with enriched data-
driven insights. The digital twin monitors several key parameters, including
machine state (e.g., automatic, off, or interrupted), operation type, tool
characteristics (type, diameter, radius, etc.), axis positioning and movement,
and motor usage percentages for each axis.

The functionality of the digital twin includes temporal filtering to customize
the monitoring period, selection of specific data filters and variables for
targeted analysis, and the capability to display both real-time and historical
data, which is crucial for detecting anomalies and optimizing operations. To
ensure data security and control, the digital twin operates on an On-Premise
server solution within the industrial facility’s local network. This
arrangement minimizes the risk associated with external data transmission and
addresses potential security vulnerabilities effectively.

###  3.2 Data Analysis and Data Mining

In preparation for applying machine learning techniques, an exploratory data
analysis (EDA) is conducted on the dataset acquired from the Digital Twin
system. This initial phase focuses on identifying key variables that could
indicate abnormal behavior in the machine’s operations. Among the variables
considered, over 43 in number, particular attention is given to factors such
as machine state, tool number, position, travel speed, and motor usage for
each axis. These variables are integral to the digital twin interface,
offering foundational insights for further analysis.

To preserve the integrity of the original data signals, the processing is kept
to a minimum. The key steps involved in the data processing phase include:

  * •

Categorization: This step involves converting categorical data into a format
amenable for analysis, utilizing techniques such as one-hot encoding. This
transformation is crucial for preparing the data for subsequent machine
learning applications.

  * •

Normalization and Scaling: Robust scaling techniques are employed to minimize
the influence of outliers. This ensures that the analysis is not skewed by
extreme values, which can distort the results of machine learning models.

  * •

Handling Multicollinearity: To ensure model accuracy and efficiency, a
threshold is set to eliminate variables with high collinearity. This step
helps in reducing redundancy in the dataset, which could otherwise negatively
impact the performance of the predictive models.

  * •

Feature Engineering: The raw data is further refined by deriving additional
features such as usage, intensity, speed, and power. These features are
crafted to enrich the dataset, providing a more comprehensive basis for
detailed analysis.

Beyond the variables displayed on the Digital Twin dashboard, the analysis
incorporates additional parameters to enhance the model’s diagnostic
capabilities. Variables such as utilization, intensity, speed, and power for
the axes X, Y, and Z are included. These additional metrics offer deeper
insights into the operational state of the machine, enabling more precise
anomaly detection and analysis.

(a) Confusion Matrix of the Decision Tree model selected in the evaluation
with unseen data in the detection of anomalies in the predictive maintenance
of the milling machine.

(b) Global SHAP values for the Decision Tree model.

Figure 4: Visual analysis of the Decision Tree model using confusion matrix
and SHAP values

###  3.3 Predictive Maintenance (PdM): Detection and Prediction

Once the data analysis and preparation pipeline is prepared, we proceed with
the predictive maintenance framework for machine fault and cyber incident
detection. This framework is developed through the detection of anomalies (see
Figure 1) and the forecasting of the consumption tendency of the milling
machine.

####  3.3.1 Fault Detection through AI-Powered Anomaly Detection

Following the data analysis and preparation to maintain signal integrity and
enhance analytical effectiveness, an AI-powered anomaly detection engine has
been developed to bolster predictive maintenance strategies. This engine
employs a semi-supervised approach, combining unsupervised and supervised
machine learning techniques to detect unusual patterns that may indicate
potential equipment failures [15, 16].

In the initial stage, unsupervised learning methods are utilized to detect new
and unforeseen anomalies by identifying data points that deviate significantly
from normal patterns. These models include cluster-based models (e.g.,
Isolation Forest [17]), neighbor/distance methods (e.g., Local Outlier Factor
[18]), projection methods (e.g., PCA [19]), and statistically adjusted methods
(e.g., Minimum Covariance Determinant [20]). Identified potential anomalies
are then automatically labeled by propagating the labels using predefined
criteria, creating a dataset that trains supervised learning models to
recognize similar anomalies in the future, enhancing the predictive
maintenance capabilities.

The anomaly detection models are continuously refined and optimized based on
incoming data and feedback loops involving human experts who validate and
label anomalies. This iterative process, incorporating continuous feedback
from operational data and human experts, helps in adapting the predictive
maintenance strategies to evolving conditions and improving the accuracy of
fault predictions. The AI engine in Phase 2 was capable of identifying several
types of operational anomalies critical for predictive maintenance, including
a "novelty" category for anomalies that are emergent patterns not previously
categorized but detected through the system’s enhanced learning capabilities,
providing adaptability and continuous learning capabilities to the system.

Once potential anomalies are labeled (manually or automatically), a dataset is
created to train supervised learning models to recognize similar anomalies in
the future, enhancing the predictive maintenance capabilities. Techniques like
hyperparameter optimization using tools like Optuna are employed to improve
model accuracy and reduce false positives and negatives.

Various machine learning models were explored for anomaly detection, including
linear models (e.g., Logistic Regression), non-linear models (e.g., SVM, QDA),
ensemble models (Random Forest Decision Trees), and boosting models (e.g.,
LightGBM, XGBoost), as well as deep learning models with a particular focus on
the performance of the Multilayer Perceptron (MLP). Energy consumption and
considerations for Green AI were also taken into account for model selection.
Specific metrics such as precision, recall, F1-score, and Matthews correlation
coefficient (MCC) were used to evaluate the effectiveness of the fault
detection models. The best trade-off model, considering all dimensions of
performance and sustainability, was a Decision Tree with 100 single trees and
a maximum depth of 12. The performance scores on the unseen test data were
0.96, 0.91 and 0.92 for the F1-macro, Kappa and MCC (see Figure 4(a)).

The AI engine was capable of identifying several types of operational
anomalies critical for predictive maintenance, including high constant
utilization anomalies, elevated utilization with high Z-axis positioning,
simultaneous high-speed movements across multiple axes, prolonged and atypical
durations in the "Off" state, and "novelty" anomalies which are emergent
patterns not previously categorized.

The overall system evaluation demonstrated superiority in terms of linear
scalability, reliability as the probability of fault detection is also
reported, and maintenance prediction accuracy, reducing the false positive
ratio from 40% in Phase I to 10% in Phase II. These improvements were
supported by enhanced data visualization tools and more robust AI models that
could handle larger and more complex datasets.

Figure 5: Consumption Forecasting of NHiTS model

###  3.4 Consumption Forecasting

(a) Global vision panel of anomalies detected, with timestamp, type of anomaly
and certainty in the Digital Twin

(b) Unusual detected pattern of mechanical failure or cyber incident.

Figure 6: Schematic of the Predictive Maintenance methodology overview.

In the era of Industry 4.0, machine data collection and analysis play a
pivotal role in optimizing manufacturing processes [21, 22]. The DETECTA 2.0
project applies advanced time series algorithms to predict the utilization of
a milling machine, particularly addressing the challenges posed by its
variable production process.

Given the unique nature of each part machined, the production process
introduces high variability and noise into the data [21]. This variability in
demand means that each part may require different amounts of machine time,
complicating the identification of stable patterns. The lack of periodicity,
with no evident seasonal or cyclical patterns, further complicates accurate
forecasting. Additionally, the machine’s utilization depends on external
factors such as material supply, machine maintenance, and staff availability,
all of which can vary significantly over time.

To tackle these challenges, the N-HiTS (N-Hierarchical Interpolation-based
Time Series Forecasting) model is employed [23]. This model is designed to
handle multiple time horizons and capture various temporalities in the data,
making it suitable for complex, non-stationary time series.

The N-HiTS model operates through hierarchical decomposition, where the time
series is broken down into components at different levels of temporal
granularity. This means analyzing data across various time scales (e.g.,
seconds, minutes, hours) to understand how patterns at one level influence
patterns at another. The model uses deep learning-based interpolation,
employing neural networks specifically designed to manage these hierarchical
decompositions, to learn and predict future values of the time series. This
method allows the model to capture seasonal and trend patterns effectively.

A key feature of the N-HiTS model is its ability to perform multi-horizon
forecasting, which involves making predictions for multiple future time points
simultaneously. This is particularly useful for planning and analysis in
scenarios where decisions depend on projections over short, medium, and long
terms. The modular and flexible design of N-HiTS allows it to be adapted for
different types of time series and specific forecasting requirements.

Optuna [24], a hyperparameter optimization library, is used to fine-tune the
model. It automates the search for the best combination of hyperparameters,
using advanced search algorithms to improve model performance efficiently.

A predictive window of 100 points, each 15 seconds apart, is chosen to make
predictions about the machine’s utilization 25 minutes into the future. The
model achieves a Mean Absolute Error (MAE) of 1.07, indicating that, on
average, the predictions deviate from actual values by this amount. Given the
variability of the production process, this is considered a good result. Test
results show that the model effectively captures the general trend of the
machine’s utilization, though it struggles with sudden spikes or atypical
changes.

This predictive capability aids in proactive maintenance and production
planning, allowing operators to anticipate future events, optimize workload
management, and improve overall operational efficiency. Despite the inherent
challenges, the application of sophisticated time series techniques and
machine learning provides valuable insights for informed decision-making in
dynamic production environments.

Figure 7: Matrix linking types of incidents and faults to possible causes

###  3.5 Decision Support and Alert System

As shown in Figure 3, the fault detection and forecasting from the AI models
are embedded into the digital twin to create the Decision Support and Alert
System in DETECTA 2.0. The system leverages real-time anomaly detection and
advanced analytics to provide comprehensive monitoring and proactive
maintenance for industrial SMEs.

Anomalies are displayed in real-time using a digital twin interface, as
depicted in Figure 6. This interface visualizes key performance parameters and
detected anomalies, enhancing situational awareness and enabling prompt
responses to potential issues by providing operators with an intuitive view of
machine states and alerts.

The AI engines categorize anomalies based on observed patterns, distinguishing
between technical errors and cyberattacks. The system identifies various
operational anomalies such as prolonged OFF states, unusual usage patterns,
and parameter fluctuations that may indicate cybersecurity incidents (see
Figure 6(b)). This categorization helps operators understand and respond
appropriately to different anomalies, where Figure 7 shows the matrix of fault
detection and possible causes, whether mechanical, human, or cyber threat..

Additionally, the system offers detailed analytics, including the confidence
level and the number of AI models corroborating each detection. By measuring
the certainty of detections, the system enhances the reliability of alerts,
reducing false positives and ensuring timely interventions.

Beyond reactive detection, the system includes a predictive engine that
forecasts future utilization trends based on historical and real-time data.
This predictive capability aids in proactive maintenance and cybersecurity
measures, preparing for potential future anomalies and optimizing machine
performance. The integration of predictive analytics ensures effective
maintenance planning, minimizing unexpected downtimes and enhancing
operational efficiency. The system continuously adapts and refines its
algorithms to stay ahead of emerging threats, ensuring robust protection and
operational resilience.

##  4 Conclusion

The DETECTA 2.0 project has demonstrated significant advancements in
integrating predictive maintenance and cybersecurity for industrial SMEs. By
leveraging real-time anomaly detection, advanced analytics, and predictive
forecasting, the system offers comprehensive monitoring and proactive
maintenance capabilities that enhance operational efficiency and resilience.

The Decision Support and Alert System, embedded within a digital twin
interface, gives operators real-time visualizations of machine states and
anomalies. This interface, built using Grafana, ensures intuitive situational
awareness and enables prompt responses to potential issues. The AI engines’
ability to categorize anomalies based on observed patterns and provide
detailed analytics, including confidence levels, enhances the reliability of
alerts and reduces the likelihood of false positives. The system’s predictive
engine, which forecasts future utilization trends based on historical and
real-time data, is crucial in proactive maintenance and cybersecurity
measures. This capability helps prepare for potential future anomalies,
optimize machine performance, and minimize unexpected downtimes. Despite the
inherent challenges posed by the variable production process, the use of the
N-HiTS model for consumption forecasting has proven effective in capturing
general trends and aiding in informed decision-making. Moreover, the system is
highly adaptable to various equipment and industrial environments. Its modular
design ensures it can be easily integrated into existing infrastructure
without complex setups. This adaptability and low implementation costs make it
an ideal solution for SMEs looking to enhance their maintenance and
cybersecurity capabilities in the rapidly evolving technological landscape.

Integrating comprehensive monitoring tools and AI-driven analytics also
enhances the early detection and response to potential cyberattacks,
minimizing their impact on industrial operations. The system’s continuous
adaptation and refinement of detection algorithms ensure robust protection and
operational resilience against emerging threats.

Overall, DETECTA 2.0 exemplifies the successful application of advanced
digital technologies in predictive maintenance and cybersecurity, providing a
scalable, adaptable, and efficient solution for industrial SMEs. The project’s
outcomes highlight the importance of integrating cutting-edge AI and machine
learning techniques with real-time data processing to enhance operational
efficiency, reliability, and security in industrial environments.

## Acknowledgments

This work was supported by the Spanish Ministry of Industry, Trade and Tourism
through the line of aid to Innovative Business Groupings, in its 2023 call for
applications under grant AEI-010500-2023-220. The authors would also like to
acknowledge the valuable contributions of AEI de Ciberseguridad y Tecnologías
Avanzadas and the automotive cluster FACYL in conducting the preliminary
analysis and surveys across 15 SMEs during DETECTA Phase II. The DETECTA Phase
2.0 project was developed in collaboration with the SME Industrias Maxi,
providing the industrial use case and facilitating the implementation of the
predictive maintenance solution on their milling machine.

## References

  * [1] Universal cyber physical system, a prototype for predictive maintenance, 2022.
  * [2] Vrinda Rastogi, Sahima Srivastava, Manasi Mishra, and Rachit Thukral.  Predictive maintenance for sme in industry 4.0.  In 2020 Global Smart Industry Conference (GloSIC), pages 382–390, 2020.
  * [3] Koonlachat Meesublak and Tosapol Klinsukont.  A cyber-physical system approach for predictive maintenance.  In 2020 IEEE International Conference on Smart Internet of Things (SmartIoT), pages 337–341, 2020.
  * [4] Tianwen Zhu, Yongyi Ran, Xin Zhou, and Yonggang Wen.  A survey of predictive maintenance: Systems, purposes and approaches, 2024.
  * [5] Anwar Meddaoui, Mustapha Hain, and Adil Hachmoud.  The benefits of predictive maintenance in manufacturing excellence: a case study to establish reliable methods for predicting failures.  The International Journal of Advanced Manufacturing Technology, 128(7-8):3685–3690, October 2023.
  * [6] Alvaro García, Alejandro Echeverría, and José Félix Ovejero.  Detecta: Investigación de metodologías no intrusivas apoyadas en tecnologías habilitadoras 4.0 para abordar un mantenimiento predictivo y ciberseguro en pymes industriales, 2023.
  * [7] Sepideh Hassankhani Dolatabadi and Ivana Budinska.  Systematic Literature Review Predictive Maintenance Solutions for SMEs from the Last Decade.  Machines, 9(9):191, September 2021.
  * [8] Digital Twin Demystified, February 2020.
  * [9] Zheng Liu, Erik Blasch, Min Liao, Chunsheng Yang, Kazuhiko Tsukada, and Norbert Meyendorf.  Digital twin for predictive maintenance.  In Norbert G. Meyendorf, Ripi Singh, and Christopher Niezrecki, editors, NDE 4.0, Predictive Maintenance, Communication, and Energy Systems: The Digital Transformation of NDE, page 6, Long Beach, United States, April 2023. SPIE.
  * [10] Seba Anna Varghese, Alireza Dehlaghi Ghadim, Ali Balador, Zahra Alimadadi, and Panos Papadimitratos.  Digital twin-based intrusion detection for industrial control systems.  In 2022 IEEE International Conference on Pervasive Computing and Communications Workshops and other Affiliated Events (PerCom Workshops), pages 611–617, 2022.
  * [11] Abdullah Aziz, Olov Schelén, and Ulf Bodin.  Digital twin as a proxy for industrial cyber-physical systems.  In Proceedings of the 2023 10th International Conference on Wireless Communication and Sensor Networks, icWCSN ’23, page 85–92, New York, NY, USA, 2023. Association for Computing Machinery.
  * [12] Farah Abdoune, Maroua Nouiri, Pierre Castagna, and Olivier Cardin.  Toward Digital Twin for Cyber Physical Production Systems Maintenance: Observation Framework Based on Artificial Intelligence Techniques.  In Theodor Borangiu, Damien Trentesaux, Paulo Leitão, Olivier Cardin, and Samir Lamouri, editors, Service Oriented, Holonic and Multi-Agent Manufacturing Systems for Industry of the Future, volume 952, pages 123–134. Springer International Publishing, Cham, 2021.
  * [13] Raymon van Dinter, Bedir Tekinerdogan, and Cagatay Catal.  Predictive maintenance using digital twins: A systematic literature review.  Information and Software Technology, 151:107008, 2022.
  * [14] Sharanya S.  A Cyber Physical System Framework for Industrial Predictive Maintenance Using Machine Learning:.  In Balamurugan Easwaran, Kamal Kant Hiran, Sangeetha Krishnan, and Ruchi Doshi, editors, Advances in Computational Intelligence and Robotics, pages 241–269. IGI Global, 2022.
  * [15] Xiangli Yang, Zixing Song, Irwin King, and Zenglin Xu.  A survey on deep semi-supervised learning.  IEEE Transactions on Knowledge and Data Engineering, 35(9):8934–8954, 2023.
  * [16] José Miguel Ramírez-Sanz, Jose-Alberto Maestro-Prieto, Álvar Arnaiz-González, and Andrés Bustillo.  Semi-supervised learning for industrial fault detection and diagnosis: A systemic review.  ISA Transactions, 143:255–270, 2023.
  * [17] Fei Tony Liu, Kai Ming Ting, and Zhi-Hua Zhou.  Isolation forest.  In 2008 Eighth IEEE International Conference on Data Mining, pages 413–422, 2008.
  * [18] Zhangyu Cheng, Chengming Zou, and Jianwei Dong.  Outlier detection using isolation forest and local outlier factor.  In Proceedings of the Conference on Research in Adaptive and Convergent Systems, RACS ’19, page 161–168, New York, NY, USA, 2019. Association for Computing Machinery.
  * [19] Andrzej Maćkiewicz and Waldemar Ratajczak.  Principal components analysis (pca).  Computers & Geosciences, 19(3):303–342, 1993.
  * [20] Mia Hubert and Michiel Debruyne.  Minimum covariance determinant.  WIREs Computational Statistics, 2(1):36–43, January 2010.
  * [21] Ali Roozbeh Nia, Anjali Awasthi, and Nadia Bhuiyan.  Industry 4.0 and demand forecasting of the energy supply chain: A literature review.  Computers & Industrial Engineering, 154:107128, 2021.
  * [22] Abdul Wahid, John G. Breslin, and Muhammad Ali Intizar.  Prediction of Machine Failure in Industry 4.0: A Hybrid CNN-LSTM Framework.  Applied Sciences, 12(9):4221, April 2022.
  * [23] Cristian Challu, Kin G Olivares, Boris N Oreshkin, Federico Garza Ramirez, Max Mergenthaler Canseco, and Artur Dubrawski.  Nhits: Neural hierarchical interpolation for time series forecasting.  In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pages 6989–6997, 2023.
  * [24] Takuya Akiba, Shotaro Sano, Toshihiko Yanase, Takeru Ohta, and Masanori Koyama.  Optuna: A next-generation hyperparameter optimization framework.  In Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining, pages 2623–2631, 2019.