IEEE Computational Intelligence Magazine - February 2022 - 37

and a fully-connected layer. The encoder f(x) maps the input
time series to a fixed-length vector, z. The encoder can be any
block of neural networks that process time series input data. We
employ a 1 D-CNN as the encoder in our study because of its
demonstrated ability to handle time series data [20]. The prototype
layer contains m prototypes, where the number of prototypes
is at least as large as the number of classes,
mC .$ The
goal of the prototype layer is to learn a set of vectors that are
positioned close to the encoded input data. Therefore, the
length of each prototype pi
is equal to the length of the encoded
input z. The prototype layer computes the squared Euclidean
distance between the encoded input z and each prototype,
.
dz p
the final score as (( d /))min
score of one means the prototype pi
ii
=y
Wa ,=
2 << To normalize these values, we then compute
ad
i =- i
2
2
((dd .)( )) A
is identical to the encoded
maxmininput
z, and zero means that they are completely different.
Finally, a fully-connected layer (FC) computes a weighted sum
of these scores
where W is a Cm# weight matrix. A
Softmax layer is then applied to compute the probability distribution
over C classes. The prototypes are not interpretable on
their own because the distance measure between prototypes and
observation is measured in a flexible latent space. The generator
transforms the encoded input z to its corresponding picture ypic
by reshaping the encoded vector z to a nn# matrix and
employing a 2 D-CNN. The advantage of including a generator
is that it can transform the learned prototypes into their pictorial
representations after training.
B. Optimization
PIP's objective is to simultaneously achieve both high accuracy
and high interpretability. To obtain this goal, we jointly minimize
the parameters of all model components using stochastic
gradient descent, similarly to work described by Gee et al. [18]
and Li et al. [19]. Let
Dx yyk
t
= {( ), ,} be a labeled time
T
t=1
pic
series dataset having k dimensions. Throughout the remainder
of the paper we use xt
to denote the set of k values observed at
time t. Here, T is the length of multivariate sequence
x ,{ ,, }yC1 f!
pic
L EM
11
++
=+
mm22
mm
ED MD
RD RD
HH
HH
(, )( ,)
(, )( ,),
(1)
where H represents the set of all trainable model parameters
and {, ,,EM 1mm mm=
cross-entropy loss defined as:
(, )()( )( )
ED
H =+ -=
!
yy yy
loglog
11
(( ), )xy D
(t) T
t
1
and M is the mean squared error of the generator, as follows:
(, )( ).
MD 1
n
H =!
/
((
), )xy D
()t T
t=1 pic
t
yy
picpic
2
and }2m represent the term ratios. E is the
/ tt (2)
is the true label, and yC1! f {, ,} is a
corresponding picture for the true class. The optimization
problem minimizes the following:
We introduce a regularizer, R ,1 that encourages each prototype
to be positioned close to at least one of the training samples.
Additionally, regularizer R2
cluster around one prototype:
ensures that similar inputs
RD
1(, )min pzj=1
H
=
RD
m
1
2(, )min zpi
=1
H = / [, ]
n
1
jm
! 1
/ 1![, ]
n
in
ij
m
ji
2
2
2
2
,
.
(4)
(5)
PIP learns the weights for the individual loss terms during
model training. For each of a specific number of epochs, we
adjust the ratio, ,m for one selected term,
, ! (, ,, )12EM RR .
The selected term is penalized if the corresponding value is
greater than a threshold
its ratio, m .,
than the threshold x by lowering the corresponding m .,
x . The term is penalized by increasing
Similarly, we reward the term if it performs better
This
method is inspired by game theoretic methods introduced by
Arora et al., which supports data-driven learning of the parameters
[22]. For our experiments, we set
x 01= .. We initialize all
..
p()
e = mmm12m
e
() U UUU()
e
E
e
()
()
M
e
()
e
()
()
e
()
e
e
U mmmm= +++ We update the selected m based on
its loss function value m, as follows:
()
e
()
E
e
()
M
e ee
()
()
.
m
() = )
e+1
me
me
()
()
e
e
(
1
+
-
() ,
1 ), i
-
-
,
,
()
()e
e
otherwise.
f , 1 x
(6)
We terminate this procedure after a specific number of
epochs in which L consistently decreases since indefinite
updates of sm could make the model training unstable. We
observe that updating sm for 20 consecutive epochs of decreasing
L values is enough to learn the
ms . Algorithm 1 details
the PIP training process.1
An important question is how to select the number of prototypes
to learn. Previous work [5], [18], [19], [23] specifies a
number of prototypes that is greater than the number of classes.
This allows the model to learn at least one prototype for each
class. When classes are complex, such detailed explanations can
be helpful. At the same time, users may be confused when a
single class is represented by multiple pictures. In earlier work,
anecdotal observations analyzed these tradeoffs. In our case, we
report results for alternative numbers of prototypes. To make a
final selection, we first consider the number of prototypes to be
equal to the number of classes. We then select the final number
of prototypes by increasing the number until performance (loss
minimization) converges.
While we demonstrate the learning process using greyscale
images, PIP can also learn colored prototypes. In cases containing
a large number of classes, colored input images will
further enhance interpretability of the blended prototypes
that PIP learns. Such colors can be selected by the user based
(3)
1Code: https://github.com/alirezaghods/PIPNet
m s to one for a fixed learning rate e # 05 At the end of each
epoch e, we choose a term to adjust during the next epoch.
Ratios m are selected with probability proportional to their
values {/ ,/ ,/ ,/ },
12
where
FEBRUARY 2022 | IEEE COMPUTATIONAL INTELLIGENCE MAGAZINE 37
https://www.github.com/alirezaghods/PIPNet

IEEE Computational Intelligence Magazine - February 2022

Table of Contents for the Digital Edition of IEEE Computational Intelligence Magazine - February 2022

Contens
IEEE Computational Intelligence Magazine - February 2022 - Cover1
IEEE Computational Intelligence Magazine - February 2022 - Cover2
IEEE Computational Intelligence Magazine - February 2022 - Contens
IEEE Computational Intelligence Magazine - February 2022 - 2
IEEE Computational Intelligence Magazine - February 2022 - 3
IEEE Computational Intelligence Magazine - February 2022 - 4
IEEE Computational Intelligence Magazine - February 2022 - 5
IEEE Computational Intelligence Magazine - February 2022 - 6
IEEE Computational Intelligence Magazine - February 2022 - 7
IEEE Computational Intelligence Magazine - February 2022 - 8
IEEE Computational Intelligence Magazine - February 2022 - 9
IEEE Computational Intelligence Magazine - February 2022 - 10
IEEE Computational Intelligence Magazine - February 2022 - 11
IEEE Computational Intelligence Magazine - February 2022 - 12
IEEE Computational Intelligence Magazine - February 2022 - 13
IEEE Computational Intelligence Magazine - February 2022 - 14
IEEE Computational Intelligence Magazine - February 2022 - 15
IEEE Computational Intelligence Magazine - February 2022 - 16
IEEE Computational Intelligence Magazine - February 2022 - 17
IEEE Computational Intelligence Magazine - February 2022 - 18
IEEE Computational Intelligence Magazine - February 2022 - 19
IEEE Computational Intelligence Magazine - February 2022 - 20
IEEE Computational Intelligence Magazine - February 2022 - 21
IEEE Computational Intelligence Magazine - February 2022 - 22
IEEE Computational Intelligence Magazine - February 2022 - 23
IEEE Computational Intelligence Magazine - February 2022 - 24
IEEE Computational Intelligence Magazine - February 2022 - 25
IEEE Computational Intelligence Magazine - February 2022 - 26
IEEE Computational Intelligence Magazine - February 2022 - 27
IEEE Computational Intelligence Magazine - February 2022 - 28
IEEE Computational Intelligence Magazine - February 2022 - 29
IEEE Computational Intelligence Magazine - February 2022 - 30
IEEE Computational Intelligence Magazine - February 2022 - 31
IEEE Computational Intelligence Magazine - February 2022 - 32
IEEE Computational Intelligence Magazine - February 2022 - 33
IEEE Computational Intelligence Magazine - February 2022 - 34
IEEE Computational Intelligence Magazine - February 2022 - 35
IEEE Computational Intelligence Magazine - February 2022 - 36
IEEE Computational Intelligence Magazine - February 2022 - 37
IEEE Computational Intelligence Magazine - February 2022 - 38
IEEE Computational Intelligence Magazine - February 2022 - 39
IEEE Computational Intelligence Magazine - February 2022 - 40
IEEE Computational Intelligence Magazine - February 2022 - 41
IEEE Computational Intelligence Magazine - February 2022 - 42
IEEE Computational Intelligence Magazine - February 2022 - 43
IEEE Computational Intelligence Magazine - February 2022 - 44
IEEE Computational Intelligence Magazine - February 2022 - 45
IEEE Computational Intelligence Magazine - February 2022 - 46
IEEE Computational Intelligence Magazine - February 2022 - 47
IEEE Computational Intelligence Magazine - February 2022 - 48
IEEE Computational Intelligence Magazine - February 2022 - 49
IEEE Computational Intelligence Magazine - February 2022 - 50
IEEE Computational Intelligence Magazine - February 2022 - 51
IEEE Computational Intelligence Magazine - February 2022 - 52
IEEE Computational Intelligence Magazine - February 2022 - 53
IEEE Computational Intelligence Magazine - February 2022 - 54
IEEE Computational Intelligence Magazine - February 2022 - 55
IEEE Computational Intelligence Magazine - February 2022 - 56
IEEE Computational Intelligence Magazine - February 2022 - 57
IEEE Computational Intelligence Magazine - February 2022 - 58
IEEE Computational Intelligence Magazine - February 2022 - 59
IEEE Computational Intelligence Magazine - February 2022 - 60
IEEE Computational Intelligence Magazine - February 2022 - 61
IEEE Computational Intelligence Magazine - February 2022 - 62
IEEE Computational Intelligence Magazine - February 2022 - 63
IEEE Computational Intelligence Magazine - February 2022 - 64
IEEE Computational Intelligence Magazine - February 2022 - 65
IEEE Computational Intelligence Magazine - February 2022 - 66
IEEE Computational Intelligence Magazine - February 2022 - 67
IEEE Computational Intelligence Magazine - February 2022 - 68
IEEE Computational Intelligence Magazine - February 2022 - 69
IEEE Computational Intelligence Magazine - February 2022 - 70
IEEE Computational Intelligence Magazine - February 2022 - 71
IEEE Computational Intelligence Magazine - February 2022 - 72
IEEE Computational Intelligence Magazine - February 2022 - 73
IEEE Computational Intelligence Magazine - February 2022 - 74
IEEE Computational Intelligence Magazine - February 2022 - 75
IEEE Computational Intelligence Magazine - February 2022 - 76
IEEE Computational Intelligence Magazine - February 2022 - 77
IEEE Computational Intelligence Magazine - February 2022 - 78
IEEE Computational Intelligence Magazine - February 2022 - 79
IEEE Computational Intelligence Magazine - February 2022 - 80
IEEE Computational Intelligence Magazine - February 2022 - 81
IEEE Computational Intelligence Magazine - February 2022 - 82
IEEE Computational Intelligence Magazine - February 2022 - 83
IEEE Computational Intelligence Magazine - February 2022 - 84
IEEE Computational Intelligence Magazine - February 2022 - 85
IEEE Computational Intelligence Magazine - February 2022 - 86
IEEE Computational Intelligence Magazine - February 2022 - 87
IEEE Computational Intelligence Magazine - February 2022 - 88
IEEE Computational Intelligence Magazine - February 2022 - 89
IEEE Computational Intelligence Magazine - February 2022 - 90
IEEE Computational Intelligence Magazine - February 2022 - 91
IEEE Computational Intelligence Magazine - February 2022 - 92
IEEE Computational Intelligence Magazine - February 2022 - 93
IEEE Computational Intelligence Magazine - February 2022 - 94
IEEE Computational Intelligence Magazine - February 2022 - 95
IEEE Computational Intelligence Magazine - February 2022 - 96
IEEE Computational Intelligence Magazine - February 2022 - 97
IEEE Computational Intelligence Magazine - February 2022 - 98
IEEE Computational Intelligence Magazine - February 2022 - 99
IEEE Computational Intelligence Magazine - February 2022 - 100
IEEE Computational Intelligence Magazine - February 2022 - 101
IEEE Computational Intelligence Magazine - February 2022 - 102
IEEE Computational Intelligence Magazine - February 2022 - 103
IEEE Computational Intelligence Magazine - February 2022 - 104
IEEE Computational Intelligence Magazine - February 2022 - 105
IEEE Computational Intelligence Magazine - February 2022 - 106
IEEE Computational Intelligence Magazine - February 2022 - 107
IEEE Computational Intelligence Magazine - February 2022 - 108
IEEE Computational Intelligence Magazine - February 2022 - 109
IEEE Computational Intelligence Magazine - February 2022 - 110
IEEE Computational Intelligence Magazine - February 2022 - 111
IEEE Computational Intelligence Magazine - February 2022 - 112
IEEE Computational Intelligence Magazine - February 2022 - 113
IEEE Computational Intelligence Magazine - February 2022 - 114
IEEE Computational Intelligence Magazine - February 2022 - 115
IEEE Computational Intelligence Magazine - February 2022 - 116
IEEE Computational Intelligence Magazine - February 2022 - Cover3
IEEE Computational Intelligence Magazine - February 2022 - Cover4
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202311
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202308
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202305
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202302
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202211
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202208
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202205
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202202
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202111
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202108
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202105
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202102
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202011
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202008
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202005
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202002
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_201911
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_201908
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_201905
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_201902
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_201811
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_201808
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_201805
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_201802
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_winter17
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_fall17
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_summer17
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_spring17
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_winter16
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_fall16
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_summer16
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_spring16
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_winter15
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_fall15
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_summer15
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_spring15
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_winter14
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_fall14
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_summer14
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_spring14
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_winter13
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_fall13
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_summer13
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_spring13
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_winter12
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_fall12
https://www.nxtbookmedia.com