relationships between classes, it appears as if the model uses
most of the signal when predicting its top class, Heart Attack,
even when it shares the same critical regions with Cardiac
Arrest and Normal Heart classes as shown in blue. A class-
specific explanation, on the other hand, should correct for
the model using the same regions for multiple classes. In our
example, it (rightmost column) explains that the burst (non-
overlapping critical region) of the signal is what the model
uses to predict Heart Attack instead of other classes.
State-of-the-Art.
Explainablility for time series models has
recently emerged as a promising direction to help users trust
deep time series classifier models [
8
], [
9
], [
7
], [
6
], [
10
], [
18
],
[
12
]. The most successful methods learn to perturb input time
series to explain an opaque model’s behavior in the vicinity of
one instance [
7
], [
8
]. Intuitively, time steps that have a higher
impact on model accuracy will be ranked higher. Most existing
methods [
8
], [
9
], [
18
], [
12
], [
13
], [
5
] explain model behavior by
perturbing each time step using either static, predefined values
like zero or other time series instances from a “background”
dataset. For example, PERT [
7
], which explains only binary
deep time series classifiers, perturbs each time step by replacing
it from a replacement time series sampled from the background
dataset. DYNAMASK [
8
], [
19
], which also treats each class
independently, uses static replacement strategies for each time
step for deriving explanations for a multivariate classifier. It
makes a binary decision if a feature is important or not. To-date,
class-specific explanations, despite their recognized need in
fields like computer vision [
15
], remain an open problem in
time series. Typically, a successful multi-class classifier assigns
high probability to one of the classes and lower probabilities
to the rest. Evidence derived to explain the predicted class
should be unique to that class, relative to other classes. But
existing time series explainable methods fail to incorporate the
knowledge about relationships between classes.
Beyond lacking class-specificity, another well-known disad-
vantage of perturbation-learning methods is the high variance
between explanations derived over multiple runs for the same
time series instance as input [
20
], [
19
], [
21
]. High variability
among explanations decreases a user’s trust in an explainability
method and must therefore be reduced.
Problem Definition.
We study the open problem of Class-
Specific Explainability for Multi-Class Time Series Classifiers:
given a time series and a pre-trained multi-class classifier, we
aim to generate a class-specific saliency map for the classifier’s
predicted class. A saliency map is a vector with one element
per time step in the time series instance, where higher values
of an element indicates a higher importance of this time step
according to the classifier. To be class-specific, the saliency
map should assign high importance only to time steps uniquely
important to the predicted class (in contrast to also being
important to other classes). This problem has multiple possibly
conflicting objectives: a good saliency map should be class-
specific, highlight only the most-relevant time steps, and still
remain faithful to the model’s behavior.
Challenges.
Our problem is challenging for several reasons:
•
Class-Specificity: Generating class-specific saliency maps
requires knowledge of explanations across all classes.
However, learning concurrently multiple explanations is
hard, in particular for low-probability classes, with a
model’s predictions often highly variable in regions of
low probability.
•
Local Fidelity: We consider multi-class classifiers that
predict probability distributions. Learning perturbations to
explain these models must incorporate all class probabili-
ties to remain faithful to the classifier’s behavior. However,
minor changes to the input can have a large effect on the
predicted class distribution.
•
Temporal Coherence: Time steps often depend on their
neighbors’ values. This implies that similarly for saliency
maps neighboring time steps should have similar im-
portance. While this encourages discovering important
subsequences, thereby improving explainability, it conflicts
with local fidelity and class-specificity. Hence, a trade-off
must inherently be considered in any effective solution.
•
Consistent Saliency: Perturbation-based explainability
methods can create saliency maps that vary dramatically
for the same instances when re-initialized. Yet to be useful
in real-world applications, we should instead consistently
generate similar explanations for the same time series
Proposed Solution.
To derive class-specific explanations, we
propose
D
istinct T
E
mporal
MU
lticlass E
X
plainer (DEMUX), a
novel model-agnostic, perturbation-based explainability method
for multi-class time series models. DEMUX jointly learns
saliency maps, with a focus on removing shared salient regions
to generate a class-specific explanation for the model’s top
predicted class.
DEMUX is gradient-based approach that monitors changes in
the classifier’s predictions while perturbing values at each time
step. It produces a saliency map for the classifier’s top predicted
class that preserves the classifier’s prediction probability
distribution across classes. To generate good perturbations,
DEMUX learns to sample a replacement time-series per class
from a background dataset using a clustering-based replacement
selector. DEMUX avoids out-of-distribution replacement values
by ensuring perturbations are like other time series the model
has seen before for each class and for each time step, leading
to more stable saliency maps.
Contributions. Our main contributions are as follows:
•
We identify and characterize the problem of class-specific
saliency maps for deep multi-class time series classifiers.
•
We introduce the first effective solution, DEMUX, which
extends beyond recent work with three innovations:
learning to remove shared saliency across classes (Class-
Specificity), generating class-specific perturbations that
are locally faithful (Local Fidelity and Temporal Coher-
ence), and ensuring stability of saliency maps (Consistent
Saliency) for given time series instances.
•
Using five real datasets, we conclusively demonstrate that
DEMUX outperforms nine state-of-the-art alternatives,
successfully generating class-specific explanations for
multiple types of deep time-series classifiers.
2