id
stringlengths 33
34
| updated
timestamp[s] | published
timestamp[s] | title
stringlengths 9
212
| summary
stringlengths 75
2.46k
| author
sequence | arxiv:doi
stringlengths 0
71
| link
list | arxiv:journal_ref
sequence | arxiv:primary_category
dict | category
sequence | content
stringlengths 0
1.25M
|
---|---|---|---|---|---|---|---|---|---|---|---|
http://arxiv.org/abs/2302.10164v1 | 2023-02-20T18:50:18 | 2023-02-20T18:50:18 | Seasoning Model Soups for Robustness to Adversarial and Natural
Distribution Shifts | Adversarial training is widely used to make classifiers robust to a specific
threat or adversary, such as $\ell_p$-norm bounded perturbations of a given
$p$-norm. However, existing methods for training classifiers robust to multiple
threats require knowledge of all attacks during training and remain vulnerable
to unseen distribution shifts. In this work, we describe how to obtain
adversarially-robust model soups (i.e., linear combinations of parameters) that
smoothly trade-off robustness to different $\ell_p$-norm bounded adversaries.
We demonstrate that such soups allow us to control the type and level of
robustness, and can achieve robustness to all threats without jointly training
on all of them. In some cases, the resulting model soups are more robust to a
given $\ell_p$-norm adversary than the constituent model specialized against
that same adversary. Finally, we show that adversarially-robust model soups can
be a viable tool to adapt to distribution shifts from a few examples. | [
"Francesco Croce",
"Sylvestre-Alvise Rebuffi",
"Evan Shelhamer",
"Sven Gowal"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.10164v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.10164v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.CV"
] | Seasoning Model Soups for Robustness
to Adversarial and Natural Distribution Shifts
Francesco Croce*
University of T ̈ubingen
Sylvestre-Alvise Rebuffi
DeepMind
Evan Shelhamer
DeepMind
Sven Gowal
DeepMind
3
2
0
2
b
e
F
0
2
]
G
L
.
s
c
[
1
v
4
6
1
0
1
.
2
0
3
2
:
v
i
X
r
a
Abstract
Adversarial training is widely used to make classifiers
robust to a specific threat or adversary, such as (cid:96)p-norm
bounded perturbations of a given p-norm. However, ex-
isting methods for training classifiers robust to multiple
threats require knowledge of all attacks during training
and remain vulnerable to unseen distribution shifts.
In
this work, we describe how to obtain adversarially-robust
model soups (i.e., linear combinations of parameters) that
smoothly trade-off robustness to different (cid:96)p-norm bounded
adversaries. We demonstrate that such soups allow us to
control the type and level of robustness, and can achieve
robustness to all threats without jointly training on all of
them. In some cases, the resulting model soups are more
robust to a given (cid:96)p-norm adversary than the constituent
model specialized against that same adversary. Finally, we
show that adversarially-robust model soups can be a viable
tool to adapt to distribution shifts from a few examples.
1. Introduction
Deep networks have achieved great success on several
computer vision tasks and have even reached super-human
accuracy [16, 28]. However, the outputs of such models
are often brittle, and tend to perform poorly on inputs that
differ from the distribution of inputs at training time, in
a condition known as distribution shift [34]. Adversarial
perturbations are a prominent example of this condition:
small, even imperceptible, changes to images can alter pre-
dictions to cause errors [2, 41]. In addition to adversarial
inputs, it has been noted that even natural shifts, e.g. dif-
ferent weather conditions, can significantly reduce the ac-
curacy of even the best vision models [11, 18, 36]. Such
drops in accuracy are undesirable for robust deployment,
and so a lot of effort has been invested in correcting them.
Adversarial training [31] and its extensions [13, 35, 51] are
currently the most effective methods to improve empirical
robustness to adversarial attacks. Similarly, data augmen-
*Work done during an internship at DeepMind.
tation is the basis of several techniques that improve ro-
bustness to non-adversarial/natural shifts [3, 9, 19]. While
significant progress has been made on defending against a
specific, selected type of perturbations (whether adversar-
ial or natural), it is still challenging to make a single model
robust to a broad set of threats and shifts. For example,
a classifier adversarially-trained for robustness to (cid:96)p-norm
bounded attacks is still vulnerable to attacks in other (cid:96)q-
threat models [26, 42]. Moreover, methods for simultane-
ous robustness to multiple attacks require jointly training on
all [30, 32] or a subset of them [6]. Most importantly, con-
trolling the trade-off between different types of robustness
(and nominal performance) remains difficult and requires
training several classifiers.
Inspired by model soups [46], which interpolate the pa-
rameters of a set of vision models to achieve state-of-the-art
accuracy on IMAGENET, we investigate the effects of in-
terpolating robust image classifiers. We complement their
original recipe for soups by own study of how to pre-
train, fine-tune, and combine the parameters of models
adversarially-trained against (cid:96)p-norm bounded attacks for
different p-norms. To create models for soups, we pre-train
a single robust model and fine-tune it to the target threat
models (using the efficient technique of [6]). We then es-
tablish that it is possible to smoothly trade-off robustness
to different threat models by moving in the convex hull
of the parameters of each robust classifier, while achieving
competitive performance with methods that train on multi-
ple p-norm adversaries simultaneously. Unlike alternatives,
our soups can uniquely (1) choose the level of robustness
to each threat model without any further training and (2)
quickly adapt to new unseen attacks or shifts by simply tun-
ing the weighting of the soup.
Previous works [21, 27, 47] have shown that adversarial
training with (cid:96)p-norm bounded attacks can help to improve
performance on natural shifts if carefully tuned. We show
that model soups of diverse classifiers, with different types
of robustness, offer greater flexibility for finding models
that perform well across various shifts, such as IMAGENET
variants. Furthermore, we show that a limited number of
images of the new distribution are sufficient to select the
1
weights of such a model soup. Examining the composition
of the best soups brings insights about which features are
important for each dataset and shift. Finally, while the ca-
pability of selecting a model specific to each image distribu-
tion is a main point of our model soups, we also show that it
is possible to jointly select a soup for average performance
across several IMAGENET variants to achieve better accu-
racy than adversarial and self-supervised baselines [15, 21].
Contributions. In summary, we show that soups
• can merge nominal and (cid:96)p-robust models (for various p):
efficient fine-tuning from one robust model obtains a set
of models with diverse robustness [6] and compatible pa-
rameters for creating model soups [46] (Sec. 3),
• can control the level of robustness to each threat model
and achieve, without more training, competitive perfor-
mance against multi-norm robustness training (Sec. 4),
• are not limited to interpolation, but can find more effec-
tive classifiers by extrapolation (Sec. 4.3),
• enable adaptation to unseen distribution shifts on only a
few examples (Sec. 5).
2. Related Work
Adversarial robustness to multiple threat models.
Most methods focus on achieving robustness in a single
threat model, i.e.
to a specific type of attacks used dur-
ing training. However, this is not sufficient to obtain ro-
bustness to unseen attacks. As a result, further work aims
to train classifiers for simultaneous robustness to multiple
attacks, and the most popular scenario considers a set of
(cid:96)p-norm bounded perturbations. The most successful meth-
ods [30, 32, 42] are based on adversarial training and differ
in how the multiple threats are combined. Notably, all need
to use every attack at training time. To reduce the compu-
tational cost of obtaining multiply-robust models, one can
fine-tune a singly-robust model by one of the above men-
tioned methods [6], even for only a small number of epochs.
Our soups are more flexible by skipping simultaneous ad-
versarial training across multiple attacks.
Adversarial training for distribution shifts. While ro-
bustness to adversarial attacks and natural shifts are not the
same goal, previous works nevertheless show that it is pos-
sible to leverage adversarial training with (cid:96)p-norm bounded
attacks to improve performance on the common corruptions
of [18]. First, AdvProp [47] co-trains models on clean and
adversarial images (in the (cid:96)∞-threat model) with dual nor-
malization layers that specialize to each type of input. The
clean branch of the dual model achieves higher accuracy
than nominal training on IMAGENET and its variants. Simi-
lar results are obtained by Pyramid-AT [21] by its design of
a specific attack to adversarially train vision transformers.
Finally, [27] carefully selecting the size of the adversarial
their (cid:96)∞- or (cid:96)2-norm, for standard ad-
perturbations, i.e.
versarial training [31] achieves competitive performance on
common corruptions on CIFAR-10 and IMAGENET-100.
Model soups. Ensembling or averaging the parame-
ters of intermediate models found during training is an ef-
fective technique to improve both clean accuracy [22, 25]
and robustness [12, 35]. Recently, [46] propose model
soups which interpolate the parameters of networks fine-
tuned with different hyperparameters configurations from
the same pre-trained model. This yields improved classifi-
cation accuracy on IMAGENET. Along the same line, [24]
fine-tune a model trained on IMAGENET on several new
image classification datasets, and show that interpolating
the original and fine-tuned parameters yields classifiers that
perform well on all tasks.
3. Model Interpolation across Different Tasks
In the following, we formally introduce the two main
components of our procedure to merge adversarially ro-
bust models: (1) obtaining models which can interpolated
by fine-tuning a single (cid:96)p-robust classifiers, and (2) inter-
polation of their weights to balance their different types
of robustness. We highlight that our setup diverges from
that of prior works about parameters averaging:
in fact,
both [24, 46] combine models fine-tuned on the same task,
i.e. achieving high classification accuracy of unperturbed
images, either on a fixed dataset and different hyperparame-
ter configurations [46], or varying datasets [24]. In our case,
the individual models are trained for robustness to different
types of attacks, i.e. with distinct loss functions.
3.1. Adversarial training and fine-tuning
Let us denote D = {(xi, yi)}i the training set, with
xi ∈ Rd indicating an image and yi ∈ {1, . . . , K} the cor-
responding label, and ∆ : Rd → Rd the function which
characterizes a threat model, that maps an input x to a set
∆(x) ⊂ Rd of possible perturbed versions of the original
image. For example, (cid:96)p-norm bounded adversarial attacks
with budget (cid:15) > 0 in the image space can be described by
∆(x) = {δ ∈ Rd : (cid:107)δ(cid:107)p ≤ (cid:15), x + δ ∈ [0, 1]d}.
(1)
Then, one can train a classifier f : θ × Rd → RK parame-
terized by θ ∈ Θ with adversarial training [31] by solving
min
θ∈Θ
(cid:88)
(x,y)∈D
max
δ∈∆(x)
L(f (θ, x + δ), y),
(2)
for a given loss function L : RK × RK → R (e.g., cross-
entropy), with the goal of obtaining a model robust to the
perturbations described by ∆. Note that this boils down to
nominal training when ∆(*) = {0} and no perturbation is
applied on the training images. We are interested in the case
where multiple threat models are available, and indicate
with ∆nominal nominal training, and ∆p for p ∈ {∞, 2, 1}
2
soup: θ∞ + θ∞→2, soup: θ2 + θ2→∞ soup: θ∞ + θ∞→1, soup: θ1 + θ1→∞ soup: θ2 + θ2→1, soup: θ1 + θ1→2
Figure 1. Soups of two models on CIFAR-10: for all pairs (p, q) we show the (cid:96)p- vs (cid:96)q-robust accuracy of the soups w*θp +(1−w)*θp→q
and w * θq + (1 − w) * θq→p varying w ∈ [0, 1]. We also show results for MAX and SAT with simultaneous use of the two threat models.
soup: θ∞ + θ∞→2
soup: θ∞ + θ∞→1
soup: θ∞→2 + θ∞→1
soup: θ∞ + θ∞→nominal
Figure 2. Soups of two models on IMAGENET: for p ∈ {2, 1} we show the (cid:96)p- vs (cid:96)∞-robust accuracy of the soups w*θ∞+(1−w)*θ∞→p
varying w ∈ [0, 1] (first and second columns). Moreover, we show the soups obtained combining θ∞→2 and θ∞→1 (third), or θ∞ and
θ∞→nominal (fourth). For the case of two (cid:96)p-threat models, we also show the results of fine-tuning models with MAX and SAT.
the perturbations with bounded (cid:96)p-norm as described in
Eq. 1. We focus on such tasks since they are the most com-
mon choices for adversarial defenses, in particular by meth-
ods focusing on multiple norm robustness [32, 42].
Notably, it is possible to efficiently obtain a model robust
to ∆q by fine-tuning for a single (or few) epoch with adver-
sarial training w.r.t. ∆q a classifier pre-trained to be robust
in ∆p, with p (cid:54)= q and p, q ∈ {∞, 2, 1} [6]. For example,
in this way one can efficiently derive specialized classifiers
∆2, ∆1, ∆nominal for each task from a single model f robust
w.r.t. (cid:96)∞. However, this does not work well when a nominal
classifier is used as starting point for the short fine-tuning.
In the following, we denote with θp→q the parameters re-
sulting from fine-tuning to ∆q a base model θp.
3.2. Merging different types of robustness via linear
combinations in parameter space
We want to explore the properties of the models ob-
tained by taking linear combinations of the parameters of
classifiers with different types of robustness. To do so,
there needs to be a correspondence among the parameters
of different individual networks: [46] achieve this by merg-
ing differently fine-tuned versions of the same pre-trained
model. As mentioned above, fine-tuning an (cid:96)p-robust clas-
sifier allows to change it to achieve robustness in a new
threat model [6]: we exploit such property to create model
soups, as named by [46]. Formally, we create a model soup
from n individual networks with parameters θ1, . . . , θn
with weights w = (w1, . . . , wn) ∈ Rn as
θw =
n
(cid:88)
i=1
wi * θi,
(3)
and the corresponding classifier is given by f (θw, *) :
Rd → RK. While any choice of w is possible, we focus on
the case of affine combinations, i.e. (cid:80)
i wi = 1. Moreover,
we consider soups which are either convex combinations of
the individual models, with w1, . . . , wn ≥ 0, or obtained by
extrapolations, i.e. with negative elements in w.
4. Soups for (cid:96)p-robustness
We measure adversarial robustness in the (cid:96)p-threat
model with bounds (cid:15)p: on CIFAR-10 we use (cid:15)∞ = 8/255,
(cid:15)2 = 128/255, (cid:15)1 = 12, on IMAGENET (cid:15)∞ = 4/255,
(cid:15)2 = 4, (cid:15)1 = 255. If not specified otherwise, we use the
full test set for CIFAR-10 and 5000 images from the IMA-
GENET validation set, and attack by AUTOPGD [4, 5] with
40 steps. More details are provided in App. A.
3
3540455055 robust accuracy6264666870722 robust accuracysoups (base=)soups (base=2)MAXSAT303540455055 robust accuracy1020304050601 robust accuracysoups (base=)soups (base=1)MAXSAT65666768697071722 robust accuracy303540455055601 robust accuracysoups (base=2)soups (base=1)MAXSAT5354555657 robust accuracy404142434445462 robust accuracysoups 1/3 epochsoups 1 epochsoups 3 epochsMAXSAT40.042.545.047.550.052.555.057.5 robust accuracy152025303540451 robust accuracysoups 1/3 epochsoups 1 epochsoups 3 epochsMAXSAT4243444546472 robust accuracy303540451 robust accuracysoups 1/3 epochsoups 1 epochsoups 3 epochsMAXSAT102030405060 robust accuracy7778798081clean accuracysoups 1/3 epochsoups 1 epochsoups 3 epochs4.1. Soups with two threat models
CIFAR-10. We explore the effect of interpolating two
models robust to different (cid:96)p-norm bounded attacks for
p ∈ {∞, 2, 1}. We consider classifiers with WIDERES-
NET-28-10 [49] architecture trained on CIFAR-10. For ev-
ery threat model, we first train a robust classifier with ad-
versarial training from random initialization. Then, we fine-
tune the resulting model with adversarial training on each of
the other threat models for 10 epochs. In Fig. 1 we show, for
each pair of threat models (∆p, ∆q), the trade-off of robust
accuracy w.r.t. (cid:96)p and (cid:96)q for the soups
w * θp + (1 − w) * θp→q
for w ∈ [0, 1]
and symmetrically
w * θq + (1 − w) * θq→p
for w ∈ [0, 1].
Interpolating the parameters of models trained with a single
(cid:96)p-norm controls the balance between the two types of ro-
bustness: for example, Fig. 1 (middle plot) shows that mov-
ing from θ∞ to θ∞→1 (blue curve), i.e. decreasing w from
1 to 0 in the corresponding soup, progressively reduces the
robust accuracy w.r.t. (cid:96)∞ to improve robustness w.r.t. (cid:96)1.
Moreover, for similar threat models (i.e. the pairs ((cid:96)2, (cid:96)1)
and ((cid:96)2, (cid:96)∞)) some intermediate networks are more robust
than the extremes trained specifically for each threat model.
IMAGENET. We now fine-tune a VIT-B16 [8] robust
w.r.t. (cid:96)∞ on IMAGENET to the other threat models, includ-
ing nominal training, for either 1/3, 1 or 3 epochs. Fig. 2
shows that interpolation of parameters is effective even in
this setup, and allows to easily balance nominal and robust
accuracy (fourth plot). Moreover, it is possible to create
soups with two fine-tuned models, i.e. θ∞→2 and θ∞→1.
Finally, increasing the number of fine-tuning steps yields
better performance in the target threat model, which in turn
generally leads to better soups.
Comparison to multi-norm robustness methods.
Fig. 1 and Fig. 2 compare the performance of the model
soups to that of models trained with methods for robustness
in the union of multiple threat models.
In particular, we
show the results of MAX [42], which computes perturba-
tions for each threat model and trains on that attaining the
highest loss, and SAT [30], which samples uniformly at ran-
dom for each training batch the attack to use. We train mod-
els with both methods for all pairs of threat models: as ex-
pected, MAX tends to focus on the most challenging threat
model, sacrificing some robustness in the other one com-
pared to SAT, since it uses only the strongest attack for each
training point. When training for (cid:96)∞ and (cid:96)1, i.e. the extreme
(cid:96)p-norms we consider, MAX and SAT models lie above the
front drawn by the model soups, hinting that the more di-
verse the attacks, the more difficult it is to preserve high
robustness to both. In the other cases, both methods behave
similarly to the soups. The main advantage given by inter-
polation is however the option of moving along the front
without additional training cost: while one might tune the
trade-off between the robustness in the two threat models
in SAT, e.g. changing the sampling probability, this would
still require training a new classifier for each setup.
4.2. Soups with three threat models
We here study the convex combination of three models
with different types of robustness. For CIFAR-10 we cre-
ate soups with each (cid:96)p-robust classifier for p ∈ {∞, 2, 1}
and its fine-tuned version into the other two threat mod-
els. We use the same models of the previous section,
and sweep the interpolation weights w ∈ R3 such that
wi ∈ {0, 0.2, 0.4, 0.6, 0.8, 1} and (cid:80)
In Fig. 3
and Fig. 10 (in the Appendix) we show clean accuracy (first
column) and robust accuracy in (cid:96)∞, (cid:96)2 and (cid:96)1 (second to
fourth columns) and their union, when a point is considered
robust only if it is such against all attacks (last column).
i wi = 1.
One can observe that, independently from the type of
robustness of the base model (used as initialization for the
fine-tuning), moving in the convex hull of the three parame-
ters (e.g. θ∞ +θ∞→2 +θ∞→1 in Fig. 3) allows to smoothly
control the trade-off of the different types of robustness. In-
terestingly, the highest (cid:96)2-robustness is attained by interme-
diate soups, not by the model specifically fine-tuned w.r.t.
(cid:96)2, suggesting that model soups might even be beneficial
to robustness in individual threat models (see more below).
Moreover, the highest robustness in the union is given by in-
terpolating only the models robust w.r.t. (cid:96)∞ and (cid:96)1, which
is in line with the observation of [6] that training for the ex-
treme norms is sufficient for robustness in the union of the
three threat models. Although the robust accuracy in the
union is lower than that of training simultaneously with all
attacks e.g. with MAX (42.0% vs 47.2%), the model soups
deliver competitive results without the need of co-training.
Finally, Fig. 4 shows that similar observations hold on
IMAGENET, where we create soups fine-tuning classifiers
robust w.r.t. (cid:96)∞, with either RESNET-50 [16] or VIT-B16
as architecture, for 1 epoch.
4.3. Soups for improving individual threat model
robustness
We notice in Fig. 1 and Fig. 2 that in a few cases the in-
termediate models obtain via parameters interpolation have
higher robustness than the extreme ones, which are trained
or fine-tuned with a specific threat model. As such, we an-
alyze in more details the soups w * θ∞ + (1 − w) * θ∞→2,
i.e. using the original classifier robust in (cid:96)∞ and the one
fine-tuned to (cid:96)2, on both CIFAR-10 and IMAGENET. Fig. 5
shows the robust accuracy w.r.t. (cid:96)∞ when varying the value
of w: in both case the original model θ∞, highlighted in
Interestingly, on
red, does not attain the best robustness.
4
soup: θ∞ + θ∞→2 + θ∞→1
Figure 3. Soups of three models on CIFAR-10: we fine-tune the model robust w.r.t. (cid:96)∞ (with WIDERESNET-28-10 architecture) to the
other threat models for 10 epochs, and show clean accuracy (first column) and robust accuracy w.r.t. every threat model (second to fourth
columns) and their union (last column) of the soups obtained as convex combinations of the three bases.
RESNET-50, soup: θ∞ + θ∞→2 + θ∞→1
VIT-B16, soup: θ∞ + θ∞→2 + θ∞→1
Figure 4. Soups of three models on IMAGENET: we fine-tune the classifiers, with RESNET-50 (top row) and VIT-B16 (bottom) as
architecture, robust w.r.t. (cid:96)∞ for 1 epoch to the other threat models, and show clean accuracy (first column) and robust accuracy in every
threat model (second to fourth columns) and their union (last column) of the classifiers obtained as convex combinations of the three bases.
CIFAR-10: θ∞ + θ∞→2
IMAGENET: θ∞ + θ∞→2
Figure 5. Improvement on single threat models: we show the
robust accuracy w.r.t. (cid:96)∞ for the soups w * θ∞ + (1 − w) * θ∞→2
for varied w. The original model θ∞ is highlighted in red.
CIFAR-10 the best soup is found with w = 0.9, while for
IMAGENET with w > 1: this suggests that the model soups
5
should not be constrained to the convex hull of the base
models, and extrapolation can lead to improvement.
5. Soups for Distribution Shifts
Prior works [27] have shown that adversarial training
w.r.t. an (cid:96)p-norm is able to provide some improvement in
the performance in presence of non-adversarial distribution
shifts, e.g. the common corruptions of IMAGENET-C [18].
However, to see such gains it is necessary to carefully se-
lect the threat model, for example which (cid:96)p-norm and size
(cid:15) to bound the perturbations, to use during training. The
experiments in Sec. 4 suggest that model soups of nominal
and adversarially robust classifiers yield models with a vari-
ety of intermediate behaviors, and extrapolation might even
deliver models which do not merely trade-off the robust-
21clean accuracy21 robust accuracy212 robust accuracy211 robust accuracy21+2+1 robust accuracy8889909192303540455060657020406020304021clean accuracy21 robust accuracy212 robust accuracy211 robust accuracy21+2+1 robust accuracy6062646630354010152025102030510152021clean accuracy21 robust accuracy212 robust accuracy211 robust accuracy21+2+1 robust accuracy737475767745505542444620304015202530350.60.70.80.91.01.1linear combination weight505152535455 robust accuracy0.951.001.051.101.151.201.251.30linear combination weight57.357.457.557.657.757.8Figure 6. Soups on IMAGENET variants: for each dataset we plot the accuracy of the 5 best performing soups of the four base models
θ∞, θ∞→2, θ∞→1 and θ∞→nominal, and of the individual classifiers. Additionally, we show the performance of an independently trained
nominal model. All models are evaluated on the 1000 points used for the grid search of the best soups.
ness of the initial classifiers but amplify it. This flexibility
could suit adaptation to various distribution shifts: that is,
the various corruption types might more closely resemble
the geometry of different (cid:96)p-balls or their union. Moreover,
including a nominally fine-tuned model in the soup allows
it to maintain, if necessary, high accuracy on the original
dataset, which is often degraded by adversarial training [31]
or test-time adaptation on shifted data [33].
5.1. Soups for IMAGENET variants
Setup. In the following, we use models soups consisting
of robust VIT fine-tuned from (cid:96)∞ to the other threat models,
and one more VIT nominally fine-tuned for 100 epochs to
obtain slightly higher accuracy on clean data. For shifts, we
consider several variants of IMAGENET, providing a broad
and diverse benchmark for our soups: IMAGENET-REAL
[1], IMAGENET-V2 [36], IMAGENET-C [18], IMAGENET-
A [20], IMAGENET-R [17], IMAGENET-SKETCH [44], and
CONFLICT STIMULI [10]. We consider the setting of few-
shot supervised adaptation, with a small set of labelled im-
ages from each shift, which we use to select the best soups.
Soup selection via grid search. Since evaluating the ac-
curacy of many soups on the entirety of the datasets would
be extremely expensive, we search for the best combina-
tion of the four models on a random subset of 1000 points
from each dataset, with the exception of CONFLICT STIM-
ULI for which all 1280 images are used (for IMAGENET-C
we use all corruption types and severities, then aggregate
the results). Restricting our search to a subset also serves
our aim of finding a model soup which generalizes to the
new distribution by only seeing a few examples. We eval-
uate all the possible affine combinations with weights in
the range [−0.4, 1.4] with granularity 0.2, which amounts
to 460 models in total.
In Fig. 6 we compare, for each
dataset, the accuracy of the 5 best soups to that of each indi-
vidual classifier used for creating the soups and of a nominal
model trained independently: for all datasets apart from IM-
AGENET the top soups outperform the individual models.
Moreover, we notice that the best individual model varies
across datasets, indicating that it might be helpful to merge
networks with different types of robustness.
Comparison to existing methods. Having selected the
best soup for each variant (dataset-specific soups) on its
chosen few-shot adaptation set, we evaluate the soup on the
test set of the variant (results in Table 1). We also evalu-
ate the model soup that attains the best average case accu-
racy over the adaptation sets for all variants (single soup),
in order to gauge the best performance of a single, general
model soup. We compare the soups to a nominal model,
the (cid:96)∞-robust classifier used in the soups, their ensemble,
the Masked AutoEncoders of [15], AdvProp [47], Pyramid-
AT [21], and the ensemble obtained by averaging the output
(after softmax) of the four models included in the soups.
Selecting the best soup on 1000 images of each datasets
(results in the last row of Table 1) leads in 4 out of the 8
datasets to the best accuracy, and only slightly suboptimal
values in the other cases: in particular, parameters interpola-
tions is very effective on stronger shifts like IMAGENET-R
and CONFLICT STIMULI, where it attains almost 8% better
performance than the closest baseline. Unsurprisingly, it is
more challenging to improve on datasets like IMAGENET-
V2 which are very close to the original IMAGENET. Over-
6
70.072.575.077.580.082.5accuracyImageNet76788082848688ImageNet-Real55606570ImageNet-V210203040ImageNet-Asoups -> nominal -> 2 -> 1nominaltop-5 soups baselines45.047.550.052.555.057.560.0accuracyImageNet-Rtop-5 soups baselines30323436384042ImageNet-Sketchtop-5 soups baselines30405060Conflict Stimulitop-5 soups baselines50556065ImageNet-CSETUP
Baselines
# FP IMAGENET IN-REAL
IN-V2
IN-A
IN-R
IN-
SKETCH
CONFLICT
STIMULI
IN-C
MEAN
×1
Nominal training
×1
Adversarial training
×1
Fine-tuned MAE-B16
×1
AdvProp
×1
Pyramid-AT
×2
Indep. networks ensemble
Individual networks ensemble ×4
Fixed grid search on 1000 images
82.64%
76.88%
83.10%
83.39%
83.14%
82.86%
81.31%
87.33%
83.91%
88.02%
88.06%
87.82%
87.78%
86.97%
71.42%
64.81%
72.80%
73.17%
72.53%
71.73%
70.21%
28.03%
12.35%
37.92%
34.81%
32.72%
25.99%
23.13%
47.94%
55.76%
49.30%
53.04%
51.78%
54.20%
54.82%
34.43%
40.11%
35.69%
39.25%
38.60%
37.33%
39.51%
30.47%
59.45%
27.81%
38.98%
37.27%
46.41%
56.02%
64.45%
55.44%
63.23%
70.39%
67.01%
65.61%
68.17%
55.84%
56.09%
57.23%
60.14%
58.86%
58.99%
60.02%
Single soup
Dataset-specific soups
×1
×1
82.49%
82.29%
87.85%
87.89%
71.99%
71.95%
34.31%
38.27%
53.84%
56.39%
39.84%
40.73%
38.52%
67.03%
66.82%
69.34%
59.46%
(64.24%)
Table 1. Comparison on IMAGENET variants: we report the classification accuracy of various models on the IMAGENET variants,
together with the number of forward passes they require. The soups are selected via a fixed grid search on the interpolation weights with
1000 points for each dataset. The last row shows the results of the best found soup for each dataset.
Figure 7. Soup compositions on IMAGENET variants: for each dataset we plot the composition of the 5 best soups, i.e.
the linear
weights for the individual models, as measured by grid search over 1000 points on weights in the range [−0.4, 1.4] with granularity 0.2.
Additionally we show the composition of the model achieving the best average accuracy over all 8 variants.
all, The soup selected for best average accuracy (across all
datasets) outperforms all baselines, except for the ensemble
of four models (with 4× the inference cost), and AdvProp,
which requires co-training of clean and adversarial points.
These results show that soups with robust classifiers are a
promising avenue for quickly adapting to distribution shifts.
Composition of the soups. To analyze which types of
classifiers are most relevant for performance on every distri-
bution shift, we plot in Fig. 7 the breakdown of the weights
of the five best soups (more intense colors indicate that the
corresponding weight or a larger one is used more often
in the top-5 soups). First, one can see that the nominally
fine-tuned model (in black) is dominant, with weights of
0.8 or 1, on IMAGENET, IMAGENET-REAL, IMAGENET-
V2, IMAGENET-A and IMAGENET-C: this could be ex-
pected since these datasets are closer to IMAGENET itself,
i.e. the distribution shift is smaller, which is what nominal
training optimizes for (in fact, the nominal models achieve
higher accuracy than adversarially trained ones on these
datasets in Fig. 6). However, in all cases there is a contribu-
tion of some of the (cid:96)p-robust networks. On IMAGENET-R,
IMAGENET-SKETCH and CONFLICT STIMULI, the model
robust w.r.t. (cid:96)∞ plays instead the most relevant role, again
in line with the results in Table 1. Interestingly, in the case
of CONFLICT STIMULI, the nominal classifier has a weight
-0.4 (the smallest in the grid search) for all top performing
soups: we hypothesize that this has the effect of reduce the
texture bias typical of nominal model and emphasize the at-
tention to shapes already important in adversarially trained
classifiers. Finally, we show the composition of the soup
which has the best average accuracy over all datasets (last
column of Fig. 7), where the nominal and (cid:96)∞-robust models
have similar positive weight.
How many images does it take to find a good soup? To
identify the practical limit of supervision for soup selection,
we study the effect of varying the number of labelled images
7
-0.4-0.20.00.20.40.60.81.01.21.4IN -> nominal -> 2 -> 1IN-RealIN-V2IN-AIN-RIN-SketchConflict StimuliIN-Call5.2. A closer look at IMAGENET-C
While our experiments have considered IMAGENET-C
as a single dataset, it consists of 15 corruptions types, each
with 5 severity levels. As the various corruptions have dif-
ferent characteristics, one might expect the best soup to vary
across them. In Fig. 9 we plot the composition of the top-
5 soups for each severity level for two corruption types (as
done in Fig. 7 ). The weights of the individual classifiers
significantly change across distribution shifts: for both cor-
ruption types, increasing the severity (making perturbations
stronger) leads to a reduction in the nominal weight in favor
of a robust weight. However, in the case of "pixelate" the
soups concentrate on the (cid:96)1-robust network, while for "jpeg
compression" this happens for (cid:96)∞. Similar visualization for
the remaining IMAGENET-C subsets are found in Fig. 11
of the Appendix. This highlights the importance of inter-
polating models with different types of robustness, and im-
plies that considering each corruption type (including sever-
ity levels) as independent datasets could further improve the
performance of the soups on IMAGENET-C.
6. Discussion and Limitations
Merging models with different types of robustness en-
ables strong control of classifier performance by tuning only
a few soup weights. Soups can find models which perform
well even on distributions unseen during training (e.g. the
IMAGENET variants). Moreover, our framework avoids co-
training on multiple threats: this makes it possible to fine-
tune models with additional attacks as they present them-
selves, and enrich the soups with them.
At the moment, our soups contain only nominal or (cid:96)p-
robust models, but expanding the diversity of models might
aid adaptation to new datasets. We selected our soups with
few-shot supervision, but other settings could potentially
use soups, such as unsupervised domain adaptation [34,38],
on labeled clean and unlabeled shifted data, and test-time
adaptation [39,40,43], on unlabeled examples alone. More-
over, in our evaluation we have constrained the soups to
belong to a fixed grid, which might miss better models: fu-
ture work could develop automatic schemes to optimize the
soup weights, possibly with even fewer examples, or with-
out labeled examples (as done for test-time adaptation of
non-robust models).
7. Conclusion
We show that combining the parameters of robust classi-
fiers, without additional training, achieves a smooth trade-
off of robustness in different (cid:96)p-threat models. This allows
us to discover models which perform well on distribution
shifts with only a limited number of examples of each shift.
In these ways, model soups serve as a good starting point to
efficiently adapt classifiers to changes in data distributions.
Figure 8. Soup selection data efficiency: we vary the number
of images for selecting the best performing soups on different
datasets. For each case, we plot the average accuracy on a held-out
test set, and its standard deviation over 50 trials.
Figure 9. Soup compositions on IMAGENET-C: we plot the
model-wise weights of the best soups across types and severities.
used to select the best soup on a new dataset. For this analy-
sis we randomly choose 500 images from the adaptation set
used for the grid search to create a held-out test set. From
the remaining images, we uniformly sample k elements, se-
lect the soup which performs best on such k points, and
then evaluate it on this test set. We repeat this procedure for
k ∈ {10, 30, 100, 300, 500} for 50 times each with differ-
ent random seeds. In Fig. 8 we plot the average accuracy
on the held-out test set, with standard deviation, when vary-
ing k: increasing the number of points above 100 achieves
high test accuracy with limited variance. This suggests that
soup selection, and thus model adaptation, can be carried
out with as few as 100 examples of the new distribution.
8
10301003005000.720.740.760.780.80accuracyImageNet10301003005000.3000.3250.3500.3750.4000.425ImageNet-A1030100300500# available images0.340.360.380.40accuracyImageNet-Sketch1030100300780# available images0.620.640.660.68Conflict Stimuli01pixelatesev.=1 -> nominal -> 2 -> 1sev.=2sev.=3sev.=4sev.=501jpeg_compressionReferences
[1] Lucas Beyer, Olivier J. H ́enaff, Alexander Kolesnikov, Xi-
aohua Zhai, and A ̈aron van den Oord. Are we done with
ImageNet? arXiv preprint arXiv:2006.07159, 2020. 6
[2] Battista Biggio, Igino Corona, Davide Maiorca, Blaine Nel-
son, Nedim Srndic, Pavel Laskov, Giorgio Giacinto, and
Fabio Roli. Evasion Attacks against Machine Learning at
Test Time. arXiv preprint arXiv:1708.06131, 2013. 1
[3] Dan A. Calian, Florian Stimberg, Olivia Wiles, Sylvestre-
Alvise Rebuffi, Andras Gyorgy, Timothy Mann, and Sven
Gowal. Defending Against Image Corruptions Through Ad-
versarial Augmentations. arXiv preprint arXiv:2104.01086,
2021. 1
[4] Francesco Croce and Matthias Hein.
Reliable evalua-
tion of adversarial robustness with an ensemble of diverse
parameter-free attacks. arXiv preprint arXiv:2003.01690,
2020. 3, 11
[5] Francesco Croce and Matthias Hein. Mind the box: $l 1$-
APGD for sparse adversarial attacks on image classifiers.
arXiv preprint arXiv:2103.01208, 2021. 3
[6] Francesco Croce and Matthias Hein. Adversarial robustness
against multiple and single lp-threat models via quick fine-
tuning of robust classifiers. In Proceedings of the 39th In-
ternational Conference on Machine Learning, pages 4436–
4454, 2022. 1, 2, 3, 4, 11
[7] Ekin D. Cubuk, Barret Zoph, Jonathon Shlens, and Quoc V.
Le. Randaugment: Practical automated data augmentation
with a reduced search space. In CVPR, 2020. 11
[8] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov,
Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner,
Mostafa Dehghani, Matthias Minderer, Georg Heigold, Syl-
vain Gelly, Jakob Uszkoreit, and Neil Houlsby. An Image is
Worth 16x16 Words: Transformers for Image Recognition at
Scale. arXiv preprint arXiv:2010.11929, 2020. 4
[9] N Benjamin Erichson, Soon Hoe Lim, Francisco Utrera,
Winnie Xu, Ziang Cao, and Michael W Mahoney. NoisyMix:
Boosting Robustness by Combining Data Augmentations,
arXiv preprint
Stability Training, and Noise Injections.
arXiv:2202.01263, 2022. 1
[10] Robert Geirhos, Patricia Rubisch, Claudio Michaelis,
Matthias Bethge, Felix A Wichmann, and Wieland Brendel.
ImageNet-trained CNNs are biased towards texture; increas-
ing shape bias improves accuracy and robustness. In Inter-
national Conference on Learning Representations, 2018. 6
[11] Robert Geirhos, Carlos RM Temme, Jonas Rauber, Heiko H
Sch ̈utt, Matthias Bethge, and Felix A Wichmann. Generali-
sation in humans and deep neural networks. In Advances in
Neural Information Processing Systems, pages 7538–7550,
2018. 1
[12] Sven Gowal, Chongli Qin, Jonathan Uesato, Timothy Mann,
and Pushmeet Kohli. Uncovering the Limits of Adversar-
ial Training against Norm-Bounded Adversarial Examples.
arXiv preprint arXiv:2010.03593, 2020. 2
[13] Sven Gowal, Sylvestre-Alvise Rebuffi, Olivia Wiles, Flo-
rian Stimberg, Dan Andrei Calian, and Timothy Mann. Im-
proving Robustness using Generated Data. arXiv preprint
arXiv:2110.09468, 2021. 1
[14] Priya Goyal, Piotr Doll ́ar, Ross Girshick, Pieter Noord-
huis, Lukasz Wesolowski, Aapo Kyrola, Andrew Tulloch,
Yangqing Jia, and Kaiming He. Accurate,
large mini-
arXiv preprint
batch sgd: Training imagenet in 1 hour.
arXiv:1706.02677, 2017. 11
[15] Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Pi-
otr Doll ́ar, and Ross Girshick. Masked Autoencoders Are
Scalable Vision Learners. arXiv preprint arXiv:2111.06377,
2021. 2, 6, 11
[16] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun.
Deep residual learning for image recognition. CVPR, 2016.
1, 4
[17] Dan Hendrycks, Steven Basart, Norman Mu, Saurav Kada-
vath, Frank Wang, Evan Dorundo, Rahul Desai, Tyler Zhu,
Samyak Parajuli, Mike Guo, Dawn Song, Jacob Steinhardt,
and Justin Gilmer. The Many Faces of Robustness: A Crit-
ical Analysis of Out-of-Distribution Generalization. arXiv
preprint arXiv:2006.16241, 2020. 6
[18] Dan Hendrycks and Thomas Dietterich. Benchmarking Neu-
ral Network Robustness to Common Corruptions and Pertur-
bations. In International Conference on Learning Represen-
tations, 2018. 1, 2, 5, 6
[19] Dan Hendrycks, Norman Mu, Ekin D. Cubuk, Barret Zoph,
Justin Gilmer, and Balaji Lakshminarayanan. AugMix: A
Simple Data Processing Method to Improve Robustness and
Uncertainty. arXiv preprint arXiv:1912.02781, 2019. 1
[20] Dan Hendrycks, Kevin Zhao, Steven Basart, Jacob Stein-
hardt, and Dawn Song. Natural adversarial examples. arXiv
preprint arXiv:1907.07174, 2019. 6
[21] Charles Herrmann, Kyle Sargent, Lu Jiang, Ramin Zabih,
Huiwen Chang, Ce Liu, Dilip Krishnan, and Deqing Sun.
Pyramid Adversarial Training Improves ViT Performance.
arXiv preprint arXiv:2111.15121, 2021. 1, 2, 6
[22] Gao Huang, Yixuan Li, Geoff Pleiss, Zhuang Liu, John E
Hopcroft, and Kilian Q Weinberger. Snapshot ensembles:
Train 1, get m for free. In ICLR, 2017. 2
[23] Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kil-
ian Q Weinberger. Deep networks with stochastic depth. In
European conference on computer vision, pages 646–661.
Springer, 2016. 11
[24] Gabriel Ilharco, Mitchell Wortsman, Samir Yitzhak Gadre,
Shuran Song, Hannaneh Hajishirzi, Simon Kornblith,
Ali Farhadi, and Ludwig Schmidt.
Patching open-
vocabulary models by interpolating weights. arXiv preprint
arXiv:2208.05592, 2022. 2
[25] Pavel Izmailov, Dmitrii Podoprikhin, Timur Garipov, Dmitry
Vetrov, and Andrew Gordon Wilson. Averaging Weights
Leads to Wider Optima and Better Generalization. arXiv
preprint arXiv:1803.05407, 2018. 2
[26] Daniel Kang, Yi Sun, Dan Hendrycks, Tom Brown, and Ja-
cob Steinhardt. Testing Robustness Against Unforeseen Ad-
versaries. arXiv preprint arXiv:1908.08016, 2019. 1
[27] Klim Kireev, Maksym Andriushchenko, and Nicolas Flam-
marion. On the effectiveness of adversarial training against
arXiv preprint arXiv:2103.02325,
common corruptions.
2021. 1, 2, 5
9
by entropy minimization.
Learning Representations, 2021. 8
In International Conference on
[44] Haohan Wang, Songwei Ge, Zachary Lipton, and Eric P
Xing. Learning robust global representations by penalizing
local predictive power. In Advances in Neural Information
Processing Systems, pages 10506–10518, 2019. 6
[45] Ross Wightman.
https :
/ / github . com / rwightman / pytorch - image -
models, 2019. 11
Pytorch image models.
[46] Mitchell Wortsman, Gabriel Ilharco, Samir Yitzhak Gadre,
Rebecca Roelofs, Raphael Gontijo-Lopes, Ari S. Morcos,
Hongseok Namkoong, Ali Farhadi, Yair Carmon, Simon
Kornblith, and Ludwig Schmidt. Model soups: averag-
ing weights of multiple fine-tuned models improves ac-
curacy without increasing inference time. arXiv preprint
arXiv:2203.05482, 2022. 1, 2, 3
[47] Cihang Xie, Mingxing Tan, Boqing Gong, Jiang Wang, Alan
Yuille, and Quoc V Le. Adversarial Examples Improve Im-
age Recognition. arXiv preprint arXiv:1911.09665, 2019. 1,
2, 6
[48] Sangdoo Yun, Dongyoon Han, Seong Joon Oh, Sanghyuk
Chun, Junsuk Choe, and Youngjoon Yoo. Cutmix: Regu-
larization strategy to train strong classifiers with localizable
features. In ICCV, 2019. 11
[49] Sergey Zagoruyko and Nikos Komodakis. Wide residual net-
works. arXiv preprint arXiv:1605.07146, 2016. 4
[50] Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and
David Lopez-Paz. mixup: Beyond empirical risk minimiza-
tion. In ICLR, 2018. 11
[51] Hongyang Zhang, Yaodong Yu, Jiantao Jiao, Eric P. Xing,
Laurent El Ghaoui, and Michael I. Jordan.
Theoreti-
cally Principled Trade-off between Robustness and Accu-
racy. arXiv preprint arXiv:1901.08573, 2019. 1
[28] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton.
Imagenet classification with deep convolutional neural net-
In Advances in neural information processing sys-
works.
tems, pages 1097–1105, 2012. 1
[29] Ilya Loshchilov and Frank Hutter. Decoupled weight decay
regularization. arXiv preprint arXiv:1711.05101, 2017. 11
[30] Divyam Madaan, Jinwoo Shin, and Sung Ju Hwang. Learn-
ing to generate noise for multi-attack robustness. In Interna-
tional Conference on Machine Learning, pages 7279–7289.
PMLR, 2021. 1, 2, 4
[31] Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt,
Dimitris Tsipras, and Adrian Vladu. Towards deep learn-
ing models resistant to adversarial attacks. arXiv preprint
arXiv:1706.06083, 2017. 1, 2, 6
[32] Pratyush Maini, Eric Wong, and J. Zico Kolter. Adversar-
ial Robustness Against the Union of Multiple Perturbation
Models. arXiv preprint arXiv:1909.04068, 2019. 1, 2, 3
[33] Shuaicheng Niu, Jiaxiang Wu, Yifan Zhang, Yaofo Chen,
Shijian Zheng, Peilin Zhao, and Mingkui Tan. Efficient test-
time model adaptation without forgetting. In ICML, 2022.
6
[34] Joaquin Quinonero-Candela, Masashi Sugiyama, Anton
Schwaighofer, and Neil D Lawrence. Dataset shift in ma-
chine learning. 2009. 1, 8
[35] Sylvestre-Alvise Rebuffi, Sven Gowal, Dan A. Calian, Flo-
rian Stimberg, Olivia Wiles, and Timothy Mann. Data
arXiv preprint
Augmentation Can Improve Robustness.
arXiv:2111.05328, 2021. 1, 2
[36] Benjamin Recht, Rebecca Roelofs, Ludwig Schmidt, and
Vaishaal Shankar. Do ImageNet Classifiers Generalize to
ImageNet? arXiv preprint arXiv:1902.10811, 2019. 1, 6
[37] Leslie Rice, Eric Wong, and J. Zico Kolter. Overfit-
ting in adversarially robust deep learning. arXiv preprint
arXiv:2002.11569, 2020. 11
[38] Kate Saenko, Brian Kulis, Mario Fritz, and Trevor Dar-
rell. Adapting visual category models to new domains. In
European conference on computer vision, pages 213–226.
Springer, 2010. 8
[39] Steffen Schneider, Evgenia Rusak, Luisa Eck, Oliver Bring-
mann, Wieland Brendel, and Matthias Bethge.
Improving
robustness against common corruptions by covariate shift
adaptation. Advances in Neural Information Processing Sys-
tems, 33:11539–11551, 2020. 8
[40] Yu Sun, Xiaolong Wang, Zhuang Liu, John Miller, Alexei
Efros, and Moritz Hardt.
Test-time training with self-
In
supervision for generalization under distribution shifts.
International conference on machine learning, pages 9229–
9248. PMLR, 2020. 8
[41] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan
Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus.
arXiv preprint
Intriguing properties of neural networks.
arXiv:1312.6199, 2013. 1
[42] Florian Tram`er and Dan Boneh. Adversarial Training and
Robustness for Multiple Perturbations. In Advances in Neu-
ral Information Processing Systems. 2019. 1, 2, 3, 4
[43] Dequan Wang, Evan Shelhamer, Shaoteng Liu, Bruno Ol-
shausen, and Trevor Darrell. Tent: Fully test-time adaptation
10
A. Experimental details
A.1. Training setup.
CIFAR-10. We train robust models from random initial-
ization for 200 epochs with SGD with momentum as op-
timizer, an initial learning rate of 0.1 (reduced 10 times at
epochs 100 and 150), and a batch size of 128. For fine-
tuning, we train for 10 epochs with cosine schedule for
the learning rate, with peak value of 0.1 (we only use 0.5
for fine-tuning the model trained w.r.t. (cid:96)1 to the (cid:96)2-threat
model) and linear ramp-up in the first 1/10 of training steps.
We generate adversarial perturbations by AUTOPGD with
10 steps. We select checkpoints according to robustness on
a validation set as suggested by [37].
IMAGENET. We follow the setup of [15]: for full train-
ing, we use 300 epochs, AdamW optimizer [29] with mo-
menta β1 = 0.9, β2 = 0.95, weight decay of 0.3 and
a cosine learning rate decay with base learning rate 10−4
(scale as in [14]) and linear ramp-up of 20 epochs, batch
size of 4096, label smoothing of 0.1, stochastic depth [23]
with base value 0.1 and with a dropping probability linearly
increasing with depth. As data augmentation, we use ran-
dom crops resized to 224 × 224 images, mixup [50], Cut-
Mix [48] and RandAugment [7] with two layers, magnitude
9 and a random probability of 0.5. We note that our im-
plementation of RandAugment is based on the version in
the timm library [45]. For VIT architectures, we adopt
exponential moving average with momentum 0.9999. For
fine-tuning we keep the same hyperparameters except for
reducing the base learning rate from 10−4 to 10−5 since
this leads to better performance in the target threat model.
For adversarial training we use AUTOPGD on the KL di-
vergence loss with 2 steps for (cid:96)∞- and (cid:96)2-norm bounded
attacks, 20 steps for (cid:96)1 (as it is a more challenging threat
model for optimization [6]).
Baselines. For MAX and SAT, we fine-tune the singly-
robust models with the same scheme above for the networks
used in the model soups. We generate adversarial perturba-
tions with the the same attacks, and use 10 and 1 epoch of
fine-tuning in the case of CIFAR-10 and IMAGENET respec-
tively. For the baselines in Table 1, we use the same scheme
(except for technique-specific components which follow the
original papers). For AdvProp we use dual normalization
layers and train with random targeted attacks with bound
(cid:15) = 4/255 on the (cid:96)∞-norm.
A.2. Evaluation setup.
Adversarial robustness. As default evaluation we use
AUTOPGD with 40 steps and default parameters, with the
DLR loss [4] for (cid:96)∞- and (cid:96)2-attacks, cross entropy for (cid:96)1.
As a test against stronger attacks, for the evaluation of the
robustness of the soups of three threat models on CIFAR-10
(Fig. 3 and Fig. 10) we increase the budget of AUTOPGD to
100 steps and 5 random restarts (in this case we use targeted
DLR loss for (cid:96)∞ and (cid:96)2, and 1000 test points).
Distribution shifts. For all IMAGENET variants we
evaluate the classification accuracy on the entire dataset.
B. Additional experiments
B.1. Soups with three threat models
We show in Fig. 10 the clean accuracy, robust accu-
racy for each (cid:96)p-norm and their union of the soups obtained
merging three classifiers. We use either a pre-trained clas-
sifier robust w.r.t. (cid:96)2 (top row) or (cid:96)1 (bottom row) and fine-
tune them to the remaining threat models.
B.2. Model soups on IMAGENET variants
We show additional results for model soups on IMA-
GENET variants: first, in Table 2 we report the results on the
full datasets of the second and third best soups according to
the grid search on 1000 points for the shift (we also show
the best soup from Table 1 in the main part). When selecting
the best soup on average across datasets, all three classifiers
have very close performance (59.46% to 59.48%), while
the accuracy on the individual datasets may vary e.g. on
IMAGENET-A and CONFLICT STIMULI. For the dataset-
specific soups the results on the entire datasets respect the
ranking given by the grid search (the three values are sim-
ilar to each other), further suggesting that even a limited
number of points can serve to tune a suitable soup.
Second, we study the effect of varying the radii of the
(cid:96)p-threat models used by the robust classifiers in the soups.
In this case, we fine-tune for 1 epoch the original model ro-
bust w.r.t. (cid:96)∞ at (cid:15) = 4/255 with adversarial training w.r.t.
(cid:96)∞ at (cid:15)∞ ∈ {1/255, 2/255}, (cid:96)2 at (cid:15)2 ∈ {1, 2} ((cid:15)2 = 4
above), (cid:96)2 at (cid:15)1 ∈ {64, 128} ((cid:15)1 = 255 above). In this way
we have three sets of four models to create soups, where the
nominal one is fixed and the robust ones have radii (cid:15)p, (cid:15)p/2
and (cid:15)p/4 for p ∈ {∞, 2, 1}. Table 3 reports the results of
the various sets of models: for the single soup optimized
for average performance, the smaller (cid:15)p slightly reduce the
performance. Looking at the individual datasets, in some
cases like IMAGENET-V2 and IMAGENET-C using smaller
values of (cid:15)p yields some improvements, but it also leads
to severe drops on the distribution shifts where having ro-
bust models is more relevant like CONFLICT STIMULI and
IMAGENET-R. This suggests that it might be useful to have
the same (cid:96)p-norm but with different
models robust w.r.t.
radii in the set of the networks used for creating the soups.
B.3. Composition of soups on IMAGENET-C
In Fig. 11 we visualize the composition of the top-5
soups for each corruption type and severity level: one can
observe that the weights of the four networks in the soups
varies across IMAGENET subset.
11
soup: θ2→∞ + θ2 + θ2→1
soup: θ1→∞ + θ1→2 + θ1
Figure 10. Soups of three models on CIFAR-10: we fine-tune each model robust w.r.t. (cid:96)p for p ∈ {2, 1} (with WIDERESNET-28-10
architecture) to the other threat models for 10 epochs, and show clean accuracy (first column) and robust accuracy w.r.t. every threat model
(second to fourth columns) and their union (last column) of the soups obtained as convex combinations of the three bases.
SETUP
# FP IMAGENET IN-REAL
IN-V2
IN-A
IN-R
IN-
SKETCH
CONFLICT
STIMULI
IN-C
MEAN
Fixed grid search on 1000 images: best soups
×1
Single soup
Dataset-specific soups ×1
82.49%
82.29%
87.85%
87.89%
71.99%
71.95%
34.31%
38.27%
53.84%
56.39%
39.84%
40.73%
38.52%
67.03%
66.82%
69.34%
59.46%
(64.24%)
Fixed grid search on 1000 images: second best soups
×1
Single soup
Dataset-specific soups ×1
82.62%
82.49%
87.92%
87.84%
72.02%
71.94%
30.99%
37.60%
53.28%
56.42%
39.00%
40.76%
41.25%
66.95%
68.75%
69.32%
59.48%
(64.16%)
Fixed grid search on 1000 images: third best soups
×1
Single soup
Dataset-specific soups ×1
82.67%
82.51%
87.86%
87.65%
72.11%
71.58%
34.25%
37.51%
53.18%
55.75%
39.52%
40.65%
38.52%
66.88%
67.60%
68.92%
59.46%
(63.93%)
Table 2. Top-k model soups for IMAGENET variants: we report the classification accuracy on the IMAGENET variants, of the 1st, 2nd
and 3d best soups (single or dataset-specific) found by grid search on the interpolation weights with 1000 points for each dataset.
SETUP
# FP IMAGENET IN-REAL
IN-V2
IN-A
IN-R
IN-
SKETCH
CONFLICT
STIMULI
IN-C
MEAN
Robust models with standard (cid:15)p
×1
Single soup
Dataset-specific soups ×1
82.49%
82.29%
87.85%
87.89%
71.99%
71.95%
34.31%
38.27%
53.84%
56.39%
39.84%
40.73%
38.52%
67.03%
66.82%
69.34%
59.46%
(64.24%)
Robust models with (cid:15)p/2
×1
Single soup
Dataset-specific soups ×1
82.66%
81.85%
87.78%
87.47%
72.34%
72.34%
32.05%
36.25%
51.40%
53.80%
37.80%
39.32%
39.69%
62.19%
69.06%
69.44%
59.10%
(62.83%)
Robust models with (cid:15)p/4
×1
Single soup
Dataset-specific soups ×1
81.47%
82.68%
87.36%
87.72%
70.84%
72.21%
26.23%
35.61%
53.46%
54.00%
39.13%
39.79%
46.25%
59.22%
67.37%
69.49%
59.01%
(62.59%)
Table 3. Varying threat models: we report the classification accuracy on the IMAGENET variants of the best single and dataset-specific
soups when using various radii (cid:15)p for fine-tuning the (cid:96)p-robust networks. The soups are selected via a fixed grid search on the interpolation
weights with 1000 points for each dataset.
12
21clean accuracy21 robust accuracy212 robust accuracy211 robust accuracy21+2+1 robust accuracy899091923040506668707274204060203021clean accuracy21 robust accuracy212 robust accuracy211 robust accuracy21+2+1 robust accuracy8688903035404566687072203040502025303540Figure 11. Best soups over IMAGENET-C subsets: we plot the composition of the top 5 soups found by the grid search for each corruption
type and severity level.
13
01zoom_blursev.=1sev.=2sev.=3sev.=4sev.=501impulse_noise01shot_noise01contrast01glass_blur01defocus_blur01gaussian_noise01pixelate01elastic_transformsev.=1sev.=2sev.=3sev.=4sev.=501brightness01snow01fog01motion_blur01frost01jpeg_compression -> nominal -> 2 -> 1 |
|
http://arxiv.org/abs/2302.10160v2 | 2023-03-15T00:14:26 | 2023-02-20T18:46:12 | Pseudo-Labeling for Kernel Ridge Regression under Covariate Shift | We develop and analyze a principled approach to kernel ridge regression under
covariate shift. The goal is to learn a regression function with small mean
squared error over a target distribution, based on unlabeled data from there
and labeled data that may have a different feature distribution. We propose to
split the labeled data into two subsets and conduct kernel ridge regression on
them separately to obtain a collection of candidate models and an imputation
model. We use the latter to fill the missing labels and then select the best
candidate model accordingly. Our non-asymptotic excess risk bounds show that in
quite general scenarios, our estimator adapts to the structure of the target
distribution as well as the covariate shift. It achieves the minimax optimal
error rate up to a logarithmic factor. The use of pseudo-labels in model
selection does not have major negative impacts. | [
"Kaizheng Wang"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.10160v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.10160v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "stat.ME",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"stat.ME",
"cs.LG",
"math.ST",
"stat.ML",
"stat.TH",
"62J07, 62G05"
] | 3
2
0
2
r
a
M
5
1
]
E
M
.
t
a
t
s
[
2
v
0
6
1
0
1
.
2
0
3
2
:
v
i
X
r
a
Pseudo-Labeling for Kernel Ridge Regression under Covariate
Shift
Kaizheng Wang∗
This version: March 2023
Abstract
We develop and analyze a principled approach to kernel ridge regression under covariate
shift. The goal is to learn a regression function with small mean squared error over a target
distribution, based on unlabeled data from there and labeled data that may have a different
feature distribution. We propose to split the labeled data into two subsets and conduct kernel
ridge regression on them separately to obtain a collection of candidate models and an imputation
model. We use the latter to fill the missing labels and then select the best candidate model
accordingly. Our non-asymptotic excess risk bounds show that in quite general scenarios, our
estimator adapts to the structure of the target distribution as well as the covariate shift. It
achieves the minimax optimal error rate up to a logarithmic factor. The use of pseudo-labels in
model selection does not have major negative impacts.
Keywords: Covariate shift, kernel ridge regression, imputation, pseudo-labeling, transfer learning.
1
Introduction
Covariate shift is a phenomenon that occurs when the feature distribution of the test data differs
from that of the training data. It can cause performance degradation of the model, as the training
samples may have poor coverage of challenging cases to be encountered during deployment. Such
issue arises from a variety of scientific and engineering applications (Heckman, 1979; Zadrozny,
2004; Sugiyama and Kawanabe, 2012). For instance, a common task in personalized medicine is to
predict the treatment effect of a medicine given a patient's covariates. However, the labeled data
are oftentimes collected from particular clinical trials or observational studies, which may not be
representative of the population of interest. Direct uses of traditional supervised learning techniques,
such as empirical risk minimization and cross-validation, could yield sub-optimal results. Indeed,
their theories are mostly built upon the homogeneity assumption that the training and test data
share the same distribution (Vapnik, 1999).
Acquisition of labeled data from the target population can be costly or even infeasible. In the
above example of personalized medicine, it requires conducting new clinical trials. On the other
hand, unlabeled data are cheaply available. This leads to the following fundamental question that
motivates our study:
How to train a predictive model using only unlabeled data from the distribution of interest
and labeled data from a relevant distribution?
∗Department of IEOR and Data Science Institute, Columbia University. Email: [email protected].
1
It is a major topic in domain adaptation and transfer learning (Pan and Yang, 2010; Sugiyama and
Kawanabe, 2012), where the distribution of interest is called the target and the other one is called
the source. The missing labels in the target data create a significant obstacle for model assessment
and selection, calling for principled approaches without ad hoc tuning.
In this paper, we provide a solution to the above problem in the context of
Our contributions
kernel ridge regression (KRR). We work under the standard assumption of covariate shift that the
source and the target share the same conditional label distribution. In addition, the conditional
expectation of the label given covariates is described by a function that belongs to a reproducing
kernel Hilbert space (RKHS). The goal is to learn the regression function with small mean squared
error over the target distribution. While KRR is a natural choice, its performance depends on a
penalty parameter that is usually selected by hold-out validation or cross-validation. Neither of
them is directly applicable without labels. We propose to fill the missing labels using an imputation
model trained on part of the source data. Meanwhile, we train a collection of candidate models
on the rest of the source data. All models are trained by KRR with different penalty parameters.
Finally, we select the best candidate model using the pseudo-labels.
Our approach is conceptually simple and computationally efficient. By generating pseudo-labels,
it reduces the original problem to KRR with hold-out validation. However, we seem to be in a chicken
and egg situation. One the one hand, quality output requires a good imputation model. On the
other hand, if we already know how to obtain a good imputation model using KRR, why not directly
train the final model? We resolve this dilemma by showing that the overhead incurred by pseudo-
labels can be significantly smaller than their mean squared error. The theory provides a simple
choice of the penalty parameter for training a rudimentary imputation model whose inaccuracy has
negligible impact on the selected model.
In many common scenarios, our estimator is minimax
optimal up to a logarithmic factor and adapts to the unknown covariate shift. At the heart of
our analysis is a bias-variance decomposition of the imputation model's impact on model selection,
which is different from the usual bias-variance decomposition of the mean squared error. It shows
that pseudo-labels with large mean squared error may still be useful for model selection purposes.
Related work Here we give a non-exhaustive review of related work in the literature. As we
mentioned above, our final estimator is selected by hold-out validation with pseudo-labels. Simple
as it is, hold-out validation is one of the go-to methods for model selection in supervised learning.
When there is no covariate shift, Blanchard and Massart (2006) proved that the selected model
adapts to the unknown noise condition in many classification and regression problems. Caponnetto
and Yao (2010) showed that KRR tuned by hold-out validation achieves the minimax optimal error
rate. Our study further reveals that faithful model selection is possible even if the validation labels
are synthetic and the imputation model is trained on a different distribution.
Filling the missing labels by a trained model is referred to as pseudo-labeling (Lee, 2013), which
successfully reduces the labeling cost. It belongs to the family of imputation methods for missing
data analysis and causal inference in statistics (Little and Rubin, 2019). There has been a line of
recent work (Hirshberg et al., 2019; Kallus, 2020; Hirshberg and Wager, 2021; Mou et al., 2022,
2023) applying the idea to average treatment effect estimation, which amounts to estimating the
mean response (label) over the target distribution in our setting. The focus is different from ours,
as we aim to estimate the whole function and need to select the model using the imputed data.
A common technique for learning under covariate shift is propensity weighting (Little and Rubin,
2019). Note that the empirical risk defined by the source data is generally a biased estimate of
the target population risk. A natural way of bias correction is to reweight the source data by
2
the likelihood ratio between the target covariate distribution and the source one. The reweighted
empirical risk then serves as the objective function. The weights may be truncated so as to reduce
the variance (Shimodaira, 2000; Cortes et al., 2010; Sugiyama and Kawanabe, 2012; Ma et al.,
2022). Such methods need absolute continuity of the target distribution with respect to the source,
as well as knowledge about the likelihood ratio. The former is a strong assumption, and the latter
is notoriously hard to estimate in high dimensions. Matching methods came as a remedy (Huang
et al., 2006). Yet, they require solving large optimization problems to obtain the importance weights.
Moreover, theoretical understanding of the resulting model is largely lacking.
There is a recent surge of interest in the theory of transfer learning under distribution shift. Most
works focus on the value of source data, assuming either the target data are labeled, or the target
covariate distribution is known (Ben-David et al., 2010; Hanneke and Kpotufe, 2019; Mousavi Kalan
et al., 2020; Yang et al., 2020; Kpotufe and Martinet, 2021; Cai and Wei, 2021; Reeve et al., 2021;
Tripuraneni et al., 2021; Maity et al., 2022; Schmidt-Hieber and Zamolodtchikov, 2022; Pathak
et al., 2022; Wu et al., 2022). When there are only finitely many unlabeled target samples, one
needs to extract information about the covariate shift and incorporate that into learning. Liu et al.
(2020) studied doubly-robust regression under covariate shift. Lei et al. (2021) obtained results for
ridge regression in a Bayesian setting. Ma et al. (2022) conducted an in-depth analysis of regression
in an RKHS when the target covariate distribution and the source one have bounded likelihood
ratio or finite χ2 divergence. In the former case, KRR with a properly chosen penalty was shown to
be minimax optimal up to a logarithmic factor. The optimal penalty depends on the upper bound
on the likelihood ratio, which is hard to estimate using finite data. Under the same setup, our
estimator enjoys the optimality guarantees without the need to know the amount of covariate shift.
In the latter case, the authors proved the optimality of a reweighted version of KRR using truncated
likelihood ratios. It would be interesting to develop an adaptive estimator for that setting.
Outline The rest of the paper is organized as follows. Section 2 describes the problem of covariate
shift and its challenges. Section 3 introduces the methodology. Section 4 presents excess risk bounds
for our estimator and discuss its minimax optimality. Section 5 explains the power of pseudo-
labeling. Section 6 provides the proofs of our main results. Finally, Section 7 concludes the paper
and discusses possible future directions.
Notation The constants c1, c2, C1, C2, * * * may differ from line to line. Define x+ = max{x, 0}
for x ∈ R. We use the symbol [n] as a shorthand for {1, 2, * * * , n} and | * | to denote the absolute
,
value of a real number or cardinality of a set. For nonnegative sequences {an}∞
n=1
we write an (cid:46) bn or an = O(bn) or bn = Ω(an) if there exists a positive constant C such that
an ≤ Cbn. In addition, we write an (cid:16) bn if an (cid:46) bn and bn (cid:46) an; an = o(bn) if an = O(cnbn)
for some cn → 0. For a matrix A, we use (cid:107)A(cid:107)2 = sup(cid:107)x(cid:107)2=1 (cid:107)Ax(cid:107)2 to denote its spectral norm.
For a bounded linear operator A between two Hilbert spaces H1 and H2, we define its operator
norm (cid:107)A(cid:107) = sup(cid:107)u(cid:107)H1 =1 (cid:107)Au(cid:107)H2
. For a bounded, self-adjoint linear operator A mapping a Hilbert
space H to itself, we write A (cid:23) 0 if (cid:104)u, Au(cid:105) ≥ 0 holds for all u ∈ H; in that case, we define
(cid:107)u(cid:107)A = (cid:104)u, Au(cid:105). For any u and v in a Hilbert space H, their tensor product u ⊗ v is a linear
operator from H to itself that maps any w ∈ H to (cid:104)v, w(cid:105)u. Define (cid:107)X(cid:107)ψ2 = supp≥1{p−1/2E1/p|X|p}
and (cid:107)X(cid:107)ψ1 = supp≥1{p−1E1/p|X|p} for a random variable X.
If X is a random element in a
separable Hilbert space H, then we let (cid:107)X(cid:107)ψ2 = sup(cid:107)u(cid:107)H=1 (cid:107)(cid:104)u, X(cid:105)(cid:107)ψ2
and {bn}∞
n=1
.
3
2 Problem setup
2.1 Linear model and covariate shift
i=1
i=1
and {x0i}n0
i=1
and {(x0i, y0i)}n0
i=1
Let {(xi, yi)}n
be two datasets named the source and the target, respectively.
Here xi, x0i ∈ X are covariate vectors in some feature space X ; yi, y0i ∈ R are responses. How-
ever, the target responses {y0i}n0
are unobserved. The goal is to learn a predictive model from
i=1
{(xi, yi)}n
that works well on the target data.
The task is impossible when the source and the target datasets are arbitrarily unrelated. To
make the problem well-posed, we adopt a standard assumption that the source and the target
datasets share a common regression model.
In our basic setup, the feature space X is a finite-
dimensional Euclidean space Rd, the data are random samples from an unknown distribution, and
the conditional mean response is a linear function of the covariates. Below is the formal statement.
Assumption 2.1 (Common linear model and random designs). The datasets {(xi, yi)}n
{(x0i, y0i)}n0
• The distributions of covariates xi and x0i are P and Q, respectively. Furthermore, Σ = E(xix(cid:62)
i )
i=1 are independent, each of which consists of i.i.d. samples.
i=1 and
and Σ0 = E(x0ix(cid:62)
0i) exist.
• There exists θ(cid:63) ∈ Rd such that E(yi|xi) = (cid:104)xi, θ(cid:63)(cid:105) and E(y0i|x0i) = (cid:104)x0i, θ(cid:63)(cid:105).
• Let εi = yi − (cid:104)xi, θ(cid:63)(cid:105) and ε0i = y0i − (cid:104)x0i, θ(cid:63)(cid:105). Conditioned on {xi}n
i=1 have finite second moments.
i=1 and {ε0i}n0
{εi}n
i=1 and {x0i}n0
i=1, the errors
More generally, we will study linear model in a reproducing kernel Hilbert space (RKHS) with
possibly infinite dimensions. The feature space X can be any set. Suppose that we have a symmetric,
positive semi-definite kernel K : X × X → R satisfying the conditions below:
• (Symmetry) For any z ∈ X and w ∈ X , K(z, w) = K(w, z);
• (Positive semi-definiteness) For any m ∈ Z+ and {zi}m
i=1 ⊆ X , the m × m matrix [K(zi, zj)]m×m
is positive semi-definite.
According to the Moore-Aronszajn Theorem (Aronszajn, 1950), there exists a Hilbert space H with
inner product (cid:104)*, *(cid:105) and a mapping φ : X → H such that K(z, w) = (cid:104)φ(z), φ(w)(cid:105), ∀z, w ∈ X . The
kernel function K and the associated space H are called a reproducing kernel and a reproducing
kernel Hilbert space, respectively. Now, we upgrade Assumption 2.1 to the RKHS setting.
Assumption 2.2 (Common linear model in RKHS and random designs). The datasets {(xi, yi)}n
and {(x0i, y0i)}n0
• The distributions of covariates xi and x0i are P and Q, respectively. Furthermore, Σ = E[φ(xi)⊗
i=1 are independent, each of which consists of i.i.d. samples.
i=1
φ(xi)] and Σ0 = E[φ(x0i) ⊗ φ(x0i)] are trace class.
• There exists θ(cid:63) ∈ H such that E(yi|xi) = (cid:104)φ(xi), θ(cid:63)(cid:105) and E(y0i|x0i) = (cid:104)φ(x0i), θ(cid:63)(cid:105).
• Let εi = yi − (cid:104)φ(xi), θ(cid:63)(cid:105) and ε0i = y0i − (cid:104)φ(x0i), θ(cid:63)(cid:105). Conditioned on {xi}n
i=1 and {x0i}n0
i=1, the
errors {εi}n
i=1 and {ε0i}n0
i=1 have finite second moments.
Under Assumption 2.2, the conditional mean function of the response f (cid:63)(*) = (cid:104)φ(*), θ(cid:63)(cid:105) belongs
to a function class
(cid:26)
F =
fθ : X → R
(cid:12)
(cid:12)
(cid:12)
(cid:12)
fθ(x) = (cid:104)φ(x), θ(cid:105) for some θ ∈ H
(cid:27)
4
generated by the reproducing kernel K. Define (cid:107)fθ(cid:107)F = (cid:107)θ(cid:107)H. It is easily seen that (cid:107) * (cid:107)F is a
norm and F becomes a Hilbert space that is isomorphic to H. Below are a few common examples
(Wainwright, 2019).
Example 2.1 (Linear and affine kernels). Let X = Rd. The linear kernel K(z, w) = z(cid:62)w gives
the standard inner product. In that case, H = Rd, φ(x) = x is the identity map, and F is the class
of all linear functions (without intercepts). An extension is the affine kernel K(z, w) = 1 + z(cid:62)w
that generates all affine functions (with intercepts).
Example 2.2 (Polynomial kernels). Let X = Rd. The homogeneous polynomial kernel of degree
m ≥ 2 is K(z, w) = (z(cid:62)w)m for some integer m ≥ 2. The corresponding H is the Euclidean
space of dimension (cid:0)m+d−1
(cid:1), the coordinates of φ are degree-m monomials, and F is the class of
all homogeneous polynomials of degree m. An extension is the inhomogeneous polynomial kernel
K(z, w) = (1 + z(cid:62)w)m that generates all polynomials of degree m or less.
m
Example 2.3 (Laplace and Gaussian kernels). Let X = Rd and α > 0. The Laplace and Gaussian
kernels are K(z, w) = e−α(cid:107)z−w(cid:107)2 and K(z, w) = e−α(cid:107)z−w(cid:107)2
2, respectively. In either case, F is
infinite-dimensional.
Example 2.4 (First-order Sobolev kernel). Let X = [0, 1] and K(z, w) = min{z, w}. Then, F is
the first-order Sobolev space
(cid:26)
F =
f :
[0, 1] → R
(cid:12)
(cid:12)
(cid:12)
(cid:12)
f (0) = 0,
|f (cid:48)(x)|2dx < ∞
(cid:27)
.
(cid:90) 1
0
Any f ∈ F is absolutely continuous on [0, 1] with square integrable derivative function.
The function spaces are finite-dimensional in Examples 2.1 and 2.2, and infinite-dimensional in
the others. For any f ∈ F serving as a predictive model, we measure its risk by the out-of-sample
mean squared prediction error on the target population:
R(f ) = E[f (xnew) − ynew]2,
where (xnew, ynew) is a new sample drawn from the target distribution. Under Assumption 2.2, f (cid:63)
is a minimizer of the functional R(*), and
R(f ) − R(f (cid:63)) = Ex∼Q|f (x) − f (cid:63)(x)|2.
In words, the excess risk is equal to the mean squared estimation error over the distribution Q.
We emphasize that neither P nor Q is known to us, and we merely have a finite number of
samples. The difference between P and Q is called the covariate shift. Below we explain why it
brings challenges to learning in high dimensions.
2.2 Ridge regression and new challenges
Consider a finite-dimensional linear model (Assumption 2.1). When span{xi}n
least squares (OLS) regression
i=1 = Rd, the ordinary
min
θ∈Rd
(cid:26) 1
n
n
(cid:88)
i=1
((cid:104)xi, θ(cid:105) − yi)2
(cid:27)
5
has a unique solution, and it is an unbiased estimate of θ(cid:63). When span{xi}n
of Rd (e.g., if d > n), a popular approach is ridge regression (Hoerl and Kennard, 1970)
i=1
is a proper subspace
min
θ∈Rd
(cid:26) 1
n
n
(cid:88)
i=1
((cid:104)xi, θ(cid:105) − yi)2 + λ(cid:107)θ(cid:107)2
2
(cid:27)
.
(2.1)
The tuning parameter λ > 0 ensures the uniqueness of solution and enhances its noise stability.
Ridge regression is suitable if we have prior knowledge that (cid:107)θ(cid:63)(cid:107)2 is not too large.
An extension to the RKHS setting (Assumption 2.2) is kernel ridge regression (KRR)
min
f ∈F
(cid:26) 1
n
n
(cid:88)
i=1
[f (xi) − yi]2 + λ(cid:107)f (cid:107)2
F
(cid:27)
,
(2.2)
which reduces to the ridge regression (2.1) when X = Rd and K is the linear kernel in Exam-
ple 2.1. Although F may have infinite dimensions in general, it was shown (Wahba, 1990) that
the optimal solution to (2.2) has a finite-dimensional representation (cid:98)f (*) = (cid:80)n
i=1 (cid:98)αiK(xi, *), with
(cid:98)α = ((cid:98)α1, * * * , (cid:98)αn)(cid:62) being the unique solution to the quadratic program
(cid:26) 1
n
min
α∈Rn
(cid:107)Kα − y(cid:107)2
2 + λα(cid:62)Kα
(cid:27)
,
with K = [K(xi, xj)]n×n and y = (y1, * * * , yn)(cid:62).
For both ridge regression (2.1) and its kernelized version (2.2), choosing a large λ shrinks the
variance but inflates the bias. Quality outputs hinge on a balance between the above two effects.
In practice, tuning is often based on risk estimation using hold-out validation, cross-validation, and
so on. For instance, suppose that we have a finite set Λ of candidate tuning parameters. Each
λ ∈ Λ is associated with a candidate model (cid:98)fλ ∈ F that solves the program (2.2). If the responses
{y0i}n0
in the target data were observed, we could estimate the out-of-sample risk of every (cid:98)fλ by
i=1
its empirical version
1
n0
n0(cid:88)
i=1
[ (cid:98)fλ(x0i) − y0i]2,
and then select the one with the smallest empirical risk. Unfortunately, the missing responses
in the target data create a visible obstacle. Although the source data are labeled, they are not
representative for the target distribution in the presence of covariate shift. The tuning parameter
with the best predictive performance on the source could be sub-optimal for the target. We need
a reliable estimate of the target risk. This is no easy task in general. Another issue is that even
if a risk estimate is available, it is still not clear whether training on the source and tuning on the
target is good enough.
Theoretical studies also shed lights on the impact of covariate shift. Below is one example.
Example 2.5. Consider the Sobolev space in Example 2.4, which has (cid:107)f (cid:107)F =
P be the uniform distribution over [0, 1]. Assume that the errors {εi}n
i=1 are i.i.d. N (0, σ2).
(cid:113)(cid:82) 1
0 |f (cid:48)(x)|2dx. Let
• If Q = P , then the minimax optimal rate of the prediction error over the ball {f : (cid:107)f (cid:107)F ≤ R} is
R2n )2/3 (Wainwright, 2019).
achieved by KRR (2.2) with λ (cid:16) ( σ2
6
• If Q is the pointmass at some x0 ∈ [0, 1], i.e. we only want to predict the response at a single
point, then KRR (2.2) with λ = σ2
R2n achieves the smallest worst-case risk among estimators that
are linear in y (Speckman, 1979; Li, 1982). It is minimax optimal up to a factor of 5/4 over all
estimators (Donoho, 1994).
This example shows the dependence of optimal tuning on the target data. When Q is spread
out, we have to estimate the whole function, need a large λ to supress the variance, and can afford
a fair amount of bias. When Q is concentrated, we are faced with a different bias-variance trade-off.
An ideal method should automatically adapt to the structures of P and Q. In the next section, we
will present a simple approach to tackle the aforementioned challenges.
3 Methodology
We consider the problem of kernel ridge regression under covariate shift (Assumption 2.2). As the
most prominent issue is the lack of target labels, we develop a regression imputation method to
generate synthetic labels. The idea is to estimate the true regression function using part of the
source data and then feed the obtained imputation model with the unlabeled target data. This is
called pseudo-labeling in the machine learning literature (Lee, 2013). Below is a complete description
of our proposed approach:
1. (Data splitting) Choose some ρ ∈ (0, 1) and randomly partition the source dataset {(xi, yi)}n
i=1
into two disjoint subsets D1 and D2 of sizes (cid:100)(1 − ρ)n(cid:101) and (cid:98)ρn(cid:99), respectively.
2. (Training) Choose a finite collection of penalty parameters Λ ⊆ (0, +∞) and (cid:101)λ > 0. Run kernel
ridge regression on D1 to get candidate models { (cid:98)fλ}λ∈Λ, where
(cid:26) 1
|D1|
|f (x) − y|2 + λ(cid:107)f (cid:107)2
F
(cid:98)fλ = argmin
(cid:88)
f ∈F
(x,y)∈D1
(cid:27)
,
∀λ ∈ Λ.
Run kernel ridge regression on D2 to get an imputation model
(cid:101)f = argmin
f ∈F
(cid:26) 1
|D2|
(cid:88)
(x,y)∈D2
|f (x) − y|2 + (cid:101)λ(cid:107)f (cid:107)2
F
(cid:27)
.
3. (Pseudo-labeling) Generate pseudo-labels
(cid:101)y0i = (cid:101)f (x0i) for i ∈ [n0].
4. (Model selection) Select any
(cid:98)λ ∈ argmin
λ∈Λ
(cid:26) 1
n0
n0(cid:88)
i=1
| (cid:98)fλ(x0i) − (cid:101)y0i|2
(cid:27)
,
(3.1)
and output (cid:98)f = (cid:98)f
(cid:98)λ
as the final model.
The first two steps are conducted on the source data only, summarizing the information into
candidate models and an imputation model. After that, the raw source data will no longer be
used. Given a set of unlabeled data from the target distribution, we generate pseudo-labels using
the imputation model and then select the candidate model that best fits them. The method is
computationally efficient because kernel ridge regression is easily solvable and the other operations
(pseudo-labeling and model selection) run even faster.
7
The hyperparameters ρ, Λ and (cid:101)λ need to be specified by the user. The first two are standard
and also arise in penalized regression without covariate shift. The last one is the crux because it
affects the qualities of the imputation model (cid:101)f , the pseudo-labels {(cid:101)y0i}n0
, and thus the selected
model (cid:98)f . In Section 4, we will provide practical guidance based on a theoretical study. Roughly
speaking,
i=1
• The fraction ρ is set to be a constant, such as 50%.
• The set of penalty parameters Λ consists of a geometric sequence from O(n−1) to O(1) up to
logarithmic factors, with O(log n) elements. The resulting candidate models span a wide spectrum
from undersmoothed to oversmoothed ones.
• The penalty parameter (cid:101)λ is set to be O(n−1) up to a logarithmic factor. In fact, the model selection
accuracy depends on the bias and a variance proxy of the pseudo-label vector
(cid:101)y = ((cid:101)y01, * * * , (cid:101)y0n0)(cid:62)
in a delicate way. Choosing (cid:101)λ (cid:16) n−1 achieves a bias-variance tradeoff that minimizes the impact
on model selection, rather than the usual one for minimizing the mean squared prediction error.
To get ideas about why imperfect pseudo-labels may still lead to faithful model selection, imagine
that the responses {y0i}n0
of the target data were observed. Then, we could estimate the risk of a
i=1
candidate (cid:98)fλ by 1
i=1 | (cid:98)fλ(x0i) − y0i|2 and then perform model selection accordingly. While y0i
n0
is a noisy version of f (cid:63)(x0i) with zero bias and non-vanishing variance σ2, such hold-out validation
method works well in practice.
(cid:80)n0
Ideally, we want to set the hyperparameters ρ, Λ and (cid:101)λ without seeing the target data. Once
the latter become available, we want to output a model that adapts to the covariate shift and the
structure of the target distribution. According to our theories in Section 4, this is indeed possible
in many common scenarios.
4 Excess risk bounds and their optimalities
This section is devoted to theoretical guarantees for our proposed method. We will present excess
risk bounds for the final model and discuss its minimax optimalitiy. In particular, we will show that
the excess risk of the final model is at most a small multiple of the best one achieved by candidates
plus some small overhead.
We study kernel ridge regression (2.2) in the RKHS setting (Assumption 2.2), which covers ridge
regression (2.1) in the Euclidean setting (Assumption 2.1) as a special case. Our analysis is based
upon mild regularity assumptions. On the one hand, the noise εi can be dependent on the covariates
xi, but it needs to have sub-Gaussian tails when conditioned on the latter.
Assumption 4.1 (Sub-Gaussian noise). Conditioned on xi, the noise variable εi is sub-Gaussian:
{p−1/2E1/p(|εi|p|xi)} ≤ σ < ∞.
sup
p≥1
On the other hand, the covariates either have bounded norms or satisfy a strong version of the
sub-Gaussianity assumption.
Assumption 4.2 (Bounded covariates). (cid:107)φ(xi)(cid:107)H ≤ M and (cid:107)φ(x0i)(cid:107)H ≤ M hold almost surely for
some M < ∞.
Assumption 4.3 (Strongly sub-Gaussian covariates). There exists a constant κ ∈ [1, ∞) such that
(cid:107)(cid:104)φ(xi), v(cid:105)(cid:107)2
ψ2
≤ κE|(cid:104)φ(xi), v(cid:105)|2 and (cid:107)(cid:104)φ(x0i), v(cid:105)(cid:107)2
ψ2
≤ κE|(cid:104)φ(x0i), v(cid:105)|2 hold for all v ∈ H.
8
Assumption 4.2 holds if the reproducing kernel K is uniformly bounded over the domain. This
includes Examples 2.3 and 2.4, as well as Examples 2.1 and 2.2 with X being a compact subset
of Rd. Assumption 4.3, also known as the ψ2 − L2 norm equivalence, is commonly used in high-
dimensional statistics (Vershynin, 2010; Koltchinskii and Lounici, 2017). The constant κ is invariant
under bounded linear transforms of φ(xi) and φ(x0i). Combined with Assumption 2.2, it implies
that
(cid:107)(cid:104)φ(xi), v(cid:105)(cid:107)2
≤ κ(cid:107)Σ0(cid:107) * (cid:107)v(cid:107)2
ψ2 ≤ κ(cid:104)v, Σv(cid:105) ≤ κ(cid:107)Σ(cid:107) * (cid:107)v(cid:107)2
H
H. Therefore, both φ(xi) and φ(x0i) are sub-Gaussian.
and similarly, (cid:107)(cid:104)φ(x0i), v(cid:105)(cid:107)2
ψ2
In the Euclidean case (Example 2.1) with X = H = Rd and φ(x) = x, Assumption 4.3 is equivalent
to (cid:107)(Σ†)1/2xi(cid:107)ψ2 ≤ κ and (cid:107)(Σ†
0)1/2x0i(cid:107)ψ2 ≤ κ, where the superscript † denotes the Moore-Penrose
pseudoinverse. It holds when xi ∼ N (0, Σ) and x0i ∼ N (0, Σ0).
We are ready to state our general results on the excess risk of the final model (cid:98)f . The proof is
deferred to Section 6.2.3.
Theorem 4.1 (Excess risk of the final model). Let Assumptions 2.2 and 4.1 hold. Choose any
δ ∈ (0, 1/5]. Suppose that ρn is an integer, c ≥ 1 is a constant, 1/c ≤ n0/n ≤ c, Λ = {λ1, * * * , λm}
satisfies 2 ≤ m ≤ nc, and 0 < λj < λj+1 ≤ βλj holds for all j ∈ [m − 1] and some β ≥ 1. For any
λ > 0, define
Sλ = (Σ + λI)−1/2Σ0(Σ + λI)−1/2,
E(λ, δ) = λ(cid:107)Sλ(cid:107) * (cid:107)θ(cid:63)(cid:107)2
H +
σ2 Tr(Sλ) log(m/δ)
(1 − ρ)n
,
ξ((cid:101)λ, δ) =
(cid:18)
(cid:101)λ(cid:107)θ(cid:63)(cid:107)2
H +
σ2 log(m/δ)
ρn
(cid:19)
((cid:107)S
(cid:101)λ(cid:107) + 1).
1. Under Assumption 4.2, there exist constants C, C0 and C1 such that when (cid:101)λ ≥ CM 2 log(n/δ)
ρn
and
λ1 ≥ CM 2 log(n/δ)
(1−ρ)n
, we have
(cid:18)
P
R( (cid:98)f ) − R(f (cid:63)) ≤ C0β min
λ1≤λ≤λm
E(λ, δ) + C1ξ((cid:101)λ, δ)
≥ 1 − δ.
(cid:19)
(4.1)
2. Under Assumption 4.3, there exist constants C, C0 and C1 determined by κ such that when
, n0 ≥ Cκ2 log(|Λ|/δ) and n0/ Tr(Σ0) ≥ n/ Tr(Σ), we
, λ1 ≥ C Tr(Σ) log(1/δ)
(cid:101)λ ≥ C Tr(Σ) log(1/δ)
have the excess risk bound (4.1).
ρn
(1−ρ)n
The matrix Sλ looks like a (regularized) ratio between the second-moment matrices of distri-
butions Q and P , reflecting the impact of covariate shift on regression. For every λ ∈ [λ1, λm],
the quantity E(λ, δ) is an upper bound (up to a constant factor) on the excess risk of (cid:98)fλ. Hence,
minλ1≤λ≤λm E(λ, δ) controls the smallest error achieved by the models in { (cid:98)fλ}λ1≤λ≤λm
. As we
approximate the continuous index set [λ1, λm] by a discrete one Λ = {λ1, * * * , λm} satisfying
1 < λj+1/λj ≤ β, we lose a factor of β at most. On the other hand, ξ((cid:101)λ, δ) is an upper bound (up
to a constant factor) on the error caused by model selection. It reflects the error of the imputation
model (cid:101)f that produces the pseudo-labels. Therefore, the excess risk bound in Theorem 4.1 has the
form of an oracle inequality.
To facilitate interpretation, we present simpler bounds in Theorem 4.2 below based on additional
regularity assumptions. See Appendix B for the proof.
9
Assumption 4.4. Suppose that n ≥ 2, Λ = {2kλ0 : k = 0, 1, * * * , (cid:100)log2 n(cid:101)}, ρ ∈ (0, 1) is bounded
away from {0, 1}, ρn is an integer, and n0/n is bounded away from {0, ∞}. In addition, one of the
followings is true for some constant c:
1. Assumption 4.2 holds, (cid:101)λ = cM 2 log(n/δ)
and λ0 = cM 2 log(n/δ)
.
(1−ρ)n
ρn
2. Assumption 4.3 holds, (cid:101)λ = c Tr(Σ) log(1/δ)
ρn
, λ0 = c Tr(Σ) log(1/δ)
(1−ρ)n
and cn0/ Tr(Σ0) ≥ n/ Tr(Σ).
Theorem 4.2. Let Assumptions 2.2 and 4.1 hold, and Σ0 (cid:22) BΣ for some B ∈ [1, ∞). Denote by
{μj}∞
j=1 the eigenvalues of Σ0 sorted in descending order, and define D(r) = min{j ≥ 1 : μj ≤ r2}
for any r > 0. Assume that
∞
(cid:88)
j=D(r)+1
μj ≤ c0D(r)r2,
∀r > 0
(4.2)
holds for some universal constant c0. There exist constants C and C0 such that if Assumption 4.4
holds with c > C, we have the following bound with probability at least 1 − δ:
R( (cid:98)f ) − R(f (cid:63)) ≤ C0
√
min
√
Bλ0≤r≤
nBλ0
(cid:26)
r2(cid:107)θ(cid:63)(cid:107)2
H + σ2B
D(r) log( log n
δ )
n
(cid:27)
.
The error bound in Theorem 4.2 depends on the amount of covariate shift B and the spectrum
of the second-moment matrix associated with the target covariate distribution Q. The two
{μj}∞
j=1
terms r2(cid:107)θ(cid:63)(cid:107)2
δ ) correspond to the squared bias and variance. As r goes
to zero, the bias shrinks but the variance grows. Now, we briefly explain the intuitions behind the
regularity assumptions.
H and n−1σ2BD(r) log( log n
• The assumption Σ0 (cid:22) BΣ can be implied by the "bounded density ratio" assumption (Q (cid:28) P
and dQ
dP ≤ B) in the study of covariate shift (Cortes et al., 2010; Ma et al., 2022). Aside from
that, Σ0 (cid:22) BΣ does not really require Q (cid:28) P . For instance, in the Euclidean setting (X = Rd
and K(z, w) = z(cid:62)w), if Q = N (0, I) and P has independent marginals that are uniform over
[−1, 1], then Σ = 1
3 Σ0. Intuitively, B−1 measures the strength of coverage of P over Q.
An inspection of the proof shows that Theorem 4.2 continues to hold if Σ0 (cid:22) BΣ is relaxed
to Σ0 (cid:22) B(Σ + αI) for some positive α (cid:46) Tr(Σ)
. This allows the range of target covariates
n
to be partially covered by that of source covariates. With a positive α, we can always make
Σ0 (cid:22) B(Σ + αI) hold by choosing a large B.
3 I = 1
• In the literature of kernel ridge regression, any spectrum {μj}∞
j=1
satisfying (4.2) is said to be
regular (Wainwright, 2019). The condition holds for commonly studied examples. For every
threshold r > 0, the quantity D(r) − 1 is the number of eigenvalues that are above r2. If {μj}∞
j=1
decays slowly, then D(r) grows fast as r goes to zero.
On the other hand, the penalty parameters Λ and (cid:101)λ in Theorem 4.2 are chosen solely based
on the sample size n, exceptional probability δ, and the norm bound M or Tr(Σ) for the source
distribution. They do not require any knowledge about the target distribution. It is worth pointing
out that the penalty parameter (cid:101)λ is not chosen to minimize the prediction error of the imputation
model (cid:101)f . In fact, the optimal tuning for the latter goal depends on the whole spectrum of Σ and
typically ranges from O(n−1) to O(n−1/2), ignoring the dependence on other structural parameters
and logarithmic parameters (Wainwright, 2019). In Section 5, we will explain why the small (cid:101)λ in
our method leads to decent pseudo-labels for model selection.
10
The corollary below shows that our method can achieve the minimax optimal rate of excess
risk in many common scenarios, whose proof is in Appendix C. This has a significant algorithmic
implication that we can train the candidate models { (cid:101)fλ}λ∈Λ and the imputation model (cid:101)f before
seeing the target data, and then select a good model based on pseudo-labeling.
Corollary 4.1. Consider the setup of Theorem 4.2. Suppose that either Assumption 4.2 holds with
M (cid:46) 1, or Assumption 4.3 holds with Tr(Σ) (cid:46) 1. In addition, assume that (cid:107)θ(cid:63)(cid:107)2 ≤ R < ∞.
1. Suppose that μj ≤ c1j−2α, ∀j holds with some constants c1 > 0 and α > 1/2. When
1 ≤ B (cid:46) n * min{(σ/R)4α, (R/σ)2}
log2α+1(n/δ)
,
with probability at least 1 − δ, we have
R( (cid:98)f ) − R(f (cid:63)) (cid:46) R
2
2α+1
(cid:18) σ2B log( log n
δ )
(cid:19) 2α
2α+1
n
.
2. Suppose that μj ≤ c1e−c2j, ∀j holds with some constants c1, c2 > 0. When R2 (cid:46) σ2 log n, with
probability at least 1 − δ, we have
R( (cid:98)f ) − R(f (cid:63)) (cid:46) σ2B log2(n/δ)
n
.
3. Suppose that rank(Σ0) = D < ∞. When R2 (cid:46) σ2D, with probability at least 1 − δ, we have
R( (cid:98)f ) − R(f (cid:63)) (cid:46) σ2BD log(n/δ)
n
.
All of the (cid:46)'s above only hide constant factors.
Corollary 4.1 presents excess risk bounds for common scenarios when the covariates have finite
dimensions, or the kernel has polynomially or exponentially decaying eigenvalues. Here are examples
of the latter two. Let X = [0, 1] and Q be the uniform distribution over X . The first-order Sobolev
kernel in Example 2.4 satisfies the polynomial decay property with α = 1. The Gaussian kernel in
Example 2.3 satisfies the exponential decay property.
dQ
j=1
Theorem 2 in Ma et al. (2022) provides general minimax lower bounds on the excess risk when
dP ≤ B and the eigenvalues {μj}∞
are regular, which are covered by our setting. Based on that,
direct computation shows that the bounds in Corollary 4.1 are minimax optimal up to logarithmic
factors. When P = Q, we have B = 1 and the results recover optimal error rates of kernel ridge
regression without covariate shift. When B > 1, the covariate shift has a negative impact. The
results are easy to interpret using a new quantity ε = B−1: when the source covariate distribution
has an ε-coverage of the target one (i.e. Σ (cid:23) εΣ0), one labeled sample from the source distribution
is worth ε labeled samples from the target distribution.
5 Oracle inequalities for model selection with pseudo-labels
In this section, we will demystify the power of pseudo-labeling. We will explain why the overhead
incurred by imperfect pseudo-labels can be negligible compared to excess risk bounds for the can-
didate models. We will also present a bias-variance decomposition of the overhead. The results will
be illustrated by numerical simulations.
11
5.1 A bias-variance decomposition
The following oracle inequality is the cornerstone of our excess risk bounds in Theorem 4.1. The
proof is deferred to Section 6.2.2.
Theorem 5.1 (Oracle inequality for pseudo-labeling). Let Assumptions 2.2 and 4.1 hold. Suppose
that ρn is an integer, 1/c ≤ n0/n ≤ c and |Λ| ≤ nc hold for some constant c ≥ 1. Choose any
δ ∈ (0, 1/5] and γ ∈ (0, 3/4]. Let ξ((cid:101)λ, δ) be defined as in Theorem 4.1.
1. Under Assumption 4.2, there exist constants C and C0 such that when (cid:101)λ ≥ CM 2 log(n/δ)
and
ρn
minλ∈Λ λ ≥ CM 2 log(n/δ)
, we have
(1−ρ)n
(cid:18)
P
R( (cid:98)f ) − R(f (cid:63)) ≤ (1 + γ) min
λ∈Λ
[R( (cid:98)fλ) − R(f (cid:63))] +
(cid:19)
ξ((cid:101)λ, δ)
≥ 1 − δ.
C0
γ
(5.1)
2. Suppose that Assumption 4.3 holds and cn0/ Tr(Σ0) ≥ n/ Tr(Σ). There exist constants C and C0
such that when (cid:101)λ ≥ C Tr(Σ) log(1/δ)
ρn
and n0 ≥ C(κ/γ)2 log(|Λ|/δ), we have the inequality (5.1).
Theorem 5.1 controls the excess risk R( (cid:98)f ) − R(f (cid:63)) of the final model (cid:98)f by a small multiple of
minλ∈Λ[R( (cid:98)fλ) − R(f (cid:63))] plus an overhead term ξ((cid:101)λ, δ) incurred by pseudo-labeling. The overhead
reflects the error of the imputation model (cid:101)f , and its expression looks similar to the bound E(λ, δ) on
the excess risk of the candidate model (cid:98)fλ in Theorem 4.1. However, only the operator norm of the
matrix S
(cid:101)λ) plays no role. The former can be significantly
smaller than the latter. The choice of penalty parameter (cid:101)λ for training the imputation model needs
to balance the bias and the operator norm of some error covariance matrix, in contrast to the usual
bias-variance trade-off. We will come back to this point at the end of the section.
appears in ξ((cid:101)λ, δ), and the trace Tr(S
(cid:101)λ
Below is a concrete example showing that the impact ξ((cid:101)λ, δ) of pseudo-labeling can be negligible
compared to excess risk bounds for { (cid:98)fλ}λ∈Λ.
Example 5.1 (First-order Sobolev space). Consider the setting in Example 2.4 and let Q be the
uniform distribution over [0, 1]. Suppose that dQ
dP ≤ B (cid:46) n and σ (cid:16) (cid:107)θ(cid:63)(cid:107)2 (cid:16) 1. Set δ = 1/n.
Choose Λ and (cid:101)λ according to Assumption 4.4. Up to a logarithmic factor, the excess risk of the best
candidate in { (cid:98)fλ}λ∈Λ is of order O((B/n)2/3), which is minimax optimal. Meanwhile, the overhead
ξ((cid:101)λ, δ) incurred by pseudo-labeling is of higher order O(B/n).
We now demystify such phenomenon to explain the power of pseudo-labeling. Ideally, we want
to find the candidate model in { (cid:98)fλ}λ∈Λ that minimizes the risk R(*). However, the objective is
not directly computable as we only have finitely many unlabeled data from the target distribution.
To overcome the challenge, we train an imputation model (cid:101)f to produce pseudo-labels {(cid:101)y0i}n0
and
select the final model (cid:98)f based on (3.1). The suboptimality of (cid:98)λ relative to argminλ∈Λ R( (cid:98)fλ) is
caused by (i) the errors of pseudo-labels, and (ii) the finite-sample approximation of the risk.
i=1
To get Theorem 5.1, we will first tease out the impact of pseudo-labels by studying fixed designs.
Define the in-sample risk on the target data
Rin(f ) = E
(cid:18) 1
n0
n0(cid:88)
i=1
|f (x0i) − y0i|2
{x0i}n0
i=1
(cid:19)
,
(cid:12)
(cid:12)
(cid:12)
(cid:12)
∀f ∈ F.
(5.2)
An important property is
Rin(f ) − Rin(f (cid:63)) =
1
n0
n0(cid:88)
i=1
12
|f (x0i) − f (cid:63)(x0i)|2.
(5.3)
Therefore, the objective function for model selection (3.1) mimics the excess in-sample risk Rin( (cid:98)fλ)−
Rin(f (cid:63)) of the candidate (cid:98)fλ. They become equal if the imputation model is perfect, i.e. (cid:101)f = f (cid:63). We
will establish an oracle inequality
Rin( (cid:98)f ) − Rin(f (cid:63)) ≤ (1 + γ) min
λ∈Λ
[Rin( (cid:98)fλ) − Rin(f (cid:63))] + η,
(5.4)
where γ is small, and η quantifies how the discrepancies { (cid:101)f (x0i) − f (cid:63)(x0i)}n0
influence the sub-
i=1
optimality. Once that is done, we will bridge the in-sample and out-of-sample excess risks to finish
the proof of Theorem 5.1. See Section 6.2.2 for details.
The in-sample oracle inequality (5.4) is derived from the following bias-variance decomposition
of pseudo-labels' impact on model selection, whose proof is deferred to Appendix D. Suppose that
that best fits some unknown regression
we want to select a model among m candidates {gj}m
j=1
function g(cid:63). We have finitely many unlabeled sample {zi}n
(cid:101)g to fill
the labels for model selection. Since
(cid:101)g is often learned from data, we let it be random. All the other
quantities are considered deterministic.
and use an imputation model
i=1
Theorem 5.2 (Bias-variance decomposition). Let {zi}n
and {gj}m
j=1 be deterministic functions on Z; (cid:101)g be a random function on Z. Define
n
(cid:88)
i=1 be deterministic elements in a set Z; g(cid:63)
L(g) =
|g(zi) − g(cid:63)(zi)|2
1
n
i=1
for any function g on Z. Assume that the random vector (cid:101)y = ((cid:101)g(z1), (cid:101)g(z2), * * * , (cid:101)g(zn))(cid:62) satisfies
(cid:107)(cid:101)y − E
(cid:101)y(cid:107)ψ2 ≤ V < ∞. Choose any
(cid:98)j ∈ argmin
j∈[m]
(cid:26) 1
n
n
(cid:88)
i=1
|gj(zi) − (cid:101)g(zi)|2
(cid:27)
.
There exists a universal constant C such that for any δ ∈ (0, 1], with probability at least 1 − δ we
have
(cid:26)
L(g
(cid:98)j) ≤ inf
γ>0
(1 + γ) min
j∈[m]
L(gj) + C(1 + γ−1)
(cid:18)
L(E
(cid:101)g) +
Consequently,
(cid:26)
EL(g
(cid:98)j) ≤ inf
γ>0
(1 + γ) min
j∈[m]
L(gj) + C(1 + γ−1)
L(E
(cid:101)g) +
(cid:18)
V 2 log(m/δ)
n
(cid:19)(cid:27)
.
V 2(1 + log m)
n
(cid:19)(cid:27)
.
Theorem 5.2 is an oracle inequality for the in-sample risk of the selected model. The expected
overhead consists of two terms, L(E
(cid:101)g(zi) −
n
g(cid:63)(zi)|2, which is the mean squared bias of the pseudo-labels. The second term reflects their ran-
domness, as V 2 is the variance proxy of the sub-Gaussian random vector
(cid:101)y. Therefore, Theorem 5.2
can be viewed as a bias-variance decomposition of the overhead.
. The first term is equal to 1
n
(cid:101)g) and V 2(1+log m)
i=1 |E
(cid:80)n
In contrast, the usual bias-variance decomposition of pseudo-labels' mean squared error gives
EL((cid:101)g) = L(E
(cid:101)g) + n−1E(cid:107)(cid:101)y − E
(cid:101)y(cid:107)2
2.
2
(cid:101)y(cid:107)2
can be as large as nV 2, whose implied upper bound on EL((cid:101)g) is L(E
(cid:101)g)+V 2.
The quantity E(cid:107)(cid:101)y−E
(cid:101)g) + V 2(1+log m)
on the overhead so long as log m (cid:28) n.
This is much larger than the bound L(E
Consequently, pseudo-labels with large mean squared error may still help select a decent model.
Indeed, for supervised learning without covariate shift, the real labels used in hold-out validation
have zero bias but non-vanishing mean squared error.
n
13
5.2 A numerical example
We conduct numerical simulations using the RKHS in Example 2.4 to illustrate the theoretical find-
ings. The true regression function is f (cid:63)(x) = sin(2πx). Denote by μ and ν the uniform distributions
over [0, 1/2] and [1/2, 1], respectively. Consider the following procedure for any even n ≥ 2:
• Let B = n1/3, P = B
B+1 ν. Generate n i.i.d. source samples
with xi ∼ P and yi|xi ∼ N (f (cid:63)(xi), 1). Generate n0 = n/2 i.i.d. unlabeled target
B+1 ν and Q = 1
B+1 μ + B
B+1 μ + 1
{(xi, yi)}n
i=1
samples D0 = {x0i}n0
i=1
with x0i ∼ Q.
• Randomly partition the source data into two halves D1 and D2. Run KRR on D1 to obtain
10|D1| : k = 0, 1, * * * , (cid:100)log2(10|D1|)(cid:101)}. Run KRR on D2
candidate models { (cid:98)fλ}λ∈Λ, where Λ = { 2k
with penalty parameter (cid:101)λ = 1
to obtain the imputation model (cid:101)f .
10|D2|
• Construct a risk estimate (cid:98)R : F → R, find any (cid:98)λ ∈ argminλ∈Λ (cid:98)R( (cid:98)fλ) and select (cid:98)f = (cid:98)f
(cid:98)λ
.
• Draw n(cid:48)
0 = 1000 i.i.d. samples {zi}n(cid:48)
(cid:80)n(cid:48)
0
i=1
0
i=1 | (cid:98)f (zi) − f (cid:63)(zi)|2.
empirical version 1
n(cid:48)
0
from Q and estimate the excess risk R( (cid:98)f ) − R(f (cid:63)) by the
Our proposed method in Section 3 corresponds to (cid:98)R(f ) = 1
|D0|
|f (x)− (cid:101)f (x)|2. We compare
it with an oracle approach whose risk estimate 1
|f (x)−f (cid:63)(x)|2 is based on noiseless labels,
and a naïve approach that uses the empirical risk 1
|f (x) − y|2 on D2. The latter is the
standard hold-out validation method that ignores the covariate shift. We set |D0| = |D2| so that
the three aforementioned methods use the same number of test samples.
x∈D0
(cid:80)
(x,y)∈D2
x∈D0
|D2|
|D0|
(cid:80)
(cid:80)
Figure 1: Comparisons of three approaches on a log-log plot. x-axis: n. y-axis: mean squared error.
Red crosses: pseudo-labeling. Cyan triangles: the oracle method. Blue circles: the naïve method.
For every n ∈ {4000, 8000, 16000, 32000, 64000}, we run the experiment 100 times independently.
Figure 1 shows the performances of three model selection approaches: pseudo-labeling (red crosses),
the oracle method (cyan triangles) and the naïve method (blue circles). The x- and y-coordinates of
each point are the sample size n and the average of estimated excess risks over 100 independent runs,
respectively. Since the points of each method are lined up on the log-log scale, the excess risk decays
like O(n−α) for some α > 0. Linear regression yields the solid lines in Figure 1 and estimates the
exponents αPL (pseudo-labeling), αoracle and αnaïve as 0.516, 0.511 and 0.457, respectively. We use
cluster bootstrap (Cameron et al., 2008) to quantify the uncertainties, by resampling the 100 data
points corresponding to each n for 10000 times, independently of each other. The 95% confidence
14
intervals on αPL − αoracle and αPL − αnaïve are [−0.024, 0.031] and [0.024, 0.094], respectively. Our
proposed method does not differ significantly from the oracle one in terms of the error exponent. It
is significantly better than the naïve method. Indeed, the source data does not have a good coverage
of the test cases. In addition, we also plot the linear fits of 100 bootstrap replicates to illustrate the
stability, resulting in the thin shaded areas around the solid lines in Figure 1.
6 Proofs of Theorems 4.1 and 5.1
We now prove our main results: the excess risk bounds (Theorem 4.1) and the oracle inequality
for model selection (Theorem 5.1). We will first conduct a fixed-design analysis in Section 6.1 by
treating all the covariates and the data split as deterministic. After that, we will take the random
designs into consideration and derive the final results in Section 6.2.
6.1 Fixed designs and the in-sample risk
i=1
i=1
To begin with, we tease out the impact of random errors {εi}n
, {x0i}n0
on the covariates {xi}n
i=1
risk Rin defined in (5.2) and provide excess risk bounds as well as oracle inequalities.
on our estimator (cid:98)f by conditioning
and the split D1 ∪ D2. As a result, we will study the in-sample
To facilitate the analysis, we introduce some notation. When X = Rd for some d < ∞ and
K(z, w) = z(cid:62)w, φ is the identity mapping. We can construct design matrices X = (x1, * * * , xn)(cid:62) ∈
Rn×d, X0 = (x01, * * * , x0n0)(cid:62) ∈ Rn0×d and the response vector y = (y1, * * * , yn)(cid:62) ∈ Rn. Define the
index set T = {i ∈ [n] : (xi, yi) ∈ D1} of the data for training candidate models. In addition, let
n1 = |T | and n2 = n − n1. Denote by X1 ∈ R|T |×d and X2 ∈ R(n−|T |)×d the sub-matrices of X
by selecting rows whose indices belong to T and [n]\T , respectively. Similarly, denote by y1 ∈ R|T |
and y2 ∈ Rn−|T | the sub-vectors of y induced by those index sets.
The design matrices can be generalized to operators when X and K are general. In that case,
X and X0 are bounded linear operators defined through
X : H → Rn, θ (cid:55)→ ((cid:104)φ(x1), θ(cid:105),
X0 : H → Rn0, θ (cid:55)→ ((cid:104)φ(x01), θ(cid:105),
* * * , (cid:104)φ(xn), θ(cid:105))(cid:62),
* * * , (cid:104)φ(x0n0), θ(cid:105))(cid:62).
(cid:80)n0
We can define X1 and X2 similarly. With slight abuse of notation, we use X (cid:62) to refer to the adjoint
of X, i.e. X (cid:62) : Rn → H, u (cid:55)→ (cid:80)n
i=1 uiφ(xi). Similarly, we can define X (cid:62)
, X (cid:62)
. Let
and X (cid:62)
0
2
1
(cid:80)
i∈[n]\T φ(xi) ⊗ φ(xi).
i∈T φ(xi) ⊗ φ(xi) and (cid:98)Σ2 = 1
(cid:98)Σ0 = 1
n2
n0
We have (cid:98)Σj = n−1
j Xj for all j ∈ {0, 1, 2}. Moreover, (cid:98)fλ(*) = (cid:104)φ(*), (cid:98)θλ(cid:105) holds for (cid:98)θλ = ( (cid:98)Σ1 +
λI)−1(n−1
1 y1), and (cid:101)f (*) = (cid:104)φ(*), (cid:101)θ(cid:105) holds for (cid:101)θ = ( (cid:98)Σ2 + (cid:101)λI)−1(n−1
i=1 φ(x0i) ⊗ φ(x0i), (cid:98)Σ1 = 1
n1
Below we present a lemma on kernel ridge regression that plays a major role throughout the
j X (cid:62)
2 X (cid:62)
1 X (cid:62)
2 y2).
(cid:80)
analysis. See Appendix A.1 for its proof.
Lemma 6.1 (Fixed-design KRR). Let Assumptions 2.2 and 4.1 hold, with the exception that {xi}n
and {x0i}n0
̄θλ = E (cid:98)θλ.
i=1
i=1 are deterministic. Let the partition D1 ∪ D2 be fixed. Choose any λ > 0 and define
1. There exist universal constants C1 and C2 such that
(cid:107) ̄θλ − θ(cid:63)(cid:107)H ≤ (cid:107)θ(cid:63)(cid:107)H,
C1σ
√
n1λ
(cid:107) (cid:98)θλ − ̄θλ(cid:107)ψ2 ≤
,
15
(cid:107)n−1/2
0 X0( ̄θλ − θ(cid:63))(cid:107)2 ≤
(cid:113)
λ(cid:107)( (cid:98)Σ1 + λI)−1/2 (cid:98)Σ0( (cid:98)Σ1 + λI)−1/2(cid:107) * (cid:107)θ(cid:63)(cid:107)H,
(cid:107)n−1/2
0 X0( (cid:98)θλ − ̄θλ)(cid:107)ψ2 ≤ C1σ
(cid:115)
(cid:107) (cid:98)θλ − θ(cid:63)(cid:107)H ≤ (cid:107)θ(cid:63)(cid:107)H +
(cid:18)
P
(cid:115)
(cid:107)( (cid:98)Σ1 + λI)−1/2 (cid:98)Σ0( (cid:98)Σ1 + λI)−1/2(cid:107)
n1
,
C2σ2 log(1/δ)
n1λ
Tr[( (cid:98)Σ1 + λI)−1 (cid:98)Σ1]
(cid:19)
≥ 1 − δ, ∀δ ∈ (0, 1/e].
2. Choose any positive semi-definite trace class operator Q : H → H and define (cid:98)Sλ = ( (cid:98)Σ1 +
λI)−1/2Q( (cid:98)Σ1 + λI)−1/2. We have
(cid:18)
(cid:107) (cid:98)θλ − θ(cid:63)(cid:107)2
Q ≤ 2λ(cid:107) (cid:98)Sλ(cid:107) * (cid:107)θ(cid:63)(cid:107)2
H +
P
2C2σ2 Tr( (cid:98)Sλ)
n1
(cid:19)
log(1/δ)
≥ 1 − δ, ∀δ ∈ (0, 1/e].
With the help of Lemma 6.1, we can easily control the excess in-sample risks of the candidate
models using some function (cid:98)E(λ, δ) that is an empirical version of E(λ, δ) in Theorem 4.1. The
quantity δ is the exceptional probability. The optimal candidate in { (cid:98)fλ}λ∈Λ is near-optimal over an
enlarged set { (cid:98)fλ}λmin≤λ≤λmax
up to a multiplicative factor, as long as λj+1/λj is bounded. We can
also derive from Lemma 6.1 and Theorem 5.2 an oracle inequality of the form (5.4) showing that the
excess in-sample risk Rin( (cid:98)f ) − Rin(f (cid:63)) of our selected model is a small multiple of minλ∈Λ[Rin( (cid:98)fλ) −
Rin(f (cid:63))] plus some overhead (cid:98)ξ((cid:101)λ, δ). The latter reflects the error of the imputation model (cid:101)f , and it
is an empirical version of ξ((cid:101)λ, δ). The results are summarized in Theorem 6.1 below.
Theorem 6.1 (In-sample risks). Let Assumptions 2.2 and 4.1 hold. Suppose that Λ = {λ1, * * * , λm},
m ≥ 2, and 0 < λj < λj+1 ≤ βλj holds for all j ∈ [m − 1] and some β ≥ 1. For any λ > 0 and
δ ∈ (0, 1/e], define
(cid:98)Sj,λ = ( (cid:98)Σj + λI)−1/2 (cid:98)Σ0( (cid:98)Σj + λI)−1/2,
j ∈ {1, 2},
(cid:98)E(λ, δ) = λ(cid:107) (cid:98)S1,λ(cid:107) * (cid:107)θ(cid:63)(cid:107)2
H +
σ2 Tr( (cid:98)S1,λ) log(m/δ)
n1
,
(cid:98)ξ(λ, δ) =
(cid:18)
λ(cid:107)θ(cid:63)(cid:107)2
H +
(cid:19)
σ2 log(m/δ)
n2
(cid:107) (cid:98)S2,(cid:101)λ(cid:107).
There exist universal constants C1 and C2 such that with probability at least 1 − δ, we have
min
λ∈Λ
Rin( (cid:98)fλ) − Rin(f (cid:63)) ≤ C1β min
λ1≤λ≤λm
(cid:98)E(λ, δ),
Rin( (cid:98)f ) − Rin(f (cid:63)) ≤ inf
γ>0
(cid:26)
(1 + γ) min
λ∈Λ
[Rin( (cid:98)fλ) − Rin(f (cid:63))] + C2(1 + γ−1)(cid:98)ξ((cid:101)λ, δ)
(cid:27)
.
When that event happens,
Rin( (cid:98)f ) − Rin(f (cid:63)) ≤ inf
γ>0
(cid:26)
(1 + γ)C1β min
λ1≤λ≤λm
(cid:98)E(λ, δ) + C2(1 + γ−1)(cid:98)ξ((cid:101)λ, δ)
(cid:27)
.
Proof of Theorem 6.1. First of all, it is easily seen from the decomposition (5.3) that
Rin( (cid:98)fλ) − Rin(f (cid:63)) = (cid:107) (cid:98)θλ − θ(cid:63)(cid:107)2
(cid:98)Σ0
.
16
Part 2 of Lemma 6.1 (with Q = (cid:98)Σ0) and union bounds imply the existence of a universal constant
C1 such that
(cid:18)
P
Rin( (cid:98)fλ) − Rin(f (cid:63)) ≤ C1 (cid:98)E(λ, δ), ∀λ ∈ Λ
≥ 1 − δ/2,
∀δ ∈ (0, 1/e].
(cid:19)
Denote by A the above event. When A happens, we have
min
λ∈Λ
Rin( (cid:98)fλ) − Rin(f (cid:63)) ≤ C1 min
λ∈Λ
(cid:98)E(λ, δ).
Next, we bridge the discrete index set Λ and the interval [λ1, λm]. For any λ > 0, t ≥ 1 and j ∈
{1, 2}, we have ( (cid:98)Σj + tλI)−1 (cid:23) t−1( (cid:98)Σj + λI)−1. Then, Tr( (cid:98)Sj,tλ) ≥ t−1 Tr( (cid:98)Sj,λ), (cid:107) (cid:98)Sj,tλ(cid:107) ≥ t−1(cid:107) (cid:98)Sj,λ(cid:107)
and tλ(cid:107) (cid:98)Sj,tλ(cid:107) ≥ λ(cid:107) (cid:98)Sj,λ(cid:107). As a result, (cid:98)E(tλ, δ) ≥ t−1 (cid:98)E(λ, δ). It follows from 0 < λj < λj+1 ≤ βλj
that for any λ ∈ [λj, λj+1],
(cid:98)E(λ, δ) ≥
(cid:98)E(λj, δ) ≥ β−1 (cid:98)E(λj, δ).
λj
λ
Therefore, minλ1≤λ≤λm (cid:98)E(λ, δ) ≥ β−1 minλ∈Λ (cid:98)E(λ, δ). We have
(cid:18)
P
min
λ∈Λ
Rin( (cid:98)fλ) − Rin(f (cid:63)) ≤ C1β min
λ1≤λ≤λm
(cid:19)
(cid:98)E(λ, δ)
≥ P(A) ≥ 1 − δ/2.
We now prove an oracle inequality for (cid:98)f . Define y(cid:63) = X0θ(cid:63) = (f (cid:63)(x01),
* * * , f (cid:63)(x0n0))(cid:62),
* * * , (cid:101)f (x0n0))(cid:62) and ̄θ = E( (cid:101)θ|X2). Applying Part 1 in Lemma 6.1 to (cid:101)θ shows
(cid:101)y = X0 (cid:101)θ = ( (cid:101)f (x01),
that
n−1/2
0
n−1/2
0
(cid:107)E
(cid:101)y − y(cid:63)(cid:107)2 = (cid:107)n−1/2
(cid:101)y(cid:107)ψ2 = (cid:107)n−1/2
0 X0( ̄θ − θ(cid:63))(cid:107)2 ≤
0 X0( (cid:101)θ − ̄θ)(cid:107)ψ2
(cid:107)(cid:101)y − E
(cid:113)
(cid:101)λ(cid:107) (cid:98)S2,(cid:101)λ(cid:107) * (cid:107)θ(cid:63)(cid:107)H,
(cid:107) (cid:98)S2,(cid:101)λ(cid:107),
(cid:113)
(cid:46) σ
√
n2
where (cid:46) only hides a universal constant factor. Theorem 5.2 immediately yields the existence of a
universal constant C2 such that
P
(cid:18)
Rin( (cid:98)f ) − Rin(f (cid:63)) ≤ inf
γ>0
(cid:26)
(1 + γ) min
λ∈Λ
[Rin( (cid:98)fλ) − Rin(f (cid:63))]
+ C2(1 + γ−1)(cid:98)ξ((cid:101)λ, δ)
(cid:27)(cid:19)
≥ 1 − δ/2.
Finally, the proof is completed by combining the above estimates by union bounds.
6.2 Random designs and the out-of-sample risk
6.2.1 Two lemmas
To analyze the estimator (cid:98)f in the random design setting, we need to (i) bound the deviations of
from their population versions, and (ii) relate the
the empirical second-moment operators { (cid:98)Σj}2
excess in-sample risk to the out-of-sample version. The following two lemmas are devoted to them.
Their proofs are deferred to Appendices A.2 and A.3.
j=0
Lemma 6.2 (Concentration of second-moment operators). Choose any δ ∈ (0, 1/5] and let As-
sumption 2.2 hold.
17
1. Under Assumption 4.2, there exists a universal constant C such that the following inequalities
hold simultaneously with probability at least 1 − δ:
(cid:98)Σ0 (cid:22)
(cid:18)
3
2
Σ0 +
CM 2 log(3n0/δ)
3n0
(cid:19)
,
I
(cid:98)Σ1 + λI (cid:23)
(cid:98)Σ2 + (cid:101)λI (cid:23)
1
2
1
2
(Σ + λI),
∀λ ≥
(Σ + (cid:101)λI),
∀(cid:101)λ ≥
CM 2 log(3n/δ)
(1 − ρ)n
CM 2 log(3n/δ)
ρn
,
.
On the above event, for all λ ≥ CM 2 log(3n/δ)
(1−ρ)n
and (cid:101)λ ≥ CM 2 log(3n/δ)
ρn
we have
Tr[( (cid:98)Σ1 + λI)−1/2Σ0( (cid:98)Σ1 + λI)−1/2] ≤ 2 Tr[(Σ + λI)−1/2Σ0(Σ + λI)−1/2],
(cid:107)( (cid:98)Σ1 + λI)−1/2Σ0( (cid:98)Σ1 + λI)−1/2(cid:107) ≤ 2(cid:107)(Σ + λI)−1/2Σ0(Σ + λI)−1/2(cid:107),
(cid:107)( (cid:98)Σ2 + (cid:101)λI)−1/2 (cid:98)Σ0( (cid:98)Σ2 + (cid:101)λI)−1/2(cid:107) ≤ 3(cid:107)(Σ + (cid:101)λI)−1/2Σ0(Σ + (cid:101)λI)−1/2(cid:107)
+
n
n0
(cid:26)
max
1,
(cid:27)
.
log n0
log n
2. Under Assumption 4.3, there exists a constant C ≥ 1 determined by κ such that the following
inequalities hold simultaneously with probability at least 1 − δ:
(cid:98)Σ0 (cid:22)
(cid:18)
Σ0 +
3
2
C Tr(Σ0) log(3/δ)
3n0
(cid:19)
I
,
(cid:98)Σ1 + λI (cid:23)
(cid:98)Σ2 + (cid:101)λI (cid:23)
1
2
1
2
(Σ + λI),
∀λ ≥
(Σ + (cid:101)λI),
∀(cid:101)λ ≥
C Tr(Σ) log(3/δ)
(1 − ρ)n
C Tr(Σ) log(3/δ)
ρn
,
.
On the above event, for all λ ≥ C Tr(Σ) log(3/δ)
Tr[( (cid:98)Σ1 + λI)−1/2Σ0( (cid:98)Σ1 + λI)−1/2] and (cid:107)( (cid:98)Σ1 + λI)−1/2Σ0( (cid:98)Σ1 + λI)−1/2(cid:107) as in Part 1, and
and (cid:101)λ ≥ C Tr(Σ) log(3/δ)
we have same estimates on
(1−ρ)n
ρn
(cid:107)( (cid:98)Σ2 + (cid:101)λI)−1/2 (cid:98)Σ0( (cid:98)Σ2 + (cid:101)λI)−1/2(cid:107) ≤ 3(cid:107)(Σ + (cid:101)λI)−1/2Σ0(Σ + (cid:101)λI)−1/2(cid:107) +
n
n0
*
Tr(Σ0)
Tr(Σ)
.
Lemma 6.3 (In-sample and out-of-sample risks). Let Assumptions 2.2 and 4.1 hold. Choose any
δ ∈ (1, 1/e] and γ ∈ (0, 3/4].
1. Suppose that Assumption 4.2 holds and minλ∈Λ λ ≥ 8M 2 log[(n+n0)|Λ|/δ]
. Define
(1−ρ)n
ζ(δ) =
((cid:107)θ(cid:63)(cid:107)HM + σ)2 log(|Λ|/δ)
n0
.
There exists a universal constant C0 such that with probability at least 1−δ, the following inequality
holds simultaneously for all λ ∈ |Λ|:
(1 − γ)[R( (cid:98)fλ) − R(f (cid:63))] −
C0
γ
ζ(δ) ≤ Rin( (cid:98)fλ) − Rin(f (cid:63))
≤ (1 + γ)[R( (cid:98)fλ) − R(f (cid:63))] +
C0
γ
ζ(δ).
18
2. Suppose that Assumption 4.3 holds. There exists a universal constant C > 0 such that when
n0 ≥ (Cκ/γ)2 log(|Λ|/δ), the following inequality holds with probability at least 1 − δ:
(1 − γ)[R( (cid:98)fλ) − R(f (cid:63))] ≤ Rin( (cid:98)fλ) − Rin(f (cid:63)) ≤ (1 + γ)[R( (cid:98)fλ) − R(f (cid:63))].
Equipped with those technical tools, we are now ready to tackle Theorems 4.1 and 5.1.
6.2.2 Proof of Theorem 5.1
Under Assumption 4.2 or 4.3, Lemma 6.2 implies that when C is large enough,
(cid:18)
(cid:19)
(cid:98)ξ((cid:101)λ, δ) ≤ 3ξ((cid:101)λ, δ)
≥ 1 − δ/3.
P
Combining the above with Theorem 6.1, we see that when γ ∈ (0, 3/4] and C is large enough, there
exists a large constant C1 such that with probability at least 1 − δ/2,
Rin( (cid:98)f ) − Rin(f (cid:63)) ≤ (1 + γ) min
λ∈Λ
[Rin( (cid:98)fλ) − Rin(f (cid:63))] +
C1
γ
ξ((cid:101)λ, δ).
Denote by A the above event.
On the other hand, Lemma 6.3 implies that when C is large enough, there exists a large constant
C2 such that with probability at least 1−δ/2, the following bound holds simultaneously for all λ ∈ Λ:
(1 − γ)[R( (cid:98)fλ) − R(f (cid:63))] −
C2
γ
ζ(δ) ≤ Rin( (cid:98)fλ) − Rin(f (cid:63))
≤ (1 + γ)[R( (cid:98)fλ) − R(f (cid:63))] +
C2
γ
ζ(δ).
Denote by B the above event.
• Under Assumption 4.2, we have ζ(δ) = ((cid:107)θ(cid:63)(cid:107)HM +σ)2 log(|Λ|/δ)
. We use the assumptions (cid:101)λ (cid:38)
n0
M 2 log(n/δ)
ρn
and |Λ| ≤ nc to derive that
ζ(δ) (cid:46) ((cid:107)θ(cid:63)(cid:107)2
HM 2 + σ2) log(|Λ|/δ)
(cid:46)
((cid:107)θ(cid:63)(cid:107)2
H
(cid:101)λρn
log(n/δ) + σ2) log(|Λ|/δ)
(cid:18) log(|Λ|/δ)
log(n/δ)
(cid:18)
(cid:101)λ(cid:107)θ(cid:63)(cid:107)2
H +
=
≤
n0
* (cid:101)λ(cid:107)θ(cid:63)(cid:107)2
H +
σ2 log(|Λ|/δ)
ρn
σ2 log(|Λ|/δ)
ρn
n
n0
(cid:19)
*
≤ ξ((cid:101)λ, δ).
n0
(cid:19)
*
ρn
n0
• Under Assumption 4.3, we have ζ(δ) = 0 ≤ ξ((cid:101)λ, δ).
Based on the above, we always have ζ(δ) (cid:46) ξ((cid:101)λ, δ). When the event B happens, we have
R( (cid:98)f ) − R(f (cid:63)) ≤
(cid:18)
1
1 − γ
[Rin( (cid:98)f ) − Rin(f (cid:63))] +
(cid:19)
,
ξ((cid:101)λ, δ)
C2
γ
min
λ∈Λ
[Rin( (cid:98)fλ) − Rin(f (cid:63))] ≤ (1 + γ) min
λ∈Λ
[R( (cid:98)fλ) − R(f (cid:63))] +
C2
γ
ξ((cid:101)λ, δ).
19
When the event A ∩ B happens (which has probability at least 1 − δ), we have
C2
γ
C1
γ
R( (cid:98)f ) − R(f (cid:63)) ≤
(cid:18)
1
1 − γ
[Rin( (cid:98)f ) − Rin(f (cid:63))] +
(cid:19)
ξ((cid:101)λ, δ)
≤
=
≤
=
1
1 − γ
1 + γ
1 − γ
(cid:20)(cid:18)
min
λ∈Λ
(cid:18)
1 + γ
1 − γ
(1 + γ)2
1 − γ
(1 + γ) min
λ∈Λ
[Rin( (cid:98)fλ) − Rin(f (cid:63))] +
ξ((cid:101)λ, δ)
(cid:19)
(cid:21)
ξ((cid:101)λ, δ)
+
C2
γ
[Rin( (cid:98)fλ) − Rin(f (cid:63))] +
(C1 + C2)ξ((cid:101)λ, δ)
γ(1 − γ)
(1 + γ) min
λ∈Λ
[R( (cid:98)fλ) − R(f (cid:63))] +
(cid:19)
ξ((cid:101)λ, δ)
+
C2
γ
(C1 + C2)ξ((cid:101)λ, δ)
γ(1 − γ)
[R( (cid:98)fλ) − R(f (cid:63))] +
min
λ∈Λ
[C1 + (2 + γ)C2]ξ((cid:101)λ, δ)
γ(1 − γ)
.
By γ ∈ (0, 3/4], we have 2 + γ ≤ 3,
1
1−γ ≤ 4 and
(1 + γ)2
1 − γ
=
1 + 2γ + γ2
1 − γ
= 1 +
3γ + γ2
1 − γ
= 1 + γ *
3 + γ
1 − γ
≤ 1 + 16γ.
Hence, there exists a constant C3 such that
(cid:18)
P
R( (cid:98)f ) − R(f (cid:63)) ≤ (1 + 16γ) min
λ∈Λ
[R( (cid:98)fλ) − R(f (cid:63))] +
(cid:19)
ξ((cid:101)λ, δ)
≥ 1 − δ.
C3
γ
By redefining γ and choosing a sufficiently large C0, we get the desired result.
6.2.3 Proof of Theorem 4.1
Under Assumption 4.2 or 4.3, Lemma 6.2 implies that when C is large enough,
(cid:18)
(cid:107) (cid:98)S1,λ(cid:107) ≤ 2(cid:107)Sλ(cid:107) and Tr( (cid:98)S1,λ) ≤ 2 Tr(Sλ)
P
(cid:19)
≥ 1 − δ/2.
Then, the desired results follow from Theorem 6.1, Theorem 5.1 and union bounds.
7 Discussion
We developed a simple approach for kernel ridge regression under covariate shift. A key component
is an imputation model that generates pseudo-labels for model selection. The final estimator is
shown to adapt to the covariate shift in many common scenarios. We hope that our work can spur
further research toward a systematic solution to covariate shift problems. Lots of open questions
are worth studying. For instance, we need general measures of covariate shift and corresponding
tools for handling them. When Σ0 (cid:22) BΣ (a special case is dQ
dP ≤ B), our approach achieves the
minimax optimal error rate without knowing B. It would be interesting to consider other discrepancy
measures such as divergences or Wasserstein metrics. Our two-stage approach with separate uses of
source and target data may need modification. The candidate models may better be trained using
some weighted loss based on the target data. Another direction is statistical learning over general
function classes. The current paper only considered kernel ridge regression with well-specified
model. Analytical expressions of the fitted models greatly facilitated our theoretical analysis. In
future work, we would like to go beyond that and develop more versatile methods.
20
Acknowledgement
Kaizheng Wang's research is supported by an NSF grant DMS-2210907 and a startup grant at
Columbia University. We acknowledge computing resources from Columbia University's Shared
Research Computing Facility project, which is supported by NIH Research Facility Improvement
Grant 1G20RR030893-01, and associated funds from the New York State Empire State Develop-
ment, Division of Science Technology and Innovation (NYSTAR) Contract C090171, both awarded
April 15, 2010.
21
A Proofs of Lemmas 6.1 to 6.3
A.1 Proof of Lemma 6.1
A.1.1 Part 1
Analysis of (cid:107) (cid:98)θλ − θ(cid:63)(cid:107)ψ2 and (cid:107) (cid:98)θλ − θ(cid:63)(cid:107)H. Define ε1 = y1 − X1θ(cid:63). Under Assumption 2.2,
1 X (cid:62)
̄θλ = ( (cid:98)Σ1 + λI)−1(n−1
̄θλ − θ(cid:63) = −λ( (cid:98)Σ1 + λI)−1θ(cid:63),
(cid:98)θλ − ̄θλ = ( (cid:98)Σ1 + λI)−1(n−1
1 X (cid:62)
1 ε1).
1 y1) = ( (cid:98)Σ1 + λI)−1 (cid:98)Σ1θ(cid:63),
On the one hand,
(cid:107) ̄θλ − θ(cid:63)(cid:107)H = λ(cid:107)( (cid:98)Σ1 + λI)−1θ(cid:63)(cid:107)H ≤ (cid:107)θ(cid:63)(cid:107)H.
(A.1)
(A.2)
(A.3)
On the other hand, note that ( (cid:98)Σ1 + λI)−1(n−2
adjoint is (n−2
1 X1)( (cid:98)Σ1 + λI)−1. Hence,
1 X (cid:62)
1 ) : Rn → H is a bounded linear operator whose
(cid:107)( (cid:98)Σ1 + λI)−1(n−1
= n−1
1 (cid:107)( (cid:98)Σ1 + λI)−1 (cid:98)Σ1( (cid:98)Σ1 + λI)−1(cid:107) ≤ (n1λ)−1.
1 X (cid:62)
1 )(cid:107)2 = (cid:107)( (cid:98)Σ1 + λI)−1(n−1
1 X (cid:62)
1 )(n−1
1 X1)( (cid:98)Σ1 + λI)−1(cid:107)
Assumption 4.1 implies the following fact with C1 being a universal constant.
Fact A.1. ε1 has sub-Gaussian norm bounded by C1σ.
By Fact A.1,
(cid:107) (cid:98)θλ − ̄θλ(cid:107)ψ2 = (cid:107)( (cid:98)Σ1 + λI)−1(n−1
1 X (cid:62)
1 )ε1(cid:107)ψ2 ≤
(cid:107)ε1(cid:107)ψ2√
n1λ
≤
C1σ
√
n1λ
.
Next, we prove the tail bound on (cid:107) (cid:98)θλ − θ(cid:63)(cid:107)H. The representation (A.2) yields
(cid:107) (cid:98)θλ − ̄θλ(cid:107)2
H =
1
n2
1
(cid:104)ε1, X1( (cid:98)Σ1 + λI)−2X (cid:62)
1 ε1(cid:105).
By Fact A.1 and Lemma E.1, there is a universal constant C2 such that
(cid:18)
(cid:107) (cid:98)θλ − ̄θλ(cid:107)2
H ≤
P
Tr[X1( (cid:98)Σ1 + λI)−2X (cid:62)
1 ]t
(cid:19)
C2σ2
n2
1
≥ 1 − e−t,
∀t ≥ 1.
By direct calculation,
Tr[X1( (cid:98)Σ1 + λI)−2X (cid:62)
1 ] = n1 Tr[( (cid:98)Σ1 + λI)−2 (cid:98)Σ1] ≤
n1
λ
Tr[( (cid:98)Σ1 + λI)−1 (cid:98)Σ1].
Combining these estimates and (A.3) yields the concentration bound
(cid:18)
(cid:107) (cid:98)θλ − θ(cid:63)(cid:107)H ≤ (cid:107)θ(cid:63)(cid:107)2
H +
P
(cid:115)
C2σ2t
n1λ
Tr[( (cid:98)Σ1 + λI)−1 (cid:98)Σ1]
(cid:19)
≥ 1 − e−t,
∀t ≥ 1.
Analysis of (cid:107)n−1/2
0 X0( ̄θλ − θ(cid:63))(cid:107)ψ2. By (A.1),
(cid:107)X0( ̄θλ − θ(cid:63))(cid:107)2
2 = λ2(cid:107)X0( (cid:98)Σ1 + λI)−1θ(cid:63)(cid:107)2
2 ≤ λ2(cid:107)X0( (cid:98)Σ1 + λI)−1(cid:107)2(cid:107)θ(cid:63)(cid:107)2
H.
22
From
(cid:107)X0( (cid:98)Σ1 + λI)−1(cid:107)2 = (cid:107)X0( (cid:98)Σ1 + λI)−2X (cid:62)
= λ−1(cid:107)( (cid:98)Σ1 + λI)−1/2X (cid:62)
0 (cid:107) ≤ λ−1(cid:107)X0( (cid:98)Σ1 + λI)−1X (cid:62)
0 (cid:107)
0 X0( (cid:98)Σ1 + λI)−1/2(cid:107) = n0λ−1(cid:107)( (cid:98)Σ1 + λI)−1/2 (cid:98)Σ0( (cid:98)Σ1 + λI)−1/2(cid:107)
we obtain that
n−1/2
0
(cid:107)X0( ̄θλ − θ(cid:63))(cid:107)2 ≤
(cid:113)
λ(cid:107)( (cid:98)Σ1 + λI)−1/2 (cid:98)Σ0( (cid:98)Σ1 + λI)−1/2(cid:107) * (cid:107)θ(cid:63)(cid:107)H.
Analysis of (cid:107)n−1/2
have X0( (cid:98)θλ − ̄θλ) = Aε1. By Fact A.1,
0 X0( (cid:98)θλ − ̄θλ)(cid:107)ψ2. Define A = X0( (cid:98)Σ1 + λI)−1n−1
1 X (cid:62)
1 ∈ Rn×n. By (A.2), we
(cid:107)X0( (cid:98)θλ − ̄θλ)(cid:107)ψ2 ≤ (cid:107)A(cid:107)2(cid:107)ε1(cid:107)ψ2 ≤ C1σ(cid:107)A(cid:107)2.
AA(cid:62) = n−1
1 X0( (cid:98)Σ1 + λI)−1 (cid:98)Σ1( (cid:98)Σ1 + λI)−1X (cid:62)
0 (cid:22) n−1
1 X0( (cid:98)Σ1 + λI)−1X (cid:62)
0 ,
Since
we have
(cid:107)A(cid:107)2
2 ≤ n−1
1 (cid:107)X0( (cid:98)Σ1 + λI)−1X (cid:62)
n0
(cid:107)( (cid:98)Σ1 + λI)−1/2 (cid:98)Σ0( (cid:98)Σ1 + λI)−1/2(cid:107).
=
n1
0 (cid:107)2 = n−1
1 (cid:107)( (cid:98)Σ1 + λI)−1/2X (cid:62)
0 X0( (cid:98)Σ1 + λI)−1/2(cid:107)
Consequently,
(cid:107)n−1/2
0 X0( (cid:98)θλ − ̄θλ)(cid:107)ψ2 ≤ C1σ
(cid:115)
(cid:107)( (cid:98)Σ1 + λI)−1/2 (cid:98)Σ0( (cid:98)Σ1 + λI)−1/2(cid:107)
n1
.
A.1.2 Part 2
Note that
(cid:107) (cid:98)θλ − θ(cid:63)(cid:107)2
Q ≤ [(cid:107) (cid:98)θλ − ̄θλ(cid:107)Q + (cid:107) ̄θλ − θ(cid:63)(cid:107)Q]2 ≤ 2(cid:107) (cid:98)θλ − ̄θλ(cid:107)2
Q + 2(cid:107) ̄θλ − θ(cid:63)(cid:107)2
Q.
By (A.1),
Q = λ2(cid:107)( (cid:98)Σ1 + λI)−1θ(cid:63)(cid:107)2
(cid:107) ̄θλ − θ(cid:63)(cid:107)2
= λ2(cid:107)Q1/2( (cid:98)Σ1 + λI)−2Q1/2(cid:107) * (cid:107)θ(cid:63)(cid:107)2
Q ≤ λ2(cid:107)( (cid:98)Σ1 + λI)−1Q( (cid:98)Σ1 + λI)−1(cid:107) * (cid:107)θ(cid:63)(cid:107)2
H
H ≤ λ(cid:107)Q1/2( (cid:98)Σ1 + λI)−1Q1/2(cid:107) * (cid:107)θ(cid:63)(cid:107)2
H = λ(cid:107) (cid:98)Sλ(cid:107) * (cid:107)θ(cid:63)(cid:107)2
H.
By (A.2),
Note that
(cid:107) (cid:98)θλ − ̄θλ(cid:107)2
Q = (cid:107)( (cid:98)Σ1 + λI)−1(n−1
1 X (cid:62)
1 ε1)(cid:107)2
Q
1 X1)( (cid:98)Σ1 + λI)−1Q( (cid:98)Σ1 + λI)−1(n−1
1 X (cid:62)
1 )ε1(cid:105).
= (cid:104)ε1, (n−1
1 X1)( (cid:98)Σ1 + λI)−1Q( (cid:98)Σ1 + λI)−1(n−1
Tr[(n−1
= Tr[( (cid:98)Σ1 + λI)−1Q( (cid:98)Σ1 + λI)−1(n−1
= n−1
1 X (cid:62)
1 )]
1 )(n−1
1 X1)]
1 Tr[( (cid:98)Σ1 + λI)−1Q( (cid:98)Σ1 + λI)−1 (cid:98)Σ1] ≤ n−1
1 Tr[( (cid:98)Σ1 + λI)−1Q] = n−1
1 X (cid:62)
1 Tr( (cid:98)Sλ).
23
By Fact A.1 and Lemma E.1,
(cid:18)
P
(cid:107) (cid:98)θλ − ̄θλ(cid:107)2
Q ≤
C2σ2t
n1
(cid:19)
Tr( (cid:98)Sλ)
≥ 1 − e−t,
∀t ≥ 1.
Here C2 is the constant we defined while studying (cid:107) (cid:98)θλ − ̄θλ(cid:107)2
H. Therefore,
(cid:18)
(cid:107) (cid:98)θλ − θ(cid:63)(cid:107)2
Q ≤ 2λ(cid:107) (cid:98)Sλ(cid:107) * (cid:107)θ(cid:63)(cid:107)2
H +
P
2C2σ2 Tr( (cid:98)Sλ)
n1
(cid:19)
t
≥ 1 − e−t,
∀t ≥ 1,
and
P
(cid:18)
(cid:107) (cid:98)θλ − θ(cid:63)(cid:107)2
Q ≤ 2λ(cid:107) (cid:98)Sλ(cid:107) * (cid:107)θ(cid:63)(cid:107)2
H +
2C2σ2 Tr( (cid:98)Sλ)
n1
(cid:19)
log(1/δ)
≥ 1 − δ,
∀δ ∈ (0, 1/e].
A.2 Proof of Lemma 6.2
To prove Part 1, we let Assumption 4.2 hold. Choose any δ ∈ (0, 1/5]. Then, δ/3 ≤ 1/15 < 1/14.
On the one hand, we apply the first part of Corollary E.1 to {φ(x0i)}n0
, with γ and δ set to be
i=1
1/2 and δ/3. There exists a universal constant C such that for λ0 = CM 2 log(3n0/δ)
,
n0
(cid:18)
(cid:98)Σ0 + λ0I (cid:22)
P
3
2
(cid:19)
(Σ0 + λ0I)
≥ 1 − δ/3.
The event on the left-hand side is equivalent to
(cid:98)Σ0 (cid:22)
3
2
Σ0 +
1
2
λ0I =
(cid:18)
Σ0 +
3
2
CM 2 log(3n0/δ)
3n0
(cid:19)
I
.
Therefore,
(cid:20)
(cid:18)
P
3
2
(cid:98)Σ0 (cid:22)
CM 2 log(3n0/δ)
3n0
On the other hand, we apply the first part of Corollary E.1 to {φ(xi)}i∈T , with γ and δ set to be
1/2 and δ/3. Let λ1 = CM 2 log(3n/δ)
. Then, with
probability at least 1 − δ/3 we have
. Note that |T | = (1 − ρ)n and λ1 ≥
CM 2 log( (1−ρ)n
(1−ρ)n
≥ 1 − δ/3.
Σ0 +
(A.4)
(1−ρ)n
δ/3
I
)
(cid:19)(cid:21)
1
2
(Σ + λ1I) (cid:22) (cid:98)Σ1 + λ1I (cid:22)
3
2
(Σ + λ1I).
On that event, for any λ ≥ λ1 we have
(cid:98)Σ1 + λI = (cid:98)Σ1 + λ1I + (λ − λ1)I (cid:23)
1
2
(Σ + λ1I) + (λ − λ1)I (cid:23)
1
2
(Σ + λI).
Therefore,
(cid:18)
P
(cid:98)Σ1 + λI (cid:23)
1
2
(Σ + λI), ∀λ ≥
CM 2 log(3n/δ)
(1 − ρ)n
(cid:19)
≥ 1 − δ/3.
(A.5)
Similarly, we apply the first part of Corollary E.1 to {φ(xi)}i∈[n]\T and get
(cid:18)
P
(cid:98)Σ2 + (cid:101)λI (cid:23)
1
2
(Σ + (cid:101)λI), ∀(cid:101)λ ≥
CM 2 log(3n/δ)
ρn
(cid:19)
≥ 1 − δ/3.
(A.6)
24
Denote by A the intersection of the three events in (A.4), (A.5) and (A.6). By the union bounds,
P(A) ≥ 1 − δ. Suppose that the event A happens. For any λ ≥ CM 2 log(3n/δ)
(1−ρ)n
,
Tr[( (cid:98)Σ1 + λI)−1/2Σ0( (cid:98)Σ1 + λI)−1/2] = Tr[Σ1/2
[(1/2)(Σ + λI)−1]Σ1/2
≤ Tr{Σ1/2
0
0
0 } = 2 Tr[(Σ + λI)−1/2Σ0(Σ + λI)−1/2].
( (cid:98)Σ1 + λI)−1Σ1/2
0
]
Similarly,
(cid:107)( (cid:98)Σ1 + λI)−1/2Σ0( (cid:98)Σ1 + λI)−1/2(cid:107) ≤ 2(cid:107)(Σ + λI)−1/2Σ0(Σ + λI)−1/2(cid:107),
(cid:107)( (cid:98)Σ2 + (cid:101)λI)−1/2 (cid:98)Σ0( (cid:98)Σ2 + (cid:101)λI)−1/2(cid:107) ≤ 2(cid:107)(Σ + (cid:101)λI)−1/2 (cid:98)Σ0(Σ + (cid:101)λI)−1/2(cid:107).
The last inequality and (cid:98)Σ0 (cid:22) (3/2)[Σ0 + (λ0/3)I] lead to
(cid:107)( (cid:98)Σ2 + (cid:101)λI)−1/2 (cid:98)Σ0( (cid:98)Σ2 + (cid:101)λI)−1/2(cid:107) ≤ 2 *
3
2
(cid:107)(Σ + (cid:101)λI)−1/2[Σ0 + (λ0/3)I](Σ + (cid:101)λI)−1/2(cid:107)
≤ 3(cid:107)(Σ + (cid:101)λI)−1/2Σ0(Σ + (cid:101)λI)−1/2(cid:107) + 3(cid:107)(Σ + (cid:101)λI)−1/2(λ0/3)I(Σ + (cid:101)λI)−1/2(cid:107)
≤ 3(cid:107)(Σ + (cid:101)λI)−1/2Σ0(Σ + (cid:101)λI)−1/2(cid:107) +
.
λ0
(cid:101)λ
≥ CM 2 log(3n/δ)
n
Since λ0 = CM 2 log(3n0/δ)
n0
and (cid:101)λ ≥ CM 2 log(3n/δ)
, we have
λ0
(cid:101)λ
≤
log(3n0/δ)
n0
ρn
(cid:30) log(3n/δ)
n
=
n
n0
*
log n0 + log(3/δ)
log n + log(3/δ)
.
Note that log(3/δ) > 0. When n ≤ n0, log n0+log(3/δ)
log n0
Hence, λ0
log n } and
(cid:101)λ
max{1,
≤ n
n0
log n+log(3/δ) ≤ log n0
log n
. When n > n0, log n0+log(3/δ)
log n+log(3/δ) ≤ 1.
(cid:107)( (cid:98)Σ2 + (cid:101)λI)−1/2 (cid:98)Σ0( (cid:98)Σ2 + (cid:101)λI)−1/2(cid:107) ≤ 3(cid:107)(Σ + (cid:101)λI)−1/2Σ0(Σ + (cid:101)λI)−1/2(cid:107) +
(cid:26)
max
1,
n
n0
(cid:27)
.
log n0
log n
This proves Part 1.
The proof of Part 2 is very similar to that of Part 1 (using the second part of Corollary E.1
instead) and is thus omitted.
A.3 Proof of Lemma 6.3
A.3.1 Part 1
Claim A.1. Choose any δ ∈ (0, 1/e] and suppose that λ ≥ M 2 log(1/δ)
hold simultaneously with probability at least 1 − δ:
n1
. The following inequalities
|(cid:104)φ(x01), (cid:98)θλ − θ(cid:63)(cid:105)| (cid:46) M (cid:107)θ(cid:63)(cid:107)H + σ,
(cid:107) (cid:98)θλ − θ(cid:63)(cid:107)H (cid:46) ((cid:107)θ(cid:63)(cid:107)H +
n1σ/M ),
√
where both (cid:46)'s only hide universal constant factors.
Proof of Claim A.1. On the one hand, Lemma 6.1 asserts that (cid:107) ̄θλ − θ(cid:63)(cid:107)H ≤ (cid:107)θ(cid:63)(cid:107)H and (cid:107) (cid:98)θλ −
̄θλ(cid:107)ψ2
n1λ. Assumption 4.2 and λ ≥ M 2 log(1/δ)
lead to
(cid:46) σ/
√
n1
|(cid:104)φ(x01), ̄θλ − θ(cid:63)(cid:105)| ≤ M (cid:107)θ(cid:63)(cid:107)H,
25
(cid:107)(cid:104)φ(x01), (cid:98)θλ − ̄θλ(cid:105)(cid:107)ψ2
(cid:46) M *
σ
(cid:112)n1 * M 2 log(1/δ)/n1
such that
=
σ
(cid:112)log(1/δ)
.
Hence, there exists a universal constant C(cid:48)
1
(cid:18)
|(cid:104)φ(x01), (cid:98)θλ − θ(cid:63)(cid:105)| ≤ C(cid:48)
1(M (cid:107)θ(cid:63)(cid:107)H + σ)
P
(cid:19)
≥ 1 − δ/2.
On the other hand, it follows from (cid:107)( (cid:98)Σ1 + λI)−1 (cid:98)Σ1(cid:107) ≤ 1 and rank( (cid:98)Σ1) ≤ n1 that Tr[( (cid:98)Σ1 +
λI)−1 (cid:98)Σ1] ≤ n1. Hence, the bound on (cid:107) (cid:98)θλ − θ(cid:63)(cid:107)H in Lemma 6.1 and the assumption λ ≥
M 2 log(1/δ)/n1 imply that
(cid:18)
(cid:19)
P
(cid:107) (cid:98)θλ − θ(cid:63)(cid:107)H ≤ (cid:107)θ(cid:63)(cid:107)H + C(cid:48)
2σ
(cid:112)
n1/M 2
≥ 1 − δ/2,
where C2 is a universal constant. The proof is completed by union bounds.
Choose δ ∈ (0, 1/e]. When λ ≥ 8M 2 log[(n+n0)|Λ|/δ]
(1−ρ)n
, we have
λ ≥
M 2 log{[(n + n0)|Λ|/δ]8}]
(1 − ρ)n
≥
M 2 log[(n + n0)8|Λ|2/δ2]
(1 − ρ)n
.
Thanks to Claim A.1, for every fixed λ ∈ Λ, the following inequalities hold with probability at least
1 −
δ2
(n+n0)8|Λ|2 :
|(cid:104)φ(x01), (cid:98)θλ − θ(cid:63)(cid:105)| ≤ C0(M (cid:107)θ(cid:63)(cid:107)H + σ),
(cid:107) (cid:98)θλ − θ(cid:63)(cid:107)H ≤ C0
n((cid:107)θ(cid:63)(cid:107)H + σ/M ).
√
Here C0 is a universal constant.
Part 1 of Lemma E.5, with zi = φ(x0i), w = (cid:98)θλ − θ(cid:63), r = C0(M (cid:107)θ(cid:63)(cid:107)H + σ), R = C0
√
n((cid:107)θ(cid:63)(cid:107)H +
σ/M ), ε = δ2/[(n + n0)8|Λ|2], asserts that for any γ ∈ (0, 3/4]:
, we have
• With probability at least 1 − δ
4|Λ| − n0ε ≥ 1 − δ
2|Λ|
(cid:107) (cid:98)θλ − θ(cid:63)(cid:107)2
(cid:98)Σ0
≤ (1 + γ)(cid:107) (cid:98)θλ − θ(cid:63)(cid:107)2
Σ0 +
[C0(M (cid:107)θ(cid:63)(cid:107)H + σ)]2 log(4|Λ|/δ)
γn0
;
• With probability at least 1 − δ
4|Λ| − (n0 + 1)
(cid:107) (cid:98)θλ − θ(cid:63)(cid:107)2
(cid:98)Σ0
≥ (1 + γ)(cid:107) (cid:98)θλ − θ(cid:63)(cid:107)2
Σ0 −
√
, we have
ε ≥ 1 − δ
2|Λ|
[C0(M (cid:107)θ(cid:63)(cid:107)H + σ)]2 log(4|Λ|/δ)
γn0
δ2
(n + n0)8|Λ|2
0 (M (cid:107)θ(cid:63)(cid:107)H + σ)2 log(4|Λ|/δ)
γn0
(cid:19)1/4
C2
√
(cid:18)
*
M 4
−
√
− [C0
n((cid:107)θ(cid:63)(cid:107)H + σ/M )]2 *
≥ (1 − γ)(cid:107) (cid:98)θλ − θ(cid:63)(cid:107)2
Σ0 −
≥ (1 − γ)(cid:107) (cid:98)θλ − θ(cid:63)(cid:107)2
Σ0 −
2C2
0 ((cid:107)θ(cid:63)(cid:107)HM + σ)2 log(4|Λ|/δ)
γn0
.
Based on the above, we can choose a larger C0 so that
(cid:18)
C0ζ(δ)
γ
≤ (cid:107) (cid:98)θλ − θ(cid:63)(cid:107)2
(cid:98)Σ0
(1 − γ)(cid:107) (cid:98)θλ − θ(cid:63)(cid:107)2
Σ0 −
P
≤ (1 + γ)(cid:107) (cid:98)θλ − θ(cid:63)(cid:107)2
Σ0 +
C2
0 ((cid:107)θ(cid:63)(cid:107)HM + σ)2
n + n0
(cid:19)
C0ζ(δ)
γ
≥ 1 −
δ
|Λ|
.
The proof is finished by taking union bounds over λ ∈ Λ, and using the facts (cid:107) (cid:98)θλ − θ(cid:63)(cid:107)2
(cid:98)Σ0
Rin( (cid:98)fλ) − Rin(f (cid:63)) and (cid:107) (cid:98)θλ − θ(cid:63)(cid:107)2
Σ0
= R( (cid:98)fλ) − R(f (cid:63)).
=
26
A.3.2 Part 2
Note that δ ∈ (0, 1/e] implies that log(2/δ) (cid:46) log(1/δ). Then, the proof immediately follows from
Part 2 of Lemma E.5 and union bounds.
B Proof of Theorem 4.2
Suppose that Assumption 4.4 holds with a sufficiently large c. Define m = |Λ| = (cid:100)log2 n(cid:101) + 1 and
λj = 2jλ0 for k = 0, 1, * * * , m − 1.
Since Σ0 (cid:22) BΣ, it is easily seen that Σ (cid:23) B−1Σ0, (cid:107)Sλ(cid:107) ≤ B and
Tr(Sλ) = (cid:104)Σ0, (Σ + λI)−1(cid:105) ≤ (cid:104)Σ0, (B−1Σ0 + λI)−1(cid:105) =
∞
(cid:88)
j=1
Bμj
μj + Bλ
.
Therefore, Theorem 4.1 implies that with probability at least 1 − δ,
R( (cid:98)f ) − R(f (cid:63)) (cid:46) B min
λ0≤λ≤λm−1
(cid:26)
λ(cid:107)θ(cid:63)(cid:107)2
H +
σ2 log(m/δ)
n
∞
(cid:88)
j=1
(cid:27)
μj
μj + Bλ
+ (B + 1)
(cid:18)
(cid:101)λ(cid:107)θ(cid:63)(cid:107)2
H +
σ2 log(m/δ)
n
(cid:19)
.
From the facts m (cid:16) log n, λm−1 = 2m−1λ0 ≥ nλ0, (cid:101)λ (cid:16) λ0 and B ≥ 1 we obtain that with probability
at least 1 − δ,
R( (cid:98)f ) − R(f (cid:63)) (cid:46) B min
λ0≤λ≤nλ0
(cid:26)
λ(cid:107)θ(cid:63)(cid:107)2
H +
σ2 log( log n
δ )
n
(cid:18)
1 +
∞
(cid:88)
j=1
μj
μj + Bλ
(cid:19)(cid:27)
.
√
Let δ =
λB. The regularity of the spectrum yields
1 +
∞
(cid:88)
j=1
μj
μj + Bλ
= 1 +
∞
(cid:88)
j=1
μj
μj + δ2 ≤ 1 +
D(δ)
(cid:88)
j=1
1 +
∞
(cid:88)
j=D(δ)+1
μj
δ2
(cid:46) D(δ).
Then, the desired result becomes obvious.
C Proof of Corollary 4.1
C.1 Part 1
Suppose μj ≤ c1j−2α, ∀j holds with some constants c1 > 0 and α > 1/2. Then, we have D(r) (cid:46)
r−1/α + 1. Let E(r) = r2R2 + σ2Br−1/αn−1 log(δ−1 log n). Since λ0 (cid:16) log(n/δ)
,
n
√
min
√
Bλ0≤r≤
nBλ0
(cid:26)
r2R2 + σ2B
D(r) log( log n
δ )
n
(cid:27)
(cid:46)
√
min
B log(n/δ)/n≤r≤
√
E(r) +
σ2B log(δ−1 log n)
n
.
B log(n/δ)
(C.1)
27
Define
On the one hand,
r0
(cid:112)B log(n/δ)/n
r0 =
(cid:18) σ2B log(δ−1 log n)
R2n
(cid:19) α
2α+1
.
(cid:19) 1
4α+2
(cid:19) 1
4α+2
=
(cid:38)
(cid:18) n
B
(cid:18) n
B
(cid:18) σ2
R2
(cid:18) σ2
R2
*
*
(cid:19) α
2α+1
(cid:19) α
2α+1
*
*
log
α
2α+1 (δ−1 log n)
(cid:112)log(n/δ)
1
(cid:112)log(n/δ)
=
(cid:18) n(σ/R)4α
(cid:19) 1
4α+2
B log2α+1(n/δ)
(cid:38) 1,
where the last inequality follows from our assumption B (cid:46) n(σ/R)4α
log2α+1(n/δ)
. On the other hand,
r0
(cid:112)B log(n/δ)
= B− 1
4α+2 *
(cid:19) α
2α+1
(cid:18) σ2
R2n
log
*
α
2α+1 (δ−1 log n)
(cid:112)log(n/δ)
.
According to our assumptions, B ≥ 1 and σ2 (cid:46) nR2. Hence,
estimates, we have
r0√
B log(n/δ)
(cid:46) 1. Based on the above
(cid:112)B log(n/δ)/n (cid:46) r0 (cid:46) (cid:112)B log(n/δ)
and thus
By (C.1),
√
min
B log(n/δ)/n≤r≤
√
B log(n/δ)
E(r) (cid:46) E(r0) (cid:16) R
2
2α+1
(cid:18) σ2B log( log n
δ )
(cid:19) 2α
2α+1
n
.
(cid:26)
r2R2 + σ2B
D(r) log( log n
δ )
n
(cid:27)
(cid:19) 2α
2α+1
+
σ2B log(δ−1 log n)
n
(cid:19) 2α
2α+1 (cid:20)
2
2α+1 +
R
(cid:18) σ2B log(δ−1 log n)
n
(cid:19) 1
2α+1 (cid:21)
√
min
√
Bλ0≤r≤
(cid:46) R
2
2α+1
nBλ0
(cid:18) σ2B log( log n
δ )
n
(cid:18) σ2B log( log n
δ )
n
=
(cid:46)
(cid:18) σ2B log( log n
δ )
(cid:19) 2α
2α+1 (cid:18)
n
R2 +
σ2B log(δ−1 log n)
n
(cid:19) 1
2α+1
(cid:46) R
2
2α+1
(cid:18) σ2B log( log n
δ )
(cid:19) 2α
2α+1
n
.
where the last inequality is implied by our assumption on B.
C.2 Part 2
Suppose μj ≤ c1e−c2j, ∀j holds with some constants c1 > 0 and α > 1/2. Then, we have D(r) (cid:46)
log(1/r) + 1. Let E(r) = r2R2 + σ2B log(1/r)n−1 log(δ−1 log n). Since λ0 (cid:16) log(n/δ)
,
n
√
min
√
Bλ0≤r≤
nBλ0
(cid:26)
r2R2 + σ2B
D(r) log( log n
δ )
n
(cid:27)
28
E(r) +
σ2B log(δ−1 log n)
n
(cid:46)
√
≤ E
√
min
B log(n/δ)/n≤r≤
(cid:18)(cid:114)
B log(n/δ)
n
=
R2B log(n/δ)
n
(cid:46) σ2B log2(n/δ)
n
+
,
B log(n/δ)
(cid:19)
+
σ2B log(δ−1 log n)
n
σ2B log( log n
δ )
n
(cid:18)(cid:114)
log
n
B log(n/δ)
(cid:19)
+
σ2B log(δ−1 log n)
n
where we used the assumption that R2 (cid:46) σ2 log n.
C.3 Part 3
When rank(Σ0) = D, we have D(r) ≤ D for all r > 0. Therefore,
√
min
√
Bλ0≤r≤
nBλ0
(cid:26)
r2R2 + σ2B
D(r) log( log n
δ )
n
(cid:27)
(cid:112)
≤ (
Bλ0)2R2 + σ2B
√
D(
Bλ0) log( log n
δ )
n
= BR2λ0 +
σ2BD log( log n
δ )
n
(cid:46) σ2BD log(n/δ)
n
.
The last inequality follows from λ0 (cid:46) log(n/δ)
n
and R2 (cid:46) Dσ2.
D Proof of Theorem 5.2
We introduce a deterministic oracle inequality for pseudo-labeling.
Lemma D.1. Let {yλ}λ∈Λ be a collection of vectors in Rn and y(cid:63), (cid:101)y ∈ Rn. Choose any (cid:98)λ ∈
argminλ∈Λ (cid:107)yλ − (cid:101)y(cid:107)2
2. Define
U = sup
λ,λ(cid:48)∈Λ
(cid:28) yλ − yλ(cid:48)
(cid:107)yλ − yλ(cid:48)(cid:107)2
(cid:29)
,
, (cid:101)y − y(cid:63)
with the convention 0/0 = 0. We have
(cid:107)y
(cid:98)λ − y(cid:63)(cid:107)2
2 ≤ inf
γ>0, λ∈Λ
(cid:110)
(1 + γ)(cid:107)yλ − y(cid:63)(cid:107)2
2 + 4(1 + γ−1)U 2(cid:111)
.
Proof of Lemma D.1. Choose any λ ∈ Λ. By direct calculation, we have
(cid:107)y
(cid:98)λ − y(cid:63)(cid:107)2
2 − (cid:107)yλ − y(cid:63)(cid:107)2
2 = (cid:104)y
(cid:98)λ − yλ, y
(cid:98)λ + yλ − 2y(cid:63)(cid:105).
By the assumption (cid:98)λ ∈ argminλ∈Λ (cid:107)yλ − (cid:101)y(cid:107)2
2
and the equality above,
0 ≥ (cid:107)y
= (cid:107)y
Hence,
(cid:98)λ − (cid:101)y(cid:107)2
(cid:98)λ − y(cid:63)(cid:107)2
2 − (cid:107)yλ − (cid:101)y(cid:107)2
2 − (cid:107)yλ − y(cid:63)(cid:107)2
2 = (cid:104)y
(cid:98)λ − yλ, y
(cid:98)λ + yλ − 2(cid:101)y(cid:105)
2 − 2(cid:104)y
(cid:98)λ − yλ, (cid:101)y − y(cid:63)(cid:105).
(cid:107)y
(cid:98)λ − y(cid:63)(cid:107)2
2 ≤ (cid:107)yλ − y(cid:63)(cid:107)2
2 + 2(cid:104)y
(cid:98)λ − yλ, (cid:101)y − y(cid:63)(cid:105)
29
= (cid:107)yλ − y(cid:63)(cid:107)2
2 + 2(cid:107)y
(cid:98)λ − yλ(cid:107)2
(cid:28) y
(cid:107)y
(cid:98)λ − yλ
(cid:98)λ − yλ(cid:107)2
(cid:29)
, (cid:101)y − y(cid:63)
≤ (cid:107)yλ − y(cid:63)(cid:107)2
≤ (cid:107)yλ − y(cid:63)(cid:107)2
2 + 2(cid:107)y
2 + 2((cid:107)y
(cid:98)λ − yλ(cid:107)2U
(cid:98)λ − y(cid:63)(cid:107)2 + (cid:107)y(cid:63) − yλ(cid:107)2)U,
where the last inequality follows from the fact U ≥ 0 and the triangle's inequality. Rearranging the
terms, we get
and thus ((cid:107)y
(cid:107)y
(cid:98)λ − y(cid:63)(cid:107)2
(cid:98)λ − y(cid:63)(cid:107)2U ≤ (cid:107)yλ − y(cid:63)(cid:107)2
(cid:98)λ − y(cid:63)(cid:107)2 − U )2 ≤ ((cid:107)yλ − y(cid:63)(cid:107)2 + U )2. As a result,
2 − 2(cid:107)y
2 + 2(cid:107)y(cid:63) − yλ(cid:107)2U
(cid:107)y
(cid:107)y
(cid:98)λ − y(cid:63)(cid:107)2 ≤ (cid:107)yλ − y(cid:63)(cid:107)2 + 2U
2 ≤ (cid:107)yλ − y(cid:63)(cid:107)2
(cid:98)λ − y(cid:63)(cid:107)2
2 + 4(cid:107)yλ − y(cid:63)(cid:107)2U + 4U 2.
The elementary bound
leads to
2(cid:107)yλ − y(cid:63)(cid:107)2U ≤ c(cid:107)yλ − y(cid:63)(cid:107)2
2 + c−1U 2,
∀c > 0
(cid:98)λ − y(cid:63)(cid:107)2
The proof is completed by setting γ = 2c and taking the infimum.
2 ≤ (1 + 2c)(cid:107)yλ − y(cid:63)(cid:107)2
(cid:107)y
2 + (4 + 2/c)U 2.
To prove Theorem 5.2, we define y(cid:63) = (g(cid:63)(z1), * * * , g(cid:63)(zn))(cid:62) and yj = (gj(z1), * * * , gj(zn))(cid:62) for
all j ∈ [m]. Lemma D.1 leads to
L(g
(cid:98)j) ≤
inf
γ>0, j∈[m]
(cid:110)
(1 + γ)L(gj) + 4(1 + γ−1)U 2/n
(cid:111)
,
where
U = max
j,j(cid:48)∈[m]
(cid:28) yj − yj(cid:48)
(cid:107)yj − yj(cid:48)(cid:107)2
(cid:29)
,
, (cid:101)y − y(cid:63)
with the convention 0/0 = 0. It is easily seen that
0 ≤ U ≤ (cid:107)E
(cid:101)y − y(cid:63)(cid:107)2 + max
j,j(cid:48)∈[m]
n−1U 2 (cid:46) n−1(cid:107)E
(cid:101)y − y(cid:63)(cid:107)2
2 + n−1
(cid:28) yj − yj(cid:48)
(cid:29)
, (cid:101)y − E
(cid:101)y
(cid:28) yj − yj(cid:48)
,
(cid:107)yj − yj(cid:48)(cid:107)2
(cid:107)yj − yj(cid:48)(cid:107)2
(cid:12)
(cid:12)
(cid:12)
(cid:12)
max
j,j(cid:48)∈[m]
(cid:29)(cid:12)
(cid:12)
, (cid:101)y − E
(cid:101)y
(cid:12)
(cid:12)
2
.
On the one hand, n−1(cid:107)E
2 = L(E
(cid:101)g). On the other hand,
(cid:101)y − y(cid:63)(cid:107)2
(cid:13)
(cid:28) yj − yj(cid:48)
(cid:13)
(cid:13)
(cid:13)
(cid:107)yj − yj(cid:48)(cid:107)2
(cid:29)(cid:13)
2
(cid:13)
, (cid:101)y − E
(cid:101)y
(cid:13)
(cid:13)
ψ2
≤ V 2,
∀j, j(cid:48) ∈ [m].
The sub-Gaussian concentration and union bounds imply that with probability 1 − δ,
max
j,j(cid:48)∈[m]
(cid:12)
(cid:28) yj − yj(cid:48)
(cid:12)
(cid:12)
(cid:12)
(cid:107)yj − yj(cid:48)(cid:107)2
(cid:29)(cid:12)
(cid:12)
, (cid:101)y − E
(cid:101)y
(cid:12)
(cid:12)
2
(cid:46) V 2 log(m/δ).
30
We get the desired concentration inequality in Theorem 5.2 by combing all the above estimates. To
prove the bound on the expectation, fix any γ > 0 and define
We have
(cid:20)
W = L(g
(cid:98)j) −
(1 + γ) min
j∈[m]
L(gj) + C(1 + γ−1)L(E
(cid:21)
(cid:101)g)
.
(cid:18)
W >
P
C(1 + γ−1)V 2
n
(cid:19)
log(m/δ)
≤ δ,
∀δ ∈ (0, 1].
Let t = log(m/δ). Then, δ = me−t. We have
(cid:18)
W >
P
C(1 + γ−1)V 2
n
t
(cid:19)
≤ me−t,
∀t ≥ log m.
As a result, we get
(cid:18) C(1 + γ−1)V 2
n
(cid:90) log m
≤
1dt +
and
0
(cid:19)−1
EW =
(cid:90) ∞
(cid:18)
P
W >
0
C(1 + γ−1)V 2
n
(cid:19)
t
dt
(cid:90) ∞
log m
me−tdt = log m + 1
(cid:18)
L(E
(cid:101)g) +
V 2(1 + log m)
n
(cid:19)
.
EL(g
(cid:98)j) ≤ (1 + γ) min
j∈[m]
L(gj) + C(1 + γ−1)
The proof is finished by taking the infimum over γ > 0.
E Technical lemmas
Lemma E.1. Suppose that x ∈ Rd is a zero-mean random vector with (cid:107)x(cid:107)ψ2 ≤ 1. There exists a
universal constant C > 0 such that for any symmetric and positive semi-definite matrix Σ ∈ Rd×d,
(cid:16)
P
(cid:17)
x(cid:62)Σx ≤ C Tr(Σ)t
≥ 1 − e−r(Σ)t,
∀t ≥ 1.
Here r(Σ) = Tr(Σ)/(cid:107)Σ(cid:107)2 is the effective rank of Σ.
Proof of Lemma E.1. This is a direct corollary of Lemma J.4 in Davis et al. (2021).
Lemma E.2. Let {Xi}n
then
i=1 be independent random variables. If Xi ≤ b almost surely and EX 2
i ≤ v2,
P
(cid:18) 1
n
n
(cid:88)
i=1
(Xi − EXi) ≤ max
(cid:26)
(cid:114)
2
v2 log(1/δ)
n
,
4b log(1/δ)
3n
(cid:27)(cid:19)
≥ 1 − δ,
∀δ ∈ (0, 1).
Consequently, if Xi ≥ 0 almost surely and EX 2
i ≤ v2, then
P
(cid:18) 1
n
n
(cid:88)
i=1
(Xi − EXi) ≥ −2
(cid:114)
(cid:19)
v2 log(1/δ)
n
≥ 1 − δ,
∀δ ∈ (0, 1).
31
Proof of Lemma E.2. Suppose that Xi ≤ b almost surely and EX 2
Wainwright (2019) implies that for any t ∈ R,
i ≤ v2. Proposition 2.14 in
(cid:18) 1
P
n
n
(cid:88)
(Xi − EXi) ≥ t
(cid:19)
(cid:18)
≤ exp
−
(cid:19)
(cid:18)
≤ exp
−
nt2/2
2 max{v2, bt/3}
(cid:19)
i=1
(cid:26)
(cid:18)
= max
exp
−
(cid:19)
(cid:18)
, exp
−
nt2
4v2
nt2
4bt/3
(cid:26)
(cid:18)
= max
exp
−
(cid:19)
(cid:18)
, exp
−
nt2
4v2
(cid:19)(cid:27)
.
3nt
4b
nt2/2
v2 + bt/3
(cid:19)(cid:27)
For δ ∈ (0, 1) and t = max{2v
Then, P( 1
n
can be obtained by applying the first part to −Xi and setting b = 0.
4b ≥ log(1/δ).
i=1(Xi − EXi) ≥ t) ≤ δ. This proves the first part of Lemma E.2. The second part
4v2 ≥ log(1/δ) and 3nt
}, we have nt2
, 4b log(1/δ)
3n
(cid:80)n
(cid:113) log(1/δ)
n
Lemma E.3. Let {xi}n
E(xi ⊗ xi) being trace class. Define (cid:98)Σ = 1
n
(cid:80)n
i=1 xi ⊗ xi.
i=1 be i.i.d. random elements in a separable Hilbert space H with Σ =
1. If (cid:107)xi(cid:107)H ≤ M holds almost surely for some constant M , then for any v2 ≥ (cid:107)Σ(cid:107) and r ≥ Tr(Σ)/v2,
(cid:18)
P
(cid:107) (cid:98)Σ − Σ(cid:107) ≤
(cid:114)
8M 2v2 log(r/δ)
n
+
6M 2 log(r/δ)
n
(cid:19)
≥ 1 − δ,
∀δ ∈ (0, r/14].
2. If (cid:107)(cid:104)xi, v(cid:105)(cid:107)2
ψ2
≤ κE|(cid:104)xi, v(cid:105)|2 holds for all v ∈ H and some constant κ, then there exists a constant
C determined by κ such that
(cid:18)
(cid:107) (cid:98)Σ − Σ(cid:107) ≤ C(cid:107)Σ(cid:107) max
P
(cid:114)
(cid:26)(cid:114) r
n
,
r
n
,
log(1/δ)
n
,
log(1/δ)
n
(cid:27)(cid:19)
≥ 1 − δ,
∀δ ∈ (0, 1/e].
Here r = Tr(Σ)/(cid:107)Σ(cid:107)2 is the effective rank of Σ.
Proof of Lemma E.3. The second part directly follows from Theorem 9 in Koltchinskii and
Lounici (2017). To prove the first part, we invoke a Bernstein inequality for self-adjoint opera-
tors. The Euclidean case is an intermediate result in the proof of Theorem 3.1 in Minsker (2017).
Section 3.2 of the same paper extends the result to the Hilbert setting.
Lemma E.4. Let H be a separable Hilbert space, and {Xi}n
Schmidt operators satisfying EXi = 0 and (cid:107) (cid:80)n
almost surely for all i and some U > 0. If t2 ≥ σ2 + U t/3, then
EX 2
i=1
i=1 be independent self-adjoint, Hilbert-
i (cid:107)2 ≤ σ2. Assume that (cid:107)Xi(cid:107)H ≤ U holds
P
(cid:18)(cid:13)
(cid:13)
(cid:13)
(cid:13)
n
(cid:88)
i=1
Xi
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:19)
≥ t
≤
14 Tr((cid:80)n
i=1
σ2
EX 2
i )
(cid:18)
exp
−
t2/2
σ2 + U t/3
(cid:19)
.
Let Xi = xi ⊗ xi − Σ. Under Assumptions 2.2 and 4.2,
(cid:107)Xi(cid:107) ≤ (cid:107)xi ⊗ xi(cid:107) + (cid:107)E(xi ⊗ xi)(cid:107) ≤ 2M 2,
Hxi ⊗ xi) − Σ2 (cid:22) E((cid:107)xi(cid:107)2
EX 2
i = E((cid:107)xi(cid:107)2
Hxi ⊗ xi) (cid:22) M 2Σ (cid:22) M 2v2I.
Choose any r ≥ Tr(Σ)/v2. Lemma E.4 with U = 2M 2 and σ2 = nM 2v2 imply that when t2 ≥
σ2 + U t/3,
P((cid:107) (cid:98)Σ − Σ(cid:107) ≥ t/n) ≤
14nM 2 Tr(Σ)
σ2
(cid:18)
exp
−
t2/2
nM 2v2 + 2M 2t/3
(cid:19)
32
≤
14nM 2 Tr(Σ)
nM 2v2
(cid:18)
exp
−
t2/2
nM 2v2 + 2M 2t/3
(cid:19)
(cid:18)
≤ 14r exp
−
t2/2
nM 2v2 + 2M 2t/3
(cid:19)
.
Choose any δ ∈ (0, r
14 ] and set
t =
(cid:112)
8nM 2v2 log(r/δ) + 6M 2 log(r/δ).
We have t ≥ U + σ and
Then,
(cid:18)
(cid:107) (cid:98)Σ − Σ(cid:107) ≥
P
(cid:18)
≤ 14r exp
−
(cid:26)
t2 ≥ U t + σt ≥ U t + σ(U + σ) ≥ U t/3 + σ2.
(cid:114)
8M 2v2 log(r/δ)
n
t2/2
nM 2v2 + 2M 2t/3
(cid:19)
(cid:18)
+
(cid:19)
6M 2 log(r/δ)
n
(cid:19)
= P((cid:107) (cid:98)Σ − Σ(cid:107) ≥ t/n)
(cid:18)
≤ 14r exp
−
t2/2
2 max{nM 2v2, 2M 2t/3}
(cid:19)
= 14r max
exp
−
(cid:26)
(cid:18)
≤ 14r max
exp
−
, exp
t2
4nM 2v2
8nM 2v2 log(r/δ)
4nM 2v2
(cid:18)
−
(cid:19)
(cid:19)(cid:27)
3t
8M 2
(cid:18)
, exp
−
3 * 6M 2 log(r/δ)
8M 2
(cid:19)(cid:27)
≤ 14r exp[−2 log(r/δ)] = 14r * (δ/r)2 =
14δ
r
* δ ≤ δ.
Corollary E.1. Let {xi}n
E(xi ⊗ xi) being trace class. Define (cid:98)Σ = 1
n
an event A = {(1 − γ)(Σ + λI) (cid:22) (cid:98)Σ + λI (cid:22) (1 + γ)(Σ + λI)}.
i=1 be i.i.d. random elements in a separable Hilbert space H with Σ =
i=1 xi ⊗ xi. Choose any constant γ ∈ (0, 1) and define
(cid:80)n
1. If (cid:107)xi(cid:107)H ≤ M holds almost surely for some constant M , then there exists a constant C ≥ 1
determined by γ such that P(A) ≥ 1 − δ holds so long as δ ∈ (0, 1/14] and λ ≥ CM 2 log(n/δ)
.
n
2. If (cid:107)(cid:104)xi, v(cid:105)(cid:107)2
ψ2
≤ κE|(cid:104)xi, v(cid:105)|2 holds for all v ∈ H and some constant κ, then there exists a constant
C ≥ 1 determined by γ and κ such that P(A) ≥ 1 − δ holds so long as δ ∈ (0, 1/e] and λ ≥
C Tr(Σ) log(1/δ)
n
.
Proof of Corollary E.1. We will apply Lemma E.3 to
(cid:101)xi = (Σ+λI)−1/2xi and (cid:101)Σ = (Σ+λI)−1Σ.
λ,
Suppose that (cid:107)xi(cid:107)H ≤ M holds almost surely for some constant M . We have (cid:107)(cid:101)xi(cid:107)H ≤ M/
Tr( (cid:101)Σ) ≤ Tr(Σ)/λ ≤ M 2/λ and (cid:107) (cid:101)Σ(cid:107) ≤ 1. Hence, the M and v2 in Lemma E.3 can be set to be
√
M/
λ and 1, respectively. For any λ ≥ M 2 log(n/δ)
, we have
√
n
Tr( (cid:101)Σ)/v2 ≤ M 2/λ ≤
n
log(n/δ)
≤ n.
Hence, we can take r = n in Lemma E.3 to get
(cid:18)
(cid:107)(Σ + λI)−1/2( (cid:98)Σ − Σ)(Σ + λI)−1/2(cid:107) ≤
P
(cid:114)
8M 2 log(n/δ)
nλ
+
6M 2 log(n/δ)
nλ
(cid:19)
≥ 1 − δ
33
so long as δ ∈ (0, n/14]. As a result, for any γ ∈ (0, 1) there exists a constant C ≥ 1 such that when
δ ∈ (0, 1] and λ ≥ CM 2 log(n/δ)
, we have
n
(cid:18)
P
(cid:107)(Σ + λI)−1/2( (cid:98)Σ − Σ)(Σ + λI)−1/2(cid:107) ≤ γ
(cid:19)
≥ 1 − δ.
This proves the first part of Corollary E.1.
Now, suppose that (cid:107)(cid:104)xi, v(cid:105)(cid:107)2
ψ2
≤ κE|(cid:104)xi, v(cid:105)|2 holds for all v ∈ H and some constant κ. Then,
P
(cid:18)
the same property holds for
(cid:107)(Σ + λI)−1/2( (cid:98)Σ − Σ)(Σ + λI)−1/2(cid:107) ≤ C(cid:107) (cid:101)Σ(cid:107) max
(cid:101)xi. The second part of Lemma E.3 implies that for any δ ∈ (0, 1/e],
, (cid:101)r
n
log(1/δ)
n
(cid:101)r = Tr( (cid:101)Σ)/(cid:107) (cid:101)Σ(cid:107)2. Note that (cid:107) (cid:101)Σ(cid:107) ≤ 1 and (cid:107) (cid:101)Σ(cid:107) ≤ Tr( (cid:101)Σ) ≤ Tr(Σ)/λ. We have
log(1/δ)
n
(cid:26)(cid:114)
Here
(cid:101)r
n
(cid:27)(cid:19)
(cid:114)
,
,
≥ 1 − δ.
(cid:114) r
n
=
(cid:113)
Tr( (cid:101)Σ)(cid:107) (cid:101)Σ(cid:107)/n ≤
(cid:113)
Tr( (cid:101)Σ)/n ≤
(cid:114)
Tr(Σ)
nλ
,
r
n
(cid:114)
(cid:107) (cid:101)Σ(cid:107)
(cid:107) (cid:101)Σ(cid:107)
(cid:107) (cid:101)Σ(cid:107)
(cid:107) (cid:101)Σ(cid:107)
= Tr( (cid:101)Σ)/n ≤
(cid:115)
=
log(1/δ)
n
log(1/δ)
n
≤
Tr(Σ) log(1/δ)
nλ
, we have
Tr(Σ)
nλ
,
(cid:107) (cid:101)Σ(cid:107)2 log(1/δ)
n
≤
(cid:114)
Tr(Σ) log(1/δ)
nλ
,
When δ ∈ (0, 1/e] and λ ≥ Tr(Σ) log(1/δ)
(cid:114)
n
(cid:26)(cid:114)
(cid:107) (cid:101)Σ(cid:107) max
(cid:101)r
n
, (cid:101)r
n
,
log(1/δ)
n
,
log(1/δ)
n
(cid:27)
(cid:114)
≤
Tr(Σ) log(1/δ)
nλ
≤ 1.
As a result, for any γ ∈ (0, 1) there exists a constant C(cid:48) ≥ 1 such that when δ ∈ (0, 1/e] and
λ ≥ C(cid:48) Tr(Σ) log(1/δ)
, we have
n
(cid:18)
(cid:107)(Σ + λI)−1/2( (cid:98)Σ − Σ)(Σ + λI)−1/2(cid:107) ≤ γ
P
(cid:19)
≥ 1 − δ.
The proof is finished by renaming the constant C(cid:48).
Below is a lemma on random quadratic forms, which is crucial for connecting empirical (in-
sample) and population (out-of-sample) squared errors.
Lemma E.5. Let H be a separable Hilbert space with inner product (cid:104)*, *(cid:105) and norm (cid:107) * (cid:107)H; {zi}n
i=1 be
i.i.d. samples from a distribution over H such that S = E(zi ⊗ zi) is trace class; w ∈ H be random
and independent of {zi}n
1. Suppose that E(cid:107)z1(cid:107)4
i=1. Define (cid:98)S = 1
n
H < ∞ and the inequality
i=1 zi ⊗ zi. We have the following results.
(cid:80)n
P(|(cid:104)z1, w(cid:105)| ≤ r and (cid:107)w(cid:107)H ≤ R) ≥ 1 − ε
holds for some deterministic r > 0, R > 0 and ε ∈ (0, 1). Then, for any γ ∈ (0, 3/4] and
δ ∈ (0, 1), we have
(cid:18)
(cid:104)w, (cid:98)Sw(cid:105) ≤ (1 + γ)(cid:104)w, Sw(cid:105) +
(cid:18)
(cid:104)w, (cid:98)Sw(cid:105) ≥ (1 − γ)(cid:104)w, Sw(cid:105) −
P
P
r2 log(1/δ)
γn
r2 log(1/δ)
γn
34
(cid:19)
≥ 1 − δ − nε,
− R2ε1/4(cid:113)
E(cid:107)z(cid:107)4
H
(cid:19)
≥ 1 − δ − (n + 1)
√
ε.
2. Suppose there exists κ > 0 such that
(cid:107)(cid:104)z1, v(cid:105)(cid:107)2
ψ2 ≤ κ(cid:104)v, Sv(cid:105),
∀v ∈ H.
There exists a universal constant C ≥ 1 such that when γ = Cκ
(cid:113) log(2/δ)
n ≤ 1, we have
(cid:16)
P
(1 − γ)(cid:104)w, Sw(cid:105) ≤ (cid:104)w, (cid:98)Sw(cid:105) ≤ (1 + γ)(cid:104)w, Sw(cid:105)
(cid:17)
≥ 1 − δ,
∀δ ∈ (0, 1).
Proof of Lemma E.5. Throughout the proof, we use z to denote a random element drawn from
distribution μ, independently of w and {zi}n
To begin with, we work on the first inequality in Part 1. Fix any v ∈ H, define Ui = |(cid:104)zi, v(cid:105)|2
and ̄Ui = Ui1{Ui≤r2}. We have
i=1
.
(cid:104)v, (cid:98)Sv(cid:105) − (cid:104)v, Sv(cid:105) =
=
≤
1
n
1
n
1
n
n
(cid:88)
i=1
n
(cid:88)
i=1
n
(cid:88)
i=1
(Ui − EUi)
(Ui − ̄Ui) +
(Ui − ̄Ui) +
1
n
1
n
n
(cid:88)
i=1
n
(cid:88)
i=1
( ̄Ui − E ̄Ui) +
1
n
n
(cid:88)
(E ̄Ui − EUi)
i=1
( ̄Ui − E ̄Ui).
The last inequality follows from
E ̄Ui − EUi = E( ̄Ui − Ui) = −E(Ui1{Ui>r2}) ≤ 0.
For any t ∈ R,
P((cid:104)v, (cid:98)Sv(cid:105) − (cid:104)v, Sv(cid:105) ≤ t) ≥ P
(cid:18) 1
n
n
(cid:88)
i=1
(Ui − ̄Ui) +
1
n
n
(cid:88)
( ̄Ui − E ̄Ui) ≤ t
(cid:19)
i=1
n
(cid:88)
( ̄Ui − E ̄Ui) ≤ t, Ui = ̄Ui for all i ∈ [n]
(cid:19)
( ̄Ui − E ̄Ui) ≤ t, max
i∈[n]
(cid:19)
|(cid:104)zi, w(cid:105)| ≤ r
( ̄Ui − E ̄Ui) > t
( ̄Ui − E ̄Ui) > t
(cid:19)
(cid:19)
(cid:18)
− P
(cid:19)
max
i∈[n]
|(cid:104)zi, v(cid:105)| > r
− nP(|(cid:104)z, v(cid:105)| > r).
(E.1)
n
(cid:88)
i=1
n
(cid:88)
i=1
The last inequality follows from union bounds and the fact that {zi}n
are i.i.d., 0 ≤ ̄Ui ≤ r2 and
Note that { ̄Ui}n
i=1
are i.i.d.
i = E(|(cid:104)zi, v(cid:105)|41{|(cid:104)zi,v(cid:105)|≤r}) ≤ r2E|(cid:104)zi, v(cid:105)|2 = r2(cid:104)v, Sv(cid:105).
Lemma E.2 with Xi = ̄Ui, b = r2 and v2 = r2(cid:104)v, Sv(cid:105) yields
P
(cid:18) 1
n
n
(cid:88)
i=1
( ̄Ui − E ̄Ui) ≤ max
(cid:26)
(cid:114)
2
(cid:104)v, Sv(cid:105)r2 log(1/δ)
n
,
4r2 log(1/δ)
3n
(cid:27)(cid:19)
≥ 1 − δ,
∀δ ∈ (0, 1).
35
≥ P
= P
(cid:18) 1
n
(cid:18) 1
n
≥ 1 − P
≥ 1 − P
i=1
n
(cid:88)
i=1
(cid:18) 1
n
(cid:18) 1
n
i=1
E ̄U 2
It is easily seen that
(cid:114)
2
(cid:104)v, Sv(cid:105)r2 log(1/δ)
n
≤ γ(cid:104)v, Sv(cid:105) +
r2 log(1/δ)
γn
,
∀γ > 0.
As a result, for any γ ∈ (0, 3/4],
(cid:114)
(cid:26)
max
2
(cid:104)v, Sv(cid:105)r2 log(1/δ)
n
,
P
(cid:18) 1
n
n
(cid:88)
i=1
( ̄Ui − E ̄Ui) ≤ γ(cid:104)v, Sv(cid:105) +
(cid:27)
4r2 log(1/δ)
3n
r2 log(1/δ)
γn
≤ γ(cid:104)v, Sv(cid:105) +
r2 log(1/δ)
γn
(cid:19)
≥ 1 − δ,
∀δ ∈ (0, 1).
The above estimate and (E.1) lead to
(cid:18)
(cid:104)v, (cid:98)Sv(cid:105) ≤ (1 + γ)(cid:104)v, Sv(cid:105) +
P
(cid:19)
r2 log(1/δ)
γn
≥ 1 − δ − nP(|(cid:104)z, v(cid:105)| > r).
Thanks to the independence of w, z and {zi}n
i=1
, we can replace v with w to get
(cid:18)
P
(cid:104)w, (cid:98)Sw(cid:105) ≤ (1 + γ)(cid:104)w, Sw(cid:105) +
(cid:19)
r2 log(1/δ)
γn
≥ 1 − δ − nε,
∀δ ∈ (0, 1).
≥ 1 − δ − nP(|(cid:104)z, w(cid:105)| > r)
Next, we prove the second inequality in the Part 1. Again, we fix any v ∈ H, define
Ui = |(cid:104)zi, v(cid:105)|2 and ̄Ui = Ui1{Ui≤r2}. We have
(cid:104)v, (cid:98)Sv(cid:105) − (cid:104)v, Sv(cid:105) =
1
n
n
(cid:88)
i=1
(Ui − ̄Ui) +
1
n
n
(cid:88)
i=1
( ̄Ui − E ̄Ui) +
1
n
n
(cid:88)
i=1
(E ̄Ui − EUi).
By direct calculation,
−
n
(cid:88)
i=1
Hence,
(E ̄Ui − EUi) = E(|(cid:104)z, v(cid:105)|21{|(cid:104)z,v(cid:105)|>r}) ≤ E((cid:107)z(cid:107)2
H(cid:107)v(cid:107)2
H1{|(cid:104)z,v(cid:105)|>r})
(cid:113)
≤ (cid:107)v(cid:107)2
H
E(cid:107)z(cid:107)4
H * P(|(cid:104)z, v(cid:105)| > r).
(cid:18)
P
(cid:104)v, (cid:98)Sv(cid:105) − (cid:104)v, Sv(cid:105) ≥ t − (cid:107)v(cid:107)2
H
(cid:113)
E(cid:107)z(cid:107)4
H * P(|(cid:104)z, v(cid:105)| > r)
(cid:19)
(cid:18)
̄Ui = Ui for all i ∈ [n],
≥ P
≥ P
(cid:18) 1
n
n
(cid:88)
i=1
( ̄Ui − E ̄Ui) ≥ t
(cid:19)
( ̄Ui − E ̄Ui) ≥ t
(cid:19)
1
n
n
(cid:88)
i=1
− nP(|(cid:104)z, v(cid:105)| > r).
The second part of Lemma E.2 applied to Xi = ̄Ui ≥ 0 and v2 = r2(cid:104)v, Sv(cid:105) yields
(cid:114)
P
(cid:18) 1
n
n
(cid:88)
i=1
( ̄Ui − E ̄Ui) ≥ −2
r2(cid:104)v, Sv(cid:105) log(1/δ)
n
(cid:19)
≥ 1 − δ,
∀δ ∈ (0, 1).
36
For any γ > 0, we have
(cid:114)
2
r2(cid:104)v, Sv(cid:105) log(1/δ)
n
≤ γ(cid:104)v, Sv(cid:105) +
r2 log(1/δ)
γn
P
(cid:18) 1
n
n
(cid:88)
i=1
( ̄Ui − E ̄Ui) ≥ −γ(cid:104)v, Sv(cid:105) −
(cid:19)
r2 log(1/δ)
γn
≥ 1 − δ.
(cid:18)
(cid:104)v, (cid:98)Sv(cid:105) − (cid:104)v, Sv(cid:105) ≥ −γ(cid:104)v, Sv(cid:105) −
r2 log(1/δ)
γn
− (cid:107)v(cid:107)2
H
(cid:113)
E(cid:107)z(cid:107)4
H * P(|(cid:104)z, v(cid:105)| > r)
(cid:19)
and thus
Then,
P
≥ 1 − δ − nP(|(cid:104)z, v(cid:105)| > r).
Since w is independent of {zi}n
i=1
and z,
(cid:18)
P
(cid:104)w, (cid:98)Sw(cid:105) ≥ (1 − γ)(cid:104)w, Sw(cid:105) −
r2 log(1/δ)
γn
≥ 1 − δ − nP(|(cid:104)z, w(cid:105)| > r) ≥ 1 − δ − nε.
− (cid:107)w(cid:107)2
H
(cid:113)
E(cid:107)z(cid:107)4
H * P(|(cid:104)z, w(cid:105)| > r|w)
(cid:19)
(E.2)
We now provide a high-probability bound on (cid:107)w(cid:107)2
H
(cid:113)
E(cid:107)z(cid:107)4
H * P(|(cid:104)z, w(cid:105)| > r|w). Define an event
A = {|(cid:104)z, w(cid:105)| ≤ r and (cid:107)w(cid:107)H ≤ R} and a set Ω = {w0 ∈ H : P(A|w = w0) > 1 −
ε}. We have
√
1 − ε ≤ P(A) = EwP(A|w) = Ew[P(A|w)(1{w∈Ω} + 1{w /∈Ω})].
When w /∈ Ω, P(A|w) ≤ 1 −
√
ε; when w ∈ Ω, we can use the trivial bound P(A|w) ≤ 1. Therefore,
1 − ε ≤ 1 * P(w ∈ Ω) + (1 −
√
ε)P(w /∈ Ω) = 1 −
√
εP(w /∈ Ω),
which leads to P(w /∈ Ω) ≤
√
ε.
Choose any w0 ∈ Ω. We claim that (cid:107)w0(cid:107)H ≤ R. Indeed, if (cid:107)w0(cid:107)H > R, then P(Ac|w = w0) = 1
contradicts the definition of Ω. Therefore,
(cid:113)
E(cid:107)z(cid:107)4
H * P(|(cid:104)z, w(cid:105)| > r|w = w0) ≤ R2(cid:113)
E(cid:107)z(cid:107)4
H * P(Ac|w = w0) ≤ R2(cid:113)
E(cid:107)z(cid:107)4
H
√
ε.
(cid:107)w0(cid:107)2
H
We get
(cid:18)
(cid:107)w(cid:107)2
H
P
(cid:113)
E(cid:107)z(cid:107)4
H * P(|(cid:104)z, w(cid:105)| > r|w) ≤ R2ε1/4(cid:113)
E(cid:107)z(cid:107)4
H
(cid:19)
≥ P(w ∈ Ω) ≥ 1 −
√
ε.
Combining this with (E.2), we finally get
(cid:18)
P
(cid:104)w, (cid:98)Sw(cid:105) ≥ (1 − γ)(cid:104)w, Sw(cid:105) −
√
≥ 1 − δ − nε −
ε ≥ 1 − δ − (n + 1)
r2 log(1/δ)
γn
√
ε.
− R2ε1/4(cid:113)
E(cid:107)z(cid:107)4
H
(cid:19)
Finally, we come to Part 2. Suppose there exists κ > 0 such that
(cid:107)(cid:104)z, v(cid:105)(cid:107)2
ψ2 ≤ κ(cid:104)v, Sv(cid:105),
∀v ∈ H.
37
Fix any v ∈ H and define Ui = |(cid:104)zi, v(cid:105)|2. Then, {Ui}n
i=1
are i.i.d. and
(cid:107)Ui(cid:107)ψ1
(cid:46) (cid:107)(cid:104)zi, v(cid:105)(cid:107)2
ψ2 ≤ κ(cid:104)v, Sv(cid:105).
By Proposition 5.17 in Vershynin (2010) (a Bernstein-type inequality),
P(|(cid:104)w, (cid:98)Sw(cid:105) − (cid:104)w, Sw(cid:105)| ≥ t) = P
(cid:18)(cid:12)
(cid:12)
(cid:12)
(cid:12)
1
n
n
(cid:88)
i=1
(cid:12)
(cid:12)
(Ui − EUi)
(cid:12)
(cid:12)
(cid:19)
≥ t
(cid:20)
≤ 2 exp
− cn min
(cid:26)(cid:18)
t
κ(cid:104)v, Sv(cid:105)
(cid:19)2
,
t
κ(cid:104)v, Sv(cid:105)
(cid:27)(cid:21)
.
Choose any δ ∈ (0, 1) and set
t = κ(cid:104)v, Sv(cid:105) max
(cid:26)(cid:114)
log(2/δ)
cn
,
log(2/δ)
cn
(cid:27)
,
we get P(|(cid:104)v, (cid:98)Sv(cid:105) − (cid:104)v, Sv(cid:105)| ≤ t) ≥ 1 − δ. Let C = max{1/
√
c, 1/c, 1}. Then,
(cid:18)
P
|(cid:104)v, (cid:98)Sv(cid:105) − (cid:104)v, Sv(cid:105)| ≤ Cκ(cid:104)v, Sv(cid:105) max
(cid:26)(cid:114)
log(2/δ)
n
,
log(2/δ)
n
(cid:27)(cid:19)
≥ 1 − δ.
Since w is independent of {zi}n
i=1
, replacing v with w yields
(cid:18)
(cid:19)
(1 − γ0)(cid:104)v, Sv(cid:105) ≤ (cid:104)v, (cid:98)Sv(cid:105) ≤ (1 + γ0)(cid:104)v, Sv(cid:105)
≥ 1 − δ
P
with γ0 = Cκ max{
If γ = Cκ
(cid:113) log(2/δ)
n
max{
,
(cid:113) log(2/δ)
n
log(2/δ)
n
} =
(cid:113) log(2/δ)
n
≤ 1, then we see from C ≥ 1 and κ ≥ 1 that log(2/δ)
log(2/δ)
n
}.
,
(cid:113) log(2/δ)
n
and γ0 = γ. We obtain the desired result.
≤ 1. Hence,
n
References
Aronszajn, N. (1950). Theory of reproducing kernels. Transactions of the American mathematical
society 68 337–404.
Ben-David, S., Blitzer, J., Crammer, K., Kulesza, A., Pereira, F. and Vaughan, J. W.
(2010). A theory of learning from different domains. Machine learning 79 151–175.
Blanchard, G. and Massart, P. (2006). Discussion: Local Rademacher complexities and oracle
inequalities in risk minimization. The Annals of Statistics 34 2664 – 2671.
URL https://doi.org/10.1214/009053606000001037
Cai, T. T. and Wei, H. (2021). Transfer learning for nonparametric classification: Minimax rate
and adaptive classifier. The Annals of Statistics 49.
Cameron, A. C., Gelbach, J. B. and Miller, D. L. (2008). Bootstrap-based improvements
for inference with clustered errors. The review of economics and statistics 90 414–427.
38
Caponnetto, A. and Yao, Y. (2010). Cross-validation based adaptation for regularization oper-
ators in learning theory. Analysis and Applications 8 161–183.
Cortes, C., Mansour, Y. and Mohri, M. (2010). Learning bounds for importance weighting.
Advances in neural information processing systems 23.
Davis, D., Díaz, M. and Wang, K. (2021). Clustering a mixture of Gaussians with unknown
covariance. arXiv preprint arXiv:2110.01602 .
Donoho, D. L. (1994). Statistical estimation and optimal recovery. The Annals of Statistics 22
238–270.
Hanneke, S. and Kpotufe, S. (2019). On the value of target data in transfer learning. Advances
in Neural Information Processing Systems 32.
Heckman, J. J. (1979). Sample selection bias as a specification error. Econometrica: Journal of
the econometric society 153–161.
Hirshberg, D. A., Maleki, A. and Zubizarreta, J. R. (2019). Minimax linear estimation of
the retargeted mean. arXiv preprint arXiv:1901.10296 .
Hirshberg, D. A. and Wager, S. (2021). Augmented minimax linear estimation. The Annals of
Statistics 49 3206–3227.
Hoerl, A. E. and Kennard, R. W. (1970). Ridge regression: Biased estimation for nonorthogonal
problems. Technometrics 12 55–67.
Huang, J., Gretton, A., Borgwardt, K., Schölkopf, B. and Smola, A. (2006). Correcting
sample selection bias by unlabeled data. Advances in neural information processing systems 19.
Kallus, N. (2020). Generalized optimal matching methods for causal inference. The Journal of
Machine Learning Research 21 2300–2353.
Koltchinskii, V. and Lounici, K. (2017). Concentration inequalities and moment bounds for
sample covariance operators. Bernoulli 23 110–133.
Kpotufe, S. and Martinet, G. (2021). Marginal singularity and the benefits of labels in covariate-
shift. The Annals of Statistics 49 3299–3323.
Lee, D.-H. (2013). Pseudo-label: The simple and efficient semi-supervised learning method for
deep neural networks. In Workshop on challenges in representation learning, ICML, vol. 3.
Lei, Q., Hu, W. and Lee, J. (2021). Near-optimal linear regression under distribution shift. In
International Conference on Machine Learning. PMLR.
Li, K.-C. (1982). Minimaxity of the method of regularization of stochastic processes. The Annals
of Statistics 10 937–942.
Little, R. J. and Rubin, D. B. (2019). Statistical analysis with missing data, vol. 793. John
Wiley & Sons.
Liu, M., Zhang, Y., Liao, K. and Cai, T. (2020). Augmented transfer regression learning with
semi-non-parametric nuisance models. arXiv preprint arXiv:2010.02521 .
39
Ma, C., Pathak, R. and Wainwright, M. J. (2022). Optimally tackling covariate shift in
RKHS-based nonparametric regression. arXiv preprint arXiv:2205.02986 .
Maity, S., Sun, Y. and Banerjee, M. (2022). Minimax optimal approaches to the label shift
problem in non-parametric settings. Journal of Machine Learning Research 23 1–45.
Minsker, S. (2017). On some extensions of Bernstein's inequality for self-adjoint operators. Statis-
tics & Probability Letters 127 111–119.
Mou, W., Ding, P., Wainwright, M. J. and Bartlett, P. L. (2023). Kernel-based off-policy
estimation without overlap: Instance optimality beyond semiparametric efficiency. arXiv preprint
arXiv:2301.06240 .
Mou, W., Wainwright, M. J. and Bartlett, P. L. (2022). Off-policy estimation of linear func-
tionals: Non-asymptotic theory for semi-parametric efficiency. arXiv preprint arXiv:2209.13075
.
Mousavi Kalan, M., Fabian, Z., Avestimehr, S. and Soltanolkotabi, M. (2020). Minimax
lower bounds for transfer learning with linear and one-hidden layer neural networks. Advances in
Neural Information Processing Systems 33 1959–1969.
Pan, S. J. and Yang, Q. (2010). A survey on transfer learning. IEEE Transactions on knowledge
and data engineering 22 1345–1359.
Pathak, R., Ma, C. and Wainwright, M. (2022). A new similarity measure for covariate shift
with applications to nonparametric regression. In International Conference on Machine Learning.
PMLR.
Reeve, H. W., Cannings, T. I. and Samworth, R. J. (2021). Adaptive transfer learning. The
Annals of Statistics 49 3618–3649.
Schmidt-Hieber, J. and Zamolodtchikov, P. (2022). Local convergence rates of the least
squares estimator with applications to transfer learning. arXiv preprint arXiv:2204.05003 .
Shimodaira, H. (2000).
Improving predictive inference under covariate shift by weighting the
log-likelihood function. Journal of statistical planning and inference 90 227–244.
Speckman, P. (1979). Minimax estimates of linear functionals in a hilbert space. Unpublished
manuscript .
Sugiyama, M. and Kawanabe, M. (2012). Machine learning in non-stationary environments:
Introduction to covariate shift adaptation. MIT press.
Tripuraneni, N., Adlam, B. and Pennington, J. (2021). Covariate shift in high-dimensional
random feature regression. arXiv preprint arXiv:2111.08234 .
Vapnik, V. (1999). The nature of statistical learning theory. Springer science & business media.
Vershynin, R. (2010). Introduction to the non-asymptotic analysis of random matrices. arXiv
preprint arXiv:1011.3027 .
Wahba, G. (1990). Spline models for observational data. SIAM.
40
Wainwright, M. J. (2019). High-dimensional statistics: A non-asymptotic viewpoint, vol. 48.
Cambridge University Press.
Wu, J., Zou, D., Braverman, V., Gu, Q. and Kakade, S. M. (2022). The power and
limitation of pretraining-finetuning for linear regression under covariate shift. arXiv preprint
arXiv:2208.01857 .
Yang, F., Zhang, H. R., Wu, S., Su, W. J. and Ré, C. (2020). Analysis of information
transfer from heterogeneous sources via precise high-dimensional asymptotics. arXiv preprint
arXiv:2010.11750 .
Zadrozny, B. (2004). Learning and evaluating classifiers under sample selection bias. In Proceed-
ings of the twenty-first international conference on Machine learning.
41
|
|
http://arxiv.org/abs/2302.10158v1 | 2023-02-20T18:45:24 | 2023-02-20T18:45:24 | Sparse PCA Beyond Covariance Thresholding | In the Wishart model for sparse PCA we are given $n$ samples $Y_1,\ldots,
Y_n$ drawn independently from a $d$-dimensional Gaussian distribution $N({0, Id
+ \beta vv^\top})$, where $\beta > 0$ and $v\in \mathbb{R}^d$ is a $k$-sparse
unit vector, and we wish to recover $v$ (up to sign).
We show that if $n \ge \Omega(d)$, then for every $t \ll k$ there exists an
algorithm running in time $n\cdot d^{O(t)}$ that solves this problem as long as
\[ \beta \gtrsim \frac{k}{\sqrt{nt}}\sqrt{\ln({2 + td/k^2})}\,. \] Prior to
this work, the best polynomial time algorithm in the regime $k\approx
\sqrt{d}$, called \emph{Covariance Thresholding} (proposed in [KNV15a] and
analyzed in [DM14]), required $\beta \gtrsim \frac{k}{\sqrt{n}}\sqrt{\ln({2 +
d/k^2})}$. For large enough constant $t$ our algorithm runs in polynomial time
and has better guarantees than Covariance Thresholding. Previously known
algorithms with such guarantees required quasi-polynomial time $d^{O(\log d)}$.
In addition, we show that our techniques work with sparse PCA with
adversarial perturbations studied in [dKNS20]. This model generalizes not only
sparse PCA, but also other problems studied in prior works, including the
sparse planted vector problem. As a consequence, we provide polynomial time
algorithms for the sparse planted vector problem that have better guarantees
than
the state of the art in some regimes.
Our approach also works with the Wigner model for sparse PCA. Moreover, we
show that it is possible to combine our techniques with recent results on
sparse PCA with symmetric heavy-tailed noise [dNNS22]. In particular, in the
regime $k \approx \sqrt{d}$ we get the first polynomial time algorithm that
works with symmetric heavy-tailed noise, while the algorithm from [dNNS22].
requires quasi-polynomial time in these settings. | [
"Gleb Novikov"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.10158v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.10158v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"stat.ML"
] | 3
2
0
2
b
e
F
0
2
]
G
L
.
s
c
[
1
v
8
5
1
0
1
.
2
0
3
2
:
v
i
X
r
a
Sparse PCA Beyond Covariance Thresholding
∗
†
Gleb Novikov
February 21, 2023
Abstract
In the Wishart model for sparse PCA we are given n samples Y1, . . . , Yn drawn independently
Rd is a k-
0, Id
, where β > 0 and v
∈
from a d-dimensional Gaussian distribution N
sparse unit vector, and we wish to recover v (up to sign).
d
, then for every t
+
(
We show that if n > Ω
(
dO
t
) that solves this problem as long as
(
≪
)
βvv⊤)
n
*
k there exists an algorithm running in time
β & k
√nt
p
ln
2
(
+
td
k2
.
)
/
√d, called Covariance
Prior to this work, the best polynomial time algorithm in the regime k
Thresholding (proposed in [KNV15a] and analyzed in [DM14]), required β & k
k2
.
ln
√n
)
(
For large enough constant t our algorithm runs in polynomial time and has better guarantees
than Covariance Thresholding. Previously known algorithms with such guarantees required
quasi-polynomial time dO
log d
p
+
≈
2
d
/
(
).
In addition, we show that our techniques work with sparse PCA with adversarial per-
turbations studied in [dKNS20]. This model generalizes not only sparse PCA, but also other
problems studied in prior works, including the sparse planted vector problem. As a conse-
quence, we provide polynomial time algorithms for the sparse planted vector problem that
have better guarantees than the state of the art in some regimes.
Our approach also works with the Wigner model for sparse PCA. Moreover, we show that it
is possible to combine our techniques with recent results on sparse PCA with symmetric heavy-
√d we get the first polynomial time
tailed noise [dNNS22]. In particular, in the regime k
algorithm that works with symmetric heavy-tailed noise, while the algorithm from [dNNS22]
requires quasi-polynomial time in these settings.
≈
∗
This project has received funding from the European Research Council (ERC) under the European Union's Horizon
2020 research and innovation programme (grant agreement No 815464).
†
ETH Zürich.
1
4
8
12
16
Contents
1 Introduction
1.1 Results . . . . . .
. . . . .
. . . . . .
. . . . .
. . . . . .
. . . . . .
. . . . .
. . . . . .
2 Techniques
3 The Wishart Model
4 Adversarial Perturbations
5 The Wigner Model
5.1 Classical Settings . . . . .
. . . . . .
5.2 Adversarial Perturbations . . . . . .
. . . . .
. . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . .
. . . . .
6 Heavy-tailed Symmetric Noise
References
A Properties of sparse vectors
B Linear Algebra
C Concentration Inequalities
23
. . . . . . 23
. . . . . . 25
26
30
32
34
35
1 Introduction
0, Id
We study sparse principal component analysis in the Wishart and Wigner models. First we describe
the Wishart model (that is sometimes also called the spiked covariance model). In this model, we
are given n samples Y1, . . . , Yn drawn1 independently from d-dimensional Gaussian distribution
Rd is a k-sparse2 unit vector. The goal is to compute
N
v, v
is close to 1 (say, is greater than 0.99) with high
an estimator
probability3. In this paper we mostly focus on the regime when the number of samples n is greater
than the dimension d, and in this section of the paper we always assume that4 n > Ω
(unless
(
stated otherwise).
, where β > 0 and v
v
= 1 and
k ˆ
v such that
ˆ
∈
|h ˆ
βvv⊤
i|
+
d
k
)
(cid:1)
(cid:0)
Classical settings. The standard approach in covariance estimation is to consider the empirical
Y ⊤Y (where Y is the matrix with rows Y1, . . . , Yn). The top eigenvector of 1
Y ⊤Y is
covariance 1
n
n
d
n , and in non-sparse settings (k = d) these
highly correlated with v or
guarantees are information theoretically optimal. For k < d, there exists an estimator with better
candidates for the support of v and is close to v or
guarantees. It uses exhaustive search over all
v as long as β &
q
−
d
k
v iff β &
k log
k
/
de
(
n
−
[AW09, BR13b, BR13c].
q
)
, and these guarantees are information theoretically optimal in sparse settings
(cid:0)
(cid:1)
As was observed in [JL09], known algorithmic guarantees for sparse PCA are strictly worse than
√d, no polynomial time algorithm is
the statistical guarantees described above. In the regime k
known to work if β .
d
n , the top eigenvector of the empirical covariance
is a good estimator). [JL09] proposed a polynomial time algorithm (called Diagonal thresholding)
n (recall that if β &
≫
d
q
q
v as long as β & k
log d
n , which is better than the top
√d, but is worse than the information-theoretically optimal estimator
q
−
that finds an estimator that is close to v or
eigenvector of Y ⊤Y if k
by a factor √k.
≪
Later many computational lower bounds of different kind appeared: reductions from the
planted clique problem [BR13a, BR13b, WBS16, GMZ17, BBH18, BB19], low degree polynomial
lower bounds [DKWB19, dKNS20], statistical query lower bounds [BBH+21], SDP and sum-of-
squares lower bounds [KNV15b, MW15, PR22], lower bounds for Markov chain Monte Carlo
methods [AWZ20]. These lower bounds suggest that the algorithms described above should have
√d (the top eigen-
optimal guarantees in the regimes k
vector), so it is unlikely that there exist efficient algorithms with significantly better guarantees if
k
√d (Diagonal thresholding) and k
√d.
≫
≪
√d is more interesting. For a long time no efficiently computable estimator
with provable guarantees better than the top eigenvector of Y ⊤Y or than Diagonal thresholding
was known, until [DM14] proved that a polynomial time algorithm (called Covariance thresholding)
≈
≪
√d or k
The regime k
≫
computes an estimator that is close to v or
. This estimator can exploit
sparsity if k < √d and is better than Diagonal thresholding and the top eigenvector of the empirical
q
−
(
)
/
v as long as β & k
log
k2
ed
n
1We use boldface to denote random variables.
2That is, this vector has at most k non-zero coordinates.
3It is impossible to recover the sign of v from Y1, . . . , Yn.
4We hide absolute constant multiplicative factors using the standard notations O
, Ω
(*)
(*)
, ., &.
1
2
covariance in the regime d1
−
/
o
) < k < √d.
1
(
vnew, v
|h ˆ
i|
These results show that in order to work with smaller signal strength β, one needs either to work
with larger number of samples n, or to work with a sparser vector v (i.e. smaller k). [DKWB19] (and
independently [HSV20]) showed that in some regimes there is another option: one can (smoothly)
increase the running time needed to compute the estimator in order to work with smaller signal
strength. Concretely, they showed that for 1 6 t 6 k
log d there exists an estimator that can be
log d
v as long as β & k
computed in time dO
tn .
N, let βDT be the smallest signal
The following example illustrates their result: For some n, d, k
strength such that Diagonal thresholding, given an instance Y of sparse PCA with n samples,
> 0.99
dimension d, sparsity k and signal strength βDT, finds a unit vector
with probability at least 0.99. Now suppose that for the same n, d, k, we are given an instance
Y ′ of the sparse PCA with smaller signal strength βnew = 0.01
βDT. Then their result implies
vnew such that
that there exists a polynomial time algorithm that, given Y ′, finds a unit vector
ˆ
) (via Limited brute force) and is close to v or
vDT such that
ˆ
vDT, v
|h ˆ
q
−
i|
∈
/
*
(
t
> 0.99 with probability at least 0.99.
However, the approach of [DKWB19] and [HSV20] is not compatible with the optimal guar-
√d. More precisely, if we define βCT as the smallest signal strength for
antees in the regime k
Covariance thresholding (in the same way as we defined βDT for Diagonal thresholding), then the
Limited brute force that works with signal strength 0.01
βCT requires t to be at least log d and
hence runs in quasi-polynomial time dO
). Prior to this work it was the fastest algorithm in this
regime.
log d
(
≈
*
A
√d
(
and n > Ω
(
be an arbitrary currently known polynomial time algorithm for sparse PCA. Let β
Our result shows that it is possible to smoothly increasy running time in order to work with
. It can be informally described as
)
smaller signal strength as long as k 6 O
follows: Let
be the smallest signal strength such that
d, n > Ω
√d
(
)
, v
A
, given an instance Y of sparse PCA with, dimension
samples, sparsity k 6 O
such
, and signal strength β
> 0.99 with probability at least 0.99. For arbitrary constant C > 1, let βC = 1
that
.
A
Then there exists a polynomial time5 algorithm, that, given an instance of sparse PCA Y ′ with
vnew such that
signal strength βC and the same parameters n, d, k as for Y , finds a unit vector
ˆ
, finds a unit vector
v
|h ˆ
C β
v
ˆ
A
i|
d
d
A
A
A
(cid:17)
(cid:16)
)
vnew, v
|h ˆ
i|
> 0.99 with probability6 0.99.
In particular, our result implies that there exists a polynomial time algorithm that works with
signal strength 0.01
βCT, which is a significant improvement compared to the best previously
known (quasi-polynomial time) algorithm. Moreover, our result also implies the first polynomial
time algorithm that can exploit sparsity and has better guarantees than the top eigenvector even
in the regime k > √d (as long as k 6 O
√d
).
*
(cid:16)
(cid:17)
Semidefinite programming and adversarial perturbations.
[dGJL04] introduced Basic SDP for
sparse PCA. Basic SDP achieves guarantees of both the top eigenvector of the empirical covariance
and Diagonal Thresholding. Later [dKNS20] proved that it also achieves the guarantees of Covari-
ance thresholding, and hence captures the best currently known polynomial time guarantees.
Moreover, [dKNS20] showed that Basic SDP also works with adversarial perturbations. More
5The degree of the polynomial depends on C.
6Moreover, our results imply that
vnew, v
|h ˆ
i|
> 0.99 with probability 1
o
1
)
(
−
as d
→ ∞
2
precisely, if a small (adversarially chosen) value Eij is added to every entry Yij of the sparse PCA
instance, Basic SDP still recovers v or
v with high probability. Known estimators that are not based
on semidefinite programming, including top eigenvector of the empirical covariance, Diagonal
thresholding, Covariance Thresholding and Limited brute force, do not work with adversarial
perturbations. [dKNS20] also provided a family of algorithms based on sum-of-squares relaxations
that work with adversarial perturbations and achieves the guarantees of Limited brute force from
[DKWB19].
−
Similar to non-adversarial case, Basic SDP and Limited brute force based on sum-of-squares are
√d, the sum-of-squares approach from [dKNS20]
not compatible with each other: in the regime k
requires degree log d in order to achieve better guarantees than Basic SDP, so the corresponding
estimator can be computed only in quasi-polynomial time.
≈
We show that our technique also works with adversarial perturbations. We remark that we do
not use higher degree sum-of-squares, but only Basic SDP for sparse PCA (with some preprocessing
and postprocessing steps).
)
d
One of the applications of our result is an improvement in the planted sparse vector problem. For
this problem we focus on the regime Ω
< n < d. In this problem, we are given an n-dimensional
(
subspace of Rd that contains a sparse vector, and the goal is to estimate this vector. This problem
was extensively studied in literature in different settings [HD13, BKS14, HSSS16, QZL+20, MW21,
ZSWB22, DK22]. It is not hard to see7 that this problem in the Gaussian basis model (in the sense of
[MW21]) is a special case of sparse PCA with small perturbations. Our result shows that as long as
k 6 √td, there exists a dO
) time algorithm for this problem. Previously known polynomial time
algorithms in the regime n > Ω
required k 6 C√d for some absolute constant C and did not work
(
for k > C√d. Lower bounds against restricted computational models [dKNS20, DKWB21, DH23]
suggest that in the regime n > Ω
this problem is unlikely to be solvable in polynomial time if
(
k
√d.
d
d
)
)
(
t
≫
The Wigner model and symmetric noise. Our results can be naturally applied also to the Wigner
W , where λ > 0, v
model. In this model, we are given Y = λvv⊤ +
Rd is a k-sparse unit vector, and
d. For this model, Covariance thresholding finds an estimator highly correlated with
W
0, 1
)
(
v as long as λ & k
, while Limited brute force from [DKWB19] computes
)
−
v as long as λ & k
t
in time dO
(
) an estimator close to v or
∼
with v or
log
e d
k2
N
p
∈
/
×
(
d
log d
t
. As in the Wishart model, these
√d. Our techniques can be naturally applied to
q
approaches are not compatible in the regime k
the Wigner model, leading to the best known algorithms for this problem.
≈
−
As in the Wishart model, our techniques also work with adversarial perturbations. Moreover,
our approach is compatible with the recent study of Sparse PCA with symmetric noise [dNNS22].
In this model, Gaussian noise W is replaced by an arbitrary noise N with symmetric about zero
independent entries that are only guaranteed to be bounded by 1 with probability8 Ω
. They
1
)
(
proposed a quasi-polynomial algorithm for sparse PCA in these settings and provided evidence
√d this running time cannot be improved (via reduction from the planted
that in the regime k
√d
clique problem). Combining their algorithm with our approach, we show that in the regime k
there exists a polynomial time algorithm that solves this problem.
≪
≈
7See the discussion before Corollary 1.3.
8Note that even the first moment is not required to exist.
3
1.1 Results
Classical settings. Our first result is estimating v in the Wishart model in classical settings
(without perturbations).
Theorem 1.1 (The Wishart model). Let n, d, k, t
v
βuv⊤ +
Rd is a k-sparse unit vector, W
0, 1
)
(
There exists an absolute constant C > 1, such that if n > C k, k > Ct ln2 d and
d independent of u.
N, β > 0. Let Y =
p
N
∼
∈
∈
×
n
W , where u
N
0, 1
)
(
∼
n,
β > C
k
√tn s
ln
2
td
k2
+
1
d
n
+
,
(cid:19) (cid:19)
(cid:18)
then there exists an algorithm that, given Y , k and t, in time n
,
probability 1
as d
o
(cid:18)
1
)
(
−
→ ∞
v, v
|h ˆ
i|
> 0.99 .
dO
t
(
) outputs a unit vector
*
v such that with
ˆ
Let us compare our guarantees with previously known estimators. For simplicity we assume
n > Ω
(
d
, in this regime our algorithm can recover the signal if β & k
√tn
)
work, in these settings all known (subexponential time) algorithms required
ln
2
r
(cid:16)
. Prior to this
td
k2
+
(cid:17)
β & min
√ln d,
k
√tn
(cid:26)
k
√n
ln
2
(
+
d
/
k2
,
)
n
d
/
,
(cid:27)
p
√ln d corresponds to Limited brute force from [DKWB19] that runs in time n
p
where k
√tn
k
2
√n
the top eigenvector of the empirical covariance.
k2
ln
+
d
/
)
(
corresponds to Covariance Thresholding from [DM14], and
p
For k 6 d1
2
−
/
Ω
) (say, k 6 d0.49), the guarantees of the algorithm from [DKWB19] are similar to
1
ours (up to a constant factor). For k > d1
1
2
) our algorithm can work with asymptotically smaller
−
/
signal strength (with the same running time).
o
(
(
To compare with Covariance Thresholding and the top eigenvector of the empirical covariance,
dO
t
(
),
*
n corresponds to
d
/
p
6 k 6 O
√d
. Note in this regime both Covariance Thresholding and
√d
consider the regime Ω
the top eigenvector require
(cid:17)
(cid:16)
(cid:16)
(cid:17)
β > c
d
n
/
k), and they do not work for smaller β. Our
for some specific constant c (that depends on √d
p
condition on β in these settings is
/
β & k
√tn
√ln t ,
/
d
p
so if β = ε
ln t
t and get an estimator that is highly correlated with v or
n for arbitrary constant ε, we can choose large enough constant t such that ε√d &
t
k
).
Neither Covariance Thresholding nor the top eigenvector of the empirical covariance can work
with small values of ε, and Limited brute force from [DKWB19] requires quasi-polynomial time
n
v in polynomial time n
dO
dO
q
−
*
(
log d
(
) in these settings.
*
4
It is also interesting to compare our upper bound with the low degree polynomial lower bound
ln2 n
, polynomials of degree D 6 n
√d
from [dKNS20]. They showed that in the regime k 6 O
cannot distinguish9 Y1 . . . , Yn
N
from Y1 . . . , Yn
(cid:17)
(cid:16)
/
N
0, Id
)
(
if
∼
0, Id
(
βvv⊤)
∼
+
β . k
√Dn *
ln
2
(cid:18)
Dd
k2
+
.
(cid:19)
−
√d
√d
6 k 6 O
v with
and hence for such β they cannot be used to design an estimator that is close to v or
high probability. Their lower bound does not formally imply that our upper bound is tight (that
is, it does not imply that there are no better estimators than ours among low degree polynomials).
However, there is an interesting similarity between their lower bound and our upper bound. In
particular, in the regime Ω
might (implicitly) use polynomials of degree D = t ln t that are computed in time dO
(cid:16)
(cid:17)
). If this
statement can be formalized, it may lead to an algorithm that works in a small sample regime
n
n that we have in the logarithmic factor in the bound on β is necessary for our
techniques. Many other algorithms, like Basic SDP or Covariance Thresholding, also have similar
terms. However, the low-degree lower bound does not have this term and [dKNS20] provided an
algorithm based on low degree polynomials that does not have such a term and works as long as
β & k
even for very small n (e.g. n = d0.01). Finding an estimator with guarantees
√n
)
similar to ours in the small sample regime n
d is an interesting open question, and low degree
polynomials might be useful in designing such an estimator.
, their lower bound suggests that our algorithm
d. The term d
2
(
≪
≪
k2
td
ln
p
+
/
/
(cid:17)
(cid:16)
(
t
Adversarial perturbations. Our approach also works in the presence of adversarial perturba-
tions.
Theorem 1.2 (The Wishart model with adversarial perturbations). Let n, d, k, t
W
Let Y =
independent of u and E
p
n, v
∼
d is a matrix such that
E , where u
Rn
βuv⊤ +
0, 1
)
(
Rd is a k-sparse unit vector, W
N
∈
∈
×
+
∈
N, β > 0, ε
N
∼
0, 1
.
)
d
n
×
∈ (
0, 1
)
(
E
k
k1
→
2 6 ε
*
min
β, β
k ,
n
/
*
where
E
p
2 is the maximal norm of the columns of E and ε < 1.
There exists an absolute constant C > 1, such that if n > C k, k > Ct ln2 d,
k1
→
k
np
o
β > C
k
√tn s
ln
2
+
(cid:18)
td
k2
1
+
(cid:18)
d
n
.
(cid:19) (cid:19)
and ε
time n
p
*
6 1
ε
C min
ln
1
(
/
t
dO
) outputs a unit vector
(cid:8)
(
1, min
n
)
d
β
n
β,
v such that with probability 1
o
p
ˆ
p
/
(cid:9)
*
o
1
)
(
−
as d
,
→ ∞
, then there exists an algorithm that, given Y, k and t, in
v, v
|h ˆ
9More precisely, they cannot strongly distinguish sequences of distributions in the sense of [KWB19].
> 0.99 .
i|
5
β
β,
min
E is interesting problem.
(cid:9)p
/
d
√k
√d
(
, β = Θ
)
, n = Θ
)
. Note that in these settings column norms of
To illustrate how large the adversarial perturbations are allowed to be, consider the following
, t 6 O
. Then the columns of E can have norm
1
1
)
(
)
(
example: Let k = Θ
as large as Ω
this regime, if we allow E to be larger by a constant factor, the adversary can choose E =
βuv⊤
and erase the signal. As was shown in [dKNS20], in these settings Covariance Thresholding,
Diagonal Thresholding and the top eigenvector of the empirical covariance do not work with some
perturbations E such that
βuv⊤ can be O
. Hence, in
√k
p
p
−
E
(cid:17)
(cid:16)
(cid:17)
(cid:16)
(
2 6 ko
1
).
(
Our assumption on E is stronger than the assumption from [dKNS20], which is
2 .
k. Designing an estimator with guarantees similar to ours that works with larger
k1
E
→
n
k
k
k1
→
(
o
)
p
√d
6 k 6 O
(cid:8)
Similar to the non-adversarial settings, our algorithms have the same guarantees10 as the sum-
Ω
1
) and has asymptotically better guarantees
1
). Similarly to Covariance Thresholding in the non-adversarial case, in the regime
n for some specific constant c and
of-squares approach from [dKNS20] if k 6 d1
2
−
/
if k > d1
2
/
−
(
n > Ω
and Ω
d
(
does not work for smaller β. Our condition on β in these settings is β & k
√tn
/
for arbitrary constant ε, we can choose large enough constant t such that ε√d & k
ln t
t and get an
estimator that can be computed in polynomial time n
). Basic SDP cannot work with small
values of ε, and sum-of-squares approach from [dKNS20] requires quasi-polynomial time in these
settings.
Basic SDP requires β > c
√ln t , so if β = ε
√d
dO
q
p
p
n
d
d
/
(cid:16)
(cid:16)
(cid:17)
(cid:17)
*
(
t
The sparse planted vector problem. As was observed in [dKNS20], sparse PCA with perturba-
tions is a generalization not only for the spiked covariance model, but also for the planted sparse
vector problem. In this problem we are given an n-dimensional subspace of Rd spanned by n
1
random vectors and a sparse vector, and the goal is to find the sparse vector. More precisely, let
g1, g2, . . . , gn be standard d-dimensional Gaussian vectors and let B be an n
d matrix whose first
Rd is k-sparse and unit.
n
Let R be a random rotation of Rn independent of g1 . . . , gn, and let Y = RB. The goal is to recover
v from Y .
1 rows are g⊤1 , . . . , g⊤n
1 and the last row is a vector
−
v⊤, where v
gn
×
−
−
∈
k
k
This problem can be seen as a special case of sparse PCA with perturbation matrix E =
1
u
uu⊤W (see Section 4 for the proof). Therefore, we can apply Theorem 1.2 and get
2
k
−
k
Corollary 1.3 (The sparse planted vector problem). Let n, d, k, t
Rd is a k-sparse unit vector, W
n, v
uu⊤W , where u
N
0, 1
)
(
∼
∈
N, β > 0. Let Y =
n
N
βuv⊤ +
−
d independent of u, and
W
×
∈
∼
0, 1
)
(
p
There exists an absolute constant C > 1, such that if d > n, n > C k, k > Ct ln2 d and
k 6 1
C *
n ,
d
/
t
then there exists an algorithm that, given Y , k and t, in time dO
,
probability 1
as d
o
1
)
(
−
→ ∞
p
t
(
) outputs a unit vector
v such that with
ˆ
2
1
u
k
β = k
k
p
u⊤W
2
u
k
k
k
.
10Assuming our bound on the columns of E.
v, v
|h ˆ
i|
> 0.99 .
6
Prior to this work, in the regime n > Ω
(
, polynomial time estimators were known only if
)
√n for some small constant c < 1 (the existence of such an algorithm follows from Theorem
/
√n, sparsity can still be exploited and there
/
k 6 cd
4.5 from [dKNS20]). We show that even if k > 100d
are estimators that can be computed in polynomial time.
d
The Wigner model and symmetric noise. Our techniques also work with sparse PCA in the
Wigner model.
Theorem 1.4 (The Wigner model). Let k, d, t
k-sparse unit vector and W
d and E
0, 1
)
(
There exists an absolute constant C > 1, such that if k > Ct ln d,
N, λ > 0. Let Y = λvv⊤ +
Rd
6 1
∈
∈
d.
N
∼
E
×
×
d
W
C λ
E , where v
+
Rd is a
∈
k , and
/
k
k∞
λ > C k
ln
2
(
td
+
t
/
k2
)
,
r
then there exists an algorithm that, given Y, k and t, in time dO
,
probability 1
as d
o
1
)
(
−
→ ∞
v, v
|h ˆ
i|
> 0.99 .
t
(
) outputs a unit vector
v such that with
ˆ
Note that E is allowed to be as large as possible (up to a constant factor). Similar to the Wishart
model, previously known polynomial time algorithms required
λ & min
log d
t
k
(
r
, k
log
q
2
(
+
k2
d
/
)
, √d
,
)
log d
t
q
corresponds to Limited brute force from [DKWB19], and min
where k
2
log
(
+
/
corresponds to Basic SDP. Similarly to the Wishart model, in the regime k > d1
2
1
o
) we get
−
/
asymptotically better guarantees than the algorithm from [DKWB19]. In the regime n > Ω
and
(
Basic SDP requires λ > c√d for some specific constant c and does not work
Ω
6 k 6 O
√d
√d
p
n
d
n
k
)
)
o
(
k2
, √d
(cid:16)
(cid:17)
(cid:16)
(cid:17)
for smaller λ. Our condition on λ in these settings is λ & k
ln t
t
, so if λ = ε√d for arbitrary constant
q
ε, we can choose large enough constant t such that ε√d & k
computed in polynomial time dO
brute force requires quasi-polynomial time in these settings.
ln t
t and get an estimator that can be
). Basic SDP cannot work with small values of ε, and Limited
q
(
t
Our techniques can be also applied to more general model with symmetric noise studied in
[dNNS22].
N , where v
N, λ > 0. Let Y =
Theorem 1.5 (Sparse PCA with symmetric heavy-tailed noise). Let k, d, t
d is a
λvv⊤ +
0, 1
)
(
random matrix with independent (but not necessarily identically distributed) symmetric about zero entries11
such that for all i, j
Rd is a k-sparse unit vector such that
∈
√k and N
6 100
/
> 0.1 .
6 1
, P
k∞
N
∼
∈
d
v
k
×
d
Nij
There exists an absolute constant C > 1, such that if k > Ct ln d and
(cid:3)
∈ [
]
(cid:2)(cid:12)
(cid:12)
(cid:12)
(cid:12)
11That is, N
ij and
N
−
ij have the same distribution.
λ > C k
*
k2
td
+
√t
/
,
(cid:1)
ln
2
(cid:0)
7
t
(
) outputs a unit vector
v such that with
ˆ
then there exists an algorithm that, given Y , k, t and λ, in time dO
probability 1
as d
o
,
1
)
(
−
→ ∞
v, v
> 0.99 .
i|
k2
it is not a problem since √t grows faster than ln t.
Note that in this theorem we have ln
|h ˆ
2
td
+
/
instead of
ln
2
(
+
td
k2
)
/
. In the regime k
√d
≈
(cid:1)
(cid:0)
(cid:17)
(cid:16)
√d
√d
If Ω
6 k 6 O
p
, this algorithm runs in polynomial time as long as λ > ε√d for
(arbitrary) constant ε. It is the first known polynomial time algorithm for this model, since the
algorithm from [dNNS22] requires quasi-polynomial time. For example, our algorithm finds an
estimator close to v or
100 when the noise has iid
Cauchy entries12 (with location 0 and scale 1), while prior to this work the fastest known algorithm
in this regime required quasi-polynomial time even for standard Gaussian noise.
v in polynomial time if k = √d and λ = k
−
/
(cid:16)
(cid:17)
2 Techniques
The idea of our approach is similar to the well-known technique of reducing the constant in
the planted clique problem. Recall that an instance of the planted clique problem is a random
graph G sampled according to the following distribution: First, a graph is sampled from Erdős-
Rényi distribution
(i.e. each pair of vertices is chosen independently to be an edge with
2), and then a random subset of vertices of size k is chosen (uniformly from the sets of
probability 1
/
size k and independently from the graph) and the clique corresponding to these vertices is added
to the graph. The goal is to find the clique. The problem can be solved in quasi-polynomial time,
however, no polynomial time algorithm is known in the regime k 6 o
m, 1
/
√m
2
)
G(
.
[AKS98] proposed a spectral algorithm that can be used to find the clique in polynomial time
if k & √m. They also introduced a technique that allows to find the clique in polynomial time
if k > ε√m for arbitrary constant ε > 0. The idea is to look at every subset T of vertices of size
induced by the vertices of G that are adjacent to T
t & log
(
t m . ε2m vertices,
(i.e. adjacent to every vertex of T). This subgraph has approximately m′ = 2−
and if T was a part of the clique, then the clique is preserved in H
, and since k & √m′, we can
)
find a clique applying the spectral algorithm to H
t
),
so it is polynomial for constant ε.
. The running time of the algorithm is mO
)
and consider the subgraph H
1
/
T
(
T
(
T
(
ε
)
)
(cid:1)
(cid:0)
(
A similar (but technically more challenging) idea can be also used for sparse PCA. Recall that
the instance of sparse PCA (in the Wishart model) is Y =
Rd
d independent of u. To illustrate the idea, we assume that v
is a k-sparse unit vector, W
0, 1
N
×
)
(
√k. Instead of the adjacency matrix of the graph, we have the
is flat, i.e. its nonzero entries are
1
/
empirical covariance 1
n
Y ⊤Y . For simplicity, let us ignore cross terms and assume that
W , where u
βuv⊤ +
0, 1
)
(
n, v
p
N
∼
±
∼
∈
n
Y ⊤Y
1
n
2
u
k
n
k
≈
βvv⊤
+
W ⊤W .
1
n
N
0, Id
,
)
(
Since u
u
k
recover v. Similar to the planted clique, if β &
(that computes the top eigenvector of the empirical covariance).
n. So we assume that we are given βvv⊤ +
d
/
W ⊤W , and the goal is to
n, there is a spectral algorithm for this problem
∼
≈
1
n
k
2
p
12Cauchy noise is very heavy-tailed, the entries do not even have a finite first moment.
8
/
/
d
n
≈
≈
εk
√d and β = ε
Suppose that n > d, k
√n for some constant ε > 0. We can look at
Y ⊤Y that would be
each subset T of entries of size t < k and try to find a (principal) submatrix of 1
n
an analogue of the graph H
from the algorithm for the planted clique. One option is to say that
Y ⊤Y is large. However,
an entry i is "adjacent" to T if the sum of the elements in the i-th row of 1
n
since v has both positive and negative entries, the sum can be small even if here were no noise and
T
v
supp
(
t be the set of all t-sparse vectors with entries from
Let
s
. Hence we also need to take the signs of the entries of v into account.
)
. Let us call s
}
t is correct, then
t correct if
= sign
∈ S
T
(
vi
p
0,
si
⊂
v
1
)
supp
(
and for all nonzero si, sign
(
)
{
. If s
)
±
∈ S
supp
(
S
) ⊂
)
(
βviv j s j(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
2k
(cid:12)
be a principal submatrix induced by indices adjacent to s. The size of H
(cid:12)
(cid:12)
adjacent to s if either
let us call an entry i
Y ⊤Y s
Õj
supp
∈
viv⊤s
> βt
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
k .
/(
1
n
d
/
(cid:12)
(cid:12)
s
(
)
i
= βt
= β
∈ [
∈ S
s
)
(
For s
and let H
(cid:12)
(cid:12)
where p is the probability that
is greater than βt
adjacent to s. The vector W s has distribution N
, hence
Id
(cid:12)
(cid:0)
)
(cid:12)
i-th row of W ⊤ is independent of W s, and the distribution of
the tail bound for the Gaussian distribution,
W ⊤W s
0, t
(
1
n
(cid:12)
(cid:12)
]
(cid:1)
*
i
(cid:1)
s
∈
or i
s
,
supp
)
(
is close to pd,
)
(cid:12)
(cid:0)
(
(cid:12)
. We need to count i ∉ supp
2k
s
(
)
)
/(
W s
√tn. Since i ∉ supp
s
, the
)
(
k
k ≈
W ⊤W s
1
n
0, t
i is close to N
. By
n
)
/
(
)
(cid:0)
(cid:1)
In our case, x = β√tn
h(cid:12)
(cid:0)
(cid:12)
2k . Hence for
P
W ⊤W s
1
n
i
> x
n
t
/
i
p
6 exp
x2
/
−
2
.
(cid:0)
(cid:1)
ln
td
k2
,
)
/
(
(cid:1)
(cid:12)
(cid:12)
β & k
√tn
.
)
(
p
ln
k2
we get x &
and p = exp
td
/
Moreover, by the same argument, k′ ≈
(cid:0)
the signal part of H
s
(
spectral algorithm to recover the sparse vector from H
2
p
(cid:1)
is close to βvv⊤. Since for correct s we get β &
(cid:1)
p
. k2
t entries.
s
(
k > 0.999k entries of v are adjacent to correct s, so
n, we can try to use the
d′/
. Therefore, H
)
has d′ . k2
x2
−
1
/
−
td
/(
p
/
s
(
)
)
)
(cid:0)
Here we see the difference between planted clique and sparse PCA. In the planted clique
problem, if we take a subset of the clique, we can easily recover the whole clique from the output
of the spectral algorithm and we do not need to consider other sets after that. In sparse PCA, since
we do not know β exactly, it might not be easy to understand if the observed s was correct or not
from the output of the spectral algorithm.
)
(
s
∈ S
We use the following observation: if we have computed the list L =
t, we can compute a vector close to v (or to
of the top eigenvectors
v) from this list. Indeed, if we
entries (in absolute value) of the vectors from L, we get a new list
, but also the corresponding
)
-sparse unit vectors x (in particular,
)
L′ is close to v. Moreover, for all O
-sparse vectors. It turns out that for correct s not only
)
for all s
of H
erase all but the largest O
L′ of O
-sparse vector v′(
k
O
)
for all vectors in L′),
v
{ ̃
) ∈
v
̃
)}
−
k
k
k
s
s
s
(
(
(
)
(
(
(
Hence we can just compute
v
ˆ
∈
x
(cid:0)
x
W ⊤W
1
n
x = 1
± ̃O
(cid:0)
argmaxx
L
′
∈
(cid:1)
x
Y ⊤Y
1
n
n
.
k
/
(cid:17)
(cid:16)p
x, and it is close to v, since
Y ⊤Y
1
n
x
1
(cid:0)
+
β
2
(cid:1)
v, x
i
h
≈
± ̃O
(cid:1)
9
k
/
n
,
(cid:17)
(cid:16)p
k
n
and for β > k
√tn
, the term ̃O
is smaller than β (as long as t
Note that in the definition of adjacent entries we used β, which might be unknown. But that is
2 < β′ 6 β instead of β, the algorithm still works. Hence we
O
1
) such that one of them differs from β by at most
not a problem: if we use some value β
/
can use all possible candidates from n−
factor of 2, and in the end work not with the list L, but with a list of size O
) to nO
1
(cid:16)p
k).
≪
/
(cid:17)
(
(
log n
L
.
|
* |
(cid:1)
(cid:0)
(
(
nd2
d3
nd2
(cid:1)
Remark (Comparison with the Covariance Thresholding analysis from [DM14]). Our algorithm for
. For n > d, the running time is comparable to the running
t = 1 has running time O
) + ̃O
time of Covariance Thresholding O
. The guarantees of both algorithms are the same (up to
(cid:0)
)
a constant factor). One advantage of our algorithm is that it is much easier to analyze. The crucial
difference is that in Covariance Thresholding one has to bound the spectral norm of thresholded
Wishart matrix, which requires a sophisticated probabilistic argument. In our algorithm, we only
need to bound principal submatrices of the Wishart matrix, and such bounds easily follow from
and a union bound argument. Another ad-
concentration of the spectral norm of
−
vantage of our algorithms is that we can get better guarantees than Covariance Thresholding (by
(cid:0)
increasing t and hence also the running time) and use the same analysis for all t.
W ⊤W
Id
1
n
(cid:1)
Remark (Comparison with the algorithms from [DKWB19]). The algorithms from [DKWB19] also
use vectors s
t. However, the crucial difference between our approaches is that they work with
log d, since for smaller β
s′ ∈ S
the maximizer of s
(cid:1)
since the correct s is only determined in the end from the list L′.
Y ⊤Y
1
n
s might be completely unrelated to v. For our analysis it is not a problem,
∈ S
t that maximizes s
Y ⊤Y
(cid:0)
s. This approach works only if β & k
√t
p
1
n
(cid:0)
(cid:1)
β
n
Adversarial Perturbations. Similar approach also works in the presence of adversarial perturba-
tions, that is, if the input is Y =
E such that the columns of E have norm bounded by
b
k. This is interesting, since known algorithms for sparse PCA that use thresholding tech-
niques and are not based on semidefinite programming, like Diagonal Thresholding, Covariance
Thresholding, or the algorithms from [DKWB19], do not work in these settings (see [dKNS20] for
more details).
βuv⊤ +
W
≪
p
p
+
/
As in the non-adversarial case, we can compute the submatrices H
indices adjacent to s, that is, indices i such that either
instead of computing the top eigenvector of H
s
s
(
2k
/(
argmaxX
)
)
that are induced by
or i
supp
. Then,
)
(
s
, where
)i
∈
X , H
∈Pk h
s
(
1
n Y⊤Ys
, we compute ̃X
(cid:12)
(cid:0)
)
(cid:12)
0 , Tr X = 1 ,
(cid:1)
(
X
(
X
> βt
i
s
(cid:12)
) ∈
(cid:12)
k1 6 k
k =
X
Rd
d
×
v
s
̃
)
v from L.
ˆ
P
(cid:23)
is the feasible region of the Basic SDP for sparse PCA. Then, we can compute the list L of top
eigenvectors
, and perform the same procedure as in the non-adversarial case to
)
recover
̃X
of
∈
(cid:9)
(cid:8)
k
(cid:12)
(cid:12)
s
(
(
In order to show the correctness, we need to bound all terms of 1
n Y⊤Ys. In adversarial settings
n E⊤W s. Rows of E⊤ do not have large
cross terms can be large, and the most problematic term is 1
norm, but W s has large norm
√tn, and since E can depend on W , the entries of E⊤W s
can be large. In particular, for each correct s, the adversary can always choose E such that the term
n E⊤W s is large enough to make H
1
useless for recovering v.
To resolve this issue, we work with some probability distribution over the set of correct s and
n E⊤W s has small expectation with respect to this distribution. In particular, it implies
show that 1
W s
k ≈
k
s
(
)
10
that for each E there exists some s′ such that the term 1
the support of v into m = k
s
t. Then it is enough to consider uniform distribution
the concentration of spectral norm of W , with high probability
n E⊤W s′ is small13. For flat v, we just divide
t blocks of size t, and then each block corresponds to some correct
of such s. By
over the set
s1, . . . , sm
∈ S
U
/
{
}
1
n2
E
∼U
s
Ei , W s
h
i
2 = 1
n2m
m
Ei , W s j
2 6 O
Õj=1
s1, . . . , sm
(cid:10)
(cid:11)
such that
}
Hence there exists some s′ ∈ {
b2t
n2m (
m
(cid:18)
n
+
)
(cid:19)
6 O
b2t2
n k
(cid:18)
≪
(cid:19)
β2t2
k2
.
E⊤W s′
1
n
(cid:18)
(cid:19) supp
v
(
)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
2
≪
βvv⊤s′
2
.
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(
)
v
d
U
] \
supp
(
In addition to pd entries i
The other terms of 1
use properties of
n Y⊤Ys can be bounded only assuming that s′ is correct (so it is not needed to
s′)
anymore), hence the signal part of H
∈ [
there could be some entries adjacent to s′ that appear from 1
n (
number of such entries is at most ε2 log
1
/
(
our bound14 on the maximal norm of columns of E, we get ε2 log
1
(
/
is close to v.
s′)
properties of Basic SDP for sparse PCA, the top eigenvector of ̃X
is close to βvv⊤.
adjacent to s′ that appear due to the term 1
n
E⊤Y
W ⊤W s,
s′. We show that the
d, where ε is the same as in Theorem 1.2. Assuming
d . βn, and by standard
ε
To finish the argument, we need to show that we can still compute
v from
L even in the presence of perturbations. It is not hard since our argument depends only on the
-sparse x. As was shown in [dKNS20], our
upper bound on x
)
assumption on the maximal norm of columns of E is enough to obtain the desired upper bound.
v close to v or
ˆ
x for all O
1
n Y⊤Y
βvv⊤
Y⊤E
Id
+
−
−
−
ε
k
(
(
)
)
)
(cid:0)
(cid:1)
W .
The Wigner model and symmetric noise.
The same argument as for the Wishart model works in these settings, and the proof is technically
W ⊤W that appears in the
simpler since there are no cross terms and W is easier to analyze than 1
n
Wishart model. Our approach for sparse PCA with perturbations also works for Wigner model,
and the proof is much easier in this case since the adversary cannot exploit magnitude of the
columns of W .
In the Wigner model the input is n Y = λvv⊤ +
∈
be x if x
The Wigner model with symmetric noise is more challenging. In these settings we assume that
λ is known. We cannot work with Y s, since the noise is unbounded. So we first threshold the
entries of Y . Concretely, for h > 0 and x
R, let τh
h otherwise.
x
(
to the entries of Y and get a new matrix T . Then
We apply this transformation for some h = Θ
k
λ
/
)
(
we use our approach for matrix T and for all s
. Since N is
t we compute the submatrices H
)
∈ S
symmetric, thresholded matrix has nice behavior comparable to the Gaussian settings. However,
k, the standard deviation of the noise part also depends on it (which is
since h depends on λ
instead of
not the case in Gaussian settings), and this is the reason why we need ln
in the bound on λ. We have to choose such h in order to apply the result from
[dNNS22]. As long as k & d, their algorithm applied to Y outputs a matrix that is close to λvv⊤
p
in polynomial time. As in the Gaussian case, the submatrices H
have small size, and we can
and sign
(
∈ [−
h, h
k2
k2
td
td
ln
) *
+
+
x
2
2
/
/
/
s
s
]
)
(
)
(
(cid:1)
(cid:0)
(
)
13More precisely, this term has small norm, and it is enough for our analysis.
14This is the reason why our bound on E is worse than the bound from [dKNS20].
11
)
(
s
. However, since H
apply their result to every H
might
not have the same distribution as N . Fortunately, the error probability in [dNNS22] is very small,
which allows us to use union bound and conclude that for correct s, the output of the algorithm
from [dNNS22] on H
is close to λvv⊤ . Moreover, since we know λ, we do not even need to work
with the list of candidates in these settings: It is enough to check the norm of the output, and if it
is close to λ, the output is close to λvv⊤, and we can recover v from it (up to sign).
depends on Y , the noise part of H
s
s
s
(
)
)
(
)
(
3 The Wishart Model
×
0, 1
)
(
N, we use the notation Rm1
Notation. For m1, m2 ∈
from R. We denote by N
0, 1
entries. Similarly, we denote by N
×
(
)
N, we denote by
entries. For m
m
the set
]
[
1,
v
we denote by
by
∞]
M
denote by
d matrix Y =
Recall that the input is an n
its spectral norm, and by
its l2 norm, and for p
m2 for the set of m1 ×
m2 matrices with entries
m an m-dimensional random vector with iid standard Gaussian
m2 random matrix with iid standard Gaussian
Rm, we denote
m2, we
m2 an m1 ×
{
p its lp norm. For a matrix M
. For a vector v
k
k
kF its Frobenius norm.
W , where u
βuv⊤ +
∼
d independent of u. The goal is to compute a unit vector
unit vector, W
1, 2, . . . , m
0, 1
)
(
1, m
n, v
Rm1
∈ [
M
N
N
m1
×
−
∈
∈
∈
∈
v
}
k
k
k
k
k
×
Rd is a k-sparse
v such that
ˆ
> 0.99 with high probability (with respect to the randomness of u and W ).
n
×
0, 1
)
(
∼
p
First we define vectors zs
that we will use in the algorithm. Let t
S
and let
nonzero coordinates. For s
as
t be the set of all d-dimensional vectors whose entries are in
t and r > 0 let zs
r
(
)
N be such that 1 6 t 6 k
∈
that have exactly t
1, 0, 1
{−
be the d-dimensional (random) vector defined
}
r
(
)
∈ S
v, v
|h ˆ
i|
zsi
r
(
)
=
Y
1
[(
1
(
Y s
⊤
)i >r
*
t
*
n
]
if si = 0
otherwise
The following theorem is a restatement of Theorem 1.1.
Theorem 3.1. Let n, d, k, t
is a k-sparse unit vector, W
Suppose that n & k
N, β > 0, 0 < δ < 0.1. Let Y =
N
0, 1
×
)
(
, k & t ln d
δ2 and
d independent of u.
n
∈
∼
t ln2 d
δ4
+
βuv⊤ +
W , where u
N
0, 1
)
(
∼
n, v
∈
Rd
p
β &
k
δ2√tn s
ln
2
td
k2 *
+
d
n
1
+
(cid:19) (cid:19)
Then there exists an algorithm that, given Y , k, t and δ, in time n
(cid:18)
(cid:18)
that with probability 1
o
1
)
(
−
as d
,
→ ∞
Lemma 3.2. For all s
t such that si = 0 and for all τ > 0,
∈ S
v, v
|h ˆ
i|
> 1
δ .
−
.
*
dO
t
(
) outputs a unit vector
v such
ˆ
P
W ⊤Y s
h(cid:0)
> τ
*
k
(cid:16)
i
(cid:1)
W s
k + |h
v, s
i| *
β
u
k
* k
p
12
u
k
,
k
k
W s
6 exp
τ2
/
−
2
.
(cid:0)
(cid:1)
k
i
(cid:17) (cid:12)
(cid:12)
(cid:12)
Proof. Denote g = W s
N
∼
.
0, t
(
Id
*
)
W ⊤Y s
=
i
Wi , g
v, s
β
* h
+
Since Wi, g and u are independent, conditional distribution of
N
v, s
0,
u
g
β
2
(cid:1)
(cid:10)
(cid:11)
p
(cid:0)
Wi , u
.
i * h
i
W ⊤Y s
(
. The lemma follows from the triangle inequality and the tail bound for
(cid:3)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
)i given
u
k
k
and
g
is
100k and suppose that n & t
ln2 d, β & k
δ2√tn
and k & ln d
δ2 .
+
* |h
Gaussian distribution (Fact C.4).
i| *
+
(cid:16)
(cid:13)
(cid:13)
p
(cid:17)
(cid:13)
(cid:13)
Lemma 3.3. Let 0 < δ < 0.1, r 6 βδ
. Then,15
s, v
argmaxs
Let s∗ ∈
t h
∈S
i
v
k
◦
zs∗(
r
)k
2 =
v
h
◦
zs∗(
r
)
, v
i
> 1
δ ,
−
with probability 1
d−
10.
−
Proof. To simplify the notation we write zsi instead of zsi
2 6 2n and tn
n
probability at least 1
(−
assume that these bounds on
k
are satisfied.
2 6
g
exp
−
u
k
, n
10
)
/
/
u
and
k
k
k
k
. Let g = W s∗. By Fact C.5 with
r
(
)
2 6 2tn, and in this proof we
2 6
/
g
Let T = supp
(
s∗)
unit, there are two possibilities: either
statement is true since
Hence
. Note that it is the set of t largest entries of v (by absolute value). Since v is
vT
vT
δ, then the
−
> √δ
√k.
δ, then for every j
/
2 > 1
vT
2 > 1
T,
vT
k
2. If
zs∗ k
k
∈
δ. If
k
vT
2 >
k
−
−
v j
◦
v
k
k
k
k
k
k
|
|
(cid:13)
(cid:13)
(cid:13)
(cid:13)
2 6 1
δ, or
−
2 6 1
k
k1 > √δ
u
, β
*
∈ L
k
k
s∗, v
=
vT
h
k
i
. For all i
t
2
√k .
/
v, s∗i|
h
vi
|
> 10rtn. Note that
2 >
v
k
L k
Let
=
i
L
10.
n
∈ [
]
vi
|
|
> √δ
10√k
1
−
δ
/
Let us write Y ⊤Y s∗ as follows
(cid:12)
(cid:12)
(cid:12)
n
o
Y ⊤Y s∗ = β
u
2
k
h
k
v, s∗
v
i
+
W ⊤W s∗
We will bound each term separately
βvu⊤W s∗
v, s∗
β
h
i
+
W ⊤u .
p
+
p
Consider the term W ⊤W s∗ = W ⊤g. By the Chi-squared tail bound (Fact C.5), with probability
at least 1
exp
τ
,
2
)
/
(−
−
W ⊤g
Since
|L |
L\
6 k, with probability at least 1
(cid:1)
(cid:0)
(cid:13)
(cid:13)
(cid:13)
* (|L | +
.
τ
)
6 2
tn
supp
s∗)
(
exp
k
p
,
)
(cid:13)
(cid:13)
(cid:13)
(−
−
6 10√ktn 6 δ
100
β
k
u
2
k
h
v, s∗
i *
v
,
(cid:13)
(cid:13)
(cid:13)
(cid:13)
W ⊤g
supp
L\
s∗)
(
(cid:1)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:0)
(cid:13)
where we used β & k
(cid:13)
δ2√nt
β
Consider the term
,
10
exp
p
)
at least 1
(−
−
/
k
.
W ⊤u. Since W and u are independent, by Fact C.5 with probability
v, s∗i
h
β
v, s∗
W ⊤u
6 2
β
u
√k
v, s∗
k
k
* h
h
i
6 δ
100
i
(cid:13)
(cid:13)
15Here and further we denote by a
(cid:13)
(cid:16)p
◦
(cid:17) L(cid:13)
(cid:13)
b the entrywise product of vectors a, b
(cid:13)
p
β
k
u
2
k
h
v, s∗
i *
v
,
(cid:13)
(cid:13)
∈
Rd.
(cid:13)
(cid:13)
13
where we used βn & k√n
δ2√t
and the fact that n > t.
Consider the term
βvu⊤W s∗. With probability at least 1
exp
(−
−
0.1√nt
,
)
p
βvu⊤W s∗
6 2
β
√t
*
u
* k
k * (
nt
4 6 δ
100
1
/
)
(cid:13)
(cid:13)
where we used the fact that the distribution of u⊤W s∗ given
(cid:13)
p
p
(cid:13)
(cid:13)
(cid:13)
By Lemma A.2,
β
k
u
2
k
h
v, s∗
i *
v
,
(cid:13)
u
(cid:13)
k
k
is N
0, t
(
* k
u
(cid:13)
2
(cid:13)
k
.
)
v
k
L ◦
zs∗ k
2 >
1
(
−
δ
/
10
)k
v
L k
2 > 1
δ .
−
(cid:3)
Lemma 3.4. Let r > 0 and s
t. With probability at least 1
∈ S
is bounded by pd
2
pd ln
δ
1
/
(
)
+
(cid:12)
, where p = exp
(cid:12)
(cid:0)
(cid:12)
(cid:1)
tnr2
(cid:12)
−
W TYs
> t
i
r
*
2
/
*
.
δ, number of entries i such that
−
n
Proof. By Lemma 3.2 and Chernoff bound Fact C.1, number of such entries is at most pd
(cid:0)
(cid:1)
p
probability at least 1
exp
τ2d
2p
. With τ = 2
−
(cid:16)
t, let N
−
s
)
(
ln
δ
1
/
(
)
p
/
d we get the desired bound.
(cid:17)
=
Y ⊤Y
(cid:16)
p
Id
−
n
*
−
u
β
k
k
2v⊤v
(cid:17)
zs
r
z⊤s (
)
r
(
))
◦(
and let p = exp
Lemma 3.5. For s
∈ S
Suppose that k > ln d.
Then for each s
∈ S
t, with probability 1
2d−
10,
−
+
τd with
(cid:3)
tnr2
2
.
/
(cid:1)
−
(cid:0)
N
k
s
(
)k
6 10
s
n
βn
+
*
pd
k
ln
+
+
(cid:0)
Proof. To simplify the notation we write zsi instead of zsi
d
is at most 2pd
we get the desired bound.
2k 6 4pd
pd ln
) +
+
+
2
(
(cid:0)
(cid:1)
(cid:1)
e d
pd
(cid:18)
k
+
(cid:19)
r
(
10
pd
k
ln
+
e d
pd
(cid:18)
k
(cid:19)
(cid:0)
(cid:1)
+
. By Lemma 3.4, number of nonzero zsi
)
10. Applying Lemma C.8,
(cid:3)
d−
−
4k with probability at least 1
p
Lemma 3.6. Let 0 < δ < 0.1 and δβ
200k
k > t ln d and
6 r 6 δβ
100k . Let p = exp
(−
tnr2
. Suppose that n > t ln2 d,
2
)
/
β &
k
δ2√tn s
ln
2
+
(cid:18)
td
k2 *
1
+
(cid:18)
d
n
.
(cid:19) (cid:19)
Then
βn
n
+
*
pd
+
k
ln
s
(cid:1)
Proof. First note that since
(cid:0)
(cid:0)
(cid:1)
e d
pd
+
k
(cid:19)
+
(cid:18)
pd
+
k
ln
(cid:0)
(cid:1)
e d
pd
k
(cid:19)
+
(cid:18)
6 δβn
10 .
/
we get
td
k2 +
td2
k2n
+
(cid:19)
ln
2
(cid:18)
> 0.5
ln
2
*
+
td
k2 + r
td2
k2n !
,
β &
k
δ2√tn s
ln
2
+
(cid:18)
td
k2 *
1
+
(cid:18)
k
√nt (cid:19) (cid:19)
.
14
Since
βn
n
+
*
pd
+
k
ln
s
(cid:0)
(cid:1)
(cid:0)
(cid:1)
e d
pd
k
(cid:19)
+
(cid:18)
6
s
βn
n
+
*
pd ln
(cid:0)
(cid:1)
e
p
(cid:18)
+ s
(cid:19)
βn
n
+
*
k ln
(cid:0)
(cid:1)
e d
pd
k
(cid:19)
+
(cid:18)
,
we can bound the term with pd and the term with k separately. Let us bound the first term. Note
that
exp
(−
tnr2
4
)
/
6 exp
1
δ2 ln
2
+
(cid:18)
td
k2 *
1
+
(cid:18)
k
√nt (cid:19) (cid:19)(cid:21)
−
(cid:20)
6
δ2k
kd
td
+
n
t
/
p
q
. min
β,
{
δ2
β
} *
d .
n
/
p
p
Hence
(cid:16)
√n
+
βn
*
(cid:17)
p
ln
(
k
ed
k
)
/
Since t 6
exp
tnr2
2
−
(cid:18)
(cid:18)
(cid:19)
and n > k ln
ed
k
tnr2√dn
6
√n
(cid:19)
(cid:16)
βn
exp
−
(cid:18)
*
(cid:18)
(cid:17)
+
p
tnr2
4
√dn
6 0.01δ2βn .
(cid:19)
(cid:19)
, the second term can be bounded as follows
βn
n
+
*
k ln
s
(cid:0)
Now, let us bound
(cid:1)
(cid:1)
(cid:0)
e d
pd
k
(cid:19)
+
(cid:18)
n k ln
6
s
e d
k
(cid:18)
+ s
(cid:19)
βn k ln
e d
pd
k
(cid:19)
+
(cid:18)
6 0.01δβn .
+
The first term can be bounded as follows:
(cid:1)
(cid:0)
pd
k
ln
+
e d
pd
(cid:18)
6 pd ln
p
e
(
/
) +
k ln
e d
.
k
)
/
(
k
(cid:19)
For the second term,
pd ln
p
e
(
/
)
6 d
k2
kd
*
td
+
6 k
n
/
p
n
t
/
p
t 6 0.01δβn .
k ln
e d
k
)
/
(
6 k
n
/
t 6 0.01δβn .
p
(cid:3)
Lemma 3.7. Let 0 < δ < 0.1 and δβ
200k
Y ⊤Y
.
r
(
z⊤s (
)
Suppose that n & t ln2 d
δ4
, k & t ln d
δ2 and
) ◦ (
zs
))
r
(
6 r 6 δβ
100k . For s
t let
∈ S
s
v
ˆ
(
)
be the top16 eigenvector of
β &
k
δ2√tn s
ln
2
+
(cid:18)
td
k2 *
1
+
(cid:18)
d
n
.
(cid:19) (cid:19)
Then there exists s′ ∈ S
t such that with probability 1
10d−
10,
−
> 1
−
16A unit eigenvector that corresponds to the largest eigenvalue
v
|h ˆ
, v
s′
i|
)
(
20δ .
15
Proof. Let s′ ∈
argmaxs
t h
∈S
s, v
and let
i
Y ⊤Y
(cid:0)
◦
(cid:1)
(cid:0)
. Then
)
v = v
̃
zs′(
◦
z⊤s′(
r
r
)
r
zs′(
= β
u
2
v
̃
v⊤
̃
k
k
+
N
,
s′
)
(
)
(cid:1)
where N
s′)
(
is the same as in Lemma 3.5. By Lemma 3.6 and Lemma 3.5, with probability 1
2d−
10,
−
N
k
s′
(
)k
6 δβn .
Since with probability at least 1
v
|h ˆ
PCA. Concretely, by Lemma B.4,
> 1
n
exp
(−
−
v
>
,
s′)
i|
̃
(
δ. Using Fact B.5 we get the desired bound.
u
2δ. By Lemma 3.3, with probability 1
2, we can use standard (non-sparse)
10,
(cid:3)
,
10
)
/
2
v
k ̃
k
10d−
k
−
2 =
−
/
k
2 > n
v, v
h ̃
k
−
v
k ̃
i
2 6
Proof of Theorem 3.1. Since
k
proof we assume that this bound on
k
p
n
/
u
k
u
k
6 √2n with probability at least 1
holds.
−
exp
(−
n
, in this
10
)
/
Let ̃δ = δ
6 r 6 ̃δβ
100. Note that we can apply Lemma 3.7 if
we can create a list of candidates for r of size at most 2 ln n (from r = 1
/
t and for all candidates for r we compute
For all s
̃δβ
200k
/
s
100k . Since we do not know β,
n to r = 1).
such that with probability 1
v
ˆ
(
)
as in Lemma 3.7. By Lemma 3.7, we
9 there
d−
10 > 1
20 ln
d−
n
−
(
)
−
∈ S
get a list of vectors L of size 2 ln
L such that
exists v∗ ∈
v∗, v
n
(
> 1
t
) * |S
−
|
20 ̃δ > 1
i|
By Fact C.7 and Lemma C.9, k′-sparse norm of Y ⊤Y
|h
−
/
δ
5.
nId
β
k
−
u
k
−
2vv⊤ is bounded by
10
(
/
10
e d
n k′ ln
k′) +
βn k′ ln
k′)
p
9. Let us show that if k′ . δ2β2n
)
1
+
(
e d
q
/
(
β
ln d
2d−
10. Indeed, if β > 1, then
−
with probability at least 1
bounded by δβn
/
, then this k′-sparse norm is
and if β < 1,
1
(cid:0)
δ2β2n
β
+
ln d
>
δ2βn
2 ln d
& k
n
t ln2 d
& k
δ2 ,
/
r
&
k2
δ2t ln d
& k
δ2 .
/
(cid:1)
δ2β2n
β
+
1
ln d
100k
⌈
>
δ2β2n
2 ln2 d
δ2
/
⌉
v, v
|h ˆ
> 1
δ .
−
i|
Applying Lemma A.4 with k′ =
(cid:1)
(cid:0)
, we can compute a unit vector
v such that
ˆ
(cid:3)
4 Adversarial Perturbations
The sparse planted vector problem. Let us show that the sparse planted vector problem is a
uu⊤W . Let Y = RB. It follows that
special case of sparse PCA with perturbation matrix E =
2
1
u
k
k
−
Y =
Rnv⊤
gn
k
k
+
Rig⊤i
.
n
1
−
Õi=1
16
Id
Note that
(
pendent of R. Hence for Gaussian vector u such that
Rig⊤i has the same distribution as
n
1
−
i=1
Í
W , where W
RnR⊤n )
u = Rn, we get
−
1
u
k
N
0, 1
)
(
∼
n
×
d is inde-
k
gn
u
Y = k
k
uv⊤
W
+
−
uu⊤W .
1
u
k
2
k
k
k
gn
u
2
2 =
k
k
1
(
+
d
o
1
))
(
/
n. Note that columns of
−
1
u
k
k
uu⊤W have norm at
2
log d with high probability. In these settings, ε from Theorem 1.1 is allowed to be as large
k. Hence for d & k log d, E is allowed to have columns
E
d
With high probability β := k
k
most 10
as Ω
, and we get a bound
1
p
)
(
of norm 10
log d.
2 .
k
k1
→
/
p
p
The Wishart model with perturbations. The following theorem is a restatement of Theorem 1.2.
Theorem 4.1. Let n, d, k, t
N, β > 0, 0 < δ < 0.1. Let
∈
where u
0, 1
)
(
∼
a matrix such that
N
n, v
∈
̃Y =
βuv⊤
W
E ,
+
+
Rd is a k-sparse unit vector, W
p
N
0, 1
)
(
∼
n
×
d independent of u and E
Rn
d is
×
∈
where
E
E
2 = b 6 ε
min
k
k1
p
2 is the maximal norm of the columns of E and ε
, k & t ln d
→
{
*
k
k1
→
Suppose that n & k
δ2 and
t ln2 d
δ4
+
β, β
k ,
n
/
} *
ln
p
1
/
(
ε
)
p
. δ6 min
1, min
β,
β
n
(cid:8)
p
(cid:9)
p
*
n
/
d
.
o
β &
k
δ6√tn s
ln
2
+
(cid:18)
td
k2
1
+
(cid:18)
d
n
.
(cid:19) (cid:19)
Then there exists an algorithm that, given Y , k and t, in time n
,
with probability 1
as d
o
1
)
(
−
→ ∞
v, v
|h ˆ
i|
> 1
δ .
−
dO
t
(
) outputs a unit vector
*
v such that
ˆ
Lemma 4.2. Let
l = min
2
1/
Then with probability 1
L ⊂ [
δ2
, k
⌉
⌈k
v
k
(cid:8)
d
. Suppose that β & k
]
δ6√nt
(cid:9)
d−
10 there exists s′ ∈ S
−
and n & k
t ln2 d, k & ln d.
+
t such that either
be the set of indices of the largest (in absolute value) l entries of v, where
(cid:13)
(cid:13)
(cid:13)
(cid:13)
or
Moreover,
6 10δ
u
β
k
k
*
2vv⊤s′
,
(cid:13)
(cid:13)
δ.
(cid:13)
(cid:13)
(
s′)(cid:13)
(cid:13)
(cid:13)
(cid:13)
> 1
−
ε
δ2 *
*
√d
βnt
*
√k
v
k1
* k
.
β
k
−
u
k
̃Y⊤ ̃Y
(cid:16)(cid:16)
2vv⊤
s′
(cid:17)
supp
(cid:17) L\
vsupp
s′)
(
(cid:13)
(cid:13)
Y ⊤E
s′
(cid:13)
(cid:13)
6 104
(cid:1)
(cid:13)
(cid:13)
E⊤Y
+
(cid:0)
(cid:13)
(cid:13)
17
Proof. First note that
and
v
L k1 >
k
v
k
k1 −
δ >
1
(
−
δ
v
k1 .
)k
v
>
v
v
]\L k1 >
d
[
v
k
k −
δ >
1
(
−
δ
.
v
k
)k
Also note that for all i
k
> δ
v
1
k
k
We will define a distribution over s
L k
vi
∈ L
k
k − k
.
,
|
|
n
t, and then we show via probabilistic method that s′ with
desired properties exists by bounding terms of ̃Y⊤ ̃Ys one by one. Also, with probability at least
1
2.
−
/
disjoint blocks b1, . . . , bm of size17 t. Each block b j
for i
2 and in the proof we will always assume that 2√n >
/
into m =
L
j
t such that s
v
, 2√n >
exp
2
)
(
Consider the partition of
⌉
i = 0 for i ∉ b j and s
> 1
corresponds to s
i = sign
(
supp
(
p
.
)
> √n
⌈|L |/
) ∈ S
∈ S
vi
b j
>
>
∩
∈
n
u
u
v
/
k
k
k
k
)
(
)
t
j
If
If
|L |
|L |
s
vsupp
j
(
6 t, then
δ.
1
))
> t, consider the uniform distribution
(cid:13)
(cid:13)
= 1
m
)
(
L k
v, s
(cid:13)
(cid:13)
E
−
= 1
v
k
m
s
j
1
s
(
(
◦
i
h
(
∼U
over s
j
. We get
)
(
U
v
k1 > t
2
L
v
k
k1 > δ2t
k1
2
v
k
> δ2t
2√k
.
m k
Moreover,
E
∼U
s
v
k1 6 t
L
v
k
k1 6 t
k1
v
k
.
m k
Õj=1
)
(cid:13)
(cid:13)
= 1
(cid:13)
(cid:13)
h
v, s
i
Let us write ̃Y⊤ ̃Y as follows:
̃Y⊤ ̃Y = β
u
k
k
2vv⊤
+
W ⊤W
+
βvu⊤W
We will bound each term separately.
p
+
p
Consider the term EW ⊤.
βW ⊤uv⊤
E⊤E
+
+
βvu⊤E
p
+
p
βE⊤uv⊤
W ⊤E
+
+
E⊤W .
Ei , W s
|h
i|
2 =
1
m
E
∼U
s
m
Õj=1
Ei , W s
j
)
(
2
(cid:11)(cid:12)
(cid:12)
(cid:10)
(cid:12)
(cid:12)
have disjoint supports, W s
Since for different j1 and j2, s
j
and s
By the concentration of spectral norm of Gaussian matrices (Fact C.6),
j2)
j1)
(
(
(
) ∼
N
0, t
(
)
n are independent.
with probability at least 1
−
(−
m
Õj=1
(cid:10)
exp
Ei , W s
j
)
(
2 6 4t
m
(
+
n
Ei
k
) * k
2 6 10tnb2
(cid:11)
. Hence
)
n
E
∼U
s
Ei , W s
|h
i|
2 6 10tb2n
m
.
Therefore, with probability at least 1
d exp
(−
n
,
)
−
Ei , W s
|h
i|
2 6
|L |
10tb2n
m
s
E
∼U Õi
∈L
17If the last block has smaller size, we can add arbitrary entries to it.
18
and
s
Ei , W s
2 6 d
i|
|h
10tb2n
m
Hence with probability at least 1
there exists s′ = s
n
2
)
/
such that
j
)
(
(−
E
∼U Õi
d
]
∈[
d exp
−
10t
v
k1
k
>
v, s
j
)
(
(cid:10)
(cid:11)
> δ2t
v
10
k1
k
> δ2t
10√k
,
and
Ei , W s
2 6
j
(
)
(cid:10)
Õi
(cid:11)(cid:12)
∈L(cid:12)
(cid:12)
(cid:12)
where we used
|L |
40tb2n
m
|L |
6 40t2ε2β2n2
k 6
/
6 mt, and
Ei , W s′
|h
2 6
i|
100ε
δ2
(cid:18)
(cid:19)
d
Õi
]
∈[
(cid:18)
2
100ε
δ2
2
(cid:19)
(cid:13)
(cid:13)
u
β
k
k
2vv⊤s
j
(
)
(cid:13)
(cid:13)
2 6 δ2
u
β
k
k
2vv⊤s
j
(
(cid:13)
(cid:13)
2
,
)
(cid:13)
(cid:13)
d
k *
*
u
β
k
k
2vv⊤s
(
j
(cid:13)
(cid:13)
2
.
)
(cid:13)
(cid:13)
exp
−
n
,
2
)
/
(−
Consider the term W ⊤E. By Fact C.6, with probability at least 1
W TEs
j
6 tb
W ⊤
(
)
(cid:13)
(cid:13)
Consider the term
(cid:13)
(cid:13)
(cid:13)
(cid:13)
6 10tb√n 6 10tεβn
√k 6 400ε
δ2
/
β
k
u
2
k
h
v, s
j
(
)i *
v
6 δ
β
2vv⊤s
u
k
k
βE⊤uv⊤:
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
j
(
.
)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
p
βE⊤uv⊤s
j
)
(
(cid:16)p
supp
(cid:17) L\
(
Consider the term
6 √k
s′)(cid:13)
(cid:13)
(cid:13)
βvu⊤E:
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
βE⊤uv⊤s
j
(
∞
)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
p
(cid:13)
(cid:13)
6
u
kβ
b
*
* k
v, s
j
(
)i
k*h
6 10ε
β
u
2
k
h
k
v, s
j
(
)i *
v
.
p
(cid:13)
(cid:13)
(cid:13)
(cid:13)
βvu⊤Es
p
j
6
)
(cid:13)
(cid:13)
(cid:13)
Consider the term E⊤E:
(cid:13)
(cid:13)
(cid:13)
p
(
βtb
u
k
k
6 ε
δ2 *
δ2t
√k *
β√n
u
k
k
6 10ε
δ2
p
β
k
u
2
k
h
v, s
j
(
)i *
v
.
(cid:13)
(cid:13)
(cid:13)
(cid:13)
E⊤Es
j
)
(
supp
L\
s′)
(
6 √k
E⊤Es
j
(
*
6 √k
*
∞
b2t 6 √k
ε2
δ2 *
δ2t
k
*
βn 6 10ε
β
u
2
k
h
k
v, s
j
(
)i *
v
.
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:0)
Moreover, note that from the bounds above we also get
(cid:13)
(cid:1)
(cid:13)
(cid:13)
(cid:13)
)
(cid:13)
(cid:13)
E⊤Y
Y ⊤E
+
s
j
(
)
(cid:13)
(cid:13)
(cid:1)
(cid:0)
(cid:13)
(cid:13)
6 1000
ε
δ2 * r
d
k *
*
u
β
k
k
2vv⊤s
j
(
(cid:13)
(cid:13)
)
(cid:13)
(cid:13)
Consider the term W ⊤W . By the Chi-squared tail bound (Fact C.5), with probability at least
exp
τ
(cid:13)
(cid:13)
(cid:13)
(cid:13)
6 104 ε
δ2 *
√d
βnt
*
√k
v
k1
* k
.
1
−
,
2
)
/
(−
Since
|L |
W ⊤W s
j
)
6 k, with probability at least 1
(cid:1)
(
(cid:0)
(cid:13)
(cid:13)
(cid:13)
W ⊤W s
(cid:0)
(cid:13)
(cid:13)
(cid:13)
supp
L\
s
j
(
(
))
j
)
(
(cid:1)
6 2
tn
L\
−
s
j
(
supp
(
exp
))
k
p
(−
(cid:13)
,
(cid:13)
)
(cid:13)
6 10√ktn 6 δ
(cid:13)
(cid:13)
(cid:13)
19
(cid:13)
(cid:13)
* (|L | +
.
τ
)
β
k
u
2
k
h
v, s
j
(
)i *
v
,
(cid:13)
(cid:13)
where we used β & k
δ3√nt
Consider the term
.
βW ⊤uv⊤. Since W and u are independent, with probability at least 1
exp
(−
k
,
2
)
/
p
βW ⊤uv⊤s
j
)
(
6 2
u
β
k
k
√k
v, s
j
(
)i
* h
6 δ
β
u
2
k
h
k
v, s
j
(
)i *
v
,
where we used βn & k√n
δ2√t
(cid:16)p
(cid:13)
(cid:13)
(cid:13)
(cid:17) L(cid:13)
(cid:13)
(cid:13)
p
and the fact that n > t.
Consider the term
βW ⊤uv⊤. With probability at least 1
(cid:13)
(cid:13)
(cid:13)
(cid:13)
exp
(−
−
0.1√nt
,
)
p
βvu⊤W s
j
(
6 2
√t
β
*
* k
u
nt
4 6 δ
1
/
)
β
k
u
2
k
h
v, s
j
(
)i *
k * (
v
,
where we used the fact that the distribution of u⊤W s
(cid:13)
p
(cid:13)
(cid:13)
)
(cid:13)
(cid:13)
(cid:13)
p
(cid:13)
(cid:13)
given
j
)
(
u
k
is
N
0, t
(
∼
k
(cid:13)
(cid:13)
* k
u
2
.
)
k
For s
t let zs
∈ S
r
(
)
be the n-dimensional (random) vector defined as
=
zsi
r
(
)
1
[( ̃Y⊤ ̃Ys
1
)i
(
>r
n
t
*
*
]
if si = 0
otherwise
Lemma 4.3. Suppose that k & t ln d and
−
(cid:3)
β &
k
δ2√tn s
ln
2
+
(cid:18)
td
k2 *
1
+
(cid:18)
βδ
1000
v
2
1
k
k
6 r 6
βδ
500
v
2
1
k
k
.
(cid:19) (cid:19)
d
n
.
Let r be such that
Let s
t and
∈ S
Let
=
N
s
(
)
̃Y⊤ ̃Y
(cid:16)
−
nId
β
k
−
u
k
2vv⊤
zs
r
r
z⊤s (
)
)
(
◦
(cid:17)
(cid:0)
0 , Tr X = 1 ,
.
.
X
k
k1 6 k
(cid:1)
(cid:9)
Then with probability 1
10
(cid:8)
*
−
d−
k =
X
P
Rd
d
×
∈
10, for all X
X
(cid:23)
(cid:12)
(cid:12)
k,
∈ P
Proof. To simplify the notation we write z instead of zs
r
(
)
and N instead of N
s
. Let
)
(
X , N
|h
i|
6 δβn .
Note that
By Lemma B.6,
NE =
̃Y⊤ ̃Y
(cid:18)
−
̃Y
(cid:16)
−
⊤
E
(cid:17)
E
−
̃Y
(cid:16)
◦
(cid:17)(cid:19)
(cid:0)
zz⊤
.
(cid:1)
X , N
|h
6
i|
N
k
−
NE
k + |h
X , NE
.
i|
X , NE
|h
i|
6 b2k
2b
k
s
+
̃Y
(cid:16)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
20
−
⊤
E
(cid:17)
E
−
̃Y
(cid:16)
◦ (
(cid:17)
.
zz⊤)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
The first term can be bounded as follows:
b2k 6 εβ2n
k 6 δβ√n
/
/
100 6 δβn
100 .
/
Note that with probability at least 1
exp
(−
n
,
)
−
Hence for the second term,
̃Y
(cid:16)
−
⊤
E
(cid:17)
E
−
̃Y
(cid:16)
◦
(cid:17)
(cid:0)
zz⊤
6 10
βn
(cid:1)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:0)
n
.
+
(cid:1)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
b
k
βn
q
(cid:0)
n
6 ε
+
(cid:1)
Therefore,
2β
*
1
+
β
n
1
(cid:16)
+
β
6 εβn 6 δβn
(cid:17)
p
100 .
/
p
X , NE
|h
E⊤Y
i|
Y ⊤E
6 δβn
10 .
/
By Fact A.1 and the bound on
+ ̃Y⊤E
entries of
+
s′ are larger (in absolute value) than rtn
k(
)
s′k
from Lemma 4.2, at most
ε2d =
̃
2. By Lemma 3.4, with probability
104ε
d
δ
/
/
(cid:0)
2
(cid:1)
at least 1
10, number of entries i such that
(cid:17)
E⊤ ̃Y
d−
(cid:16)
−
is bounded by pd
at most 10
(cid:12)
(cid:0)
(cid:12)
2k 6 10
Therefore, by Lemma C.8 and Lemma 3.6, with probability at least 1
(cid:1)
pd ln d, where p = exp
ε2d
̃
. Hence number of nonzero entries of z is
10k with probability at least 1
(cid:1)
pd ln d
ε2d
̃
+
pd
10
p
/
+
10,
10.
d−
10
(cid:0)
+
−
+
+
+
8
2d−
p
−
W TYs′
r
n
2
/
*
> t
i
*
(cid:12)
tnr2
(cid:12)
−
10pd
N
k
−
NE
k
6 δβn
10
/
+
βn
n
+
ε2d ln
* ̃
1
ε
/ ̃
(
ε2d ln
) + ̃
1
ε
/ ̃
(
)
.
Since the second and the third terms are bounded by δβn
q(cid:0)
(cid:1)
10, we get the desired bound.
(cid:3)
/
Lemma 4.4. Let 0 < δ < 0.1 and let
For s
)
Suppose that n & k
t let
∈ S
s
(
be the top eigenvector of X
t ln2 d, k & t ln d and
∈ P
v
ˆ
+
βδ3
v
k
2
1
k
1000
6 r 6 βδ3
.
2
1
k
v
500
k that maximizes
k
β &
k
δ6√tn s
ln
2
+
(cid:18)
td
k2 *
1
+
(cid:18)
d
n
(cid:19) (cid:19)
Then there exists s′ ∈ S
t such that with probability 1
20d−
10,
−
zs ̃
z⊤s )
◦ ( ̃
.
(cid:11)
X , ̃Y
(cid:10)
.
Proof. Let s′ be as in Lemma 4.2 and let
s′
, v
> 1
δ
10 .
v
|h ˆ
/
−
)
(
v = v
̃
zs′(
is the same as in Lemma 4.3. By Lemma 4.3, with probability 1
i|
zs′(
◦
z⊤s′(
r
̃Y⊤ ̃Y
(cid:16)
. Then
)
v⊤
̃
= β
nId
v
̃
N
+
−
u
◦
k
k
(cid:17)
r
s
r
)
(
)
)
(cid:0)
(cid:1)
2
,
where N
s
(
)
d−
10, for all X
10
*
−
k,
∈ P
X , N
|h
i|
6 δβn .
21
Consider
By Lemma B.4,
s∗
X
ˆ
(
) ∈
argmaxX
X , ̃Y
◦
zs∗ ̃
z⊤s∗
̃
.
∈P
s∗
X
ˆ
(
)
, vv⊤
◦
(cid:10)
zs∗ ̃
z⊤s∗
̃
(cid:0)
> 1
(cid:1) (cid:11)
6 ̃δ .
−
Hence by Fact B.5,
(cid:10)
By Lemma B.1,
v
|h ˆ
,
s′)
(
v
̃
i|
> 1
−
(cid:0)
, vv⊤
s∗
X
ˆ
(
)
(cid:1) (cid:11)
> 1
−
24 ̃δ .
(cid:10)
100 ̃δ. By Lemma 4.2 and Lemma A.2, with probability 1
(cid:11)
d−
10,
−
v, v
h ̃
i
> 1
100 ̃δ .
−
Using Fact B.5 we get the desired bound.
(cid:3)
2 6
Proof of Theorem 4.1. Since
proof we assume that this bound on
β ̃δ3
v
1000
k
6 r 6 β ̃δ3
if
v
k
of size at most 2 ln n (starting from r = 1
/
500
2
1
2
1
k
k
/
n
k
k
. Since we do not know β and
6 √2n with probability at least 1
holds. Let ̃δ = δ
v
, in this
10
)
−
1000. Note that we can apply Lemma 4.3
/
k1, we can create a list of candidates for r
u
k
u
k
exp
(−
p
n
/
k
n and finishing at r = 1).
∈ S
For all s
t and for all candidates for r we compute
get a list of vectors L of size 2 ln
L such that
exists v∗ ∈
n
(
> 1
By Fact C.7, Lemma C.9, Lemma B.6, k′-sparse norm of Y ⊤Y
such that with probability 1
|
10.
/
t
) * |S
− ̃δ
v∗, v
i|
|h
s
v
ˆ
(
)
as in Lemma 4.4. By Lemma 4.4, we
9 there
d−
10 > 1
20 ln
d−
n
−
(
)
−
nId
β
k
−
u
k
2vv⊤ is bounded by
−
10
n k′ ln
e d
(
/
10
e d
βn k′ ln
k′) +
9. Let us show that if
q
/
(
b2k′
k′) +
+
10b
k′
βn
q
n
+
(cid:1)
with probability at least 1
p
−
3d−
k′ . min
δβn
b2,
/
δ2β2n
β
1
,
ln d
1
δ2β2n
β
b2 ln d (cid:27)
(cid:26)
then k′ the k′-sparse norm is bounded by δβn. Indeed, if β > 1, then
+
+
(cid:1)
(cid:0)
(cid:0)
(cid:1)
(cid:0)
,
and if β < 1,
1
(cid:0)
and by our bound on b,
1
(cid:0)
δ2β2n
β
+
ln d
(cid:1)
δ2β2n
β
+
ln d
(cid:1)
>
δ2βn
2 ln d
& k
n
t ln2 d
& k
δ2 ,
/
r
>
δ2β2n
2 ln d
&
k2
δ2t ln d
& k
δ2 ,
/
By Lemma A.4, for k′ =
that
v
|h ˆ
k′)
(
, v
i|
> 1
δ.
−
100k
⌈
/
δ2
⌉
δ2 . min
δβn
b2,
k
/
δ2β2n
β
.
/
(cid:26)
b2 ln d (cid:27)
, we can compute a k′-sparse vector unit vector
+
1
(cid:1)
(cid:0)
v
ˆ
k′)
(
such
(cid:3)
22
5 The Wigner Model
5.1 Classical Settings
In classical settings the input is an d
vector, W
probability (with respect to the randomness of W ).
In this section we prove the following theorem.
d matrix Y = λvv⊤ +
d. The goal is to compute a unit vector
0, 1
)
(
N
×
∼
×
d
W , where v
v such that
ˆ
∈
v, v
|h ˆ
i|
Rd is a k-sparse unit
> 0.99 with high
N, λ > 0, 0 < δ < 0.1. Let Y =
∈
βuv⊤ +
W , where v
∈
Rd is a k-sparse unit
Theorem 5.1. Let d, k, t
vector, W
d.
0, 1
N
)
(
Suppose that k & t ln d
δ2
∼
×
d
, and
λ & k
δ2
r
p
ln
2
(
td
+
t
/
k2
)
.
Then there exists an algorithm that, given Y , k, t and δ, in time dO
,
with probability 1
as d
o
1
)
(
−
→ ∞
v, v
> 1
δ .
t
(
) outputs a unit vector
v such that
ˆ
i|
As for Wishart model, we define vectors zs
|h ˆ
N such that 1 6 t 6 k we denote by
that have exactly t nonzero coordinates. For s
r
(
)
−
that we will use in the algorithm. Recall the
t the set of all d-dimensional vectors
t let zs be d-dimensional
S
t: for t
definition of
S
with values in
(random) vectors defined as
∈
1, 0, 1
}
{−
∈ S
zsi
r
(
)
=
Y s
1
[(
1
(
)i=
h
s,Yii
>r
t
*
]
if si = 0
otherwise
for some r > 0 (here Yi denotes the i-th row of Y ).
Lemma 5.2. If i ∉ supp
(
v
, then for all s
)
t and r > 0,
∈ S
Proof. Since vi = 0,
s, Yi
P
[h
i
> r
t
]
*
6 exp
tr2
2
.
/
(cid:1)
−
(cid:0)
s, Yi
h
i
=
h
s, Wi
i ∼
N
0, t
(
)
.
The lemma follows from the tail bound for Gaussian distribution (Fact C.4).
(cid:3)
Lemma 5.3. Let 0 < δ < 0.1, r 6 λδ
100k and suppose that λ & k
δ2√t
and k & ln d
δ2 .
Let s∗ ∈
argmaxs
s, v
i
t h
∈S
. Then, with probability 1
10
d−
v
k
◦
zs∗ k
2 =
v
h
◦
> 1
δ .
−
i
−
zs∗ , v
Proof. To simplify the notation we write zsi instead of zsi
all i
δ
2 > 1
∈ L
As in the proof of Lemma 3.3, we can assume that
> 10rt. Note that
v, s∗i|
L k
, β
vi
−
u
v
k
k
k
h
2
|
/
r
. Let
(
)
10.
Lδ =
i
d
]
∈ [
n
(cid:12)
(cid:12)
(cid:12)
> √δ
10√k
vi
|
|
. For
o
s∗, v
h
=
vT
k
k1 > √δt
/
i
√k .
23
We need to bound the norm of W s∗ ∼
k
/
(−
,
10
)
exp
−
probability 1
N
0, t
(
*
Id
)
restricted to the entries of
. By Fact C.5, with
L
By Lemma A.2,
k
W s∗
(
(cid:13)
(cid:13)
v
L ◦
(cid:13)
(cid:13)
zs∗ k
2 >
6 2√kt 6 δ
100 k
v, s∗
λ
h
.
v
i
k
)L
1
(
−
δ
/
10
)k
v
L k
2 > 1
δ .
−
(cid:3)
Lemma 5.4. Let p = exp
tr2
/
−
2
. Then, with probability 1
d−
10,
−
(cid:0)
max
s
t
∈S
W
(cid:1)
◦
zs
r
z⊤s (
)
r
)
(
(cid:13)
(cid:13)
(cid:0)
(cid:1)(cid:13)
(cid:13)
6 10
s
pd
k
+
ln
*
(cid:0)
(cid:1)
d
pd
k
(cid:19)
+
(cid:18)
.
Proof. Using the same argument as in the proof of Lemma 3.5, we get that the number of nonzero
zsi
4k with probability at least
pdt ln
1
t is bounded by 2pd
t
2k 6 4pd
t ln
) +
+
+
n
2
/
(
t
(
−
r
for every s
∈ S
)
d
pd
exp
/
(
By Fact C.6, an m
−
−
(cid:0)
.
m Gaussian matrix G satisfies
(cid:1)
p
)
×
G
k
k
6 2√m
√τ
+
with probability 1
4pd
bound.
+
4k (corresponding to nonzero rows and columns of W
(for every τ > 0). By union bound over all sets of size at most
), we get the desired
(cid:3)
z⊤s (
◦ (
zs
))
r
r
)
(
exp
τ
2
)
/
(−
−
Lemma 5.5. Let 0 < δ < 0.1 and δλ
200k
Y
◦ (
r
z⊤s (
zs
r
))
Suppose that k & t ln d
δ2
(
)
.
, and
6 r 6 δλ
100k . For s
t let
∈ S
s
v
ˆ
(
)
be the top eigenvector of
Then there exists s′ ∈ S
λ & k
ln
2
(cid:18)
t such that with probability 1
δ2√t s
td
k2
+
2d−
.
(cid:19)
10,
−
−
s′
v
|h ˆ
(
)
v = v
̃
= β
, v
> 1
20δ .
i|
zs′(
v
̃
2
◦
u
r
. Then
)
v⊤
̃
W
+
Proof. Let s′ ∈
argmaxs
s, v
and let
t h
∈S
Y
i
zs
r
z⊤s (
r
k
By Lemma 5.4 and the same arument as in Lemma 3.6 with n = d, with probability at least 1
◦
◦
k
)
(
(
)
)
)
(cid:0)
(cid:0)
(cid:1)
(cid:1)
zs
r
z⊤s (
r
,
d−
10,
−
v
By Lemma B.4,
|h ˆ
Therefore, by Fact B.5,
,
u∗)
(
v
̃
i|
> 1
(cid:13)
(cid:13)
−
3δ. By Lemma 5.3, with probability 1
(cid:0)
(cid:1)(cid:13)
(cid:13)
W
zs
r
z⊤s (
)
r
)
(
◦
6 δλ .
v
|h ˆ
(
s′
)
, v
i|
> 1
−
20δ .
24
d−
10,
v, v
h ̃
i
> 1
δ.
−
−
(cid:3)
100k , where
)
1000. Since we do not know λ, we can create a list of candidates for r of size at most 2 ln d
as in Lemma 5.5 with δ′λ
200k
t we compute
6 r 6 δ′λ
∈ S
s
(
v
ˆ
Proof of Theorem 5.1. For all s
δ′ = δ
/
(from r = 1
/
d to r = 1).
By Lemma 5.5, we get a list of vectors L of size 2 ln
there exists v∗ ∈
L such that
v∗, v
> 1
δ
−
i|
|h
9
d−
10. By Fact C.7, k′-sparse norm of W is bounded by
such that with probability 1
t
)|S
−
d
(
|
/
k′ ln
10
(
10. Hence by Lemma A.4 with k′ =
p
/
d−
e d
k′)
with probability at least 1
estimator.
−
100k
⌈
/
δ2
, we get the desired
(cid:3)
⌉
5.2 Adversarial Perturbations
The following theorem is the restatement of Theorem 1.4.
Theorem 5.6. Let d, k, t
∈
unit vector, W
n
0, 1
×
)
(
N
∼
N, λ > 0, 0 < δ < 0.1. Let ̃Y =
d, and E
d is a matrix with entries
βuv⊤ +
Rd
×
∈
Suppose that k & t ln d
δ2 and
E
k
k∞
= ελ
/
p
k . δ3λ
k .
/
λ & k
δ2
r
ln
2
(
td
+
t
/
k2
)
.
Then there exists an algorithm that, given ̃Y, k, t and δ, in time dO
,
with probability 1
as d
o
1
)
(
−
→ ∞
W
+
E, where v
∈
Rd is a k-sparse
t
(
) outputs a unit vector
v such that
ˆ
Proof. Let ̃δ = δ
as
/
1000 and let r = ̃δ
|h ˆ
100k . For s
v, v
> 1
i|
t let
∈ S
δ .
−
zs be n-dimensional (random) vectors defined
̃
=
r
zsi
̃
(
)
1
[h
1
(
>r
s, ̃Yii
t
*
]
if si = 0
otherwise
Let Y =
̃Y
−
E, and zsi be the same as in the non-adversarial case defined for Y . Note that
Let s∗ ∈
argmaxs
s, v
i
t h
∈S
zsi
r
ε
λ
k
6
(
−
+
)
. By Lemma 5.3, with probability 1
/
)
(
(
*
6 zsi
r
r
zsi
̃
k
.
)
ε
λ
*
d−
/
10,
−
−
h
By the argument from the proof of Lemma 3.5, with probability 1
◦ ̃
−
/
k
i
)
(
*
2 =
v
zs∗ , v
> zsi
r
ε
λ
k
> 1
v
zs∗ k
◦ ̃
2 ̃δ .
d−
−
10, number of nonzero
entries of
zs is at most 4pd
̃
+
4k and
W
zs∗ ̃
z⊤s∗
̃
◦
k =
X
Let
P
∈
Rd
d
×
(cid:13)
(cid:13)
(cid:0)
(cid:1)(cid:13)
(cid:13)
0 , Tr X = 1 ,
X
(cid:23)
X , W
(cid:8)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:10)
zs∗ ̃
z⊤s∗
̃
◦
(cid:0)
6 10
pd
k
+
ln
*
s
d
pd
k
(cid:19)
+
(cid:18)
.
̃δ2λ .
(cid:0)
X
k
6
(cid:1)
k1 6 k
W
. For all X
(cid:9)
zs∗ ̃
z⊤s∗
̃
◦
X
* k
k,
̃δλ .
∈ P
.
k
(cid:1) (cid:11)(cid:12)
(cid:12)
(cid:13)
(cid:13)
25
(cid:0)
(cid:1)(cid:13)
(cid:13)
and
Consider
By Lemma B.4,
X , E
zs∗ ̃
z⊤s∗
̃
◦
6
E
zs∗ ̃
z⊤s∗
̃
◦
X
k1 6
̃δλ .
∞ * k
(cid:10)
(cid:12)
(cid:12)
(cid:0)
s∗
ˆX
(
) ∈
(cid:13)
(cid:13)
(cid:1) (cid:11)(cid:12)
(cid:12)
argmaxX
(cid:0)
X , ̃Y
∈P
(cid:1)(cid:13)
(cid:13)
◦
z⊤s∗
zs∗ ̃
̃
.
s∗
ˆX
(
)
, vv⊤
◦
(cid:10)
z⊤s∗
zs∗ ̃
̃
(cid:0)
> 1
(cid:1)(cid:11)
6 ̃δ .
−
Hence by Fact B.5,
D
Let
v
ˆ
s∗)
(
D
be the top eigenvector of ˆX
i|
By Fact C.7, k′-sparse norm of W is bounded by
(
)
(cid:0)
, vv⊤
(cid:1) E
> 1
24 ̃δ .
−
E
. By Lemma B.1,
, v
> 1
100 ̃δ .
−
ˆX
s∗
(
)
s∗)
s∗
(
v
|h ˆ
10
k′ ln
e d
k′)
/
(
with probability at least 1
−
d−
10. And k′-sparse norm of E is bounded by
p
k′
E
k
k∞
6 ελ
k′
k
.
Hence by Lemma A.4 with k′ =
estimator.
100k
⌈
/ ̃δ2
⌉
and the list of X
for all s
s
(
)
∈ S
t, we get the desired
(cid:3)
6 Heavy-tailed Symmetric Noise
The following theorem is a restatement of Theorem 6.1.
Theorem 6.1. Let k, d, t
∈
N, λ > 0, A > 1, 0 < α < 1, 0 < δ < 0.1. Let
Rd is a k-sparse unit vector such that
where v
k
with independent (but not necessarily identically distributed) symmetric about zero entries such that
0, 1
)
(
d is a random matrix
√k and N
k∞
N
∼
∈
v
/
×
d
Y = λvv⊤
N ,
+
6 A
Suppose that t & 1
α2A4 , k & t ln d
δ4A4α2 and
P
Nij
6 1
> α .
(cid:2)(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:3)
λ & A2
δ6α2 *
k
*
ln
2
(cid:0)
k2
td
+
√t
/
.
(cid:1)
Then there exists an algorithm that, given Y , k, t and λ, in time dO
t
(
) finds a unit vector
with probability 1
o
1
)
(
−
as d
,
→ ∞
v, v
|h ˆ
i|
> 1
O
.
δ
(
)
−
26
v such that
ˆ
Before proving this theorem, we state here a theorem from [dNNS22].
Theorem 6.2 ([dNNS22]). Let δ, α
b, r, γ
R be such that
∈
0, 1
)
∈ (
and ζ > 0. Let ̃
Ω
⊆
Rm be a compact convex set. Let
X
X
6 b ,
k∞
k2 6 r ,
max
Ω k
X
∈ ̃
max
Ω k
X
∈ ̃
and
Consider
W
∼
E
N
(
0,Id
sup
Ωh
X
∈ ̃
)"
X , W
i#
6 γ .
Y = X ∗
N ,
+
Ω and N is a random m-dimensional vector with independent (but not necessarily identically
where X ∗ ∈ ̃
distributed) symmetric about zero entries satisfying P
Then the minimizer ˆX = argminX
Ω Fh
∈ ̃
Y
(
X
)
−
Ni
6 ζ
> α.
[|
of the Huber loss with parameter h > 2b
]
|
ζ satisfies
+
with probability at least 1
−
X ∗
ˆX
−
2
6 O
(cid:13)
(cid:13)
(cid:13)
δ over the randomness of N .
(cid:13)
(cid:13)
(cid:13)
h
α
γ
(cid:18)
s
©
«
+
r
log
q
δ
1
/
(
)
(cid:19)
a
®
¬
Using this result, we will prove Theorem 6.1
Proof of Theorem 6.1. Consider
h
:=
τh
x
(
)
where h = 3λ
entry).
v
2
k
∞
k
6 3 λ
k A2. Let T = τh
Y
(
)
if x > h
6 h
if
x
x
h
−
|
|
if x <
(i.e. the matrix obtained from Y by applying τh to each
−
h
For s
t let zs be n-dimensional (random) vectors defined as
∈ S
zsi
r
(
)
=
T s
1
[(
1
(
)i=
h
s,Tii
>r
t
*
]
if si = 0
otherwise
6 r 6 λδ2 α
Let λδ2 α
5k .
10k
=
d
Let
L
Let s∗ ∈
]
∈ [
argmaxs
n
i
vi
t h
|
(cid:12)
(cid:12)
∈S
(cid:12)
. Note that
> δ
√k
. By the same argument as in the proof of Lemma 3.3,
δ2 and hence
2A2 .
> k
|L |
2 > 1
L k
|
s, v
−
v
k
o
i
s∗, v
h
=
vT
k
k1 > δt
/
i
√k .
27
By Chernoff bound, for every i
Nij
6 1. Let
j
supp
(
s∗(
,
))
C
∈
of j
∈ L
with probability at least 1
exp
i be the set of such entries. Then for j
−
tα
(−
i,
∈ C
, for at least αt
2
)
/
/
10
(cid:12)
(cid:12)
(cid:12)
(cid:12)
τh
Yij
= λviv j
Nij
.
+
By Hoeffding's inequality,
(cid:1)
(cid:0)
Yij
τh
Õj
∈Ci
q
2
)
/
(−
exp
with probability at least 1
−
By Hoeffding's inequality,
(cid:12)
(cid:12)
vi
> λ
δ
i
|C
√k
|
(cid:12)
(cid:12)
q
i
|C
|
−
(cid:1)
(cid:0)
Note that for all j
E τh
Yij
> 0 .
(cid:0)
τh
(cid:1)
Yij
>
p
supp
(
j
,
)
∈
ht q
−
p
with probability at least 1
exp
(−
−
(cid:1)
j
(
))\Ci
s∗(
Õj
supp
∈
q
(cid:0)
. Hence for i
2
/
)
> λδ2αt
2
2k −
s∗, Ti
h
i
∈ L
ht q > λδ2αt
4k
> r
t .
*
, with probability at least 1
3 exp
−
√t
/
2
.
(cid:17)
−
(cid:16)
Let μ = exp
(cid:16)
2μk entries i
√t
−
∈ L
. By Chernoff bound, with probability at least 1
10
/
, zs∗i = 0. Hence with probability at least 1
2A2μ > 1
2 > 1
v
(cid:17)
exp
μ
−
δ2 .
(cid:0)
−
−
zs∗ k
L ◦
k
exp
μk
−
100
(cid:0)
|L |/
−
,
(cid:1)
10
, for at most
/
(cid:1)
p
−
,
)
By Hoeffding's inequality, for all i ∉ supp
(
s∗, Ti
v
with probability at least 1
exp
(−
q
/
−
6
ht q
i|
p
|h
. Hence
2
)
s∗, Ti
< r
t
*
i|
|h
= 1
with probability at least 1
r2t
10h
By the same argument as in Lemma 3.5, number of nonzero zs∗i
(cid:17)
(
t, denote by Z
s
t ln
. For s
exp
exp
pd
p.
−
−
−
d
(cid:16)
t
−
−
(
/
)
∈ S
r
)
(
is at most 4pd
d
)
the set of i
∈ [
4k with
+
such that
]
probability at least 1
zsi
−
= 1.
r
(
)
For Q
d
]
⊂ [
let
(cid:0)
(cid:1)
Q =
P
X
∈
RQ
Q
×
X
(cid:23)
0 , Tr X 6 λ ,
X
k
k1 6 λk
,
Note that
(cid:8)
:=
Q
γ
(
)
E
0,1
)
(
G
N
∼
Q
Q "
×
(cid:12)
(cid:12)
X , G
6 λ
E
0,1
)
(
*
G
N
∼
G
k
Q
Q k
×
i#
sup
X
P Q h
∈
(cid:9)
6 10λ
Q
.
|
|
p
Hence by Theorem 6.2 and a union bound over all sets Q of size at most 4pd
t,
10, for all s
probability at least 1
d−
4k, we get with
+
−
∈ S
X
ˆ
s
(
) −
λ
s
v
̃
(
v
) ̃
(
s
⊤
)
2
F
6 O
h
α *
λ
(cid:13)
(cid:13)
(cid:13)
(cid:13)
©
«
pd
k
+
ln
*
(cid:1)
s
(cid:0)
d
pd
k
(cid:19)
+
(cid:18)
28
6 O
A2
α *
λ2
k * s
a
®
¬
©
«
pd
k
+
ln
*
(cid:0)
(cid:1)
d
pd
k
(cid:19)
+
(cid:18)
,
a
®
¬
where
s
X
ˆ
(
Note that
)
is the minimizer of the Huber loss with parameter h over
and
Z
P
(
s
)
v = v
̃
◦
zs
r
.
)
(
+
The second term can be bounded as follows
(cid:0)
(cid:1)
pd
k
ln
+
*
s
d
pd
(cid:18)
.
k
(cid:19)
q
pd ln
p
1
/
(
) +
√k ln d .
√k ln d . δ2k
α
A2
.
Note that
r2t
h > λ
k *
/
δ4α2
A2
t & 2
δ2 ln
2
td
/
+
k2
*
√t > 2 ln
2
k2
d
/
+
Hence the first term can be bounded as follows
(cid:0)
(cid:1)
(cid:0)
δ2 > ln
2
4
t1
/
/
k2
d
/
+
ln
t
/
+
δ2
.
(cid:0)
(cid:1)
(cid:0)
(cid:1)
*
(cid:1)
pd ln
p
1
/
(
)
q
. k
√d *
δ2
t
*
√d . δ2k
α
A2 .
Hence for all s
t,
∈ S
Since
v
k
◦
zs∗ k
2 > 1
−
2δ2,
(cid:13)
(cid:13)
Consider some s′ such that
X
ˆ
s
(
) −
λ
s
v
̃
(
v
) ̃
(
s
⊤
)
2
F
6 δ2λ2 .
s∗
X
ˆ
(
> 1
(cid:13)
(cid:13)
10δλ .
> 1
F
−
10δλ. For such s′,
)
(cid:13)
(cid:13)
−
X
(cid:13)
s′)
(cid:13)
ˆ
F
(
(cid:13)
zs′(
, v
r
(cid:13)
)
s′)⊤
(
F
v
(cid:13)
(cid:13)
◦
h
v
s′) ̃
r
k
v
=
2 > 1
zs′(
i
6 δλ, the top eigenvector
)k
−
◦
100δ .
Moreover, since
X
ˆ
s′) −
(
λ
v
̃
(
v
ˆ
s′)
(
of
X
ˆ
s′)
(
satisfies
(cid:3)
(cid:13)
(cid:13)
(cid:13)
v
(cid:13)
|h ˆ
(
s′
)
, v
i|
> 1
O
.
δ
(
)
−
29
References
[AKS98] Noga Alon, Michael Krivelevich, and Benny Sudakov, Finding a large hidden clique in a
random graph, Proceedings of the Ninth Annual ACM-SIAM Symposium on Discrete
Algorithms, 25-27 January 1998, San Francisco, California, USA (Howard J. Karloff,
ed.), ACM/SIAM, 1998, pp. 594–598. 8
[AW09]
Arash A. Amini and Martin J. Wainwright, High-dimensional analysis of semidefinite
relaxations for sparse principal components, Ann. Statist. 37 (2009), no. 5B, 2877–2921. 1
[AWZ20] Gérard Ben Arous, Alexander S. Wein, and Ilias Zadik, Free energy wells and overlap
gap property in sparse PCA, Conference on Learning Theory, COLT 2020, 9-12 July
2020, Virtual Event [Graz, Austria] (Jacob D. Abernethy and Shivani Agarwal, eds.),
Proceedings of Machine Learning Research, vol. 125, PMLR, 2020, pp. 479–482. 1
[BB19]
Matthew S. Brennan and Guy Bresler, Optimal average-case reductions to sparse PCA: from
weak assumptions to strong hardness, Conference on Learning Theory, COLT 2019, 25-28
June 2019, Phoenix, AZ, USA (Alina Beygelzimer and Daniel Hsu, eds.), Proceedings
of Machine Learning Research, vol. 99, PMLR, 2019, pp. 469–470. 1
[BBH18] Matthew Brennan, Guy Bresler, and Wasim Huleihel, Reducibility and computational
lower bounds for problems with planted sparse structure, Proceedings of the 31st Conference
On Learning Theory (Sébastien Bubeck, Vianney Perchet, and Philippe Rigollet, eds.),
Proceedings of Machine Learning Research, vol. 75, PMLR, 06–09 Jul 2018, pp. 48–166.
1
[BBH+21] Matthew S. Brennan, Guy Bresler, Samuel B. Hopkins, Jerry Li, and Tselil Schramm, Sta-
tistical query algorithms and low degree tests are almost equivalent, Conference on Learning
Theory, COLT 2021, 15-19 August 2021, Boulder, Colorado, USA (Mikhail Belkin and
Samory Kpotufe, eds.), Proceedings of Machine Learning Research, vol. 134, PMLR,
2021, p. 774. 1
[BKS14]
[BR13a]
[BR13b]
[BR13c]
Boaz Barak, Jonathan A. Kelner, and David Steurer, Rounding sum-of-squares relaxations,
Symposium on Theory of Computing, STOC 2014, New York, NY, USA, May 31 - June
03, 2014 (David B. Shmoys, ed.), ACM, 2014, pp. 31–40. 3
Quentin Berthet and Philippe Rigollet, Complexity theoretic lower bounds for sparse prin-
cipal component detection, COLT, JMLR Workshop and Conference Proceedings, vol. 30,
JMLR.org, 2013, pp. 1046–1066. 1
, Computational lower bounds for sparse PCA, CoRR abs/1304.0828 (2013). 1
Quentin Berthet and Philippe Rigollet, Optimal detection of sparse principal components
in high dimension, Ann. Statist. 41 (2013), no. 4, 1780–1815. 1
[dGJL04] Alexandre d'Aspremont, Laurent El Ghaoui, Michael I. Jordan, and Gert R. G. Lanckriet,
A direct formulation for sparse PCA using semidefinite programming, Advances in Neural
Information Processing Systems 17 [Neural Information Processing Systems, NIPS
2004, December 13-18, 2004, Vancouver, British Columbia, Canada], 2004, pp. 41–48. 2
30
[DH23]
[DK22]
Jingqiu Ding and Yiding Hua, SQ lower bounds for random sparse planted vector problem,
CoRR abs/2301.11124 (2023). 3
Ilias Diakonikolas and Daniel Kane, Non-gaussian component analysis via lattice basis
reduction, Conference on Learning Theory, 2-5 July 2022, London, UK (Po-Ling Loh and
Maxim Raginsky, eds.), Proceedings of Machine Learning Research, vol. 178, PMLR,
2022, pp. 4535–4547. 3
[dKNS20] Tommaso d'Orsi, Pravesh K. Kothari, Gleb Novikov, and David Steurer, Sparse PCA:
algorithms, adversarial perturbations and certificates, 61st IEEE Annual Symposium on
Foundations of Computer Science, FOCS 2020, Durham, NC, USA, November 16-19,
2020 (Sandy Irani, ed.), IEEE, 2020, pp. 553–564. 1, 2, 3, 5, 6, 7, 10, 11, 36
[DKWB19] Yunzi Ding, Dmitriy Kunisky, Alexander S. Wein, and Afonso S. Bandeira,
Subexponential-time algorithms for sparse PCA, CoRR abs/1907.11635 (2019). 1, 2, 3, 4,
7, 10
[DKWB21]
, The average-case time complexity of certifying the restricted isometry property, IEEE
Trans. Inf. Theory 67 (2021), no. 11, 7355–7361. 3
[DM14]
Yash Deshpande and Andrea Montanari, Sparse PCA via covariance thresholding, NIPS,
2014, pp. 334–342. 1, 4, 10
[dNNS22] Tommaso d'Orsi, Rajai Nasser, Gleb Novikov, and David Steurer, Higher degree sum-of-
squares relaxations robust against oblivious outliers, CoRR abs/2211.07327 (2022). 1, 3, 7, 8,
11, 12, 27
[GMZ17] Chao Gao, Zongming Ma, and Harrison H. Zhou, Sparse cca: Adaptive estimation and
computational barriers, The Annals of Statistics 45 (2017), no. 5, 2074–2101. 1
[HD13]
Paul Hand and Laurent Demanet, Recovering the sparsest element in a subspace, Informa-
tion and Inference 3 (2013). 3
[HSSS16]
Samuel B. Hopkins, Tselil Schramm, Jonathan Shi, and David Steurer, Fast spectral algo-
rithms from sum-of-squares proofs: tensor decomposition and planted sparse vectors, Proceed-
ings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, STOC
2016, Cambridge, MA, USA, June 18-21, 2016 (Daniel Wichs and Yishay Mansour, eds.),
ACM, 2016, pp. 178–191. 3
[HSV20]
Guy Holtzman, Adam Soffer, and Dan Vilenchik, A greedy anytime algorithm for sparse
pca, 2020, pp. 1939–1956. 2
[JL09]
Iain M. Johnstone and Arthur Yu Lu, On consistency and sparsity for principal components
analysis in high dimensions, Journal of the American Statistical Association 104 (2009),
no. 486, 682–693, PMID: 20617121. 1
[KNV15a] Robert Krauthgamer, Boaz Nadler, and Dan Vilenchik, Do semidefinite relaxations solve
sparse PCA up to the information limit?, The Annals of Statistics 43 (2015), no. 3. 1
31
[KNV15b]
, Do semidefinite relaxations solve sparse PCA up to the information limit?, The
Annals of Statistics 43 (2015), no. 3, 1300 – 1322. 1
[KWB19] Dmitriy Kunisky, Alexander S. Wein, and Afonso S. Bandeira, Notes on computa-
tional hardness of hypothesis testing: Predictions using the low-degree likelihood ratio, CoRR
abs/1907.11636 (2019). 5
[LM00]
B. Laurent and P. Massart, Adaptive estimation of a quadratic functional by model selection,
Ann. Statist. 28 (2000), no. 5, 1302–1338. 36
[MW15]
Tengyu Ma and Avi Wigderson, Sum-of-squares lower bounds for sparse PCA, Advances in
Neural Information Processing Systems 28: Annual Conference on Neural Information
Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada (Corinna
Cortes, Neil D. Lawrence, Daniel D. Lee, Masashi Sugiyama, and Roman Garnett, eds.),
2015, pp. 1612–1620. 1
[MW21]
Cheng Mao and Alexander S. Wein, Optimal spectral recovery of a planted vector in a
subspace, CoRR abs/2105.15081 (2021). 3
[PR22]
Aaron Potechin and Goutham Rajendran, Sub-exponential time sum-of-squares lower
bounds for principal components analysis, Advances in Neural Information Processing
Systems (Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho, eds.),
2022. 1
[QZL+20] Qing Qu, Zhihui Zhu, Xiao Li, Manolis C. Tsakiris, John Wright, and René Vidal, Finding
the sparsest vectors in a subspace: Theory, algorithms, and applications, CoRR abs/2001.06970
(2020). 3
[Ver18]
[Wai19]
Roman Vershynin, High-dimensional probability: An introduction with applications in data
science, Cambridge Series in Statistical and Probabilistic Mathematics, Cambridge Uni-
versity Press, 2018. 35
Martin J. Wainwright, High-dimensional statistics: A non-asymptotic viewpoint, Cambridge
Series in Statistical and Probabilistic Mathematics, Cambridge University Press, 2019.
36
[WBS16]
Tengyao Wang, Quentin Berthet, and Richard J. Samworth, Statistical and computational
trade-offs in estimation of sparse principal components, The Annals of Statistics 44 (2016),
no. 5, 1896 – 1930. 1
[ZSWB22]
Ilias Zadik, Min Jae Song, Alexander S. Wein, and Joan Bruna, Lattice-based methods
surpass sum-of-squares in clustering, Conference on Learning Theory, 2-5 July 2022, Lon-
don, UK (Po-Ling Loh and Maxim Raginsky, eds.), Proceedings of Machine Learning
Research, vol. 178, PMLR, 2022, pp. 1247–1248. 3
A Properties of sparse vectors
This section contain tools used throughout the rest of the paper.
32
Fact A.1. Let r, δ > 0 and let x
Rm such that
k
∈
|S|
Proof.
6 R. Let
=
i
{
S
m
∈ [
xi
|
] |
|
> δ
}
. Then
x
k
6 R2
δ2 .
/
δ2
6
x
k
S k
2 6
x
k
k
2 6 r2 .
* |S|
Lemma A.2. Let δ, δ′ ∈ (
Then
. Let x, y
0, 1
)
∈
Proof. Consider the vector y′ such that y′i
Rm such that
y
k
k
6 δ
. Let
x
k
k
S
=
i
m
]
∈ [
yi
> δ′|
xi
|
.
(cid:3)
.
v
k
(cid:8)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:9)
and y′i
= 0 for all i ∉
S
. It follows that
∈ S
>
v
k
S k
=
δ
−
δ′
1
(
)k
xi for all i
/
−
6 1
δ′ k
y′
k
k
6 δ
δ′ k
.
x
k
y
k
Hence
=
x
k
S k
x
k
+
y′
k
>
x
k
k2 − k
y′
k
>
1
(
−
δ′
δ
/
)k
x
k
.
Lemma A.3. Let v
> 1
v, v′i|
−
|h
∈
δ. For k′ > k, let
Rd be a k-sparse unit vector, and suppose that for some unit vector v′ ∈
K ′ be the set of k′ largest (in absolute value) entries of v′. Then
k′ .
k
v, v′
> 1
δ
Proof. Since
= 1,
v
k
k
v′
K ′ −
v′
(cid:13)
(cid:13)
Therefore,
∞
(cid:13)
(cid:13)
v, v′
K ′
−
−
/
(cid:12)
(cid:10)
6 1
(cid:12)
/
(cid:11)(cid:12)
k′. Hence
(cid:12)
p
v′
6
v′
K ′ −
v′
v
k1 6
∞ * k
K ′ −
k′ .
k
/
p
(cid:10)
(cid:12)
(cid:12)
v, v′
K ′
>
|h
(cid:11)(cid:12)
(cid:12)
v, v′
(cid:13)
(cid:13)
(cid:13)
(cid:13)
v, v′
K ′ −
i| −
v′
> 1
δ
−
−
k′ .
k
/
(cid:10)
(cid:12)
(cid:12)
(cid:11)(cid:12)
(cid:12)
(cid:10)
(cid:12)
(cid:12)
(cid:11)(cid:12)
(cid:12)
p
(cid:3)
Rd,
(cid:3)
Lemma A.4. Let λ, κ, δ > 0 and let v
vectors such that
∈
Rd be a k-sparse unit vector. Let L
Rd be a finite set of unit
⊂
max
x
∈
L |h
v, x
i|
> 1
δ .
−
Let k′ > 2
δ2
k
⌈
/
⌉
and let N
∈
Rd
d be a matrix such that for every k′-sparse unit vector u
×
Rd
∈
u⊤N u 6 κ .
Then, there exists an algorithm running in time O
v such that
finds a unit vector
ˆ
d2
L
*
that, given Y = λvv⊤ +
N , L, k and δ as input,
(cid:0)
> 1
(cid:1)
4δ
2κ
λ
.
−
−
v,
v
ˆ
i|
|h
33
Proof. For each x
largest (in absolute value) entries. Let x∗ ∈
v, s
L we can compute a k′-sparse vector s
v, s
argmaxx
∈
> 1
L |h
∈
x
(
x
(
)
)i|
|h
x∗
(
)i|
2δ .
−
that coincides with x on the top k′
. By Lemma A.3,
Hence
Let
Then
Since
v⊤N
̃
x∗
s
(
⊤
)
λvv⊤
N
s
x∗
(
)
+
>
1
(
−
2δ
)
2λ
−
κ >
1
(
−
4δ
λ
)
−
κ .
(cid:0)
(cid:1)
v
̃
∈
argmaxs
,x
x
(
)
∈
L s
x
(
⊤
)
λvv⊤
N
s
.
x
(
)
+
λvv⊤
v⊤
̃
v 6 κ, we get
(cid:0)
̃
N
+
v > s
̃
(
x∗
⊤
)
λvv⊤
(cid:0)
N
+
(cid:1)
>
x∗
s
(
)
1
(
4δ
λ
)
−
−
κ .
(cid:1)
v,
|h
>
v
̃
i|
v,
|h
(cid:0)
v
̃
i|
2 > 1
−
(cid:1)
4δ
2κ
λ .
/
−
Hence
v = 1
v
ˆ
k ̃
v is the desired estimator.
k ̃
B Linear Algebra
Rd
d, M
×
Lemma B.1. Let M
Then the top eigenvector v1 of M satisfies
Proof. Write z = αv1 +
α2v
√1
(cid:23)
−
∈
h
where v
v1, z
2 > 1
∈
2ε.
−
i
is a unit vector orthogonal to v1.
0, Tr M = 1 and let z
Rd be a unit vector such that zTM z > 1
As v1
TMv1 > zTM z and v
TMv
⊥
⊥
⊥
⊥
T
T
M z = α2v1
z
= α2
> 1
λ1 −
ε
Mv1 +
v
T
⊥
−
⊥
Mv
(cid:0)
1
α2
v
T
⊥
T
Mv
⊥
Mv
⊥
v
(cid:1)
+
⊥
6 1
−
α2 > 1
(cid:0)
−
TMv1 6 1
v1
v
−
TMv
⊥
TMv
⊥
⊥
ε
−
−
v
λ1 −
(cid:1)
zTM z 6 ε, rearranging
⊥
> 1
2ε.
−
(cid:3)
ε.
−
(cid:3)
Fact B.2. Let A, B
Fact B.3. Let X
∈
∈
Rd
Rd
d, A, B
×
0. Then
(cid:23)
A, B
h
i
> 0.
d be a positive semidefinite matrix. Then for all A
×
Rd
d,
×
∈
Lemma B.4. Let Ω
Rm. Let Y = S
⊂
N, where S
+
∈
Rm statisfies
∈
A, X
|h
6
k
i|
A
Tr X .
k *
Ω and N
X , N
i|
6 δ .
sup
X
Ω|h
∈
Then ˆX
∈
argmaxX
Ω h
∈
X , Y
i
satisfies
>
S
k
2
k
−
2δ .
ˆX , S
D
E
34
Proof.
ˆX , S
=
ˆX , Y
D
E
D
−
E
D
ˆX , N
>
ˆX , Y
E
D
−
E
δ >
S, Y
h
i −
δ =
S, S
h
i + h
S, N
i −
δ >
S
k
2
k
−
2δ .
(cid:3)
Fact B.5. Let a, b, c
δ. Then
c, b
> 1
i
h
Proof. Note that
−
Rm such that
4δ.
> 1
∈
a, c
h
−
i
2 6 2
a
k
b
k
−
=
a
k
k
c
k
k
= 1 and
b
k
k
6 1. Suppose that
a, b
h
i
> 1
−
δ and
2
−
h
a, c
a, b
i
6 2δ and similarly
k
c
=
a
k
c
k
−
2 6
a
(k
−
b
k + k
i
−
c
k
b
−
k)
2
2
−
h
b
2 6 2δ. Hence
2 6 8δ .
(cid:3)
Lemma B.6. Let
P ⊂
Rd
×
d be some set of PSD matrices. For matrix M
Rn
d let
×
∈
Then for arbitrary matrices A, B
s
M
)
P(
Rn
d,
×
:= sup
X
∈P(cid:12)
(cid:12)
(cid:10)
M⊤M , X
.
(cid:11)(cid:12)
(cid:12)
B⊤A
+
A⊤B, X
6 2
s
A
) *
s
B
.
)
P(
P(
∈
sup
X
∈P(cid:12)
(cid:12)
(cid:10)
Proof. Let X′ be an arbitrary element of S. For some c
C =
cB
A
A
⊤
)
(
c
−
cB
. Since C and X′ are PSD,
)
B⊤A
A⊤A, X′
A⊤B, X′
6
(
−
Therefore,
(cid:12)
(cid:12)
+
*
(cid:10)
(cid:11)(cid:12)
(cid:12)
(cid:10)
B⊤A
+
A⊤B, X′
(cid:11)
6
s
To minimize this expression, we can take
(cid:10)
(cid:12)
(cid:12)
c
|
|
(cid:11)(cid:12)
(cid:12)
=
q
p
(cid:11)(cid:12)
(cid:12)
∈
C , X′i
c2
h
+
(cid:10)
A
P(
c
|
A
B
)
)
s
P (
s
P (
6 2
B⊤B, X′
)
c
+ |
| *
|
. Hence
0 (we will choose the value of c later), let
> 0. Hence
6 s
A
P(
) +
c2s
B
.
)
P(
(cid:11)
s
B
.
)
P(
Since it holds for arbitrary X′ ∈ S
(cid:10)
(cid:12)
(cid:12)
B⊤A
A⊤B, X′
s
A
+
) *
(cid:11)(cid:12)
, we get the desired bound.
(cid:12)
P(
p
s
.
B
)
P(
(cid:3)
C Concentration Inequalities
Fact C.1 (Chernoff's inequality, [Ver18]). Let ζ1, . . . , ζn be independent Bernoulli random variables such
that P
= p. Then for every Δ > 0,
ζi = 1
)
(
= P
(
ζi = 0
)
and for every Δ
,
0, 1
)
∈ (
Õi=1
n
Õi=1
P
n
P
ζi > pn
Δ
1
(
+
)!
6
ζi 6 pn
Δ
1
(
−
)!
6
35
Δ
e−
Δ
+
Δ
1
+
)
Δ
e−
Δ
−
Δ
1
−
)
pn
pn
.
.
(cid:19)
(cid:19)
1
(cid:18)
(
1
(cid:18)
(
Fact C.2 (Hoeffding's inequality, [Wai19]). Let z1, . . . , zn be mutually independent random variables
such that for each i
for some ci > 0. Then for all t > 0,
, zi is supported on
ci , ci
n
∈ [
]
[−
]
Fact C.3 (Bernstein's inequality [Wai19]). Let z1, . . . , zn be mutually independent random variables such
that for each i
for some B > 0. Then for all t > 0,
, zi is supported on
B, B
n
Í
∈ [
]
[−
zi
(
−
E zi
6 2 exp
> t
!
−
2
t2
n
i=1 c2
i !
.
)(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
]
n
P
(cid:12)
Õi=1
(cid:12)
(cid:12)
(cid:12)
(cid:12)
n
P
Õi=1
N
0, σ2
(
zi
(
−
E zi
)
> t
!
6 exp
−
2
n
i=1
t2
E z2
i +
.
2Bt
3 !
, then for all t > 0,
)
Í
X > σ
P
(
t
)
*
6 e−
t2
2 .
/
Fact C.4. [Wai19] Let X
∼
Fact C.5. [LM00]Let X
χ2
m, then for all x > 0,
∼
P
X
(cid:16)
−
m > 2x
+
P
m
(
−
2√mx
6 e−
x
(cid:17)
X > x
)
6 e−
x2
4m
Fact C.6. [Wai19] Let W
N
0, 1
)
(
∼
n
×
d. Then with probability 1
exp
(−
t
,
2
)
/
−
and
W
T
Fact C.7. [dKNS20] Let W
k
least 1
k
ed
−
N
(cid:13)
(cid:13)
∼
W
−
0, 1
)
(
W
k
k
6 √n
√d
√t
+
+
nId
6 d
2√dn
+
t
+
+
4
n
t
(
.
d
)
+
d be a Gaussian matrix. Let 1 6 k 6 d. Then with probability at
p
n
×
(cid:13)
(cid:13)
(cid:0)
(cid:1)
and
max
Rn
u
∈
=1
u
k
k
max
k-sparse v
∈
=1
v
k
k
TW v 6 √n
u
Rd
k ln
3
s
+
e d
k
(cid:19)
(cid:18)
max
k-sparse v
∈
=1
v
k
k
v⊤W ⊤W v
−
Rd
n 6 10
kn ln
e d
k
/
(
) +
10k ln
e d
.
k
)
/
(
p
Lemma C.8. Let Y be an instance of sparse PCA in Wishart model. For m
z
. Suppose that m > 100 ln d and n > 0.1
m ln
0, 1
e d
m
z
d
}
∈ {
n
ity at least 1
k1 6 m
k
10,
d−
o
(cid:12)
(cid:12)
−
(cid:12)
∈
N let Zm =
. Then, with probabil-
)
*
(
/
max
Zm
z
∈
Y ⊤Y
nId
β
k
−
u
k
2vv⊤
−
(cid:0)
(cid:13)
(cid:13)
◦
(cid:1)
(cid:0)
zz⊤
6 10
(cid:1)(cid:13)
(cid:13)
q(cid:0)
βn
n
+
m ln
e d
m
/
(
) +
*
10m ln
e d
m
.
)
/
(
(cid:1)
36
(cid:1)(cid:13)
6 √2n. By Lemma C.9, with probability at leaast
(cid:13)
as
◦ (
zz⊤)
(cid:1)
βW ⊤uv⊤
Proof. We can write
Y ⊤Y
nId
β
k
−
u
k
−
2vv⊤
Note that
(cid:0)
W ⊤W
(cid:16)
n
*
−
Id
+
W ⊤uv⊤
vu⊤W
+
p
◦
zz⊤
With probability at least 1
,
1
)
exp
(−
m
−
(cid:0)
(cid:13)
(cid:13)
n
exp
(
/
−
(cid:1)
,
10
)
(cid:0)
u
k
k
+
βvu⊤W
p
zz⊤
.
(cid:1)
◦
(cid:17)
(cid:0)
1
u
u⊤W
z
◦
u
.
k
* k
(cid:18)
k
k
(cid:19)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
6 2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
By Fact C.6, for every m′ ∈
G⊤G
(cid:0)
(cid:13)
(cid:13)
W ⊤uv⊤
vu⊤W
zz⊤
6 5
βn
+
N, G
N
∼
◦
n
0, 1
(cid:0)
(cid:1)
(
)
6 m′
n
Id
m′ satisfies
p
×
(cid:1)(cid:13)
(cid:13)
2√m′n
m ln
em
.
k
)
/
(
*
p
with probability 1
get the desired bound.
−
(cid:13)
exp
(cid:13)
(−
τ
/
2
)
Lemma C.9. Let W
Zm =
0, 1
z
d
∈ {
}
N
0, 1
(
)
k1 6 m
∼
z
k
n
(cid:12)
(cid:12)
(cid:12)
max
Zm
z
∈
o
ba⊤W
*
+
(
−
(for every τ > 0). By union bound over all sets of size m′ 6 m we
(cid:3)
p
(cid:13)
(cid:13)
+
+
)
τ
4
τ
m′ +
n
.
n
d and let a
×
. Suppose that m > 100 ln d. Then with probability at least 1
Rd be vectors independent of W . For m
d−
Rn and b
∈
∈
∈
10,
N let
−
zz⊤
6 3
◦
a
* k
b
k *
k * k
m ln
em
.
k
)
/
(
Proof. For fixed set J
1
u
u⊤W
(cid:13)
(cid:13)
d
]
1J has standard
⊂ [
(cid:0)
(cid:1)
(cid:0)
, let 1J
J
(cid:1)(cid:13)
(cid:13)
d be an indicator vector of this set. Random vector
}
-dimensional Gaussian distribution, hence by Fact C.6, for all τ > 0,
∈ {
0, 1
p
k
◦
with probability at least 1
(cid:16)
(cid:17)
k
|
|
exp
−
τ
,
2
)
/
(−
By union bound over all sets of size of size at most m, we get
a⊤W
1
a
k
(cid:18)
k
◦
(cid:19)
1J
6
1
J
|
| +
+
√τ .
p
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
with probability at least 1
max
Zm (cid:13)
z
(cid:18)
∈
(cid:13)
(cid:13)
m
(cid:13)
(−
exp
1
a
k
.
)
k
−
a⊤W
◦
(cid:19)
z
6 3
p
(cid:13)
(cid:13)
(cid:13)
(cid:13)
m
e d
ln
(
*
/
m
)
(cid:3)
37
|
|
http://arxiv.org/abs/2302.10790v1 | 2023-02-20T18:36:46 | 2023-02-20T18:36:46 | Federated Learning for ASR based on Wav2vec 2.0 | This paper presents a study on the use of federated learning to train an ASR
model based on a wav2vec 2.0 model pre-trained by self supervision. Carried out
on the well-known TED-LIUM 3 dataset, our experiments show that such a model
can obtain, with no use of a language model, a word error rate of 10.92% on the
official TED-LIUM 3 test set, without sharing any data from the different
users. We also analyse the ASR performance for speakers depending to their
participation to the federated learning. Since federated learning was first
introduced for privacy purposes, we also measure its ability to protect speaker
identity. To do that, we exploit an approach to analyze information contained
in exchanged models based on a neural network footprint on an indicator
dataset. This analysis is made layer-wise and shows which layers in an
exchanged wav2vec 2.0 based model bring the speaker identity information. | [
"Tuan Nguyen",
"Salima Mdhaffar",
"Natalia Tomashenko",
"Jean-François Bonastre",
"Yannick Estève"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.10790v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.10790v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "eess.AS",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"eess.AS",
"cs.LG",
"cs.SD"
] | FEDERATED LEARNING FOR ASR BASED ON WAV2VEC 2.0
Tuan Nguyen, Salima Mdhaffar, Natalia Tomashenko, Jean-Franc ̧ois Bonastre, Yannick Est`eve
LIA - Avignon University, France
3
2
0
2
b
e
F
0
2
]
S
A
.
s
s
e
e
[
1
v
0
9
7
0
1
.
2
0
3
2
:
v
i
X
r
a
ABSTRACT
This paper presents a study on the use of federated learning to train
an ASR model based on a wav2vec 2.0 model pre-trained by self
supervision. Carried out on the well-known TED-LIUM 3 dataset,
our experiments show that such a model can obtain, with no use of
a language model, a word error rate of 10.92% on the official TED-
LIUM 3 test set, without sharing any data from the different users.
We also analyse the ASR performance for speakers depending to
their participation to the federated learning. Since federated learning
was first introduced for privacy purposes, we also measure its ability
to protect speaker identity. To do that, we exploit an approach to
analyze information contained in exchanged models based on a neu-
ral network footprint on an indicator dataset. This analysis is made
layer-wise and shows which layers in an exchanged wav2vec 2.0-
based model bring the speaker identity information.
Index Terms- Federated learning, Automatic Speech Recog-
nition, Self-supervised models, Privacy
1. INTRODUCTION
Federated learning (FL) has been successfully explored for image
and natural language processing [1]. FL [1, 2] is a distributed ma-
chine learning paradigm that aims to collaboratively train a machine
learning model without data sharing. It consists in a network of mul-
tiple clients and one server. The training is based on an iterative
numbers of rounds. At each federated learning round, clients train a
local model using their private data, and send this updated model to
the server. The server aggregates the received updates into a single
global model and sends its parameters back to the clients' devices.
Recently, FL has been applied in various speech-related applica-
tions, such as automatic speech recognition (ASR) [3, 4, 5, 6, 7, 8].
keyword spotting [9, 10, 11], speaker recognition [12, 13], speech
emotion recognition [14], self-supervised learning (SSL) of speech
representations [15], and others. However, their robustness capabili-
ties have not been extensively investigated and research in this area is
still limited. In [16], authors showed why ASR FL task can be con-
sidered as very challenging. The challenges include: (1) communi-
cation bottleneck, (2) computation capabilities and energy states, (3)
the performance and accuracy of the learned model and (4) privacy
and security considerations.
Recently, wav2vec2.0 [17] models have become more popular
and have achieved good performance in many speech processing
tasks [18, 19]. Authors in [17] claim this framework can enable auto-
matic speech recognition models with just 10 minutes of transcribed
speech data.
This work was supported by the French National Research Agency un-
der project DEEP-PRIVACY (ANR-18-CE23-0018), VoicePersonae, H2020
SELMA and was granted access to the HPC resources of IDRIS under the
allocation 2021-AD011012551 made by GENCI.
This paper presents a study on the use of federated learning to
train an ASR model based on a wav2vec 2.0 model pre-trained by
self supervision. To our knowledge, there is no previous published
work on this use of wav2vec2.0 models. We analyse the global
ASR performance but also the performance for speakers depend-
ing to their participation to the federated learning. Since federated
learning was first introduced for privacy purposes, we also measure
its ability to protect speaker identity. Some related works show that
federated learning is vulnerable to various types of attacks [20, 4].
To do that, we exploit an approach to analyze information contained
in exchanged models based on a neural network footprint on an in-
dicator dataset. This analysis is made layer-wise and shows which
layers in an exchanged wav2vec 2.0-based model bring the speaker
identity information.
2. FEDERATED LEARNING FOR WAV2VEC 2.0 MODELS
2.1. Federated learning
The idea of FL paradigm is about training a neural model across
multiple cross-device or server. Unlike distributed learning, FL
participants only exchange model parameters without exposing any
data samples. By doing this, it is expected to ensure the data privacy
of participants or clients. FL technique follows strictly to these steps:
1. The centralized server initializes the global model G.
2. The global model G is sent to each available clients.
3. Each client c fine-tunes the global model on its local data to
obtain the updated model Mc.
4. All the updated models Mc from clients ck are sent back to
the server and being aggregated to form a new model.
5. The process restarts again from 2nd step to 4th step until the
convergence or number of rounds T is reached.
In recent years, more and more studies have been conducted to
find the most proper weight aggregation strategy for FL [21, 22].
Among them, Federated Averaging (FedAvg) [2] is the fundamen-
tal and the most well-known FL algorithm. FedAvg is based on
FedSGD [23] algorithm.
Instead of exchange the gradients after
batch updated, FedAvg clients send the updated weights. At each
round, a number m of clients are chosen among K total clients to
send their updated model to server. From here, server weights each
of clients' parameters Fk(w) by their size of dataset nk over the total
data n are used in the given round and then aggregates them:
f (w) =
m
(cid:88)
k=1
nk
n
Fk(w)
(1)
2.2. Wav2vec 2.0 model
Wav2vec 2.0 [17] is a model pre-trained through self-supervision. It
takes raw audio as input and computes speech representations. Such
pre-trained models can be fine-tuned by supervision to build speech
recognition systems. Wav2vec 2.0 contains three main components:
a convolutional feature encoder, a context network and a quanti-
zation block. The convolutional feature encoder converts the raw
waveform into a latent representation. This representation is given
to the context network which takes care of the context. The context
network architecture consists of a succession of several transformer
encoder blocks. The quantization network is used to map the latent
representation to quantized representation. Facebook AI released
self supervised pre-trained wav2vec 2.0 models. In this study, we
use the model LS960-LV60 1 pre-trained on English.
2.3. Implementation with SpeechBrain and Flower toolkits
The purpose of this research is to train an ASR with a federated
learning paradigm. To attain this objective, Flower [24] and Speech-
Brain [25] have been used. Flower is an open-source framework that
allows us to build FL experiments and considers the highly varied FL
facility scenarios. The framework is composed of three main com-
ponents: a client, a server and a strategy. The client and the server
implement the basic functionalities of the clients and a server in a
FL training. SpeechBrain is an open source toolkit for automatic
speech processing. This toolkit is a simple and flexible end-to-end
ASR framework.
3. EXPERIMENTS
Train
(clients)
252.17
1943
148332
Duration, hours
# speakers
# utterances
Analysis Dev
Test
Indicator
110.34
1341
65430
3.76
16
1155
3.73
16
507
0.51
40
342
Table 1. Data sets statistics
blocks of convolutional neural networks (with respectively 128,
200 and 256 channels) with pooling layers, followed by five bidi-
rectional 1024-dimensional LSTM layers connected to two dense
1024-dimensional layers to obtain the final acoustic representation.
The input signal representation is composed of 80-dimensional
filter-banks. The encoder maps these filter-banks to a higher-level
feature representation that are then passed to a 1024-dimension
attention module that identifies which parts of high level speech rep-
resentations are relevant to each step of the decoding process. The
attention module output is used to compute a context vector used as
the input of an RNN decoder. This RNN decoder is composed of
1024-dimensional GRU layer before the output softmax layer. The
neural network output corresponds to 500 byte pair encoding uni-
gram units, that are a mix between characters and words. An initial
end-to-end ASR model pre-trained on the CommonVoice dataset3 is
used to initialize weights for the server model. The client's models,
trained on the local speaker set for 20 epochs, uses the same model
configuration and hyperparameter settings.
3.1. Data
3.2.2. ASR model based on Wav2vec 2.0
The experiments were conducted on the TED-LIUM 3 corpus [26]
that contains TED talks with the total amount of 452 hours of speech
data in English from about 2K speakers. This dataset has been used
in some research works in the context of collaborative learning
experiments [20, 4, 27]. We organized the TED-LIUM 3 training
dataset in order to simulate a realistic federated learning framework.
Each speaker in the TED-LIUM 3 training set acts as a client in this
FL scenario. For speakers s in the training set with duration > 10
minutes, we consider a subset of 5 minutes of speech data called
analysiss to analyse some FL behaviours. The remaining is called
trains and represents the local dataset for the client. For speakers
in the training set with duration < 10 minutes, all the speaker data
will represent the local dataset for the client. For the test and devel-
opment sets, we use the official test and development sets (legacy
distribution) of the TED-LIUM 3 release. The indicator dataset [4]
is used to analyse the speaker information contained in the models
exchanged between the server and clients. The speakers in the test,
development, train, and indicator dataset are disjoint. Table 3.1
presents the statistics of the data 2.
3.2. Models
3.2.1. ASR model based on CRDNN
In our experiments, we use an attention-based encoder-decoder [28]
neural network. The encoder is a convolutional, recurrent and deep
neural network (CRDNN) block. This CRDNN is composed of three
1https://huggingface.co/facebook/wav2vec2-large-960h-lv60
2https://github.com/tuanct1997/Federated-Learning-ASR-based-on-
wav2vec-2.0
The architecture is based on an end-to-end approach with SSL. The
system is composed of the large pre-trained English wav2vec 2.0
model, a linear layer of 1024 units, and the softmax output layer.
Connectionist temporal classification (CTC) loss function [29] is
used as a loss function.
We conduct our experiments using randomly initialized weights
for the server model. The final model is trained on 5 V100 GPUs,
each with 32 GB memory, for 100 rounds at a batch size of 4. The
clients' models, trained on the local speaker set for 20 epochs, use
the same model configuration and hyperparameter settings.
3.3. FL for ASR
With the data set split described in Section 3.1, FL's clients mostly
cover only a small amount of audio. This is a big challenge to train
an ASR model since normally, in this domain the dataset size is
a critical point. Moreover, between these clients, a big difference
in voice, audio quality, utterances or data size leads to an extreme
non independent and identically distributed (non-IID) case. As be-
ing seen in different studies [30][31][5], non-IID is a big challenge
for FL. For end-to-end ASR, Yan Gao et al [5] also found that it is
nearly impossible to start the training from scratch. In their work,
they started the training from a pre-trained model on half of same
dataset. Described in Section 3.2, for both CRDNN and wav2vec
2.0 architectures, a pre-trained model is used as an initialised global
model. The difference is that for CRDNN, the pre-trained model is
already specialised for the ASR task. For wav2vec 2.0, the initialised
3https://github.com/speechbrain/speechbrain/tree/develop/recipes/
CommonVoice/ASR/seq2seq
model is only pre-trained to learn the representation from audio of
LibriSpeech data.
To set up a FL ASR experiment, a simulation has been created
and executed on the same machine. Within the simulation, we have
1 server and 1943 clients corresponding to speakers in the TED-
LIUM 3. In a normal FL scenario, as can be seen in equation 1, only
m out of K clients will participate in aggregation process because
K can be very large and using all K clients can be unmanageable.
In our experiments, 20 clients per round are chose to participate for
both CRDNN and wav2vec 2.0 architectures.
Indeed, during our
experiments we found that m = 20 is the best trade-off point for our
resource4.
3.4. ASR performance
3.4.1. General performance
To analyze the performance of the FL ASR system, the global model
was tested on the TED-LIUM 3 test set where speakers of this set
were never exposed during the training phase. Results in Figure 1
show that it is possible to improve the ASR performance in terms of
word error rate (WER) for speakers unseen during the FL training
(speakers in the test set).
Having a better start in terms of WER (WER = 37.04% at first
round), CRDNN still struggles to converged compared to wav2vec
2.0. Despite the CommonVoice pre-trained model is good at the
ASR task, we noticed this is not enough since there is a large gap
between CommonVoice and TED-LIUM 3. WER of CRDNN stays
at around 35% for the rest of rounds (best performance is reached at
round 45 WER = 34.33%).
By using only a small dataset at local level, it's not enough to
learn the information of TED-LIUM 3 using the CRDNN pre-trained
models. On the other hand, with wav2vec 2.0 the problem seems to
be overcome. Just within 4 rounds, wav2vec 2.0 caches up with
CRDNN and keeps improving. The best performance is recorded
at 85th round with 10.92% of WER. In addition, for 100 rounds,
the FL is only contributed by 1209 speakers (which equal to 62% of
total speakers) to reach this performance.
3.4.2. Longitudinal speaker-level ASR performance
Our hypothesis is that performance of FL in each round is still af-
fected by the speaker's participation in each round. At each round, a
fixed number of clients participate in the training by sending to the
server a model trained using their private data, this may cause for-
getting of previously-learnt knowledge related to the speakers seen
in previous rounds. In contrast, in a centralized training process, all
speaker data is used simultaneously, eliminating the risk of forget-
ting previously learned speaker information.
To address this aspect, we propose to analyze the evolution of
WER per speaker according to the different rounds. As described in
Section 3.1, 5 minutes of speech have been removed from the train-
ing data for some speakers and included into an analysis dataset.
Let us denote Gr the general model at communication round r
and consider the speakers that share their models during the FL run
at round 5. To facilitate the analysis, we pick a subset of 5 speakers
at this round to test the performance of Gr.
Figure 2 shows how the general model Gr performs on these
five analysis datasets at each round. A dotted segment means that
4To facilitate research in FL using TED-LIUM 3 dataset, the recipe in-
cluding data preparation, FL training and evaluation scripts will be released
open source upon paper acceptance
Fig. 1. Performance evolution (WER,%) of end-to-end models ASR
based on wav2vec 2.0 (SSL) compared to end-to-end ASR models
based on CRDNN (no SSL) on the TED-LIUM 3 test dataset
Fig. 2. Global model performance on speaker's analysis dataset
Fig. 3. Performance of speaker local models on corresponding anal-
ysis datasets compared to the global model
the speaker was not involved between two rounds, while a solid line
means that the speaker contributed for one round during the two
ones connected by the segment. First, we observe similar trends
between different speakers and between solid and dotted segments.
Figure 2 shows a significant improvement in WER for first rounds
(from round 5 to round 22). Then, for next rounds, WER for dif-
ferent speakers does not vary significantly. Therefore it can be seen
that Gr contains relevant information for these speakers and does
not bring any bias based on the number of participations.
Another important aspect of FL to be considered is the perfor-
mance of a speaker's local model. Figure 3 reports a test performed
using the best round (round 85th). The figure shows that the local
speaker model (represented by the gray columns) is enhanced after
fine-tuning on its own dataset, as expected. Then we tested all these
speaker models on the TED-LIUM 3 test set and obtained the av-
erage WER = 13.04%, to be compared with WER = 10.92% of
global model as been reported in Section 3.4.2. These results show
that the global model Gr is well designed to process not only speak-
ers involved in the federated learning but also new speakers.
3.5. Protection of speaker identity
3.5.1. Privacy preservation scenario and attack model
Privacy preservation can be formulated as a game between users who
share some data and attackers who access this data or data extracted
from it and want to get information about the users [32, 33].
In
FL, to preserve the user's data, only model updates are transmitted
between the clients and server. An attacker aims to attack users using
information received from the server about the models' updates.
In this work, we consider the following privacy preservation sce-
nario. We assume that an attacker has access to the following data
and models: (i) a global model Gr shared with the clients at commu-
nication round r; (ii) a personalised model M of some speaker ob-
tained at round r from Gr; (iii) speech data (utterances u1, . . . , uT )
of a known speaker which will be referred to as enrollment data fol-
lowing the traditional ASV terminology data. The attacker does not
know the identity of the speaker corresponding to M and aims to
perform an automatic speaker verification (ASV) task using i–iii to
verify if the model M and data u1, . . . , uT correspond to the same
speaker. We will refer to M as test trial model.
In this work, we use an attack model that is similar to the one
proposed in [4]. The idea is based on capturing information about the
speaker identity from the corresponding personalised model M and
the global model Gr by comparing the outputs of these two neural
acoustic models (AM) taken from hidden layers h on some speech
data (called indicator in [4]). The indicator data is not related to test
or training data and can be chosen arbitrarily from any speakers.
The method consists in the following steps: (1) get a person-
alised model Me for enrollment speaker e from the enrollment data
(iii): u1, . . . , uT , by finetuning Gr on this data; (2) using Gr and M
compute per-frame differences between activation values of these
two models from some hidden layer h for all utterances of the in-
dicator dataset; then for these differences compute a mean vector
μ over all frames; (3) using Gr and Me compute per-frame differ-
ences between activation values of these two models from layer h
for all utterances of the indicator dataset; then for these differences
compute a mean vector μe over all frames; (4) compute similarity
score ρ between enrollment model Me and test trial model M as co-
sine similarity between corresponding mean vectors: ρ(Me, M ) =
cos(μ, μe) and perform an ASV task using these scores. More de-
tails can be found in [4]5.
As a privacy evaluation metric, in this work, we use equal er-
ror rate (EER). Denoting by Pfa(θ) and Pmiss(θ) the false alarm
and miss rates at threshold θ, the EER corresponds to the thresh-
old θEER at which the two detection error rates are equal,
i.e.,
5The differences with respect to the work [4] are in the way the similar-
ity scores are computed: (1) only mean values (without standard deviation
components as in [4]) are used; and (2) cosine distance instead of Euclidean-
based metric is applied.
EER = Pfa(θEER) = Pmiss(θEER). The higher EER the better is
privacy preservation.
Fig. 4. Privacy evaluation (EER,%) for different computational
rounds and layers of the ASR models
3.5.2. Results
The speaker privacy has been evaluated for the ASR models with
the wav2vec 2.0-based architecture (Section 3.2.2). We applied the
attack model described in Section 3.5.1 for different computational
rounds r. For each round, we used 50 enrollment speakers and per-
form an ASV task for all clients of the given round (performing in
average 15 target and 986 non-target trials per round). The amount
of enrollment data for each model ((iii) in Section 3.5.1) is about
5 minutes. Experimental results are presented in Figure 4 for dif-
ferent hidden layers of the ASR models and rounds {3,5,10,20,30}.
The green dashed curve represents the EER averaged over selected
rounds. In general, EER increases when the number of computa-
tional rounds increases, so it is more difficult for the attacker to re-
trieve information about the speaker identity from the personalised
models on the later rounds than on the earlier ones. For lower hidden
layers, the EER in average is lower than for upper layers.
4. CONCLUSION
This paper presents a study on the use of federated learning to train
an ASR model based on the wav2vec 2.0 model. The experimental
results, carried out on the well-known TED-LIUM 3 dataset, showed
the capability of federated learning to train an effective ASR model
without sharing any speech data when federated learning is applied
to fine-tune a wav2vec 2.0 model. Our experiments demonstrated
that the general model contains relevant information for those speak-
ers who have participated in the federated learning by sharing their
local models, but we did not observe any bias based on the number of
participations. The general model built through federated learning is
also very effective to process unseen speakers. Finally, we have eval-
uated the privacy level achieved for the proposed federated learning
framework by exploiting an approach to analyse information con-
tained in personalised models based on a neural network footprint on
an indicator dataset. The layer-wise analysis has demonstrated that
speaker information can be retrieved from all the considered rounds
of the FL process. EER is lower on the earlier stages of the process
and varies from 5 up to 20%, for different rounds for hidden layers
#2–#6). In a future work, we could also investigate which amount of
linguistic information is brought by the shared local speaker models.
5. REFERENCES
[1] Jakub Koneˇcn`y, H Brendan McMahan, Felix X Yu, Peter
Richt ́arik, Ananda Theertha Suresh, and Dave Bacon, "Fed-
erated learning: Strategies for improving communication effi-
ciency," arXiv preprint arXiv:1610.05492, 2016.
[2] H. Brendan McMahan, Eider Moore, Daniel Ramage, et al.,
"Communication-efficient learning of deep networks from de-
centralized data," 2016.
[3] Dimitrios Dimitriadis, Ken'ichi Kumatani, Robert Gmyr,
Yashesh Gaur, and Sefik Emre Eskimez, "A federated approach
in training acoustic models.," in Interspeech, 2020.
[4] Natalia Tomashenko, Salima Mdhaffar, Marc Tommasi, Yan-
nick Est`eve, and Jean-Franc ̧ois Bonastre, "Privacy attacks for
automatic speech recognition acoustic models in a federated
learning framework," in ICASSP 2022.
[5] Yan Gao, Titouan Parcollet, Salah Zaiem, Javier Fernandez-
Marques, Pedro P. B. de Gusmao, et al., "End-to-end speech
recognition from federated acoustic models," in ICASSP, 2022.
[6] Han Zhu, Jindong Wang, Gaofeng Cheng, Pengyuan Zhang,
and Yonghong Yan, "Decoupled Federated Learning for ASR
with Non-IID Data," in Interspeech 2022.
[7] Junteng Jia, Jay Mahadeokar, Weiyi Zheng, Yuan Shangguan,
Ozlem Kalinli, and Frank Seide, "Federated Domain Adapta-
tion for ASR with Full Self-Supervision," in Interspeech 2022.
[8] Haaris Mehmood, Agnieszka Dobrowolska, Karthikeyan Sara-
vanan, et al., "FedNST: Federated Noisy Student Training for
Automatic Speech Recognition," in Interspeech 2022.
[9] David Leroy, Alice Coucke, Thibaut Lavril, Thibault Gissel-
brecht, and Joseph Dureau, "Federated learning for keyword
spotting," in ICASSP, 2019.
[10] Andrew Hard, Kurt Partridge, Cameron Nguyen, Niranjan
Subrahmanya, Aishanee Shah, Pai Zhu, et al., "Training key-
word spotting models on non-iid data with federated learning,"
in Interspeech, 2020.
[11] Andrew Hard, Kurt Partridge, Neng Chen, Sean Augenstein,
Aishanee Shah, Hyun Jin Park, et al., "Production federated
keyword spotting via distillation, filtering, and joint federated-
centralized training," in Interspeech 2022.
[12] Abraham Woubie and Tom B ̈ackstr ̈om, "Federated learning for
privacy-preserving speaker recognition," IEEE Access, 2021.
[13] Filip Granqvist, Matt Seigel, Rogier van Dalen, ́Aine Cahill,
Stephen Shum, and Matthias Paulik, "Improving On-Device
Speaker Verification Using Federated Learning with Privacy,"
in Interspeech 2020.
[14] Siddique Latif, Sara Khalifa, Rajib Rana, and Raja Jurdak,
"Federated learning for speech emotion recognition applica-
tions," in IEEE International Conference on Information Pro-
cessing in Sensor Networks 2020.
[15] Yan Gao, Javier Fernandez-Marques, Titouan Parcollet, Abhi-
nav Mehrotra, and Nicholas Lane, "Federated Self-supervised
Speech Representations: Are We There Yet?," in Interspeech
2022.
[16] Wentao Yu, Jan Freiwald, S ̈oren Tewes, Fabien Huennemeyer,
and Dorothea Kolossa, "Federated learning in asr: Not as easy
as you think," in Speech Communication, 2021.
[17] Alexei Baevski, Yuhao Zhou, Abdelrahman Mohamed, and
Michael Auli, "wav2vec 2.0: A framework for self-supervised
learning of speech representations," Advances in Neural Infor-
mation Processing Systems, 2020.
[18] Shu-wen Yang, Po-Han Chi, Yung-Sung Chuang, Cheng-I Jeff
Lai, Kushal Lakhotia, Yist Y Lin, et al., "Superb: Speech
processing universal performance benchmark," arXiv preprint
arXiv:2105.01051, 2021.
[19] Sol`ene Evain, Ha Nguyen, Hang Le, Marcely Zanon
Boito, Salima Mdhaffar, Sina Alisamir, Ziyi Tong, Natalia
Tomashenko, et al., "Lebenchmark: A reproducible frame-
work for assessing self-supervised representation learning
from speech," in Interspeech 2021.
[20] Salima Mdhaffar, Jean-Franc ̧ois Bonastre, Marc Tommasi, Na-
talia Tomashenko, and Yannick Est`eve, "Retrieving speaker in-
formation from personalized acoustic models for speech recog-
nition," in ICASSP, 2022.
[21] Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi,
Ameet Talwalkar, and Virginia Smith, "Federated optimiza-
tion in heterogeneous networks," 2018.
[22] Tian Li, Maziar Sanjabi, Ahmad Beirami, and Virginia Smith,
"Fair resource allocation in federated learning," 2019.
[23] Reza Shokri and Vitaly Shmatikov, "Privacy-preserving deep
learning," in Proceedings of the 22nd ACM SIGSAC Confer-
ence on Computer and Communications Security, New York,
NY, USA, 2015, CCS '15, Association for Computing Machin-
ery.
[24] Daniel J Beutel, Taner Topal, Akhil Mathur, Xinchi Qiu, Javier
Fernandez-Marques, Yan Gao, Lorenzo Sani, Kwing Hei Li,
Titouan Parcollet, et al., "Flower: A friendly federated learning
framework," 2022.
[25] Mirco Ravanelli, Titouan Parcollet, Peter Plantinga, Aku
Rouhe, Samuele Cornell, Loren Lugosch, Cem Subakan, Nau-
man Dawalatabad, et al., "Speechbrain: A general-purpose
speech toolkit," 2021.
[26] Franc ̧ois Hernandez, Vincent Nguyen, Sahar Ghannay, Natalia
Tomashenko, and Yannick Est`eve, "TED-LIUM 3: twice as
much data and corpus repartition for experiments on speaker
adaptation," in Speech and Computer, 2018.
[27] Salima Mdhaffar, Marc Tommasi, and Yannick Est`eve, "Study
on acoustic model personalization in a context of collaborative
learning constrained by privacy preservation," in SPECOM,
2021.
[28] Chung-Cheng Chiu, Tara N Sainath, Yonghui Wu, Rohit Prab-
"State-of-the-art speech recognition with
havalkar, et al.,
sequence-to-sequence models," in ICASSP 2018.
[29] Alex Graves, Santiago Fern ́andez, et al., "Connectionist tem-
poral classification: labelling unsegmented sequence data with
recurrent neural networks," in Proceedings of the 23rd inter-
national conference on Machine learning, 2006.
[30] Yue Zhao, Meng Li, Liangzhen Lai, Naveen Suda, Damon
Civin, and Vikas Chandra, "Federated learning with non-iid
data," 2018.
[31] Chao Huang, Jianwei Huang, and Xin Liu, "Cross-silo feder-
ated learning: Challenges and opportunities," 2022.
[32] Natalia Tomashenko, Xin Wang, Emmanuel Vincent, Jose
Patino, et al., "The VoicePrivacy 2020 Challenge: Results and
findings," Computer Speech and Language, vol. 74, 2022.
[33] Natalia Tomashenko, Brij Mohan Lal Srivastava, Xin Wang,
Emmanuel Vincent, Andreas Nautsch, Junichi Yamagishi,
Nicholas Evans, et al., "Introducing the VoicePrivacy initia-
tive," in Interspeech, 2020.
|
|
http://arxiv.org/abs/2302.10149v1 | 2023-02-20T18:30:54 | 2023-02-20T18:30:54 | Poisoning Web-Scale Training Datasets is Practical | Deep learning models are often trained on distributed, webscale datasets
crawled from the internet. In this paper, we introduce two new dataset
poisoning attacks that intentionally introduce malicious examples to a model's
performance. Our attacks are immediately practical and could, today, poison 10
popular datasets. Our first attack, split-view poisoning, exploits the mutable
nature of internet content to ensure a dataset annotator's initial view of the
dataset differs from the view downloaded by subsequent clients. By exploiting
specific invalid trust assumptions, we show how we could have poisoned 0.01% of
the LAION-400M or COYO-700M datasets for just $60 USD. Our second attack,
frontrunning poisoning, targets web-scale datasets that periodically snapshot
crowd-sourced content -- such as Wikipedia -- where an attacker only needs a
time-limited window to inject malicious examples. In light of both attacks, we
notify the maintainers of each affected dataset and recommended several
low-overhead defenses. | [
"Nicholas Carlini",
"Matthew Jagielski",
"Christopher A. Choquette-Choo",
"Daniel Paleka",
"Will Pearce",
"Hyrum Anderson",
"Andreas Terzis",
"Kurt Thomas",
"Florian Tramèr"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.10149v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.10149v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.CR",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.CR",
"cs.LG"
] | 3
2
0
2
b
e
F
0
2
]
R
C
.
s
c
[
1
v
9
4
1
0
1
.
2
0
3
2
:
v
i
X
r
a
Poisoning Web-Scale Training Datasets is Practical
Nicholas Carlini1 Matthew Jagielski1 Christopher A. Choquette-Choo1 Daniel Paleka2
Will Pearce3 Hyrum Anderson4
Andreas Terzis1 Kurt Thomas1
Florian Tramèr2
1Google
2ETH Zurich
3NVIDIA
4Robust Intelligence
Abstract
Deep learning models are often trained on distributed, web-
scale datasets crawled from the internet. In this paper, we
introduce two new dataset poisoning attacks that intentionally
introduce malicious examples to a model's performance. Our
attacks are immediately practical and could, today, poison
10 popular datasets. Our first attack, split-view poisoning, ex-
ploits the mutable nature of internet content to ensure a dataset
annotator's initial view of the dataset differs from the view
downloaded by subsequent clients. By exploiting specific in-
valid trust assumptions, we show how we could have poisoned
0.01% of the LAION-400M or COYO-700M datasets for just
$60 USD. Our second attack, frontrunning poisoning, targets
web-scale datasets that periodically snapshot crowd-sourced
content-such as Wikipedia-where an attacker only needs
a time-limited window to inject malicious examples. In light
of both attacks, we notify the maintainers of each affected
dataset and recommended several low-overhead defenses.
1 Introduction
Datasets used to train deep learning models have grown from
thousands of carefully-curated examples [20, 33, 41] to web-
scale datasets with billions of samples automatically crawled
from the internet [10, 48, 53, 57]. At this scale, it is infeasible
to manually curate and ensure the quality of each example.
This quantity-over-quality tradeoff has so far been deemed ac-
ceptable, both because modern neural networks are extremely
resilient to large amounts of label noise [55, 83], and because
training on noisy data can even improve model utility on
out-of-distribution data [50, 51].
While large deep learning models are resilient to random
noise, even minuscule amounts of adversarial noise in train-
ing sets (i.e., a poisoning attack [6]) suffices to introduce
targeted mistakes in model behavior [14, 15, 60, 76]. These
prior works argued that poisoning attacks on modern deep
learning models are practical due to the lack of human cura-
tion. Yet, despite the potential threat, to our knowledge no
real-world attacks involving poisoning of web-scale datasets
have occurred. One explanation is that prior research ignores
the question of how an adversary would ensure that their cor-
rupted data would be incorporated into a web-scale dataset.
In this paper, we introduce two novel poisoning attacks
that guarantee malicious examples will appear in web-scale
datasets used for training the largest machine learning models
in production today. Our attacks exploit critical weaknesses
in the current trust assumptions of web-scale datasets: due
to a combination of monetary, privacy, and legal restrictions,
many existing datasets are not published as static, standalone
artifacts. Instead, datasets either consist of an index of web
content that individual clients must crawl; or a periodic snap-
shot of web content that clients download. This allows an
attacker to know with certainty what web content to poison
(and, as we will show, even when to poison this content).
Our two attacks work as follows:
• Split-view data poisoning: Our first attack targets cur-
rent large datasets (e.g., LAION-400M) and exploits the
fact that the data seen by the dataset curator at collection
time might differ (significantly and arbitrarily) from the
data seen by the end-user at training time. This attack
is feasible due to a lack of (cryptographic) integrity pro-
tections: there is no guarantee that clients observe the
same data when they crawl a page as when the dataset
maintainer added it to the index.
• Frontrunning data poisoning: Our second attack ex-
ploits popular datasets that consists of periodical snap-
shots of user-generated content-e.g., Wikipedia snap-
shots. Here, if an attacker can precisely time malicious
modifications just prior to a snapshot for inclusion in a
web-scale dataset, they can front-run the collection pro-
cedure. This attack is feasible due to predictable snap-
shot schedules, latency in content moderation, and snap-
shot immutability: even if a content moderator detects
and reverts malicious modifications after-the-fact, the
attacker's malicious content will persist in the snapshot
used for training deep learning models.
1
We explore the feasibility of both of these attacks in prac-
tice on 10 popular web-scale datasets. We show these at-
tacks are practical and realistic even for a low-resourced at-
tacker: for just $60 USD, we could have poisoned 0.01% of
the LAION-400M or COYO-700M datasets in 2022.
To counteract these attacks, we propose two defenses:
• Integrity verification prevents split-view poisoning by
distributing cryptographic hashes for all indexed content,
thus ensuring that clients observe the same data as when
maintainers first indexed and annotated it.
• Timing-based defenses prevent frontrunning poisoning
by either randomizing the order in which data is snap-
shotted and introduced into web-scale datasets; or de-
laying content prior to its inclusion into a snapshot and
applying reversions from trusted moderators.
We discuss limitations of these defenses (e.g., in the case
of integrity checks, preventing benign modifications such as
re-encoding, re-sizing, or cropping images) and more robust,
future-looking solutions with fewer trust assumptions.
Responsible disclosure. We disclosed our results to the main-
tainers of each of the 10 datasets appearing in this study. Six
of these datasets now follow our recommended implementa-
tion for integrity checks. Additionally, we provided patches
to the most popular web-scale dataset downloader to support
integrity checks. Finally, we have notified Wikipedia about
the frontrunning vulnerability in their data collection process.
2 Background & Related Work
Our work builds on existing knowledge of the risk of poison-
ing web-scale datasets, but focuses on the practical exploit
vectors to launch such an attack. We outline why web-scale
datasets have become of critical importance, known security
risks of web-scale datasets, as well as auxiliary dataset quality
issues that stem from ingesting uncurated data into models.
Momentum towards uncurated datasets. Deep learning is
most effective when applied to large datasets [10, 30]. But
curating such datasets is expensive. Even without manual
labeling, the availability of training data has become a limiting
factor for further improving model utility. For example, the
scaling laws observed in the recent Chinchilla [27] language
model indicate that training a compute-optimal 500 billion
parameter model would require 11 trillion tokens of training
data-over 10× more data than is currently used to train
models of this size [19]. To drastically scale dataset sizes, it
has become common to scrape data from a wider and wider
range of untrusted and uncurated web sources.
Security risk of poisoning attacks. Uncurated training
datasets are prime targets for poisoning attacks [6]. For exam-
ple, an adversary could modify the training dataset ("poison-
ing" it) so that some targeted example will be misclassified
by models trained on this dataset. Early poisoning attacks
were designed to target fully-supervised classifiers [18,24,64]
trained on curated datasets. These attacks often aim to be
"stealthy", by altering data points in a manner indiscernible
to human annotators [74]. Attacks on uncurated datasets do
not require this strong property. Recent work [14, 15] shows
that arbitrarily poisoning only 0.001% of uncurated web-scale
training datasets is sufficient to induce targeted model mis-
takes, or plant model "backdoors" [18, 24].
It is thus known that if an adversary were somehow able to
poison a fraction of a web-scale dataset, then they could cause
significant harm. However, it is not well understood how an
adversary could place their poisoned samples in any common
training dataset without guessing beforehand which parts of
the web will be collected. This paper answers that question.
Auxiliary risks related to data quality. Spending time and
effort to curate datasets has benefits besides security. Possibly
most important among these is that uncurated data has seri-
ous implications for fairness, bias, and ethics [8, 50, 77]. For
example, Birhane et al. [7] note that LAION-400M has "trou-
blesome and explicit images and text pairs of rape, pornog-
raphy, malign stereotypes, racist and ethnic slurs, and other
extremely problematic content". Many language datasets also
contain similarly harmful "hate speech and sexually explicit
content, even after filtering" [40].
Dataset curation is not a perfect solution to these problems.
Birhane et al. [7] note, "without careful contextual analysis,
filtering mechanisms are likely to censor and erase marginal-
ized experiences". Any filtering approaches that selectively
remove some data sources over others should carefully con-
sider not only the security implications of doing this, but also
other more general data quality metrics.
3 Threat Model & Attack Scenarios
Before presenting the implementation details of our attacks,
we introduce key terminology, our threat model, and a high-
level description of the intuition behind our two attacks.
3.1 Terminology
Because it is infeasible to distribute web-scale datasets as
standalone artifacts (due to the dataset size or regulatory con-
cerns), current training datasets fall into one of two categories.
In the first category, a maintainer generates a set of N tu-
ples {(urli, ci)}N
i=1 consisting of a resource identifier urli and
auxiliary data ci (typically a label). We let ti denote the time at
which the i-th sample was originally collected. Critically, the
maintainer does not provide a snapshot of the data associated
with urli, due either to untenable storage costs [3,4,17,31], pri-
vacy concerns [13, 72], or copyright limitations [16]. As such,
we refer to these as distributed datasets. One example is the
LAION-5B dataset [57] which consists of five billion tuples of
2
image URLs and corresponding text captions-corresponding
to several hundred terabytes of data.
In the second category of datasets, a curator produces a
snapshot of a dataset {xi}N
i=1, where each sample xi is drawn
from a set of URLs {urli}N
i=1 at time ti, and then makes this
snapshot publicly available. Because data served by these
URLs changes over time, the curator will frequently (e.g.,
monthly) re-collect a dataset snapshot so that users have an
up-to-date view of the data. We refer to these as centralized
datasets. For example, both Wikipedia and Common Crawl
regularly produce snapshots of their entire database. This
simplifies access for people training large models, while also
discouraging researchers from re-scraping the database di-
rectly.
Once one of these two types of datasets has been published,
a client (e.g., a researcher or applied practitioner) downloads
a local copy of the training dataset D, either by crawling each
URL for decentralized datasets {(urli, ci)}N
i=1 at a future time
i > ti, or by downloading the centralized dataset {xi}N
t(cid:48)
i=1. In
practice, clients often use a downloader tool developed and
maintained by a third party.
3.2 Threat Model
We assume the existence of a relatively unskilled, low-
resource adversary who can tamper with the contents of a
small number of URLs {urli}N
i=1 at some point in time ˆti,
such that when a client or curator accesses resource i at a
future time t(cid:48)
i > ˆti, they receive a modified (poisoned) dataset
D (cid:48) (cid:54)= D. The difference between the poisoned and intended
datasets must be sufficiently large such that a model f trained
on D (cid:48) will produce poisoned results for some desired input.
We let Sadv ⊂ {urli}N
i=1 denote the set of URLs an adversary
can modify.
We assume the adversary has no specialized or insider
knowledge about the curator, downloader, or maintainer other
than knowledge of the set of URLs {urli}N
i=1 used to generate
D (this information is published by the dataset maintainer
or curator). We further assume all maintainers, curators and
downloaders behave honestly and do not assist the adversary
in any way. As such, the adversary has no control over the
auxiliary data ci (e.g., supervised labels or text descriptions),
nor can they add or remove any URLs from the training data
that will be crawled by a client or curator.
We make two critical (yet realistic) assumptions that enable
our attacks. For distributed datasets, we assume that clients do
not compare the cryptographic integrity of the local dataset
copy D (cid:48) that they downloaded, with the original dataset D
indexed by the maintainer. For centralized datasets, we as-
sume that it takes the curator at least some time ∆ to detect
malicious changes to the content hosted at any URL urli in
the dataset (e.g., for Wikipedia, ∆ is the time it takes to revert
a malicious edit). Thus, the curator cannot detect that urli
hosts poisoned content if the attacker poisoned the content
at any time ti − ∆ ≤ ˆti ≤ ti, where ti is the time at which the
content of urli is included in the dataset snapshot. As we will
show, these assumptions holds true for nearly all modern web-
scale datasets. We discuss (in Section 6) how invalidating
these assumptions-via cryptographic integrity checks and
randomized crawling-can mitigate the attacks we describe.
3.3 Attack Scenarios
We propose two attack strategies for poisoning recent web-
scale datasets. In the subsequent sections we demonstrate the
efficacy of these attacks in practice on real-world datasets,
and describe the ethical safeguards we followed to minimize
harm. We focus our attacks on mechanisms that are unique
to our study of dataset poisoning. Other potential security
vulnerabilities (e.g., the ability of an adversary to interfere
with unencrypted network requests from clients, or to exploit
website vulnerabilities to inject new content) are out of scope
and would only improve our attack success rates.
Split-view poisoning. Our first attack exploits the fact that
while the index of a distributed dataset published by a main-
tainer cannot be modified, the content of URLs in the dataset
can.1 This allows an adversary who can exert sustained con-
trol over a web resource indexed by the dataset to poison the
resulting collected dataset collected by the end-user.
The specific vulnerability we exploit in our attack results
from a fairly simple observation: just because a web page
hosted benign content when the dataset was initially collected,
this does not mean the same page is currently hosting benign
content. In particular, domain names occasionally expire-
and when they do, anyone can buy them. We show that domain
name expiration is exceptionally common in large datasets.
The adversary does not need to know the exact time at which
clients will download the resource in the future: by owning
the domain the adversary guarantees that any future download
will collect poisoned data.
We note that attackers already routinely buy expired do-
mains to hijack the residual trust attached with these do-
mains [35, 39, 67]. Attackers have in the past targeted residual
trust to defunct banking domains [44] and imported JavaScript
libraries [47] to serve malware or steal user data, to take over
email addresses associated with the domain [56], to control au-
thoritative nameservers [39], or simply to serve ads [36]. Here,
we abuse residual trust to poison distributed datasets. While
more sophisticated attacks may accomplish the same goal-
such as exploiting a website, coercing a website's owner to
modify content, or modifying unencrypted network traffic
in flight-we focus on the natural phenomenon of domain
expiration in this work.
To select domains to purchase, the adversary can either pri-
oritize cheap domains that host multiple URLs in the dataset
1Put differently, there is an important difference between the C types
"int const *" (how practitioners often treat these URL-based datasets) and
"int * const" (what the dataset actually provides).
3
(minimizing the cost per poisoned URL), or domains that
host content with specific auxiliary data ci (recall that the
adversary cannot modify the auxiliary data contained in the
distributed dataset index). We show that split-view poison-
ing is effective in practice, as the index of most web-scale
datasets remain unchanged long after their first publication,
even after a significant fraction of the data goes stale. And
critically, very few (and no modern) datasets include any form
of cryptographic integrity check of the downloaded content.
Frontrunning poisoning. Our second attack extends the
scope of split-view poisoning to the settings where an ad-
versary does not have sustained control over web resources
indexed by the dataset. Instead, the adversary can only mod-
ify web content for a short time period (e.g., a few minutes)
before the malicious modification is detected.
This setting is common for datasets that aggregate content
published on crowdsourced web pages, such as on Wikipedia.
Indeed, it is easy to temporarily edit Wikipedia to vandalize its
contents [63, 69]. A naive adversary might thus poison some
Wikipedia content at arbitrary times and hope that a dataset
curator will scrape the poisoned pages before the malicious
edits are reverted. However, Wikipedia vandalism is reverted
in a few minutes on average [80], so any randomly-timed
malicious edits are unlikely to affect a dataset collection.
Our frontrunning attack relies on the fact that an adver-
sary can, in some cases, predict exactly when a web resource
will be accessed for inclusion in a dataset snapshot. As a re-
sult, the adversary can poison dataset contents just prior to a
curator collecting a snapshot, thereby frontrunning content
moderators who will later revert the malicious edits. We will
show that frontrunning attacks are particularly effective for
Wikipedia datasets, because the official Wikipedia snapshot
procedure accesses articles in a predictable-and well docu-
mented2-linear sequence. An attacker can thus predict the
snapshot time ti of any Wikipedia article down to the minute.
4 Split-View Data Poisoning
We now begin our evaluation starting with split-view data
poisoning attacks, where an attacker poisons a distributed
dataset by purchasing and modifying expired domains.
4.1 Our Attack: Purchasing Expired Domains
While split-view poisoning is applicable to any distributed
dataset, we focus on multimodal image-text datasets. In such
datasets, each URL points to an image hosted by some data
provider, and the auxiliary data contains a textual descrip-
tion of the image, e.g., an annotated class label or a caption
extracted from the web page.
2https://en.wikipedia.org/w/index.php?title=Wikipedia:
Database_download&oldid=1138465486
Our attack exploits the fact that the Domain Name System
(DNS) does not assign permanent ownership of any domain
to a particular person or organization, but rather grants short
(yearly) "leases" that must be frequently renewed. Thus, do-
main names continuously expire over time-intentionally or
not-when the re-registration fees are not paid.
When the domain that hosts an image in a distributed
dataset expires, anyone can pay to take ownership over this
domain and thereby gain the ability to return arbitrary con-
tent when the indexed image is later downloaded by a victim
client. Split-view poisoning abuses the residual trust inherent
in an expired domain, as in traditional domain hijacking at-
tacks [39]. We find that for many popular distributed datasets,
domains are included with relatively lax quality-assurance
measures (if any), and thus domains with no special status
that have been expired for months can freely be acquired to
control a modest fraction of the entire dataset.
In this section we study to what extent it is possible to poi-
son datasets by purchasing expired domains. We first quantify
the fraction of domains that are expired in popular distributed
datasets (§ 4.2), then measure the frequency at which these
datasets are scraped (§ 4.3), verify this attack is not currently
exploited in the wild (§ 4.4) and finally study the attack's
potential down-stream impact (§ 4.5).
4.2 Quantifying the Attack Surface
Table 1 lists ten recent datasets we study in this paper that are
vulnerable to split-view poisoning. The three oldest datasets
(PubFig, FaceScrub, and VGG Face) are datasets of faces and
associate each image with the identity of a single person (most
often a popular celebrity). The remaining seven datasets are
multimodal datasets containing URLs that point to images,
along with textual captions automatically extracted from the
HTML of the webpage. As such, for these datasets, the image
can be modified by the owner of the corresponding domain,
but the image's caption is fixed in the dataset index.
To measure the fraction of images that could be potentially
poisoned, we count the number of images hosted on domains
that are expired and buyable. We say that a domain is expired
if the DNS record for that domain does not exist. To measure
this, we perform an nslookup on every domain name in the
dataset from two geographically distinct data-centers in May
2022 and August 2022 and report the domain as expired if all
four lookups result in a NXDOMAIN response.
We further call a domain buyable if it is expired, and if at
least one domain name registrar listed the domain as explicitly
for sale by the registrar3 in August 2022. Instead of counting
the total fraction of data that is buyable (which would repre-
sent a financially unconstrained adversary), Table 1 reports
the fraction of images in the dataset from domains that can be
3Some registrars list domains as for sale even if they are actually owned
by a squatter. We exclude these domains from our set of buyable domains
because purchasing these domains is often an expensive and lengthy process.
4
Dataset name
Size Release Cryptographic
(×106) date
hash?
Data from
expired domains
Data buyable Downloads
for $10K USD per month
2022
2323
LAION-2B-en [57]
2022
LAION-2B-multi [57]
2266
2022
LAION-1B-nolang [57] 1272
2022
747
COYO-700M [11]
2021
408
LAION-400M [58]
2021
12
Conceptual 12M [16]
2018
3
CC-3M [65]
2.6
VGG Face [49]
2015
0.10 2014
FaceScrub [46]
0.06 2010
PubFig [34]
(cid:55)†
(cid:55)†
(cid:55)†
(cid:55)‡
(cid:55)
(cid:55)
(cid:55)
(cid:55)
(cid:51)§
(cid:51)§∗
0.29%
0.55%
0.37%
1.51%
0.71%
1.19%
1.04%
3.70%
4.51%
6.48%
≥ 0.02%
≥ 0.03%
≥ 0.03%
≥ 0.15%
≥ 0.06%
≥ 0.15%
≥ 0.11%
≥ 0.23%
≥ 0.79%
≥ 0.48%
≥7
≥4
≥2
≥5
≥10
≥33
≥29
≥3
≥7
≥15
Table 1: All recently-published large datasets are vulnerable to split-view poisoning attacks. We have disclosed
this vulnerability to the maintainers of affected datasets. All datasets have > 0.01% of data purchaseable (in 2022),
far exceeding the poisoning thresholds required in prior work [14]. Each of these datasets is regularly downloaded,
with each download prior to our disclosure being vulnerable.
† LAION-5B released a "joined" version of this dataset with a cryptographic hash over the text of the URL and Caption (not the contents of the
URL), and as such does not protect the integrity of the actual image.
‡ COYO-700M images are distributed with pHash [32] which validates benign image changes, but is not adversarially robust [29].
§ FaceScrub and PubFig contain cryptographic hashes, but the dataset maintainers do not provide an official downloader client that verifies
these. We find that nearly all third-party downloaders for these datasets ignore hashes.
∗ PubFig was initially released without hashes, but hashes were later added in Version 1.2 of the dataset.
purchased for a total cost of $10,000 USD. (Figure 1 plots the
fraction of datasets that can be purchased as a function of total
cost.) To compute this, we sort domains in decreasing order of
"images per dollar": the number of images the domain hosts
divided by the cost to purchase this domain.
Overall, we see that an adversary with a modest budget
could purchase control over at least 0.02%–0.79% of the im-
ages for each of the 10 datasets we study. This is sufficient
to launch existing poisoning attacks on uncurated datasets,
which often require poisoning just 0.01% of the data [15].4
We also find that there is a direct relationship between the
age of a dataset and how easy it is to poison. Older datasets
are more likely to contain expired domains, and therefore an
adversary can purchase a larger fraction of the dataset.
Datasets are vulnerable from day zero. One limitation of
our above analysis is that we have measured the fraction of
datasets vulnerable to poisoning in August 2022, but many of
these datasets were constructed years earlier. It is therefore
likely that many people who use these datasets would have
already downloaded them at an earlier date, and thus may not
have been vulnerable to our poisoning attack (although we
will show in the following section that fresh downloads of
each of these datasets remain frequent today).
Fortunately, the COYO-700M dataset was released during
the writing of this research paper, on 30 August 2022. On
that same day, we computed the fraction of the dataset that
4Carlini & Terzis [15] assume the adversary can modify images and their
captions, whereas our adversary only controls images. In § 4.5, we show
modifying captions is unnecessary for a successful poisoning attack.
was vulnerable to our poisoning attack and found that already
0.15% of the images were hosted on expired domains that
cost fewer than $10,000 USD to purchase. The reason that
the number of expired domains is not zero on release is that
building these large datasets is a time-consuming and expen-
sive procedure. And so even though the COYO-700M index
was released in August 2022, it took nearly a year to collect
the dataset [11], giving ample time for the earliest scraped
domains to have expired before the dataset was released.
Measuring the attack cost. The most immediate question
is if this attack can be realized in practice. The primary con-
straint of our attack is the monetary cost of purchasing do-
mains, which we measure using the costs reported by Google
Domains in August 2022. In Figure 1 we show the fraction of
images in a dataset that can be controlled by the attacker as a
function of their budget. We find that at least 0.01% of each
dataset can be controlled for less that $60 USD per year.
4.3 Measuring the Attack Impact
Our attacks are "retroactive" in the sense that we can poison a
dataset after it has been initially constructed by the curators-
but the impact is limited to those who download it after we
take over the domains. And given that it has been several
years since many of these datasets were initially constructed,
it is not obvious that anyone would still download them by
scrapping URLs instead of reusing a previously downloaded
version of the dataset. As a result, in order to measure the
potential impact of a split-view poisoning attack it is necessary
5
under our control, including at least one URL from each
of the 6 domains we own for that dataset.
2. Precision: At least 50% of the requests issued by X
within this time range to the domains we control are to
URLs in D.
These conditions are conservative, but ensure we filter out
web crawlers and other mass internet scrapers because these
are likely to crawl other URLs from this domain (violating the
precision constraint) or not crawl the majority of the URLs
from the dataset (violating the recall constraint). Additionally,
because we own six domains per dataset it is exceptionally
unlikely that, by random chance alone, one particular IP will
request URLs from each of these six otherwise-unrelated
domains. (In fact, we find that even checking 3 of these URLs
would give almost identical precision.) As a point of reference,
for the CC-3M dataset, we received 51,000 image requests
per month from a total of 2401 unique IPs. By applying the
precision constraint alone, we reduce this to 2007 unique IPs
and 43,000 image requests; by applying the recall constraint
alone we get 70 unique IPs and 32,000 image requests; and
both together yields a further reduction of 64 unique IPs and
28,000 image requests (per month).
4.3.1 Results
We report our results in the rightmost column of Table 1. Even
the oldest and least frequently accessed datasets still had at
least 3 downloads per month. Thus, over the six months we
tracked data, there were over 800 downloads that we could
have poisoned with our attack. Unsurprisingly, we found that
newer datasets are requested more often than older datasets.
Different datasets thus offer different tradeoffs for attackers:
newer datasets have a smaller fraction of purchasable images,
but an attack can reach many more vulnerable clients.
We observe that the largest billion-image datasets are down-
loaded significantly less often than smaller recent datasets.
We found that the reason for this is that these datasets are
rarely downloaded in their entirety; instead, they serve as an
upstream source for smaller subsets. For example, the Public
Multimodal Dataset (PMD) [66] and LAION-Aesthetics [59]
datasets consist almost entirely of images drawn from LAION-
2B-en. Sub-datasets like this explain why sometimes we see
IP addresses with very high precision but low recall.
Visualizing dataset crawlers. Using our log files, we can
visualize the ways in which dataset downloaders access these
datasets by plotting URL requests as a function of time. We
order the set of URLs we bought for each dataset according to
their order in the original dataset index. In this way, crawlers
that process the dataset index linearly should appear (roughly)
as a linear line in our plot of URL requests over time. To
improve clarity, we assign each unique IP that accesses our
server a separate random color.
Figure 1: It often costs ≤ $60 USD to control at least 0.01%
of the data. Costs are measured by purchasing domains in
order of lowest cost per image first.
to study the rate at which these datasets are actually still being
actively downloaded by researchers and practitioners today.
Methodology. We measure the rate at which each of these
distributed datasets are downloaded from the internet by pur-
chasing multiple expired domains from each of the 10 listed
datasets, and passively monitoring requests to measure the
rate at which URLs corresponding to images from the dis-
tributed datasets are being downloaded.
For each dataset, we purchase the three most popular ex-
pired and buyable domains (that is, the domains available for
purchase that hosted the most images), and three randomly
selected domains that were available for purchase. We wrote
a simple server to log all incoming HTTP and HTTPS5 re-
quests, including the access time, a hash of the IP address,
the full URL being requested, and any additional headers
provided. This allowed us to count the frequency at which
these datasets are still downloaded. We ran this server for six
months beginning in August 2022.
Analysis approach. Our server received approximately 15
million requests per month during our study, a rate of 6 re-
quests every second. However from here it becomes necessary
to separate the requests that were actually intending to down-
load images from one of these datasets, from requests that
come from other internet users or web crawlers.
To begin our analysis, we make a (significant) simplifying
assumption that anyone downloading one of these datasets
does so from a single IP address. We may thus underestimate
the true rate at which each dataset is downloaded. We then say
that a particular IP address X downloads a dataset D at time
[T0, T1] if we meet both a precision and recall requirement:
1. Recall: Within the time range [T0, T1], the IP address
X downloads at least 90% of the URLs contained in D
5To also monitor HTTPS traffic we obtained certificates from LetsEncrypt
for each of our domains.
6
$10$100$1k$10kCost (USD)0.01%0.1%1%Fraction of Images ControllableCOYO-700MLAION-400MCC12MCC3Mvggfacefacescrubpubfigfrom crawling our domains-this is unlikely to impact dataset
downloads since dataset crawlers ignore this file. Finally, a
request to the root domain returns a 403 Forbidden with a
response body explaining that this domain is part of a research
study. In this response we list a contact email address and
also offer to return this domain to the original owner in case
it was allowed to expire accidentally. We have not received
any contact on this address. Appendix E contains the text of
our landing web page.
Our data collection is minimally invasive. When searching
for expired domains, we limit our DNS requests to 500/second,
we only ask for the cost of purchasing the top-10,000 domains
in each dataset, and only eventually purchase six.
This research study was deemed "exempt" by the ETH
Zurich IRB. Google does not have an IRB, but the research
plan was reviewed by experts at Google in areas including
ethics, human subjects research, policy, legal, security, privacy,
and anti-abuse.
4.4
Is This Attack Exploited in the Wild?
Given that this attack vector has existed for years against
many datasets, and is easy to execute, it is not implausible
that someone would have carried out such a poisoning attack
in the past. Yet, we could not find any evidence of this.
We search for a signature of a domain-purchasing attack
by looking for domains that (1) host images that have been
modified since the initial dataset release and (2) have changed
ownership since the initial dataset release. To detect image
changes, we can either check if images are perceptually simi-
lar to the originals (via, e.g., CLIP embeddings [52]) or exactly
identical (via a cryptographic hash). Comparing images with
cryptographic hashes has no false-negatives (i.e., any change
is detected) but gives false-positives for "benign" changes,
e.g., if a domain re-encodes or resizes its images. In contrast,
a perceptual hash has fewer false-positives but can have false-
negatives if an adversary buys a domain and modifies images
while preserving the perceptual hash (which is not collision-
resistant). Finally, to detect if a domain changed ownership,
we request the whois record and check the last purchase date.
Results. We perform our initial analysis on CC3M, a dataset
where we have the original raw images as ground truth.
Among all domains hosting more than 10 images, we find just
one domain has our attack signature when comparing with
perceptual image similarity. Upon further investigation, we
find that this domain has been purchased by a domain squat-
ter and any request to an image file on the domain return an
advertisement. If we instead compare cryptographic hashes
of images, we find the same domain squatter and also two
other domains that have been repurchased. However, further
investigation reveals the ownership of these domains has not
changed and the DNS record simply lapsed, and images were
re-encoded.
Figure 2: Visualization of users downloading Conceptual
12M. By monitoring which URLs are requested from the
domains we purchased, we plot every time a URL is requested
over time, color coded by the source IP, and can directly read
off several dozen users crawling Conceptual 12M. Appendix
Figure 8 compares various filtering approaches.
We show this plot for the Conceptual 12M dataset in Fig-
ure 2. We can find several trends in this data. First, most users
who download this dataset do so in a linear order from the
first to the last URL. However, the rate at which URLs are
accessed is highly variable: some downloaders crawl the en-
tire dataset in a few hours, while others take several weeks to
download the same dataset. We also observe some users that
batch the data into chunks and download each chunk in paral-
lel, as well as users that pause their download momentarily
and then resume a few hours later (on a different IP).
While our strict precision and recall requirements already
give strong evidence that the IP addresses we logged were
indeed downloading the dataset, the linear ordering of URL
requests from these addresses all but confirms this. Indeed,
because the ordering of URLs in the dataset index is random
(instead of, say, alphabetical), a dataset download appears to
be the only explanation for why the URLs would be linearly
accessed in this particular order.
User-agent verification. The most popular user agent6 is re-
sponsible for 77% of the traffic to our domains. This user
agent is hardcoded7 in img2dataset tool [5], a popular
dataset crawler. Given the browser involved is Firefox 72–
which was superseded in February 2020–it is highly likely
that most of the requests indeed originate from img2dataset.
Ethical considerations. We do not actually poison any
datasets. For all URLs we own, we return a 404 Not Found
response; so from the perspective of a dataset downloader our
purchasing of the domain is completely transparent. We fur-
ther place a robots.txt file to prevent typical web-scrapers
6Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0)
Gecko/20100101 Firefox/72.0
7https://github.com/rom1504/img2dataset/blob/fc3fb2e/
img2dataset/downloader.py#L41
7
2022-08-112022-08-132022-08-15Date02000400060008000Index of URL accessedWe also conduct this same analysis on LAION-400M. Here
we study three versions of the data: at original release (2021-
11), and our own downloads at two later dates (2022-04 and
2022-08). We find no domain with such a signature in LAION-
400M, and thus have no evidence at present that this attack
would have been exploited against this dataset. Because we
only have the original CLIP embeddings for this dataset (the
original raw bytes were not saved), we only perform this
comparison. We find that by the first and second snapshot
respectively, there are 4.1M and 4.2M unique domains (of
5.6M) that host at least one modified image-in total, we
found 175M and 183M modified images, respectively. We
measured this using a CLIP cosine similarity < 0.99. We
randomly sample a few thousand domains including the 700
with the most modified images. We find many cases where
domains are still owned by the original owner, are currently
for sale, or have been redacted, but none appear malicious.
4.5 Putting It All Together
Prior work [15] has successfully poisoned multimodal models
contrastively trained on datasets of 3 million images, under the
assumption the adversary can arbitrarily control the label of
manipulated images. However, in this paper we study datasets
over 100× larger, and assume an adversary with no control
over the text captions. Are poisoning attacks effective with
these two changes?
We find they are. We consider two poisoning attack ob-
jectives: (1) cause a particular image to be misclassified as
some target label from ImageNet, and (2) cause a particu-
lar image to be classified as NSFW by the Stable Diffusion
Safety Filter [54]. For each of these attack objectives, we first
identify appropriate text captions in LAION 400M for which
the corresponding image domains can be purchased for a total
of $1,000 USD. Then, we locally replace these images with
poisoned samples to simulate the effect of an attack, without
any potential to cause harm to others.
Specifically, we train one OpenCLIP [28] model using a
ViT-B-32 architecture for 32 epochs, at a batch size of 3072
on 16 A100 GPUs. For our object-misclassification objective,
we choose ten ImageNet classes that appeared in multiple text
captions of images we can control. When we poison 1,000
images (0.00025% of the total dataset) our attack has a success
rate of 60% in flipping the model's zero-shot classification of
the targeted image. For our NSFW objective, we find captions
corresponding to images (from buyable domains) labeled as
UNSAFE in the LAION 400M dataset index. Again at 1,000
poisoned samples, our attack has a success rate of above 90%.
More details about this experiment are in Appendix D.
5 Frontrunning Poisoning
Our second attack removes the assumption that the adversary
has sustained control over the web data in a training set. To do
this we make a new assumption: that we can predict precisely
when the web content will be downloaded. We will investigate
this attack on Wikipedia-derived datasets, but also discuss
how similar vulnerabilities may exist in the Common Crawl
dataset in Appendix B.
5.1 Our Attack: Editing Wikipedia
Wikipedia is a crowdsourced encyclopedia. This makes it
one of the most comprehensive and reliable datasets available
on the internet [79]. As a result of its quality and diversity,
Wikipedia is frequently sourced for ML training data. Indeed,
many language modelling datasets heavily rely on the English
Wikipedia, e.g., it formed over 75% of the words in the BERT
training set [21], 1.5% of the Pile dataset [23], and the entirety
of the WikiText dataset [43]. Many task-specific datasets also
rely on the English Wikipedia: e.g., the WikiQA [81] question
answering dataset (30,000+ downloads), and the WikiBio [38]
biography writing dataset (19,000+ downloads). Finally, some
of the distributed datasets discussed in Section 4 index many
images from Wikipedia articles.
Because Wikipedia is a live resource that anyone can edit,
an attacker can poison a training set sourced from Wikipedia
by making malicious edits. Deliberate malicious edits (or
"vandalism") are not uncommon on Wikipedia, but are often
manually reverted within a few minutes [80]. As a result,
actually poisoning Wikipedia appears challenging: unlike
the attacks in our prior section, an adversary cannot exert
sustained control of any particular page and would thus have
to hope that their malicious edit is timed just perfectly to
affect a dataset download before being reverted.
However, we make one key observation that will guaran-
tee the success of our poisoning attack: Wikipedia-derived
datasets are not themselves live, but rather a collection of
static snapshots. This is because Wikipedia forbids using web
crawlers to scrape the live website. Instead, Wikipedia makes
available regular "dumps" (or snapshots) of the entire ency-
clopedia. Thus, training datasets sourced from Wikipedia use
these snapshots instead of data crawled directly from the site.
For example, the authors of the BERT model [21] explicitly
recommend "to download the latest [Wikipedia] dump" to
reproduce their results.
This makes it possible to mount what we call a frontrun-
ning attack. An attacker who can predict when a Wikipedia
page will be scraped for inclusion in the next snapshot can
perform poisoning immediately prior to scraping. Even if the
edit is quickly reverted on the live page, the snapshot will con-
tain the malicious content-forever. The attentive reader may
argue we have not gained much: instead of having to predict
the time at which Wikipedia is crawled by the end-user to
produce a training set, the attacker has to predict the time at
which Wikipedia is crawled to produce an official snapshot.
But as we will see, the latter is actually easy.
In this section, we explore how an adversary can time mali-
8
that were made before (i.e., below) a different edit that was
not included (in orange).
For a frontrunning attack to succeed, it is thus not sufficient
to just predict the time at which the snapshot procedure begins.
The attacker also needs to predict the precise time at which
each individual page is scraped.
5.2.2 Exploiting Rolling Snapshots
To precisely predict each article's scrape time, the attacker
can exploit consistencies in Wikipedia's snapshot process.
First, the adversary knows precisely when each dump starts,
because Wikimedia explicitly makes this information avail-
able by publishing live statistics on ongoing snapshots.8
Second, the rate at which articles are crawled in a dump
remains nearly consistent across dumps, and can thus be ap-
proximated from prior dumps (interestingly, crawls tend to
speed up slightly over time).
With these two pieces of information, the attacker can pre-
cisely predict when any given article will be crawled. For
an article i, we denote the time at which it is crawled for
the current snapshot as ti and its crawl time in the previous
snapshot as ti,prev. We denote the start time of the current and
previous snapshots (as reported by Wikimedia) as t0 and t0,prev
respectively. Due to our first observation above, the attacker
knows t0 and t0,prev. Due to our second observation, we have
that ti − t0 ≈ ti,prev − t0,prev. This allows us to estimate the
snapshot time of the i-th article as ti ≈ t0 + (ti,prev − t0,prev).
But calculating this requires knowledge of ti,prev-the time at
which the i-th article was crawled in the previous snapshot.
We now discuss how to retroactively estimate this.
5.2.3 Determining the Article Snapshot Time
Wikipedia snapshots do not explicitly list the snapshot time
for each article. But Wikipedia does give some auxiliary in-
formation: a complete list of edits with the precise time every
edit is made. We show how this information can be used to
retroactively estimate an article's snapshot time.
Recall from Figure 3 that for each article we can find the
list of edits that were included in the current snapshot (blue
points), with later edits appearing in the next snapshot (or-
ange points). For each article, we thus know that the snapshot
time ti was somewhere between the times of the article's last
included edit (top-most blue point) and the first non-included
edit (bottom-most orange point). However, this interval is
loose: the time between these edits is often several days.
To refine our estimate of the snapshot time for each article,
we can again exploit the consistency present in the Wikipedia
crawling process. We observe that articles are processed se-
quentially: by zooming in to just a single crawling job as
shown in Figure 3, we see that articles are crawled sequen-
tially, and a clear line separates the last-included and first-
8On https://dumps.wikimedia.org/backup-index.html
Figure 3: An adversary can easily predict when any given
Wikipedia article will be snapshot for inclusion in the bi-
monthly dump. We visualize edits around the June 1st, 2022
Wikipedia snapshot. Each point corresponds to an edit made
to a Wikipedia article, with the article ID on the X axis and
time (in seconds) that the edit was made on the Y axis. Edit
points colored blue were included in the snapshot, and edits
colored orange were not included. The "sawtooth" pattern
exhibited in the plot indicates a trend where multiple paral-
lel jobs crawl Wikipedia articles sequentially to construct the
snapshot. Furthermore, these parallel jobs run almost perfectly
linearly through their allocated pages.
cious edits to guarantee successful poisoning of a Wikipedia
snapshot. To this end, we need to answer two questions:
1. How accurately can we predict the time at which a page
is scraped for inclusion in a Wikipedia snapshot?
2. How quickly do malicious edits get reverted?
5.2 Predicting Checkpoint Times
Wikipedia produces snapshots using a deterministic, well-
documented protocol (with details that are easy to reverse-
engineer through inspection). This makes it possible to predict
snapshot times of individual articles with high accuracy.
5.2.1 How Wikipedia Snapshots Work
English Wikipedia is archived on the 1st and 20th of each
month. The snapshot is produced by n parallel workers; all
Wikipedia articles are ordered sequentially by their ID and
split into n chunks, and each worker independently and lin-
early scrapes all articles in their chunk.
Due to Wikipedia's size, the whole process takes nearly
a day to complete. Different articles thus get scraped at sig-
nificantly different wall-clock times. As a result an edit at
time ti for one article may be excluded from the snapshot,
while an edit at time t j > ti for a different article might be
included. Figure 3 visualizes this "sawtooth" effect: there are
many edits (in blue) that are included in the June 1st dump
9
Figure 4: We can obtain tight estimates on the time at which
each article is snapshot. The green and orange lines show the
interval [tlow
i,prev] for a range of articles from the English
Wikipedia. On average, our predictions (blue line) are 27
minutes from the furthest interval boundary.
i,prev,thigh
Figure 5: Distribution of Wikipedia checkpoint time predic-
tion errors. Most predicted checkpoint times are within 30
minutes of our constructed ground truth. In general, we pre-
dict edits too early, so it is important to later adjust for this
bias, as we will discuss in Section 5.4.
not-included edits of each article. That is, for articles i and
j processed in the same job, we have that ti < t j if i < j. We
can thus tighten our interval around each article's edit time
by continually tracking the most recent edit made before the
snapshot (for each article, this is the top-most blue edit made
on an earlier article in that job), as well as the earliest edit
among all subsequent articles in the job that was not included
in the snapshot. We visualize this in Figure 4. For each article
in the previous snapshot, we can thus obtain a time interval
i,prev,thigh
[tlow
i,prev] that contains the true (but unknown) snapshot
time ti,prev. By our construction outlined above, we guarantee
that the lower and upper limits of these intervals monotoni-
cally increase for all articles in a job (see Figure 4).
To produce an estimate ˆti,prev for each article's previous
snapshot time, we compute a best linear fit for the snapshot
intervals of all articles processed by a single thread, as il-
lustrated in Figure 4. This lets us predict the article's next
snapshot time as ˆti ≈ t0 + (ˆti,prev − t0,prev).
5.2.4 Evaluating our Predictions
We now evaluate our procedure for estimating article snapshot
times. Ideally, we would directly compare our predicted snap-
shot times ˆti with the true snapshot time of the i-th article. But
we do not know the ground truth, except up to some interval
[tlow
] which we can compute a posteriori as described
i
above. We thus proceed in two steps.
,thigh
i
First, we show that our linear fit to estimate the previous
snapshot time ˆti,prev is accurate. For this we measure the max-
imum absolute error between the predicted time ˆti,prev, and
the unknown ground truth in the interval [tlow
i,prev]. This
provides an upper bound on the true estimation error. We find
that the estimation error is bounded by 27 minutes on average.
i,prev,thigh
Second, we evaluate the accuracy of the extrapolation of
our predictions from one snapshot to the next. That is, we
evaluate how close our a priori predicted snapshot time ˆti :=
t0 + (ˆti,prev −t0,prev) is to the snapshot time that we could have
estimated a posteriori using the linear fit described above.
Figure 5 shows the distribution of the error estimates. Our
predictions are correct to within roughly 30 minutes in most
cases. We notice, however, that our extrapolation errors are
biased towards negative. We find that this is because snapshots
slightly speed up over time, so we typically overestimate the
next snapshot time of an article. We will correct for this in
Section 5.4, when we produce a conservative estimate of our
attack's success in poisoning Wikipedia snapshots.
5.3 Estimating Revision Speed
Now that we have measured how accurately we can predict
when a future snapshot will happen, we turn our attention
to measuring the size of the opportunity window to make a
malicious edit before it is reverted.
We remark that while the most accurate methodology
would be to inject malicious edits and measure the distri-
bution of reversion times, we believe this would be unethical.
Instead, we take an entirely passive-albeit less accurate-
approach as discussed in Section 5.6.
To measure the speed of revisions, we construct a dataset
of all edits made to Wikipedia from January 2021 to June
2022 (for a total of 18 months), and classify every edit as
either an addition or as a reversion if they contain one of a
fixed set of strings9 which are frequently used in reversion
comments. We then conservatively assume that the edit being
9This set of strings is produced by manual analysis of a sample of com-
ments from each Wikipedia; details are given in Appendix B.1.
10
4.04.14.24.34.4Article ID1e72.7002.7052.7102.7152.7202.725Edit Time (s)1e630002000100001000Prediction Error (s)050010001500200025003000Number of Pagesti of the i-th article, and ˆti is the predicted snapshot time.
To balance the two failure modes above, and to account for
the bias in our predictions (see Section 5.2.4), we introduce
an "adjustment" variable a so that the adversary adds their
malicious edits at time ˆti + a instead of exactly at time ˆti.
Then the fraction of malicious Wikipedia edits that will
make it into the snapshot, when they are made at time ˆti + a,
can be lower-bounded as:
A(a) =
1
|D| ∑
i∈D
(1 −
Edit applied too early
(cid:123)
(cid:125)(cid:124)
(cid:122)
prev(ˆti + a;thigh
)) * (1 − 1[ˆti + a > tlow
]
(cid:124)
(cid:125)
(cid:123)(cid:122)
Edit applied too late
i
i
) ,
Figure 6: A CDF of revision times for English Wikipedia.
Roughly 35% of revisions take more than 30 minutes.
reverted was the immediately preceding edit, and so measure
the reversion time as the elapsed interval between these two
edits.10 Figure 6 plots this distribution. When we combine
the roughly 30 minutes of error in predicting future snapshot
times (c.f. Figure 5), with another roughly 30 minutes for
the average uncertainty in our estimate of the true snapshot
time (c.f. Figure 4), we can conservatively estimate that the
attacker can time their edit so as to be within one hour, on
average, of the true snapshot time. Approximately 32% of
reversions take more than an to be reverted and so the attack
is likely to succeed often. In the next section, we refine this
estimate to determine more precisely how many articles we
could have poisoned.
5.4 Putting It All Together
Using our predictions of relative article snapshot times, our
interval bound on the true snapshot time, and the distribution
of reversion times, we can now (conservatively) determine
what fraction of Wikipedia an adversary could have poisoned.
There are two potential "failure cases" where a malicious edit
may not make it into the checkpoint:
• the malicious edit is applied too late: the article was
already snapshot, or
i
where 1[ˆti +a > tlow
] is the indicator function that is one if the
edit is applied after the checkpoint (here we conservatively
use our lower bound tlow
on the true checkpoint time), and
prev(ˆti + a;thigh
) is the probability that the edit is reverted
before the checkpoint (here we conservatively use the upper
bound thigh
on the true checkpoint time).
i
i
i
We compute this sum using our results from Section 5.2 and
Section 5.3. By taking the maximum over a sweep of potential
a values, we obtain maxa A(a) = 0.065. That is, according to
our conservative analysis, we can poison 6.5% of Wikipedia
documents absent any other defensive measures.
In reality, of course, there are a number of factors beyond
our analysis that would likely prevent us from reaching this
fraction, such as rate limiting of edits or IP bans. We also
"cheat" in choosing the optimal value of the adjustment value
a, but we do not consider this a major limitation-it is likely
that an adversary could use more historical data to produce
better estimates ˆti as well as good estimates of a. However,
our analysis is also pessimistic in that we assume we only try
once to poison any given article. An adversary may attempt a
more targeted attack, as we discuss in Appendix B.2, where
they retry edits on targeted articles, to force editors to revert
multiple times and increase the likelihood of the edit making
it into the dump. Ultimately, our best-effort estimate of 6.5%
of poisoning success is orders-of-magnitude higher than what
is required in prior poisoning attacks [15]. We thus argue
that a successful frontrunning poisoning attack on Wikipedia
snapshots is practical, and that finding ways to mitigate such
attacks is a worthwhile research direction.
• the malicious edit is applied too early: the edit gets re-
verted before the article is snapshot.
5.5 Multilingual Wikipedia
This induces a tradeoff: the attacker wants to make edits early
enough to ensure they do not miss the snapshot time, but late
enough to maximize the chance of frontrunning editors.
We therefore compute the optimal time to apply a malicious
edit as follows. Recall that we use [tlow
] to represent the
tightest interval around the true (but unknown) snapshot time
,thigh
i
i
Wikipedia is also frequently used for non-English language
modeling. For example, the multilingual version of BERT is
trained entirely on the top 104 Wikipedia languages.11. Mul-
tilingual datasets often rely more heavily on Wikipedia than
English datasets. Thus, poisoning Wikipedia is even more
harmful for non-English language modeling tasks. To measure
10This under-reports the edit time because if the vandalism was from an
11See https://github.com/google-research/bert/blob/master/
earlier edit, we would incorrectly use the later edit's time instead.
multilingual.md#list-of-languages.
11
101100101102103104Time to Revert an Edit (min)0.00.20.40.60.81.0CDF of Reversion Timeficial sources, never interact with Wikipedia. While this leads
to limitations in our analysis, we believe this is the correct
way to run such a study to avoid harming the Wikipedia ed-
itor community. We disclosed our attack analysis (and later
defense recommendations) to researchers at Wikimedia who
acknowledged the vulnerability before release of this paper.
6 Defenses
In order to address the attacks that we identified, we pro-
pose an integrity-based defense for split-view poisoning and
a timing-based defense for frontrunning poisoning. We also
discuss potential directions to address poisoning more gener-
ally. We shared these defenses with curators, maintainers, and
downloaders as part of our responsible disclosure and report
on the status of their implementation of defenses.
6.1 Existing Trust Assumptions
Per our threat model (Section 3), our proposed defenses as-
sume that all maintainers, curators, and downloaders are
trusted and behave honestly. This means that maintainers
provide the same distributed dataset index{(urli, ci)}N
i=1 to
any client and that the index itself has not been poisoned
(e.g., due to insider risk or compromise). Downloaders for
distributed datasets honestly access all urli and compute any
integrity checks that we add via our defenses. Curators pro-
vide the same centralized dataset D to all clients, with curators
controlling the time ti at which any element urli is snapshot.
These assumptions mirror the existing trust that clients place
in maintainers, curators, and downloaders and thus represent
the quickest, short-term path to enacting defenses. We dis-
cuss limitations of these trust assumptions and more robust
solutions with fewer trust assumptions in Section 6.5.
6.2 Preventing Split-View Poisoning
While the simplest defense to split-view poisonings attack
would be to convert the distributed dataset {(urli, ci)}N
i=1 into
a centralized dataset (e.g., as in YFCC100M [71]), this is
presently unrealistic due to the monetary, privacy, and legal
challenges laid out in Section 3. Instead, maintainers-or
another trusted third-party-can prevent split-view attacks by
attaching a cryptographic hash hi = H(xi) of the raw data xi
obtained from urli at time ti prior to any attack. A downloader
would then check whether H(x(cid:48)
i) = hi, where x(cid:48)
i is the content
of urli at time t(cid:48)
i . The downloader discards any data where the
client and maintainer receive distinct content. Here, H should
be a cryptographic hash function such as SHA-256.
Implementation & Responsible Disclosure. Enacting this
defense requires a number of ecosystem changes. Currently,
only PubFig and FaceScrub include cryptographic hashes as
part of their distributed dataset (see Table 1). And because
Figure 7: Multilingual Wikipedia may be more vulnerable
to frontrunning poisoning attacks. We compute poisoning
rates for 36 of the 40 languages languages contained in Wiki-
40B [25] by reusing our attack from Sections 5.2 to 5.4.
this vulnerability, we investigate the Wiki-40B dataset [25]
which is frequently used to train large multilingual models.
We repeat our analysis from the previous section on 35
of the 39 non-English languages contained in Wiki-40B by
identifying which strings often represent a reversion in these
languages.12 Again our analysis here is loose: we identify
only a subset of (often automated) reversions; however for
the same reason as above we believe this represents a lower
bound of the mean reversion time.
We find that 22 (63%) of the non-English Wikipedias were
easier to poison than the English Wikipedia, as shown in Fig-
ure 7. Feasible poisoning rates range from 0.95% to as much
as 25.3%, with a median value of 8.2%. In general, the in-
crease in vulnerability comes from multilingual Wikipedias
having more predictable checkpoints, for two reasons. First,
because these Wikipedias are smaller, the entire checkpoint-
ing procedure is shorter, reducing the amount of variance in
checkpoint time between different pages. Second, because
the Wikipedias change less between successive checkpoints,
the speed of checkpointing is more stable, improving our pre-
dictions. This may be why some of the larger Wikipedias,
such as Spanish, Danish, and Italian, have comparable poison-
ing rates to English Wikipedia. However, our interval-based
measurement is also more conservative for languages with
slower edits, as the intervals will be larger, giving very small
lower bounds for some small Wikipedias, such as Slovak and
Slovenian.
We reiterate that such large poisoning rates are unlikely
to ever happen, due to IP bans or rate limiting. The most
important takeaways from our analysis here are that 1) mul-
tilingual Wikipedias are vulnerable to poisoning, and often
more vulnerable than English Wikipedia, and 2) multilingual
datasets tend to rely more on Wikipedia than English datasets
do, compounding this risk.
5.6 Ethical Considerations
Our actions here are entirely passive. We make no edits to
Wikipedia and, aside from downloading datasets from the of-
12We were unable to access the German, Chinese, and Czech checkpoints
for the checkpoint times we studied, and Tagalog did not have enough data
to reliably analyze.
12
daslsksrlvbgesetelnosvrofritcaltviukhihethruhrtridfahuptjafiarmskonlplLanguage id0.000.050.100.150.200.25Poisoning Fractionthese two datasets do not provide an official downloader,
the community has relied on a number of third-party down-
loader scripts that for the most part do not actually verify these
hashes.13 Fortunately, for larger datasets the img2dataset [5]
tool has become the canonical downloader used in 75% of
requests to our domains.
As part of our responsible disclosure, we reached out
to every maintainer (see Table 1), suggesting the addition
of SHA-256 hashes as part of the dataset index. At the
time of writing, CC3M, CC12M, LAION-2B-en, LAION-
2b-multi, LAION-1B-nolang, and LAION-400M now release
their dataset with SHA-256 hashes of the image contents.
We additionally implemented an option in img2dataset
to verify SHA-256 image hashes upon download, thus
preventing our attack for anyone using this tool, and pro-
vide our own backup of hashes in a Google Cloud Bucket
at gs://gresearch/distributed-dataset-hashes/ for
the datasets where we have (near-)original data.
Limitations. Integrity checks are viable if most benign con-
tent remains static. If content is altered in any way (e.g.,
by re-encoding, cropping, re-sizing, or uploading a higher-
resolution image) the original hashes will no longer match.
This can significantly degrade the utility of a dataset: for exam-
ple, we obtain the original raw data from the first Conceptual
Captions 3M dataset downloaded in 2018 and compare this
to our most recent download of these same images in 2023.
Of the 3.3 million original images, 2.9 million images are
still hosted online, but just 1.1 million of these images have
hashes that match the original-the other 1.8 million images
have changed since the initial dataset construction.
This suggests that our defense, while providing perfect pro-
tection against split-view poisoning attacks, has the potential
to significantly degrade utility. In Appendix C, we perform
a case-study analysis on the PubFig and FaceScrub datasets,
showing that modified but useful content makes up a signif-
icant fraction of the images with invalid hashes. Switching
to a perceptual hash function (which aims for invariance to
small image changes) would lead to higher utility, but would
not meaningfully prevent our poisoning attacks because an
attacker could upload poisoned images that were adversarially
modified to fool the perceptual hash [26,29,68]. This suggests
qualitatively new defense ideas will be necessary to defend
against our attacks without a high utility cost.
6.3 Preventing Frontrunning Poisoning
Our frontrunning poisoning attack relies on the fact that an ad-
versary only needs sustained control of data for a few minutes
to succeed. To defend against this attack, it suffices to increase
13We examine the 6 most popular downloader scripts for each dataset
(gathered by searching for "[pubfig|facescrub] dataset download
github"), and find that only one script per dataset implements hash ver-
ification. The one for FaceScrubchecks hashes by default, while the one for
PubFig requires users to run a separate verification script.
the duration d = ti − ˆti that an attacker must retain control over
urli for it to be included in the snapshot at time ti, where ˆti in-
dicates the time an attacker first modifies the URL's contents.
If a curator can detect malicious modifications within time ∆,
then increasing d > ∆ effectively thwarts the attack. This can
be achieved in one of two ways: (1) curators can randomize
the snapshot order of the urli and extend the time required
to snapshot the complete corpus; or (2) curators could freeze
edits to the content of urli at time ti, wait for a period T > ∆
for edits to go through review, and then finally release the
snapshot at time ti + T .
Implementation & Responsible Disclosure. For our first
approach, Wikipedia could randomize its snapshot order of ar-
ticles instead of its current sequential method based on article
IDs. This thwarts an adversary's ability to predict precisely
when an article will be selected for snapshotting, requiring
they sustain control of articles for the entirety of the snapshot
time, tn −t0, to ensure success. For the English Wikipedia, the
current average review time to detect vandalism ∆ is 2.5 hours
(Figure 6). Increasing the snapshot time beyond ∆ would pro-
tect 1 - ∆/(tn − t0) articles from random, malicious modifi-
cation, or 89.5% of articles if snapshotting was uniformly
randomized over 24 hours. This assumes an attacker is unable
to use Sybil accounts to automatically reintroduce malicious
edits after their first detection and reversion. If this assumption
is invalid, this protection will be weaker in practice.
For our second approach which is more comprehensive,
Wikipedia could create an initial snapshot of an an article,
hold it for a period T > ∆, and then back-apply ("cherry-
pick") modifications or reversions from trusted moderators
that occur within time T before finalizing the snapshot. (Sub-
sequent edits must be accepted from trusted moderators so as
to avoid selective deletion or reversion by attackers.) Even a
reasonable grace period of one day could have a significant
impact on the number of malicious edits that will be caught.
For example, on the English Wikipedia (Figure 6), increasing
from a 5 minute to a 1 day window would increase the rever-
sion rate from 50% to 90%, reducing vandalism by a factor
of 5.
As part of our responsible disclosure, we notified Wikipedia
of these attacks and our proposed defenses.
Limitations. In practice, these defenses make it more difficult
for an attacker to operationalize frontrunning, but cannot pre-
vent it entirely as ∆ is not uniform across articles. For example,
attackers might target less active articles, or languages with
fewer moderators, in order to increase their frontrunning suc-
cess rate. Furthermore, our defenses hinge on the existence of
a trusted curator who can detect malicious edits-something
that may be difficult if an attacker intentionally introduces
imperceptible changes over time that impact only machine
understanding, but appear valid to human review. Overcoming
these risks-which exist for any "living" dataset-requires
much more sophisticated solutions, which we explore next.
13
6.4 Preventing Poisoning in General
Preventing poisoning attacks on more general web-scale
datasets such as Common Crawl (a peta-byte sized dataset of
web crawls) is more complex. No trusted "golden" snapshot
exists here as we had for split-view poisoning. Nor is there a
trusted curator who can detect malicious edits. Equally prob-
lematic, updates to a web page have no realistic bound on
the delta between versions which might act as a signal for
attaching trust. Ultimately, any notion of which domains to
trust is ad-hoc at best.
Client could thus rely on consensus-based approaches (e.g.,
only trusting an image-caption pair if it appears on many
different websites). An attacker would then have to poison
a sufficiently larger number of similar websites to ensure
success, which mirrors the same consensus challenges present
in distributed systems like blockchains [45]. However, any
solution in this space requires downstream knowledge of how
URL content is consumed, vectorized, and deconflicted during
training. We leave application-specific solutions to general
poisoning to future work.
6.5 Transparency to Improve Trust
Web-scale datasets today hinge on implicit trust. Clients trust
maintainers to distribute identical and accurate auxiliary data
ci, which may in fact be malicious due to a compromised
maintainer. Clients trust curators to enact effective moderation
to detect malicious edits to xi. Clients trust downloaders to
accurately retrieve urli. And finally, clients trust websites
to deliver the same xi for every urli, even though attackers
have countless mechanisms to subvert xi-going beyond just
purchasing expired domains or frontrunning snapshots.
We believe improving the safety of web-scale datasets re-
quires introducing transparency into the ecosystem. Data
transparency around the set of {(urli, ci, hi)} distributed to
clients-akin to certificate transparency [37]-can prevent
transient failures or a compromised maintainer from distribut-
ing different datasets to different clients and to assist in the
detection and removal of inaccurate ci or expired urli over
time. Curators could engage in a similar process to ensure all
clients receive an identical corpus D. While many download-
ers are already open source, binary transparency would bolster
protection to prevent selective inclusion of malicious mod-
ules [1]. Such transparency would prepare the ecosystem for a
future where multiple maintainers and curators continuously
update web-scale datasets, rather than the current reliance on
centralized entities and static datasets.
7 Conclusion
Our paper demonstrates that web-scale datasets are vulnera-
ble to low-cost and extremely practical poisoning attacks that
could be carried out today. This is true even when attackers
can target only a fraction of curated datasets, where corrupting
0.01% of examples is sufficient to poison a model. Those who
publish and maintain datasets should consider the defenses
we introduced-including integrity checks and randomized
or time-gated snapshots-or alternate, application-specific de-
fenses. In light of our findings, we argue that machine learning
researchers must reassess the trust assumptions they place in
web-scale data and begin exploring solutions that do not as-
sume a single root of trust. Our findings also expose a variety
of future directions for attack research: threat models where
attackers can edit only raw content but not auxiliary data such
as labels; assessing the practical costs of proposed attacks;
and assessing the efficacy of more permissive, but potentially
vulnerable near-duplicate integrity checks. As such, our work
is only a starting point for the community to develop a better
understanding of the risks involved in generating models from
web-scale data.
Acknowledgements
We are grateful to the dataset curators (in particular Beer
Changpinyo, Saehoon Kim, Romain Beaumont, Ludwig
Schmidt, and Chris Albon) for discussions around datasets
and defenses. We are also grateful to Milad Nasr and Alex
Kurakin for comments on early drafts of this paper.
References
[1] Mustafa Al-Bassam and Sarah Meiklejohn. Contour: A practical system
for binary transparency. In Data Privacy Management, Cryptocurren-
cies and Blockchain Technology, pages 94–110. Springer, 2018.
[2] Sören Auer, Christian Bizer, Georgi Kobilarov, Jens Lehmann, Richard
Cyganiak, and Zachary Ives. DBpedia: A nucleus for a web of open
data. In The semantic web, pages 722–735. Springer, 2007.
[3] Ankan Bansal, Carlos Castillo, Rajeev Ranjan, and Rama Chellappa.
The do's and don'ts for CNN-based face verification. In Proceedings
of the IEEE international conference on computer vision workshops,
pages 2545–2554, 2017.
[4] Ankan Bansal, Anirudh Nanduri, Carlos D Castillo, Rajeev Ranjan,
and Rama Chellappa. UMDfaces: An annotated face dataset for train-
ing deep networks. In 2017 IEEE international joint conference on
biometrics (IJCB), pages 464–473. IEEE, 2017.
[5] Romain Beaumont. img2dataset: Easily turn large sets of image urls
to an image dataset. https://github.com/rom1504/img2dataset,
2021.
[6] Battista Biggio, Blaine Nelson, and Pavel Laskov. Poisoning attacks
against support vector machines. arXiv preprint arXiv:1206.6389,
2012.
[7] Abeba Birhane, Vinay Uday Prabhu, and Emmanuel Kahembwe. Mul-
timodal datasets: misogyny, pornography, and malignant stereotypes.
arXiv preprint arXiv:2110.01963, 2021.
[8] Tolga Bolukbasi, Kai-Wei Chang, James Y Zou, Venkatesh Saligrama,
and Adam T Kalai. Man is to computer programmer as woman is
to homemaker? debiasing word embeddings. Advances in neural
information processing systems, 29, 2016.
[9] Antoine Bordes, Nicolas Usunier, Sumit Chopra, and Jason Weston.
Large-scale simple question answering with memory networks. arXiv
preprint arXiv:1506.02075, 2015.
14
[10] Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D
Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish
Sastry, Amanda Askell, et al. Language models are few-shot learners.
Advances in neural information processing systems, 33:1877–1901,
2020.
[11] Minwoo Byeon, Beomhee Park, Haecheon Kim, Sungjun Lee, Woon-
hyuk Baek, and Saehoon Kim. COYO-700M: Image-text pair dataset.
https://github.com/kakaobrain/coyo-dataset, 2022.
[12] Qingqing Cai and Alexander Yates. Large-scale semantic parsing
via schema matching and lexicon extension. In Proceedings of the
51st Annual Meeting of the Association for Computational Linguistics
(Volume 1: Long Papers), pages 423–433, 2013.
[13] Qiong Cao, Li Shen, Weidi Xie, Omkar M Parkhi, and Andrew Zis-
serman. VGGFace2: A dataset for recognising faces across pose and
age. In 2018 13th IEEE international conference on automatic face &
gesture recognition (FG 2018), pages 67–74. IEEE, 2018.
[14] Nicholas Carlini. Poisoning the unlabeled dataset of Semi-Supervised
learning. In 30th USENIX Security Symposium (USENIX Security 21),
pages 1577–1592, 2021.
[15] Nicholas Carlini and Andreas Terzis. Poisoning and backdooring
contrastive learning. arXiv preprint arXiv:2106.09667, 2021.
[16] Soravit Changpinyo, Piyush Sharma, Nan Ding, and Radu Soricut. Con-
ceptual 12M: Pushing web-scale image-text pre-training to recognize
long-tail visual concepts. In Proceedings of the IEEE/CVF Conference
on Computer Vision and Pattern Recognition, pages 3558–3568, 2021.
[17] Honglie Chen, Weidi Xie, Andrea Vedaldi, and Andrew Zisserman.
VGGsound: A large-scale audio-visual dataset. In ICASSP 2020-2020
IEEE International Conference on Acoustics, Speech and Signal Pro-
cessing (ICASSP), pages 721–725. IEEE, 2020.
[18] Xinyun Chen, Chang Liu, Bo Li, Kimberly Lu, and Dawn Song. Tar-
geted backdoor attacks on deep learning systems using data poisoning.
arXiv preprint arXiv:1712.05526, 2017.
[19] Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma,
Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won Chung,
Charles Sutton, Sebastian Gehrmann, et al. PaLM: Scaling language
modeling with Pathways. arXiv preprint arXiv:2204.02311, 2022.
[20] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei.
Imagenet: A large-scale hierarchical image database. In 2009 IEEE
conference on computer vision and pattern recognition, pages 248–255.
Ieee, 2009.
[21] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova.
BERT: Pre-training of deep bidirectional transformers for language
understanding. In Proceedings of the 2019 Conference of the North
American Chapter of the Association for Computational Linguistics:
Human Language Technologies, Volume 1 (Long and Short Papers),
pages 4171–4186, Minneapolis, Minnesota, June 2019. Association for
Computational Linguistics.
[22] Mohnish Dubey, Debayan Banerjee, Abdelrahman Abdelkawi, and
Jens Lehmann. LC-QuAD 2.0: A large dataset for complex question
answering over Wikidata and DBpedia. In International semantic web
conference, pages 69–78. Springer, 2019.
[23] Leo Gao, Stella Biderman, Sid Black, Laurence Golding, Travis Hoppe,
Charles Foster, Jason Phang, Horace He, Anish Thite, Noa Nabeshima,
et al. The Pile: An 800GB dataset of diverse text for language modeling.
arXiv preprint arXiv:2101.00027, 2020.
[24] Tianyu Gu, Kang Liu, Brendan Dolan-Gavitt, and Siddharth Garg. Bad-
nets: Evaluating backdooring attacks on deep neural networks. IEEE
Access, 7:47230–47244, 2019.
[25] Mandy Guo, Zihang Dai, Denny Vrandeˇci ́c, and Rami Al-Rfou. Wiki-
40B: Multilingual language model dataset. In Proceedings of the 12th
Language Resources and Evaluation Conference, pages 2440–2452,
2020.
[26] Qingying Hao, Licheng Luo, Steve TK Jan, and Gang Wang. It's not
what it looks like: Manipulating perceptual hashing based applications.
In Proceedings of the 2021 ACM SIGSAC Conference on Computer
and Communications Security, 2021.
[27] Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena
Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de Las Casas,
Lisa Anne Hendricks, Johannes Welbl, Aidan Clark, et al. Train-
arXiv preprint
ing compute-optimal
arXiv:2203.15556, 2022.
large language models.
[28] Gabriel Ilharco, Mitchell Wortsman, Ross Wightman, Cade Gor-
don, Nicholas Carlini, Rohan Taori, Achal Dave, Vaishaal Shankar,
Hongseok Namkoong, John Miller, Hannaneh Hajishirzi, Ali Farhadi,
and Ludwig Schmidt. OpenCLIP, July 2021.
[29] Shubham Jain, Ana-Maria Cret,u, and Yves-Alexandre de Montjoye.
Adversarial detection avoidance attacks: Evaluating the robustness
In 31st USENIX
of perceptual hashing-based client-side scanning.
Security Symposium (USENIX Security 22), pages 2317–2334, 2022.
[30] Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B Brown, Ben-
jamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and
Dario Amodei. Scaling laws for neural language models. arXiv preprint
arXiv:2001.08361, 2020.
[31] Ira Kemelmacher-Shlizerman, Steven M Seitz, Daniel Miller, and Evan
Brossard. The MegaFace benchmark: 1 million faces for recognition at
scale. In Proceedings of the IEEE conference on computer vision and
pattern recognition, pages 4873–4882, 2016.
[32] Evan Klinger and David Starkweather. pHash: The open source per-
ceptual hash library. https://phash.org/, 2013.
[33] Alex Krizhevsky. Learning multiple layers of features from tiny images,
2009.
[34] Neeraj Kumar, Alexander C Berg, Peter N Belhumeur, and Shree K
Nayar. Attribute and simile classifiers for face verification. In 2009
IEEE 12th international conference on computer vision, pages 365–372.
IEEE, 2009.
[35] Tobias Lauinger, Ahmet S Buyukkayhan, Abdelberi Chaabane, William
Robertson, and Engin Kirda. From deletion to re-registration in zero
seconds: Domain registrar behaviour during the drop. In Proceedings
of the Internet Measurement Conference, 2018.
[36] Tobias Lauinger, Abdelberi Chaabane, Ahmet Salih Buyukkayhan,
Kaan Onarlioglu, and William Robertson. Game of registrars: An
empirical analysis of post-expiration domain name takeovers. In 26th
USENIX Security Symposium (USENIX Security 17), pages 865–880,
Vancouver, BC, August 2017. USENIX Association.
[37] Ben Laurie. Certificate transparency. Communications of the ACM,
57(10):40–46, 2014.
[38] Rémi Lebret, David Grangier, and Michael Auli. Generating text
from structured data with application to the biography domain. CoRR,
abs/1603.07771, 2016.
[39] Chaz Lever, Robert Walls, Yacin Nadji, David Dagon, Patrick McDaniel,
and Manos Antonakakis. Domain-Z: 28 registrations later measuring
the exploitation of residual trust in domains. In 2016 IEEE symposium
on security and privacy (SP), pages 691–706. IEEE, 2016.
[40] Alexandra Luccioni and Joseph Viviano. What's in the box? an analysis
of undesirable content in the Common Crawl corpus. In Proceedings of
the 59th Annual Meeting of the Association for Computational Linguis-
tics and the 11th International Joint Conference on Natural Language
Processing (Volume 2: Short Papers), pages 182–189, 2021.
[41] Mary Ann Marcinkiewicz. Building a large annotated corpus of English:
The Penn Treebank. Using Large Corpora, 273, 1994.
[42] Pablo Mendes, Max Jakob, and Christian Bizer. DBpedia: A multilin-
In Proceedings of the Eighth
gual cross-domain knowledge base.
International Conference on Language Resources and Evaluation
(LREC'12), pages 1813–1817, Istanbul, Turkey, May 2012. European
Language Resources Association (ELRA).
15
[43] Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher.
Pointer sentinel mixture models, 2016.
[44] Tyler Moore and Richard Clayton. The ghosts of banking past: Em-
pirical analysis of closed bank websites. In International Conference
on Financial Cryptography and Data Security, pages 33–48. Springer,
2014.
[45] Arvind Narayanan, Joseph Bonneau, Edward Felten, Andrew Miller,
and Steven Goldfeder. Bitcoin and cryptocurrency technologies: a
comprehensive introduction. Princeton University Press, 2016.
[46] Hong-Wei Ng and Stefan Winkler. A data-driven approach to cleaning
large face datasets. In 2014 IEEE international conference on image
processing (ICIP), pages 343–347. IEEE, 2014.
[47] Nick Nikiforakis, Luca Invernizzi, Alexandros Kapravelos, Steven
Van Acker, Wouter Joosen, Christopher Kruegel, Frank Piessens, and
Giovanni Vigna. You are what you include: large-scale evaluation of
remote Javascript inclusions. In Proceedings of the 2012 ACM con-
ference on Computer and communications security, pages 736–747,
2012.
[48] OpenAI.
Introducing Whisper.
https://openai.com/blog/
whisper/, 2022.
[49] Omkar M Parkhi, Andrea Vedaldi, and Andrew Zisserman. Deep face
recognition. 2015.
[50] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh,
Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela
Mishkin, Jack Clark, et al. Learning transferable visual models from
natural language supervision. In International Conference on Machine
Learning, pages 8748–8763. PMLR, 2021.
[51] Alec Radford, Jong Wook Kim, Tao Xu, Greg Brockman, Christine
McLeavey, and Ilya Sutskever. Robust speech recognition via large-
scale weak supervision.
[52] Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei,
Ilya Sutskever, et al. Language models are unsupervised multitask
learners. OpenAI blog, 1(8):9, 2019.
[53] Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan
Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J Liu, et al. Explor-
ing the limits of transfer learning with a unified text-to-text transformer.
J. Mach. Learn. Res., 21(140):1–67, 2020.
[54] Javier Rando, Daniel Paleka, David Lindner, Lennart Heim, and Florian
Tramèr. Red-teaming the Stable Diffusion safety filter. arXiv preprint
arXiv:2210.04610, 2022.
[55] David Rolnick, Andreas Veit, Serge Belongie, and Nir Shavit.
arXiv preprint
Deep learning is robust to massive label noise.
arXiv:1705.10694, 2017.
[56] Johann Schlamp, Josef Gustafsson, Matthias Wählisch, Thomas C
Schmidt, and Georg Carle. The abandoned side of the Internet: Hijack-
ing Internet resources when domain names expire. In International
Workshop on Traffic Monitoring and Analysis, pages 188–201. Springer,
2015.
[57] Christoph Schuhmann, Romain Beaumont, Richard Vencu, Cade Gor-
don, Ross Wightman, Mehdi Cherti, Theo Coombes, Aarush Katta,
Clayton Mullis, Mitchell Wortsman, et al. LAION-5B: An open large-
scale dataset for training next generation image-text models. arXiv
preprint arXiv:2210.08402, 2022.
[58] Christoph Schuhmann, Richard Vencu, Romain Beaumont, Robert
Kaczmarczyk, Clayton Mullis, Aarush Katta, Theo Coombes, Jenia
Jitsev, and Aran Komatsuzaki. LAION-400M: Open dataset of clip-
filtered 400 million image-text pairs. arXiv preprint arXiv:2111.02114,
2021.
[59] Christoph Schumann and Romain Beaumont. LAION-Aesthetics.
https://web.archive.org/web/20230119181400/https://laion.ai/blog/laion-
aesthetics/, 2022.
16
[60] Roei Schuster, Congzheng Song, Eran Tromer, and Vitaly Shmatikov.
You autocomplete me: Poisoning vulnerabilities in neural code com-
pletion. In 30th USENIX Security Symposium (USENIX Security 21),
pages 1559–1575, 2021.
[61] Holger Schwenk, Guillaume Wenzek, Sergey Edunov, Edouard Grave,
and Armand Joulin. CCMatrix: Mining billions of high-quality parallel
sentences on the web. arXiv preprint arXiv:1911.04944, 2019.
[62] Iulian Vlad Serban, Alberto García-Durán, Caglar Gulcehre, Sungjin
Ahn, Sarath Chandar, Aaron Courville, and Yoshua Bengio. Generating
factoid questions with recurrent neural networks: The 30M factoid
question-answer corpus. arXiv preprint arXiv:1603.06807, 2016.
[63] Pnina Shachaf and Noriko Hara. Beyond vandalism: Wikipedia trolls.
Journal of Information Science, 36(3):357–370, 2010.
[64] Ali Shafahi, W Ronny Huang, Mahyar Najibi, Octavian Suciu,
Christoph Studer, Tudor Dumitras, and Tom Goldstein. Poison frogs!
targeted clean-label poisoning attacks on neural networks. Advances in
neural information processing systems, 31, 2018.
[65] Piyush Sharma, Nan Ding, Sebastian Goodman, and Radu Soricut.
Conceptual Captions: A cleaned, hypernymed, image alt-text dataset
for automatic image captioning. In Proceedings of the 56th Annual
Meeting of the Association for Computational Linguistics (Volume 1:
Long Papers), pages 2556–2565, 2018.
[66] Amanpreet Singh, Ronghang Hu, Vedanuj Goswami, Guillaume Coua-
iron, Wojciech Galuba, Marcus Rohrbach, and Douwe Kiela. Flava:
In Proceed-
A foundational language and vision alignment model.
ings of the IEEE/CVF Conference on Computer Vision and Pattern
Recognition, pages 15638–15650, 2022.
[67] Johnny So, Najmeh Miramirkhani, Michael Ferdman, and Nick Niki-
forakis. Domains do change their spots: Quantifying potential abuse of
residual trust. In Proceedings of the IEEE Symposium on Security and
Privacy, pages 2130–2144, 2022.
[68] Lukas Struppek, Dominik Hintersdorf, Daniel Neider, and Kristian
Kersting. Learning to break deep perceptual hashing: The use case
NeuralHash. In 2022 ACM Conference on Fairness, Accountability,
and Transparency, pages 58–69, 2022.
[69] Besiki Stvilia, Michael B Twidale, Linda C Smith, and Les Gasser.
Information quality work organization in Wikipedia. Journal of the
American society for information science and technology, 59(6):983–
1001, 2008.
[70] Alon Talmor and Jonathan Berant. The web as a knowledge-base for
answering complex questions. arXiv preprint arXiv:1803.06643, 2018.
[71] Bart Thomee, David A Shamma, Gerald Friedland, Benjamin Elizalde,
Karl Ni, Douglas Poland, Damian Borth, and Li-Jia Li. YFCC100M:
The new data in multimedia research. Communications of the ACM,
59(2):64–73, 2016.
[72] Antonio Torralba, Rob Fergus, and William T Freeman. 80 million tiny
images: A large data set for nonparametric object and scene recogni-
tion. IEEE transactions on pattern analysis and machine intelligence,
30(11):1958–1970, 2008.
[73] Priyansh Trivedi, Gaurav Maheshwari, Mohnish Dubey, and Jens
Lehmann. LC-QuAD: A corpus for complex question answering over
knowledge graphs. In International Semantic Web Conference, pages
210–218. Springer, 2017.
[74] Alexander Turner, Dimitris Tsipras, and Aleksander Madry. Clean-label
backdoor attacks. 2018.
[75] Patrick
von
Patil, Anton
Platen, Suraj
Lozhkov, Pedro
Cuenca, Nathan Lambert, Kashif Rasul, Mishig Davaadorj,
State-of-the-art diffusion
Diffusers:
and Thomas Wolf.
https://github.com/huggingface/diffusers/
models.
blob/8178c840f265d4bee91fe9cf9fdd6dfef091a720/src/
diffusers/pipelines/stable_diffusion/safety_checker.py,
2022. Accessed 7 Feb 2023.
[76] Eric Wallace, Tony Z Zhao, Shi Feng, and Sameer Singh. Con-
arXiv preprint
cealed data poisoning attacks on NLP models.
arXiv:2010.12563, 2020.
[77] Angelina Wang, Alexander Liu, Ryan Zhang, Anat Kleiman, Leslie
Kim, Dora Zhao, Iroha Shirai, Arvind Narayanan, and Olga Rus-
sakovsky. REVISE: A tool for measuring and mitigating bias in visual
datasets. International Journal of Computer Vision, pages 1–21, 2022.
[78] Guillaume Wenzek, Marie-Anne Lachaux, Alexis Conneau, Vishrav
Chaudhary, Francisco Guzmán, Armand Joulin, and Edouard Grave.
CCNet: Extracting high quality monolingual datasets from web crawl
data. In Proceedings of the 12th Language Resources and Evaluation
Conference, pages 4003–4012, Marseille, France, May 2020. European
Language Resources Association.
[79] Wikipedia contributors. Reliability of wikipedia - Wikipedia, the free
encyclopedia, 2022. [Online; accessed 21-July-2022].
[80] Wikipedia contributors. Wikipedia:Go ahead, vandalize, 2022. [Online;
accessed 5-December-2022].
[81] Yi Yang, Wen-tau Yih, and Christopher Meek. WikiQA: A challenge
dataset for open-domain question answering. In Proceedings of the
2015 conference on empirical methods in natural language processing,
pages 2013–2018, 2015.
[82] Scott Wen-tau Yih, Ming-Wei Chang, Xiaodong He, and Jianfeng Gao.
Semantic parsing via staged query graph generation: Question answer-
ing with knowledge base. In Proceedings of the Joint Conference of
the 53rd Annual Meeting of the ACL and the 7th International Joint
Conference on Natural Language Processing of the AFNLP, 2015.
[83] Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and
Oriol Vinyals. Understanding deep learning (still) requires rethinking
generalization. Communications of the ACM, 64(3):107–115, 2021.
A Additional Figures
Figure 8: An unfiltered (without any precision or recall re-
quirement) view of accesses to our server for URLs contained
in Conceptual 12M. Compare to Figure 2 for the filtered view.
B Further Discussion for Text Datasets
In this section, we further discuss vulnerabilities present in
text datasets, focusing first on targeted poisoning attacks on
Wikipedia, and then on the Common Crawl dataset.
B.1 Annotating Reversions
In each language, we produce a list of words which are com-
monly used to denote reversions. The specific words used
are emergent from each language's Wikipedia contributor
community, so there is no concrete list. However, in each
language, their are automated reversion tools and manual re-
versions which are tagged with the English word "reversion"
or simply the abbreviation "rv". These form a starting point
for our manual analysis: we identify words which roughly
translate to "revert", "undo", or similar, which also appear in
a sample of reversion comments we identify as automated
reversions or manual reversions. We then sample comments
with each of these newly identified words to verify that they
capture new instances of reversions (that is, they are used to
uniquely tag reversions in the language's Wikipedia), and do
not produce too many false positives.
Overall, we don't expect this list to be perfect for any given
language, as no author of this paper is an active contributor to
any language's Wikipedia. However, we do believe our analy-
sis is sufficient to validate the two trends we notice: frontrun-
ning attacks are still possible on non-English Wikipedias, and
attacks may be more powerful on non-English Wikipedias.
B.2 Cascading Effects of Frontrunning
Our attack enables an adversary to poison any Wikipedia
snapshot. An adversary can use frontrunning to harm down-
stream datasets that depend directly on these snapshots, as
well. Rather than arbitrarily modifying large fractions of
17
2022-08-112022-08-132022-08-15Date02000400060008000Index of URL accessedWikipedia, these can be achieved with very targeted fron-
trunning poisoning.
Knowledge base extraction databases are heavily relied
upon for analytics (e.g., asking queries like "which politicians
were gang members?") and machine learning (e.g., for train-
ing and evaluating question-answering models). One of the
largest databases for it is DBPedia [2, 42]. Since this database
is created using the monthly snapshots, they are, for all intents
and purposes, a filtered view of Wikipedia. This enables ad-
versaries to directly leverage our frontrunning attack to poison
these databases as well in a more targeted manner.
As an example in analytics, a user may issue a query such as
"which politicians were gang members?" A targeted poisoning
attack could force individuals to be falsely included in such a
list, with a small edit via a frontrunning attack. More broadly,
such attacks could be designed to harm specific individuals
or reduce the reliability of certain aggregate statistics.
Similarly, in question-answering tasks for machine learn-
ing, some datasets, like LC-Quad [22, 73], store data as
question-query pairs. The adversary can also target these
dataset by compromising the query with frontrunning (as
above). Because Wikipedia snapshots are infrequent, and
downstream systems like these knowledge bases may up-
date their endpoints even more infrequently [2], these at-
tacks can remain effective for multiple months. Another com-
mon approach is to store data directly as question-answer
pairs [9, 12, 62, 70, 82]. This mitigates our attack above, as-
suming the specific checkpoint used to originally generate the
dataset was not compromised. However, this only prevents
poisoning of a model trained on these downstream tasks-a
model trained on a poisoned Wikipedia snapshot and fine
tuned on the downstream task will still be vulnerable. Finally,
we remark that the impacts of these attacks may be exacer-
bated on multilingual data as we discussed in Section 5.1.
B.3 Common Crawl
Common Crawl is a petabyte-scale corpus of web crawl data
that is repeatedly captured on a roughly monthly basis. Each
archive is a complete re-crawl of the internet that records
the full activity, including all requests of the crawler and the
host responses-with both HTTP headers and content. As
such, each archive contains a static snapshot of all crawled
pages at the time of visit. This may include new page content
not seen during a previous crawl, and may exclude content
that has become stale since the previous crawl. For exam-
ple, data crawled during September 24 through October 8,
2022 contains 3.15 billion web pages with 380 TiB of un-
compressed content from 34 million registered domains-1.3
billion URLs were not visited in any of the prior crawls.14
The Common Crawl dataset is vulnerable to an attack
which is similar to both our frontrunning and split-view poi-
14https://commoncrawl.org/2022/10/
sep-oct-2022-crawl-archive-now-available/
Figure 9: Top 5 domains by status count
soning attacks. The adversary can purchase an expired domain
which was previously contained in the Common Crawl, and
it will be re-crawled with the adversary's choice of content,
which will then appear in subsequent Common Crawl snap-
shots. Notice that, differently from the snapshot-poisoning
attack on Wikipedia, there is no content moderation here
and so the adversary simply needs to continue to control the
domain to poison all future Common Crawl snapshots. Buy-
ing recently-expired domains that existed in previous Com-
mon Crawl snapshots allows a stronger form of attack where
the attack can inject entirely new links into the crawl. This
can be accomplished by adding links or subdomains to poi-
soned domains, and allowing the crawler to discover the new
poisoned domains. Thus, an adversary may inject arbitrarily
many pages into the Common Crawl dataset, not only from
the originally expired subset. We do not implement this attack
following our ethics statements outlined earlier.
Since Common Crawl WARC files have been hosted by
Amazon on a AWS Athena (serverless service)15, domain
reconnaissance work to analyze URLs is inexpensive. Scan-
ning through 10 years of Common Crawl data to analyze
domains from popular TLDs and high number of Common
Crawl entries cost us USD$ 0.84. While additional analysis
might somewhat increase this cost, it remains an inexpensive
way to search for vulnerable domains. Buying recently ex-
pired domains, or domains that have a dangling DNS record
with an active IP address is preferred, as domains that failed
to return a 200-OK status in consecutive crawls seem to be
moved to a lower priority. For example, among expired do-
mains we purchased, just one domain accounts for more than
90% of all status codes among the purchased domains, while
other domains we purchased as early as 12/20/2020 have seen
relatively less scraping traffic across a 3 year period.16
Because Common Crawl is enormous and uncurated (to
accurately reflect the content of the internet) poisoning all of
Common Crawl is impractical due to size. Additionally, it is
15https://commoncrawl.org/2018/03/
index-to-warc-files-and-urls-in-columnar-format/
16The domains used in this study responded with a 404 HTTP status
to explicitly prevent scraping of content, potentially affecting analysis of
domain re-emergence. That is, domains that previously returned a 404 now
return a 200.
18
Figure 10: affraz.com status counts over time
(a)
(b)
(c)
(d)
Figure 12: What happens in practice when the image no
longer matches the original hash? We show 4 examples from
the PubFig dataset. In Figure 12a, the image is replaced by a
placeholder. In Figure 12b, a watermark partially covers the
face, making that image slightly less useful for training. In
Figure 12c, the image was resized and thus the original bound-
ing box contained in the dataset index no longer matches the
face. As opposed to the previous three images, Figure 12d is
perfectly suitable for training: the watermark is outside the
facial bounding box.
impact on utility. As we saw in Section 6.2, implementing
this defense for the Conceptual Captions 3M dataset would re-
sult in discarding roughly 55% of the entire dataset-mainly
because of small yet benign image changes such as re-sizing.
Here, we perform a more in-depth analysis of the impact
of cryptographic integrity protections on other datasets.
C.1 Modified Images in the Wild: A Case
Study on the PubFig Dataset
PubFig [34] is a 2010 dataset that indexes close to 60,000
images of 200 different celebrities hosted across a variety of
domains. PubFig is one of the oldest example of a distributed
dataset. Thus, it is likely that many of the URLs in its index are
no longer live (a phenomenon we refer to as "link rot"), and
that many of the remaining URLs would point to images that
have been slightly modified over time. Small image modifica-
tions make integrity check defenses problematic because they
discard many perfectly useful training images. In Figure 12,
we show four different ways in which original images have
Figure 11: Aggregate status counts for all purchased domains
not always apparent how consumers of this data are process-
ing it for downstream machine learning tasks. However, there
exist many derivative datasets which are constructed by cu-
rating a relevant subset of the Common Crawl. This includes
the LAION-5B image dataset [57], the text dataset known
as the Pile [23], the multilingual text dataset CC-100 [78],
and the CCMatrix dataset [61], a translation dataset of pairs
of translated sentences. Such curation actually amplifies the
power of an attack: an attack which adds 1MB of text to the
Common Crawl would be poisoning a 2.5 * 10−9 fraction of
the Common Crawl, but if this text bypasses the curation done
for the CC-100 dataset, it could instead poison a 1.2 * 10−5
fraction of the English corpus, or even a full 9.1% of the
Oromo corpus.
C Limitations of Integrity Check Defenses
In Section 6.2, we outlined a natural defense against split-
view poisoning that adds integrity checks to the dataset index.
Specifically, upon collecting the dataset the maintainer com-
putes a cryptographic hash of each image, and adds this hash
to the index. Upon downloading a copy of the dataset, the
client downloader then discards images for which the hash
no longer matches. Unfortunately, this defense has a severe
19
Dataset
# Images
Success
Download
failure
Invalid
image
pubfig
facescrub
58795
106863
35.2%
48.5%
54.7% 10.2%
7.0%
44.5%
Table 2: Link rot in old image datasets, downloaded using img2dataset [5]. In older datasets, the proportion of images that are
no longer available online is high.
Dataset
pubfig
facescrub
Accuracy on
Downloaded Modified modified, no crop modified, crop
Accuracy on
Accuracy on
original, no crop
Accuracy on
original, crop
20668
51847
52.4%
29.4%
59.7%
93.3%
55.2%
91.6%
96.0%
97.7%
98.2%
99.1%
Table 3: Quantifying changes on successfully downloaded images. Modified images are those that have a different hash than the
original image. We measure the accuracy as the proportion of modified images that have a CLIP embedding close to any of the
possible labels, approximating the question "Is there a recognizable face in the image?". The difference between cropped and
uncropped images is largely due to the resized images making the crop not capture the face of the person, as in Figure 12c.
been modified in PubFig. While we find examples of true-
positives, where images were indeed modified significantly,
there are also many cases of images that were subjected to
minor changes such as the addition of a watermark.
Many image datasets provide bounding boxes for a relevant
part of the image. This is also the case for PubFig: the dataset
index contains the coordinates of a bounding box for the
person's face. If these bounding boxes are not re-computed
by the client, any image resizing, such as in Figure 12c, can
render the cropped image useless for training.
C.2 Link Rot Statistics
Integrity checks based on cryptographic hashing reduces the
amount of data available in some datasets by a large amount.
We download the PubFig and FaceScrub datasets and compute
the prevalence of "link rot", where the URL listed in the
dataset index no longer resolves or returns a non-valid image.
In addition to dead links, we find that many successfully
downloaded images have been modified. We show aggregate
statistics in Table 3. In the PubFig dataset, over 50% of the
surviving images have a hash mismatch. However, many of
those images are modified in harmless ways. To show this,
we take a pre-trained face embedding model and fine-tune
a classifier for the PubFig classes using only images with a
correct hash. We then evaluate this classifier on the down-
loaded images with an incorrect hash, and find that we only
achieve 46.8% accuracy. Thus, many of these images were
modified in ways that obfuscate the identity of the person.
For FaceScrub, we find that fewer images have been modified.
About 70% of successfully downloaded images still match the
original hash. Of the images that were modified, we can still
classify 88.2% correctly, which indicates that most of these
changes are benign as illustrated in Figure 12b or Figure 12d.
For PubFig, we further investigate how frequently an image
change corresponds to a benign resizing, which nevertheless
renders the original bounding box obsolete (as in Figure 12c).
For this, we compare the CLIP (ViT-B-32-quickgelu from
[28]) embeddings of the full image to the names of the 200
public figures in the dataset, with a threshold cosine similarity
of 0.21. We find that 59.4% of images with incorrect hashes
are not close to any of the labels in CLIP space. Compar-
ing with Table 3, this corresponds to around 4% of incorrect
hashes being a result of modifications similar to Figure 12c.
Perceptual hashing or similar methods might alleviate this
problem, because images are often modified in trivial ways.
For example, as mentioned in Table 1, COYO-700M images
are distributed with pHash [32] which is robust to benign
image changes. However, perceptual hashes do not have the
same worst-case integrity guarantees as cryptographic hashes
[29]. There have been high-profile controversies due to the
mistaken use of perceptual hashing as a preimage resistant
algorithm [68]. It is widely believed that preimage attacks on
SHA-256 are impractical, while there is no known perceptual
hash function which has similar security guarantees.
D LAION Attack Details
Both attack methods in Section 4.5 poison a CLIP model so
as to bring the embeddings of some fixed images close to
the embeddings of target textual labels. The key technical
constraint in our experiment is that all attacks need to be
done in parallel to minimize costs, as retraining CLIP is quite
expensive.
Object-misclassification objective. The ImageNet dataset
[20] contains 1000 classes of images. The CLIP zero-shot
classifier on ImageNet returns the class label whose text em-
bedding has maximum cosine similarity to the image em-
bedding in CLIP latent space, across all ImageNet classes.
20
The goal of our poisoning attack is for the CLIP zero-shot
classifier to classify a particular image to a target incorrect
label.
We pick 10 classes as target labels for poisoning, such that
captions containing the label appear at least 1000 times in the
captions linked to cheap buyable domains; see Table 1. We
do the following for each chosen label, e.g. apple: choose a
set Sapple of 1000 caption-image pairs from buyable domains
such that apple appears in the captions. We also enforce that
the total cost of domains spanning Sclass for all chosen classes
is at most $1,000 USD. Then, we pick a single unrelated
image I-that wouldn't ordinarily be classified as apple-and
locally replace 1000 images from Sapple with image I. Thus
for each of the 10 classes, we poison 1000 images, or only
0.000025% of the data.
NSFW objective. The goal of this attack is to make the
NSFW filter that comes with the Stable Diffusion 1.4 model
in the Hugging Face diffusers library [75] mislabel a given
benign image as NSFW. The classifier is a cosine similarity
threshold function in CLIP latent space, comparing an image
embedding to a list of textual NSFW concepts [54].
We choose 10 benign images, and do the following for
each image I: choose 1000 caption-image pairs from buyable
domains such that the captions are labeled UNSAFE in the
LAION 400M metadata, and locally replace each of the corre-
sponding 1000 images with I. Again we choose images from
domains that cost less than $1,000 USD in total.
The experiment. For both attacks (and all chosen images)
simultaneously, we train an OpenCLIP [28] model on the the
LAION 400M dataset with the described modifications. We
train a ViT-B-32 CLIP model for 32 epochs, at a batch size of
3072 on 16 A100 GPUs. The object-misclassification attack
works for 60% of the targets: the chosen image gets classified
as the target label by a zero-shot CLIP classifier. The NSFW
attack works for 90% of targeted images.
E Landing Page for Purchased Domains
The following text was placed on the landing page for each
of the domains we purchased.
This domain is part of a research study. This domain name
was purchased as part of a research project studying to
what extent machine learning datasets change over time.
This domain name was included in one of these datasets
and hosted images that were part of this dataset, but the
previous owner let the domain name expire. We bought this
domain in August 2022 to measure the number of people
who query from these expired domains.
We bought a number of domains that were included in
many different datasets. All of these domains will return a
404 error for any requests except for the home page. You
should not need to take any additional steps to ensure your
datasets are unaffected by our study: if we had not bought
this domain the URL would have been NXDOMAIN and
you would have not received any content.
We may temporarily log metadata for requests sent to this
server to measure the prevalence of scraping this domain.
Any data we have logged will be deleted upon completion
of our study. If you would prefer not to participate in this
study, please contact us via the email address below and we
will delete any data you may have contributed to our study.
We would really appreciate it if you let us use your data; we
think this will be a valuable study.
If you have any questions about this study you can contact
for
[email protected]
additional information.
This used to be my domain. Can I have it back? If you are
the original owner of this domain, we would be happy to
return it to you at your request to the above email address.
We will let this domain expire when we have finished our
research study.
Will this cause problems with my downloaded dataset?
As we say above, if you are scraping this dataset, you
should not need to take any steps to specifically avoid
this domain (or any other we have purchased). We
have tested that the 404 response we send will cause all
standard image downloading tools to skip the image entirely.
Will your study be published? We will publish our study
upon its completion. We expect this to occur within the next
several months. Please contact us if you would like a copy
of this study.
I have another question not mentioned. Please contact us at
[email protected] for addi-
tional information.
21
|
|
http://arxiv.org/abs/2302.10147v1 | 2023-02-20T18:26:52 | 2023-02-20T18:26:52 | A DNN based Normalized Time-frequency Weighted Criterion for Robust
Wideband DoA Estimation | Deep neural networks (DNNs) have greatly benefited direction of arrival (DoA)
estimation methods for speech source localization in noisy environments.
However, their localization accuracy is still far from satisfactory due to the
vulnerability to nonspeech interference. To improve the robustness against
interference, we propose a DNN based normalized time-frequency (T-F) weighted
criterion which minimizes the distance between the candidate steering vectors
and the filtered snapshots in the T-F domain. Our method requires no
eigendecomposition and uses a simple normalization to prevent the optimization
objective from being misled by noisy filtered snapshots. We also study
different designs of T-F weights guided by a DNN. We find that duplicating the
Hadamard product of speech ratio masks is highly effective and better than
other techniques such as direct masking and taking the mean in the proposed
approach. However, the best-performing design of T-F weights is
criterion-dependent in general. Experiments show that the proposed method
outperforms popular DNN based DoA estimation methods including widely used
subspace methods in noisy and reverberant environments. | [
"Kuan-Lin Chen",
"Ching-Hua Lee",
"Bhaskar D. Rao",
"Harinath Garudadri"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.10147v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.10147v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "eess.AS",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"eess.AS",
"cs.LG",
"cs.SD",
"eess.SP"
] | 3
2
0
2
b
e
F
0
2
]
S
A
.
s
s
e
e
[
1
v
7
4
1
0
1
.
2
0
3
2
:
v
i
X
r
a
A DNN BASED NORMALIZED TIME-FREQUENCY WEIGHTED CRITERION FOR ROBUST
WIDEBAND DOA ESTIMATION
Kuan-Lin Chen1, Ching-Hua Lee1, Bhaskar D. Rao1, and Harinath Garudadri2
1Department of Electrical and Computer Engineering, University of California, San Diego
2Qualcomm Institute, University of California, San Diego
ABSTRACT
Deep neural networks (DNNs) have greatly benefited direction of
arrival (DoA) estimation methods for speech source localization in
noisy environments. However, their localization accuracy is still
far from satisfactory due to the vulnerability to nonspeech interfer-
ence. To improve the robustness against interference, we propose
a DNN based normalized time-frequency (T-F) weighted criterion
which minimizes the distance between the candidate steering vectors
and the filtered snapshots in the T-F domain. Our method requires no
eigendecomposition and uses a simple normalization to prevent the
optimization objective from being misled by noisy filtered snapshots.
We also study different designs of T-F weights guided by a DNN. We
find that duplicating the Hadamard product of speech ratio masks
is highly effective and better than other techniques such as direct
masking and taking the mean in the proposed approach. However,
the best-performing design of T-F weights is criterion-dependent in
general. Experiments show that the proposed method outperforms
popular DNN based DoA estimation methods including widely used
subspace methods in noisy and reverberant environments.
Index Terms- Speech source localization, direction of arrival,
spatial covariance matrix, deep neural networks, array processing
1. INTRODUCTION
One of the goals in speech source localization for many applications
such as hearing aids [1] and augmented hearing systems [2] is to
estimate the direction of arrival (DoA) of speech signals using mi-
crophone arrays. Building upon the foundation of narrowband DoA
estimation, the most widely used wideband methods are based on
a coherent combination of spatial spectra [3, 4] or spatial covari-
ance matrices (SCMs) [5, 6] at different frequencies to improve the
robustness of DoA estimates against noise. For example, the wide-
band MUltiple SIgnal Classification (MUSIC) [7] and its variants
[8, 9]. However, the performance of these conventional methods de-
grades rapidly with a lower signal-to-noise ratio (SNR) or signal-to-
interference ratio (SIR). Without reducing the noise and interference
components from the snapshots (see Section 2), it is difficult to im-
prove the estimation of SCMs of the speech for better performance.
The advent of deep learning has opened up many opportunities
for conventional approaches [10]. With DNNs, rich T-F patterns in
speech and nonspeech are learned to remove noisy components from
microphone measurements [11]. For example, in [12, 13, 14, 15], T-
F weights predicted from DNNs are assigned to snapshots to better
estimate speech SCMs, resulting in the so-called weighted SCMs
(WSCMs). When a snapshot is more noisy, a smaller T-F weight
This work was supported in part by NIH/NIDCD under Grant
R01DC015436 and in part by NSF/IIS under Grant 1838897.
150
180
210
120
90
1
0.8
0.6
0.4
0.2
0
60
120
30
150
0
180
90
1
0.8
0.6
0.4
0.2
0
60
120
30
150
0
180
60
90
1
0.8
0.6
0.4
0.2
0
MUSIC
Proposed
270
300
240
330
210
330
210
240
300
240
300
270
270
30
0
330
(a) SIR = −6 dB.
(b) SIR = 0 dB.
(c) SIR = 20 dB.
Fig. 1. Normalized spatial pseudo-spectra. ♦ and × represent the
speaker and interference, respectively. The proposed method (6) is
more robust than the DNN based MUSIC (1) in a wide range of SIRs.
is assigned to de-emphasize its contribution to a speech SCM es-
timate. Because these WSCMs contain less interference and noise
components, they are more accurate speech SCMs achieving supe-
rior performance for conventional DoA estimation approaches such
as wideband MUSIC and its variants. Many other applications such
as acoustic beamforming, speech enhancement, and speech recogni-
tion [16, 17, 18, 19, 20, 21, 22] have adopted such a framework to
improve the estimation of SCMs for downstream tasks.
While recent progress in the above works has demonstrated bet-
ter estimation of speech SCMs using DNNs, we also find that most
of them are still vulnerable to nonspeech interference, even though
it is weaker than the target speech. For example, the two popu-
lar subspace approaches including the WSCM based MUSIC [12]
and principal vector method [13, 14, 15], where the latter has been
widely used in many neural beamforming works. Because these
methods use normalized eigenvectors of WSCMs to determine the
spatial spectra at different frequencies, they lose the information en-
coded by eigenvalues that are known to highly correlate with SNR
and SIR. Furthermore, these methods rely on the assumption that the
power of the target signal component is larger than the noise or in-
terference, which is unlikely to be true for all frequency components
even for an interference that is weaker than speech. These robustness
issues in the WSCM based subspace methods make them less attrac-
tive compared to other DNN based methods such as [23, 24]. On
the other hand, a comparative study of the best-performing design of
T-F weights for different algorithms still remains largely lacking.
In this paper, we propose a normalized T-F weighted criterion
and study different designs of the T-F weights guided by a DNN
for robust wideband DoA estimation. Our criterion exploits all T-
F weights and is more robust to noise and interference with less
computational complexity as compared to existing WSCM based ap-
proaches that rely on subspaces and eigendecomposition. The pro-
posed method can be applied to arbitrary array geometries, and the
DNN used to guide T-F weights is independent of the microphone
array used. The training data in our methods are easy to obtain
because only single-channel speech and nonspeech corpora are re-
quired for training. Experiments show that the proposed normal-
ized T-F weighted method outperforms the DNN based subspace ap-
proaches including the popular MUSIC and principal vector method,
and a DNN based non-subspace method using the steered response
power (SRP), under different types and levels of interference in noisy
and reverberant environments.
2. THE SIGNAL MODEL
T
P
* * *
y2(t, f )
Let the received signal at the M -element microphone array in
the short-time Fourier transform (STFT) domain be y(t, f ) =
∈ CM for all (t, f ) with
yM (t, f )
y1(t, f )
the frequency bin index f ∈ {1, 2, * * * , F } and time frame index
(cid:2)
(cid:3)
I
i=1 rm,si (f )si(t, f ) +
t ∈ {1, 2, * * * , T } where ym(t, f ) =
K
k=1 rm,hk (f )hk(t, f ) + nm(t, f ) for m = 1, 2, * * * , M . We
have used si(t, f ) ∈ C to denote the STFT of the time-domain target
P
speech signal si(τ ), hk(t, f ) ∈ C to denote the STFT of the time-
domain nonspeech interference hk(τ ), and nm(t, f ) ∈ C to denote
the STFT of the time-domain additive noise on the m-th micro-
phone. I and K are nonnegative integers representing the number of
speech sources and interference sources, respectively. rm,si (f ) ∈ C
denotes the acoustic transfer function (ATF) between the location of
the i-th target and microphone m. rm,hk (f ) ∈ C denotes the ATF
between the location of the k-th interference and microphone m.
The vector y(t, f ) is referred to as the snapshot in the literature. ⊙
denotes the Hadamard product. Let [M ] = {1, 2, * * * , M }.
3. OPTIMIZATION CRITERIA IN PRIOR WORK
In this section, we review two popular wideband DoA estima-
tion approaches and point out their issues. Define w(t, f ) =
w1(t, f ) w2(t, f )
where wm(t, f ) is an es-
timate of the ideal ratio mask (IRM) for the m-th microphone. Under
(cid:2)
the noise subspace assumption, the popular DNN based MUSIC [12]
finds the DoA by solving the following optimization problem
* * * wM (t, f )
(cid:3)
T
max
θ Xf
1
vH(θ, f )N(f )NH(f )v(θ, f )
(1)
where N(f ) represents the noise subspace formed by the eigenvec-
tors corresponding to the M − 1 smallest eigenvalues of the WSCM
Φ(f ) =
w(t, f ) ⊙ y(t, f )
w(t, f ) ⊙ y(t, f )
Xt (cid:2)
(cid:3) (cid:2)
H
.
(cid:3)
(2)
The DNN-guided T-F weights w(t, f ) are introduced to filter the
snapshot at every T-F bin. The weights wm(t, f ) are predicted by
a DNN model followed by a post-processing technique before solv-
ing the optimization problem for θ. We describe the prediction and
learning of these T-F weights in Section 4.2. We have used v(θ, f ) ∈
CM to denote the array manifold (or steering vector) at DoA θ and
frequency corresponding to the bin index f under the plane wave as-
sumption [8]. Another popular approach [13, 14, 15] is the principal
vector method relying on the signal subspace, which finds the DoA
by solving the following optimization problem
H
H
(θ, f )p(f )p
v
(f )v(θ, f )
(3)
max
θ Xf
where p(f ) is the principal eigenvector of the WSCM Φ(f ). (1)
and (3) are common subspace approaches. Remark 1 and 2 point out
their weaknesses. In terms of computational complexity, computing
the signal or noise subspace requires performing eigenvalue decom-
position which is computationally expensive when M is large.
Remark 1. The power of the speech signal is assumed to be larger
than the power of undesired signals. When the interference and noise
are stronger than the speech signal at some frequencies, such an as-
sumption can create misleading spatial spectra at those frequencies.
Remark 2. Because w(t, f ) suppresses the interference and noise,
the principal eigenvalue of an SCM at a noisy frequency is reduced.
Taking normalized eigenvectors of every WSCM from different fre-
quencies and combining them uniformly in (1) or (3) weight every
frequency equally, losing the ability to de-emphasize the interference
and noise components according to the eigenvalues in the objective.
4. PROPOSED METHODS
To overcome the limitations revealed by Remarks 1 and 2, one can
use a non-subspace method. The most intuitive approach is a DNN
based SRP method solving the following optimization problem
H
v
(θ, f )Φ(f )v(θ, f )
(4)
max
θ Xf
in which it uses the whole covariance matrix Φ(f ). Such an ap-
proach is free from the power assumption and picking eigenvectors
as a signal or noise subspace. However, it heavily relies on the es-
timation quality of T-F weights w(t, f ). Since (4) is not robust to
imperfect w(t, f ), it is still vulnerable to interference and noise.
4.1. A Robust DNN based Normalized T-F Weighted Criterion
When the magnitude of the measurement y(t, f ) is large with the
corresponding wm(t, f ) being not sufficiently small for some m, a
normalization of the magnitude of y(t, f ) can prevent the objective
function from relying on a single low SNR or SIR snapshot (outlier)
to a certain degree. Based on such a rationale, we first normalize the
filtered snapshot at every T-F bin and then directly match a candi-
date steering vector to the normalized filtered snapshot, giving the
following DNN based normalized T-F weighted criterion
min
θ,S Xf Xt
(cid:13)
(cid:13)
(cid:13)
(cid:13)
w(t, f ) ⊙ y(t, f )
ky(t, f )k2
− s(t, f )v(θ, f )
2
2
(5)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
where the optimization variable matrix S ∈ CT ×F is the STFT of
the unknown target speech signal whose (t, f ) element is s(t, f ).
Note that it is reasonable to assume ky(t, f )k2 > 0 but we have
made a strong assumption that I = 1. Although θ and S are two
different unknowns, we are only interested in θ, which can be found
by peak detection without knowing S by Theorem 1.
Theorem 1. Let (θ∗, S∗) be any local minimizer of (5) and
̃y(t, f ) = w(t, f ) ⊙ y(t, f ). Then, θ∗ is a local maximizer of
H
v
(θ, f )
max
θ Xf
̃y(t, f ) ̃yH
(t, f )
ky(t, f )k2
2
Xt
v(θ, f ).
(6)
Also, any local maximizer of (6) is a θ∗.
Proof. θ∗ is equivalent
to a local maximizer of the objective
2 where v†(θ, f ) is the
k2
pseudoinverse of v(θ, f ). The spatial pseudo-spectrum at f is
P
tkv(θ, f )v†(θ, f ) w(t,f )⊙y(t,f )
ky(t,f )k2
P
f
given by tr
(θ, f )A(θ, f )
t
AH
(cid:18)
̃y(t,f ) ̃y
H
ky(t,f )k
(t,f )
2
2 (cid:19)
P
v(θ, f )v†(θ, f ), giving (6) with the cyclic property of the trace.
where A(θ, f ) =
4.2. Design of T-F Weights: DNN and Post-processing
To make the DNN predicting the T-F weights w(t, f ) indepen-
dent of the array geometry used in the wideband DoA estimation
problem, we propose a unified framework consisting of a signal
enhancement DNN model and a post-processing technique. Let
Wm, Gm, and Ym be T -by-F matrices whose (t, f )-th ele-
ment are wm(t, f ), Gm(t, f ), and ym(t, f ), respectively. For
all m ∈ {1, 2, * * * , M }, the DNN g : R2×T ×F → RT ×F in-
dividually predicts a weight matrix Gm by using the raw T-F
representation Ym ∈ CT ×F obtained at the m-th microphone.
Once all the weight matrices are computed, we feed them to a post-
processing function qm : RM ×T ×F → RT ×F to generate the final
T-F weights wm(t, f ) for the m-th microphone. Mathematically,
Wm = qm (G1, G2, * * * , GM ) where Gm is computed indepen-
R{Ym}, I{Ym}
dently by g, i.e., Gm = g
. We have used R
and I to extract the real and imaginary parts of a matrix, respec-
(cid:1)
(cid:0)
tively. We can utilize a different post-processing for qm as shown
in Table 1. The above composition of the post-processing and the
DNN establishes the design of T-F weights. During training, only
single-channel speech and nonspeech data are required and the DNN
model is trained to learn the ideal ratio mask (IRM) [11, 14].
Table 1. Examples of the post-processing function qm.
Post-processing
Expression for all m ∈ [M ]
Identity (direct masking)
Minimum
Maximum
Arithmetic mean
Arithmetic median
Hadamard product
Geometric mean
Binary thresholding (BT)
qm = Gm
[qm]t,f = mini∈[M ][Gi]t,f
[qm]t,f = maxi∈[M ][Gi]t,f
M
qm = 1
i=1 Gi
M
[qm]t,f = median({[Gi]t,f }M
qm = G1 ⊙ G2 ⊙ * * * ⊙ GM
[qm]t,f = M
M
i=1[Gi]t,f )
qQ
[qm]t,f = 1, if [Gm]t,f > β
[qm]t,f = 0, otherwise
P
i=1)
5. EXPERIMENTS
The experiments are conducted at 16 kHz with the target speech
from the TIMIT dataset [25],
interference from the PNL 100
nonspeech sounds [26] (machine, water, wind, etc), and white
Gaussian noise. We randomly divide the 100 nonspeech sounds
into 80 for training and 20 for testing. Code is available at
https://github.com/kjason/DnnNormTimeFreq4DoA.
The DNN: We use a U-Net [27] (0.67M parameters) to predict the
IRM. The logistic sigmoid function is applied to the last layer of the
U-Net. The loss function is an absolute error loss. The batch size
is 16. All networks are trained for 200 epochs. SGD with Nesterov
momentum is used. The momentum is set to 0.9. The weight decay
is 0.0005. The learning rate is initially set to 0.1 and decreased by
a factor of 5 after training 60, 120, and 160 epochs. The speech
and interference are created by mixing P clean speech files and P
interference files, respectively. P ∈ {1, 2, 3} is uniformly sampled
in each example and each file is uniformly sampled from the training
set. The SNR and SIR are uniformly sampled in the range of [0, 20]
and [−10, 20], respectively. We use PyTorch [28] to train the DNN.
Room acoustics and other settings: A 3D room with 9.0m (x-
axis), 7.0m (y-axis), and 3.5m (z-axis) is used. A 9-element
rectangular microphone array paralleled to the xy-plane with an
20
15
10
5
s
e
e
r
g
e
d
n
i
E
A
M
BT =0.10
BT =0.30
BT =0.50
BT =0.70
BT =0.90
BT =0.95
20
15
10
5
s
e
e
r
g
e
d
n
i
E
A
M
Constant
Identity
Min
Max
Mean
Median
Hadamard
Geom
BT =0.9
0
-10
-5
0
5
SIR (dB)
10
15
20
0
-10
-5
0
5
SIR (dB)
10
15
20
(a) BT with different β.
(b) Overall comparison.
Fig. 2. MAE in degrees vs. SIR (the same setting as Fig. 3). Differ-
ent post-processing functions are evaluated for the DNN based MU-
SIC (1). "Constant" means wm(t, f ) = 1, ∀(m, t, f ), leading to
original sample SCMs (the signal enhancement model is not used).
equal spacing 0.02m along the x-axis and y-axis is used. The cen-
ter of the microphone array is placed at the center of the room
(4.50m, 3.50m, 1.75m). The speed of sound is 343 m/s. For every
simulation using specified RT60, SNR, SIR, T , I, and K, we run
C = 200 trials to compute the mean absolute error (MAE) or accu-
racy. The accuracy is given by the number of successes divided by
C. A trial is rated as a success if |ˆθ − θgt| < θthreshold = 3◦. In each
trial, we uniformly place target speakers and nonspeech interference
sources at random in the room simulating a dining environment. The
distance r between a source (target or interference) and the center
of the microphone array on the xy-plane is uniformly sampled in the
range of 1.0m to 3.0m. The height z of the source is uniformly sam-
pled between 1.0m and 1.8m. The azimuthal angle θgt (the ground
truth DoA) is uniformly sampled between 0◦ and 360◦. The angle
between any two sources is at least θmin = 10◦ apart. For every
trial, we uniformly sample I clean speech files and K interference
files from the test sets. Pyroomacoustics [29] is used to generate the
RIRs based on the image source model [30] and detect peaks. The
resolution in the 1D grid search is 0.5◦. We assume only 1 speaker
in the room, i.e., I = 1, but allow multiple interference sources, i.e.,
K ≥ 1. T = 50 if not explicitly specified. 1024-point FFT is used.
Frequency bins corresponding to 50 Hz to 7 kHz are used because
this is the frequency band of wideband speech coders [31].
Baseline methods: The baselines are the DNN based MUSIC (1),
principal vector method (3), and SRP (4). We use the same DNN and
their best-performing post-processing techniques for comparison.
Post-processing methods: We consider every example in Table 1.
5.1. Different Post-processing Techniques for T-F Weights
Fig. 2(a) shows that a larger β in the BT post-progressing gives a
smaller MAE in MUSIC, indicating that the performance of DoA es-
timation can be improved by preserving only very high-quality snap-
shots. However, a higher β reduces the number of rank-one matrices
in the WSCM, potentially resulting in a singular WSCM. β = 0.9
and β = 0.95 give similar performance and we chose β = 0.9 as
the best parameter for BT. Fig. 2(b) shows the overall comparison
of different post-processing techniques. The BT gives noticeable
improvements over all the other post-processing techniques for MU-
SIC. For the proposed normalized T-F weighted method, Fig. 3(a)
shows that the Hadamard product is slightly better than the BT and
gives the best performance. Fig. 3(b) and 3(c) show that the BT
and the Hadamard product are the best-performing post-processing
for the principal vector method and the SRP method, respectively.
Notice that these results imply that the best post-processing of T-F
weights depends on the DoA algorithm. We use the best-performing
post-processing for each method in the following investigation.
20
15
10
5
s
e
e
r
g
e
d
n
i
E
A
M
20
15
10
5
s
e
e
r
g
e
d
n
i
E
A
M
20
15
10
5
s
e
e
r
g
e
d
n
i
E
A
M
Constant
Identity
Min
Max
Mean
Median
Hadamard
Geom
BT =0.9
0
-10
-5
0
5
SIR (dB)
10
15
20
0
-10
-5
0
5
SIR (dB)
10
15
20
0
-10
-5
0
5
SIR (dB)
10
15
20
(a) The proposed method (6).
(b) The principal vector method (3).
(c) The SRP method (4).
Fig. 3. MAE in degrees vs. SIR (K = 1, RT60 = 0.3s, and SNR = 20 dB). Different post-processing functions are evaluated for different
DNN based methods. Note that the ranking of these post-processing methods depends on the DoA estimation algorithm (also see Fig. 2).
MUSIC
Principal
SRP
Proposed
)
%
(
y
c
a
r
u
c
c
A
100
90
80
70
60
50
40
20
25
30
35
40
Number of snapshots
45
)
%
(
y
c
a
r
u
c
c
A
100
90
80
70
60
50
40
50
55
60
20
25
30
35
40
Number of snapshots
45
)
%
(
y
c
a
r
u
c
c
A
100
90
80
70
60
50
40
50
55
60
20
25
30
35
40
Number of snapshots
45
50
55
60
(a) −6 dB SIR.
(b) 0 dB SIR.
(c) +6 dB SIR.
Fig. 4. Accuracy vs. number of snapshots T (K = 1, RT60 = 0.3s, and SNR = 20 dB). The proposed method outperforms all baselines.
Table 2. DoA estimation accuracy. K = 2. SNR = 20 dB.
RT60 (seconds)
SIR (dB) −6
0.3
0
+6
−6
0.9
0
+6
MUSIC (eq. 1)
Principal (eq. 3)
SRP (eq. 4)
Proposed (eq. 6)
40% 52% 59% 30% 30% 33%
43% 77% 89% 51% 70% 79%
33% 59% 75% 28% 37% 40%
54% 81% 91% 59% 76% 88%
5.2. Robustness against a Wide Range of SIRs
Fig. 1 compares MUSIC and the proposed normalized T-F weighted
method under RT60 = 0.9s and SNR = 20 dB. It shows that MUSIC
can be easily misled by the interference and our proposed method is
able to accurately localize the speaker in a wide range of SIRs. Table
2 shows the accuracy for all the candidate methods under different
RT60 and SIRs in an environment that has two interference sources.
The proposed method strongly outperforms the other methods in all
cases. When the environment is more reverberant, the performance
degradation of the proposed method is less than the others.
5.4. A Closer Look at the Proposed Method
Fig. 5 focuses on the evaluation of the proposed normalized T-F
weighted method in different conditions including RT60 and SNRs.
In general, the accuracy improves with a higher SNR or lower RT60.
The accuracy can still approximately achieve more than 80% for
RT60 = 0.9s when both the SIR and SNR are larger than 10 dB.
100
80
60
40
20
)
%
(
y
c
a
r
u
c
c
A
RT60=0.3s, SNR= 0 dB
RT60=0.9s, SNR= 0 dB
RT60=0.3s, SNR=10 dB
RT60=0.9s, SNR=10 dB
RT60=0.3s, SNR=20 dB
RT60=0.9s, SNR=20 dB
0
-10
-5
0
5
SIR (dB)
10
15
20
Fig. 5. Evaluation of the proposed method. K = 2.
5.3. Number of Snapshots
6. CONCLUSION
In contrast to the proposed method, Fig. 4 shows that the accuracy
of MUSIC is barely improved with more snapshots, which implies
that the noise subspace is hardly improved with more snapshots. On
the other hand, the principal vector method performs much better,
implying that the signal subspace is a better choice here. The SRP
method is better than MUSIC but underperforms the principal vector
method. Lastly, Fig. 4 shows that the proposed method outperforms
all baselines. These results hold for a wide range of numbers of
snapshots T and different SIRs, demonstrating consistency.
To improve the robustness of WSCM based DoA estimation, we pro-
pose a normalized T-F weighted criterion that normalizes and filters
snapshots to prevent the optimization objective from being misled
by nonspeech components. Experimental results show that the pro-
posed criterion outperforms MUSIC, the principal vector method,
and SRP method in different noisy and reverberant environments
that contain nonspeech interference sources. Given that T-F weights
are crucial to performance, we also study different post-processing
techniques and find that the best design is criterion-dependent.
7. REFERENCES
[1] L. Pisha, J. Warchall, T. Zubatiy, S. Hamilton, C.-H. Lee, G.
Chockalingam, P. P. Mercier, R. Gupta, B. D. Rao, and H.
Garudadri, "A wearable, extensible, open-source platform for
hearing healthcare research," IEEE Access, vol. 7, pp. 162083–
162101, 2019.
[2] L. Pisha, S. Hamilton, D. Sengupta, C.-H. Lee, K. C. Vastare,
T. Zubatiy, S. Luna, C. Yalcin, A. Grant, R. Gupta, et al.,
"A wearable platform for research in augmented hearing," in
Asilomar Conference on Signals, Systems, and Computers.
IEEE, 2018, pp. 223–227.
[3] S. Mohan, M. L. Kramer, B. C. Wheeler, and D. L. Jones,
"Localization of nonstationary sources using a coherence test,"
in Workshop on Statistical Signal Processing. IEEE, 2003, pp.
470–473.
[4] S. Mohan, M. E. Lockwood, M. L. Kramer, and D. L. Jones,
"Localization of multiple acoustic sources with small arrays
using a coherence test," The Journal of the Acoustical Society
of America, vol. 123, no. 4, pp. 2136–2147, 2008.
[5] H. Wang and M. Kaveh, "Coherent signal-subspace processing
for the detection and estimation of angles of arrival of multiple
wide-band sources," IEEE Transactions on Acoustics, Speech,
and Signal Processing, vol. 33, no. 4, pp. 823–831, 1985.
[6] H. Hung and M. Kaveh,
"Focussing matrices for coherent
signal-subspace processing," IEEE Transactions on Acoustics,
Speech, and Signal Processing, vol. 36, no. 8, pp. 1272–1281,
1988.
[7] R. Schmidt, "Multiple emitter location and signal parameter
estimation," IEEE transactions on antennas and propagation,
vol. 34, no. 3, pp. 276–280, 1986.
[8] H. L. Van Trees, Optimum array processing: Part IV of detec-
tion, estimation, and modulation theory, John Wiley & Sons,
2004.
[9] M. R. Azimi-Sadjadi, A. Pezeshki, and N. Roseveare, "Wide-
band DOA estimation algorithms for multiple moving sources
IEEE Transactions on
using unattended acoustic sensors,"
Aerospace and Electronic Systems, vol. 44, no. 4, pp. 1585–
1599, 2008.
[10] K.-L. Chen, C.-H. Lee, H. Garudadri, and B. D. Rao,
"ResNEsts and DenseNEsts: Block-based DNN models with
improved representation guarantees," in NeurIPS, 2021.
[11] D. Wang and J. Chen, "Supervised speech separation based on
deep learning: An overview," IEEE/ACM TASLP, vol. 26, no.
10, pp. 1702–1726, 2018.
[12] C. Xu, X. Xiao, S. Sun, W. Rao, E. S. Chng, and H. Li,
"Weighted spatial covariance matrix estimation for MUSIC
in Interspeech,
based TDOA estimation of speech source,"
2017, pp. 1894–1898.
[13] B. Yang, H. Liu, and C. Pang, "Multiple sound source count-
ing and localization based on spatial principal eigenvector," in
Interspeech, 2017, pp. 1924–1928.
[14] Z.-Q. Wang, X. Zhang, and D. Wang, "Robust speaker local-
ization guided by deep learning-based time-frequency mask-
ing," IEEE/ACM TASLP, vol. 27, no. 1, pp. 178–188, 2018.
[15] B. Yang, H. Liu, C. Pang, and X. Li, "Multiple sound source
counting and localization based on TF-wise spatial spectrum
clustering," IEEE/ACM TASLP, vol. 27, no. 8, pp. 1241–1255,
2019.
[16] J. Heymann, L. Drude, and R. Haeb-Umbach, "Neural network
based spectral mask estimation for acoustic beamforming," in
ICASSP. IEEE, 2016, pp. 196–200.
[17] H. Erdogan, J. R. Hershey, S. Watanabe, M. I. Mandel, and
J. Le Roux, "Improved MVDR beamforming using single-
channel mask prediction networks," in Interspeech, 2016, pp.
1981–1985.
[18] X. Xiao, S. Zhao, D. L. Jones, E. S. Chng, and H. Li, "On
time-frequency mask estimation for MVDR beamforming with
application in robust speech recognition," in ICASSP. IEEE,
2017, pp. 3246–3250.
[19] T. Ochiai, S. Watanabe, T. Hori, J. R. Hershey, and X.
"Unified architecture for multichannel end-to-end
Xiao,
IEEE Jour-
speech recognition with neural beamforming,"
nal of Selected Topics in Signal Processing, vol. 11, no. 8, pp.
1274–1288, 2017.
[20] Z.-Q. Wang and D. Wang, "All-neural multi-channel speech
enhancement," in Interspeech, 2018, pp. 3234–3238.
[21] Z.-Q. Wang, X. Zhang, and D. Wang, "Robust TDOA esti-
mation based on time-frequency masking and deep neural net-
works," in Interspeech, 2018, pp. 322–326.
[22] L. Pfeifenberger, M. Z ̈ohrer, and F. Pernkopf, "Eigenvector-
based speech mask estimation for multi-channel speech en-
hancement," IEEE/ACM TASLP, vol. 27, no. 12, pp. 2162–
2172, 2019.
[23] P. Pertil ̈a and E. Cakir, "Robust direction estimation with con-
volutional neural networks based steered response power," in
ICASSP. IEEE, 2017, pp. 6125–6129.
[24] Z. Wang, J. Li, and Y. Yan, "Target speaker localization based
on the complex Watson mixture model and time-frequency se-
lection neural network," Applied Sciences, vol. 8, no. 11, pp.
2326, 2018.
[25] J. S. Garofolo, L. F. Lamel, W. M. Fisher, J. G. Fiscus, D. S.
Pallett, N. L. Dahlgren, and V. Zue, "TIMIT acoustic-phonetic
continuous speech corpus," Linguistic Data Consortium, 1993.
[26] G. Hu and D. Wang, "A tandem algorithm for pitch estimation
and voiced speech segregation," IEEE TASLP, vol. 18, no. 8,
pp. 2067–2079, 2010.
[27] O. Ronneberger, P. Fischer, and T. Brox,
"U-Net: Convo-
in
lutional networks for biomedical image segmentation,"
International Conference on Medical Image Computing and
Computer-Assisted Intervention. Springer, 2015, pp. 234–241.
[28] A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G.
Chanan, T. Killeen, Z. Lin, N. Gimelshein, L. Antiga, et al.,
"PyTorch: An imperative style, high-performance deep learn-
ing library," in NeurIPS, 2019.
[29] R. Scheibler, E. Bezzam, and I. Dokmani ́c, "Pyroomacous-
tics: A python package for audio room simulation and array
processing algorithms," in ICASSP. IEEE, 2018, pp. 351–355.
[30] J. B. Allen and D. A. Berkley, "Image method for efficiently
simulating small-room acoustics," The Journal of the Acousti-
cal Society of America, vol. 65, no. 4, pp. 943–950, 1979.
[31] R. V. Cox, S. F. D. C. Neto, C. Lamblin, and M. H. Sherif,
"ITU-T coders for wideband, superwideband, and fullband
speech communication [series editorial]," IEEE Communica-
tions Magazine, vol. 47, no. 10, pp. 106–109, 2009.
|
|
http://arxiv.org/abs/2302.10145v1 | 2023-02-20T18:23:47 | 2023-02-20T18:23:47 | Improving Deep Policy Gradients with Value Function Search | Deep Policy Gradient (PG) algorithms employ value networks to drive the
learning of parameterized policies and reduce the variance of the gradient
estimates. However, value function approximation gets stuck in local optima and
struggles to fit the actual return, limiting the variance reduction efficacy
and leading policies to sub-optimal performance. This paper focuses on
improving value approximation and analyzing the effects on Deep PG primitives
such as value prediction, variance reduction, and correlation of gradient
estimates with the true gradient. To this end, we introduce a Value Function
Search that employs a population of perturbed value networks to search for a
better approximation. Our framework does not require additional environment
interactions, gradient computations, or ensembles, providing a computationally
inexpensive approach to enhance the supervised learning task on which value
networks train. Crucially, we show that improving Deep PG primitives results in
improved sample efficiency and policies with higher returns using common
continuous control benchmark domains. | [
"Enrico Marchesini",
"Christopher Amato"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.10145v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.10145v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.AI"
] | 3
2
0
2
b
e
F
0
2
]
G
L
.
s
c
[
1
v
5
4
1
0
1
.
2
0
3
2
:
v
i
X
r
a
Published as a conference paper at ICLR 2023
IMPROVING DEEP POLICY GRADIENTS
WITH VALUE FUNCTION SEARCH
Enrico Marchesini, Christopher Amato
Khoury College of Computer Sciences
Northeastern University
Boston, MA, USA
{e.marchesini, c.amato}@northeastern.edu
ABSTRACT
Deep Policy Gradient (PG) algorithms employ value networks to drive the learn-
ing of parameterized policies and reduce the variance of the gradient estimates.
However, value function approximation gets stuck in local optima and struggles
to fit the actual return, limiting the variance reduction efficacy and leading policies
to sub-optimal performance. This paper focuses on improving value approxima-
tion and analyzing the effects on Deep PG primitives such as value prediction,
variance reduction, and correlation of gradient estimates with the true gradient.
To this end, we introduce a Value Function Search that employs a population of
perturbed value networks to search for a better approximation. Our framework
does not require additional environment interactions, gradient computations, or
ensembles, providing a computationally inexpensive approach to enhance the su-
pervised learning task on which value networks train. Crucially, we show that
improving Deep PG primitives results in improved sample efficiency and policies
with higher returns using common continuous control benchmark domains.
1
INTRODUCTION
Deep Policy Gradient (PG) methods achieved impressive results in numerous control tasks (Haarnoja
et al., 2018). However, these methods deviate from the underlying theoretical framework to compute
gradients tractably. Hence, the promising performance of Deep PG algorithms suggests a lack of
rigorous analysis to motivate such results. Ilyas et al. (2020) investigated the phenomena arising
in practical implementations by taking a closer look at key PG primitives (e.g., gradient estimates,
value predictions). Interestingly, the learned value networks used for predictions (critics) poorly fit
the actual return. As a result, the local optima where critics get stuck limits their efficacy in the
gradient estimates, driving policies (actors) toward sub-optimal performance.
Despite the lack of investigations to understand Deep PG's results, several approaches have been
proposed to improve these methods. Ensemble learning (Lee et al., 2021; He et al., 2022), for
example, combines multiple learning actors' (or critics') predictions to address overestimation and
foster diversity. These methods generate different solutions that improve exploration and stabilize
the training, leading to higher returns. However, the models used at training and inference time
pose significant challenges that we discuss in Section 5. Nonetheless, popular Deep Reinforcement
Learning (RL) algorithms (e.g., TD3 (Fujimoto et al., 2018)) use two value networks, leveraging the
benefits of ensemble approaches while limiting their complexity. To address the issues of ensembles,
gradient-free methods have been recently proposed (Khadka & Tumer, 2018; Marchesini & Farinelli,
2020; Sigaud, 2022). The idea is to complement Deep PG algorithms with a search mechanism that
uses a population of perturbed policies to improve exploration and to find policy parameters with
higher payoffs. In contrast to ensemble methods that employ multiple actors and critics, gradient-
free population searches typically focus on the actors, disregarding the value network component of
Deep PG. Section 5 discusses the limitations of policy search methods in detail. However, in a PG
context, critics have a pivotal role in driving the policy learning process as poor value predictions
lead to sub-optimal performance and higher variance in gradient estimates (Sutton & Barto, 2018).
1
Published as a conference paper at ICLR 2023
Such issues are further exacerbated in state-of-the-art
Deep PG methods as they struggle to learn good value
function estimation Ilyas et al. (2020). For this reason, we
propose a novel gradient-free population-based approach
for critics called Value Function Search (VFS), depicted
in Figure 1. We aim to improve Deep PG algorithms by
enhancing value networks to achieve (i) a better fit of the
actual return, (ii) a higher correlation of the gradients es-
timate with the (approximate) true gradient, and (iii) re-
duced variance. In detail, given a Deep PG agent charac-
terized by actor and critic networks, VFS periodically instantiates a population of perturbed critics
using a two-scale perturbation noise designed to improve value predictions. Small-scale perturba-
tions explore local value predictions that only slightly modify those of the original critic (similarly
to gradient-based perturbations (Lehman et al., 2018; Martin H. & de Lope, 2009; Marchesini &
Amato, 2022)). Big-scale perturbations search for parameters that allow escaping from local op-
tima where value networks get stuck. In contrast to previous search methods, evaluating perturbed
value networks require computing standard value error measures using samples from the agent's
buffer. Hence, the Deep PG agent uses the parameters with the lowest error until the next periodical
search. Crucially, VFS's critics-based design addresses the issues of prior methods as it does not
require a simulator, hand-designed environment interactions, or weighted optimizations. Moreover,
our population's goal is to find the weights that minimize the same objective of the Deep PG critic.
Figure 1: Overview of VFS.
We show the effectiveness of VFS on different Deep PG baselines: (i) Proximal Policy Optimization
(PPO) (Schulman et al., 2017), (ii) Deep Deterministic Policy Gradient (DDPG) (Lillicrap et al.,
2016), and (iii) TD3 on a range of continuous control benchmark tasks (Brockman et al., 2016;
Todorov et al., 2012). We compare over such baselines, an ensembled Deep RL method, SUNRISE
(Lee et al., 2021), and the policy search Supe-RL (Marchesini et al., 2021a). In addition, we analyze
key Deep PG primitives (i.e., value prediction errors, gradient estimate, and variance) to motivate
the performance improvement of VFS-based algorithms. Our evaluation confirms that VFS leads to
better gradient estimates with a lower variance that significantly improve sample efficiency and lead
to policies with higher returns. Our analysis highlights a fundamental issue with current state-of-
the-art Deep PG methods, opening the door for future research.
2 BACKGROUND
PG methods parameterize a policy πθ with a parameters vector θ (typically the weights of a Deep
Neural Network (DNN) in a Deep PG context), and πθ(at|st) models the probability to take action
at in a state st at step t in the environment. These approaches aim to learn θ following the gradient
of an objective ηθ over such parameters (Sutton & Barto, 2018). Formally, the primitive gradient
estimate on which modern Deep PG algorithms build has the following form (Sutton et al., 1999):
∇ηθ = E(st,at)∈τ ∼πθ [∇θlogπθ(at|st)Qπθ (st, at)]
(1)
where (st, at) ∈ τ ∼ πθ are states and actions that form the trajectories sampled from the distribu-
tion induced by πθ, and Qπθ (st, at) is the expected return after taking at in st. However, Equation
1 suffers from high-variance expectation, and different baselines have been used to margin the issue.
In particular, given a discount value γ ∈ [0, 1), the state-value function Vπθ (s) is an ideal baseline
as it leaves the expectation unchanged while reducing variance (Williams, 1992):
(cid:34)
Vπθ (s) = Eπθ
Gt :=
∞
(cid:88)
(cid:35)
γtrt+1|st = s
t
(2)
where Gt is the sum of future discounted rewards (return). Despite building on the theoretical
framework of PG, Deep PG algorithms rely on several assumptions and approximations for design-
ing feasible updates for the policy parameters. In more detail, these methods typically build on
surrogate objective functions that are easier to optimize. A leading example is TRPO (Schulman
et al., 2015), which ensures that a surrogate objective updates the policy locally by imposing a trust
region. Formally, TRPO imposes a constraint on the Kullback–Leibler diverge (KL) on successive
policies πθ, πθ(cid:48), resulting in the following optimization problem:
(cid:20) πθ(at|st)
πθ(cid:48)(at|st)
s.t. DKL(πθ(*|s)||πθ(cid:48)(*|s)) ≤ δ
(cid:21)
Aπθ (st, at)
max
θ
Eπθ
(3)
2
Published as a conference paper at ICLR 2023
where δ is a hand-tuned divergence threshold, and A(s, a) = Q(s, a) − V (s) is the advantage func-
tion. In practical implementations, Equation 3 is tractably optimized with additional tricks: (i) a
second-order approximation of the objective, (ii) a mean KL of the current trajectory instead of the
actual KL divergence. Given TRPO's computational demands, Schulman et al. (2017) further "re-
laxes" the optimization landscape by replacing the constraint with the following clipped objective,
providing a significantly faster (i.e., less demanding) yet better-performing alternative over TRPO:1
max
θ
Eπθ
(cid:20)
min
(cid:18) πθ(at|st)
πθ(cid:48)(at|st)
A(st, at), clip
(cid:18) πθ(at|st)
πθ(cid:48)(at|st)
(cid:19)
(cid:19)(cid:21)
, 1 − (cid:15), 1 + (cid:15)
A(st, at)
(4)
Similarly, Lillicrap et al. (2016) uses the deterministic PG theorem (Silver et al., 2014) for learn-
ing deterministic policies μθ(s). DDPG and further optimizations (e.g., TD3) are tightly related
to standard Q-learning (Watkins & Dayan, 1992) and assume having a differentiable action-value
function over actions. Deterministic PG algorithms learn the value parameters as in standard Double
DQN. In contrast, policy parameters are learned under the maxθ Eπθ [Qφ(s, μθ(s))] optimization
problem, where φ are the parameters of the critic. Moreover, TD3 addresses the overestimation of
DDPG with additional tricks, e.g., learning two value functions, being pessimistic about the action
value to use for the target computation, and delaying the policy updates.
In summary, Deep PG algorithms build their success on learning value functions for driving the
learning of the policy parameters θ. However, significant research efforts have been devoted to
improving policies, while the attention to improving critics appears marginal. Hence, to our knowl-
edge, VFS is the first gradient-free population-based approach that works on top of Deep PG to
improve critics without facing the complexities of learning ensembles or policy searches.
2.1 GRADIENT-INFORMED PERTURBATIONS
Policy search approaches generate a population of perturbed versions of the agent's policy πθ to ex-
plore variations with higher returns (Khadka & Tumer, 2018; Marchesini & Farinelli, 2022; March-
esini et al., 2021b; Colas et al., 2018; Sigaud, 2022). To this end, gradient-informed perturbations
(or variations) have been employed for limiting detrimental effects on πθ, exploring small changes
in the population's action sampling process (Lehman et al., 2018; Marchesini et al., 2022). In more
detail, prior methods express the average divergence of a policy at state s over a perturbation ω as:
d(πθ, ω) = (cid:107)πθ(*|s) − πθ+ω(*|s)(cid:107)2
and use the gradient of such divergence to approximate the sensitivity of θ over the policy decisions,
which is used to normalize Gaussian-based perturbations. Formally, following Lehman et al. (2018):
(5)
∇θa d(πθ, ω) ≈ ∇θd(πθ, 0) + Hθ(d(πθ, 0))ω
where Hθ is the Hessian of divergence with respect to θ. Although simpler first-order approxi-
mations achieve comparable results, gradient-based perturbations add significant overhead to the
training process. Prior work introduced gradient-based variations because evaluating the popula-
tion against detrimental changes is hard. As such, the quality of perturbed policies is assessed over
many trajectories to ensure that they effectively achieve higher returns over arbitrary initializations
(Marchesini et al., 2021a). In contrast, we focus on a critics-based search where high-scale per-
turbations may help the learning process to escape from local optima, achieving better predictions.
Hence, VFS relies on a two-scale perturbation approach to maintain similar value predictions to the
original value function while exploring diverse parameters to escape from local optima.
(6)
3 VALUE FUNCTION SEARCH
We introduce a gradient-free population-based search with two-scale perturbations to enhance critics
employed in Deep PG. Ultimately, we aim to show that value functions with better predictions
improve Deep PG primitives, leading to better sample efficiency and policies with higher returns.
Algorithm 1 shows the general flow of the proposed Value Function Search framework. During a
standard training procedure of a Deep PG agent, VFS periodically generates a population P of per-
turbed value networks, starting from the agent's current critic parametrized by φ. We first instantiate
1We do not consider the unconstrained penalty-based PPO due to the better performance of the clipped one.
3
Published as a conference paper at ICLR 2023
n copies of φ and two Gaussian noise distributions Gmin,max with σmin,max standard deviation for
the two-scale variations (lines 3-4). Hence, we sample from the two distributions to apply each per-
turbation to half of the population (lines 5-6). In contrast to single-scale or gradient-based perturba-
tions of prior work (Khadka & Tumer, 2018; Marchesini et al., 2021a; Sigaud, 2022), the two scales
approach for value networks has the following advantages:2 (i) Gmin maintains similar predictions
to those of the unperturbed critic, similarly to gradient-based variations. Sampling from N (0, σmin)
translates into small changes in the value prediction process to find a better set of parameters within
a local search fashion. (ii) Gmax is a Gaussian with a greater standard deviation N (0, σmax) used
to explore diverse value predictions to escape from local optima. (iii) Gaussian-based perturbations
do not introduce significant overhead as gradient-based variations. After generating the population,
VFS samples a batch b of trajectories from the agent's buffer B. There are different strategies for
sampling the required experiences from the agent's memory based on the nature of the Deep PG al-
gorithm. When using an on-policy agent (e.g., TRPO, PPO), we apply VFS after updating the policy
and value networks. In this way, we reuse the same on-policy data to evaluate whether a perturbed
set of weights has better value prediction (i.e., lower error). Off-policy agents (e.g., DDPG, TD3)
could follow a similar strategy. Still, the reduced size of the mini-batches typically employed by
off-policy updates would result in noisy evaluations. For this reason, we sample a larger batch of
experiences to provide a more robust evaluation. In practice, to compute the prediction errors for
each value network in the population (line 7), we use the typical objective used to train PG critics,
the Mean Squared Error (MSE) (Sutton & Barto, 2018), whose general formulation is:
mseφi(b) =
1
|b|
(cid:88)
(cid:104)
s∈b
Vπ(s) − Vπφi
(cid:105)2
(s)
(7)
where Vπ(s) is the true value function. However, it is typically unfeasible to access the true Vπ(s)
and, as in standard training procedures of Deep PG algorithms, we rely on noisy samples of Vπ(s) or
bootstrapped approximations. In more detail, on-policy updates are particularly interesting, as Deep
PG algorithms typically learn critics with Monte-Carlo methods without bootstrapping the target
value. Hence, performing a supervised learning procedure on (st, Gt) pairs, where the return Gt is
an unbiased, noisy sample of Vπ(s) that replaces the expectation of Equation 2 with an empirical
average. We then refer to a perturbed critic as a local improvement of the original unperturbed one
when it achieves a lower error on b. In our context, given a value network parametrized by φ, a
batch of visited trajectories b, and a perturbation ω, we define the value network parametrized by
φ + ω to be a local improvement of φ when mseφ+ω(b) ≤ mseφ(b). Moreover, in the limit where
b samples all the trajectories, Gt ≡ Vπ(st), and mseφ+ω(b) ≤ mseφ(b) means that φ + ω is a
better or equal fit of the actual value function with respect to the original φ. Crucially, Monte-Carlo
value approximation converges to a local optimum even when using non-linear approximation (Sut-
ton & Barto, 2018). Hence, on-policy VFS potentially maintains the same convergence guarantees
of the baseline.3 To this end, it would be possible to anneal the perturbation scales to zero out the
impact of VFS over the training phase. Hence, providing the diversity benefits of VFS early in
the training while maintaining the convergence guarantee of the baseline algorithm within the limit.
Algorithm 1 Value Function Search
1: Given:
(i) a Deep PG agent with a value network parametrized by φ at training epoch e; (ii)
a buffer B of visited trajectories; (iii) periodicity es for VFS and population size n; (iv) scale
σmin,max for the two-scale Gaussian noise G.
2: if e % es = 0 then
3:
4:
5:
P ← {φ0, . . . , φn} copies of φ
Gmin,max ← N (0, σmin,max)
φ1: |P |
2 :n ← φi + Gmax
b ← Sample a batch of trajectories from B
6:
7: mseP ← Evaluate P over b as Equation 7
8:
← φi + Gmin φ |P |
(mseP )
2
φ ← min
φi∈P
9: end if
2We support claims on our perturbation approach with additional experiments in Section 4.
3Due to bootstrapping, the same result generally does not apply to temporal difference targets.
4
Published as a conference paper at ICLR 2023
Nonetheless, as discussed in Ilyas et al. (2020), Deep PG algorithms deviate from the underlying
theoretical framework. We performed additional experiments in Section 4 to show that maintaining
VFS through the entire learning process results in better performance over zeroing out the pertur-
bations. Moreover, in a worst-case scenario where the population search never improves the value
prediction locally, VFS matches the same local optima of the original approach. However, following
the insights of Fujimoto et al. (2018), practical Deep PG algorithms can not theoretically guarantee
to reduce estimation errors or improve predictions outside the batch used for computing the update.
VFS addresses most limitations of previous policy search approaches and minimizes the same ob-
jective of the Deep PG critics, leading to the following crucial advantages:
• VFS does not require additional environment interactions or hand-designed evaluations for
selecting the best set of parameters in the population.
• MSE is a widely adopted objective for learning value networks, providing an established
evaluation strategy. Moreover, batch computations and parallelization make this process
particularly efficient. Nonetheless, VFS is not explicitly designed for MSE, and extending
it to different error measures is straightforward.
• At the cost of adding overhead, the population evaluation may scale to an arbitrarily large
number of samples to improve robustness.
Finally, the parameters with the lowest error replace the current agent's critic until the next popu-
lation search (line 8). Many Deep RL algorithms employ target networks parametrized by φtg to
reduce overestimation. In this scenario, we also update the target weights toward the new ones by
using standard Polyak averaging with an α ∈ (0, 1) weight transfer value: φtg = αφ + (1 − α)φtg.
Limitations. Here we highlight the limitations of VFS: (i) batched computations and parallelization
do not avoid a marginal overhead induced by the population search. (ii) In an off-policy setting,
VFS requires tuning the batch size for the error computation to balance the trade-off between com-
putational demands and the evaluation quality. (iii) There are no guarantees that small-scale pertur-
bations produce a local variation to the original predictions. However, they have been previously
shown effective in doing so (Martin H. & de Lope, 2009), and we confirm this result in Section 4.
4 EXPERIMENTS
The proposed experiments aim at answering the following questions: (i) How do VFS components
affect the training phase. In particular, we investigate when the perturbations are most effective
during the training. (ii) How these components impact the performance and sample efficiency of
VFS-based algorithms. (iii) How VFS influences Deep PG primitives, such as gradient estimates,
their variance, and value predictions, to motivate performance improvement.
We investigate the performance of VFS on the on-policy PPO, the off-policy DDPG, and TD3 al-
gorithms. We compare over the baseline DDPG, PPO, TD3, SUNRISE (Lee et al., 2021) (a recent
ensemble approach), and Supe-RL (Marchesini et al., 2021a) (a recent policy search approach). We
conduct our experiments on five continuous control tasks based on MuJoCo (Brockman et al., 2016)
(in their v4 version), which are widely used for comparing Deep PG, ensembles, and policy search
approach (Schulman et al., 2017; Lillicrap et al., 2016; Lee et al., 2021; Fujimoto et al., 2018).
Data are collected on nodes equipped with Xeon E5-2650 CPUs and 64GB of RAM, using the hyper-
parameters of Appendix E. Considering the importance of having statistically significant results
(Colas et al., 2019), we report the average performance of 25 runs per method, with shaded regions
representing the standard error. Such a high number of experiments motivates slightly different
results over the original implementations of DDPG, TD3, and PPO.
4.1 ANALYZING VFS COMPONENTS
This analysis considers data collected in the Hopper task with VFS-PPO, as we achieved comparable
results in the other setups. Given our intuitions, the two-scale perturbations have different effects on
the critic. We expect σmin perturbation to result in networks with similar predictions. In contrast,
σmax should generate networks with more diversified values to escape local optima. Appendix A
shows the average difference between values predicted by the original critic of the baselines and
their variations, confirming the role of the two perturbations.
5
Published as a conference paper at ICLR 2023
Table 1: Performance at 1M steps for Hopper, Walker, Swimmer, and 2M steps for HalfCheetah,
and Ant in PPO, DDPG, TD3 experiments. We show the average return and standard deviation over
the 25 runs and the percentage of steps required by VFS methods to reach the peak performance of
the corresponding baseline. We report the best number for the ensemble SUNRISE at 2 × 105 steps
(Lee et al., 2021), comparing over a SAC implementation of VFS and the policy search Supe-RL.
Moreover, we expect σmax variations to be rarely bet-
ter than σmin variations and the original critic, as dras-
tic changes in the value predictions serve to escape from
local optima. To confirm this, Figure 2 shows the aver-
age cumulative number of times on which σmin (blue) or
σmax (orange) critics' error is the lowest in the population
compared to the original critic (y-axis), over the periodi-
cal searches (x-axis). The linear growth of the σmin bars
indicates that such perturbations produce better variations
over σmax and the original critic through the training. In
contrast, σmax perturbed networks have more impact in
the early stages of the training (where the critics' predic-
tions are seldom accurate) and occasionally achieve lower
error in later stages of the training.
4.2 EMPIRICAL EVALUATION
Figure 2: Cumulative number of times
when a σmin,max variation improve the
critic and the other perturbation.
Here we discuss the performance and sample efficiency improvement of VFS-based algorithms. In
particular, we show: (i) the average return at convergence and (ii) the percentage of samples required
by VFS implementations to achieve the peak performance of the Deep PG baselines. Table 1 shows
the results for PPO, VFS-PPO, DDPG, VFS-DDPG, TD3, and VFS-TD3 (the VFS-TD3 algorithm
applies the search to both critics). In each table, we highlight the highest average return in bold
and refer to Appendix B for an exhaustive overview of the training curves. Generally, VFS-based
algorithms significantly improve average return and sample efficiency, confirming the benefits of
enhancing critics during Deep PG training procedures. On average, VFS-PPO achieves a 26% return
improvement and uses 33% fewer samples to reach the peak performance of PPO. VFS-DDPG has a
29% return improvement and 35% improvement in sample efficiency. Moreover, VFS-TD3 achieves
an average 19% return improvement and 43% fewer samples to reach the peak performance of TD3.
The latter results are significant as TD3 employs several tricks to address the poor performance of
DDPG, and it is known to be a robust Deep PG baseline (Fujimoto et al., 2018).
We also compare VFS over Supe-RL and the ensemble method SUNRISE by considering its best
number reported at 2 × 105 steps. We use the same population parameters as in our VFS-TD3 im-
plementation and Supe-RL, while the SAC parameters are the same as the original work (Haarnoja
et al., 2018).4 Crucially, the VFS implementation shows comparable or superior average perfor-
mance over such additional baselines (≈13% and ≈24% on average, respectively), confirming the
merits of our framework. Finally, Appendix C contains: (i) a comparison of the computational
4We do not consider the Swimmer environment as prior work has not employed it.
6
Published as a conference paper at ICLR 2023
Figure 3: Left: influence of different population sizes in VFS-PPO. Increasing the size of the popula-
tion leads to higher performance. Middle: comparison between PPO, VFS-PPO, and VFS-PPO with
annealing perturbations. Linearly scaling our perturbations to zero leads to lower performance with
respect to the proposed VFS-PPO with fixed permutations. Right: comparison of two VFS-PPO
implementations that consider only small or big scale variance for the permutations.
overhead for VFS, Supe-RL, and SUNRISE, discussing the negligible overhead of VFS over such
baselines. (ii) A comparison with a baseline PPO that considers a higher number of gradient steps
to match the computational demands of VFS.
4.2.1 ADDITIONAL EXPERIMENTS
This section shows: (i) the effects of different population sizes; (ii) additional experiments to show
that annealing variations have lower performance than the proposed VFS; (iii) how VFS behaves
with considering only σmin or σmax perturbations. Similarly to Section 4.1, we show the results of
VFS-PPO in the Hopper domain as they are also representative of the other setups.
Figure 3 on the left shows the performance with increasing sizes for the population (i.e., 4, 8, 12,
20). Intuitively, increasing the size of the population leads to higher performance. However, our
experiments show no significant advantage in considering a population of size greater than 10.
In the center, Figure 3 compares PPO, VFS-PPO, and VFS-PPO with annealing on the perturba-
tions. In more detail, we linearly scale the effects of the perturbations to zero towards step 9 × 105.
As discussed in Section 3, after zeroing out VFS's perturbations, our approach is equivalent to
the considered Deep PG baseline and, as such, has the same convergence guarantee in the limit.
Nonetheless, in practice, VFS-PPO without permutation annealing achieves superior performance
as the critic's population search keeps improving the Deep PG primitives.
Figure 3 on the right show the performance of VFS with only small or big-scale perturbations.
The latter permutations have more impact in the early stages of the training and allow for higher
returns over both PPO and VFS-PPO. However, such benefits rapidly fade as the training progresses,
resulting in performance similar to the PPO baseline. Conversely, small-scale variations achieve
higher returns in the middle stages of the training. However, the lack of big variations to escape
from local optima only leads to marginally superior performance over PPO. In contrast, the proposed
two-scale VFS-PPO combines the benefits of both permutations. Such results are further motivated
by an additional analysis of the gradient estimate in Appendix D.
4.3 DEEP PG PRIMITIVES ANALYSIS
We analyze how VFS influences Deep PG primitives to motivate performance improvement. To this
end, Figure 4 left and middle show the quality of the gradient estimates and their variance at the
initial and middle stages of the training (respectively), and the mean square error of PPO's critic and
VFS-PPO one. Regarding gradient estimates, PPO's common implementations estimate the gradient
using an empirical mean of ≈ 203 samples (marked in the plots with a vertical line). Since the Deep
PG agent successfully solves the task attaining a high reward, these sample-based estimates are
sufficient to drive successful learning of the policy parameters.
We measure the average pairwise cosine similarity and standard deviation between 30 gradient mea-
surements taken from the PPO and VFS-PPO models after 105 and 5 × 105 steps in the Hopper task
with an increasing number of state-action pairs. A cosine similarity ∈ (0, 1] represents a positive
similarity (where 0 means that the vectors are orthogonal and 1 means that the vectors are paral-
7
Published as a conference paper at ICLR 2023
Figure 4: Left, Middle: analysis of gradient estimate and variance. We measure the average pairwise
cosine similarity (y-axis) between 30 gradient estimates with a growing number of state-action pairs
(x-axis). Each algorithm averages over 25 models collected during the training at 105 and 5 × 105
steps. A higher correlation with a lower variance of VFS-PPO translates into better performance of
the baseline (Figure 1). Right: average MSE of such models over the training phase.
lel). Hence, higher correlations indicate the gradient estimate is more similar to the actual gradient.5
Following the PG's underlying theoretical framework, we also know that a lower variance in the
gradient estimate typically translates into better performance, which is why value networks are em-
ployed in Deep PG. Crucially, VFS-based approaches show, on average, a ≈ 0.1 higher correlation
and lower variance in the sampling regime used during the training. Following the intuitions of
the cosine similarity measure, such an improvement is significant and motivates the performance
benefits of VFS-based approaches. We also performed a two-sample t-test to test whether the mean
gradient estimates of each baseline and its VFS implementation are statistically different. In more
detail, we considered the mean and standard deviation of the estimates at the sample regimes used
for the algorithms (i.e., 2048 for PPO) and our sample size of 30 trials. To summarize, we can reject
the equality of the average gradient estimates between PPO and VFS-PPO in the 105 and 5 × 105
experiments with 95% and 99.9% confidence levels, respectively (t-stat 2.22 and 5.05).
Moreover, Figure 4 on the right shows the average MSE of the 25 trained models for PPO and VFS-
PPO computed every 105 step. To assess the quality of the critics' predictions, we compute the
average MSE between PPO and VFS-PPO critics and the actual return of 103 complete trajectories
in the environment (i.e., we compute the average MSE over 103 evaluation episodes every 105 step).
To reduce the scale of the plot and obtain a better visualization, we normalize the resulting MSE by
the number of considered steps. Our results show that critics enhanced with VFS consistently result
in lower MSE, which leads to the previously discussed improvements in the gradient estimates.6
Hence, our analysis of key Deep PG primitives motivates the performance improvement of VFS-
based algorithms. Appendix D shows the same analysis for VFS-DDPG and VFS-TD3, confirming
our results.
5 RELATED WORK
Ensemble methods have been used to improve policy performance in Deep RL (He et al., 2022;
Lee et al., 2021; Yang et al., 2022; Wu & Li, 2020; Ren et al., 2021) combining the predictions of
multiple learning models. However, the benefits of these approaches over population-based ones
are unclear, as the numerous training actors (and/or critics) introduce a significant memory footprint
and non-negligible overhead at training and inference time. In addition, weighting the importance of
different predictions is not straightforward. Hence, ensemble algorithms in Deep RL are unsuitable
for: (i) deployment on-device where memory is limited, (ii) real-time systems where inference time
is crucial, or (iii) training high-dimensional DNNs where parallel computation may not be possible.
In contrast, population-based approaches are straightforward to implement and have been used to
combine the exploration benefits of gradient-free methods and gradient-based algorithms (Khadka &
Tumer, 2018; Marchesini et al., 2021a; Sigaud, 2022) for policy parameters search. In more detail,
ERL (Khadka & Tumer, 2018) employs a Deep PG agent and a concurrent population that includes
the gradient-based agent to explore different policy permutations. The agent trains following its
5Although obtaining an empirical estimate of the true gradient can improve Deep PG performance further,
this would require orders of magnitude more samples than the ones used in practical applications. Using such
an amount of samples is unfeasible due to the computational demands (Ilyas et al., 2020).
6Using more trajectories for approximating the true value function would lead to a better approximation
and higher MSE for both approaches in the early stages of the training where predictions are less accurate.
8
Published as a conference paper at ICLR 2023
gradient-based algorithm and shares a memory buffer with the population to learn from more diver-
sified samples. However, ERL's dropout-like permutations bias the population's performance in the
long run. Inspired by ERL, many policy search approaches emerged in the literature (Colas et al.,
2018; Bodnar, 2020; Alo ̈ıs Pourchot, 2019; Marchesini et al., 2021a). In more detail, GEP-PG (Co-
las et al., 2018) uses a curiosity-driven approach to enhance the experiences in the agent's memory
buffer. Moreover, Proximal Distilled ERL (PDERL) (Bodnar, 2020) introduces novel gradient-based
permutations to address destructive behaviors of biologically-inspired perturbations that could cause
catastrophic forgetting (Lehman et al., 2018). Finally, Super-RL (Marchesini et al., 2021a) com-
bines the intuitions of the previous population-based approaches, proposing a framework applicable
to (possibly) any DRL algorithms that do not exhibit detrimental policy behaviors. However, due
to their policy-oriented nature, these approaches assume a simulated environment to evaluate the
perturbed policies, which increases the sample inefficiency of Deep RL algorithms. Such additional
interactions are also task-specific as they must cover a broad spectrum of behaviors to ensure a robust
evaluation. As discussed in Marchesini et al. (2021a), such behavior diversity is crucial to ensure
that a perturbed policy improves the original actor, not only in particular environment initializations.
In addition, current policy search methods introduce gradient-based perturbation (that has a non-
negligible overhead, as further discussed in Section 2) to ensure that the population's predictions do
not drastically diverge from the original policy. To summarize, population-based searches address
the issues of ensemble methods by exploring different behaviors for the policies but disregarding
value networks. In addition, recent work (Lyle et al., 2022) discussed the capacity loss of agents
that have to adapt to new prediction problems when discovering new sources of payoffs. As such,
Deep PG's critics have to adjust their predictions rapidly through the training. These issues further
motivate the importance of applying VFS in the training routines.
6 DISCUSSION
Ilyas et al. (2020) recently showed that critics employed in Deep PG algorithms for value predic-
tions poorly fit the actual return, limiting their efficacy in reducing gradient estimate variance and
driving policies toward sub-optimal performance (Fujimoto et al., 2018). Despite improving Deep
PG performance, population-based search methods have recently superseded ensemble learning due
to their computational benefits. However, these approaches typically need more practical investi-
gations to understand their improvement. Moreover, previous population search frameworks have
been devoted to exploring policy perturbations, disregarding critics and their crucial role in Deep
PG.
To our knowledge, VFS is the first gradient-free population search approach to enhance critics and
improve performance and sample efficiency. Crucially, VFS can be applied to (possibly) any Deep
PG algorithm and aims at finding a set of weights that minimize the same critic's objective. More-
over, our detailed analysis of PG primitives in Section 4.3 motivates the performance improvement
of the gradient-based agent due to VFS. In addition, our analysis suggests that the gap between
the underlying theoretical framework of Deep PG and the actual tricks driving their performance
may be less significant than previously discussed Ilyas et al. (2020). Hence, VFS opens up sev-
eral exciting research directions, such as investigating the theoretical relationships between RL and
practical Deep RL implementation. Empirically, VFS also paves the way for novel combinations
with policy search methods to provide a unified framework of gradient-free population-based ap-
proaches. Finally, given the wide application of value networks in Deep Multi-Agent RL Rashid
et al. (2018); Marchesini & Farinelli (2021); Wang et al. (2021), it would be interesting to analyze
the performance improvement of VFS in such partially-observable contexts.
6.1 CONCLUSION
VFS introduces a two-scale perturbation operator voted to diversify a population of value networks
to (i) explore local variations of current critics' predictions and (ii) allow to explore diversified
value functions to escape from local optima. The practical results of such components have been
investigated with additional experiments that also motivate the improvement in sample efficiency and
performance of VFS-based algorithms in a range of standard continuous control benchmarks. Our
findings suggest that improving fundamental Deep PG primitives translates into higher-performing
policies and better sample efficiency.
9
Published as a conference paper at ICLR 2023
7 ACKNOWLEDGEMENTS
This work was partially funded by the Army Research Office under award number W911NF20-1-
0265.
REFERENCES
Olivier Sigaud Alo ̈ıs Pourchot. CEM-RL: Combining evolutionary and gradient-based methods for
policy search. In International Conference on Learning Representations (ICLR), 2019.
Pietro Lio' Bodnar, Ben Day. Proximal distilled evolutionary reinforcement learning. In Conference
on Artificial Intelligence (AAAI), 2020.
Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and
Wojciech Zaremba. Openai gym. OpenAI, 2016.
C ́edric Colas, Olivier Sigaud, and Pierre-Yves Oudeyer. GEP-PG: decoupling exploration and ex-
ploitation in deep reinforcement learning algorithms. In International Conference on Machine
Learning (ICML), 2018.
C ́edric Colas, Olivier Sigaud, and Pierre-Yves Oudeyer. A hitchhiker's guide to statistical compar-
isons of reinforcement learning algorithms. arXiv, 2019.
Scott Fujimoto, Herke van Hoof, and David Meger. Addressing function approximation error in
actor-critic methods. In International Conference on Machine Learning (ICML), 2018.
Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Off-policy
maximum entropy deep reinforcement learning with a stochastic actor. In International Confer-
ence on Machine Learning (ICML), 2018.
Qiang He, Huangyuan Su, Chen GONG, and Xinwen Hou. MEPG: A minimalist ensemble policy
gradient framework for deep reinforcement learning. In Decision Awareness in Reinforcement
Learning Workshop at ICML 2022, 2022.
Andrew Ilyas, Logan Engstrom, Shibani Santurkar, Dimitris Tsipras, Firdaus Janoos, Larry
Rudolph, and Aleksander Madry. A closer look at deep policy gradients. In International Con-
ference on Learning Representations (ICLR), 2020.
Shauharda Khadka and Kagan Tumer. Evolutionary reinforcement learning. In Advances in Neural
Information Processing Systems (NeurIPS), 2018.
Kimin Lee, Michael Laskin, Aravind Srinivas, and Pieter Abbeel. Sunrise: A simple unified frame-
work for ensemble learning in deep reinforcement learning. In International Conference on Ma-
chine Learning (ICML), 2021.
Joel Lehman, Jay Chen, Jeff Clune, and Kenneth O. Stanley. Safe mutations for deep and recurrent
neural networks through output gradients. In GECCO, 2018.
Timothy P. Lillicrap, Jonathan J. Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa,
David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. In Inter-
national Conference on Learning Representations (ICLR), 2016.
Clare Lyle, Mark Rowland, and Will Dabney. Understanding and preventing capacity loss in rein-
forcement learning. In International Conference on Learning Representations (ICLR), 2022.
Enrico Marchesini and Christopher Amato. Safety-informed mutations for evolutionary deep rein-
forcement learning. In Proceedings of the Genetic and Evolutionary Computation Conference
Companion, pp. 1966–1970, 2022. ISBN 9781450392686.
Enrico Marchesini and Alessandro Farinelli. Genetic deep reinforcement learning for mapless nav-
igation. In International Conference on Autonomous Agents and MultiAgent Systems (AAMAS),
pp. 1919–1921, 2020.
10
Published as a conference paper at ICLR 2023
Enrico Marchesini and Alessandro Farinelli. Centralizing state-values in dueling networks for
multi-robot reinforcement learning mapless navigation. In IEEE/RSJ International Conference
on Intelligent Robots and Systems (IROS), pp. 4583–4588, 2021. doi: 10.1109/IROS51168.2021.
9636349.
Enrico Marchesini and Alessandro Farinelli. Enhancing deep reinforcement learning approaches for
multi-robot navigation via single-robot evolutionary policy search. In International Conference
on Robotics and Automation (ICRA), pp. 5525–5531, 2022. doi: 10.1109/ICRA46639.2022.
9812341.
Enrico Marchesini, Davide Corsi, and Alessandro Farinelli. Genetic soft updates for policy evolution
in deep reinforcement learning. In International Conference on Learning Representations, 2021a.
URL https://openreview.net/forum?id=TGFO0DbD_pk.
Enrico Marchesini, Davide Corsi, and Alessandro Farinelli. Benchmarking safe deep reinforcement
learning in aquatic navigation. In IEEE/RSJ International Conference on Intelligent Robots and
Systems (IROS), pp. 5590–5595, 2021b. doi: 10.1109/IROS51168.2021.9635925.
Enrico Marchesini, Davide Corsi, and Alessandro Farinelli. Exploring safer behaviors for deep
reinforcement learning. Proceedings of the AAAI Conference on Artificial Intelligence, 36(7):
7701–7709, Jun. 2022. doi: 10.1609/aaai.v36i7.20737. URL https://ojs.aaai.org/
index.php/AAAI/article/view/20737.
Jos`e Antonio Martin H. and Javier de Lope. Learning autonomous helicopter flight with evolutionary
reinforcement learning. Computer Aided Systems Theory, 2009.
Tabish Rashid, Mikayel Samvelyan, Christian Schr ̈oder de Witt, Gregory Farquhar, Jakob N. Foer-
ster, and Shimon Whiteson. QMIX: monotonic value function factorisation for deep multi-agent
reinforcement learning. In ICML, 2018.
Jie Ren, Yewen Li, Zihan Ding, Wei Pan, and Hao Dong.
Probabilistic mixture-of-experts
for efficient deep reinforcement learning. arXiv, 2021. openreview.net/forum?id=
LtgEkhLScK3.
John Schulman, Sergey Levine, Philipp Moritz, Michael I. Jordan, and Pieter Abbeel. Trust region
policy optimization. In International Conference on Machine Learning (ICML), 2015.
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy
optimization algorithms. arXiv, 2017.
Olivier Sigaud. Combining evolution and deep reinforcement learning for policy search: a survey.
arXiv, 2022.
David Silver, Guy Lever, Nicolas Heess, Thomas Degris, Daan Wierstra, and Martin Riedmiller. De-
terministic policy gradient algorithms. In International Conference on International Conference
on Machine Learning (ICML), 2014.
Richard S. Sutton and Andrew G. Barto. Reinforcement Learning: An Introduction. The MIT Press,
2018.
Richard S. Sutton, David McAllester, Satinder Singh, and Yishay Mansour. Policy gradient meth-
ods for reinforcement learning with function approximation. In Advances in Neural Information
Processing Systems (NeurIPS), 1999.
Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control.
In IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2012.
Jianhao Wang, Zhizhou Ren, Terry Liu, Yang Yu, and Chongjie Zhang. QPLEX: duplex dueling
multi-agent q-learning. In ICLR, 2021.
Christopher Watkins and Peter Dayan. Q-learning. Machine Learning, 8:279–292, 1992.
Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement
learning. Machine Learning, 8:229–256, 1992.
11
Published as a conference paper at ICLR 2023
Junta Wu and Huiyun Li. Deep ensemble reinforcement learning with multiple deep deterministic
policy gradient algorithm. Mathematical Problems in Engineering, 2020.
Zhengyu Yang, Kan Ren, Xufang Luo, Weiqing Liu, Jiang Bian, Weinan Zhang, and Dong-
sheng Li. Deep ensemble policy learning. arXiv, 2022. openreview.net/forum?id=
-7NOEQcD-xH.
12
Published as a conference paper at ICLR 2023
A EFFECTS OF PERTURBATIONS ON VFS-PPO, VFS-DDPG, VFS-TD3
This section shows the efficacy of using σmin,max to maintain similar predictions and explore di-
versified ones, respectively. In this direction, Figure 5 shows the average difference between values
predicted by the original critic of the PPO algorithm and its two perturbations (σmin = 0.000005,
σmax = 0.0005) over 100 episodes (i.e., each box is an episode). In particular, we report the data
collected in the initial stage of the training (i.e., at step 105), where green boxes indicate slight
variations while red ones represent the highest difference in our evaluation. In more detail, Figure
5 shows the effects of our perturbations at different stages of the training (i.e., at 100k, 500k, 1M
steps) for VFS-PPO, VFS-DDPG, VFS-TD3.
The values of the σmin perturbed network differ from the original critic by a small margin. In con-
trast, the critic perturbed with σmax achieves significantly different values. Hence, the proposed
two-scale perturbation approach leads to the desired outcome, and σmin-based variations confirm
similar results over computationally demanding gradient-based perturbations. Interestingly, our ex-
periments with different algorithms consider the same set of hyperparameters for the mutation oper-
ators (see Appendix E), suggesting that VFS does not require extensive tuning to enhance existing
Deep PG algorithms.
B TRAINING CURVES
Following the results in Section 4.2, Figure 6 shows the average return during the training without
the five best and worst performing model.7 We report the results for each environment in the dif-
ferent rows, while each column contains a different set of algorithms (i.e., VFS-PPO and PPO in
the first column, VFS-DDPG and DDPG in the second column, VFS-TD3 and TD3 in the last one).
As discussed in the main paper, VFS-based algorithms achieve, on average, higher returns. Inter-
estingly, the worst-trained model for VFS-based approaches typically achieves higher returns than
the best model of the baselines. In addition, VFS-based methods show a lower standard deviation,
as reported in Table 1 of the main paper. Moreover, they significantly improve sample efficiency,
reaching the peak performance of the baseline algorithms (i.e., PPO, DDPG, TD3) in a fraction of
the steps.
We performed additional experiments in the Humanoid task for 2 million steps. We aim to show that
population-based approaches can scale to more challenging tasks maintaining the same population
parameters. Figure 7 shows the performance of PPO and VFS-PPO. Interestingly, we note that VFS
leads to significantly higher results in this complex domain, suggesting that the limitations of critics
in Deep PG algorithms profoundly impact the overall policy return.
C COMPUTATION OVERHEAD
In this section, we discuss the computation overhead of ensemble methods and population-based
ones. In particular, we compare the overhead of training and inference time introduced by Supe-RL,
SUNRISE, and VFS, considering M = 10 models. The training overhead is comparable for all
the approaches as standard Deep RL benchmarks do not require high-dimensional DNNs or com-
putational demanding architectures that hinder parallelization. Nonetheless, in more complex tasks
requiring high-dimensional DNNs, it could be computationally unfeasible to parallelize the training
models of ensemble methods, especially during backpropagation. As reported by the Supe-RL's
authors (Marchesini et al., 2021a), the additional environments interactions of policy search meth-
ods lead to a maximum 6% overhead even considering parallelization with a population of size M .
In contrast, VFS does not require multiple training models or additional environment interactions,
leading to a negligible overhead for the training procedure (i.e., it simply requires additional forward
DNNs propagations).
Regarding inference time, policy and value network searches do not involve multiple predictions
(except in the periodical search, which has negligible overhead due to batched computations), main-
taining the same inference time of the original Deep PG baselines. In contrast, as detailed by SUN-
7We removed the best and worst seeds to avoid considering the ones that lead to particularly high or low
performance. The same consideration holds for Figure 3, 8.
13
Published as a conference paper at ICLR 2023
Figure 5: Efficacy of the σmin,max scales in modifying PPO (on the first row), DDPG (on the second
row), and TD3 (on the third row) critics to achieve similar predictions or more diversified ones to
escape local optima, respectively. We observe the average difference (∆) between values predicted
by the critics and the σmin,max variations over 100 episodes in the Hopper environment shown as
different boxes.
RISE's authors (Lee et al., 2021), their ensemble agents require up to 2M × additional inference
time.
To summarize, gradient-free search methods are generally less computationally demanding than
ensemble ones. Hence, the superior return of VFS, sample efficiency, and computational benefits
further confirm the merits of introducing a critics' search-based approach.
14
Published as a conference paper at ICLR 2023
Figure 6: Comparison of PPO, DDPG, TD3, and their VFS implementation in common continuous
control benchmarks on each row. Each column (i.e., each couple of algorithms) shows the average
return during the training over 25 runs. VFS-based implementations improve average return and
sample efficiency of the baseline Deep PG algorithms.
In addition, Figure 8 shows the performance of a PPO implementation that uses the size of the
VFS population as additional gradient steps for its critic. Performing more gradient steps on the
critic does not lead to significant advantages over the baseline PPO as the critic learns to fit better
15
Published as a conference paper at ICLR 2023
Figure 7: Comparison of PPO its VFS implementation in the Humanoid task.
the sampled batch. In contrast, VFS is designed to explore local and global variations of the critic
to avoid local optima where gradient-based learning typically gets stuck. For these reasons, this
additional evaluation further confirms the merits of VFS.
Figure 8: Comparison between VFS-PPO, PPO, and a PPO implementation that uses the size of the
population as additional gradient steps for the critic.
D ADDITIONAL DEEP PG PRIMITIVES ANALYSIS
In Section 4.3, we analyzed the improvement of VFS-PPO in terms of gradient estimate, their vari-
ance, and the mean squared error of the critic. Such an analysis serves to motivate the performance
improvement of VFS-based algorithms. In this section, we report the same comparison for VFS-
DDPG and VFS-TD3 to confirm the proposed framework's benefits further.
Figure 9 reports the same results for our Deep PG primitives analysis for DDPG and TD3. We
measure the average pairwise cosine similarity and its standard deviation between 30 gradient mea-
surements taken from the algorithms at 105 and 5 × 105 steps in the Hopper task with an increasing
number of state-action pairs. Crucially, VFS-DDPG and VFS-TD3 show a higher correlation and
lower variance in the typical sampling regime used during the training (i.e., mini-batches of size 64
or 128), motivating their performance improvement over the baselines. Similarly to the PPO case,
we performed a two-sample t-test to test whether the mean gradient estimates of each baseline and
its VFS implementation are statistically different. To summarize, we can reject the equality of the
average gradient estimates between DDPG and VFS-DDPG with a 95% confidence level in the 105
and 5 × 105 experiments (t-stat 2.08 and 2.01). In the case of TD3 and VFS-TD3, we can reject
the same hypothesis with a confidence level of 90% (t-stat 1.73 and 1.66). The latter results are
interesting as they suggest that TD3's implementation tricks to improve performance benefit policy
learning as they lead to gradient estimates that are more similar to the VFS ones. Moreover, the
right column shows the average MSE of our models computed every 105 step. Similarly to the PPO
experiments, we use the actual return for 103 trajectories in the environment to approximate the true
value function.
These results follow the trend of Section 4.3, where VFS critics have lower MSE. Interestingly, we
also note that TD3 typically achieves a higher gradient estimate correlation with lower variance over
16
Published as a conference paper at ICLR 2023
Figure 9: Analysis of gradient estimate and variance (left, middle) in the Hopper task for DDPG
and VFS-DDPG in the first row, TD3 and VFS-TD3 in the second row. We measure the average
pairwise cosine similarity (y-axis) between 30 gradient estimates which use a growing number of
state-action pairs (x-axis). For each algorithm, we use the average over the 25 models collected
during the training runs at 105 and 5 × 105 steps. The higher correlation with a lower variance of
VFS-based implementations translates into better performance of the Deep PG algorithm. Average
MSE of such models over the training phase (right).
DDPG, which motivates using two value networks to achieve better performance. Our analysis of
key Deep PG primitives for DDPG and TD3 confirms the main paper's results.
In addition, we performed the same gradient estimate analysis on two VFS implementations that
only employ small or big perturbation operators. Figure 10 shows the results of such an investiga-
tion. In particular, VFS with only small perturbations slightly improves over the baseline PPO in the
different stages of the training. However, it can not achieve the higher similarity of the VFS-PPO
that considers both perturbations. In contrast, VFS with only big perturbations is characterized by
a higher correlation in the initial stages of the training. At the same time, its efficacy significantly
decreases later in the training phase. Moreover, considering only such big-scale variations typically
leads to higher gradient estimate variance. Crucially, this additional gradient estimate analysis con-
firms the results of Figure 3 and further motivates using our two-scale perturbations to tackle both
local and global variations at the same time.
E HYPERPARAMETERS
We performed an initial grid search among common hyper-parameters from prior work (Schulman
et al., 2017; Lillicrap et al., 2016; Fujimoto et al., 2018; Marchesini et al., 2021a). This evaluation
led us to use similar DNN architectures for all the algorithms in the environments, i.e., 2-ReLU layer
MLP with 64 hidden units each to model actors and critics for PPO and the same structure but with
256 hidden units for DDPG, TD3. Table 2 reports the other hyperparameters shared across all the
experiments. Note that missing parameters are the same as the baseline algorithm (e.g., VFS-PPO
values are the same as PPO, and TD3 shares the missing parameters with DDPG). Moreover, all the
VFS-based implementations consider the same values for the critic's search.
17
Published as a conference paper at ICLR 2023
Figure 10: Analysis of gradient estimate and variance in the Hopper task for VFS-PPO that only
considers small perturbations (top row) or big ones (bottom row).
Table 2: Hyperparameters for our experiments
Algorithm Parameter
Value
PPO
DDPG
TD3
VFS
(cid:15) clip
γ
update epochs
samples per update
mini-batch size
entropy coefficient
lr
γ
buffer size
mini-batch size
actor lr
critic lr
τ
0.2
0.99
10
2048
64
0.001
0.0003/0.0001
0.99
1000000
128
0.0001
0.001/0.0003
0.005
actor noise clip
delayed actor update
0.5
2
population size
σmin
σmax
b
es
10
0.000005
0.0005
2048
2048 steps
18
|
|
http://arxiv.org/abs/2302.10130v2 | 2023-10-03T13:22:42 | 2023-02-20T18:00:38 | Infinite-Dimensional Diffusion Models | Diffusion models have had a profound impact on many application areas,
including those where data are intrinsically infinite-dimensional, such as
images or time series. The standard approach is first to discretize and then to
apply diffusion models to the discretized data. While such approaches are
practically appealing, the performance of the resulting algorithms typically
deteriorates as discretization parameters are refined. In this paper, we
instead directly formulate diffusion-based generative models in infinite
dimensions and apply them to the generative modeling of functions. We prove
that our formulations are well posed in the infinite-dimensional setting and
provide dimension-independent distance bounds from the sample to the target
measure. Using our theory, we also develop guidelines for the design of
infinite-dimensional diffusion models. For image distributions, these
guidelines are in line with the canonical choices currently made for diffusion
models. For other distributions, however, we can improve upon these canonical
choices, which we show both theoretically and empirically, by applying the
algorithms to data distributions on manifolds and inspired by Bayesian inverse
problems or simulation-based inference. | [
"Jakiw Pidstrigach",
"Youssef Marzouk",
"Sebastian Reich",
"Sven Wang"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.10130v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.10130v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "stat.ML",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"stat.ML",
"cs.LG",
"math.PR",
"68T99, 60Hxx"
] | 3
2
0
2
t
c
O
3
]
L
M
.
t
a
t
s
[
2
v
0
3
1
0
1
.
2
0
3
2
:
v
i
X
r
a
INFINITE-DIMENSIONAL DIFFUSION MODELS
A PREPRINT
Jakiw Pidstrigach
Institut f ̈ur Mathematik
Universit ̈at Potsdam
Karl-Liebknecht-Str. 24/25
14476 Potsdam
[email protected]
Youssef Marzouk
Statistics and Data Science Center
Massachusetts Institute of Technology
77 Massachusetts Ave
Cambridge, MA 02139 USA
[email protected]
Sebastian Reich
Institut f ̈ur Mathematik
Universit ̈at Potsdam
Karl-Liebknecht-Str. 24/25
14476 Potsdam
[email protected]
Sven Wang
Statistics and Data Science Center
Massachusetts Institute of Technology
77 Massachusetts Ave
Cambridge, MA 02139 USA
[email protected]
ABSTRACT
Diffusion models have had a profound impact on many application areas, including those where data
are intrinsically infinite-dimensional, such as images or time series. The standard approach is first to
discretize and then to apply diffusion models to the discretized data. While such approaches are prac-
tically appealing, the performance of the resulting algorithms typically deteriorates as discretization
parameters are refined. In this paper, we instead directly formulate diffusion-based generative mod-
els in infinite dimensions and apply them to the generative modeling of functions. We prove that our
formulations are well posed in the infinite-dimensional setting and provide dimension-independent
distance bounds from the sample to the target measure. Using our theory, we also develop guidelines
for the design of infinite-dimensional diffusion models. For image distributions, these guidelines are
in line with the canonical choices currently made for diffusion models. For other distributions,
however, we can improve upon these canonical choices, which we show both theoretically and em-
pirically, by applying the algorithms to data distributions on manifolds and inspired by Bayesian
inverse problems or simulation-based inference.
1
Introduction
Diffusion models (also score-based generative models or SGMs) [Sohl-Dickstein et al., 2015, Song et al., 2021] have
recently shown great empirical success across a variety of domains. In many applications, ranging from image gen-
eration [Nichol and Dhariwal, 2021, Dhariwal and Nichol, 2021], audio [Kong et al., 2021], and time series [Tashiro
et al., 2021] to inverse problems [Kadkhodaie and Simoncelli, 2021, Batzolis et al., 2021], the signal to be modeled is
actually a discretization of an infinite-dimensional object (i.e., a function of space and/or time). In such a setting, it is
natural to apply the algorithm in high dimensions, corresponding to a fine discretization and a better approximation of
the true quantity. Yet theoretical studies of current diffusion models suggest that performance guarantees deteriorate
with increasing dimension [Chen et al., 2022, Bortoli, 2022].
When studying a discretization of an infinite-dimensional object, many application areas have found great success in
directly studying the infinite-dimensional limit and only discretizing the problem in the last step, when implementing
an algorithm on a computer. By accurately understanding the infinite-dimensional problem, one can gain valuable
insights on how it should be discretized. Sometimes, this leads to algorithms that are dimension-independent in that
their performance does not degrade when one chooses a finer discretization.
Infinite-Dimensional Diffusion Models
A PREPRINT
Important areas where it is now standard to study the infinite-dimensional object directly are, for example, Bayesian
inverse problems [Stuart, 2010] and nonparametric statistics [Tsybakov, 2009, Gin ́e and Nickl, 2015]. Accordingly,
many Markov chain Monte Carlo algorithms used for sampling, such as the Metropolis-adjusted Langevin [Cotter
et al., 2013] or Hamiltonian Monte Carlo [Beskos et al., 2011] algorithms, have successfully been generalized to
the infinite-dimensional setting; in addition to being an empirical success, these efforts have also led to dimension-
independent convergence guarantees (see Hairer et al. [2014], Bou-Rabee and Eberle [2021], Pidstrigach [2022a]).
In the common implementation of the diffusion model algorithm, one first discretizes the data (for example images
to pixels or wavelet coefficients, or functions to their evaluations on a grid) and then applies the algorithm in RD,
as described in Song et al. [2021]. When doing so, one does not consider the implications of the discretization
dimension D. In particular, if there is no well-defined limiting algorithm as D → ∞, one cannot expect the algorithm's
performance to be stable as D becomes large. This instability can potentially be mitigated by defining the diffusion
model algorithm directly in infinite dimensions, and studying its properties there. Once the algorithm is modified so
that it exists in infinite dimensions, the discretized formulations that are implementable on a computer will possess
dimension-independent properties.
1.1 Challenges in extending diffusion models to infinite dimensions
Let us briefly recall the well-known finite-dimensional diffusion model setting. A forward SDE, typically an Ornstein–
Uhlenbeck process, is used to diffuse the data μdata:
dXt = −
1
2
Xtdt + dWt,
X0 ∼ μdata .
(1)
The densities of its marginal distributions are denoted by pt. The following so-called "reverse SDE" will traverse the
marginals of Xt backward:
dYt =
1
2
Ytdt + ∇ log pT −t(Yt)dt + dWt,
Y0 ∼ pT ,
(2)
where Wt is a different Wiener process/Brownian motion than in (1). In particular, YT ∼ pT −T = μdata. The goal
of the diffusion model algorithm is to approximate paths of Yt and use the realizations at time T as approximate
samples from μdata. Since the marginals of the forward SDE Xt converge to N (0, I) at an exponential speed, one
can approximate the unknown term pT by N (0, I). Furthermore, ∇ log pt can be approximated using score-matching
techniques [Vincent, 2011]. There are three main challenges in generalizing this construction to infinite dimensions,
which we highlight next.
t − W i
In finite dimensions, the process (Wt : t ≥ 0) in (1) is standard Brownian motion.
Choice of the noising process
t − W j
Therefore, the noise increments for different coordinates i and j, e.g., W i
s , are independent
and identically distributed. In infinite dimensions, one can associate a white-noise process W U
to each Hilbert space
t
U , with the property that the coordinates of W U
in an orthonormal basis of U are independent and identically dis-
t
tributed. Therefore, one has to determine which white-noise process (i.e., which Hilbert space) to choose in the
infinite-dimensional limit.
The common case of discretizing the infinite-dimensional target object to RD, e.g., discretizing a function onto a grid
or real-life scenery into image pixels, and then choosing Wt as a standard Brownian motion on RD, means that at each
grid point we will add independent noise values. In particular, as the grid grows finer, even for arbitrarily close values
a ≈ b, the evaluations Xt(a) and Xt(b) will be perturbed with independent noise. The limiting Wiener process will be
W L2
, i.e., the process associated to U = L2, also called space-time white noise. We have depicted space-time white
t
noise in Figure 1a.
s and W j
In infinite dimensions, however, the choice of the noise process is a subtle issue, as it has a crucial impact on the space
on which the diffusion process is supported. For instance, the above 'canonical' choice of space-time white noise
will lead to Xt and Wt having such irregular samples that they are not supported in L2 anymore. While we will also
study such processes due to their widespread use in practice, we will see that other choices can be beneficial from a
theoretical as well as a practical standpoint.
The score function ∇ log pt in (2) is typically defined via the Lebesgue density pt of the law of Xt.
Score function
Yet in infinite-dimensional vector spaces, the Lebesgue measure no longer exists; hence one can no longer specify the
score functions in the same manner. Therefore, a key question is: How does one define and make sense of ∇ log pt
without relying on the notion of Lebesgue density, and still define an algorithm which provably samples from the
correct measure?
2
Infinite-Dimensional Diffusion Models
A PREPRINT
Denoising score matching objective
some chosen neural network class, and identified by minimizing the denoising score-matching objective,
The score ∇ log pt is typically approximated by a neural network ̃s(t, x) in
Loss( ̃s) =
(cid:90) T
0
E[∥∇ log pt(Xt) − ̃s(t, Xt)∥2
K]dt,
over this class. Similarly to the choice of the noising process, it is not clear which Hilbert space K and norm ∥ * ∥K
should be used for the analogous objective in infinite dimensions.
1.2 Contributions
Our paper, for the first time, formulates the diffusion model algorithm directly on infinite-dimensional spaces, and
proves that this formulation is well-posed and satisfies crucial theoretical guarantees.
To formulate the reverse SDE in infinite dimensions, we must find a way to handle the ∇ log pt term, as discussed in
the last section. We do this by replacing the score with a conditional expectation, in Definition 1. This definition then
carries over to the infinite-dimensional case. Furthermore, we are able to show under which circumstances one can
generalize the denoising score matching objective to identify the neural network ̃s(t, x) in Lemma 3.
To justify approximating the reverse SDE to obtain samples from μdata, we proceed in multiple steps. First, in
Theorem 1, we show that the time-reversal of the forward SDE also satisfies an appropriate reverse SDE. The terminal
condition of the reverse SDE will have distribution μdata. To simulate this reverse SDE in practice, however, both its
initial conditions and drift must be approximated. In Lemma 3 we establish under which conditions we can use the
common denoising score matching objective to approximate the drift of the reverse SDE in infinite dimensions.
Second, we prove that the solution to such an SDE exists for general initial conditions-and in particular, for our
approximate initial conditions. Moreover, we prove that the solution is unique; otherwise we could be approximating
a different reverse SDE solution that does not sample μdata at the terminal time T . We provide rigorous uniqueness
results under two distinct scenarios: first, in Theorem 2, for μdata which satisfies a manifold hypothesis; and second, in
Theorem 3, under the assumption that μdata has density with respect to a Gaussian measure. The first case is relevant
for the typical use cases of diffusion models, as image data are usually supported on lower-dimensional manifolds or
other substructures. The second case is relevant when, for example, applying diffusion models to Bayesian inverse
problems or related problems of simulation-based inference.
Finally, building upon the preceding results, we establish dimension-independent convergence rates in Theorem 4. Our
bound is quantitative and shows how the distance relies on different choices made in the diffusion model algorithm.
The theory described above guides choices for the noise process W U
t and the loss norm ∥ * ∥K. Both will depend on
the properties of μdata. In Section 7 we discuss the implications of the theory for implementing diffusion models in
infinite dimensions. In Section 7.1, we work out guidelines for choosing W U
t and K for a given μdata. In Section 7.2,
we study the case of image distributions and see that our theorems indeed apply for the typical properties of μdata one
expects in that setting; hence, we have proven that the standard diffusion model algorithm is well-defined for image
and K = L2 actually follow the guidelines
distributions as D → ∞. Moreover, we see that the choices W U
developed in the preceding subsection. Therefore, the canonical choices made for diffusion models seem to be good
default choices for image distributions.
t = W L2
t
For μdata with different smoothness properties, however, the insights from our theory dictate other choices for U
and K. In Section 8 we apply our guidelines to two specific data distributions μdata. Our principled algorithms are
compared to the common ad hoc implementation of diffusion models. These numerical findings confirm our theoretical
insights: our modifications outperform the canonical choices, and the ways in which they do can be explained by the
discussion in Section 7.
1.3 Related work
The two efforts most related to ours are the concurrent works Hagemann et al. [2023] and Lim et al. [2023].
In Hagemann et al. [2023], methods are developed to train diffusion models simultaneously on multiple discretiza-
tion levels of (infinite-dimensional) functions. They build upon our Wasserstein-distance bounds to show that their
multilevel approach is consistent.
The work Lim et al. [2023] is also able to generalize the trained model over multiple discretization levels. They
propose to run the annealed Langevin algorithm in infinite dimensions, and use existing results for infinite-dimensional
Langevin algorithms to justify their algorithms theoretically. The forward-reverse SDE framework is not treated.
3
Infinite-Dimensional Diffusion Models
A PREPRINT
Both of these efforts encounter difficulties when defining the infinite-dimensional score. Hagemann et al. [2023]
circumvent this issue by only treating time-reversals of the discretized forward SDE.
Lim et al. [2023], on the other hand, analyze the case in which the measure is supported on the Cameron–Martin
space of W U
t . One can then simplify the problem by working with densities of Xt with respect to Gaussian measure.
From a practical point of view, both of these works employ Fourier neural operators [Li et al., 2020] as their neural
network architecture, while we work directly in the space domain and use the popular U-Net architecture for our neural
networks.
Other works also transform data into a representation that is well suited to functions, e.g., by applying a wavelet [Guth
et al., 2022, Phung et al., 2022] or spectral [Phillips et al., 2022] transform. After the transformation, however, these
works employ the finite-dimensional formulation of the diffusion model algorithm; infinite-dimensional limits are not
treated. We discuss how different spatial discretization schemes can be related to our results in Section 5.
Lastly, the subject of convergence of diffusion models to the target distribution has been a very active field of research
recently; see Chen et al. [2022, 2023], Bortoli [2022], Lee et al. [2022], Yang and Wibisono [2022]. In all these works,
however, bounds on the distance to the target measure depend at least linearly on the discretization dimension D,
rendering them vacuous in infinite dimensions.
2 A primer on probability in Hilbert spaces
In this section, we will give a short summary of key concepts relating to probability theory on infinite-dimensional
(Hilbert) spaces which are required to study the infinite-dimensional formulation of SGMs rigorously. For an extensive
introduction to this topic, see Hairer [2009, Chapter 3].
Gaussian measures on Hilbert spaces Let (H, ⟨*, *⟩H ) be a separable Hilbert space. We then say that a random
variable X taking values in H is Gaussian if, for every v ∈ H, the real-valued random variable ⟨v, X⟩H is also
Gaussian. If the ⟨v, X⟩H have mean zero, X is centered. The covariance operator of X is the symmetric, positive-
definite operator C : H → H defined through
⟨g, Ch⟩H = Cov (⟨X, g⟩H , ⟨X, h⟩H ) = EX [⟨X, g⟩H ⟨X, h⟩H ].
We denote the law of X in this case by N (0, C). Since X takes values in H, C is guaranteed to be compact [Hairer,
2009]. Therefore, there exists an orthonormal basis (ei : i ≥ 1) of eigenvectors of C satisfying Cei = ciei. Fixing
this basis, the second moment of X is given by
(3)
E[∥X∥2
H ] = E
(cid:35)
⟨X, ei⟩2
H
=
(cid:34) ∞
(cid:88)
i=1
∞
(cid:88)
i=1
E[⟨X, ei⟩2
H ] =
∞
(cid:88)
i=1
⟨ei, Cei⟩H =
∞
(cid:88)
i=1
ci.
Since a Gaussian measure is supported on H if and only if its second moment on H is finite [Hairer, 2009], and X
takes values in H, the trace of C, tr(C) = (cid:80)∞
i=1 ci, will be finite. We then also say that C is of trace class. Note that
this is not the case if one would choose C = Id, since its trace is infinite. However, one could always just consider a
larger space H ′ ⊃ H, such that H ′ supports μ := N (0, C) and on which C would then have finite trace.
The Cameron–Martin space The covariance operator C plays a special role in that it characterizes the 'shape' of the
Gaussian measure N (0, C). Indeed, one may define another canonical inner product space U associated to C, which
is a (compactly embedded) subspace U ⊆ H called the Cameron–Martin space of N (0, C). Intuitively speaking, with
respect to the geometry of U , a random variable X ∼ N (0, C) will have 'identity' covariance. Assuming that C is
non-degenerate, the Cameron–Martin space is defined via the inner product
⟨g, h⟩U = ⟨g, C −1h⟩H = ⟨C −1/2g, C −1/2h⟩H .
Since C −1 is unbounded, U is indeed a smaller space than H; more specifically, one can show that U = C 1/2H. In
order to generate a realization of X ∼ N (0, C), one may simply draw i.i.d. coefficients (ξi ∼ N (0, 1) : i ≥ 1) and
set X = (cid:80)N
It is important to note that X almost surely does not take values in U . As an example, let H = L2([0, 1]), and consider
a one-dimensional Brownian motion process (Bt : t ∈ [0, 1]). Of course, B ∈ H almost surely. The Cameron–Martin
space of B, however, is given as the space U = H 1([0, 1]) of weakly differentiable functions on [0, 1]. Since the
i=1 are the eigenpairs of C.1
ξiei where (ci, ei)∞
i=1 c1/2
i
1This is also called the Karhunen–Lo`eve expansion of X, and in finite dimensions relates to the simple fact that C −1/2X ∼
N (0, Id).
4
Infinite-Dimensional Diffusion Models
A PREPRINT
sample paths of B are almost surely nowhere differentiable [Karatzas et al., 1991], we conclude that almost surely
B /∈ U .2 Nevertheless, U does indicate the regularity of the Gaussian process at hand: the more regular U , the more
regular the draws from the corresponding Gaussian measure.
C-Wiener processes in Hilbert spaces The standard Brownian motion in RD has increments Wt+∆t − Wt ∼
N (0, ∆tID). However, for the case of a general infinite-dimensional Hilbert space H, the meaning of an identity
covariance matrix depends on the choice of the scalar product with respect to which the Gaussian measure has identity
covariance. Therefore, we will from now on fix two Hilbert spaces: the Cameron–Martin space U , with respect to
which the increments of the Wiener process would have covariance ∆tI, and a larger space H on which W U
takes
t
values and has covariance operator C, i.e.
W U
t+∆t − W U
t ∼ N (0, ∆tC).
In general, we will pick H large enough so that all of our objects take values in it (the target measure μdata as well
as the C-Wiener process W U
t ). The choice of U can then also be seen as being equivalent to choosing a covariance
operator C of W U
t on H.
Interpretation in finite dimensions Given a Gaussian distribution N (0, C) on RD, its Cameron–Martin space will
be again RD, but equipped with the scalar product
√
⟨x, y⟩U = ⟨C −1/2x, C −1/2y⟩RD = xT C −1y.
Plugging U into definition (3), one sees that X has an identity covariance matrix with respect to U . If X ∼ N (0, C),
CZ, for Z ∼ N (0, ID). Similarly, a C-Wiener process with increments N (0, C)
then it can also be represented as
in finite dimensions can be constructed by using a standard Brownian motion Wt on RD and multiplying it with
C.
Therefore, in finite dimensions, most of the discussions above can be simplified to choosing covariance matrices and
representing objects of interest in terms of standard Gaussians (Z) or Brownian motions (Wt). The main technical
difficulties in infinite dimensions arise because one has to choose a Hilbert space H on which Z would have the
standard normal distribution, and because Z will not take values in H.
√
However, in infinite dimensions, one can still understand most concepts that relate to the choice of Gaussian measures
by simply thinking about some large Hilbert space H ′ in which all quantities of interest take values and then identifying
Gaussian random variables with their covariance operators on this space.
3 The infinite-dimensional forward and reverse SDEs
We will now formulate the forward and reverse SDEs of our generative model in infinite dimensions, and show that
the reverse SDE is, in fact, well-posed with the correct terminal distribution.
To this end, let μdata be our target measure, supported on a separable Hilbert space (H, ⟨*, *⟩). Our goal is to generate
samples from μdata, which is done by first adding noise to given samples from μdata using a forward SDE and then
generating new samples using a learned reverse SDE [Song et al., 2021].
3.1 Forward SDE
We now define the infinite-dimensional forward SDE used to 'diffuse' the initial measure μdata. As noted in Section
2, there is no natural Brownian motion process in infinite dimensions; instead there is one white noise process W U
t
for each Hilbert space U . From now on, we fix some Cameron–Martin space U , together with its Gaussian measure
N (0, C). Furthermore, let H be large enough to not only support μdata, but also N (0, C). In practice, an example
would be to choose a Gaussian process (GP) with a Mat ́ern covariance N (0, C) (which implicitly defines U ). As the
embedding space H, one could for example choose L2. Then W U
t would have increments that are samples from a
Mat ́ern GP.
We then define the forward SDE as
1
2
dXt = −
Xtdt + dW U
t = −
Xtdt +
√
CdW H
t ,
1
2
X0 ∼ μdata .
(4)
The marginal distributions of Xt will converge to the stationary distribution N (0, C) as t → ∞ [Da Prato and
Zabczyk, 2014, Theorem 11.11]. We will denote the marginal distributions of Xt by Pt.
The choice of U , or equivalently C, can be guided by the theory that we will develop and strongly impacts empirical
performance. We discuss these choices in Section 7.
2Here, we have used that functions in H 1 are absolutely continuous, and therefore almost everywhere differentiable on [0, 1].
5
Infinite-Dimensional Diffusion Models
A PREPRINT
3.2 Definition of the score function
Analogously to score-based generative models in finite dimensions, we now wish to define the reverse SDE corres-
ponding to (4); this SDE on H should approximately transform N (0, C) to μdata. This can be achieved by time-
reversing the SDE (4). In the finite-dimensional case, the drift of the time reversal SDE involves the score function
∇ log pt (see (2)), where pt is the density of Pt with respect to Lebesgue measure. More precisely, in the finite-
dimensional case H = RD, the reverse SDE to the Ornstein–Uhlenbeck process
is given by
dXt = −
Xtdt +
√
CdWt
1
2
dYt =
1
2
Ytdt + C∇ log pT −t(Yt)dt +
√
CdWt ;
see [Haussmann and Pardoux, 1986]. In the infinite-dimensional case, the density pt is no longer well-defined, since
there is no Lebesgue measure. Hence, we need another way to make sense of the score function. Interestingly, in
finite dimensions, there is an alternative way to express C∇H log pt via conditional expectations which is amenable
to generalization to infinite dimensions.
Lemma 1 Assume the finite-dimensional setting H = RD. Denote by pt the Lebesgue density of Xt, where X[0,T ] is
a solution to (4). Then, we can express the function C∇ log pt as
C∇ log pt(x) = −
= −
1
1 − e−t
1
1 − e−t
(cid:104)
(cid:16)
E
Xt − e− t
2 X0 | Xt = x
(cid:105)(cid:17)
(cid:16)
x − e− t
2 E[X0 | Xt = x]
(cid:17)
for t > 0, where E[f (Xτ ) | Xt = x] is the conditional expectation of the function f (Xτ ) given Xt = x and τ ∈ [0, T ].
Conditional expectations are also well-defined in infinite dimensions. Therefore, we will give the conditional expecta-
tion from Lemma 1 a name and make use of it as the drift of the reverse SDE on Hilbert space H:
Definition 1 Let H be a possibly infinite-dimensional Hilbert space and X[0,T ] a solution to (4). We define the reverse
drift as a map s : [0, T ] × H → H,
s(t, x) := −
(cid:16)
1
1 − e−t
x − e− t
2 E[X0|Xt = x]
(cid:17)
.
Remark 1 Note that the above function is only defined up to Pt-equivalence classes, where Pt is the distribution of
the time-t marginal of the forward SDE. However, the loss function for diffusion models is a L2 loss, integrated over
Pt. Therefore, without restricting the function class that one optimizes over, the minimizer is also only defined up to
Pt-equivalence. Neural networks are normally contained in the class of continuous functions in t and x. We will see
that we can pick versions of s(t, x) satisfying continuity properties, for example being locally Lipschitz continuous in
x (see Section 4.2).
We will also frequently use the fact that the drift of the reverse SDE is actually a rescaled martingale in reverse time.
We will later show that this also holds in infinite dimensions, in Theorem 1.
Lemma 2 Assume the finite-dimensional setting H = RD. Then, the quantity Mt = e−t/2∇ log pt(Xt) is a time-
continuous reverse time martingale, i.e.,
∇ log pt(Xt) = e
(t−τ )
2 E[∇ log pτ (Xτ ) | Xt]
for all 0 < τ < t.
The proofs of both of these lemmas can be found in Appendix D.1.
3.3 Reverse SDE
We are now able to write down the infinite-dimensional forward and reverse SDEs:
X0 ∼ μdata,
dXt = −
Xtdt +
√
CdW H
t ,
1
2
Y0 ∼ PT ,
dYt =
1
2
Ytdt + s(T − t, Yt)dt +
√
CdW H
t ,
(5)
(6)
6
Infinite-Dimensional Diffusion Models
A PREPRINT
where W U
t =
√
CW H
t are C-Wiener processes, and the drift s(t, x) of the reverse SDE is given by Definition 1.
In finite dimensions, one could also rewrite the reverse SDE as
Ytdt + C∇ log pT −t(Xt)dt +
√
CdW H
t
dYt =
=
1
2
1
2
Ytdt + C∇ log
(Xt)dt + C∇ log N (0, C)(Xt) +
√
CdW H
t
(7)
= −
1
2
Ytdt + C∇ log
(Xt)dt +
√
CdW H
t ,
dpT −t
dN (0, C)
dpT −t
dN (0, C)
where we denote by N (0, C)(x) the density of N (0, C) of evaluated at x. In finite as well as in infinite dimensions,
if X0 ∼ μdata has a density with respect to a Gaussian N (0, C), then so will the distribution of Xt (see the proof of
Theorem 3). Therefore, under that assumption, the SDE in the last line of (7) can also be made sense of in infinite
dimensions. Rewriting the SDE in this form is helpful in the proof of Theorem 3.
Remark 2 Another forward SDE with invariant measure ν = N (0, C) is
dXt = −
1
2
C −1Xtdt + dW H
t ,
with corresponding reverse SDE
dYt = −
1
2
C −1Ytdt + ∇H log
dPT −t
dN (0, C)
(Yt)dt + dW H
t .
(8)
(9)
The operator C −1 can often be identified with a differential operator, turning (9) into a stochastic partial differen-
tial equation (SPDE). One can then use numerical tools for SPDEs to approximate the above. This constitutes an
interesting direction for future work.
3.4 Training loss
To simulate the reverse SDE, we need a way to approximately learn the drift function s(t, x). For another function
̃s(t, x) (a candidate approximation to s), we measure the goodness of the fit of ̃s using a score-matching objective, i.e.
SMt( ̃s) = E[∥s(t, Xt) − ̃s(t, Xt)∥2
(10)
On RD, the norm ∥ * ∥K to measure the misfit is typically the Euclidean norm. For training, this loss can be rewritten
into the denoising score matching objective,
K].
DSMt( ̃s) = E[∥ ̃s(t, Xt) − (1 − e−t)−1/2(Xt − e−t/2X0)∥2
K] = SMt( ̃s) + Vt.
(11)
One can then show (see [Vincent, 2011]), that SM and DSM only differ by a constant Vt and therefore one can use
DSM as an optimization objective to optimize SM. The DSM loss is normally optimized on a sequence of times
{tm}M
m=1 on which the reverse SDE is discretized (since the score will only be evaluated at these ti values), i.e.,
Loss( ̃s) =
M
(cid:88)
m=1
SMtm ( ̃s) =
M
(cid:88)
m=1
DSMtm( ̃s) − Vtm = Etm,X [∥ ̃s(tm, Xtm) − σ−1
tm (Xtm − e−tm/2X0)∥2
K] − V, (12)
where the last expectation is taken over tm ∈ Unif({t1, . . . , tM }) and V = (cid:80)M
We will see that the equivalence of SMt and DSMt does not hold in general in infinite dimensions. Furthermore, we
will study the choice of the norm ∥ * ∥K. Two natural choices that come to mind are the norm of the embedding Hilbert
space H and of the Cameron–Martin space U of C. In the following lemma, we study conditions under which we can
rewrite the loss into the denoising score matching objective.
m=1 Vtm .
Lemma 3 Let (K, ⟨*, *⟩K) be a separable Hilbert space. Furthermore, denote by ̃s an approximation to s, such that
the score matching objective (10) is finite. Then,
where DSMt is defined in (11) and Vt is given by the conditional variance of X0,
SMt( ̃s) = DSMt( ̃s) − Vt,
Vt =
e−t
1 − e−t
E[∥X0 − E[X0|Xt]∥2
K].
Furthermore, DSMt is infinite if Vt is.
7
Infinite-Dimensional Diffusion Models
A PREPRINT
Lemma 3 shows that in infinite dimensions there is the possibility that the true objective SM, which we are trying to
optimize, might be finite, while DSM is not. One might argue that this is not relevant since in practice one always has
to discretize and then both will be finite. However, as we will argue in the following paragraph, the discretization level
will impact the variance of the gradients. In practice, we do not evaluate the full expectation values in SM or DSM,
but take Monte Carlo estimates in the form of mini-batches. Assuming that we have already reached the optimum, i.e.,
s = ̃s, then the SM objective would be zero and also the gradient of any mini-batch taken to approximate it would be
zero. However, derivatives of Monte Carlo estimates of the DSM objective will have the form
∂θi DSM( ̃sθ) =
1
M
M
(cid:88)
i=1
⟨∂θi ̃s(t, xM
t ), ̃s(t, Xt) − σ−1
t
(Xt − e−t/2X0)⟩,
where me made the parameters θ (typically, the weights of a neural network) of ̃sθ explicit. The random variable
̃s(t, Xt) − σ−1
(Xt − e−t/2X0) has infinite variance, and therefore we can expect the above gradient estimates to have
infinite variance too. Hence, if Vt is not finite and therefore DSMt is not finite in infinite dimensions, one can expect
variance of the the gradient of the DSM to get arbitrarily large as the discretization gets finer, despite the fact that the
true gradient should be zero. In the following lemma, we study some cases in which we can expect V to be finite.
t
Lemma 4 The denoising score matching objective (11) is finite in infinite dimensions if one of the following two
conditions holds:
1. We use the Cameron–Martin norm ∥ * ∥K = ∥ * ∥U in the objective, and μdata is supported on the Cameron–
Martin space U of N (0, C) and has finite second moment, i.e.,
2. Both μdata and N (0, C) are supported on K.
E[∥X0 − E[X0]∥2
U ] < ∞.
A consequence of point 2 of Lemma 4 is that the norm of the embedding Hilbert space K = H is always a valid
choice. The proof of both lemmas above can be found in Appendix D.2.
4 Well-posedness of the reverse SDE
We need to show that the reverse SDE possesses solutions and that they are unique in order to prove that the reverse
SDE samples from the target distribution in infinite dimensions. In Section 4.1, we show that the time-reversal of the
forward SDE satisfies the reverse SDE in infinite dimensions and therefore samples the right final distribution μdata
at its final time. In Section 4.2, we will show strong uniqueness and existence of the reverse SDE for general initial
conditions.
To begin, we recall a few standard notions of solutions of SDEs; we refer to Karatzas et al. [1991] for details. Our
main aim will be to establish the uniqueness and existence of strong solutions of the reverse SDE. This results will
also be relevant for the proof of Theorem 4. We say that the SDE (6) has a unique strong solution, if for any driving
Wiener process Wt there exists a unique solution Yt, i.e., if there are two different solutions Yt and ̃Yt, both driven by
the same noise Wt, then P[Yt = ̃Yt for all t] = 1, i.e., almost every path of the solutions will agree.
4.1 The time reversal satisfies the reverse SDE
Thus far, we have formally formulated the reverse SDE (6) without showing that it actually constitutes a time reversal
of the stochastic dynamics from the forward equation. In the following theorem, we show that Yt indeed constitutes a
time reversal of Xt and that it recovers the correct target distribution at terminal time T .
Theorem 1 Assume Xt is a solution to (4). Then, the time reversal Yt := XT −t solves the SDE (6). Furthermore, if
H is a Hilbert space such that μdata and N (0, C) are both supported on H, we can choose s such that Mt = s(t, Xt)
is almost surely continuous in t with respect to the H-norm.
Proof (Sketch) We approximate the infinite-dimensional SDEs by finite-dimensional forward and reverse SDEs and
use a limiting argument. The main point of the proof is to show that YT ∼ μdata in infinite dimensions. This is
complicated by the fact that the natural approximations of YT will have Brownian motions and drifts ∇ log pt that
change with the discretization dimension. That is, ∇ log pD+1
from the (D + 1)-dimensional discretization, restricted
to RD, is not equal to ∇ log pD
t , and the same holds for the Brownian motions.
t
8
Infinite-Dimensional Diffusion Models
A PREPRINT
However, we will show that the terms ∇ log pD
t are martingales in D. This can be used to obtain a limiting object as
D → ∞ through the L2-martingale convergence theorem. Furthermore, since the drifts are also reverse martingales
in time (see Lemma 2), one can obtain uniform convergence on the whole interval [0, T − ε] for any ε.
The proof is then concluded by using the fact that the finite-dimensional approximations are all solutions to the reverse
SDE and therefore fulfill
t − Y D
Y D
0 −
Y D
r dr −
T −rdr = W D
sD
t .
1
2
(cid:90) t
0
(cid:90) t
0
for a D-dimensional Brownian motion W D
(which again will change for each D, i.e., the restriction of the the D + 1-
t
dimensional Brownian motion to the D first dimensions is not equal to BD). Since all the terms on the left hand side
converge in L2, uniformly in t, so does the right hand side. The right hand side is P DCP D Brownian motion for each
D. Using the closedness of the spaces of martingales and furthermore the L ́evy characterization of Brownian motion,
we find that the W D
t must converge to a C-Wiener process Wt.
The full proof can be found in Appendix E.
(cid:50)
Remark 3 The work F ̈ollmer and Wakolbinger [1986] studies time-reversal of more general forward SDEs. Due to
the more general setting, the resulting SDE is only expressed coordinate-wise, and the SDE as well as the assumptions
are more technical. Using our approach and the reverse drift s(t, x), we prove that we can still use the common
denoising score matching loss to approximate s(t, x); see Lemma 3. Another related concept is vector logarithmic
derivatives, as discussed in Bogachev [1997].
Due to Theorem 1, we know that there is a solution to (6) that will sample μdata at the final time. To motivate
approximating (6) for sampling from μdata, we also need to show that these solutions are unique; otherwise there
could be other solutions that have different terminal conditions. We will achieve this in the following section.
4.2 Uniqueness of solutions
The first case we study is the case of general distributions with bounded support. Note that the assumptions in the fol-
lowing theorem require nothing more than bounded support. This allows for the study of the possibility of distributions
supported on irregular substructures of the full space (i.e., satisfying the manifold hypothesis). Many distributions that
diffusion models are applied to satisfy the manifold hypothesis and understanding how diffusion models interact with
manifolds has been an active area of research [Pidstrigach, 2022b, De Bortoli, 2022, Batzolis et al., 2022].
Theorem 2 Fix a covariance operator C in the forward SDE (5) together with its Cameron–Martin space U . Assume
that the support of μdata is contained in a ball BR in U of radius R ≥ 0:
BR = {x : ∥x∥U ≤ R}.
Then there is a version of s which is Lipschitz continuous with respect to the Cameron–Martin norm, i.e.,
∥s(t, x) − s(t, y)∥U ≤ Lt∥x − y∥U ,
(13)
where Lt ∈ R+ is a time-dependent Lipschitz constant. Moreover, the reverse SDE with the Lipschitz continuous
version of s(t, x) has a unique strong solution.
Proof (Sketch) The transition kernel of the forward SDE is given by
pt(x0, *) ∼ N (e−tx0, vtC),
where we used the shorthand notation vt = 1 − e−t. If x0 is an element of the Cameron–Martin space U of C, then
the transition kernel is absolutely continuous with respect to N (0, (1 − e−t)C). The explicit formula for the density is
nt(x0, x) =
dN (e−tx0, vtC)
dN (0, vtC)
(x)
by the Cameron–Martin theorem. Since μdata almost surely takes values in U , one can use the above to derive an
explicit expression for the conditional expectation E[X0|Xt = x] in terms of these densities:
E[X0|Xt = x] =
(cid:82) x0nt(x0, x)dμdata(x0)
(cid:82) nt(x0, x)dμdata(x0)
.
This formula can be used to derive local Lipschitzness of
s(t, x) = −
1
1 − e−t x +
2
e− t
1 − e−t
E[X0|Xt = x].
9
Infinite-Dimensional Diffusion Models
A PREPRINT
Interestingly, the local Lipschitzness is in terms of the norm of U . Even if x and y themselves are not in U , if their
difference in is U , the U -norm of the difference s(t, x) − s(t, y) will be bounded by (13). Taking some care, one
can still use a fixed point argument to obtain existence, but not uniqueness. One can then apply Gr ̈onwall's lemma to
obtain uniqueness.
Note that obtaining weak uniqueness would be easier, since under our assumptions the drift s(t, x) will always map to
the Cameron–Martin space of the C-Wiener process and one could apply a Girsanov-type argument.
The full proof can be found in Appendix F.1.
(cid:50)
The other case of interest is applying diffusion models to Bayesian inverse problems or simulation-based inference.
In this case, we assume that the true measure is given as a density with respect to a Gaussian reference measure. We
treat it in the theorem below:
Theorem 3 Fix a covariance operator C in the forward SDE (5). Assume μdata is given as
μdata ∝ exp(−Φ(x))dN (0, Cμ).
Let (H, ⟨*, *⟩H ) be a Hilbert space on which N (0, Cμ) is supported and C is bounded. For the potential Φ ∈ C 1(H)
we assume,
• Φ(x) ⩾ E0,
• Φ(x) ⩽ E1 + E2∥x∥2, and
• ∥∇Φ(x) − ∇Φ(y)∥ ⩽ L∥x − y∥,
where the gradient is the H-gradient. Then there is a version of s(t, x) that is locally Lipschitz continuous with respect
to the H-norm for each t, i.e., for ∥x∥, ∥y∥ ≤ r there is a Lt,r < ∞ such that
∥s(t, x) − s(t, y)∥ ≤ Lt,r∥x − y∥,
and the reverse SDE with the locally Lipschitz continuous version of s(t, x) has a unique strong solution.
Proof (Sketch) The proof holds for any C that is diagonalizable with respect to the same eigenbasis as Cμ (in particular,
also for C = Id, i.e., H-white noise), but we will only treat the less technical case C = Cμ here.
In the case of C = Cμ, the distribution Pt of Xt is absolutely continuous with respect to N (0, C). One can rewrite
the reverse SDE as in (7). It will then hold that
∇xt log
dpt
dN (0, C)
(xt) = E[C∇Φ(X0)|Xt = xt],
and the proof will mainly translate the Lipschitzness properties of ∇Φ(x) to E[∇Φ(X0)|Xt = x]. The global
Lipschitzness of ∇Φ(x) only induces local Lipschitzness of E[∇Φ(X0)|Xt = x], but that is enough to apply a
Gr ̈onwall argument and deduce strong uniqueness.
Furthermore, one can obtain weak existence to the reverse SDE. By Theorem 1, the time reversal will be a weak solu-
tion with initial condition PT . However, under the assumptions of the theorem, N (0, C) will be absolutely continuous
with respect to pT . Therefore, one can obtain a weak solution with initial conditions N (0, C) by reweighting the time
reversal. However, weak existence together with strong uniqueness already imply strong uniqueness; see Karatzas
et al. [1991, Section 5.3].
The full proof can be found in Appendix F.2.
(cid:50)
5 Algorithms and discretizations
We state simplified versions of our proposed algorithms in Algorithms 1 and 2. There are many potential modifications
one might make to the above algorithms, as for example discussed in Song et al. [2021], Song and Ermon [2020], Ho
et al. [2020]; we do not include these here since they are not the focus of the current work. To implement any
algorithm on a computer, the functions have to be discretized in some way. Discretization also interacts with the
covariance matrix C, as the same covariance matrix has different meanings in different discretizations. We discuss
this briefly now.
10
Infinite-Dimensional Diffusion Models
A PREPRINT
Algorithm 1 Training
n=1
Require: Covariance operator C
Require: Training data {X n}N
Require: Norm ∥ * ∥
Require: Batch size B
Require: Discretization grid {t1, . . . , tM }
1: while Metrics not good enough do
2:
3:
4:
5:
6:
Sample {ξi}B
i=1 ∼ N (0, C) i.i.d.
Subsample {xi
i=1 from {X n}N
0}B
Sample ti ∈ Unif({t1, . . . , tM })
√
t ← e−ti
xi
xi
0 +
Loss(θ) = (cid:80)B
t) −
Perform gradient step on Loss.
i=1 ∥ ̃sθ(ti, xi
1 − e−ti ξi
n=1
7:
8: end while
1√
1−e−ti ξi∥2
Algorithm 2 Sampling
M }L
Require: Covariance operator C
Require: Discretization grid {t1, . . . , tM }
Require: Number of samples to generate L
1: {xi
i=1 ∼ N (0, C)
2: for m ← M, . . . , 1 do
∆t ← tm − tm−1
3:
Sample {ξi}L
4:
xi
m−1 ← xi
5:
6: end for
7: return {xi
i=1 ∼ N (0, C) i.i.d.
m + ∆t ̃sθ(tm, xi
m) +
√
M }M
i=1
∆t ξi
If the functions are discretized on a grid, i.e., if the samples are of the form {f (xd)}D
d=1 for a fixed grid {xd}, choosing
an identity covariance matrix corresponds to adding independent noise at each grid point xd. The limiting object of the
noise as the grid gets finer is space-time white noise (recall Section 1.1). Furthermore, the Euclidean norm on RD in
the loss function (11) will correspond to using the L2 loss in the limit-i.e., the Cameron–Martin norm of the noising
process.
In RD the choice of the white noise process is equivalent to choosing a covariance matrix C and adding
a standard RD-valued Brownian motion Wt. Any correlated Wiener noise process W U
on RD. If one wants the limit of
that Gaussian process on the grid {xd}D
Gaussian process realizations for common kernels (such as Mat ́ern or squared exponential).
CdWt with
t can be represented in this way
CdWt to be a Gaussian process, one needs to plug in for C the kernel matrix of
d=1. Alternatively, one can also use one of many available libraries to generate
√
√
Note that the meaning of C depends on the discretization. If f is discretized with respect to some basis ei of a space
U , then using the identity covariance matrix corresponds to using the white noise process with Cameron–Martin space
U . Therefore, discretizing the functions in a wavelet or Fourier basis will also result in space-time white noise as these
both form an orthonormal basis of L2 (under the common scaling of the basis vectors). However, if one does not want
to work in the spatial domain, one can also just discretize the functions in an orthonormal basis of the Cameron–Martin
space U of the noise one is targeting. Therefore, we can translate the approaches in Guth et al. [2022], Phillips et al.
[2022], Phung et al. [2022] into our setting.
6 Bounding the distance to the target measure
We now study how far the samples generated by the diffusion model algorithm lie from the true target measure μdata.
We do this in the Wasserstein-2-distance,
(cid:18)
W2(μ, ν) =
inf
κ∈Q(μ,ν)
(cid:90)
∥x − y∥2
H dκ(x, y)
(cid:19)1/2
,
where κ runs over all measures on H × H which have marginals μ and ν. The Wasserstein-2 distance in some sense
"lifts" the distance induced by ∥ * ∥H to the space of measures. In the following theorem, we give an upper bound
for the Wasserstein distance between the sample measure and the true data-generating measure. The bound holds
irrespective of ∥ * ∥H , giving us the freedom to study how different choices of ∥ * ∥H affect the distance bound.
Theorem 4 We denote the covariance of the forward noising process by C. Let (H, ∥ * ∥H ) be any Hilbert space such
that the support of μdata and N (0, C) are contained in H. Assume that ∥ * ∥H is at least as strong as the norm ∥ * ∥K
used in the training of the diffusion model (see (12)), i.e.,
for some constant a. Further, assume that s(t, x) is Lipschitz on H with constant L, i.e.,
∥x∥H ≤ a∥x∥K
∥s(t, x) − s(t, y)∥H ≤ L∥x − y∥H
11
Infinite-Dimensional Diffusion Models
A PREPRINT
and that the reverse SDE has a strong solution (see Theorem 2 or 3 for the requirements). Let the reverse SDE (6) be
discretized using an exponential integrator (see Appendix C). Then,
W2(μdata, μsample) ⩽
(cid:16)
exp(−T /2) W2(μdata, N (0, C)) + ε1/2
Num + aε1/2
Loss
(cid:17)
exp
(cid:19)
,
L2T
(cid:18) 1
4
(14)
where εLoss is the value of the loss objective (12) and εNum denotes the error due to the numerical integration proced-
ure,
εNum = O(∆t) sup
0<t≤T
EXt∼pt[∥s(t, Xt)∥2
H ].
Proof (Sketch) We define two strong SDE solutions: Yt, which is a solution to (6) with the correct drift s(t, x) and
started in PT ; and ̃Yt, which uses the approximate drift ̃s and is started in N (0, I).
Both solutions are run to time T . We couple them by using the same Brownian motion process for both and starting
them in W2-optimally coupled initial conditions.
We then obtain a bound on E[∥YT − ̃YT ∥2
us a coupling between μdata and μsample and therefore upper bounds the Wasserstein-2 distance between those two.
H ]. Since we know that YT ∼ μdata, ̃YT ∼ μsample by definition, this gives
We make use of the fact that the score is a martingale to obtain a simple upper bound for the numerical integration
EXt∼pt[∥s(t, Xt)∥2
error, depending only on the quantity sup0<t≤T
The full proof can be found in Appendix G.
H ].
(cid:50)
Since the choice of the embedding space (H, ∥ * ∥H ) is left open in Theorem 4, we briefly discuss the implications of
that choice. Controlling the Wasserstein distance with respect to a stronger underlying norm always implies the same
Wasserstein-bound w.r.t. any weaker underlying norm. Of course, there is the possibility to obtain a better bound by
directly applying the theorem for a weaker norm.
Picking stronger norms for H will in general result in the Wasserstein distance also factoring in differences in sample
smoothness as well as deviations in function values. For example, picking H = L2 means that the bound only implies
closeness of the function evaluations while, for example, samples being too rough is not factored in. Picking positive
Sobolev spaces will punish deviations in function values and deviations in the derivatives of the samples from the true
samples. Picking negative Sobolev spaces for H (as we will need to for the common implementation of diffusion
models; see Section 7.2) means that the samples are only close in a distributional sense. See Section B in the appendix
for further discussion.
7 Designing infinite-dimensional diffusion models
Our theory yields several suggestions on how one should design infinite-dimensional diffusion model algorithms.
Section 7.1 gives a concise summary of those design principles, while Section 7.2 discusses the extent to which
those design principles align with common implementations of diffusion models. In Section 8, we then show how to
implement the guidelines in some explicit examples.
The two main design choices we will discuss are
1. The choice of the forward noising process W U
t
in (4).
2. The choice of the norm ∥ * ∥K in the denoising score matching objective in (12).
The first choice (of U and hence W U
t ) is equivalent to the choice of an invariant Gaussian distribution N (0, C), and
we will use these choices interchangeably. In general, picking a C such that N (0, C) produces smoother samples
corresponds to picking a smaller space U , while rougher samples correspond to larger Cameron–Martin spaces U ; see
also the examples in Section 8.1 and Figure 1. Furthermore, after discretizing the problem to finite dimensions, the
choice of U or C corresponds to nothing else than specifying a covariance matrix C, i.e., Wt is replaced by
CWt in
the diffusion processes. See Section 5 for more details.
√
After discretization, the second design choice of ∥ * ∥K corresponds to specifying a loss norm of the form ∥K −1/2 * ∥
in place of the typical Euclidean norm ∥ * ∥.
12
Infinite-Dimensional Diffusion Models
A PREPRINT
7.1 General guidance
Match C to μdata First, we begin by pointing out the implications of Theorem 4 on the choice of C, or equivalently,
U . The term W2(μdata, N (0, C)) appearing in the error bound (14) clearly indicates choosing C such that N (0, C)
is as close as possible to μdata.
Choosing C such that we can pick a strong H-norm Second, as discussed at the end of Section 6, we would like
to choose as strong an ∥ * ∥H -norm as possible in Theorem 4. This suggests not picking C too rough (U too large) as
the norm space H in Theorem 4 has to support N (0, C).
This last points seems to suggest that we would want to pick C as smooth as possible to allow for stronger H-norms.
However, since however, since H has to support μdata, there is a restriction on how strong an H-norm can be chosen.
Therefore, this suggests matching N (0, C) to μdata so that they are supported on the same space H, similarly to our
first observation.
Choosing the loss-norm ∥ * ∥K The H-norm in Theorem 4 also has to be stronger than the loss norm ∥ * ∥K, again
suggesting choosing K as small as possible. However, besides numerical issues, also here there are lower bounds on
how strong we can choose K.
To that end, we take another look at Lemma 4 in which we study two separate cases. In the first case, if C is rough
enough such that U contains the support of μdata, we can choose the Cameron–Martin norm of N (0, C) as the loss
norm, i.e., K = U . In the second case, K has to support both N (0, C) and μdata, which is the same condition as for
the space H chosen in Theorem 4.
Hence, there are predominantly two natural ways to design the algorithm:
1. Choose N (0, C) as smooth as possible / U as small as possible, but large enough such that the support of
μdata is contained in its Cameron–Martin space U . Then choose the loss norm ∥ * ∥K in (12) equal to the
Cameron–Martin norm, K = U . This algorithm design is called Infinite-Dimensional Diffusion Model 1
(IDDM1)
2. Match C to the data, i.e., choose N (0, C) such that its samples are as similar to the samples from μdata as
possible. Then choose the loss norm ∥ * ∥K in (12) such that it supports both μdata and N (0, C). Let us call
this algorithm design Infinite-Dimensional Diffusion Model 2 (IDDM2).
Note that by Theorem 2, if not much is known about the distribution, and if in particular it might be supported on
manifold-like structures, we must pick U large enough to contain the support of μdata anyway. We will therefore use
IDDM1 in these cases; see Section 8.2. If one has more structural information, for example the knowledge that μdata
has density with respect to a Gaussian measure, we will use IDDM2; see Section 8.3.
7.2
Image distributions and white noise diffusion models
The common implementation of the diffusion model algorithm will converge as D → ∞ to U = L2, i.e., use space-
time white noise in the forward noising process. Furthermore, the loss function will also approach the L2 loss, which
means we are in the setting where we use the Cameron–Martin norm in the loss. For more details, see Section 5. We
will call this algorithm White Noise Diffusion Model (WNDM).
If μdata is an image distribution, we can expect it to lie on a manifold, or more generally some lower-dimensional
substructure. Furthermore, since the function values of an image are bounded on [0, 1], the image samples are all
contained in L2. Therefore, we are in the setting of Theorem 2, where the data are contained in the Cameron–Martin
space U of the noise. Furthermore, we can apply Lemma 4 (bullet point 1) to see that we can use the Cameron–
Martin norm, i.e., the L2 norm, and obtain a well-defined denoising score-matching objective. Therefore, under these
assumptions, we have shown that applying WNDM to image distributions has a well-defined infinite-dimensional limit.
Coming back to the discussion in Section 7.1 (in particular the design guidance for IDDM1), however, our theory
suggests that we should try to pick U as small as possible, while still containing the typical image distribution. How-
ever, this U cannot be too regular, since images are quite irregular-for example, they can be discontinuous. If we
identify images with two-dimensional functions, then already the L2-Sobolev spaces H α of order α > 1 only contain
continuous functions. Therefore, on the Sobolev scale (H α : −∞ < α < ∞), the 'optimal' Cameron–Martin space
would possess regularity of at most α = 1. In light of this, setting U = H 0 = L2 indeed seems like a natural choice
that is close to matching the maximal possible regularity. Strikingly, this is in line with the huge empirical success of
the WNDM algorithm for image distributions. To further refine the optimal choice of the space U beyond L2 is an
interesting avenue, both for theoretical and empirical future study.
13
Infinite-Dimensional Diffusion Models
A PREPRINT
(a) α = 0, one sample
(b) α = 1, six samples
(c) α = 2, six samples
√
Figure 1: In each panel, we plot samples from πα for different values of α, where πα is defined in Section 8.1. We
2 sin(2πk * ) as an orthonormal basis of L2. For α = 0 we see a sample of space-time white noise,
chose ek(*) =
where no function value is correlated to any of its neighboring function values. For α = 1 and our specific choice of
ek, the sampled measure is the Brownian bridge measure.
8 Numerical illustrations
In this section, we illustrate our results through numerical experiments. We sample functions defined on [0, 1], and
we discretize this spatial domain into a uniform grid with D = 256 evenly spaced points. For other discretization
schemes, see the discussion in Section 5. We employ a grid-based spatial discretization since it allows us to use
the popular U-Net architecture. Other common discretization schemes 'whiten' the data, rendering the convolutional
layers of the U-Net unnecessary. For implementation details, see Appendix A.
Section 8.1 introduces some common preliminaries needed for both of the subsequent numerical examples. Section
8.2 then compares various diffusion model constructions in the setting of distributions that are not defined via Gaussian
reference distributions, but rather supported on submanifolds of the infinite-dimensional space. Section 8.3 demon-
strates the use of infinite-dimensional diffusion models for solving Bayesian inverse problems via a simulation-based
(i.e. conditional sampling) approach.
8.1 Families of Gaussian measures
We first construct a family (πα, H α : −∞ < α < ∞) of Gaussian measures πα and their Cameron–Martin spaces
H α. This construction allows us to interpolate between measures with different sample smoothness and compare
between the algorithms described in Section 7.1 and the canonical implementation of diffusion models described in
Section 7.2.
To that end, we fix an orthonormal basis ek of L2([0, 1]). Then, we construct a family (πα : −∞ < α < ∞) of
Gaussian measures as the distributions of
∞
(cid:88)
k−αZkek ∼ πα,
where Zk ∼ N (0, 1) i.i.d. The Cameron–Martin space of πα is denoted by H α and has norm
k=1
∥x∥2
α =
∞
(cid:88)
k=1
k2α⟨x, ek⟩2
L2([0,1]).
(15)
(16)
Note that H 0 = L2([0, 1]) and therefore π0 is space-time white noise. Furthermore, H α ⊂ H β for α > β. As we have
discussed before, samples of πα will (almost surely) not be elements of the corresponding Cameron–Martin space H α.
Nevertheless, the distribution πα is supported on H α−κ as long as κ > 1
2 ; see Beskos et al. [2011, Proposition 3.1].
The exact form of samples of πα depends on the chosen basis ek in (15). In our examples H α will be L2-Sobolev
spaces with either zero or periodic boundary conditions. For the case of zero boundary conditions, we have visualized
samples of πα for different values of α in Figure 1.
As discussed in Section 7.1, we want to study two main modeling choices: First, we must select a Gaussian measure
N (0, C), or equivalently its Cameron–Martin space U , for the noising process. We do that by fixing an αnoise and
setting
U = H αnoise .
14
Infinite-Dimensional Diffusion Models
A PREPRINT
Second, a loss norm ∥ * ∥K must be chosen. We do so by fixing an αloss and setting
K = H αloss.
As recommended in Section 7.1, these choices should depend on the structure of μdata. Therefore, we choose an αdata
and define μdata through a nonlinear transformation of παdata. This way, μdata will be non-Gaussian, but we still have
perfect knowledge about where its samples are supported. In particular, we will have
support(μdata) ≈ H αdata− 1
2 .
This gives us the possibility to match U and K to μdata in different ways. In realistic examples, knowledge about
μdata could come from prior information or by studying the training samples-the empirical covariance matrix is, for
example, a natural candidate for specifying C in IDDM2.
Lastly, we will be able to make explicit statements about the norm of H for which the distance bounds in Theorem 4
hold, which we will also quantify by choosing an αdist. The larger αdist, the better, since the underlying norm for the
distance measurement gets stronger (see also the discussion in Section 7.1).
Note that the limit of the common implementation of diffusion models, which we called WNDM (see Section 7.2)
will use white noise for the noising process as well as the loss, i.e., αnoise = αloss = 0. In that case, N (0, C) will only
be supported on any H α with α < − 1
2 . Therefore, so that we can apply Theorem 4 with H αdist we have to choose
αdist < − 1
For the two numerical experiments in Sections 8.2 and 8.3, we will proceed as follows:
2 , i.e., use the norm of a negative Sobolev space.
1. We have information about the sample smoothness and support of μdata, in this case in the form of an αdata.
2. Based on Section 7.1, we then choose U and K, which boils down to the choice of αnoise and αloss.
3. We then know for which norms ∥ * ∥H our Wasserstein bound in Theorem 4 holds. In our interpolation family,
this boils down to an upper bound for αdist. Therefore, we can make statements about which properties of
μdata the diffusion model should successfully approximate.
8.2 Manifold distribution on a Cameron–Martin sphere
In this section, we will study a distribution which lies on an infinite-dimensional submanifold of L2([0, 1]), namely
2 sin(kπ *) in the construction of
the unit sphere of some Cameron–Martin space. To that end, choose ek(*) =
Section 8.1. For this choice, the Cameron–Martin spaces H α will be the Sobolev spaces W α,2
of functions vanishing
at the boundary, and π1 is proportional to the distribution of a Brownian bridge. Here we see that we can not only
capture smoothness but also structural information, such as boundary conditions, through the choice of an appropriate
Gaussian measure. For a more in-depth study of this, see Mathieu et al. [2023].
We draw N = 50 000 samples from παdata, where the data-generating αdata was set to
√
0
αdata = 2.
By our discussion in Section 8.1, these samples are supported on any H α with α < 3
αsupp = 1 < 3
the map
2 , in particular H 1. Now define
2 . The target distribution μdata is created by projecting παdata onto the 10-sphere in H αsupp , i.e., applying
H αsupp → H αsupp ,
x (cid:55)→ 10
x
∥x∥H α
supp
to all samples. We depict some of the training samples and a heatmap of their marginal densities in Figure 2.
As described in Section 7.1, we use the theory to guide the choices for αnoise and αloss. The data distribution was not
absolutely continuous with respect to a Gaussian, since we projected it to a submanifold (the sphere). Therefore, we
must apply Theorem 2 to obtain uniqueness. To satisfy the assumptions of Theorem 2, however, the Cameron–Martin
space U has to contain μdata. Hence, we will apply the IDDM1 from Section 7.1.
To apply IDDM1, we choose U so that it contains the support of μdata and N (0, C). This is accomplished by
setting αnoise = 1. Then, following the design principles of IDDM1, we pick the loss norm to be K = U , i.e.,
αloss = αnoise = 1, and learn the score by using the Cameron–Martin norm in the loss.
Note that the bound in Theorem 4 holds for any αdist smaller than
(cid:26)
αdist < min
αdata −
1
2
, αnoise −
1
2
(cid:27)
, αloss
= min
(cid:26) 3
2
,
1
2
(cid:27)
, 1
=
1
2
.
15
Infinite-Dimensional Diffusion Models
A PREPRINT
Figure 2: We generated 50 000 training examples from the distribution described in Section 8.2. On the left, we show
a heatmap of the resulting marginal densities of function values at each point in the domain [0, 1]. On the right, we
plot a few training samples.
(a) Epoch 10
(b) Epoch 30
(c) Epoch 60
Figure 3: Example of Section 8.2: samples generated by WNDM (row 1) and IDDM1 (row 2) after increasing numbers
of training epochs. Samples from the true measure can be compared in Figure 2.
For WNDM, i.e., the canonical implementation of diffusion models described in Section 7.2 with αloss = αnoise = 0,
the upper bound is − 1
2 . Therefore, while we do not expect the samples of WNDM to match the smoothness class of
μdata, we expect the samples of IDDM1 to at least partially retain the smoothness.
Figure 3 shows samples generated by the two models. We see that our theoretical findings are confirmed: WNDM
fails to learn the smoothness or correlation structure of the samples. Solely at training epoch 10 the WNDM algorithm
generated some samples that seemed to have the right smoothness, but even those actually contain jitter if one looks
closely. Overall, the training process was very unstable regarding the data smoothness, and minimizing the loss did
not seem to correlate with also matching the derivatives of the functions. On the other hand, IDDM1 produces samples
from the correct smoothness class, from the start of training onwards.
Note that both algorithms matched the marginals quite well, as can be seen in the heatmap plots of Figure 4, which
is also suggested by the theory: even if Theorem 4 only holds for an underlying negative Sobolev norm, the overall
distribution and in particular its marginals should still match the true marginals (see Section B).
8.3
Infinite-dimensional Bayesian inverse problem: volatility estimation
The following numerical experiment is inspired by Bayesian inverse problems (BIPs) [Stuart, 2010], which here we
approach via the paradigm of simulation-based inference. In this setting, we will use our infinite-dimensional diffusion
models for conditional sampling.
We assume that we have some knowledge about an unknown random variable X ∈ H in the form of a measurement
y ∈ Rl drawn from
Y ∼ q(X, *),
16
Infinite-Dimensional Diffusion Models
A PREPRINT
(a) WNDM
(b) IDDM1
Figure 4: Example of Section 8.2: each vertical slice shows a heatmap of the marginal density estimated from 2048
samples generated by each of the diffusion models, after 60 epochs of training. For comparison, the heatmap of the
50 000 training examples is plotted in Figure 2. The one-dimensional marginals are matched well by both algorithms.
where q is an observation kernel. Furthermore, we have some prior information on X, formalized through a prior
probability distribution:
X ∼ π := N (0, Cμ).
By Bayes' theorem, the posterior distribution ν of X given some observations Y = y is given by
dπ( * |Y = y) ∝ q(*, y) dπ.
(17)
Gold-standard methods for asymptotically exact sampling of distributions like (17) involve Markov chain Monte Carlo
(MCMC), e.g., Hamiltonian Monte Carlo [Duane et al., 1987] or, in the infinite-dimensional case, Hilbert space
Hamiltonian Monte Carlo (HSHMC) [Beskos et al., 2011], or other geometry-exploiting infinite-dimensional MCMC
methods [Cotter et al., 2013, Cui et al., 2016, Kim et al., 2023].
These MCMC methods, however, rely on having an explicit formula for the density of ν (up to a normalizing constant).
In many cases this is not possible-for example, if q or any of its components is given as a black-box model. To train a
conditional diffusion model, on the other hand, we only need samples from the joint distribution of (X, Y ). These can
be generated by sampling X i from the prior measure and sampling Y ∼ q(X i, *). We then train a conditional diffusion
model to generate samples from X|Y = y for any y. This is done by making the score model s not only depend on
Xt, but also on Y , i.e., we have a model s(t, Xt, Y ), which predicts X0 given Y = y. During generation, one can
then input the observation value y that one wants to condition on during simulation of the reverse SDE [Batzolis et al.,
2021]. Hence the entire procedure is sample-driven, and an example of simulation-based inference [Cranmer et al.,
2020].
We now proceed to a specific instance of a Bayesian inverse problem. The experiment is inspired by volatility estima-
tion. We assume that we observe a path of a time series, for example a stock price, modeled as
dSτ = στ Sτ dBτ ,
with no drift and a time-dependent volatility στ . The solution to the above equation is given by a geometric Brownian
motion, i.e.,
Sτ = S0 exp
σrdBr −
(cid:18)(cid:90) τ
0
1
2
(cid:90) τ
0
(cid:19)
.
σ2
r dr
We simulate paths of the above and observe Sτ at discrete times τ1 = 1
log-transformation and define ri as the log-returns:
4 , τ2 = 2
4 , τ3 = 3
4 , τ4 = 1. Then, we apply a
ri := log Sτi − log Sτi−1 =
(cid:90) τi
τi−1
σrdBr −
1
2
(cid:90) τi
τi−1
σ2
r dr ∼ N
(cid:18)
−
1
2
(cid:19)
vi, vi
, where vi :=
(cid:90) τi
τi−1
σ2
r dr.
Here, we set τ0 = 0 for notational convenience. Since σ should be positive, we model it as
and seek to infer the log-volatility a : [0, 1] → R.
στ = exp(aτ ),
Again, we define a family of Gaussian measures as in Section 8.1. This time we use a different orthonormal basis of
L2([0, 1]), given by
(cid:26)√
√
ek(τ ) =
2 cos(kπτ ),
if k even
2 sin((k + 1)πτ ), otherwise
.
17
Infinite-Dimensional Diffusion Models
A PREPRINT
Figure 5: Example of Section 8.3. As a reference/comparison, we generate 50 000 high-quality posterior samples
from dπαdata(aτ | ̃r) using the Hilbert space Hamiltonian Monte Carlo algorithm. On the left is a heatmap of posterior
marginal densities of aτ , at each point in the domain τ ∈ [0, 1]. On the right, we plot a few example posterior samples.
This leads to Gaussian measures whose samples have periodic boundary conditions. Since ek and ek+1 (for k uneven)
should have the same 'magnitude,' we slightly modify (15) and (16): for k uneven, we replace (k + 1)−α by k−α.
All the discussed properties of the family πα are not affected by this change, since the decay of the eigenvalues is
asymptotically the same. We put a prior on a. It's covariance is given by 1
2 Cprior, where Cprior is the covariance of
παdata, with αdata = 4:
a ∼ N (0, Cprior).
The goal of a conditional diffusion model is to generate samples from the posterior
dπαdata(aτ |r1, r2, r3, r4) ∝
4
(cid:89)
i=1
(cid:18)
N
ri; −
(cid:19)
1
2
vi, vi
dπαdata,
(18)
for a fixed observation r = (r1, r2, r3, r4). Via the model defined above, each vi is a functional of στ and thus aτ .
For training, we generate N = 50 000 samples from the prior {an}N
n=1 together with simulated observations {rn}N
The trained diffusion models should, for any input r ∈ R4, generate samples from (18).
n=1.
To assess the performance of the trained models, we drew a random ̃aτ and corresponding observations ̃r =
( ̃r1, ̃r2, ̃r3, ̃r4). We used the HSHMC algorithm to generate 50 000 "reference" posterior samples from (18) for this
fixed observation value ̃r. We plot these posterior samples and their heatmap, as well as the data-generating value ̃a
of the log-volatility, in Figure 5. After training, we input ̃r (which the diffusion models have not seen before) to the
conditional diffusion models and compare the generated samples to those from HSHMC.
As in Section 8.2, we again compare the canonical diffusion model implementation WNDM against an implementation
motivated by the infinite-dimensional theory. In this case, since we are sampling from a Bayesian inverse problem
with a Gaussian prior, we are in the setting of Theorem 3. Therefore, we will implement the IDDM2 algorithm from
Section 7.1. We match the noise structure to the data by setting αnoise = αdata = 4, which is justified by the form of
(18) of μdata. Then we set αloss = 2, such that K supports μdata and παnoise . Note that any αloss < 7
2 would also have
been a valid choice. The choice αloss = 3 worked comparably well in our numerical experiments.
We compare samples generated by the two diffusion models in Figure 6. Again, the WNDM algorithm did not match
the smoothness class of μdata in a stable way. While during training, there were times at which the network generated
smooth samples, it later unlearned to do so. The IDDM2 algorithm outputs samples of the correct class at every point
during training. Both algorithms are able to match the marginal distributions, although IDDM2 does slightly better, as
seen in Figure 7. Therefore, as in Section 8.2, these numerical experiments confirm the theoretical predictions made
in Section 7.
Remark 4 Note that for our choice of αnoise, the reverse SDE now starts with initial condition παdata(aτ ) =
N (0, Cprior) and ends in the posterior παdata(aτ |r). Therefore, it has learned to transport the prior to the posterior.
Furthermore, in this case, we can interpret the reverse SDE as a smoothed version of the forward process, i.e., an
Ornstein–Uhlenbeck process conditioned on its terminal values. This also opens up the way to interpret the training
of the reverse SDE as an infinite-dimensional control problem.
9 Summary
We have formulated the diffusion-based generative modeling approach directly on infinite-dimensional Hilbert spaces.
Our formulation involves specifying infinite-dimensional forward and reverse SDEs and an associated denoising score
18
Infinite-Dimensional Diffusion Models
A PREPRINT
(a) Epoch 10
(b) Epoch 30
(c) Epoch 60
Figure 6: Example of Section 8.3. Conditional samples from WNDM (upper row) and IDDM2 (lower row) after
varyings number of training epochs. Compare to the high-quality posterior samples generated using Hamiltonian
Monte Carlo in Figure 5.
(a) Epoch 10
(b) Epoch 30
(c) Epoch 60
Figure 7: Example of Section 8.3. Heatmaps of the 2048 conditional samples generated by WNDM (upper row)
and IDDM2 (lower row), for increasing numbers of training epochs. Reference heatmaps generated via Hilbert space
Hamiltonian Monte Carlo are in Figure 5 for comparison.
matching objective. We prove that our formulation is well-posed. To that end, we show that the reverse SDE we wish
to approximate has a unique solution; furthermore, we show under which conditions the denoising score matching
objective generalizes to an infinite-dimensional setting. Building on these results, we are able to prove dimension-
independent convergence bounds for diffusion models, which hold in the infinite-dimensional case.
These theoretical developments reveal an intricate relationship between the properties of the target/data-generating
measure μdata and the choices of the Wiener process W U
t and the loss norm in the denoising score matching objective
∥ * ∥K. We utilize this knowledge to develop guidelines on how to make such choices for a given μdata. For image dis-
tributions, these guidelines are in line with the canonical choices made in practice. For other target distributions μdata,
however, the algorithm design should be modified. We apply these modifications to two generative modeling tasks
that are discretizations of infinite-dimensional problems, and the numerical results confirm our theoretical findings.
Acknowledgements
JP and SR have been partially supported by Deutsche Forschungsgemeinschaft (DFG), Project ID 318763901, SFB-
1294. SW and YM acknowledge support from Air Force Office of Scientific Research (AFOSR) MURI Analysis and
Synthesis of Rare Events, award number FA9550-20-1-0397. JP and SR would also like to thank the Isaac Newton
Institute for Mathematical Sciences, Cambridge, for support and hospitality during the programme The Mathematical
and Statistical Foundation of Future Data-Driven Engineering where work on this paper was also undertaken. This
work was supported by EPSRC grant no EP/R014604/1.
19
Infinite-Dimensional Diffusion Models
A PREPRINT
References
G. Batzolis, J. Stanczuk, C.-B. Sch ̈onlieb, and C. Etmann. Conditional image generation with score-based diffusion
models. arXiv preprint arXiv:2111.13606, 2021.
G. Batzolis, J. Stanczuk, and C.-B. Sch ̈onlieb. Your diffusion model secretly knows the dimension of the data manifold.
arXiv preprint arXiv:2212.12611, 2022.
A. Beskos, F. J. Pinski, J. M. Sanz-Serna, and A. M. Stuart. Hybrid Monte Carlo on Hilbert spaces. Stochastic
Processes and their Applications, 121(10):2201–2230, 2011.
V. Bogachev. Differentiable measures and the Malliavin calculus. Journal of Mathematical Sciences, 87(4):3577–
3731, 1997.
V. D. Bortoli. Convergence of denoising diffusion models under the manifold hypothesis. Transactions on Machine
Learning Research, 2022. ISSN 2835-8856. URL https://openreview.net/forum?id=MhK5aXo3gB.
N. Bou-Rabee and A. Eberle. Two-scale coupling for preconditioned hamiltonian monte carlo in infinite dimensions.
Stochastics and Partial Differential Equations: Analysis and Computations, 9:207–242, 2021.
J. Certaine. The solution of ordinary differential equations with large time constants. Mathematical methods for digital
computers, 1:128–132, 1960.
H. Chen, H. Lee, and J. Lu.
Improved analysis of score-based generative modeling: User-friendly bounds under
minimal smoothness assumptions. arXiv preprint arXiv:2211.01916, 2022.
S. Chen, S. Chewi, J. Li, Y. Li, A. Salim, and A. Zhang. Sampling is as easy as learning the score: theory for diffusion
models with minimal data assumptions. In The Eleventh International Conference on Learning Representations,
2023. URL https://openreview.net/forum?id=zyLVMgsZ0U_.
S. L. Cotter, G. O. Roberts, A. M. Stuart, and D. White. MCMC methods for functions: Modifying old algorithms to
make them faster. Statistical Science, 28(3):424–446, 2013. doi: 10.1214/13-STS421.
K. Cranmer, J. Brehmer, and G. Louppe. The frontier of simulation-based inference. Proceedings of the National
Academy of Sciences, 117(48):30055–30062, 2020.
T. Cui, K. J. Law, and Y. M. Marzouk. Dimension-independent likelihood-informed mcmc. Journal of Computational
Physics, 304:109–137, 2016.
G. Da Prato and J. Zabczyk. Stochastic equations in infinite dimensions. Cambridge university press, 2014.
V. De Bortoli. Convergence of denoising diffusion models under the manifold hypothesis.
arXiv preprint
arXiv:2208.05314, 2022.
P. Dhariwal and A. Nichol. Diffusion models beat GANs on image synthesis. Advances in Neural Information
Processing Systems, 34, 2021.
S. Duane, A. D. Kennedy, B. J. Pendleton, and D. Roweth. Hybrid monte carlo. Physics letters B, 195(2):216–222,
1987.
R. Durrett. Probability: Theory and Examples. Probability: Theory & Examples. Duxbury Press, 3 edition, 2005.
ISBN 0534424414; 9780534424411.
H. F ̈ollmer and A. Wakolbinger. Time reversal of infinite-dimensional diffusions. Stochastic processes and their
applications, 22(1):59–77, 1986.
E. Gin ́e and R. Nickl. Mathematical Foundations of Infinite-Dimensional Statistical Models. Cambridge Series in
Statistical and Probabilistic Mathematics. Cambridge University Press, 2015. doi: 10.1017/CBO9781107337862.
F. Guth, S. Coste, V. De Bortoli, and S. Mallat. Wavelet score-based generative modeling.
arXiv preprint
arXiv:2208.05003, 2022.
P. Hagemann, L. Ruthotto, G. Steidl, and N. T. Yang. Multilevel diffusion: Infinite dimensional score-based diffusion
models for image generation. arXiv preprint arXiv:2303.04772, 2023.
M. Hairer. An introduction to stochastic PDEs. arXiv preprint arXiv:0907.4178, 2009.
M. Hairer, A. M. Stuart, and S. J. Vollmer. Spectral gaps for a Metropolis–Hastings algorithm in infinite dimensions.
Annals of Applied Probability, 2014.
U. G. Haussmann and E. Pardoux. Time reversal of diffusions. The Annals of Probability, pages 1188–1205, 1986.
J. Ho, A. Jain, and P. Abbeel. Denoising diffusion probabilistic models. Advances in Neural Information Processing
Systems, 33:6840–6851, 2020.
20
Infinite-Dimensional Diffusion Models
A PREPRINT
Z. Kadkhodaie and E. P. Simoncelli. Stochastic solutions for linear inverse problems using the prior implicit in a
denoiser. In A. Beygelzimer, Y. Dauphin, P. Liang, and J. W. Vaughan, editors, Advances in Neural Information
Processing Systems, 2021. URL https://openreview.net/forum?id=x5hh6N9bUUb.
I. Karatzas, I. Karatzas, S. Shreve, and S. E. Shreve. Brownian motion and stochastic calculus, volume 113. Springer
Science & Business Media, 1991.
K.-T. Kim, U. Villa, M. Parno, Y. Marzouk, O. Ghattas, and N. Petra. hippylib-muq: A bayesian inference soft-
ware framework for integration of data with complex predictive models under uncertainty. ACM Transactions on
Mathematical Software, 2023.
Z. Kong, W. Ping, J. Huang, K. Zhao, and B. Catanzaro. DiffWave: A versatile diffusion model for audio synthesis.
In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021.
OpenReview.net, 2021. URL https://openreview.net/forum?id=a-xFK8Ymz5J.
H. Lee, J. Lu, and Y. Tan. Convergence for score-based generative modeling with polynomial complexity. In A. H.
Oh, A. Agarwal, D. Belgrave, and K. Cho, editors, Advances in Neural Information Processing Systems, 2022. URL
https://openreview.net/forum?id=dUSI4vFyMK.
Z. Li, N. Kovachki, K. Azizzadenesheli, B. Liu, K. Bhattacharya, A. Stuart, and A. Anandkumar. Fourier neural
operator for parametric partial differential equations. arXiv preprint arXiv:2010.08895, 2020.
J. H. Lim, N. B. Kovachki, R. Baptista, C. Beckham, K. Azizzadenesheli, J. Kossaifi, V. Voleti, J. Song, K. Kreis,
J. Kautz, et al. Score-based diffusion models in function space. arXiv preprint arXiv:2302.07400, 2023.
E. Mathieu, V. Dutordoir, M. J. Hutchinson, V. De Bortoli, Y. W. Teh, and R. E. Turner. Geometric neural diffusion
processes. arXiv preprint arXiv:2307.05431, 2023.
A. Q. Nichol and P. Dhariwal. Improved denoising diffusion probabilistic models. In International Conference on
Machine Learning, pages 8162–8171. PMLR, 2021.
A. Phillips, T. Seror, M. Hutchinson, V. De Bortoli, A. Doucet, and E. Mathieu. Spectral diffusion processes. arXiv
preprint arXiv:2209.14125, 2022.
H. Phung, Q. Dao, and A. Tran. Wavelet diffusion models are fast and scalable image generators. arXiv preprint
arXiv:2211.16152, 2022.
J. Pidstrigach. Convergence of preconditioned Hamiltonian Monte Carlo on Hilbert spaces. IMA Journal of Numerical
Analysis, page drac052, 10 2022a. ISSN 0272-4979. doi: 10.1093/imanum/drac052. URL https://doi.org/
10.1093/imanum/drac052.
J. Pidstrigach. Score-based generative models detect manifolds. arXiv preprint arXiv:2206.01018, 2022b.
J. Sohl-Dickstein, E. Weiss, N. Maheswaranathan, and S. Ganguli. Deep unsupervised learning using nonequilibrium
thermodynamics. In International Conference on Machine Learning, pages 2256–2265. PMLR, 2015.
Y. Song and S. Ermon. Improved techniques for training score-based generative models. Advances in neural inform-
ation processing systems, 33:12438–12448, 2020.
Y. Song, J. Sohl-Dickstein, D. P. Kingma, A. Kumar, S. Ermon, and B. Poole. Score-based generative modeling
through stochastic differential equations. In International Conference on Learning Representations, 2021. URL
https://openreview.net/forum?id=PxTIG12RRHS.
A. M. Stuart. Inverse problems: a Bayesian perspective. Acta numerica, 19:451–559, 2010.
Y. Tashiro, J. Song, Y. Song, and S. Ermon. CSDI: Conditional score-based diffusion models for probabilistic time
In A. Beygelzimer, Y. Dauphin, P. Liang, and J. W. Vaughan, editors, Advances in Neural
series imputation.
Information Processing Systems, 2021. URL https://openreview.net/forum?id=VzuIzbRDrum.
A. B. Tsybakov. Introduction to Nonparametric Estimation. Springer series in statistics. Springer, Dordrecht, 2009.
doi: 10.1007/b13794. URL https://cds.cern.ch/record/1315296.
P. Vincent. A connection between score matching and denoising autoencoders. Neural computation, 23(7):1661–1674,
2011.
K. Y. Yang and A. Wibisono. Convergence in KL and R ́enyi divergence of the unadjusted Langevin algorithm using
estimated score. In NeurIPS 2022 Workshop on Score-Based Methods, 2022. URL https://openreview.
net/forum?id=RSNMAMiPFTM.
Q. Zhang and Y. Chen. Fast sampling of diffusion models with exponential integrator. In International Conference on
Learning Representations, 2023. URL https://openreview.net/forum?id=Loek7hfb46P.
21
Infinite-Dimensional Diffusion Models
A PREPRINT
A Numerical details
We list some implementation details:
1. Instead of running the forward SDE with a uniform speed, we instead ran it using a speed function α(t),
dXt = −
1
2
β(t)Xtdt + (cid:112)β(t)CdWt.
The SDE was then run on the interval [0, 1]. This corresponds to a time-change and is common practice for
diffusion models; see for example Song et al. [2021]. We used the time-change function β(t) as in Song et al.
[2021], i.e.,
β(t) = 0.001 + t(20 − 0.001).
2. We discretized the unit interval [0, 1] into M = 1000 evenly spaced points for training and generation.
3. We added a last denoising step, as is common practice. That means, that in the last step of the Euler-
Maruyama integrator, we did not add any extra noise any more, but just evaluated the drift and took a step in
that direction. This is even more important in our case for comparison than normally, since the added noise
has correlation structure N (0, C) which is close to μdata, while the added noise in WNDM has structure
N (0, I). Therefore, adding this noise to all samples right before comparing them would have given an unfair
disadvantage to WNDM.
4. Furthermore, we added εregId onto the covariance matrices for numerical stability, where εreg = 0.0001.
5. Our experiments were implemented in JAX, and we used the U-Net architecture from Song et al. [2021] for
the neural network.
B Negative Sobolev Wasserstein distances
We briefly and heuristically explore what it means if μ and π are close in W2 when the underlying norm is a negative
Sobolev norm. Denote by H α the spaces defined in Section 8.1. Now let f ∈ H α. Assume that X, Y form a
W −α
2
-optimal coupling, i.e., X ∼ μ and Y ∼ π and that
E[∥X − Y ∥−α] ≤ W −α
2
(π, μ).
Now, H −α can be viewed as the dual of H α and therefore we can evaluate X or Y on f . Then,
E[|X(f ) − Y (f )|] ≤ ∥f ∥αE[∥X − Y ∥−α] ≤ ∥f ∥αW −α
2
(μ, π)
Therefore, we can expect the evaluations of X and Y on test-functions from H α to be close. The larger α gets, the
fewer test functions are in H α. Note that for any α ≥ 0 (and in particular for our typical case H 0 = L2), H α will not
contain point evaluations, and therefore we cannot expect point evaluations of X and Y to be close (in case they are
well-defined).
C Exponential integrator
The exponential integrator [Certaine, 1960] is derived by splitting the following SDE
√
√
dYt =
Yt + s(t, Yt)dt +
CdWt =
Yt + s(t, Yt)dt +
CdWt
(19)
1
2
1
2
into the linear and nonlinear part. The exact solution is then given by
Yt+∆t = et/2Yt = et/2Yt + (e∆t/2 − 1)s(t, Yt) +
(cid:112)
e∆t − 1ξ.
The exponential integrator was first applied to diffusion models in Zhang and Chen [2023].
D Proofs for Section 3
D.1 Proofs for Section 3.2
We first prove Lemma 1
22
Infinite-Dimensional Diffusion Models
A PREPRINT
Proof In finite dimensions we can explicitly write pt as
(cid:90)
pt(x) =
pt|0(x|x0)dμdata(x0)
(20)
where pt|0 is the time t-transition kernel of the forward SDE, given by
pt|0(x|x0) =
1
(cid:112)(2πvt)Ddet(C)
(cid:18)
exp
−
1
2(1 − e−t)
(cid:68)(cid:16)
x − e− t
2 x0
(cid:17)
, C −1 (cid:16)
x − e− t
2 x0
(cid:17)(cid:69)2
(cid:19)
H
.
We can exchange the derivative with the integral by Leibniz rule since the derivative of the integrand is bounded.
Therefore, we have that
∇ log pt(x) =
(cid:90)
1
pt(x)
∇x
pt|0(x|x0)dμdata(x0)
= −
= −
1
(1 − e−t)
1
(1 − e−t)
(cid:90)
C −1 (cid:16)
x − e− t
2 x0
(cid:17) pt|0(x|x0)
pt(x)
dμdata(x0)
C −1 (cid:16)
E
(cid:104)
Xt − e− t
2 X0|Xt = x
(cid:105)(cid:17)
.
In the last equation we used the formula for the conditional density; see Durrett [2005, Section 4.1.c].
(cid:50)
We now prove Lemma 2.
Proof We first treat continuity. Since pt can be written as the convolution of μdata with a Gaussian kernel, we know
that it is smooth in space and time on (0, ∞]. Furthermore, it holds that pt > 0 everywhere. Due to that, we can
deduce that ∇ log pt = ∇pt
is continuous in t. Since Xt is also continuous in time, we get that ∇ log pt(Xt) is
pt
time-continuous.
Now we prove the reverse-time martingale property. Since we can write
(cid:90)
pt(xt) =
ps(xs)pt|s(xt|xs)dxs
and by using since the transition kernel pt|s(xt|xs) is given by N (e−(t−s)/2xs,
∇pt(xt) = ∇xt
(cid:90)
(cid:18)
exp
−
1
2(1 − e−(t−s))
1
2(1 − e−(t−s))
−
(cid:18)
(t−s)
e
2 ∇xs exp
(cid:68)
xt − e− (t−s)
2 xs, xt − e− (t−s)
2 xs
ps(xs)dxs
(cid:68)
xt − e− (t−s)
2 xs, xt − e− (t−s)
2 xs
(cid:69)(cid:19)
ps(xs)dxs
(t−s)
2
e
(cid:18)
exp
−
1
2(1 − e−(t−s))
(cid:68)
xt − e− (t−s)
2 xs, xt − e− (t−s)
2 xs
(cid:69)(cid:19)
∇xsps(xs)dxs
1
1−e−(t−s) C),
(cid:69)(cid:19)
(cid:90)
(cid:90)
(cid:90)
=
=
=
(t−s)
e
2 pt|s(xt|xs)ps(xs)∇xs log ps(xs)dxs
(cid:90)
ps,t(xs, xt)∇xs log ps(xs)dxs.
= e
(t−s)
2
Since ∇ log pt(xt) = ∇pt(xt)
, we get that
∇ log pt(xt) = e
∇xs log ps(xs)dxs = e
pt(xt) and ps|t(xs|xt) = ps,t(xs,xt)
(cid:90) ps,t(xs, xt)
pt(xt)
(t−s)
2
pt(xt)
= e
(t−s)
2 E[∇ log ps(Xs)|Xt = xt].
(cid:90)
(t−s)
2
ps|t(xs|xt)∇xs log ps(xs)dx
(cid:50)
The above calculations have already been done in Chen et al. [2022] to bound the difference E[∥∇ log pt(xt) −
∇ log ps(xs)∥2].
23
Infinite-Dimensional Diffusion Models
A PREPRINT
D.2 Proofs for Section 3.4
We start by proving Lemma 3.
Proof Let ei be a basis of K and K D = span⟨e1, . . . , eD⟩. We denote by P D the projection onto K D and by
X D
t = P DXt the projection of Xt onto K D. We will denote by
∥ * ∥ = ∥ * ∥K
throughout this proof. Let
sD = P DE[s(t, Xt)|X D
t ] = E[σ−1
t
(X D
t − e−t/2X D
t )|X D
t ],
where σ−1
t =
1√
1−e−t . We have that
E[∥sD∥2] ⩽ E[∥σ−1
t
(X D
t − e−t/2X D
0 )∥2] = σ−2
t
E[∥N (0, P DCP D)∥2] < ∞
since the right hand side is the expectation of the norm of a finite dimensional Gaussian, which is finite. Let
̃sD(t, Xt) = P DE[ ̃s(t, Xt)|X D
t ].
Now,
E[∥sD − ̃sD∥2
K] = E[∥P D(E[ ̃s(t, Xt)|X D
t ] − E[s(t, Xt)|X D
t ])∥2]
and
Therefore, we get that
⩽ E[∥E[ ̃s(t, Xt) − s(t, Xt)|X D
t ]∥2] ⩽ E[∥s(t, Xt) − ̃s(t, Xt)∥2] < ∞,
E[∥ ̃sD∥2] ⩽ 2(E[∥sD − ̃sD∥2] + E[∥sD∥2]) < ∞.
E[∥sD − ̃sD∥2] = E[∥sD∥2 + ∥ ̃sD∥ − ⟨sD, ̃sD⟩] = E[∥sD∥2] + E[∥ ̃sD∥] − 2E[⟨sD, ̃sD⟩],
where we used that all the terms are finite in the last equality, so that we are no adding and subtracting infinities. Now,
for
and therefore, since E[∥X D
(X D
E[⟨sD, ̃sD⟩] = E[⟨E[σ−1
t
t − e−t/2X D
E[∥sD − ̃sD∥2] = E[∥ ̃sD − σ−1
0 )|X D
t − e−t/2X D
0 ∥2] is finite we can do a zero-addition of E[∥X D
t ], ̃sD⟩] = E[⟨σ−1
(X D
t − e−t/2X D
t
0 ∥2] and get that
0 ), ̃sD⟩],
t − e−t/2X D
(X D
0 )∥2].
By Lemma 5 we see that the left hand side converges to E[∥s − ̃s∥2]. Therefore we get that E[∥ ̃sD − σ−1
e−t/2X D
0 )∥2] + E[∥sD∥2] − E[∥σ−1
t − e−t/2X D
t − e−t/2X D
(X D
t
t
t
0 )∥2] converges to something finite, if and only if
E[∥sD∥2] − E[∥σ−1
(X D
t − e−t/2X D
0 )∥2]
t
does. For this term we get that since
E[⟨sD, σ−1
t
we can deduce
(X D
t − e−t/2X D
0 )⟩] = E[⟨E[σ−1
= E[∥E[σ−1
= E[∥sD∥2],
t
t
(X D
(X D
t − e−t/2X D
t − e−t/2X D
0 )|X D
0 )|X D
t ], σ−1
t
t ]∥2]
(X D
t − e−t/2X D
0 )⟩]
t − e−t/2X D
(X D
t
t − e−t/2X D
where the last convergence is implied by Proposition 5. The last result now follows by rewriting
E[∥sD∥2] − E[∥σ−1
= −E[∥sD∥2] + 2E[⟨sD, σ−1
= −E[∥sD − σ−1
0 )∥2]
0 )⟩] − E[∥σ−1
t − e−t/2X D
t
0 )∥2] →L2 −E[∥s − σ−1
t − e−t/2X D
(X D
(Xt − e−t/2X0)∥2]
(X D
(X D
t
t
t
0 )∥2]
Vt = E[∥E[σ−1
t
(Xt − e−t/2X0)|Xt] − σ−1
t
(Xt − e−t/2X0)∥2]
and using that Xt can be pulled out of the conditional expectation.
24
(X D
t −
(cid:50)
Infinite-Dimensional Diffusion Models
A PREPRINT
Now we prove Lemma 4:
Proof Item 1: We know from Lemma 3 that DSM is finite if and only if V is finite. Therefore, we will prove that V
is finite:
Now,
Vt =
e−t
1 − e−t
E[∥X0 − E[X0|Xt]∥2
U ]
E[∥X0 − E[X0]∥2
U ]
= E[∥X0 − E[X0|Xt] + E[X0|Xt] − E[X0]∥2
U ]
= E[∥X0 − E[X0|Xt]∥2
= E[∥X0 − E[X0|Xt]∥2
U ] + E[∥E[X0|Xt] − E[X0]∥2
U ] + E[∥E[X0|Xt] − E[X0]∥2
U ] + E[⟨X0 − E[X0|Xt], E[X0|Xt] − E[X0]⟩U ]
U ],
where the last term drops by taking the conditional expectation with respect to Xt. Therefore,
E[∥X0 − E[X0|Xt]∥2
U ] ⩽ E[∥X0 − E[X0]∥2
U ] < ∞
and so Vt is finite.
Item 2: In this case we use that we can also write Vt as
Vt =
1
1 − e−t
E[∥Xt − e−t/2X0 − E[Xt − e−t/2X0|Xt]∥2
H ]
Similarly as above,
E[∥Xt − e−t/2X0 − E[Xt − e−t/2X0|Xt]∥2
H ] ⩽ E[∥Xt − e−t/2X0∥2
H ]
where we used that E[Xt − e−t/2X0] = 0. Now, since Xt − e−t/2X0 ∼ N (0, (1 − e−t)C), which is supported on
(cid:50)
H, the above expectation is finite.
We used the following lemma in the proofs of the two above lemmas:
Lemma 5 Let (K, ⟨*, *⟩) be a separable Hilbert space, and Z, ̃Z random variables taking values in K. Let ei be an
orthonormal basis of K. Denote by K D = span⟨e1, . . . , eD⟩ and by P D the projection onto K D. Furthermore, let
Z D be given by Z D = P DE[Z|P D ̃Z]. Then, if E[∥E[Z| ̃Z]∥2
K] < ∞, Z D → E[Z| ̃Z] in L2 and almost surely.
Proof We denote by
We have that
Z D = E[Z|P D ̃Z].
E[∥Z D − E[Z| ̃Z]∥2
K] = E[∥P D(E[Z| ̃Z D] − E[Z| ̃Z])∥2
⩽ E[∥E[Z| ̃Z D] − E[Z| ̃Z]∥2
K] + E[∥(I − P D)E[Z| ̃Z]∥2
K]
K] + E[∥(I − P D)E[Z| ̃Z]∥2
K]
(21)
The cross term in the first equality is 0 since P D is the orthogonal projection. The first term in the (21) converges to
0, since E[Z| ̃Z D] = E[E[Z| ̃Z]| ̃Z D] is a family of conditional expectations of the L2-random variable E[Z| ̃Z]. The
result follows by the L2-martingale convergence theorem. The second term converges to 0 since
E[∥E[Z| ̃Z]∥2
K] =
∞
(cid:88)
E[⟨ei, E[Z| ̃Z]⟩2
K] < ∞.
But E[∥(I − P D)E[Z| ̃Z]∥2
K] is equal to (cid:80)∞
d=D
d=1
E[⟨ei, E[Z| ̃Z]⟩2
K], which converges to 0 since the full sum is finite.
Furthermore, we can write
∥Z D − E[Z| ̃Z]∥K ⩽ ∥P D(E[Z| ̃Z D] − E[Z| ̃Z])∥2
K + ∥(I − P D)E[Z| ̃Z]∥2
K
⩽ ∥E[Z| ̃Z D] − E[Z| ̃Z]∥2
K + ∥(I − P D)E[Z| ̃Z]∥2
K
The second term on the right-hand vanishes as D → ∞ since E[Z| ̃Z] ∈ K. The first term almost surely converges to
(cid:50)
0 due to the almost sure martingale convergence theorem.
25
Infinite-Dimensional Diffusion Models
A PREPRINT
E Existence proof
E.1 Spectral approximation of C
Let ν = N (0, C) be a Gaussian measure with values in (H, ⟨*, *⟩H ). C has an orthonormal basis ei of eigenvectors
and corresponding non-negative eigenvalues ci ⩾ 0, i.e.,
We define the linear span of the first D eigenvectors as
Cei = ciei.
H D =
(cid:40) D
(cid:88)
i=1
fiei|f1, . . . , fD ∈ R
⊂ H
(cid:41)
Let P D : H → H D be the orthogonal projection onto H D. If we write an element f of H as
∞
(cid:88)
⟨f, φi⟩H φi,
f =
i=1
P D is equivalent to restricting f to its first D coefficients:
P D : H → H D,
f (cid:55)→
D
(cid:88)
⟨f, φi⟩H φi.
i=1
The push-forwards (P D)∗ν of ν under P D are denoted by
νD := (P D)∗ν, where
(P D)∗ν(A) = ν((P D)−1(A)).
It is a Gaussian measure with covariance operator P DCP D.
By sending v ∈ RD to ˆv = v1e1 + * * * + vDeD we can identify H D with RD. Under these identifications, νD would
have distribution N (0, C D) on RD, where CD is a diagonal matrix with entries c1, . . . , cD.
E.2 Spectral approximation of the SDEs
We define the finite-dimensional approximations of μdata by μD
(5) by
data = (P D)∗μdata. We discretize the forward SDE
dX D
t = −
√
1
2
X D
t dt +
P DCP DdWt, X D
0 ∼ μD
data
(22)
Since μdata is supported on H D, P DCP D projects the noise down to H D, and the operation Xt → − 1
invariant, X D
densities pD
t will stay in H D for all times. Therefore we can view X D
t of X D
t
2 Xt keeps H D
t as process on RD and define the Lebesgue
there.
The corresponding reverse SDEs is given as
dY D
t
= −
1
2
t dt + C D∇ log pD
Y D
t (Yt)dt +
√
P DCP DdWt.
(23)
E.3 Proof of Theorem 1
We can now prove Theorem 1:
Proof The forward SDE is just a standard Ornstein–Uhlenbeck process and existence and uniqueness of that is
standard; see, for example, Da Prato and Zabczyk [2014, Theorem 7.4]. We will now show that the time reversal
is a solution to (6).
The solution to the forward SDE is given as the stochastic convolution,
Yt := XT −t
Xt = e−tX0 +
√
e−(t−s)
CdWs.
(cid:90) t
0
26
Infinite-Dimensional Diffusion Models
A PREPRINT
The processes X D
t
now show that they converge to Xt almost surely in the supremum norm. We define
:= P D(Xt) (see Section E.1) are solutions to (22), since the SDE coefficients are decoupled. We
Then
X D:∞
t
= Xt − X D
t .
X D:∞
t
= e−tX D:∞
0
+
√
e−(t−s)
CdW D:∞
s
,
(cid:90) t
0
where W D:∞
s
is the projection of Ws onto span{eD, eD+1 . . .}. It holds that
E[sup
t⩽T
∥X D:∞
t
H ] ⩽ 4e−2tE[∥X D:∞
∥2
0
H ] + 4(1 − e−t)
∥2
∞
(cid:88)
i=D
ci → 0
0
H = (cid:80)∞
H = (cid:80)∞
∥2
for D → ∞, where we used Doob's L2 inequality to bound the stochastic integral. The first term will converge to 0
almost surely, since X0 is H-valued and therefore the sum ∥X0∥2
i=1⟨X0, φi⟩2 is almost surely finite, where
the φi are defined in Section E.1. Therefore, ∥X D:∞
i=D⟨X0, φi⟩2 will almost surely converge to zero. An
analogous argumentation holds for the second term since (cid:80)∞
Denote by E the Banach space of continuous, H-valued paths with the supremum norm, E = C([0, T ], H). Then we
can view X* as an E-valued random variable; see Da Prato and Zabczyk [2014, Theorem 4.12]. Then we have just
proven that X N converges to X in L2(Ω, E).
t by Y N
We denote the time-reversals of X N
t
Yt = XT −t in the same way as X N
using an approximation argument.
We define pD
T −t.
We know that they satisfy (23) by Proposition 1. Furthermore, by Lemma 1, we know that we can replace the C∇ log pt
term by a conditional expectation sD,
T −t. These converge to their infinite-dimensional counterpart
t converge to Xt. The main difficulty is to show Yt solves the SDE (6). We do this
t as in Section E.2. Furthermore, we define the finite-dimensional time reversals of X D
i=1 ci is finite because C is trace-class on H.
t = X D
t as Y D
:= X N
sD(t, xD) =
1
1 − e−t
E[X D
t − e− t
2 X D
0 |X D
t = xD].
However, since the forward SDE decouples, we can also write the above conditional expectation in terms of the
infinite-dimensional process Xt:
sD(t, xD) =
1
1 − e−t P DE
(cid:104)
Xt − e− t
2 X0|P DXt = xD(cid:105)
,
where we use that the projections P DXt are solutions to (22). In particular, due to the tower property of conditional
expectations,
t = sD(t, X D
sD
By Lemma 5, which makes use of the fact that E[s(t, Xt)|P DXt] is a martingale in D, the sD
L2. Furthermore, by Lemma 2, we know that the e−t/2sD
t
L2-inequality, we get that for any ε > 0,
t ) = P DE[s(t, Xt)|X D
t ].
t converge to s(t, Xt) in
form a reverse-time martingale. However, due to Doob's
E[ sup
ε⩽t⩽T
∥sD
t − sL
t ∥2] ⩽ eT E[∥sD
ε − sL
ε ∥2].
The right hand side is Cauchy and therefore is the left-hand side is too. Therefore, the convergence of sD
t
is uniform on [ε, T ], i.e., continuous martingales sD
t
form a Cauchy sequence in the norm
to st in L2
∥N ∥I,ε = E[sup
t≥ε
|Nt|2].
The continuous martingales are closed with respect to that norm (see Karatzas et al. [1991, Section 1.3]), and st is also
a continuous martingale on [ε, T ]. Since ε was arbitrary, we have shown that s(t, Xt) is a continuous local martingale
(in reverse time) up to t = 0.
By Proposition 1, for t < T , Y D
T −t solves the equation
t = X D
t − Y D
Y D
0 −
1
2
(cid:90) t
0
Y D
r dr −
(cid:90) t
0
T −rdr = BD
sD
t ,
27
Infinite-Dimensional Diffusion Models
A PREPRINT
for a D-dimensional Brownian motion BD
t .
Furthermore, since all the terms on the left-hand side converge in L2, uniformly in t, so does the right-hand side. The
right-hand side is P DCP D Brownian motion for each D. Using again the that the spaces of martingales is closed and
furthermore the Levy characterization of Brownian motion, we find that the BD
t have to converge to a C-Brownian
motion Bt. Therefore,
and Y is indeed a weak solution to (6).
(cid:50)
Yt = Y0 +
1
2
(cid:90) t
0
Yrdr +
(cid:90) t
0
sT −rdr + Bt
Proposition 1 Assume H = RD. Then, the time-reversal Yt = XT −t of the SDE (4) satisfies the SDE
dYt =
1
2
Ytdt + C∇ log pt(Yt)dt +
√
CdWt.
Proof The above is nothing more than the usual time-reversal formula. All we need to show is that for the special case
of the forward SDE (4) the conditions from Haussmann and Pardoux [1986] are always satisfied. Assumption (A)(i)
in Haussmann and Pardoux [1986] is satisfied since b and σ are linear. Assumption (A)(ii) is that for each t0 > 0, it
holds that
1. (cid:82) T
t0
2. (cid:82) T
t0
(cid:82)
BR
(cid:82)
BR
|p(t, x)|2dx < ∞, and
|∂xip(t, x)|2dx < ∞ for all im
where BR is the ball of Radius R on RD and p(t, x) is the Lebesgue-density of Pt. We now prove that both of these
conditions hold. We have the explicit formula
p(t, x) =
1
(cid:112)2π(vt det C)D
√
1
2π(vt det C)D
(cid:90)
∥x−x0∥2
U
2
e−
dμdata(x0)
. Since 1
vt
= 1
1−e−t is integrable on [t0, T ] for t0 > 0, this
and therefore, in particular |p(t, x)| ⩽
implies 1. Furthermore, we get that
∇p(t, x) =
1
(cid:112)2π(vt det C)D
(cid:90)
C −1xe−
∥x−x0∥2
U
2
dμdata(x0),
where we used the Leibniz rule to exchange differentiation and integration, since the integrand is bounded in x0. On
(cid:50)
BR this can be upper bounded by ∥∇p(t, x)∥ ⩽
which is again integrable on [t0,T ].
√
∥C−1∥R
2π(vt det C)D
F Uniqueness proofs
F.1 Proof of Theorem 2
First we prove Theorem 2:
Proof
Step 1: Prove that s is locally Lipschitz with respect to the Cameron-Martin Norm Recall that
e− t
1 − e−t
1−e−t x term is Lipschitz for any t ∈ [ε, T ]. Therefore, our goal is to show that E[X0|Xt = x] is Lipschitz in x
The − 1
too. We will frequently use that for u ∈ U , we can write the Radon-Nikodym derivative of N (u, vtC) with respect to
N (0, vtC) as
1 − e−t x +
E[X0|Xt = x].
s(t, x) = −
(24)
1
2
dN (u, vtC)
dN (0, vtC)
(xt) = exp
(cid:18) ⟨u, xt⟩U − ∥u∥2
vt
U
(cid:19)
,
28
Infinite-Dimensional Diffusion Models
A PREPRINT
by the Cameron-Martin theorem (see, for example, Hairer [2009]). Here vt is a shorthand notation for
To simplify notation, we will define
vt = 1 − e−t.
n(x0, xt) :=
dN (e−tx0, vtC)
dN (0, vtC)
(xt).
Then, the joint distribution of X0 and Xt is given by
dn(x0, xt) = d(N (0, vtC)(xt) ⊗ μdata(x0)).
This can be seen by the following calculation:
(cid:90)
(cid:90)
A
(cid:90)
B
(cid:90)
A
(cid:90)
B
(cid:90)
A
B
=
=
n(x0, xt) dN (0, vtC)(xt)dμdata(x0)
dN (e−tx0, vtC)
dN (0, vtC)
(xt)dN (0, vtC)(xt)dμdata(x0)
dN (e−tx0, vtC)(xt)dμdata(x0)
=P[X0 ∈ A, Xt ∈ B],
where we used that N (e−tx0, vtC) is the transition kernel of the forward SDE (5). We show that
f (xt) =
(cid:82) x0n(x0, xt)dμdata(x0)
(cid:82) n(x0, xt)dμdata(x0)
is a version of the conditional expectation E[X0|Xt = x]. The function f is σ(Xt) measurable by Fubini's theorem.
Furthermore, for A ∈ σ(Xt),
EXt[1Af (Xt)] =
=
=
=
(cid:90)
(cid:82)
A
(cid:90)
(cid:90)
H
(cid:90)
(cid:90)
A
(cid:90)
(cid:90)
dPt(xt)
H x0n(x0, xt)dμdata(x0)
(cid:82)
H n(x0, xt)dμdata(x0)
(cid:82)
H x0n(x0, xt)dμdata(x0)
(cid:82)
H n(x0, xt)dμdata(x0)
(cid:82)
H n( ̃x0, xt)dμdata( ̃x0)
(cid:82)
H n(x0, xt)dμdata(x0)
x0n(x0, xt)dμdata(x0)
A
H
n( ̃x0, xt) dN (0, vtC)(xt) dμdata( ̃x0)
dN (0, vtC)(xt)
x0n(x0, xt)dμdata(x0) dN (0, vtC)(xt) = E[1AX0].
Since these two properties define the conditional expectation, we have shown that
A
H
E[X0|Xt = x] = f (x)
almost surely. We will now proceed to show that f is Lipschitz with respect to the Cameron-Martin norm ∥ * ∥U . For
notational convenience, we will define
(cid:90)
πt(xt) =
n(x0, xt)dμdata(x0) =
(cid:90)
exp
(cid:18) 2⟨e−t/2x0, xt⟩U − e−t∥x0∥2
2vt
U
(cid:19)
dμdata(x0).
(25)
We see that
πt(xt + z) =
=
(cid:90)
(cid:90)
exp
exp
(cid:18) 2⟨e−t/2x0, xt + z⟩U − e−t∥x0∥2
2vt
(cid:19)
U
(cid:19)
dμdata(x0)
(26)
n(x0, xt) dμdata(x0),
which differs from (25) only by exp
Cameron-Martin ball of size R. Therefore,
. By our assumption that the support of μdata is contained in a
(cid:18) ⟨e−t/2x0, z⟩U
vt
(cid:17)
(cid:16) ⟨e−t/2x0,z⟩U
vt
⟨z, e−t/2x0⟩U
vt
≤
e−t/2
vt
∥z∥U R,
29
(27)
Infinite-Dimensional Diffusion Models
A PREPRINT
and
(cid:18)
exp
−R∥z∥U
(cid:19)
≤
e−t/2
vt
πt(xt + z)
πt(xt)
(cid:18)
≤ exp
R∥z∥U
(cid:19)
.
e−t/2
vt
(28)
With these estimates out of the way, let us show local Lipschitz continuity:
∥f (xt + z) − f (xt)∥U =
=:
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:82) x0 n(x0, xt + z)dμdata(x0)
πt(xt + z)
−
A′
πt(xt + z)
−
A
πt(xt)
(cid:13)
(cid:13)
(cid:13)
(cid:13)U
.
(cid:82) x0 n(x0, xt)dμdata(x0)
πt(xt)
(cid:13)
(cid:13)
(cid:13)
(cid:13)U
We rewrite the above as
A′
πt(xt + z)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
We see that
−
A
πt(xt)
(cid:13)
(cid:13)
(cid:13)
(cid:13)U
≤
(cid:12)
(cid:12)
(cid:12)
(cid:12)
1 −
πt(xt + z)
πt(xt)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
A′
πt(xt + z)
(cid:13)
(cid:13)
(cid:13)
(cid:13)U
+
1
πt(xt)
∥A′ − A∥U .
(cid:12)
(cid:12)
1 −
(cid:12)
(cid:12)
πt(xt)
πt(xt)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
A′
πt(xt + z)
(cid:13)
(cid:13)
(cid:13)
(cid:13)U
(cid:18)
≤
exp
(cid:18) e−t/2
vt
(cid:19)
(cid:19)
∥z∥U R
− 1
∥E[X0|Xt = xt + z]∥U ,
where we used (28) for the first term. We also get that
∥A − A′∥U
πt(xt)
(cid:18)
≤
exp
(cid:18)
≤
exp
(cid:18) e−t/2
vt
(cid:18) e−t/2
vt
∥z∥U R
(cid:19)
(cid:19)
(cid:19) 1
− 1
pt(xt)
(cid:90)
∥x0∥U
dN (e−t/2x0, vtC)
dN (0, vtC)
(xt)dμdata(x0)
(cid:19)
∥z∥U R
− 1
R
where we used (27) and (26) and our assumption that ∥x0∥U ≤ R. Putting it all together, we get that
∥f (xt + z) − f (xt)∥ ≤ 2
exp
(cid:18)
(cid:18) e−t/2
vt
(cid:19)
(cid:19)
∥z∥U R
− 1
R,
where we again used that ∥x0∥ ≤ R to bound f (xt + z). However, we can strengthen this bound. For any N , it holds
that
∥f (xt + z) − f (xt)∥U ≤
N
(cid:88)
i=1
∥f (xt + z
) − f (xt + z
i − 1
N
)∥U
(cid:18)
≤ N 2
exp
(cid:19)
(cid:19)
R
− 1
R.
∥z∥U
N
i
N
(cid:18) e−t/2
vt
In particular, we can take the limit N → ∞ and get that
∥f (xt + z) − f (xt)∥U ≤
(cid:18)
|h=02
exp
d
dh
(cid:18) e−t/2
vt
(cid:19)
(cid:19)
h∥z∥U R
− 1
R = 2R2 e−t/2
vt
∥z∥U .
From this we can conclude that f has the global Lipschitz constant 2R2 e−t/2
vt
of s(t, *), such that for any xt, yt ∈ H
. From (24) we see that there is a version
∥s(t, xt) − s(t, yt)∥U ≤ Lt∥xt − yt∥U , Lt =
1
(1 − e−t)2 max{1, 2R2e−t}.
Step 2: Existence of solutions Fix a C-Wiener process Wt. Denote by M : C([0, T − u], H) → C([0, T − u]) the
map
(cid:90) t
(M y)(t) =
s(T − r, yr)dr + Wt.
Then we have if u < T − ε,
0
∥M y(t) − M ̃y(t)∥U ⩽
sup
t⩽u
(cid:90) u
0
∥s(T − r, yr) − s(T − r, ̃yr)∥U dr ⩽ uLT −ε sup
t⩽u
∥yt − ̃yt∥U .
(29)
30
Infinite-Dimensional Diffusion Models
A PREPRINT
Here we used that we can apply Jensen's inequality because ∥ * ∥U : H → [0, ∞] is lower-semicontinuous on H;
1
. Starting with any y0, we can now define the sequence
see Proposition 2. We now choose u smaller than
LT −ε
u
yn+1 = M yn. Applying (29) and noting that
< 1, we see that yn is Cauchy with respect to sup ∥ * ∥U and
LT −ε
therefore also with respect to sup ∥ * ∥H and has a limit. We then have a strong solution w.r.t. to the fixed Wiener
process Wt on [0, u]. We can extend the solution to [0, T − ε] by repeating this process and gluing the solutions
together. However, we cannot apply Banach's fix point theorem to get uniqueness, since ∥y − ̃y∥U might be infinite
for two solutions y and ̃y.
Step 3: Strong uniqueness of solutions We now assume we have two solutions to the reverse SDE, Yt and ̃Yt
solving the reverse SDE (6) with respect to the same Wiener process Bt and Y0 = ̃Y0. Since Yt and ̃Yt are not
necessarily in U , we have to be a bit careful before directly applying Gr ̈onwall. Again, in Proposition 2 we have
proven that ∥ * ∥U : H → [0, ∞] is lower-semicontinuous on H. Therefore, we can apply Jensen's inequality to get
that
∥Yt − ̃Yt − (Yτ − ̃Yτ )∥U =∥
(cid:90) t
s(T − r, Yr) − s(T − r, ̃Yr)dr∥U
τ
(cid:90) t
τ
⩽
∥s(T − r, Yr) − s(T − r, ̃Yr)∥U dr ⩽ 2(t − τ )R.
This proves that t (cid:55)→ ∥Yt − ̃Yt∥U is continuous (which is a requirement for Gr ̈onwall). Furthermore, by using the
above calculation for τ = 0, we find that ∥Yt − ̃Yt∥U will be finite for all t, if ∥Y0 − ̃Y0∥U is finite (even though if Yt
and ̃Yt are almost surely not in U ). Now, since Y0 = ̃Y0 and therefore ∥Y0 − ̃Y0∥U = 0,
∥Yt − ̃Yt∥U ⩽
(cid:90) t
0
∥s(T − r, Yr) − s(T − r, ̃Yr)∥U dr ⩽
(cid:90) t
0
T −r∥Yt − ̃Yt∥U dr.
L2
If t < T , the Lipschitz constant LT −t is finite. Therefore, we can apply Gr ̈onwall to see that ∥Yt − ̃Yt∥U = 0 to prove
uniqueness on [0, t] for any t < T . Hence, we have shown that there is a unique strong solution on [0, T − ε]. Since ε
(cid:50)
was arbitrary, we have shown strong uniqueness on [0, T ).
F.2 Proof of Theorem 3
Now we prove Theorem 3:
Proof
Step 0: A priori bounds Let H be any Hilbert space on which N (0, Cμ) is supported. Let ei be an eigenbasis von
Cμ and C, which exists by our assumptions. Let ci and μi be the eigenvalues associated with C and Cμ respectively,
i.e.,
Cei = ciei, Cμei = μiei.
Furthermore, we define Ct by
Ct = (e−tCμ + (1 − e−t)C),
(30)
which would be the covariance of Xt at time t in case Φ = 0. The following operators are all bounded: CμC −1
,
CC −1
and CCtC −1
μ . We will show it for the first operator, and the others follow by similar arguments. The first
t
operator will have eigenvalues
t
λi =
μi
e−tci + (1 − e−t)μi
.
We know that μi → 0 since Cμ is trace class. For ci → 0, the eigenvalues converge to λi → 1
(1−e−t) , while as
ci → ∞, we get that λi → 0. Furthermore, the derivative with respect to ci is negative, which shows that the λi are
bounded by
1−e−t . A similar calculation can be done for the other operators listed.
1
Step 1: Rewrite the reverse SDE The goal of this section is to show that we can write the drift in infinite dimensions
as
s(t, xt) = −e
t
2 E[C(CμC −1
t
)−1∇Φ(X0)|Xt = xt] + CC −1
t xt
31
Infinite-Dimensional Diffusion Models
A PREPRINT
without assuming any more conditions on Φ or ∇Φ. To that end, we will argue in finite dimensions and take the limit
in the end. Henceforth, unless we say otherwise, everything will be in finite dimensions for this step. The projection
of μdata to H D will be defined by
data = exp(−ΦD)N (0, C D
μD
μ ),
where C D
μ is defined as in Section E.1 and
exp(−ΦD(xD)) = EN (0,C)[exp(−Φ(X))|X D = xD]
(cid:90)
=
exp(−Φ(xD, xD+1:∞)) dN (0, C D+1:∞)(xD+1:∞)
For the gradient it will then hold that
∇ΦD(xD) = ∇ log exp(ΦD(xD))
(cid:82) ∇xD exp(−Φ(xD, xD+1:∞)) dN (0, C D+1:∞)(xD+1:∞)
(cid:82) exp(−Φ(xD, xD+1:∞)) dN (0, C D+1:∞)(xD+1:∞)
− (cid:82) ∇xD Φ(xD, xD+1:∞) exp(−Φ(xD, xD+1:∞)) dN (0, C D+1:∞)(xD+1:∞)
(cid:82) exp(−Φ(xD, xD+1:∞)) dN (0, C D+1:∞)(xD+1:∞)
=
=
= Eμdata[∇Φ(x)|X D = xD].
We denote by ( ̃Xt : 0 ≤ t ≤ T ) the Gaussian solution, started in ̃X0 ∼ N (0, C) and as always by (Xt : 0 ≤ t ≤ T )
the solution to the forward process started in X0 ∼ μdata. To be precise,
(cid:18) ̃X0
̃Xt
(cid:19)
(cid:18)
∼ N
0,
(cid:18) Cμ
e− t
2 Cμ
e− t
2 Cμ
Ct
(cid:19)(cid:19)
,
where Ct is defined in (30). Therefore,
̃X0| ̃Xt ∼ N
(cid:16)
Then we have that
e− t
2 CμC −1
t
̃Xt, Cμ − e−tCμC −1
t Cμ
(cid:17)
.
dpt
dN (0, Ct)
(x) = E[exp(−Φ( ̃X0))| ̃Xt = x] = E
N
(cid:16)
We denote by
e− t
2 CμC−1
t x,Cμ−e−tCμC−1
t Cμ
(cid:17)[exp(−Φ( ̃X0))].
(31)
At = e− t
2 CμC −1
t
, Qt = Cμ − e−tCμC −1
t Cμ.
Note that for C = Cμ all of the definitions simplify to easier terms. Taking ∇ log of the above leads to
∇xt
dpt
dN (0, Ct)
(xt) =
=
=
1
Z
1
Z
1
Z
= −
(cid:90)
(cid:90)
(cid:90)
∇xt exp(−∥Atx0 − xt∥2
Qt
) exp(−Φ(x0))dx0
−A−1
t ∇x0 exp(−∥Atx0 − xt∥2
Qt
) exp(−Φ(x0))dx0
A−1
t
exp(−∥Atx0 − xt∥2
Qt
)∇x0 exp(−Φ(x0))dx0
(cid:90)
1
Z
A−1
t
exp(−∥Atx0 − xt∥2
Qt
)∇x0 Φ(x0) exp(−Φ(x0))dx0,
where B is the normalizing constant. Therefore,
C∇xt log
dpt
dN (0, Ct)
(xt) =
=
− (cid:82) CA−1
t
exp(−∥Atx0 − xt∥2
Qt
(cid:82) exp(−∥Atx0 − xt∥2
Qt
)∇x0Φ(x0) exp(−Φ(x0))dx0
) exp(−Φ(x0))dx0
(cid:82) CA−1
t ∇Φ(x) exp(−Φ(x))dN (Atxt, Qt)
(cid:82) exp(Φ(x))dN (Atxt, Qt)
t ∇Φ(X0)|Xt = xt].
= E[−CA−1
32
Infinite-Dimensional Diffusion Models
A PREPRINT
We make the dimension dependence explicit and get that
C∇xD
t
log
dpD
t
dN (0, C D
t )
Furthermore,
(xD
t ) = E[−C D(A−1
t )D∇ΦD(X D
0 )|X D
t = xD
t ]
= E[−C D(A−1
= E[−C D(A−1
= P DE[−CA−1
t )DE[P D∇Φ(X0)|X D
t = xD
0 ]|X D
t ]
t = xD
t )DP D∇Φ(X0)|X D
t ]
t = xD
t ∇Φ(X0)|X D
t ].
sD(t, X D
t ) = C∇ log pD
t (xD
t ) =C∇ log
pD
t (xD
t )
N (0, Ct)
+ C∇ log N (0, Ct)(xD
t )
=P DE[−CA−1
t ∇Φ(X0)|X D
t = xD
t ] + C D(C −1
t
)DxD
t .
(32)
By Lemma 5 sD converges almost surely to s. Furthermore, since CA−1
get that
t
is bounded and ∇Φ(X0) is Lipschitz, we
E[∥E[CA−1
t ∇ log Φ(X0)|Xt]∥2] ≲ E[∥∇ log Φ(X0)∥2] ≲ E[∥X0∥2] < ∞.
Therefore, also the first term in (32) converges to its infinite dimensional counterpart by Lemma 5. The second term
in (32) also converges. Therefore, we can take the limit on both sides and obtain
s(t, xt) = E[−CA−1
t ∇Φ(X0)|Xt = xt] + CC −1
t xt.
The formula (31) for pt holds in infinite dimensions too, and therefore we can write the conditional expectation as
f (t, xt) = E[−CA−1
t ∇Φ( ̃X0)| ̃Xt = xt] =
(cid:82) CA−1
t ∇Φ(x) exp(−Φ(x))dN (Atxt, Qt)
(cid:82) exp(−Φ(x))dN (Atxt, Qt)
.
Step 2: Local Lipschitzness in with respect to ∥ * ∥ Since CC −1
locally Lipschitz. We will now bound the difference
t
is bounded by step 0, it suffices to show that f is
f (t, yt) − f (t, xt)
(cid:82) CA−1
=
=:
t ∇Φ(x) exp(−Φ(x))dN (Atxt, Qt)
(cid:82) exp(−Φ(x))dN (Atxt, Qt)
1
1
B2
Z1
Z2
Z2
(cid:18) 1
Z1
B2 −
=
−
(cid:19)
B1
Z1
−
(B1 − B2) =
−
(cid:82) CA−1
t ∇Φ(x) exp(−Φ(x))dN (Atyt, Qt)
(cid:82) exp(−Φ(x))dN (Atyt, Qt)
(cid:19)
(cid:18) Z1 − Z2
Z1Z2
B2 −
1
Z1
(B1 − B2).
We will fix an R ⩾ 0 and assume that ∥xt∥, ∥yt∥ ⩽ R. Then, since At is bounded, there exists an ̃R such that
∥Atxt∥, ∥Atyt∥ ⩽ ̃R.
Then
exp(−Φ(x))dN (Atxt, Qt)(x) =
(cid:90)
exp(−Φ(x + Atxt))dN (0, Qt)(x)
(cid:90)
(cid:90)
Z1 =
⩾
exp(−(E1 + E2∥x + Atxt∥2))dN (0, Qt)(x)
(cid:90)
= exp(−E1 + 2∥Atxt∥2)
exp(−E2∥x∥2)dN (0, Qt)(x)
≳ E exp(−2∥Atx∥2) ⩾ E exp(−2 ̃R2)
where E is a finite constant that only depends on Cμ, C, L and the Ei. A similar bound holds for Z2. For
Z1 − Z2 =
⩽
(cid:90)
(cid:90)
exp(−Φ(x + Atxt)) − exp(−Φ(x + Atyt))dN (0, Qt)(x)
exp(−E0)L∥Atxt − Atyt∥dN (0, Qt)(x)
= exp(−E0)L∥Atxt − Atyt∥ ⩽ EL∥xt − yt, ∥
33
Infinite-Dimensional Diffusion Models
A PREPRINT
where we used that if Φ is C 1 and its derivative is bounded by L, then exp(−Φ) has a derivative bounded by
exp(− inf Φ)L. Furthermore, we get that
(cid:90)
CA−1
t ∇Φ(x) exp(−Φ(x))dN (Atxt, Qt)
⩽ exp(−E0)
⩽ exp(−E0)
(cid:90)
(cid:90)
CA−1
t ∇Φ(x + Atxt)dN (0, Qt)
∥CA−1
t ∥(∥∇Φ(0)∥ + L∥x + Atxt∥)dN (0, Qt)
(cid:18)
(cid:90)
∥∇Φ(0)∥ + L∥Atxt∥ + L
∥x∥dN (0, Qt)
(cid:19)
⩽ exp(−E0)∥CA−1
t ∥
⩽ E(1 + ∥xt∥) ⩽ E(1 + R),
where we used that CA−1
t
and At are bounded. We also get that
∥B1 − B2∥
(cid:90)
∥CA−1
t ∇Φ(x + Atxt)∥| exp(−Φ(x + Atxt)) − exp(−Φ(x + Atyt))|dN (0, Qt)(x)
=
(cid:90)
+
∥CA−1
t ∇Φ(x + Atyt) − CA−1
(cid:18)
t ∇Φ(x + Atxt)∥ exp(−Φ(x + Atyt))dN (0, Qt)(x)
(cid:19)(cid:19)
(cid:18)
(cid:90)
⩽ exp(−E0)L∥Atxt − Atyt∥∥CA−1
t ∥
∥∇Φ(0)∥ + L
∥Atxt∥ +
∥x∥dN (0, Qt)(x)
+L∥CA−1
t ∥∥Atxt − Atyt∥ exp(−E0)
⩽ E∥xt − yt∥(1 + R),
where we again used the boundedness of CA−1
t
and At. Putting it all together, we get that
(cid:13)
(cid:13)
(cid:13)
(cid:13)
C∇ log
dpt
dN (0, Ct)
(xt) − C∇ log
dpt
dN (0, Ct)
(yt)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
⩽ E exp(4 ̃R2)L∥xt − yt∥ + E exp(2 ̃R)∥xt − yt∥(1 + R) ⩽ E exp(4 ̃R2)∥xt − yt∥.
Step 3: Strong uniqueness and existence Using the local Lipschitzness, we apply Gr ̈onwall to obtain strong unique-
ness of solutions. This is a standard argument and similar to what we did in Step 3 of the proof of Theorem 3.
Alternatively, see, for example, Karatzas et al. [1991, Theorem 2.5 in Section 5.2.B].
We can now prove weak existence of the reverse SDE. By Theorem 1, the time reversal will be a weak solution with
initial condition PT . Denote the path measure of Y by Q. Under the assumptions of the Theorem, N (0, C) will be
absolutely continuous with respect to pT . We define ̃Q by
d ̃Q
dQ (y[0,T ]) =
dN (0, C)
dPT
(y0).
̃Q is then the path measure of a solution ̃Y to 6 which has initial condition N (0, C), therefore we have constructed a
weak solution. With that we conclude the proof since, weak existence together with strong uniqueness imply strong
existence, see Karatzas et al. [1991, Section 5.3].
(cid:50)
G Wasserstein-bound proof
We now prove Theorem 4:
Proof We prove the theorem with the finite-dimensional notation, but one can replace ∇ log pt by s(t, *) and nothing
changes. We will partition [0, T ] into τ = {0 = t0, . . . , tN = T }. For the given partition we denote
⌊t⌋ = max
ti∈τ
{ti ⩽ t},
⌈t⌉ = min
ti∈τ
{ti ⩾ t}, ∆ = max
tk+1 − tk.
k=0,...,N −1
34
Infinite-Dimensional Diffusion Models
A PREPRINT
We couple two strong solutions of Yt and ̃Yt for the same Brownian motion Bt. These strong solutions exist because
of the assumptions of the theorem and Theorem 2 or Theorem 3. The difference between Yt and ̃Yt can be bounded as
follows:
d∥Yt − ̃Yt∥ =
1
2
⩽ 1
2
∥Yt − ̃Yt∥ +
1
∥Yt − ̃Yt∥
⟨Yt − ̃Yt, C∇ log pT −t(Yt) − ̃s(T − ⌊t⌋, ̃Y⌊t⌋)⟩
∥Yt − ̃Yt∥ + ∥C∇ log pT −t(Yt) − sθ(T − t, ̃Y⌊t⌋)∥.
We bound
∥C∇ log pT −t(Yt) − ̃s(T − t, ̃Yt)∥
⩽ ∥C∇ log pT −t(Yt) − C∇ log pT −⌊t⌋(Y⌊t⌋)∥
+∥C∇ log pT −⌊t⌋(Y⌊t⌋) − ̃s(⌊t⌋, Y⌊t⌋)∥ + ∥ ̃s(⌊t⌋, Y⌊t⌋) − ̃s(⌊t⌋, ̃Y⌊t⌋)∥
⩽ ∥∇U log pT −t(Yt) − ∇U log pT −⌊t⌋(Y⌊t⌋)∥
+∥C∇ log pT −⌊t⌋(Y⌊t⌋) − ̃s(⌊t⌋, Y⌊t⌋)∥ + Ls∥Y⌊t⌋ − ̃Y⌊t⌋∥.
We take the supremum to get rid of the delay term ∥Y⌊t⌋ − ̃Y⌊t⌋∥ and obtain
∥Yr − ̃Yr∥ ⩽ L′
s
sup
τ ⩽s
∥Yr − ̃Yr∥dt +
(cid:90) s
0
∥∇U log pT −t(Yt) − ∇U log pT −⌊t⌋(Y⌊t⌋)∥dt
(cid:90) s
sup
r⩽t
0
(cid:90) (cid:13)
(cid:13)
(cid:13)∇U log
+
pT −⌊t⌋
ν
(Y⌊t⌋) − ̃s(⌊t⌋, Y⌊t⌋)
(cid:13)
(cid:13)
(cid:13) dt,
where L′
s = L + 1
2 . Squaring the above expression and taking expectations, we arrive at
∥Yr − ̃Yr∥2]
E[sup
τ ⩽s
2 (cid:90) s
≲ L′
s
E[sup
r⩽t
0
(cid:20)(cid:13)
(cid:13)
(cid:13)∇U log
∥Yr − ̃Yr∥2]dt +
(cid:90) s
0
E[∥∇U log pT −t(Yt) − ∇U log pT −⌊t⌋(Y⌊t⌋)∥2]dt
pT −⌊t⌋
ν
(cid:13)
(cid:13)
(Y⌊t⌋) − ̃s(⌊t⌋, Y⌊t⌋)
(cid:13)
2(cid:21)
dt
+E
= L′
s
2 (cid:90) s
0
E[sup
r⩽t
∥Yr − ̃Yr∥2]dt +
(cid:90) s
0
B1 + B2dt
We start by bounding B1:
B1 ⩽ E
+
(cid:20)(cid:13)
(cid:13)
(cid:13)∇U log pT −t(Yt) − e
(cid:16)
(cid:17)2
1 − e
(t−⌊t⌋)
2
E[∥∇U log pT −⌊t⌋(Y⌊t⌋)∥2]
(t−⌊t⌋)
(cid:13)
(cid:13)
2 ∇U log pT −⌊t⌋(Y⌊t⌋)
(cid:13)
2(cid:21)
= E[∥∇U log pT −t(Yt)∥2] − E
(cid:20)(cid:13)
(cid:13)
(cid:13)e
(t−⌊t⌋)
2 ∇U log pT −⌊t⌋(Y⌊t⌋)
2(cid:21)
(cid:13)
(cid:13)
(cid:13)
(cid:16)
+
1 − e
(t−⌊t⌋)
2
(cid:17)2
E[∥∇U log pT −⌊t⌋(Y⌊t⌋)∥2]
35
Infinite-Dimensional Diffusion Models
A PREPRINT
where we used that the L2 norm of the a martingale Mt difference is the difference of the L2 norms, i.e., E[∥Mt −
Ms∥2] = E[∥Mt∥2] − E[∥Ms∥2] for t ⩾ s. Then
(cid:90) T
0
N
(cid:88)
B1dt ⩽
(E[∥∇U log pT −tk+1(Ytk+1)∥2] − E[∥e(tk+1−tk)∇U log pT −tk (Ytk )∥2])(tk+1 − tk)
i=1
(cid:16)
+
(cid:17)2
1 − e
∆t
2
E[∥∇U log pT (YT )∥2]
⩽ ∆t
N
(cid:88)
i=1
(E[∥∇U log pT −tk+1(Ytk+1)∥2] − E[∥e(tk+1−tk)∇U log pT −tk (Ytk )∥2])
(cid:16)
+
1 − e
∆t
2
(cid:17)2
E[∥∇U log pT (YT )∥2]
⩽ ∆tE[∥∇U log p0(YT )∥2] +
(cid:16)
1 − e
∆t
2
(cid:17)2
E[∥∇U log pT (YT )∥2]
=O(∆t)E[∥∇U log p0(YT )∥2]
where we used that the L2 norm of a martingale is increasing. The term B2 is nothing more than the loss.
Putting it all together, we arrive at
E[sup
τ ⩽s
∥Yr − ̃Yr∥2] ⩽ L2
= L2
(cid:90) s
0
(cid:90) s
0
E[sup
r⩽t
E[sup
r⩽t
and can apply Gr ̈onwall to get that
∥Yr − ̃Yr∥2]dt + O(∆t)E[∥∇U log p0(YT )∥2] + Loss
∥Yr − ̃Yr∥2] + Error
E[sup
τ ⩽s
∥Yr − ̃Yr∥2] ⩽ (E[∥Y0 − ̃Y0∥2] + Error) exp(L2s).
Since YT ∼ μdata and ̃YT ∼ ˆμsample we found a coupling of μdata and ˆμsample and bounded its L2 distance. We
have not picked the coupling of Y0 ∼ pT and ̃Y0 ∼ N (0, C) yet. Therefore we just pick a ε-optimal coupling in the
squared Wasserstein distance, i.e., E[∥Y0 − ̃Y0∥2] ⩽ W 2
2 (ˆμsample, μdata) ⩽ E[sup
τ ⩽T
∥Yr − ̃Yr∥2] ⩽ (W2(pT , N (0, C)) + ε + Error) exp(L2T ).
2 (pT , N (0, C)) + ε and obtain
W 2
Since ε was arbitrary, the statement of the theorem follows, we actually get
W 2
2 (ˆμsample, μdata) ⩽ E[sup
τ ⩽T
∥Yr − ̃Yr∥2] ⩽ (W2(pT , N (0, C)) + Error) exp(L2T ).
Finally, W 2
2 (pT , N (0, C)) can be upper bounded by
2 (pT , N (0, C)) ≤ exp(−t)W 2
since the Ornstein-Uhlenbeck forward process is contracting with rate exp(−t) in the squared W 2
this, the statement of the theorem follows.
2 (μdata, N (0, C))
W 2
2 -distance. From
(cid:50)
Proposition 2 Let U be the Cameron-Martin space associated to a measure N (0, C) taking values in H. Then,
∥ * ∥U : H → [0, ∞] is lower-semicontinuous and convex on H.
Proof Let (ei, ci) be the eigenvectors and eigenvalues of C. Let fk → f in H. We will prove lower semicontinuity
for ∥ * ∥2
U , the result for ∥ * ∥U then follows. Then,
∥f ∥2
U =
∞
(cid:88)
d=1
lim
k→∞
⟨fk, ei⟩c−1
i
⩽ lim inf
k→∞
∞
(cid:88)
d=1
⟨fk, ei⟩c−1
i = lim inf
k→∞
∥fk∥2
U ,
which proves lower semi-continuity. Convexity follows since ∥ * ∥U is convex when restricted to U , and infinite
(cid:50)
otherwise.
36
|
|
http://arxiv.org/abs/2302.10128v1 | 2023-02-20T18:00:21 | 2023-02-20T18:00:21 | Sketch In, Sketch Out: Accelerating both Learning and Inference for
Structured Prediction with Kernels | Surrogate kernel-based methods offer a flexible solution to structured output
prediction by leveraging the kernel trick in both input and output spaces. In
contrast to energy-based models, they avoid to pay the cost of inference during
training, while enjoying statistical guarantees. However, without
approximation, these approaches are condemned to be used only on a limited
amount of training data. In this paper, we propose to equip surrogate kernel
methods with approximations based on sketching, seen as low rank projections of
feature maps both on input and output feature maps. We showcase the approach on
Input Output Kernel ridge Regression (or Kernel Dependency Estimation) and
provide excess risk bounds that can be in turn directly plugged on the final
predictive model. An analysis of the complexity in time and memory show that
sketching the input kernel mostly reduces training time while sketching the
output kernel allows to reduce the inference time. Furthermore, we show that
Gaussian and sub-Gaussian sketches are admissible sketches in the sense that
they induce projection operators ensuring a small excess risk. Experiments on
different tasks consolidate our findings. | [
"Tamim El Ahmad",
"Luc Brogat-Motte",
"Pierre Laforgue",
"Florence d'Alché-Buc"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.10128v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.10128v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "stat.ML",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"stat.ML",
"cs.LG"
] | 3
2
0
2
b
e
F
0
2
]
L
M
.
t
a
t
s
[
1
v
8
2
1
0
1
.
2
0
3
2
:
v
i
X
r
a
Sketch In, Sketch Out: Accelerating both Learning
and Inference for Structured Prediction with Kernels
Tamim El Ahmad 1
Luc Brogat-Motte 1
Pierre Laforgue 2
Florence d'Alché-Buc 1
1 LTCI, Télécom Paris, Institut Polytechnique de Paris, France
2 Department of Computer Science, University of Milan, Italy
Correspondance to: [email protected]
Abstract
Surrogate kernel-based methods offer a flexible solution to structured output pre-
diction by leveraging the kernel trick in both input and output spaces. In contrast to
energy-based models, they avoid to pay the cost of inference during training, while
enjoying statistical guarantees. However, without approximation, these approaches
are condemned to be used only on a limited amount of training data. In this pa-
per, we propose to equip surrogate kernel methods with approximations based on
sketching, seen as low rank projections of feature maps both on input and output
feature maps. We showcase the approach on Input Output Kernel ridge Regression
(or Kernel Dependency Estimation) and provide excess risk bounds that can be
in turn directly plugged on the final predictive model. An analysis of the com-
plexity in time and memory show that sketching the input kernel mostly reduces
training time while sketching the output kernel allows to reduce the inference time.
Furthermore, we show that Gaussian and sub-Gaussian sketches are admissible
sketches in the sense that they induce projection operators ensuring a small excess
risk. Experiments on different tasks consolidate our findings.
1
Introduction
Ubiquitous in real-world applications, objects composed of different elements that interact with each
others, a.k.a. structured objects, have attracted a great deal of attention in Machine Learning (Bakir
et al., 2007; Gärtner, 2008; Nowozin and Lampert, 2011; Deshwal et al., 2019). Depending on their
role in a supervised learning task, i.e., either as input or output variables, structured objects raise
distinct challenges when learning a predictive model. Classification and regression from structured
input require a continuous representation that can be learned through a deep neural network (see for
instance, (Defferrard et al., 2016)) or implicitly defined through a dedicated kernel (Collins and Duffy,
2001; Borgwardt et al., 2020). In contrast, Structured Output Prediction calls for a more involved
approach since the discrete nature of the output variables impacts directly the definition of the loss
function (Ciliberto et al., 2020; Nowak et al., 2019; Cabannes et al., 2021), and therefore the learning
problem itself. To handle this general task, an abundant literature has been developed within different
directions, each reflecting a way to relax somehow the combinatorial nature of the problem which
appears both in training and in prediction. Energy-based approaches relax the structured prediction
problem into the learning of a scalar score function LeCun et al. (2007); Tsochantaridis et al. (2005);
Belanger and McCallum (2016); Deshwal et al. (2019). End-to-end learning typically exploits a
differentiable model, as well as a differentiable loss, to make a structured prediction, enabling gradient
descent (Long et al., 2015; Niculae et al., 2018; Berthet et al., 2020). Surrogate methods rely on
the implicit embedding of the output variable into a Hilbert Space and solve a surrogate regression
problem into this new output space. If they avoid the burden of the inference step (decoding) during
learning contrary to energy-based methods, at testing time they also pay the complexity price of
the inference. Rare are the methods that simultaneously combine scalability in time and memory
Preprint. Under review.
at learning and inference time, a wide scope of applicability on different structures while offering
statistical guarantees of the provided estimator Osokin et al. (2017); Cabannes et al. (2021). In this
work, we focus on surrogate methods (Ciliberto et al., 2020) and their implementation as kernel
methods, namely the input output kernel regression approaches (Cortes et al., 2005; Brouard et al.,
2016b). Recent works have shown that they enjoy consistency and their excess risk is governed by
those of the surrogate regression. Moreover, they are well appropriate to make prediction from one
(structured) modality to another (structured) one since kernels can be leveraged in the input space
as well as the output space. However contrary to deep neural networks they do not scale neither in
memory nor in time without further approximation. The aim of this paper is equip these methods
with kernel approximations to obtain a drastic reduction of computation and memory at training and
testing time while keeping their statistical properties. Several works have successfully highlighted the
power of kernel approximation methods such as Random Fourier Features (Rahimi and Recht, 2007;
Brault et al., 2016; Rudi and Rosasco, 2017; Li et al., 2021), more generally low-rank approaches
(Bach, 2013) and even reached spectacular results as shown by Meanti et al. (2020). Sketched scalar
kernel machines have been widely studied first with a particular type of sketching, namely Nyström
approximation (Williams and Seeger, 2001; Alaoui and Mahoney, 2015; Rudi et al., 2015), and
some works exist handling other sketching distribution, such as Gaussian or Randomized Orthogonal
Systems (Yang et al., 2017; Lacotte and Pilanci, 2020). Furthermore, a line of research consists in
interpreting such an approximation as data-dependent random features (see e.g. Williams and Seeger
(2001); Yang et al. (2012) for Nyström case and Kpotufe and Sriperumbudur (2020) for Gaussian
case), leading to interesting applications for kernel PCA (Sterge and Sriperumbudur, 2022) or kernel
mean embedding (Chatalic et al., 2022a,b). Current approaches to kernel approximation apply on
scalar or vector-valued kernels defined on the input space but no method covers both sides of the coin,
aka approximation of both input and output kernels.
Contributions. By extending the random projection interpretation of Nyström's method for scalar-
valued kernels to arbitrary sketching matrices and vector-valued RKHSs, we present four contributions
• We apply sketching to both the inputs and the outputs of the Ridge vector-valued regression
problems solved as subroutines when performing structured prediction with kernels. This is
shown to accelerate respectively the learning and the inference steps of the approach.
• We derive excess risk bounds for the sketched estimator thus obtained, which are controlled
by the properties of the sketched projection operator.
• We show that Gaussian and sub-Gaussian sketches are admissible sketches in the sense that
they lead to close to optimal learning rates with sketching sizes m (cid:28) n.
• We provide structured prediction experiments on real-world datasets which confirm our
method's relevance.
2 Structured Prediction with input and output kernels
In this section, we introduce Structured Prediction when leveraging a kernel-induced loss. Surrogate
kernel methods are recalled in this context with an emphasis on Input Output Kernel ridge Regression.
If Z denotes a generic Polish space, kz is a positive definite kernel over Z and χ(z) :=
Notation.
kz(*, z) is the canonical feature map of kz. Hz denotes the Reproducing Kernel Hilbert Space
√
n)(f (z1), . . . , f (zn))(cid:62) is the sampling operator
(RKHS) associated to kz. SZ : f ∈ Hz (cid:55)→ (1/
over Hz (Smale and Zhou, 2007). For any operator A, we denote A# its adjoint. The adjoint of
the sampling operator is defined as S#
Z : α ∈ Rn (cid:55)→ (1/
i=1 αiχ(zi). If z is a random
variable distributed according the probability distribution ρz, the covariance operator over HZ is
denoted CZ = Ez[χ(z) ⊗ χ(z)] and the empirical covariance operator over HZ writes as (cid:98)CZ =
(1/n) (cid:80)n
i=1} is an i.i.d. sample drawn from the probability
distribution ρz. For any matrix M , we denote M † its Moore-Penrose inverse.
i=1 χ(zi) ⊗ χ(zi) = S#
Z SZ, where {(zi)n
n) (cid:80)n
√
Structured prediction with surrogate kernel methods. Let X be the input space and Y the
output space. In general, Y is finite and extremely large, which makes the task of approximating
the relationship between an input variable X with values in X and an output random variable Y
with values in Y intractable in a direct way Nowozin and Lampert (2011). In this work, we rely on a
2
kernel-induced loss to fix the goal of structured prediction and leverage the kernel trick to define a
tractable surrogate regression problem.
Suppose a positive definite kernel ky : Y × Y → R that measures how close are two objects from Y.
Denote Hy the Reproducing Kernel Hilbert Space associated to ky and ψ : Y → Hy, the canonical
feature map such as ψ(y) := ky(*, y), ∀y ∈ Y. We consider the loss function induced by the kernel
ky defined by (cid:96) : (y, y(cid:48)) → (cid:107)ψ(y) − ψ(y(cid:48))(cid:107)2
, for any pair (y, y(cid:48)) ∈ Y × Y. Its relevance for the
structured prediction problem at hand directly depends on the kernel chosen (see examples in Section
5), and the wide variety of kernels defined over structured objects (Gärtner, 2008; Borgwardt et al.,
2020) ensures its great flexibility.
Hy
Given a fixed but unknown joint probability distribution ρ defined on X × Y, the goal of Structured
Prediction is to find an estimator ˆf of the target function
f ∗ := arg min
f :X →Y
R(f ) ,
(1)
(cid:2)(cid:107)ψ(y) − ψ(f (x))(cid:107)2
Hy
where R(f ) = E(x,y)∼ρ
{(x1, y1), ..., (xn, yn)} drawn from ρ.
To tackle this problem, various works Cortes et al. (2005); Geurts et al. (2006); Brouard et al. (2011);
Ciliberto et al. (2016) have proposed to proceed in a two-step approach, referred to as Output Kernel
Regression (OKR):
(cid:3), using a training i.i.d.
sample
1. Surrogate Regression: Find ˆh an estimator of the surrogate target h∗ : x (cid:55)→ E[ψ(y)|x]
(cid:105)
, exploiting the implicit knowledge of the
(cid:104)
(cid:107)h (x) − ψ (y)(cid:107)2
E
Hy
the minimizer of arg min
h:X →Hy
training sample {(x1, ψ(y1), ..., (xn, ψ(yn))}.
2. Pre-image or decoding: Define ˆf by decoding ˆh, i.e.,
ˆf (x) := arg min
y∈Y
(cid:107)ˆh(x) − ψ(y)(cid:107)2
Hy
.
The surrogate regression problem in Step 1 is much easier to handle than the initial Structured
Prediction problem described in (1): it avoids to learn f through the composition with the implicit
feature map ψ, and relegates the difficulty of manipulating structured objects to Step 2, i.e., at
testing time. Besides, the issue of vector-valued regression into an infinite dimensional space can be
overcome by leveraging the kernel trick in the output space.
Moreover, these OKR approaches belong to the general framework of SELF (Ciliberto et al., 2016)
and ILE (Ciliberto et al., 2020) and enjoy valuable theoretical guarantees. They are Fisher consistent,
meaning that h∗ gives exactly rise to the target f ∗ after decoding, and that the excess risk of ˆf is
controlled by that of ˆh, as shown in Ciliberto et al. (2016, Theorem 2).
Input Output Kernel Regression. A natural choice to tackle the surrogate regression problem
consists in solving a kernel ridge regression problem, assuming that the hypothesis space is a vector-
valued RKHS (Senkene and Tempel'man, 1973; Micchelli and Pontil, 2005; Carmeli et al., 2006,
2010). In a nutshell, if F denotes a Hilbert space, a mapping K : X × X → L(F), where L(F)
is the set of bounded linear operators on F , is an operator-valued kernel (OVK) if it satisfies the
following properties: K (x, x(cid:48)) = K (x(cid:48), x)# for all (x, x(cid:48)) ∈ X 2 and such that for all n ∈ N and any
(xi, φi))n
i,j=1 (cid:104)φi, K (xi, xj) φj)(cid:105)F
Similarly to the scalar case, given an OVK K, one can define a unique Hilbert space HK of functions
with values in F associated to K, that enjoys the reproducing kernel property, i.e., such that for all
x ∈ X , φ ∈ F and f ∈ HK we have x(cid:48) (cid:55)→ K (x, x(cid:48)) φ ∈ F, and (cid:104)f, K (*, x) φ(cid:105)HK = (cid:104)f (x), φ(cid:105)F .
The reader can refer to (Carmeli et al., 2010) for further details on vv-RKHSs.
i=1 ∈ (X × F)n we have (cid:80)n
(cid:62) 0.
In what follows, we are interested in functions with values in the RKHS Hy and we opt for the
decomposable identity operator-valued kernel K : X × X → L(Hy), defined as: K (x, x(cid:48)) =
kx (x, x(cid:48)) IHy , where kx : X × X → R is a positive definite scalar-valued kernel on X . By symmetry
with the output space, we denote Hx, the RKHS associated to kx and for sake of simplicity H := HK,
the RKHS associated to K.
3
We are now well equipped to describe Input Output Kernel ridge Regression (IOKR for short)
(Brouard et al., 2011, 2016b; Ciliberto et al., 2020) also introduced as Kernel Dependency Estimation
by Weston et al. (2003); Cortes et al. (2005). In IOKR, the estimator of the surrogate regression is
obtained by solving the following ridge regression problem within H, given a regularisation penalty
λ > 0,
min
h∈H
1
n
n
(cid:88)
i=1
(cid:107)ψ(yi) − h(xi)(cid:107)2
Hy
+ λ(cid:107)h(cid:107)2
H .
(2)
Interestingly, as noticed by several authors, the unique solution of the above kernel ridge regression
problem can be expressed in different ways. We describe the two of them which are exploited in this
work. First, ˆh(x) computes a weighted combination of the training outputs
ˆh(x) =
n
(cid:88)
i=1
ˆαi(x)ψ(yi),
with
where KX = (kx (xi, xj))n
i,j=1 ∈ Rn×n, and κx
Second, ˆh(x) also results from the application of an operator (cid:98)H on φ(x), i.e.,
ˆα(x) = (KX + nλ)−1κx
X = (cid:98)Ωκx
X ,
X = (kx(x, x1), . . . , kx(x, xn))(cid:62).
where
ˆh(x) = (cid:98)Hφ(x),
(cid:98)H = S#
Y SX
(cid:0)
(cid:98)CX + λI(cid:1)−1
.
(3)
(4)
(5)
(6)
The first expression can be obtained by applying a representer theorem in vv-RKHS (Micchelli and
Pontil, 2005) and solving the resulting quadratic program. The second expression can be seen as a
re-writing of the first one as highlighted in Ciliberto et al. (2016, Lemma 17) and may also be related
to the conditional kernel empirical mean embedding Grünewälder et al. (2012).
The final estimator ˆf is computed using the weighted expression in Equation (4) to benefit from the
kernel trick:
ˆf (x) = arg min
ky(y, y) − 2κx
X
T
(cid:98)Ωκy
Y
y∈Y
(7)
Y = (ky (y, y1) , . . . , ky (y, yn))(cid:62).
where κy
The training phase involves thus the inversion of a n×n matrix which cost without any approximation
is O(n3).
In practice, the decoding step is performed by searching in a candidate set Yc ⊆ Y of size nc. Hence,
given that we want to perform predictions on a test set Xte of size nte, the main quantity to compute
is
Kte,tr
(cid:124) (cid:123)(cid:122) (cid:125)
nte×n
(cid:98)Ω
(cid:124)(cid:123)(cid:122)(cid:125)
n×n
K y
tr,c
(cid:124) (cid:123)(cid:122) (cid:125)
n×nc
,
(8)
i , xj))1≤i≤nte,1≤j≤n ∈ Rnte×n and K y
where Kte,tr = (kx(xte
∈
(cid:1), considering nte < n ≤ nc. IOKR thus suffers,
Rn×nc. The complexity of decoding part is O (cid:0)n2nc
like most kernel methods applied in a naive fashion, from a heavy computational cost. In order to
alleviate this limitation and widen the applicability of this method, we develop a general sketching
approach that applies both in the input and output feature spaces to accelerate the training and the
decoding steps.
tr,c = (cid:0)ky(yi, yc
1≤i≤n,1≤j≤nc
j )(cid:1)
3 Sketched Input Sketched Output Kernel Regression
In this section, we describe how to construct ̃h , a low-rank approximate estimator of ˆh, thanks to
orthogonal projection operators (cid:101)PX and (cid:101)PY onto subspaces of Hx and Hy respectively. A general
sketching approach is proposed to define such projectors. Ultimately this gives rise to a novel
estimator ̃f for structured prediction.
4
Low-rank estimator. Starting from the expression of ˆh in (5), we replace the sampling operators
on both sides, SX and SY , by their projected counterparts, (cid:101)PX S#
X and (cid:101)PY S#
Y , in (6), so as to encode
dimension reduction. The proposed low-rank estimator expresses as follows:
X SX (cid:101)PX + λIHx )−1φ(x) .
Y SX (cid:101)PX ( (cid:101)PX S#
̃h(x) = (cid:101)PY S#
(9)
In the following, we show how to design the projection operators using sketching and then derive the
novel expression of the low-rank estimator in terms of weighted combination of the training outputs:
̃h(x) = (cid:80)n
i=1 ̃αiψ(yi), yielding a reduced computational cost.
Sketching.
In this work, we chose to leverage sketching (Mahoney et al., 2011; Woodruff, 2014) to
obtain random projectors within the input and output feature spaces. Indeed, sketching consists in
approximating a feature map χ : Z → Hz by projecting it thanks to a random projection operator
(cid:101)PZ ∈ Hz ⊗ Hz defined as follows. Given a random matrix Rz ∈ Rmz×n, n data (zi)n
i=1 ∈ Z and
mz (cid:28) n, the linear subspace defining (cid:101)PZ is constructed as the linear subspace generated by the span
of the following mz random vectors
n
(cid:88)
(Rz)ijχ(zj) ∈ Hz,
j=1
i = 1, . . . , mz .
This random matrix is drawn from a distribution on Rmz×n, including classical examples such as
sub-sampling sketches where each row is randomly drawn from the rows of the identity matrix
In (sub-sampling sketches correspond to Nyström approximation (Rudi et al., 2015)) or Gaussian
sketches (Kpotufe and Sriperumbudur, 2020) where every entries are i.i.d. Gaussian random variables.
One can compute the closed form of such a projector (cid:101)PZ as showed in Proposition 2, in Appendix B.
Sketched Input Sketched Output Kernel Regression estimator (SISOKR) We now give the
expression of the SISOKR estimator ̃h amenable to practical implementations (see Appendix B for
the proof).
Proposition 1 (Expression of SISOKR). For all x ∈ X , ̃h (x) = (cid:80)n
i=1 ̃αi (x) ψ (yi) where
̃α (x) = R(cid:62)
y (cid:101)ΩRxκx
X ,
(10)
with (cid:101)Ω = (cid:101)K †
Y RyKY KX R(cid:62)
x (RxK 2
X R(cid:62)
x + nλ (cid:101)KX )†.
X R(cid:62)
x (RxK 2
x )†Rxκx
x + nλRxKX R(cid:62)
We here recover a classical quantity when leveraging sketching for Kernel Ridge Regression, i.e.
KX R(cid:62)
X (Rudi et al., 2015; Yang et al., 2017). This quantity
allows to reduce the size of the matrix to invert, which is now an mx × mx matrix. This is the main
reduction that allows to lower fitting step's complexity, thanks to the input sketching. We still need to
perform matrix multiplications RxKX , which can be very efficient both in time and space complexity
for sketches such as sub-sampling or p-sparsified (El Ahmad et al., 2022) sketches, or more costly for
Gaussian sketches for instance. Furthermore, output sketching gives additional operations to perform,
but the overall cost of computing ̃α complexity can be negligible compared to O(n3) according to
the sketching scheme used for both input and output kernels. We obtain the corresponding structured
prediction estimator ̃f by decoding ̃h, i.e. by replacing (cid:98)Ω by (cid:101)Ω in (7). Finally, the purpose of output
sketching is to accelerate inference. In fact, the main quantity to compute now when performing
predictions is
Kte,trR(cid:62)
x
(cid:123)(cid:122)
(cid:125)
(cid:124)
nte×mx
(cid:101)Ω
(cid:124)(cid:123)(cid:122)(cid:125)
mx×my
.
RyK y
tr,c
(cid:124) (cid:123)(cid:122) (cid:125)
my×nc
(11)
Time complexity of such an operation is O(ncnte min(mx, my)) if nte > my, and
O(ncmy min(mx, nte)) otherwise. We then obtain a significant complexity reduction, as we do not
have any dependency in n2nc anymore.
4 Theoretical Analysis
In this section, we present a statistical analysis of the proposed estimators ̃h and ̃f . After introducing
the assumptions on the learning problem that we consider, we upper bound in Theorem 1 the excess-
risk of the sketched kernel ridge estimator, exhibiting some approximation errors due to sketching.
5
Then, in Section 4.2, we provide bounds for these approximation error terms. Finally, this allows
us to study in Section 4.3 under which setting the proposed estimators ̃h and ̃f obtain substantial
computational gains, while still benefiting from a close to optimal learning rate.
We consider the following set of common assumptions in the kernel literature (Bauer et al., 2007;
Steinwart et al., 2009; Rudi et al., 2015; Pillaud-Vivien et al., 2018; Fischer and Steinwart, 2020;
Ciliberto et al., 2020; Brogat-Motte et al., 2022) quantifying the hardness of the learning problem.
Assumption 1 (Attainability). We assume that h∗ ∈ H, i.e. there exists a linear operator H : Hx →
Hy with (cid:107)H(cid:107)HS < +∞ such that
h∗(x) = Hφ(x) ∀ x ∈ X .
(12)
This is a standard assumption in the context of least-squares regression (Caponnetto and De Vito,
2007), making the target h∗ belonging to the hypothesis space.
We now describe a set of generic assumptions that have to be satisfied by both input and output
kernels kx and ky.
Assumption 2 (Bounded kernel). We consider positive definite bounded kernels kz : Z × Z → R,
i.e. we assume that there exists κz > 0 such that
kz(z, z) ≤ κ2
z ∀ z ∈ Z.
We note κx, κy > 0 for the input and output kernels kx, ky, respectively.
Assumption 3 (Capacity condition). We assume that there exists γz ∈ [0, 1] such that
Qz := Tr(C γz
Z ) < +∞ .
(13)
(14)
This assumption is always verified for γz = 1 (as Tr(CZ) = E[(cid:107)χ(z)(cid:107)2
] < +∞ from Assump-
Hz
tion 2), and the smaller the γz the faster is the eigenvalue decay of CZ. It measures the regularity of
the features χ(z) ∈ Hz for z ∼ ρz. As a limiting case, when CZ is finite rank, γz = 0.
Assumption 4 (Embedding property). We assume that there exists bz > 0 and μz ∈ [0, 1] such that
almost surely
χ(z) ⊗ χ(z) (cid:22) bzC 1−μz
Z
.
(15)
This assumption is always verified for μz = 1 (as χ(z) ⊗ χ(z) (cid:22) κ2
zIHz from Assumption 2), and the
smaller the μz the stronger is the assumption. It allows to control the regularity of the functions in Hz
with respect to the L∞-norm, by giving (cid:107)h(cid:107)Hz ≤ b1/2
E[h(z)2](1−μ)/2 (See Pillaud-Vivien
et al., 2018). As a limiting case, when CZ is finite rank, μz = 0.
z (cid:107)h(cid:107)μ
Hz
4.1 SISOKR Excess-Risk bound
In this section, we provide a bound on the excess-risk of the proposed approximated regression
estimator with both input and output sketching (SISOKR).
Theorem 1 (SISOKR excess-risk bound). Let δ ∈ [0, 1], n ∈ N sufficiently large such that λ =
n−1/(1+γx) ≥ 9κ2
δ ). Under our set of assumptions, the following holds with probability at
least 1 − δ
n log( n
x
E[(cid:107) ̃h(x) − h∗(x)(cid:107)2
Hy
]
1
2 ≤ S(n) + c2Aφ
ρx
( (cid:101)PX ) + Aψ
ρy
( (cid:101)PY )
where
S(n) = c1 log(4/δ)n− 1
Aχ
ρz
( (cid:101)PZ) = Ez[(cid:107)( (cid:101)PZ − IHz )χ(z)(cid:107)2
Hz
2(1+γx )
(regression error)
1
2 (sketch. error)
]
and c1, c2 > 0 are constants independent of n and δ defined in the proofs.
This bound is a sum of three terms. The first one is a regression error whose dependency in n is the
same as the kernel ridge regression (without sketching). In particular, this learning rate has been
shown to be optimal under our set of assumptions in a minimax sense (see Caponnetto and De Vito
(2007)). The second and the third terms are approximation errors due to the sketching of the input
and the output kernels, respectively. In particular, they write as reconstruction errors (Blanchard
et al., 2007) associated to the random projection (cid:101)PX , (cid:101)PY of the feature maps φ, ψ through the input
and output marginal distributions, respectively.
6
4.2 Sketching Reconstruction Error
In this section, we provide bounds on the sketching reconstruction error for the family of subgaussian
sketches.
Subgaussian sketches are defined as follows.
Definition 1. A subgaussian sketch R ∈ Rm×n is composed with i.i.d. elements such that E [Rij] =
0, E (cid:2)R2
m -subgaussian, for all 1 ≤ i ≤ m and 1 ≤ j ≤ n, where ν ≥ 1.
(cid:3) = 1/m and Rij is ν2
ij
First, a standard normal r. v. is 1-subgaussian. Moreover, thanks to Hoeffding's lemma, any r.v. taking
values in a bounded interval [a, b] is (b − a)2/4-subgaussian. Hence, a sketch matrix composed with
i.i.d. Gaussian or bounded r.v. is a subgaussian sketch. Finally, the p-sparsified sketches (El Ahmad
et al., 2022) are subgaussian with ν2 = 1/p, p ∈]0, 1].
Theorem 2 (Subgaussian sketching reconstruction error). For δ ∈ (0, 1/e], n ∈ N sufficiently large
such that 9
1+γz ≤ (cid:107)CZ(cid:107)op/2, then if
n log(n/δ) ≤ n− 1
m ≥ c4 max
(cid:16)
ν2
z n
γz +μz
1+γz , ν4
z log (1/δ)
(cid:17)
,
then with probability 1 − δ
Ez[(cid:107)( (cid:101)PZ − IHz )χ(z)(cid:107)2
Hz
] ≤ c3n− 1−γz
(1+γz )
where c3, c4 > 0 are constants independents of n, m, δ defined in the proofs.
(16)
(17)
γz +μz
1+γz ) allows to obtain a reconstruction
This theorem shows that using a sketching size m = O(n
error of order O(n− 1−γz
(1+γz ) ). Hence, depending on the regularity of the distribution (defined through
our set of assumptions), one can obtain a small reconstruction error when using a small sketching
size. For instance, if μz = γz = 1/3, one obtain a reconstruction error of order O(n−1/2) by using
a sketching size of order O(n1/2) (cid:28) O(n). As a limiting case, when μz = γz = 0, one obtain a
reconstruction error of order O(n−1) by using a constant sketching size.
4.3 SISOKR Learning Rates
For the sake of presentation, we use (cid:46) to keep only the dependencies in n, δ, ν, γ, μ. We note
a ∨ b := max(a, b).
Corollary 1 (SISOKR learning rates). Under the Assumptions of Theorems 1 and 2, if for all
y ∈ Y, (cid:107)ψ(y)(cid:107)Hy = κy, for n ∈ N sufficiently large such that 9
1+γx ≤ (cid:107)CX (cid:107)op/2,
and 9
1+γy ≤ (cid:107)CY (cid:107)op/2, and for sketching size mx, my ∈ N such that
n log(n/δ) ≤ n− 1
n log(n/δ) ≤ n− 1
mx (cid:38) max
(cid:16)
ν2
xn
γx+μx
1+γx , ν4
x log (1/δ)
(cid:17)
my (cid:38) max
(cid:18)
ν2
y n
γy +μy
1+γy , ν4
y log (1/δ)
(cid:19)
,
,
then with probability 1 − δ
and
E[(cid:107) ̃h(x) − h∗(x)(cid:107)2
Hy
1
2 (cid:46) log (4/δ) n−
]
1−γx ∨γy
2(1+γx∨γy ) ,
R( ̃f ) − R(f ∗) (cid:46) log (4/δ) n−
1−γx ∨γy
2(1+γx ∨γy ) .
(18)
(19)
(20)
(21)
Proof. Applying Theorems 1 and 2 to bound Aφ
ρx
comparison inequality from Ciliberto et al. (2020) to the loss ∆(y, y(cid:48)) = (cid:107)ψ(y) − ψ(y(cid:48))(cid:107)2
to conclude the proof for Eq. (21).
( (cid:101)PY ) gives (20). Applying the
allows
( (cid:101)PX ) and Aψ
ρy
Hy
7
Figure 1: Trade-off between Accuracy and Efficiency for a SISOKR model with (2 * 10−3)-SR input
and output sketches.
This corollary shows that under strong enough regularity assumptions, the proposed estimators
benefit from a close to optimal learning rate but only requires a small input and output sketching
sizes, leading to significant computational gain for the training and the decoding steps. For instance,
if μx = μy = γx = γy = 1/3, one obtains a learning rate of O(n−1/4) instead of the optimal
rate of O(n−3/8) under the same assumptions, but only requires sketching sizes mx, my of order
O(n1/2) (cid:28) O(n). As a limiting case, when μx = μy = γx = γy = 0, one obtains a, optimal
learning rate of O(n−1/2) by using constant sketching sizes.
Remark 1 (Related Work). Excess-risk bounds for sketched kernel ridge regression have been
provided in Rudi et al. (2015) in the case of Nyström subsampling, and scalar-valued ridge regression.
Our proofs will consist in similar derivations than in Rudi et al. (2015). Nevertheless, we cannot
apply directly their results in our setting because of the three following differences: the definition of
Rz, we consider vector-valued ridge regression, we perform sketching also on the output features.
We provided more details about this in Appendix G.
Remark 2 (Other Sketches). Although we focused on subgaussian sketches, any sketching distribution
admitting concentration bounds for operators on separable Hilbert spaces allows to bound the quantity
Aχ
( (cid:101)PZ) and is then admissible for our theoretical framework. For instance, as showed in Rudi et al.
ρz
(2015), uniform and approximate leverage scores sub-sampling schemes fit into the presented theory.
Remark 3 (Application to Least Squares Regression). This model and theoretical framework applies
to any least squares regression problem with identity separable input kernel and separable Hilbert
output space Y. It corresponds to having the linear output kernel ky(*, *) = (cid:104)*, *(cid:105)Y , and then ψ = IY .
Remark 4 (Comparison to K-satisfiability). Note that our framework significantly departs from
that of K-satisfiability (Yang et al., 2017; Chen and Yang, 2021), a popular approach to analyze
sketching in kernel methods. First, we highlight that K-satisfiability provides Gram matrix-specific
bounds (through the critical radius), while ours are expressed in terms of quantities characteristics
to the kernel. It then allows to upper bound the squared L2(Pn) error between ̃h and h∗, while our
projection point of view provides a direct control on the excess risk. Finally, it is worth noting that
our approach shows that sub-Gaussian sketches are admissible, which cannot be proven through
K-satisfiability.
5 Experiments
In this section, we present experiments on synthetic and real-world datasets. In the following, SIOKR
and ISOKR denote the models with sketching leveraged only on the inputs (respectively outputs).
We focus on uniform sub-sampling (Rudi et al., 2015) and p-SR/SG sketches (El Ahmad et al., 2022),
which are covered by our theoretical analysis. Results reported are averaged over 30 replicates, unless
for the metabolite's experiments where 5 replicates are averaged.
5.1 Synthetic Least Squares Regression
We generate a synthetic dataset of least-squares regression, with n = 10, 000 training data points,
X = Y = Hy = Rd and d = 300. We construct covariance matrices C and E by drawing randomly
their eigenvectors and such that their eigenvalues are σk(C) = k−3/2 and σk(E) = 0.2k−1/10. We
draw H0 ∈ Rd×d with i.i.d. coefficients from the standard normal distribution and set H = CH0.
8
0.050.0100.150.200.250.300.mx0.960.970.980.99MSEIOKR50100150200250my0.050.0100.150.200.250.300.mx0.00.20.400.600.81.001.20Training time (in s)50100150200250my0.050.0100.150.200.250.300.mx0.20.250.300.350.4Inference time (in s)50100150200250myTable 1: F1 score on tag prediction from text data.
Method
Bibtex
Bookmarks
SISOKR 44.1 ± 0.07
44.8 ± 0.01
ISOKR
44.7 ± 0.09
SIOKR
44.9
IOKR
37.2
LR
38.9
NN
42.2
SPEN
44.2
PRLR
44.7
DVN
39.3 ± 0.61
NA
39.1 ± 0.04
NA
30.7
33.8
34.4
34.9
37.1
Table 2: MSE and standard errors for the metabolite identification problem. SPEN directly predicts
outputs in Y, then MSE is not defined.
Method
MSE
Tanimoto-Gaussian loss
Top-1 | 5 | 10 accuracies
SISOKR 0.832 ± 0.002
0.825 ± 0.002
ISOKR
0.793 ± 0.002
SIOKR
0.780 ± 0.002
IOKR
NA
SPEN
0.597 ± 0.009
0.566 ± 0.009
0.507 ± 0.010
0.486 ± 0.008
0.537 ± 0.008
22.7% | 50.6% | 61.4%
24.2% | 53.1% | 63.5%
28.5% | 59.9% | 69.6%
29.6% | 61.6% | 71.4%
25.9% | 54.1% | 64.3%
For i ≤ n, we generate inputs xi ∼ N (0, C), noise (cid:15)i ∼ N (0, E) and outputs yi = Hxi + (cid:15)i. We
generate validation and test sets of nval = nte = 1000 points in the same way.
Such a choice of matrices C with a polynomial eigenvalue decay, E with very low eigenvalues and
eigenvalue decay, and H = CH0 allows to enforce a high eigenvalue decay for CY , since it will have
a similar eigenvalue decay as C, and favorable settings to deploy sketching, as the true regression
function H is low rank and sketching induces low-rank estimators by construction, encoded by the
sketch sizes mx and my and the projection operators (cid:101)PX and (cid:101)PY , see (9) and Proposition 2. As
stated by Corollary 1, the higher are the eigenvalue decays of CX and CY , the lower we can set mx
and my.
We used the Gaussian kernel and selected its bandwidth -as well as the regularisation penalty λ-
via 1-fold cross-validation. We learn the SISOKR model for different values of mx and my (from 10
to 295) and (2 * 10−2)-SR input and output sketches. Figure 1(a) presents test errors, measured in
terms of Mean Squared Error (MSE), for many choices of my, as a function of the sketch size mx, and
the test error of IOKR, i.e. non-sketched model. Figure 1(b) and Figure 1(c) show the corresponding
computational training and inference time. Note that for such a problem where Y = Hy, there is no
decoding step during inference. However, we perform an artificial pre-image problem to illustrate the
computational benefit from sketching during this phase in general structured prediction problems.
We observe that the MSE decreases as the sketch sizes mx and my increase, and more precisely, it
decreases faster with respect to mx than my. This might be due to the fact that we used a linear
kernel on the output space, which is only 300-dimensional, hence we benefit less from sketching the
output kernel than sketching the input Gaussian kernel, whose RKHS Hx is infinite-dimensional.
This can also explain why we obtain a degraded MSE performance compared to IOKR, while when
performing sketching solely on the input kernel, we closely reach the performance of IOKR (see
Figure 2 in Appendix H.1). Turning to training and inference times, we observe a reduction compared
to IOKR, where training takes around 0.06 to 1.3 seconds for sketch models and 16 seconds for
IOKR, and inference takes around 0.07 to 0.32 seconds for sketch models and 3.2 seconds for IOKR
Furthermore, training time decreases when mx and my decrease but is more sensitive to input sketch
size mx, while inference time decreases too when mx and my decrease but is more sensitive to output
sketch size my as expected.
5.2 Multi-Label Classification
We compare our sketched models with SOTA multi-label and structured prediction methods, namely
IOKR (Brouard et al., 2016b), logistic regression (LR) trained independently for each label (Lin et al.,
2014), a two-layer neural network with cross entropy loss (NN) (Belanger and McCallum, 2016), the
9
Table 3: Comparison of training/inference computation times (in seconds).
Data set
IOKR
SIOKR
ISOKR
SISOKR
Bibtex
Bookmarks
Metabolite
2.54 / 1.18
NA
1.96 ± 0.40 / 957 ± 28
1.99 ± 0.07 / 1.22 ± 0.03
354 ± 2.1 / 297 ± 2.1
1.56 ± 0.02 / 940 ± 28
2.51 ± 0.06 / 0.58 ± 0.01
NA
3.46 ± 0.22 / 878 ± 23
1.41 ± 0.03 / 0.46 ± 0.01
118 ± 1.5 / 20 ± 0.2
2.85 ± 0.10 / 770 ± 25
multi-label approach Posterior-Regularized Low-Rank (PRLR) (Lin et al., 2014), the energy-based
model Structured Prediction Energy Networks (SPEN) (Belanger and McCallum, 2016) and Deep
Value Networks (DVN) (Gygli et al., 2017). Results are taken from the cited articles.
Bibtex and Bookmarks (Katakis et al., 2008) are tag recommendation problems, in which the objective
is to propose a relevant set of tags (e.g. url, description, journal volume) to users when they add a new
Bookmark (webpage) or Bibtex entry to the social bookmarking system Bibsonomy. Bibtex contains
n = 4880 training points, while Bookmarks contains n = 60, 000 training points (see Table 4 for
details).
For all multi-label experiments, we used Gaussian input and output kernels with widths σ2
input
and σ2
output. We used p-SG input sketches for SIOKR models, p-SG output sketches for ISOKR
models, and uniform sub-sampling input sketches and p-SG output sketches for SISOKR models.
For Bibtex experiments, we chose p = 4 * 10−3, mx = 2, 250 and my = 200, and for Bookmarks
experiments, p = 3 * 10−4, mx = 13, 000 and my = 750. All the training data were used as
candidate sets. Performance of the algorithms are measured by example-based F1 score. We selected
the hyper-parameters λ, σ2
output in logarithmic grids by 5-fold cross-validation.
input and σ2
The results in Table 1 show than surrogate methods (first four lines) can compete with SOTA methods.
In the case of Bibtex, sketched models preserve good performance compared to IOKR while being
faster in training phase for SIOKR and SISOKR, and significantly faster in inference phase for
ISOKR and SISOKR, see Table 3. Since Bookmarks data set is too large, storing the whole n2-Gram
matrix KX exceeds CPU's space limitations. Hence, we only tested SIOKR and SISOKR models on
this data set, which outperform other methods. Note that, with the same sketch matrix Rx, SIOKR's
training phase is faster than SISOKR's one because there is not additional computations on the output
Gram matrix KY . In Table 3, SISOKR is faster during training for multi-label data set since the input
sketching used is more efficient (sub-sampling vs. p-SG).
5.3 Metabolite Identification
Identifying small molecules, called metabolites, in a biological sample is a problem of high interest
in metabolomics. Mass spectrometry is a widespread method to extract distinctive features from a
biological sample in the form of a tandem mass (MS/MS) spectrum. Given the tandem mass spectrum
of a metabolite, the objective is to predict its molecular structure. These molecular structures are
represented by binary vectors of length d = 7593, called fingerprints. Each value of this binary vector
encodes the presence or absence of a molecular property. IOKR is the SOTA method for this problem
(Brouard et al., 2016a). The data set consists in n = 6974 training mass spectrums, the median size
of the candidate sets is 292 and the largest candidate set contains 36, 918 fingerprints. Therefore,
metabolite identification is a problem with high-dimensional complex outputs, making the choice of
the output kernel crucial, a small train set and a large number of candidates, making the inference
step long.
Our numerical experimental protocol is similar to Brouard et al. (2016a) (5-CV Outer / 4-CV Inner
loops), we used probability product input kernel for mass spectra and Gaussian-Tanimoto output
kernel – with width σ2 – for the molecular fingerprints. We selected the hyper-parameters λ and
σ2 in logarithmic grids. For the sketched model, we used p-SR input sketches for SIOKR models,
p-SR output sketches for ISOKR models, and uniform sub-sampling input sketches and p-SR output
sketches for SISOKR models with p = 3 * 10−3, mx = 2, 500 and my = 300.
We compare our sketched models with IOKR and SPEN, see Table 2. Results for SPEN were taken
from Brogat-Motte et al. (2022)). Although SIOKR competes with IOKR, and ISOKR and SISOKR
compete with SPEN, we observe than IOKR outperform all methods. However, sketched models
allow training and inference time reduction, see Table 3.
10
6 Conclusion
In this paper, we scale up surrogate kernel methods for structured prediction by leveraging random
projections, in both input and output feature spaces, to accelerate training and inference phases.
We develop a theoretical study of the novel estimator and highlight the impact of input and output
sketching in the risk decomposition. We extend the existing theory on Nyström approximation and
derive the error induced by generic subgaussian sketches. Experiments on structured prediction
problems confirm the advantages of the approach. If this paper focuses on the kernel-induced
square loss and the ridge estimator, note that output sketching can be applied to other kernelized
non-parametric estimators.
Acknowledgements
This work was supported by the Télécom Paris research chair on Data Science and Artificial Intelli-
gence for Digitalized Industry and Services (DSAIDIS).
References
Alaoui, A. and Mahoney, M. W. (2015). Fast randomized kernel ridge regression with statistical
guarantees. In Cortes, C., Lawrence, N., Lee, D., Sugiyama, M., and Garnett, R., editors, Advances
in Neural Information Processing Systems (NeurIPS), volume 28.
Bach, F. (2013). Sharp analysis of low-rank kernel matrix approximations. In Proc. of the 26th
annual Conference on Learning Theory, pages 185–209. PMLR.
Bakir, G., Hofmann, T., Smola, A. J., Schölkopf, B., and Taskar, B. (2007). Predicting structured
data. The MIT Press.
Bauer, F., Pereverzev, S., and Rosasco, L. (2007). On regularization algorithms in learning theory.
Journal of Complexity, 23(1):52–72.
Belanger, D. and McCallum, A. (2016). Structured prediction energy networks. In International
Conference on Machine Learning, pages 983–992.
Berthet, Q., Blondel, M., Teboul, O., Cuturi, M., Vert, J.-P., and Bach, F. (2020). Learning with
differentiable perturbed optimizers.
Blanchard, G., Bousquet, O., and Zwald, L. (2007). Statistical properties of kernel principal
component analysis. Machine Learning, 66(2):259–294.
Borgwardt, K., Ghisu, E., Llinares-López, F., O'Bray, L., and Rieck, B. (2020). Graph kernels: State-
of-the-art and future challenges. Foundations and Trends in Machine Learning, 13(5-6):531–712.
Brault, R., Heinonen, M., and Buc, F. (2016). Random fourier features for operator-valued kernels.
In Asian Conference on Machine Learning, pages 110–125. PMLR.
Brogat-Motte, L., Rudi, A., Brouard, C., Rousu, J., and d'Alché Buc, F. (2022). Vector-valued least-
squares regression under output regularity assumptions. Journal of Machine Learning Research,
23(344):1–50.
Brouard, C., d'Alché-Buc, F., and Szafranski, M. (2011). Semi-supervised penalized output kernel
regression for link prediction. In International Conference on Machine Learning (ICML), pages
593–600.
Brouard, C., Shen, H., Dührkop, K., d'Alché-Buc, F., Böcker, S., and Rousu, J. (2016a). Fast
metabolite identification with input output kernel regression. Bioinformatics, 32(12):28–36.
Brouard, C., Szafranski, M., and D'Alché-Buc, F. (2016b). Input output kernel regression: supervised
and semi-supervised structured output prediction with operator-valued kernels. The Journal of
Machine Learning Research, 17(1):6105–6152.
11
Cabannes, V. A., Bach, F., and Rudi, A. (2021). Fast rates for structured prediction. In conference on
learning theory, pages 823–865. PMLR.
Caponnetto, A. and De Vito, E. (2007). Optimal rates for the regularized least-squares algorithm.
Foundations of Computational Mathematics, 7(3):331–368.
Carmeli, C., De Vito, E., and Toigo, A. (2006). Vector valued reproducing kernel hilbert spaces of
integrable functions and mercer theorem. Analysis and Applications, 4(04):377–408.
Carmeli, C., De Vito, E., Toigo, A., and Umanitá, V. (2010). Vector valued reproducing kernel hilbert
spaces and universality. Analysis and Applications, 8(01):19–61.
Chatalic, A., Carratino, L., De Vito, E., and Rosasco, L. (2022a). Mean nyström embeddings
for adaptive compressive learning. In Camps-Valls, G., Ruiz, F. J. R., and Valera, I., editors,
Proceedings of The 25th International Conference on Artificial Intelligence and Statistics, volume
151 of Proceedings of Machine Learning Research, pages 9869–9889. PMLR.
Chatalic, A., Schreuder, N., Rosasco, L., and Rudi, A. (2022b). Nyström kernel mean embeddings. In
Chaudhuri, K., Jegelka, S., Song, L., Szepesvari, C., Niu, G., and Sabato, S., editors, Proceedings
of the 39th International Conference on Machine Learning, volume 162 of Proceedings of Machine
Learning Research, pages 3006–3024. PMLR.
Chen, Y. and Yang, Y. (2021). Accumulations of projections-a unified framework for random
sketches in kernel ridge regression. In International Conference on Artificial Intelligence and
Statistics, pages 2953–2961. PMLR.
Ciliberto, C., Rosasco, L., and Rudi, A. (2016). A consistent regularization approach for structured
prediction. In Advances in Neural Information Processing Systems (NIPS) 29, pages 4412–4420.
Ciliberto, C., Rosasco, L., and Rudi, A. (2020). A general framework for consistent structured
prediction with implicit loss embeddings. J. Mach. Learn. Res., 21(98):1–67.
Collins, M. and Duffy, N. (2001). Convolution kernels for natural language. Advances in neural
information processing systems, 14.
Cortes, C., Mohri, M., and Weston, J. (2005). A general regression technique for learning transduc-
tions. In International Conference on Machine Learning (ICML), pages 153–160.
Defferrard, M., Bresson, X., and Vandergheynst, P. (2016). Convolutional neural networks on graphs
with fast localized spectral filtering. Advances in neural information processing systems, 29.
Deshwal, A., Doppa, J. R., and Roth, D. (2019). Learning and inference for structured prediction:
A unifying perspective. In Proceedings of the Twenty-Eighth International Joint Conference on
Artificial Intelligence (IJCAI-19).
El Ahmad, T., Laforgue, P., and d'Alché-Buc, F. (2022). p-sparsified sketches for fast multiple output
kernel methods.
Fischer, S. and Steinwart, I. (2020). Sobolev norm learning rates for regularized least-squares
algorithms. J. Mach. Learn. Res., 21:205–1.
Gärtner, T. (2008). Kernels for Structured Data, volume 72 of Series in Machine Perception and
Artificial Intelligence. WorldScientific.
Geurts, P., Wehenkel, L., and d'Alché Buc, F. (2006). Kernelizing the output of tree-based methods.
In Proceedings of the 23rd International Conference on Machine Learning, ICML '06, page
345–352, New York, NY, USA. Association for Computing Machinery.
Grünewälder, S., Lever, G., Baldassarre, L., Patterson, S., Gretton, A., and Pontil, M. (2012).
Conditional mean embeddings as regressors. In Proceedings of the 29th International Coference
on International Conference on Machine Learning, pages 1803–1810.
Gygli, M., Norouzi, M., and Angelova, A. (2017). Deep value networks learn to evaluate and
iteratively refine structured outputs. In Proceedings of the 34th International Conference on
Machine Learning - Volume 70, ICML'17, page 1341–1351. JMLR.org.
12
Katakis, I., Tsoumakas, G., and Vlahavas, I. (2008). Multilabel text classification for automated tag
suggestion. In Proceedings of the ECML/PKDD, volume 18, page 5. Citeseer.
Koltchinskii, V. and Lounici, K. (2017). Concentration inequalities and moment bounds for sample
covariance operators. Bernoulli, 23(1):110 – 133.
Kpotufe, S. and Sriperumbudur, B. K. (2020). Gaussian sketching yields a J-L lemma in RKHS. In
Chiappa, S. and Calandra, R., editors, AISTATS 2020, volume 108 of Proceedings of Machine
Learning Research, pages 3928–3937. PMLR.
Lacotte, J. and Pilanci, M. (2020). Adaptive and oblivious randomized subspace methods for high-
dimensional optimization: Sharp analysis and lower bounds. arXiv preprint arXiv:2012.07054.
LeCun, Y., Chopra, S., Ranzato, M., and Huang, F.-J. (2007). Energy-based models in document
recognition and computer vision. In Ninth International Conference on Document Analysis and
Recognition (ICDAR 2007), volume 1, pages 337–341. IEEE.
Li, Z., Ton, J.-F., Oglic, D., and Sejdinovic, D. (2021). Towards a unified analysis of random fourier
features. Journal of Machine Learning Research, 22(108):1–51.
Lin, X. V., Singh, S., He, L., Taskar, B., and Zettlemoyer, L. (2014). Multi-label learning with
posterior regularization.
Long, J., Shelhamer, E., and Darrell, T. (2015). Fully convolutional networks for semantic segmenta-
tion. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages
3431–3440.
Mahoney, M. W. et al. (2011). Randomized algorithms for matrices and data. Foundations and
Trends® in Machine Learning, 3(2):123–224.
Meanti, G., Carratino, L., Rosasco, L., and Rudi, A. (2020). Kernel methods through the roof:
Handling billions of points efficiently. Advances in Neural Information Processing Systems
(NeurIPS), 33.
Micchelli, C. A. and Pontil, M. (2005). On learning vector-valued functions. Neural computation,
17(1):177–204.
Niculae, V., Martins, A., Blondel, M., and Cardie, C. (2018). Sparsemap: Differentiable sparse
structured inference. In International Conference on Machine Learning (ICML), pages 3799–3808.
PMLR.
Nowak, A., Bach, F., and Rudi, A. (2019). Sharp analysis of learning with discrete losses. In Chaud-
huri, K. and Sugiyama, M., editors, Proceedings of the Twenty-Second International Conference
on Artificial Intelligence and Statistics (AISTATS), volume 89 of Proceedings of Machine Learning
Research, pages 1920–1929.
Nowozin, S. and Lampert, C. H. (2011). Structured learning and prediction in computer vision.
Foundations and Trends in Computer Graphics and Vision, 6(3-4):185–365.
Osokin, A., Bach, F. R., and Lacoste-Julien, S. (2017). On structured prediction theory with calibrated
convex surrogate losses. In Guyon, I., von Luxburg, U., Bengio, S., Wallach, H. M., Fergus, R.,
Vishwanathan, S. V. N., and Garnett, R., editors, Advances in Neural Information Processing
Systems (NeurIPS) 30:, pages 302–313.
Pillaud-Vivien, L., Rudi, A., and Bach, F. (2018). Statistical optimality of stochastic gradient descent
on hard learning problems through multiple passes. Advances in Neural Information Processing
Systems, 31.
Rahimi, A. and Recht, B. (2007). Random features for large scale kernel machines. NIPS, 20:1177–
1184.
Rudi, A., Camoriano, R., and Rosasco, L. (2015). Less is more: Nyström computational regularization.
Advances in Neural Information Processing Systems, 28.
13
Rudi, A., Canas, G. D., and Rosasco, L. (2013). On the sample complexity of subspace learning. In
Advances in Neural Information Processing Systems, pages 2067–2075.
Rudi, A. and Rosasco, L. (2017). Generalization properties of learning with random features. In
Advances on Neural Information Processing Systems (NeurIPS), pages 3215–3225.
Senkene, E. and Tempel'man, A. (1973). Hilbert spaces of operator-valued functions. Lithuanian
Mathematical Journal, 13(4):665–670.
Smale, S. and Zhou, D.-X. (2007). Learning theory estimates via integral operators and their
approximations. Constructive Approximation, 26:153–172.
Steinwart, I., Hush, D. R., Scovel, C., et al. (2009). Optimal rates for regularized least squares
regression. In COLT, pages 79–93.
Sterge, N. and Sriperumbudur, B. K. (2022). Statistical optimality and computational efficiency of
nystrom kernel pca. Journal of Machine Learning Research, 23(337):1–32.
Tsochantaridis, I., Joachims, T., Hofmann, T., and Altun, Y. (2005). Large margin methods for
structured and interdependent output variables. Journal of machine learning research, 6(Sep):1453–
1484.
Weston, J., Chapelle, O., Vapnik, V., Elisseeff, A., and Schölkopf, B. (2003). Kernel dependency
estimation. In Becker, S., Thrun, S., and Obermayer, K., editors, Advances in Neural Information
Processing Systems 15, pages 897–904. MIT Press.
Williams, C. and Seeger, M. (2001). Using the nyström method to speed up kernel machines. In
Leen, T., Dietterich, T., and Tresp, V., editors, Advances in Neural Information Processing Systems,
volume 13, pages 682–688. MIT Press.
Woodruff, D. P. (2014). Sketching as a tool for numerical linear algebra. Found. Trends Theor.
Comput. Sci., 10(1-2):1–157.
Yang, T., Li, Y.-f., Mahdavi, M., Jin, R., and Zhou, Z.-H. (2012). Nyström method vs random fourier
features: A theoretical and empirical comparison. In Pereira, F., Burges, C. J. C., Bottou, L.,
and Weinberger, K. Q., editors, Advances in Neural Information Processing Systems, volume 25.
Curran Associates, Inc.
Yang, Y., Pilanci, M., Wainwright, M. J., et al. (2017). Randomized sketches for kernels: Fast and
optimal nonparametric regression. The Annals of Statistics, 45(3):991–1023.
14
A Notation and definitions
In this section, we remind some important notations and definitions.
In the following, we consider X and Y to be Polish spaces. We denote by ρ the unknown
Setting.
data distribution on X × Y. We denote by ρX and ρY the marginal distributions of the inputs and
outputs, respectively.
For an operator A, A# denotes its adjoint, σmax(A) its largest eigen-
Linear algebra notations.
value and σk(A) its kth largest eigenvalue (if A admits an eigendecomposition). Let B (E) be the
space of bounded linear operators in a separable Hilbert space E, given positive semi-definite op-
erators A, B ∈ B (E), A (cid:22) B if B − A is positive semidefinite. For any t > 0 and A : E → E,
At = A + tIE. Let M be a matrix, Mi: denotes its ith row and M:j its jth column, and M † denotes
its Moore-Penrose inverse.
Notation for simplified bounds.
In order to keep the dependencies of a bound only in the parame-
ters of interest, for a, b ∈ R we note a (cid:46) b as soon as there exists a constant c > 0 independents of
the parameters of interest such that a ≤ c × b.
Least-squares notations.
as
For any function h : X → Hy, we define its least-squares expected risk
(22)
The measurable minimizer of E is given by h∗ (x) = Eρ(y|x) [ψ (y)] (Ciliberto et al., 2020, Lemma
A.2).
Hy
.
(cid:107)h (x) − ψ (y)(cid:107)2
E (h) = Eρ
(cid:104)
(cid:105)
RKHS notations. We denote by Hx and Hy the RKHSs associated to the input kx : X × X → R
and output ky : Y × Y → R kernels, respectively. We denote by φ : X → Hx and ψ : Y → Hy
the canonical feature maps φ(x) = kx(x, .) and ψ(y) = ky(y, .), respectively. We denote by H the
vv-RKHS associated to the operator-valued kernel K = kIHy . We denote ˆh ∈ H the KRR estimator
trained with n couples (xi, yi)n
i=1 i.i.d. from ρ.
Kernel ridge operators. We define the following operators.
• S : f ∈ Hx (cid:55)→ (cid:104)f, φ(*)(cid:105)Hx ∈ L2 (X , ρX )
• T : f ∈ Hy (cid:55)→ (cid:104)f, h∗(*)(cid:105)Hy ∈ L2 (X , ρX )
• CX = Ex [φ(x) ⊗ φ(x)] and CY = Ey [ψ(y) ⊗ ψ(y)],
• SX : f ∈ Hx (cid:55)→ 1√
• S#
X : α ∈ Rn (cid:55)→ 1√
n
• SY : f ∈ Hy (cid:55)→ 1√
• S#
Y : α ∈ Rn (cid:55)→ 1√
n (f (x1) , . . . , f (xn))(cid:62) ∈ Rn,
(cid:80)n
i=1 αiφ(xi) ∈ Hx,
n (f (y1) , . . . , f (yn))(cid:62) ∈ Rn,
i=1 αiψ(yi) ∈ Hx,
(cid:80)n
n
Sketching operators.
• We denote Rx ∈ Rmx×n and Ry ∈ Rmy×n the input and output sketch matrices with
mx < n and my < n,
X R(cid:62)
• (cid:101)CX = S#
• (cid:101)KX = RxKX R(cid:62)
x RxSX and (cid:101)CY = S#
Y R(cid:62)
x and (cid:101)KY = RyKY R(cid:62)
y .
y RySY ,
B Preliminary results
In this section, we present useful preliminary results about kernel ridge operators and sketching
properties, as well as the proof Proposition 1 that give the expressions of the SISOKR estimator.
15
Useful kernel ridge operators properties.
The following results hold true.
(cid:80)n
• (cid:98)CX = 1
n
• KX = nSX S#
• Under the attainability assumption Ciliberto et al. (2020, Lemma B.2, B.4, B.9) show that:
i=1 φ(xi) ⊗ φ(xi) = S#
X SX and (cid:98)CY = 1
n
X and KY = nSY S#
Y ,
i=1 ψ(yi) ⊗ ψ(yi) = S#
Y SY ,
(cid:80)n
(cid:4) For all x ∈ X , ˆh(x) = (cid:98)Hφ(x), where (cid:98)H = S#
(cid:4) H = T (cid:93)SC †.
(cid:4) E[(cid:107)ˆh(x) − h∗(x)(cid:107)2]1/2 = (cid:107)( (cid:98)H − H)S#(cid:107)HS.
Y SX (cid:98)C −1
Xλ.
Useful sketching properties. We remind some useful notations and provide the expression of (cid:101)PZ,
leading to the expression of the SISOKR estimator.
(cid:101)PZ expression. Let
be the eigenpairs of (cid:101)KZ ranked in the descending
order of eigenvalues, pz = rank
(cid:101)KZ
, and for all 1 ≤ i ≤ pz, ̃ez
i =
(cid:113) n
σi( (cid:101)KZ )
S#
Z R(cid:62)
z ̃vz
i .
(cid:110)(cid:16)
σi( (cid:101)KZ), ̃vz
i
(cid:17)
, i ∈ [mz]
(cid:17)
(cid:16)
(cid:111)
Proposition 2. The ̃ez
Furthermore, let (cid:101)Hz = span (cid:0) ̃ez
i s are the eigenfunctions, associated to the eigenvalues σi( (cid:101)KZ)/n of (cid:101)CZ.
1, . . . , ̃ez
pz
(cid:1), the orthogonal projector (cid:101)PZ onto (cid:101)Hz writes as
RzSZ .
(cid:101)PZ = (RzSZ)# (cid:0)RzSZ(RzSZ)#(cid:1)†
(23)
(24)
(25)
(26)
(27)
(28)
(29)
(30)
(31)
(32)
Proof. For 1 ≤ i ≤ pz
(cid:101)CZ ̃ez
i = S#
Z R(cid:62)
z RzSZ
(cid:32)(cid:115) n
(cid:33)
S#
Z R(cid:62)
z ̃vz
i
σi( (cid:101)KZ)
(cid:18) 1
n
(cid:101)KZ
(cid:19)
̃vz
i
S#
Z R(cid:62)
z σi( (cid:101)KZ) ̃vz
i
(cid:115) n
=
S#
Z R(cid:62)
z
σi( (cid:101)KZ)
1
nσi( (cid:101)KZ)
=
(cid:113)
=
Moreover, we verify that span (cid:0) ̃ez
̃ez
i .
(cid:1) forms an orthonormal basis. Let 1 ≤ i, j ≤ pz,
(cid:10) ̃ez
i , ̃ez
j
(cid:11)
=
Hx
S#
Z R(cid:62)
z ̃vz
i ,
(cid:115) n
σj( (cid:101)KZ)
S#
Z R(cid:62)
z ̃vz
j
(cid:43)
Hz
σi( (cid:101)KZ)
n
1, . . . , ̃ez
pz
(cid:42)(cid:115) n
σi( (cid:101)KZ)
n
=
(cid:113)
=
(cid:113)
=
(cid:113)
̃vz(cid:62)
i RzSZS#
Z R(cid:62)
z ̃vz
j
̃vz(cid:62)
i
(cid:18) 1
n
(cid:19)
̃vz
j
(cid:101)KZ
σi( (cid:101)KZ)σj( (cid:101)KZ)
n
σi( (cid:101)KZ)σj( (cid:101)KZ)
σj( (cid:101)KZ)
̃vz(cid:62)
i ̃vz
j
σi( (cid:101)KZ)σj( (cid:101)KZ)
where δij = 0 if i (cid:54)= j, and 1 otherwise.
= δij ,
Finally,
it
(cid:101)PZ : f ∈ Hz (cid:55)→ (cid:80)pz
is easy to check that
i=1 (cid:104)f, ̃ez
(cid:101)PZ = nS#
i (cid:105)Hz
Z R(cid:62)
̃ez
i rewrites as
ZRzSZ = (RzSZ)# (cid:0)RzSZ(RzSZ)#(cid:1)†
z (cid:101)K †
the orthogonal projector onto span (cid:0) ̃ez
1, . . . , ̃ez
pz
(cid:1),
i.e.
RzSZ .
(33)
16
Remark 5. With Rx a sub-sampling matrix, we recover the linear operator Lm introduced in Yang
et al. (2012) for the study of Nyström approximation and its eigendecomposition. Moreover, we also
recover the projection operator Pm from Rudi et al. (2015) and follow the footsteps of the proposed
extension "Nyström with sketching matrices".
Algorithm. We here give the proof of Proposition 1 that provides an expression of the SISOKR
estimator ̃h as a linear combination of the ψ(yi)s.
Proof. Recall that ̃h(x) = (cid:101)PY S#
(37), we obtain that
Y SX (cid:101)PX ( (cid:101)PX S#
X SX (cid:101)PX +λIHx )−1φ(x). By Lemma 1 and especially
√
̃h(x) =
n (cid:101)PY S#
Y KX R(cid:62)
x
(cid:0)RxK 2
x + nλRxKX R(cid:62)
x
(cid:1)†
RxSX φ(x) .
(34)
X R(cid:62)
(cid:0)RxK 2
X R(cid:62)
x + nλRxKX R(cid:62)
x
(cid:1)†
RxSX φ(x), we have
Finally, by Lemma 2 and with α(x) = KX R(cid:62)
x
that ̃h (x) = (cid:80)n
i=1 ̃αi (x) ψ (yi) where
̃α (x) = R(cid:62)
y (cid:101)K †
Y RyKY KX R(cid:62)
x (RxK 2
X R(cid:62)
x + nλ (cid:101)KX )†Rxκx
X .
(35)
Before stating and proving Lemmas 1 and 2, and similarly to Rudi et al. (2015), let RxSX = U ΣV #
be the SVD of RxSX where U : Rpx → Rmx , Σ : Rpx → Rpx , V : Rpx → Hx, and Σ =
diag(σ1(RxSX ), . . . , σpx (RxSX )) with σ1(RxSX ) ≥ . . . ≥ σpx (RxSX ) > 0, U U (cid:62) = Ipx and
V #V = Ipx . We are now ready to prove the following lemma for the expansion induced by input
sketching.
Lemma 1. Let (cid:101)H = (cid:101)PY S#
true
X SX (cid:101)PX + λIHx )−1. The following two expansions hold
Y SX (cid:101)PX ( (cid:101)PX S#
(cid:101)H = (cid:101)PY S#
Y SX ̃η( (cid:98)CX ) ,
where ̃η( (cid:98)CX ) = V (V # ˆCX V + λIHx )−1V # and for algorithmic purposes
Y KX R(cid:62)
x + nλRxKX R(cid:62)
x
(cid:0)RxK 2
n (cid:101)PY S#
X R(cid:62)
(cid:101)H =
√
(cid:1)†
x
RxSX .
Proof. Let us prove (36) first.
̃H = (cid:101)PY S#
= (cid:101)PY S#
= (cid:101)PY S#
= (cid:101)PY S#
X SX (cid:101)PX + λIHx)−1
Y SX (cid:101)PX ( (cid:101)PX S#
Y SX V V #(V V #S#
Y SX V (V # ˆCX V + λIHx)−1V #
Y SX ̃η( (cid:98)CX ) ,
X SX V V # + λIHx )−1
using the so-called push-through identity (I + U V )−1U = U (I + V U )−1.
Now, we focus on proving (37). First, we have that
̃H = (cid:101)PY S#
Y SX V (V # ˆCXλV )†V # .
(36)
(37)
(38)
(39)
(40)
(41)
(42)
Then, using the fact that U has orthonormal columns, U (cid:62) has orthonormal rows and Σ is a full-rank
matrix, together with the fact that U U (cid:62) = Ipx and V #V = Ipx, we have that,
Y SX V ΣU (cid:62) (cid:16)
U ΣV # (cid:98)CXλV ΣU (cid:62)(cid:17)†
̃H = (cid:101)PY S#
U ΣV # .
(43)
Then, since RxSX = U ΣV #,
̃H = (cid:101)PY S#
Y SX (RxSX )# (cid:16)
RxSX
(cid:16)
(cid:98)CX + λIHx
(cid:17)
(RxSX )#(cid:17)†
RxSX .
Finally, using the fact that (cid:98)CX = S#
X SX and KX = nSX S#
X , we obtain that
√
(cid:101)H =
n (cid:101)PY S#
Y KX R(cid:62)
x
(cid:0)RxK 2
X R(cid:62)
x + nλRxKX R(cid:62)
x
(cid:1)†
RxSX .
17
(44)
(45)
Now we state and prove the lemma for the expansion induced by output sketching.
Lemma 2. For all x ∈ X , for any h ∈ H that writes as h(x) =
then h(x) = (cid:80)n
Y RyKY α(x)ψ(yi).
i=1 R(cid:62)
y (cid:101)K †
√
n (cid:101)PY S#
Y α(x) with α : X → Rn,
Proof.
h(x) =
=
=
=
√
√
n (cid:101)PY S#
nS#
Y R(cid:62)
Y R(cid:62)
Y α(x)
y (cid:101)K †
y (cid:101)K †
√
nS#
n
(cid:88)
(cid:16)
nSY S#
Y
(cid:17)
α(x)
Y Ry
Y RyKY α(x)
R(cid:62)
y (cid:101)K †
Y RyKY α(x)ψ(yi) .
(46)
(47)
(48)
(49)
i=1
C SISOKR excess-risk bound
In this section, we provide the proof of Theorem 1 which gives a bound on the excess-risk of the
proposed approximated regression estimator with both input and output sketching (SISOKR).
Theorem 1 (SISOKR excess-risk bound). Let δ ∈ [0, 1], n ∈ N sufficiently large such that λ =
n−1/(1+γx) ≥ 9κ2
δ ). Under our set of assumptions, the following holds with probability at
least 1 − δ
n log( n
x
E[(cid:107) ̃h(x) − h∗(x)(cid:107)2
Hy
]
1
2 ≤ S(n) + c2Aφ
ρx
( (cid:101)PX ) + Aψ
ρy
( (cid:101)PY )
where
S(n) = c1 log(4/δ)n− 1
Aχ
ρz
( (cid:101)PZ) = Ez[(cid:107)( (cid:101)PZ − IHz )χ(z)(cid:107)2
Hz
2(1+γx )
(regression error)
1
2 (sketch. error)
]
and c1, c2 > 0 are constants independent of n and δ defined in the proofs.
Proof. Our proofs consists in decompositions and then applying the probabilistic bounds given in
Section E.
We have
E[(cid:107) ̃h(x) − h∗(x)(cid:107)2]1/2 = (cid:107)( ̃H − H)S#(cid:107)HS
(50)
with ̃H = (cid:101)PY S#
Y SX ̃η( (cid:98)CX ).
Then, defining Hλ = HCX (CX + λI)−1, we decompose
̃H − H = (cid:101)PY
(cid:16)
S#
Y SX − Hλ (cid:98)CX
(cid:17)
̃η( (cid:98)CX ) + (cid:101)PY Hλ
(cid:16)
(cid:98)CX ̃η( (cid:98)CX ) − IHx
(cid:17)
(cid:16)
+
(cid:101)PY Hλ − H
(cid:17)
(51)
such that
with
(cid:107)( ̃H − H)S#(cid:107)HS ≤ (A) + (B) + (C)
(A) =
(B) =
(C) =
(cid:17)
(cid:16)
S#
Y SX − Hλ (cid:98)CX
(cid:16)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)Hλ
(cid:13)
(cid:13)( (cid:101)PY Hλ − H)C 1/2
(cid:13)
X
(cid:98)CX ̃η( (cid:98)CX ) − IHx
(cid:13)
(cid:13)
(cid:13)HS
(cid:13)
(cid:13)
(cid:13)HS
̃η( (cid:98)CX )C 1/2
X
(cid:13)
(cid:13)
(cid:13)HS
C 1/2
X
(cid:17)
18
(52)
(53)
(54)
Then, from Lemmas 3 to 5, we obtain
(cid:107)( ̃H − H)S#(cid:107)HS ≤ 2
√
3M log(4/δ)n− 1
2(1+γx) + 2
√
3(cid:107)H(cid:107)HS(cid:107)(I − (cid:101)PX )C 1/2
X (cid:107)op + Ey
(cid:20)(cid:13)
(cid:16)
(cid:13)
(cid:13)
(cid:17)
(cid:101)PY − IHy
ψ(y)
(cid:13)
2
(cid:13)
(cid:13)
Hy
(cid:21)1/2
.
Then, notice that
(cid:107)(I − (cid:101)PX )C 1/2
X (cid:107)op ≤ (cid:107)(I − (cid:101)PX )C 1/2
(cid:20)(cid:13)
(cid:16)
(cid:13)
(cid:13)
= Ex
(cid:101)PX − IHx
X (cid:107)HS
(cid:17)
We conclude by defining
φ(x)
(cid:13)
2
(cid:13)
(cid:13)
Hx
√
√
c1 = 2
c2 = 2
3M,
3(cid:107)H(cid:107)HS.
(cid:21)1/2
.
(55)
(56)
(57)
(58)
(59)
Lemma 3 (Bound (A)). Let δ ∈ [0, 1], n ∈ N sufficiently large such that λ = n−1/(1+γ) ≥
9κ2
n log( n
x ) Under our set of assumptions, the following holds with probability at least 1 − δ
x
(A) ≤ 2M log(4/δ)n− 1
2(1+γx ) .
where the constant M depends on κy, (cid:107)H(cid:107)HS, δ.
Proof. We have
(A) ≤
(cid:16)
(cid:13)
(cid:13)
(cid:13)
(cid:124)
S#
Y SX − Hλ (cid:98)CX
(cid:17)
C −1/2
Xλ
(cid:123)(cid:122)
(A.1)
(cid:13)
(cid:13)
(cid:13)HS
(cid:125)
Moreover, we have
× (cid:107)C 1/2
(cid:124)
Xλ ̃η( (cid:98)CX )C 1/2
(cid:123)(cid:122)
(A.2)
X (cid:107)op
(cid:125)
(A.2) ≤ (cid:107) (cid:98)C 1/2
≤ (cid:107) (cid:98)C 1/2
Xλ ̃η( (cid:98)CX ) (cid:98)C 1/2
Xλ ̃η( (cid:98)CX ) (cid:98)C 1/2
Xλ (cid:107)op(cid:107) (cid:98)C −1/2
Xλ (cid:107)op(cid:107) (cid:98)C −1/2
Xλ C 1/2
Xλ C 1/2
Xλ (cid:107)2
Xλ (cid:107)2
op
op(cid:107)C −1/2
Xλ C 1/2
X (cid:107)op
because (cid:107)C −1/2
Finally, by using the probabilistic bounds given in Lemmas 8 and 9, and Lemma 13, we obtain
Xλ C 1/2
X (cid:107)op ≤ 1.
(A) ≤ 2M log(4/δ)n− 1
2(1+γx ) .
Lemma 4 (Bound (B)). If 9
n log n
δ ≤ λ ≤ (cid:107)C(cid:107)op, then with probability 1 − δ
√
3(cid:107)H(cid:107)HS(λ1/2 + (cid:107)(I − (cid:101)PX )C 1/2
X (cid:107)op)
(B) ≤ 2
Proof. We do a similar decomposition than in Rudi et al. (2015, Theorem 2):
(cid:98)CX ̃η( (cid:98)CX ) − IHx = (cid:98)CXλ ̃η( (cid:98)CX ) − λ ̃η( (cid:98)CX ) − IHx
= (I − (cid:101)PX ) (cid:98)CXλ ̃η( (cid:98)CX ) + (cid:101)PX (cid:98)CXλ ̃η( (cid:98)CX ) − λ ̃η( (cid:98)CX ) − IHx
= (I − (cid:101)PX ) (cid:98)CXλ ̃η( (cid:98)CX ) − λ ̃η( (cid:98)CX ) − ( (cid:101)PX − IHx ),
as (cid:101)PX (cid:98)CXλ ̃η( (cid:98)CX ) = (cid:101)PX .
19
(60)
(61)
(62)
(63)
(64)
(65)
(66)
(67)
(68)
Then, we have
(B) ≤ (cid:107)Hλ(cid:107)HS
≤ (cid:107)Hλ(cid:107)HS
But,
And,
(cid:13)
(cid:13)
(cid:13)
(cid:16)
(cid:16)
(cid:17)
(cid:98)CX ̃η( (cid:98)CX ) − IHx
(cid:13)
(cid:13)
(cid:13)op
X (cid:107)op + λ(cid:107) ̃η( (cid:98)CX )C 1/2
(cid:107)(I − (cid:101)PX ) (cid:98)CXλ ̃η( (cid:98)CX )C 1/2
C 1/2
X
X (cid:107)op + (cid:107)( (cid:101)PX − IHx )C 1/2
X (cid:107)op
(69)
(cid:17)
Xλ − IHx
(cid:107)Hλ(cid:107)HS ≤ (cid:13)
= (cid:13)
= λ (cid:13)
(cid:13)HC −1
Xλ
≤ 2(cid:107)H(cid:107)HS.
(cid:13)H (cid:0)CX C −1
(cid:13)H (CX − CXλ) C −1
Xλ
(cid:13)
(cid:13)HS + (cid:107)H(cid:107)HS
(cid:1)(cid:13)
(cid:13)HS + (cid:107)H(cid:107)HS
(cid:13)
(cid:13)HS + (cid:107)H(cid:107)HS
(70)
(71)
(72)
(73)
(74)
(cid:107)(I − (cid:101)PX ) (cid:98)CXλ ̃η( (cid:98)CX )C 1/2
X (cid:107)op ≤ (cid:107)(I − (cid:101)PX ) (cid:98)C 1/2
Xλ (cid:107)op(cid:107) (cid:98)C 1/2
Xλ ̃η( (cid:98)CX ) (cid:98)C 1/2
Xλ (cid:107)op(cid:107) (cid:98)C −1/2
Xλ C 1/2
X (cid:107)op.
(75)
And,
And,
(cid:107)(I − (cid:101)PX ) (cid:98)C 1/2
Xλ (cid:107)op ≤ (cid:107)(I − (cid:101)PX )C 1/2
Xλ (cid:107)op(cid:107)C −1/2
Xλ (cid:98)C 1/2
Xλ (cid:107)op.
(cid:107)(I − (cid:101)PX )C 1/2
Xλ (cid:107)op ≤ (cid:107)(I − (cid:101)PX )C 1/2
X (cid:107)op + λ1/2.
Moreover,
(cid:13)
(cid:13)
(cid:13)λ ̃η
(cid:16)
(cid:98)CX
(cid:17)
C 1/2
X
(cid:13)
(cid:13)
(cid:13)op
Xλ
(cid:13)
(cid:13)
(cid:13)
(cid:13) (cid:98)C 1/2
(cid:13) (cid:98)C −1/2
(cid:13)
(cid:13)
(cid:13)
Xλ ̃η
≤ λ
(cid:13)op
≤ λ1/2 (cid:13)
(cid:17)
(cid:16)
(cid:13) (cid:98)C 1/2
(cid:13)
Xλ ̃η
(cid:98)CX
(cid:16)
(cid:17)
(cid:98)CX
(cid:13)
(cid:13)
(cid:13)op
Xλ
(cid:13)
(cid:98)C 1/2
(cid:13)
(cid:13)op
(cid:13)
Xλ C 1/2
(cid:13) (cid:98)C −1/2
(cid:13)
(cid:13)
Xλ C 1/2
(cid:13) (cid:98)C −1/2
(cid:13)
(cid:13)
(cid:13)
(cid:13)op
Xλ
Xλ
.
(cid:13)
(cid:13)
(cid:13)op
(cid:13)
(cid:13)C −1/2
(cid:13)
Xλ C 1/2
X
(cid:98)C 1/2
Xλ
(76)
(77)
(cid:13)
(cid:13)
(cid:13)op
Conclusion. Using the probabilistic bounds given in Lemmas 9, 10, and Lemma 13, we obtain
√
(B) ≤ 4
3(cid:107)H(cid:107)HS(λ1/2 + (cid:107)(I − (cid:101)PX )C 1/2
X (cid:107)op)
Lemma 5 (Bound (C)). We have
(cid:20)(cid:13)
(cid:16)
(cid:13)
(cid:13)
(C) ≤ Ey
(cid:101)PY − IHy
(cid:21)1/2
(cid:17)
ψ(y)
(cid:13)
2
(cid:13)
(cid:13)
Hy
+ λ1/2 (cid:107)H(cid:107)HS .
Proof. We have
(C) =
(cid:13)
Xλ) − H)C 1/2
(cid:13)( (cid:101)PY H(IHx − λC −1
(cid:13)
(cid:13)
(cid:13)
(cid:13)( (cid:101)PY − IHy )HC 1/2
(cid:13)
(cid:13)
(cid:13)HS
= E[(cid:107)( (cid:101)PY − IHy )h∗(x)(cid:107)2
Hy
≤
X
X
+ λ1/2 (cid:107)H(cid:107)HS
]1/2 + λ1/2 (cid:107)H(cid:107)HS .
(cid:13)
(cid:13)
(cid:13)HS
(82)
We conclude the proof as follows. Using the fact that h∗ (x) = Eρ(y|x) [ψ (y)], the linearity of
(cid:101)PY − IHy and the convexity of (cid:107)*(cid:107)2
Hy
(cid:20)(cid:13)
(cid:16)
(cid:13)
(cid:13)
, by the Jensen's inequality we obtain that
(cid:13)
2
Eρ(y|x) [ψ (y)]
(cid:13)
(cid:13)
(cid:13)
2
h∗ (x)
(cid:13)
(cid:13)
(cid:101)PY − IHy
(cid:101)PY − IHy
= Ex
Ex
(cid:17)
(cid:17)
(cid:21)
(cid:21)
(78)
(79)
(80)
(81)
(cid:20)(cid:13)
(cid:16)
(cid:13)
(cid:13)
(cid:20)(cid:13)
Eρ(y|x)
(cid:13)
(cid:13)
Hy
= Ex
(cid:104)(cid:16)
(cid:101)PY − IHy
≤ Ex
(cid:20)
Eρ(y|x)
(cid:20)(cid:13)
(cid:16)
(cid:13)
(cid:13)
(cid:101)PY − IHy
= Ey
(cid:20)(cid:13)
(cid:16)
(cid:13)
(cid:13)
(cid:101)PY − IHy
(cid:17)
ψ(y)
(cid:21)
.
(cid:13)
2
(cid:13)
(cid:13)
Hy
20
Hy
(cid:17)
(cid:17)
ψ (y)
(cid:21)
(cid:105)(cid:13)
2
(cid:13)
(cid:13)
Hy
(cid:21)(cid:21)
ψ (y)
(cid:13)
2
(cid:13)
(cid:13)
Hy
D Sketching reconstruction error
We provide here a bound on the reconstruction error of a sketching approximation.
Theorem 2 (Subgaussian sketching reconstruction error). For δ ∈ (0, 1/e], n ∈ N sufficiently large
such that 9
1+γz ≤ (cid:107)CZ(cid:107)op/2, then if
n log(n/δ) ≤ n− 1
m ≥ c4 max
(cid:16)
ν2
z n
γz +μz
1+γz , ν4
z log (1/δ)
(cid:17)
,
then with probability 1 − δ
where c3, c4 > 0 are constants independents of n, m, δ defined in the proofs.
Ez[(cid:107)( (cid:101)PZ − IHz )χ(z)(cid:107)2
Hz
] ≤ c3n− 1−γz
(1+γz )
Proof. For t > 0, we have
(cid:20)(cid:13)
(cid:16)
(cid:13)
(cid:13)
Ez
(cid:17)
(cid:101)PZ − IHz
χ(z)
(cid:13)
2
(cid:13)
(cid:13)
Hz
(cid:21)
(cid:16)(cid:16)
= Tr
(cid:101)PZ − IHz
(cid:17)
(cid:17)
Ez [χ(z) ⊗ χ(z)]
Lemma 9 gives that, for δ ∈ (0, 1), if 9
=
≤
(cid:16)
(cid:16)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:17)
(cid:17)
(cid:101)PZ − IHz
(cid:101)PZ − IHz
(cid:13)
2
(cid:13)
(cid:13)
HS
(cid:13)
2
(cid:13)
(cid:13)
op
(cid:13)
(cid:13) (cid:98)C −1/2
(cid:13)
Zt C 1/2
Zt
(cid:13)
2
(cid:13)
(cid:13)
op
×
Zt C 1/2
(cid:13)
(cid:13)C −1/2
(cid:13)
(cid:1) ≤ t ≤ (cid:107)CZ(cid:107)op, then with probability 1 − δ
HS
Z
.
C 1/2
Z
Zt
(cid:98)C 1/2
(cid:13)
2
(cid:13)
(cid:13)
δ
n log (cid:0) n
(cid:13)
(cid:13) (cid:98)C −1/2
(cid:13)
Zt C 1/2
Zt
(cid:13)
2
(cid:13)
(cid:13)
op
≤ 2 .
Moreover, since
(cid:13)
(cid:13)
(cid:13)CZt
−1/2C 1/2
Z
(cid:13)
2
(cid:13)
(cid:13)
= Tr (cid:0)CZt
−1CZ
(cid:1) = dZ
eff (t), Lemma 11 gives that
HS
(cid:13)
(cid:13)
(cid:13)CZt
−1/2C 1/2
Z
(cid:13)
2
(cid:13)
(cid:13)
HS
≤ Qzt−γz .
Then, using the Lemma 6, and multiplying the bounds, gives
(cid:20)(cid:13)
(cid:16)
(cid:13)
(cid:13)
Ey
(cid:17)
(cid:101)PZ − IHy
χ(z)
(cid:13)
2
(cid:13)
(cid:13)
Hz
(cid:21)
≤ 6Qzt1−γz .
(16)
(17)
(83)
(84)
(85)
Finally, choosing t = n− 1
bzQzt−(γz+μz) (from Lemmas 11 and 12), allows to conclude the proof.
1+γ , defining c3 = 6Qz, c4 = 576C2bzQz, and noticing N ∞
z (t) ≤
Lemma 6. Let N ∞
n log (cid:0) n
9
δ
z (t) be as in Definition 2. For all δ ∈ (0, 1/e], 9
n log (cid:0) n
δ
(cid:1) ≤ t ≤ (cid:107)CZ(cid:107)op −
(cid:1) and mz ≥ max (cid:0)432C2ν2N ∞
z (t), 576C2ν4 log (1/δ)(cid:1), with probability at least 1 − δ,
(cid:16)
(cid:13)
(cid:13)
(cid:13)
(cid:101)PZ − IHz
(cid:17)
(cid:98)C 1/2
Zt
(cid:13)
2
(cid:13)
(cid:13)
op
≤ 3t .
Proof. Using Propositions 3 and 7 from Rudi et al. (2015), we have, for t > 0,
(cid:16)
(cid:13)
(cid:13)
(cid:13)
(cid:101)PZ − IHz
(cid:17)
(cid:98)C 1/2
Zt
(cid:13)
2
(cid:13)
(cid:13)
op
≤
t
1 − βz(t)
,
with βz(t) = σmax
(cid:16)
(cid:98)C −1/2
Zt
(cid:16)
(cid:98)CZ − (cid:101)CZ
(cid:17)
(cid:98)C −1/2
Zt
(cid:17)
.
(86)
(87)
21
Now, applying Lemma 7, with the condition
mz ≥ max (cid:0)432C2ν2N ∞
z (t), 576C2ν4 log (1/δ)(cid:1) ,
we obtain βz(t) ≤ 2/3, which gives
(cid:16)
(cid:13)
(cid:13)
(cid:13)
(cid:101)PZ − IHy
(cid:17)
(cid:98)C 1/2
Zt
(cid:13)
2
(cid:13)
(cid:13)
op
≤ 3t .
(88)
(89)
Lemma 7. Let Rz be as in Definition 1 and N ∞
n log (cid:0) n
9
least 1 − δ,
(cid:1) ≤ t ≤ (cid:107)CZ(cid:107)op − 9
n log (cid:0) n
δ
δ
(cid:1) and mz ≥ max (6N ∞
z (t) as in Definition 2. For all δ ∈ (0, 1/e],
z (t), log (1/δ)), with probability at
(cid:13)
(cid:13) (cid:98)C −1/2
(cid:13)
Zt
(cid:16)
(cid:98)CZ − (cid:101)CZ
(cid:17)
(cid:98)C −1/2
Zt
(cid:13)
(cid:13)
(cid:13)op
≤ C
√
2
2ν(cid:112)6N ∞
z (t) + 8ν2(cid:112)log (1/δ)
√
mz
,
(90)
where C is a universal constant independent of N ∞
z (t), δ and mz.
Proof. We define the following random variables
Wi =
(cid:114) mz
n
n
(cid:88)
j=1
(Rz)ij (cid:98)C −1/2
Zt χ(zj) ∈ Hz
for i = 1, . . . mz.
(91)
In order to use the concentration bound given in Theorem 3, we show that the Wis are i.i.d. weakly
square integrable centered random vectors with covariance operator Σ, sub-Gaussian, and pre-
Gaussian.
The Wis are weakly square integrable.
(cid:112) mz
n
(cid:80)n
j=1(Rz)ijv(zj). Hence, using the definition of a sub-Gaussian sketch, we have
Let u ∈ Hz and v = (cid:98)C −1/2
Zt u, we have that (cid:104)Wi, u(cid:105)Hz =
(cid:107)(cid:104)Wi, u(cid:105)Hz (cid:107)2
(cid:2)|(cid:104)Wi, u(cid:105)Hz |2(cid:3)
L2(P) = ER
1
n
=
n
(cid:88)
j=1
< +∞ .
v(zj)2
(92)
(93)
(94)
The Wis are subgaussian.
we have
Let c ∈ R, using the independence and sub-Gaussianity of the Rzij ,
ERz [exp (c(cid:104)Wi, u(cid:105)Hz )] = ERz
exp
n
(cid:88)
Rzij v(zj)
(cid:114) mz
c
n
=
≤
n
(cid:89)
j=1
n
(cid:89)
j=1
= exp
j=1
(cid:18)
(cid:20)
ERz
exp
(cid:114) mz
c
n
(cid:19)(cid:21)
Rzij v(zj)
(cid:19)
ν2
mz
exp
(cid:18) c2mzv(zj)2
2n
c2ν2
2n
n
(cid:88)
j=1
v(zj)2
= exp
(cid:18) c2ν2
2
(cid:107)(cid:104)Wi, u(cid:105)Hz (cid:107)2
L2(P)
(cid:19)
.
22
Hence, (cid:104)Wi, u(cid:105)Hz is a 1
tion of sub-Gaussian random variables gives
2 ν2 (cid:107)(cid:104)Wi, u(cid:105)Hz (cid:107)2
L2(P)-subgaussian random variable. Then, the Orlicz condi-
(cid:34)
(cid:32)
ER
exp
(cid:104)Wi, u(cid:105)2
8ν2 (cid:107)(cid:104)Wi, u(cid:105)Hz (cid:107)2
Hz
L2(P)
(cid:33)
(cid:35)
− 1
≤ 1 .
We deduce that
(cid:107)(cid:104)Wi, u(cid:105)Hz (cid:107)φ2
≤ 2
√
2ν (cid:107)(cid:104)Wi, u(cid:105)Hz (cid:107)L2(P) .
We conclude that the Wis are subgaussian with B = 2
√
2ν.
(95)
(96)
The Wis are pre-gaussian. We define Z = (cid:112) mz
i.i.d.∼
N (0, 1/mz). Z is a Gaussian random variable that admits the same covariance operator as the
Wis. So, the Wi are pre-Gaussian.
Zt χ(zj), with Gj
j=1 Gj (cid:98)C −1/2
(cid:80)n
n
Because the Wis are i.i.d. weakly square integrable centered
Applying concentration bound.
random variables, we can apply Theorem 3, and by using also Lemma 14, and the condition
mz ≥ max (6N ∞
z (t), log (1/δ)), we obtain
(cid:13)
(cid:13) (cid:98)C −1/2
(cid:13)
Zt
(cid:16)
(cid:98)CZ − (cid:101)CZ
(cid:17)
(cid:98)C −1/2
Zt
(cid:13)
(cid:13)
(cid:13)op
≤ C
√
2
2ν(cid:112)6N ∞
z (t) + 8ν2(cid:112)log (1/δ)
√
mz
.
(97)
E Probabilistic bounds
In this section, we provide all the probabilistic bounds used in our proofs. In particular, we restate
bounds from other works for the sake of providing a self-contained work. We order them in the same
in order of appearance in our proofs.
Lemma 8 (Bound (A.1) =
Let δ ∈ [0, 1], n ∈ N sufficiently large such that λ = n−1/(1+γx) ≥ 9κ2
assumptions, the following holds with probability at least 1 − δ
S#
Y SX − Hλ (cid:98)CX
C −1/2
Xλ
(cid:17)
(cid:13)
(cid:13)
(cid:13)HS
(cid:16)
(cid:13)
(cid:13)
(cid:13)
(Ciliberto et al., 2020, Theorem B.10)).
x
n log( n
x ) Under our set of
where the constant M depends on κy, (cid:107)H(cid:107)HS, δ.
(A.1) ≤ M log(4/δ)n− 1
2(1+γx )
(98)
Proof. This lemma can be obtained from (Ciliberto et al., 2020, Theorem B.10), by noticing that the
bound of Theorem B.10 is obtained by upper bounding the sum of (A.1) and a positive term, such
that the bound of (Ciliberto et al., 2020, Theorem B.10) is an upper bound of (A.1).
Lemma 9 (Bound (cid:107) (cid:98)C −1/2
with probability 1 − δ
Xλ C 1/2
Xλ (cid:107)op (Rudi et al., 2013, Lemma 3.6)). If 9
n log n
δ ≤ λ ≤ (cid:107)C(cid:107)op, then
(cid:107) (cid:98)C −1/2
Xλ C 1/2
Xλ (cid:107)op ≤
√
2.
Lemma 10 (Bound (cid:107)C −1/2
Xλ (cid:98)C 1/2
Xλ (cid:107)op). If 9
n log n
δ ≤ λ ≤ (cid:107)C(cid:107)op, then with probability 1 − δ
(cid:107)C −1/2
Xλ (cid:98)C 1/2
Xλ (cid:107)op ≤
(cid:114) 3
2
.
23
(99)
(100)
Proof. We have
(cid:107)C −1/2
Xλ (cid:98)C 1/2
Xλ (cid:107)op = (cid:107)C −1/2
Xλ (cid:98)CXλC −1/2
op
Xλ (cid:107)1/2
Xλ ( (cid:98)CX − CX )C −1/2
Xλ ( (cid:98)CX − CX )C −1/2
Xλ (cid:107)1/2
op
Xλ (cid:107)op
= (cid:107)I + C −1/2
≤
≤
(cid:16)
1 + (cid:107)C −1/2
(cid:114) 3
2
(cid:17)1/2
(101)
(102)
(103)
(104)
with probability at least 1 − δ, where the last inequality is from Rudi et al. (2013, Lemma 3.6).
Theorem 3 (Subgaussian concentration bound (Koltchinskii and Lounici, 2017, Theorem 9)). Let
W, W1, . . . , Wm be i.i.d. weakly square integrable centered random vectors in a separable Hilbert
space Hz with covariance operator Σ. If W is sub-Gaussian and pre-Gaussian, then there exists a
constant C > 0 such that, for all τ ≥ 1, with probability at least 1 − e−τ ,
(cid:32)
(cid:33)
(cid:114)
(cid:107) ˆΣ − Σ(cid:107) ≤ C(cid:107)Σ(cid:107)
B
,
(105)
where B > 0 is the constant such that (cid:13)
(cid:13)(cid:104)W, u(cid:105)Hy
(cid:13)(cid:104)W, u(cid:105)Hy
(cid:13)
(cid:13)L2(P) for all u ∈ Hz.
r(Σ)
m
∨
∨ B2
r(Σ)
m
≤ B (cid:13)
(cid:13)
(cid:13)φ2
(cid:114) τ
m
∨ B2 τ
m
F Auxiliary results and definitions
Definition 2. For t > 0, we define the random variable
Nz(t) = (cid:104)χ(z), C −1
Zt χ(z)(cid:105)Hz
with z ∈ Z distributed according to ρZ and let
eff (t) = E [Nz(t)] = Tr (cid:0)CZC −1
dZ
Zt
(cid:1) , N ∞
z (t) = sup
z∈Z
Nz(t) .
(106)
(107)
x , dX
eff (t), γx, Qy, N ∞
We note N ∞
tively.
Lemma 11. When Assumption 3 holds then we have
y , dY
eff (t), γy, Qy for the input and output kernels kx, ky, respec-
Proof. We have
eff (t) ≤ Qzt−γz .
dZ
(cid:1)
eff (t) = Tr (cid:0)CZC −1
dZ
≤ Tr (C γz
≤ Qzt−γz .
Zt
Z ) (cid:107)C 1−γz
Z
C −1
Zt (cid:107)op
Lemma 12. When Assumption 4 holds then we have
z (t) ≤ bzdZ
N ∞
eff (t)t−μz .
Proof. We have
N ∞
z (t) = sup
z∈Z
(cid:104)χ(z), C −1
Zt χ(z)(cid:105)Hz
Z
)
Zt C 1−μz
Zt CZ)(cid:107)C −μz
Zt (cid:107)op
≤ bz Tr(C −1
≤ bz Tr(C −1
≤ bzdZ
eff (t)t−μz .
24
(108)
(109)
(110)
(111)
(112)
(113)
(114)
(115)
(116)
We recall the following deterministic bound.
Lemma 13 (Bound (cid:107) (cid:98)C 1/2
Xλ ̃η( (cid:98)CX ) (cid:98)C 1/2
Xλ (cid:107)op (Rudi et al., 2015, Lemma 8)). For any λ > 0,
(cid:107) (cid:98)C 1/2
Xλ ̃η( (cid:98)CX ) (cid:98)C 1/2
Xλ (cid:107)op ≤ 1.
(117)
We introduce here some notations and definitions from Koltchinskii and Lounici (2017). Let W
be a centered random variable in Hz, W is weakly square integrable iff (cid:107)(cid:104)W, u(cid:105)Hz (cid:107)2
L2(P) :=
E (cid:2)|(cid:104)W, u(cid:105)Hz |2(cid:3) < +∞, for any u ∈ Hz. Moreover, we define the Orlicz norms. For a convex
nondecreasing function φ : R+ → R+ with φ(0) = 0 and a random variable η on a probability
space (Ω, A, P), the φ-norm of η is defined as
(cid:107)η(cid:107)φ = inf {C > 0 : E [φ (|η|/C)] ≤ 1} .
The Orlicz φ1- and φ2-norms coincide to the functions φ1(u) = eu − 1, u ≥ 0 and φ2(u) =
eu2
− 1, u ≥ 0. Finally, Koltchinskii and Lounici (2017) introduces the definitions of sub-Gaussian
and pre-Gaussian random variables in a separable Banach space E. We focus on the case where
E = Hz.
Definition 3. A centered random variable X in Hz will be called sub-Gaussian iff, for all u ∈ Hz,
there exists B > 0 such that
(118)
(cid:107)(cid:104)X, u(cid:105)Hz (cid:107)φ2
≤ B (cid:107)(cid:104)X, u(cid:105)Hz (cid:107)L2(P) .
(119)
Definition 4. A weakly square integrable centered random variable X in Hz with covariance operator
Σ is called pre-Gaussian iff there exists a centered Gaussian random variable Y in Hz with the same
covariance operator Σ.
Lemma 14 (Expectancy, covariance, and intrinsic dimension of the Wis). Defining Wi =
(cid:112) mz
for i = 1, . . . mz where Rz is a subgaussian sketch, the
n
j=1(Rz)ij (cid:98)C −1/2
Zt χ(zj) ∈ Hz
(cid:80)n
following hold true
and for δ ∈ (0, 1), if 9
n log (cid:0) n
δ
(cid:1), then with probability 1 − δ
ERz [Wi] = 0
Σ = ERz [Wi ⊗ Wi] = (cid:98)C −1/2
Zt
(cid:98)CZ (cid:98)C −1/2
Zt
(cid:98)Σ =
(cid:104)f, Wi(cid:105)Hz Wi = (cid:98)C −1/2
Zt
(cid:101)CZ (cid:98)C −1/2
Zt
mz(cid:88)
i=1
1
mz
(cid:1) ≤ t ≤ (cid:107)CZ(cid:107)op − 9
(cid:2)(cid:107)Xi(cid:107)Hz
ERz
(cid:107)Σ(cid:107)op
r (Σ) =
n log (cid:0) n
(cid:3)2
δ
≤ 6N ∞
z (t) .
Proof. First, it is straightforward to check that
1
mz
mz(cid:88)
i=1
(cid:104)f, Wi(cid:105)Hz Wi = (cid:98)C −1/2
Zt
(cid:101)CZ (cid:98)C −1/2
Zt
.
Then, since ERz [(Rz)i:] = 0,
ERz [Wi] =
(cid:114) mz
n
(cid:98)C −1/2
Zt S#
Z
ERz [(Rz)i:] = 0 .
Then,
(Wi ⊗ Wi) f = (cid:104)f, Wi(cid:105)Hz Wi
√
(cid:16)
= (cid:104)f,
= mz
mz (cid:98)C −1/2
(Rz)(cid:62)
Z (Rz)i:(cid:105)Hz
(cid:17)
Zt S#
i: SZ (cid:98)C −1/2
(cid:0)mzRzi: (Rz)(cid:62)
Zt
f
i:
(cid:98)C −1/2
Zt S#
(cid:1) SZ (cid:98)C −1/2
Zt
f ,
Z (Rz)i:
= (cid:98)C −1/2
Zt S#
Z
√
mz (cid:98)C −1/2
Zt S#
Z (Rz)i:
25
(120)
(121)
(122)
(123)
(124)
(125)
(126)
(127)
(128)
(129)
and since ERz
(cid:3) = In,
(cid:2)mz(Rz)i:R(cid:62)
zi:
Σ = ERz [Wi ⊗ Wi]
Zt S#
ERz
(cid:98)CZ (cid:98)C −1/2
= (cid:98)C −1/2
= (cid:98)C −1/2
Z
Zt
Zt
(cid:2)mzRzi: R(cid:62)
.
zi:
(cid:3) SZ (cid:98)C −1/2
Zt
Then,
ERz
(cid:2)(cid:107)Xi(cid:107)Hz
(cid:3)2
≤ ERz
(cid:104)
(by Jensen's inequality)
= mz ERz
Z Rzi: , (cid:98)C −1/2
Zt S#
Z Rzi: (cid:105)Hz
(cid:105)
(cid:107)Xi(cid:107)2
Hz
(cid:104)
(cid:104) (cid:98)C −1/2
Zt S#
(cid:104)
Rzij χ(zj),
(cid:105)
n
(cid:88)
l=1
Rzil (cid:98)C −1
Zt χ(zl)(cid:105)Hz
Rzij Rzil(cid:104)χ(zj), (cid:98)C −1
Zt χ(zl)(cid:105)Hy
=
mz
n
=
=
mz
n
mz
n
= Tr
n
(cid:88)
j=1
n
(cid:88)
j,l=1
ERz
ERz
n
(cid:88)
1
mz
(cid:16)
j=1
(cid:98)C −1
Zt (cid:98)CZ
(cid:104)χ(zj), (cid:98)C −1
Zt χ(zj)(cid:105)Hz
(cid:17)
(cid:98)C 1/2
Z
=
≤
Zt
(cid:13)
(cid:13) (cid:98)C −1/2
(cid:13)
(cid:13)
(cid:13) (cid:98)C −1/2
(cid:13)
Zt C 1/2
Zt
(cid:13)
2
(cid:13)
(cid:13)
HS
(cid:13)
2
(cid:13)
(cid:13)
op
(cid:13)
(cid:13)C −1/2
(cid:13)
Zt
(cid:98)C 1/2
Z
(cid:13)
2
(cid:13)
(cid:13)
HS
.
But,
(cid:13)
(cid:13)C −1/2
(cid:13)
Zt
(cid:98)C 1/2
Z
(cid:13)
2
(cid:13)
(cid:13)
HS
(cid:16)
= Tr
C −1
Zt (cid:98)CZ
(cid:32)
(cid:32)
= Tr
C −1
Zt
(cid:17)
1
n
n
(cid:88)
i=1
(cid:33)(cid:33)
χ(zi) ⊗ χ(zi)
n
(cid:88)
i=1
n
(cid:88)
i=1
n
(cid:88)
Tr (cid:0)C −1
Zt (χ(zi) ⊗ χ(zi))(cid:1)
(cid:10)χ(zi), C −1
Zt χ(zi)(cid:11)
Hy
Nzi(t)
=
=
=
1
n
1
n
1
n
(130)
(131)
(132)
(133)
(134)
(135)
(136)
(137)
(138)
(139)
(140)
(141)
(142)
(143)
(144)
(145)
(146)
Then, from Lemma 9, for δ ∈ (0, 1), and 9
≤ N ∞
i=1
z (t) .
n log (cid:0) n
(cid:1) ≤ t ≤ (cid:107)CZ(cid:107)op, then with probability 1 − δ,
(cid:3)2
(cid:2)(cid:107)Xi(cid:107)Hz
≤ 2N ∞
z (t).
δ
(147)
ERz
Then, (cid:107)Σ(cid:107)op =
(cid:13)
(cid:13) (cid:98)C −1/2
(cid:13)
Y t
(cid:98)C 1/2
Y
(cid:13)
2
(cid:13)
(cid:13)
op
≥ 1/3 for t ≤ 2
(cid:13)
(cid:13)
(cid:13) (cid:98)CY
(cid:13)
(cid:13)
(cid:13)op
.
We conclude that
ERz
(cid:3)2
(cid:2)(cid:107)Wi(cid:107)Hz
(cid:107)Σ(cid:107)op
≤ 6N ∞
z (t).
26
(148)
Figure 2: Test MSE with respect to mx and my for a SIOKR and ISOKR model respectively with
(2 * 10−3)-SR input and output sketches.
Table 4: Multi-label data sets description.
Data set
n
nte
nf eatures
nlabels
Bibtex
Bookmarks
4880
60000
2515
27856
1836
2150
159
298
Finally, in order to obtain a condition on t that does not depend on empirical quantities, we use
(cid:1) ≤ t(cid:48) ≤ (cid:107)CZ(cid:107)op, then CZt(cid:48) (cid:22) 2 (cid:98)CZt(cid:48), which implies
Lemma 9 which gives that, for any 9
(cid:13)
n log (cid:0) n
(cid:13)
(cid:13) (cid:98)CZ
.
n log (cid:0) n
δ
≥ (cid:107)CZ(cid:107)op −t(cid:48). Now, taking t(cid:48) = 9
(cid:1), we obtain (cid:107)CZ(cid:107)op − 9
n log (cid:0) n
(cid:13)
(cid:13)
(cid:13) (cid:98)CZ
(cid:1) ≤ 2
2
δ
δ
(cid:13)
(cid:13)
(cid:13)op
(cid:13)
(cid:13)
(cid:13)op
G Contributions and Previous Work
Excess-risk bounds for sketched kernel ridge regression have been provided in Rudi et al. (2015)
in the case of Nyström subsampling, and scalar-valued ridge regression. Our proofs will consist in
similar derivations than in Rudi et al. (2015). Nevertheless, we cannot apply directly their results in
our setting. More precisely, we do the following additional derivations.
1. Additional decompositions to deal with:
(a) vector-valued regression instead of scalar-valued regression as in Rudi et al. (2015)
(b) input and output approximated feature maps
2. Novel probabilistic bounds to deal with gaussian and subgaussian sketching instead of
Nyström sketching as in Rudi et al. (2015).
H Additional Experiments
H.1 Simulated Data Set for Least Squares Regression
We report here some results about statistical performance on the synthetic data set described in
Section 5 for SIOKR and ISOKR models.
H.2 More Details about Multi-Label Classification Data Set
In this section, you can find more details about training and testing sizes, number of features of the
inputs and number of labels to predict of Bibtex and Bookmarks data sets in Table 4.
27
0.050.0100.0150.0200.0250.0300.0mx0.9600.9620.9640.9660.9680.970MSEIOKRSIOKR0.050.0100.0150.0200.0250.0300.0my0.9600.9650.9700.9750.9800.9850.990MSEIOKRISOKR |
|
http://arxiv.org/abs/2302.10109v1 | 2023-02-20T17:12:00 | 2023-02-20T17:12:00 | NerfDiff: Single-image View Synthesis with NeRF-guided Distillation from
3D-aware Diffusion | Novel view synthesis from a single image requires inferring occluded regions
of objects and scenes whilst simultaneously maintaining semantic and physical
consistency with the input. Existing approaches condition neural radiance
fields (NeRF) on local image features, projecting points to the input image
plane, and aggregating 2D features to perform volume rendering. However, under
severe occlusion, this projection fails to resolve uncertainty, resulting in
blurry renderings that lack details. In this work, we propose NerfDiff, which
addresses this issue by distilling the knowledge of a 3D-aware conditional
diffusion model (CDM) into NeRF through synthesizing and refining a set of
virtual views at test time. We further propose a novel NeRF-guided distillation
algorithm that simultaneously generates 3D consistent virtual views from the
CDM samples, and finetunes the NeRF based on the improved virtual views. Our
approach significantly outperforms existing NeRF-based and geometry-free
approaches on challenging datasets, including ShapeNet, ABO, and Clevr3D. | [
"Jiatao Gu",
"Alex Trevithick",
"Kai-En Lin",
"Josh Susskind",
"Christian Theobalt",
"Lingjie Liu",
"Ravi Ramamoorthi"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.10109v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.10109v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.CV",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.CV",
"cs.LG"
] | NerfDiff: Single-image View Synthesis with NeRF-guided Distillation
from 3D-aware Diffusion
Jiatao Gu 1 Alex Trevithick 2 Kai-En Lin 2 Josh Susskind 1 Christian Theobalt 3
Lingjie Liu 3 4 Ravi Ramamoorthi 2
3
2
0
2
b
e
F
0
2
]
V
C
.
s
c
[
1
v
9
0
1
0
1
.
2
0
3
2
:
v
i
X
r
a
Abstract
Novel view synthesis from a single image requires
inferring occluded regions of objects and scenes
whilst simultaneously maintaining semantic and
physical consistency with the input. Existing ap-
proaches condition neural radiance fields (NeRF)
on local image features, projecting points to the
input image plane, and aggregating 2D features
to perform volume rendering. However, under
severe occlusion, this projection fails to resolve
uncertainty, resulting in blurry renderings that
lack details.
In this work, we propose NerfD-
iff, which addresses this issue by distilling the
knowledge of a 3D-aware conditional diffusion
model (CDM) into NeRF through synthesizing
and refining a set of virtual views at test-time.
We further propose a novel NeRF-guided distil-
lation algorithm that simultaneously generates
3D consistent virtual views from the CDM sam-
ples, and finetunes the NeRF based on the im-
proved virtual views. Our approach significantly
outperforms existing NeRF-based and geometry-
free approaches on challenging datasets includ-
ing ShapeNet, ABO, and Clevr3D. Please see the
supplementary website (https://jiataogu.
me/nerfdiff) for video results.
1. Introduction
Novel view synthesis is a core component of computer
graphics and vision applications, including virtual and aug-
mented reality, immersive photography, and the creation of
digital replicas. Given a few input views of an object or a
scene, one seeks to synthesize new views from other viewing
directions. This problem is challenging since novel views
must account for occlusions and unseen regions. This prob-
1Apple 2University of California, San Diego 3Max Planck
Institute for Informatics, Germany 4University of Pennsylvania.
Correspondence to: Jiatao Gu <[email protected]>, Lingjie Liu
<[email protected]>.
Preprint. In progress
Figure 1. Renderings from our method in comparison to the SoTA
VisionNeRF (Lin et al., 2023). Note how our method can predict
sharp renderings despite large occlusion, whereas VisionNeRF
cannot handle this uncertainty and shows implausible blurring.
lem has a long history, going back to early work in image-
based rendering (IBR) (Chen & Williams, 1993; Gortler
et al., 1996; Levoy & Hanrahan, 1996; McMillan & Bishop,
1995). However, IBR methods can only produce subopti-
mal results and are often scene-specific. Recently, neural
radiance fields (NeRF) (Mildenhall et al., 2020) have shown
high-quality novel view synthesis results, but NeRF requires
tens or hundreds of images for overfitting a scene and has
no generalization ability to infer new scenes.
This work focuses on novel view synthesis from a single im-
age. In attempts to do so, generalizable NeRF models (Tre-
vithick & Yang, 2021; Yu et al., 2021; Lin et al., 2023)
have been proposed, whereby the NeRF representation is
conditioned by the projection of 3D points and gathering of
corresponding image features. These approaches produce
good results, especially for cameras near the input. How-
ever, when the target views are far from the input, these
approaches yield blurry results. The uncertainty of large un-
seen regions in novel views cannot be resolved by projection
to the input image. A distinct line of work addresses the un-
certainty issue in single-image view synthesis by leveraging
Ground-truthVisionNeRF (Lin et.al., 2023)OursInput Image
NerfDiff: Single-image View Synthesis with NeRF-guided Distillation from 3D-aware Diffusion
2D generative models to predict novel views conditioned on
the input view (Rombach et al., 2021c; Watson et al., 2022).
However, these approaches are only able to synthesize par-
tially 3D-consistent images.
In this paper, we propose NerfDiff, a training-finetuning
framework for synthesizing multi-view consistent and high-
quality images given single-view input. Concretely, at the
training stage, we jointly train a camera-space triplane-
based NeRF together with a 3D-aware conditional diffusion
model (CDM) on a collection of scenes. We initialize the
NeRF representation given the input image at the finetun-
ing stage. Then, we finetune the parameters from a set of
virtual images predicted by the CDM conditioned on the
NeRF-rendered outputs. We found that a naive finetuning
strategy of optimizing the NeRF parameters directly using
the CDM outputs would lead to subpar renderings, as the
CDM outputs tend to be multi-view inconsistent. Therefore,
we propose NeRF-guided distillation, which updates the
NeRF representation and guides the multi-view diffusion
process in an alternating fashion. In this way, the uncertainty
in single-image view synthesis can be resolved by filling
in unseen information from CDM; in the meantime, NeRF
can guide CDM for multi-view consistent diffusion. An
illustration of the proposed pipeline is shown in Figure 2.
We evaluate our approach on three challenging benchmarks.
Our results indicate that the proposed NerfDiff signifi-
cantly outperforms all the existing baselines, achieving high-
quality generation with multi-view consistency. See sup-
plementary materials for video results. We summarize the
main contributions as follows:
• We develop a novel framework – NerfDiff which
jointly learns an image-conditioned NeRF and a CDM,
and at test time finetunes the learned NeRF using a
multi-view consistent diffusion process (§ 4.3,§ 4.4).
• We introduce an efficient image-conditioned NeRF rep-
resentation based on camera-aligned triplanes, which
is the core component enabling efficient rendering and
finetuning from the CDM (§ 4.1).
• We propose a 3D-aware CDM, which integrates vol-
ume rendering into 2D diffusion models, facilitating
generalization to novel views (§ 4.2).
2. Related Work
2.1. Diffusion models for 3D generation
Diffusion-based generative models (Sohl-Dickstein et al.,
2015; Ho et al., 2020; Song & Ermon, 2019) have re-
cently become state-of-the-art on image synthesis (Dhari-
wal & Nichol, 2021) and have shown remarkable results
in handling highly under-constrained tasks such as text-to-
image (Ramesh et al., 2022; Rombach et al., 2021a; Saharia
et al., 2022) and text-to-video generation (Ho et al., 2022).
More recently, diffusion models have also been proven effec-
tive in 3D generation tasks. On the one hand, many methods
propose to directly apply diffusion in 3D space, including
point clouds (Nichol et al., 2022), voxels (M ̈uller et al.,
2022a) and fields (Zhuang et al., 2023). Some of them learn
diffusion in a latent space derived from 3D space (Bautista
et al., 2022; Shue et al., 2022). However, a clear limitation
of these approaches is that it requires 3D ground truth for
learning the diffusion process, which is hard to acquire in
the real environment. On the other hand, several works
propose to learn 3D representations from diffusion in 2D
space. For example, Li et al. (2022) learns the geometry
based on a 2-view diffusion model; Anciukevicius et al.
(2022) designs an architecture that generates and renders an
intermediate 3D representation for each diffusion step. Con-
currently related to our method, a series of work (Poole et al.,
2022; Wang et al., 2022; Lin et al., 2022; Zhou & Tulsiani,
2022; Deng et al., 2022) have proposed score distillation
that learns 3D representation directly from pre-trained 2D
diffusion models.
2.2. Single-view Novel View Synthesis
Methods beyond Neural Fields Most initial attempts at
single-view 3D reconstruction relied on ground truth train-
ing data to estimate the geometry of objects. These methods
typically mapped an image to its depth or directly to a 3D
shape (Eigen et al., 2014; Saxena et al., 2009; Fan et al.,
2017; Tatarchenko et al., 2017; Tulsiani et al., 2017). Some
methods (Kato et al., 2018; Yan et al., 2016; Loper & Black,
2014) provide 3D reconstruction estimates without ground
truth 3D supervision using differentiable renderers; how-
ever, these methods were limited to reconstructing only the
geometry, not the appearance. Recently, other methods
have allowed the rendering of novel views without regard
for multiview consistency. For example, ENR (Dupont
et al., 2020) utilizes convolutions with a projection to de-
code 3D voxel features to RGB. Targeting more complex
scenes, SynSin (Wiles et al., 2020) makes use of a differen-
tiable point cloud renderer and an inpainter to extrapolate
to unseen areas. InfiniteNature (Liu et al., 2021) utilizes
estimated depth to iteratively inpaint novel views along a
camera trajectory. Other works, such as GeoFree (Rombach
et al., 2021b) and Pixelsynth (Rockwell et al., 2021), utilize
an autoregressive prior to inferring unseen areas of the scene.
Finally, light-field-based methods like Sajjadi et al. (2022)
and Suhail et al. (2022) condition transformers on features
from input images and query rays to directly output colors
or directly invert into a latent space (Sitzmann et al., 2021).
Methods based on Neural Fields Many methods pro-
pose to use neural fields (e.g., neural radiance field (NeRF,
Mildenhall et al., 2020)) for this task. For example, Sin-
NeRF (Xu et al., 2022) renders novel views near the input
image using pseudo geometry. On the other hand, Sitzmann
NerfDiff: Single-image View Synthesis with NeRF-guided Distillation from 3D-aware Diffusion
Figure 2. NerfDiff incorporates a training and finetuning pipeline. We first learn the single-image NeRF and 2D CDM, which are
conditioned on the single-image NeRF renderings (left). We use the learned network parameters at test time to predict an initial NeRF
representation for finetuning. The NeRF-guided denoised images from the frozen CDM then supervise the NeRF in turn (right).
et al. (2019a); Rematas et al. (2021); Jang & Agapito (2021);
M ̈uller et al. (2022b) incorporate global latent codes and
apply test-time tuning to refine these codes. This process is
very similar to inversion into the latent space of 3D NeRF-
based GANs (Gu et al., 2021; Chan et al., 2021; Bautista
et al., 2022; Cai et al., 2022). Note that it requires (esti-
mated) camera poses at test time, which hinders high-quality
results. Furthermore, the global bottleneck hinders captur-
ing fine details, and due to the optimization of the input view,
such methods also cannot handle occlusion appropriately.
Finally, image-conditioned methods (e.g., pixelNeRF (Yu
et al., 2021) and VisionNeRF (Lin et al., 2023)) directly
utilize local image features to condition NeRF and are the
most relevant to our method. Note that, like pixelNeRF, our
method can perform view synthesis without pose annotation
at test time. We provide background on this type of method
in the next section.
3. Background
3.1. Image-conditioned NeRF
Neural radiance fields (NeRF, Mildenhall et al., 2020) have
been proven remarkably effective for novel view synthesis.
NeRF defines an implicit function fθ : (x, d) → (c, σ)
given a spatial location x ∈ R3 and ray direction d ∈ S2,
where θ are the learnable parameters, c and σ are the color
and density, respectively. To render a posed image I, we
march a camera ray through each pixel r(t) = xo + td
(where xo is the camera origin) and calculate its color via
an approximation of the volume rendering integral:
Iθ(r) =
(cid:90) tf
tn
ω(t) * cθ(r(t), d) dt,
(1)
where ω(t) = e− (cid:82) t
σθ(r(s)) dsσθ(r(t)), tn and tf are the
near and far bounds of the ray, respectively. When multi-
view images are available, θ can be easily optimized with
tn
the standard MSE loss:
LNeRF
θ
= EI∼data,r∼R(I)(cid:107)Iθ(r) − I(r)(cid:107)2
2,
(2)
where R(I) is the set of rays that composes I. To cap-
ture high-frequency details, NeRF encodes x and d with
sinusoidal positional functions ξpos(x), ξpos(d). Recently,
studies have shown that encoding functions with local struc-
tures like triplanes (Chan et al., 2021) achieves significantly
faster inference speed without quality loss.
The training of NeRF, i.e., the optimization of Eq. (2), re-
quires tens or hundreds of images along with their cam-
era parameters to provide sufficient multi-view constraints.
However, in reality, such multi-view data is not easily ac-
cessible. Therefore, this work focuses on recovering neural
radiance fields from a single image without knowing its
absolute camera pose. As this problem is under-constrained,
it requires 3D inductive biases learned from a large set of
scenes similar to the target scene. Following this philoso-
phy, pixel-aligned NeRFs (Yu et al., 2021; Lin et al., 2023)
encode 3D information with local 2D image features so that
the learned representations can generalize to unseen scenes
after being trained on a large number of scenes.
PixelNeRF Take PixelNeRF (Yu et al., 2021) as an exam-
ple. Given an input image I s, PixelNeRF first extracts a
feature volume W = eψ(I s) where eψ is a learnable image
encoder. Then, for any 3D point x ∈ R3 in the input cam-
era space, its corresponding image features are obtained by
projecting x onto the image plane as P(x) ∈ [−1, 1]2 with
known intrinsic matrix, and then bilinearly interpolating the
feature volume as ξW (x) = W (P(x)). The image features
will be combined with the position x and view direction d
to infer the color and density. Next, similar to NeRF, the
color of a camera ray is calculated via volume rendering
(Eq. 1). Such a model is trained over a collection of scenes,
and for each scene, at least two views are needed to form
the training pairs (I s, I) for reconstruction:
θ,ψ = E(I s,I)∼data,r∼R(I)(cid:107)Iθ,W (r) − I(r)(cid:107)2
LIC
2,
(3)
Training PhaseFinetuning PhaseDenoising LossRendering LossInput viewInput viewImage-conditioned NeRFFinetuning LossTarget viewImage-conditioned NeRFConditional Diffusion ModelTarget viewNoisy target viewConditional Diffusion ModelCDM sampledNeRF Rendered NeRF RenderedDenoisedInput ViewTarget ViewGaussian noiseInput ViewVirtual ViewNerfDiff: Single-image View Synthesis with NeRF-guided Distillation from 3D-aware Diffusion
Figure 3. Details of the architecture of the single-image NeRF for NerfDiff. Using a UNet, we first map an input image to a camera-aligned
triplane-based NeRF representation. This triplane efficiently conditions volume rendering from a targeted view, resulting in an initial
rendering. This rendering conditions the diffusion process so the CDM can consistently denoise at that target pose.
where Iθ,W is the volume rendered image.
Challenges However, existing single-image NeRF ap-
proaches fail to produce high-fidelity rendering results, espe-
cially when severe occlusions exist. This is because single-
image view synthesis is an under-constrained problem, as
the synthesized occluded regions can exhibit multiple possi-
bilities. Therefore, MSE loss (Eq. (3)) forces single-image
NeRF to regress to mean pixel values across all possible
solutions, yielding inaccurate and blurry predictions.
3.2. Geometry-free View Synthesis
To account for the uncertainty challenge, a distinct line of
research explicitly models view prediction p(I|I s) with 2D
generative models, like Dupont et al. (2020); Rombach et al.
(2021b); Sajjadi et al. (2022) and more recently conditional
diffusion models (3DiM, Watson et al., 2022). Take 3DiM
as an example. It learns a conditional noise predictor (cid:15)φ that
de-noises Gaussian-noised target images conditioning on
the input view Moreover, the corresponding camera poses.
Such a model can be optimized with a denoising loss:
φ = E(I s,I)∼data,(cid:15),t(cid:107)(cid:15)φ (Zt, I s) − (cid:15)(cid:107)2
LDM
2
(4)
t + σ2
where Zt = αtI + σt(cid:15), (cid:15) ∼ N (0, 1), α2
t = 1 is the
noised target for I. As shown in Song & Ermon (2019), the
denoiser provides an approximation for the score function
of the distribution (cid:15)φ(Zt, I s) ≈ −σt∇Zt log pφ(Zt|I s).
At test time, the learned score (cid:15)φ is applied iteratively and
refines noise images to synthesize novel views.
Challenges Geometry-free models typically suffer from
the "alignment problem" where the input view condition-
ing and target views are not pixel-wise aligned, leading
to inferior generalization when applying standard UNet-
based diffusion models. Watson et al. (2022) attempted to
alleviate this issue by using cross-attention to gather infor-
mation from the input view. However, this requires models
with large capacities, and even with this modification, it
still needs more generalizability for complex scenes and
out-of-distribution cameras. Moreover, since denoising is
conducted in 2D for each view independently rather than in
3D, the synthesized novel views of CDMs in the sampling
stage tend to be multi-view inconsistent.
4. NerfDiff
To achieve the best of both worlds, in this paper, we present a
training-finetuning two-stage approach, dubbed as NerfDiff,
to incorporate the power of diffusion models into image-
conditioned NeRFs for single-image view synthesis. We
illustrate the pipelines of the proposed two stages in Fig-
ure 2. In the following, we first introduce NerfDiff, which
consists of an improved single-image NeRF based on local
triplanes (§ 4.1) and a 3D-aware CDM built on top of the
single-image NeRF outputs (§ 4.2). An overview of the
proposed model is presented in Figure 3. These two compo-
nents are optimized jointly on the same training set (§ 4.3).
At test time, we adopt a second-stage finetuning. Further-
more, to mitigate the inconsistency issue brought by CDM
sampling, we present the NeRF-Guided Distillation (NGD)
algorithm to improve the finetuning performance (§ 4.4).
4.1. Single-image NeRF with Local Triplanes
NerfDiff is built upon an efficient camera-aligned triplane
extracted directly from an input image to condition the
NeRF. As mentioned in § 3.1, most existing single-view
models (Yu et al., 2021; Lin et al., 2023) query the extracted
features via image plane projection: P : R3 → [−1, 1]2.
One issue with this operation is that the depth information
of a 3D point is not contained in its extracted features; that
is, all points along the same camera ray project to the same
location on the 2D image and thus have the same features.
Therefore, to differentiate the points along the same cam-
era ray, existing methods need to concatenate the image
features with the positional encoding of the global spatial
MLPU-NetRaydirPosU-NetInput ViewTarget view rayscross attention (optional)PixelNeRF output (feature maps optional)Denoised outputconcatConditional Diffusion ModelImage-conditioned NeRFNerfDiff: Single-image View Synthesis with NeRF-guided Distillation from 3D-aware Diffusion
location ξpos(x) as the representation of point x. However,
this 3D representation is not efficient. Thus it needs a deep
MLP network to fuse the image features with spatial in-
formation for inferring the color and density of x, which
slows down the rendering process. Inspired by Chan et al.
(2021), we propose an efficient 3D representation that re-
shapes the image feature W into a camera-aligned triplane:
{Wxy, Wxz, Wyz}1. Then, each 3D point receives a unique
feature vector by bilinear interpolation within three planes:
ξW (x) = Wxy( ̃xxy) + Wxz( ̃xxz) + Wyz( ̃xyz),
(5)
Algorithm 1 Finetuning with NeRF-guided distillation.
Input: NeRF (MLP fθ, triplanes W ), CDM (cid:15)φ, input I s, γ, N, B
1 Initialize I π = I π
θ,W , (cid:15)π = (cid:15), π ∈ Π, (cid:15) ∼ N (0, 1)
for t = tmax . . . tmin do
2
3
4
5
6
7
for π ∈ Π do
Z π = αtI π + σt(cid:15)π;
(cid:15)π = (cid:15)φ(Z π, I s) + γσt/αt * (I π − I π
I π = (Z π − σt(cid:15)π)/αt
θ,W )
for n = 1 . . . N do
for b = 1 . . . B do
Sample a view π ∼ Π and sample a ray r from π;
(cid:80)
θ,W (r) − I π(r)(cid:107)2
2
Update θ, W with ∇θ,W
π,r (cid:107)I π
1
B
(cid:104)
(cid:105)
− 1
P(x), 2 * xz−tn
tf−tn
∈ [−1, 1]3, and tn, tf are
where ̃x =
the near and far bounds of the input camera (Eq. (1)). As
this representation is expressive in the sense that it can allo-
cate depth information in the xz, yz planes, no additional
positional encoding ξpos(x) is needed to augment the repre-
sentation, and the deep MLP network can be replaced with a
shallow MLP network. This not only makes high-resolution
image rendering efficient (§ 4.2) but also enables fast NeRF
finetuning, which will be elaborated in § 4.4. Furthermore,
modeling triplanes in the camera space of the input image
has the following benefits: (1) The triplane can naturally
preserve the local image features, same as pixelNeRF (Yu
et al., 2021); (2) we do not need to assume a global coor-
dinate system, and global camera poses, which is different
from existing triplane-based methods (Chan et al., 2021;
Chen et al., 2022; Bautista et al., 2022).
Note that, for the image encoder, we adopt a UNet architec-
ture (Ronneberger et al., 2015; Nichol & Dhariwal, 2021)
rather than a pre-trained ResNet (He et al., 2016) used in Yu
et al. (2021). Thanks to the U-connection and self-attention
blocks, the output layer feature W = eψ(I) contains both
the local and global information that is essential for predict-
ing occluded views, which works similarly to the feature
extractors in Lin et al. (2023). See Figure 3 for details.
4.2. 3D-aware Conditional Diffusion Models
While single-image NeRF produces multi-view consistent
images, the outputs tend to be blurry due to the uncertainty
issue (§ 3.1). To address the uncertainty issue, we model
a 3D-aware CDM as the second part of NerfDiff, which
resolves uncertainty through a generative process. Specifi-
cally, the CDM is learned to iteratively refine the rendering
of single-image NeRF to match the target views.
Compared to existing geometry-free methods (Watson et al.,
2022), we avoid the "alignment" problem by applying
single-image NeRF to render the target-view images as
the conditioning to CDM rather than using the input-view
image as conditioning. As shown in Figure 3, we adopt the
1The xy plane is aligned with the input image, while the xz
and yz planes are orthogonal to the xy plane and each other.
8 return θ, W
standard conditional UNet architecture (Nichol & Dhariwal,
2021) where the noisy image is concatenated with the ren-
dered image. Similar to Watson et al. (2022), we can also
employ cross-attention blocks between the CDM UNet and
the encoder UNet to strengthen the conditioning. Note that
the efficiency of the triplane rendering (see Table 3) allows
the NeRF to be trained in tandem with the CDM, which
would take far too long otherwise.
4.3. Training Phase
θ,ψ,φ = λICLIC
Given a collection of scenes where each scene has at least
two views, we train end-to-end by combining Equations (3)
and (4): LTrain
to optimize the
single-image NeRF and CDM jointly. Note that the training
of single-image NeRF receives supervision from both the
photometric error LIC
θ,ψ and the CDM denoising loss LDM
φ .
See Figure 2 (left) for details.
θ,ψ + λDMLDM
φ
4.4. Fine-tuning Phase
While the 3D-aware CDM resolves the uncertainty issue
in the single-image NeRF and thus makes the synthesized
images sharper, it compromises multi-view consistency, as
the 2D diffusion process is independently applied to each
novel view. To synthesize multi-view consistent and high-
quality results, we propose a novel finetuning strategy at
test time to distill the CDM's knowledge.
As shown in Figure 2 (right), given an input view I s of
an unseen scene, we generate a set of "virtual views" with
the trained single-image NeRF and 3D-aware CDM. Then
we finetune the triplane parameters W = eψ(I s) and MLP
parameters θ (pink box in Fig. 3) with the generated virtual
views. Here, we treat W as learnable parameters. It per-
forms best when virtual views cover the region of interest.
NeRF Guided Distillation A naive optimization strategy
is the same as that in Mildenhall et al. (2020) (Eq. (2)), i.e.,
replacing the targets with the "virtual views" sampled from
the CDM. We found that this naive optimization typically
leads to noisy results with severe floating artifacts, as the
NerfDiff: Single-image View Synthesis with NeRF-guided Distillation from 3D-aware Diffusion
ShapeNet Cars
ShapeNet Chairs
PSNR↑ SSIM↑ LPIPS↓ FID↓ PSNR↑ SSIM↑ LPIPS↓ FID↓ PSNR↑ SSIM↑ LPIPS↓ FID↓
Amazon-Berkeley Objects
LFN (Sitzmann et al., 2021)∗
3DiM (Watson et al., 2022)∗
22.42
21.01
SRN (Sitzmann et al., 2019a)
22.25
23.17
PixelNeRF (Yu et al., 2021)
CodeNeRF (Jang & Agapito, 2021) 22.73
22.83
FE-NVS (Guo et al., 2022)
22.88
VisionNeRF (Lin et al., 2023)
NerfDiff-B (Ours)
w/o NGD
NerfDiff-L (Ours)
w/o NGD
23.51
23.81
23.76
23.95
0.89
0.57
0.88
0.89
0.89
0.91
0.90
0.92
0.92
0.92
0.92
–
–
–
8.99
22.26
17.05
0.129 41.21 22.89
0.146 59.24 23.72
23.39
–
0.128
0.099
23.21
–
0.084 21.31 24.48
0.082 18.09 24.79
0.093 42.37 24.77
0.076 15.49 24.95
0.092 43.26 24.80
0.90
0.53
0.89
0.90
0.87
0.92
0.92
0.94
0.93
0.94
0.93
–
–
–
6.57
–
–
0.104 26.51
0.128 38.49
–
0.166
0.077
–
0.077 10.05 28.61
–
–
–
–
0.056
32.81
5.65
0.068 15.72 32.07
0.056
32.84
5.34
0.070 15.50 32.00
–
–
–
–
–
–
0.93
0.96
0.95
0.97
0.96
–
–
–
–
–
–
–
–
–
–
–
–
0.095 33.38
7.77
0.057
0.063 18.01
0.042
6.31
0.061 17.73
Table 1. Comparisons on ShapeNet Cars & Chairs and ABO datasets across baselines. ∗ indicates geometry-free model. The results of the
baselines except VisionNeRF (Lin et al., 2023) are copied from the official papers. – denotes the results are unavailable.
Method
PSNR↑ SSIM↑ LPIPS↓ FID↓
VisionNeRF (Lin et al., 2023) 35.94
34.81
NerfDiff-B (Ours)
0.97
0.97
0.065 11.18
6.76
0.040
Table 2. Quantative results on Clevr3D
inconsistent CDM predictions cause conflicts in optimizing
the NeRF model. Instead, we propose NeRF Guided Distil-
lation (NGD) that alternates between NeRF distillation and
diffusion sampling. Inspired by classifier guidance (Dhari-
wal & Nichol, 2021), we incorporate 3D consistency into
multi-view diffusion by considering the joint distribution
for each virtual view I:
pφ(Zt, Iθ,W |I s) = pφ(Zt|I s) * p(Iθ,W |Zt, I s)
2 (cid:107)It−Iθ,W (cid:107)2
2,
∝ pφ(Zt|I s) * e− γ
(6)
where It = (Zt − σt(cid:15)φ(Zt, I s))/αt is the predicted target
image at the intermediate timestep. The second term intro-
duces multi-view constraints from a given NeRF. Therefore,
the goal is to find NeRF parameters (θ, W ) that maximize
Eq. (6) while sampling the most likely virtual views (Zt)
from the joint distribution. In practice, we adopt an iterative-
based updating rule at each diffusion step t. For generating
virtual views with the CDM, we follow the modified diffu-
sion score derived from Eq. (6):
to minimizing the MSE loss between the denoised images
It and the NeRF renderings Iθ,W across all virtual views:
θ,W = Eπ∼Π,r∼R(I π
LFT
t )(cid:107)I π
θ,W (r) − I π
t (r)(cid:107)2
2,
(8)
t , I π
where Π is a prior distribution on the relative camera poses
to the input and I π
θ,W are the corresponding images at
the relative camera π. Note that to reduce computation,
we sample the rays r with batch size B from all views,
supervise only the corresponding pixels, and finetune for N
steps. The algorithm details are shown in Algorithm 1.
Relationship to SDS Our method shares similarities with
the recently proposed score distillation sampling (SDS,
Poole et al., 2022). Although SDS also distills the dif-
fusion models into 3D, there is a fundamental difference. In
SDS, a random-scaled noise is injected into NeRF's output
from a random angle. The noised image is then denoised
by a 2D diffusion model to provide supervision. In contrast,
our method initializes a set of virtual views and uses NeRF
to guide the diffusion process of each view (and alternat-
ingly refines NeRF based on this diffusion). As a result,
our pipeline completes the full diffusion trajectory for every
view, following a naturally decreasing noise schedule. In
Appendix E, we show additional comparisons and potential
reasons SDS is practically worse than our method.
̃(cid:15)φ(Zt, I s) = (cid:15)φ(Zt, I s) + γ
σt
αt
(It − Iθ,W ),
(7)
5. Experiments
where ̃(cid:15)φ will be used in regular DDIM sampling (Song
et al., 2020) 2. Note that for γ = α2
t (SNR), following
the modified score Eq. (7) is equivalent to replacing the
denoised images with the NeRF rendering. For distilling
NeRF, we directly maximize the log-likelihood of this joint
distribution w.r.t. the NeRF parameters, which is equivalent
t /σ2
2We consider ∂It/∂Zt ≈ 1/αt to avoid backpropagation
through the UNet, similar to DreamFusion (Poole et al., 2022).
5.1. Experimental Settings
Datasets We evaluate NerfDiff on three benchmarks –
SRN-ShapeNet (Sitzmann et al., 2019a), Amazon-Berkeley
Objects (ABO, Collins et al., 2022) and Clevr3D (Stelzner
et al., 2021) – for testing novel view synthesis under single-
category, category-agnostic, and multi-object settings, re-
spectively. SRN-ShapeNet includes two categories: Cars
and Chairs. Dataset details are given in Appendix A.
NerfDiff: Single-image View Synthesis with NeRF-guided Distillation from 3D-aware Diffusion
Figure 4. A qualitative comparison of our approach versus baselines in single-image view synthesis on multiple datasets. Compared to 3D
methods like VisionNeRF (Lin et al., 2023) and Ours(w/o NGD), our proposed NerfDiff synthesizes significantly sharper results behind
occlusions. Compared to Ours (CDM), our full model showcases its built-in multi-view consistency. The red arrows display the CDM's
inability to synthesize consistently across views.
Method
Image encoding Rendering
Method
PixelNeRF (Yu et al., 2021)
VisionNeRF (Lin et al., 2023)
NerfDiff-B
NerfDiff-L
0.007s
0.015s
0.024s
0.031s
1.639s
0.678s
0.018s
0.018s
Table 3. Comparison of encoding and rendering speed on
ShapeNet Cars dataset between models.
Baselines We choose the pixel-aligned method Vision-
NeRF (Lin et al., 2023) as the main baseline for comparison
considering its state-of-the-art performance in single-image
view synthesis. We additionally evaluate our proposed
single-image NeRF without the fine-tuning stage (denoted as
"Ours (w/o NGD)"), Furthermore, show qualitative results
from the CDM prediction without NeRF guidance (denoted
as "Ours (CDM)"). Besides, we include publicly-available
results for other methods such as SRNs (Sitzmann et al.,
2019a), CodeNeRF (Jang & Agapito, 2021), FE-NVS (Guo
et al., 2022), and geometry-free approaches LFN (Sitzmann
et al., 2021) and 3DiM (Watson et al., 2022).
Evaluation Metrics We evaluate our model and the base-
lines by comparing the generated images and target views
given a single image, and the relative target camera poses
PSNR↑ SSIM↑ LPIPS↓ FID↓
23.81
0.915
0.093 42.37
No Fine-tuning
Fine-tuning
23.46
Direct distillation
w. SDS (Poole et al., 2022) 20.32
23.51
w. NGD (Ours)
0.911
0.882
0.917
0.105 35.88
0.106 28.06
0.082 18.09
Table 4. Ablation on fine-tuning strategy on ShapeNet-Cars.
as input. We report four standard metrics: PSNR, SSIM,
LPIPS (Zhang et al., 2018), and FID (Heusel et al., 2017).
PSNR measures the mean-squared error per pixel, while
SSIM measures the structural similarity; LPIPS is a deep
metric that reflects the perceptual similarity between im-
ages. Finally, FID measures the similarity between the
distribution of the rendered and ground truth images of all
test scenes. Note that generative frameworks–due to their
multimodal nature–generally perform poorly with respect to
PSNR, which prioritizes proximity to the mean pixel values.
5.2. Main Results
We show results with two variant sizes (NerfDiff-B:∼ 400M
parameters, NerfDiff-L:∼ 1B parameters). Details of the
ShapeNet ChairsOurs (w/o NGD)VisionNeRFOursGround TruthOurs (CDM)Input ViewShapeNet CarsABONerfDiff: Single-image View Synthesis with NeRF-guided Distillation from 3D-aware Diffusion
Figure 5. A qualitative comparison on Clevr3d (Stelzner et al., 2021) which consists of images from cameras rotated 120 degrees about the
z-axis. We showcase generalization to OOD cameras in this figure. As can be seen, VisionNeRF gets a degenerate result, while NerfDiff
provides sharper renderings with fewer artifacts.
# virtual views
5
10
25
50
100 w/o NGD
PSNR↑
SSIM↑
LPIPS↓
FID↓
22.86 23.16 23.34 23.51 23.55
0.901 0.913 0.915 0.917 0.916
0.095 0.085 0.083 0.083 0.087
27.41 16.04 17.14 18.09 19.13
23.81
0.915
0.093
42.37
Table 5. Comparison on the number of virtual views used for fine-
tuning on ShapeNet Cars.
implementation specifics are given in Appendix B.
Quantitative evaluation Tables 1 and 2 show the quan-
titative comparisons of our proposed models to the SoTA
geometry-free and single-view NeRF methods on all three
datasets. The quantitative scores of the baselines are copied
from the official papers if available. Our proposed NerfDiff
(with and without NGD finetuning) significantly outperform
all baselines in PSNR and SSIM, displaying the models'
ability to synthesize accurate pixel-level details with the
local triplane representations. Additionally, in LPIPS, our
proposed NerfDiff is better than all previous approaches
indicating its ability to create perceptually correct comple-
tions behind occlusions. Finally, about FID, our method
outperforms all single-view NeRF methods, only having
worse scores than 3DiM on ShapeNet-Cars as it is purely
2D. Note that, as mentioned in the original paper (Watson
et al., 2022), 3DiM cannot generalize well to the out-of-
the-distribution testing cameras of ShapetNet-Chairs, thus
performing poorly. In contrast, with the 3D-aware CDM,
our approach can easily handle unseen viewpoints. In addi-
tion, the proposed NGD finetuning, while slightly hurting
PSNR in some cases, significantly improves the sharpness
of the results, thus resulting in better FID and LPIPS scores.
Besides, scaling the model size up further yields higher
perceptual quality.
Qualitative evaluation Figure 4 displays the qualitative
comparison of our approach to the main baseline, Vision-
NeRF (Lin et al., 2023), and two ablated models. Our
method produces much more detailed results than the
ablated model single-image NeRF and VisionNeRF on
ShapeNet and ABO. Due to their reliance on projected im-
age features, these methods cannot handle uncertainty be-
hind occlusion and thus regress mean pixel values, resulting
in blurry renderings. The CDM results are worse aligned
and inconsistent across views, as demonstrated by the red
arrows in Figure 4. Figure 5 shows additional qualitative
results on Clevr3D. Our method again shows consistent and
high-quality renderings. At the same time, VisionNeRF
VisionNeRFOurs (w/o NGD)Ours (CDM)OursInput View36°96°210°312°NerfDiff: Single-image View Synthesis with NeRF-guided Distillation from 3D-aware Diffusion
overfits the camera distribution and fails to synthesize view-
points close to the input (see Appendix B for more details).
The CDM results are again inconsistent with objects ap-
pearing and disappearing. Please refer to the supplemen-
tary materials for uncurated and extensive video results
showing the multiview consistency and high fidelity of our
method.
5.3. Ablation Studies
We provide ablations on the Shapenet-Cars dataset to vali-
date our model's key design choices, making our ablation
results directly comparable to the ShapeNet Cars results
in Figure 4. In Table 4, we compare our model without
any CDM-based finetuning and various CDM-based fine-
tuning strategies. As seen in the results, finetuning with a
CDM will improve the unconditional FID. However, only
our NGD sampling will yield the state-of-the-art conditional
SSIM and LPIPS. For details of the sampling baselines Di-
rect Distillation and SDS compared to our NGD, please see
Appendix E. Figure 6 also provides a qualitative comparison.
Next, in Table 5, we also provide ablations on the number
of virtual views for finetuning. With too few (e.g. 5) virtual
views, the NeRF overfits the denoised images resulting in
subpar renderings. We find that 50 virtual views provide a
good tradeoff between efficiency and performance.
6. Discussion
Limitations Our proposed method has two main limita-
tions. Firstly, we require at least two views of a scene at
training time. Secondly, our finetuning process is expensive
in time, limiting application in real-time domains. Future
work may address these issues.
Future work For future research, it is also possible to
investigate our proposed NGD to improve the fidelity of
text-to-3D pipelines (Jain et al., 2022; Poole et al., 2022;
Lin et al., 2022). Additionally, more complex datasets such
as the Waymo Open Dataset (Sun et al., 2020) may be
explored, leaving the challenging task of occlusion-handling
to large-scale pretrained 2D diffusion models as we do in
this paper. Also, incorporating our finetuning strategy in the
context of 3D GANs (Gu et al., 2021; Chan et al., 2021) may
improve inversion performance and 3D editing capabilities
as well. Finally, it may also be interesting to figure out how
to properly incorporate priors such as symmetry.
7. Conclusion
We introduced NerfDiff, a generative framework for single-
image view synthesis which distills a 3D-aware CDM to a
triplane-based image-conditioned NeRF. We further intro-
duced NeRF-guided distillation to sample multiple views
from the CDM while simultaneously improving the NeRF
renderings. Our method achieved the state-of-the-art results
on multiple challenging benchmarks.
References
Anciukevicius, T., Xu, Z., Fisher, M., Henderson, P., Bilen,
H., Mitra, N. J., and Guerrero, P. RenderDiffusion: Image
diffusion for 3D reconstruction, inpainting and generation.
arXiv, 2022.
Bautista, M. A., Guo, P., Abnar, S., Talbott, W., Toshev,
A., Chen, Z., Dinh, L., Zhai, S., Goh, H., Ulbricht, D.,
Dehghan, A., and Susskind, J. Gaudi: A neural architect
for immersive 3d scene generation. arXiv, 2022.
Cai, S., Obukhov, A., Dai, D., and Van Gool, L. Pix2nerf:
Unsupervised conditional π-gan for single image to
arXiv preprint
neural radiance fields translation.
arXiv:2202.13162, 2022.
Chan, E. R., Lin, C. Z., Chan, M. A., Nagano, K., Pan,
B., De Mello, S., Gallo, O., Guibas, L., Tremblay, J.,
Khamis, S., et al. Efficient geometry-aware 3d generative
adversarial networks. arXiv preprint arXiv:2112.07945,
2021.
Chen, A., Xu, Z., Geiger, A., Yu, J., and Su, H. Tensorf: Ten-
sorial radiance fields. arXiv preprint arXiv:2203.09517,
2022.
Chen, S. and Williams, L. View Interpolation for Image
Synthesis. In SIGGRAPH 93, pp. 279–288, 1993.
Collins, J., Goel, S., Deng, K., Luthra, A., Xu, L., Gun-
dogdu, E., Zhang, X., Yago Vicente, T. F., Dideriksen, T.,
Arora, H., Guillaumin, M., and Malik, J. Abo: Dataset
and benchmarks for real-world 3d object understanding.
CVPR, 2022.
Deng, C., Jiang, C., Qi, C. R., Yan, X., Zhou, Y., Guibas,
L., Anguelov, D., et al. Nerdi: Single-view nerf synthesis
with language-guided diffusion as general image priors.
arXiv preprint arXiv:2212.03267, 2022.
Dhariwal, P. and Nichol, A. Diffusion models beat gans
on image synthesis. Advances in Neural Information
Processing Systems, 34:8780–8794, 2021.
Dupont, E., Martin, M. B., Colburn, A., Sankar, A.,
Susskind, J., and Shan, Q. Equivariant neural render-
ing. In International Conference on Machine Learning,
pp. 2761–2770. PMLR, 2020.
Eigen, D., Puhrsch, C., and Fergus, R. Depth Map Pre-
diction from a Single Image using a Multi-Scale Deep
Network. NIPS'14, pp. 1–9, 2014.
NerfDiff: Single-image View Synthesis with NeRF-guided Distillation from 3D-aware Diffusion
Fan, H., Su, H., and Guibas, L. A Point Set Generation
Network for 3D Object Reconstruction from a Single
Image. IEEE Conference on Computer Vision and Pattern
Recognition, pp. 605–613, 2017.
Li, G., Zheng, H., Wang, C., Li, C., Zheng, C., and Tao, D.
3ddesigner: Towards photorealistic 3d object generation
and editing with text-guided diffusion models. arXiv
preprint arXiv:2211.14108, 2022.
Gortler, S., Grzeszczuk, R., Szeliski, R., and Cohen, M. The
Lumigraph. In SIGGRAPH 96, pp. 43–54, 1996.
Gu, J., Liu, L., Wang, P., and Theobalt, C. Stylenerf: A
style-based 3d-aware generator for high-resolution image
synthesis. arXiv preprint arXiv:2110.08985, 2021.
Guo, P., Bautista, M. A., Colburn, A., Yang, L., Ulbricht,
D., Susskind, J. M., and Shan, Q. Fast and explicit neural
view synthesis. In Proceedings of the IEEE/CVF Winter
Conference on Applications of Computer Vision, pp. 3791–
3800, 2022.
He, K., Zhang, X., Ren, S., and Sun, J. Deep Residual
Learning for Image Recognition. IEEE Conference on
Computer Vision and Pattern Recognition, pp. 770–778,
2016.
Heusel, M., Ramsauer, H., Unterthiner, T., Nessler, B., and
Hochreiter, S. Gans trained by a two time-scale update
rule converge to a local nash equilibrium. Advances in
neural information processing systems, 30, 2017.
Ho, J., Jain, A., and Abbeel, P. Denoising diffusion proba-
bilistic models. Advances in Neural Information Process-
ing Systems, 33:6840–6851, 2020.
Ho, J., Chan, W., Saharia, C., Whang, J., Gao, R., Gritsenko,
A., Kingma, D. P., Poole, B., Norouzi, M., Fleet, D. J.,
et al. Imagen video: High definition video generation
with diffusion models. arXiv preprint arXiv:2210.02303,
2022.
Jain, A., Mildenhall, B., Barron, J. T., Abbeel, P., and Poole,
B. Zero-shot text-guided object generation with dream
fields. In Proceedings of the IEEE/CVF Conference on
Computer Vision and Pattern Recognition, pp. 867–876,
2022.
Jang, W. and Agapito, L. Codenerf: Disentangled neural
radiance fields for object categories. In Proceedings of
the IEEE/CVF International Conference on Computer
Vision, pp. 12949–12958, 2021.
Kato, H., Ushiku, Y., and Harada, T. Neural 3D Mesh
IEEE Conference on Computer Vision and
Renderer.
Pattern Recognition, pp. 3907–3916, 2018.
Kingma, D. P. and Ba, J. Adam: A Method for Stochastic
International Conference on Learning
Optimization.
Representations, 2015.
Levoy, M. and Hanrahan, P. Light Field Rendering.
In
SIGGRAPH 96, pp. 31–42, 1996.
Lin, C.-H., Gao, J., Tang, L., Takikawa, T., Zeng, X.,
Huang, X., Kreis, K., Fidler, S., Liu, M.-Y., and Lin,
T.-Y. Magic3d: High-resolution text-to-3d content cre-
ation. arXiv preprint arXiv:2211.10440, 2022.
Lin, K.-E., Yen-Chen, L., Lai, W.-S., Lin, T.-Y., Shih, Y.-C.,
and Ramamoorthi, R. Vision transformer for nerf-based
view synthesis from a single input image. In WACV, 2023.
Liu, A., Tucker, R., Jampani, V., Makadia, A., Snavely,
N., and Kanazawa, A. Infinite nature: Perpetual view
generation of natural scenes from a single image.
In
Proceedings of the IEEE/CVF International Conference
on Computer Vision, pp. 14458–14467, 2021.
Loper, M. M. and Black, M. J. OpenDR: An approximate
differentiable renderer. In Computer Vision – ECCV 2014,
volume 8695 of Lecture Notes in Computer Science, pp.
154–169. Springer International Publishing, 2014.
Loshchilov, I. and Hutter, F. Decoupled weight decay regu-
larization. arXiv preprint arXiv:1711.05101, 2017.
McMillan, L. and Bishop, G. Plenoptic Modeling: An
Image-Based Rendering System. In SIGGRAPH 95, pp.
39–46, 1995.
Mildenhall, B., Srinivasan, P. P., Tancik, M., Barron, J. T.,
Ramamoorthi, R., and Ng, R. Nerf: Representing scenes
as neural radiance fields for view synthesis. In European
conference on computer vision, pp. 405–421. Springer,
2020.
M ̈uller, N., Siddiqui, Y., Porzi, L., Bul`o, S. R., Kontschieder,
P., and Niessner, M. Diffrf: Rendering-guided 3d radiance
field diffusion. arXiv preprint arXiv:2212.01206, 2022a.
M ̈uller, N., Simonelli, A., Porzi, L., Bul`o, S. R., Niessner, M.,
and Kontschieder, P. Autorf: Learning 3d object radiance
In Proceedings
fields from single view observations.
of the IEEE/CVF Conference on Computer Vision and
Pattern Recognition, pp. 3971–3980, 2022b.
Nichol, A., Jun, H., Dhariwal, P., Mishkin, P., and Chen,
M. Point-e: A system for generating 3d point clouds
from complex prompts. arXiv preprint arXiv:2212.08751,
2022.
Nichol, A. Q. and Dhariwal, P. Improved denoising diffusion
In International Conference on
probabilistic models.
Machine Learning, pp. 8162–8171. PMLR, 2021.
NerfDiff: Single-image View Synthesis with NeRF-guided Distillation from 3D-aware Diffusion
Poole, B., Jain, A., Barron, J. T., and Mildenhall, B. Dream-
fusion: Text-to-3d using 2d diffusion. arXiv preprint
arXiv:2209.14988, 2022.
Shue, J. R., Chan, E. R., Po, R., Ankner, Z., Wu, J., and
Wetzstein, G. 3d neural field generation using triplane
diffusion. arXiv preprint arXiv:2211.16677, 2022.
Ramesh, A., Dhariwal, P., Nichol, A., Chu, C., and Chen,
M. Hierarchical text-conditional image generation with
clip latents. arXiv preprint arXiv:2204.06125, 2022.
Rematas, K., Martin-Brualla, R., and Ferrari, V. ShaRF:
Shape-conditioned Radiance Fields from a Single View.
ICML, 2021.
Rockwell, C., Fouhey, D. F., and Johnson, J. Pixelsynth:
Generating a 3d-consistent experience from a single im-
age. In Proceedings of the IEEE/CVF International Con-
ference on Computer Vision, pp. 14104–14113, 2021.
Rombach, R., Blattmann, A., Lorenz, D., Esser, P., and
Ommer, B. High-resolution image synthesis with latent
diffusion models, 2021a.
Rombach, R., Esser, P., and Ommer, B. Geometry-
Free View Synthesis: Transformers and no 3D Priors.
arXiv:2104.07652, 2021b.
Rombach, R., Esser, P., and Ommer, B. Geometry-free view
synthesis: Transformers and no 3d priors. In Proceedings
of the IEEE/CVF International Conference on Computer
Vision, pp. 14356–14366, 2021c.
Ronneberger, O., Fischer, P., and Brox, T. U-Net : Convo-
lutional Networks for Biomedical Image Segmentation.
International Conference on Medical Image Computing
and Computer-Assisted Intervention, pp. 234–241, 2015.
Saharia, C., Chan, W., Saxena, S., Li, L., Whang, J., Denton,
E., Ghasemipour, S. K. S., Ayan, B. K., Mahdavi, S. S.,
Lopes, R. G., et al. Photorealistic text-to-image diffusion
models with deep language understanding. arXiv preprint
arXiv:2205.11487, 2022.
Sajjadi, M. S. M., Meyer, H., Pot, E., Bergmann, U.,
Greff, K., Radwan, N., Vora, S., Lucic, M., Duck-
worth, D., Dosovitskiy, A., Uszkoreit, J., Funkhouser,
T., and Tagliasacchi, A. Scene Representation Trans-
former: Geometry-Free Novel View Synthesis Through
Set-Latent Scene Representations. CVPR, 2022. URL
https://srt-paper.github.io/.
Salimans, T. and Ho, J.
fast sampling of diffusion models.
arXiv:2202.00512, 2022.
Progressive distillation for
arXiv preprint
Sitzmann, V., Zollh ̈ofer, M., and Wetzstein, G. Scene Rep-
resentation Networks: Continuous 3D-Structure-Aware
Neural Scene Representations. Advances in Neural Infor-
mation Processing Systems, pp. 1119–1130, 2019a.
Sitzmann, V., Zollh ̈ofer, M., and Wetzstein, G. Scene Rep-
resentation Networks: Continuous 3D-Structure-Aware
Neural Scene Representations. Advances in Neural Infor-
mation Processing Systems, pp. 1119–1130, 2019b.
Sitzmann, V., Rezchikov, S., Freeman, W. T., Tenenbaum,
J. B., and Durand, F. Light Field Networks : Neural
Scene Representations with Single-Evaluation Rendering.
arXiv:2106.02634, 2021.
Sohl-Dickstein, J., Weiss, E., Maheswaranathan, N., and
Ganguli, S. Deep unsupervised learning using nonequi-
librium thermodynamics. In International Conference on
Machine Learning, pp. 2256–2265. PMLR, 2015.
Song, J., Meng, C., and Ermon, S. Denoising diffusion
implicit models. arXiv preprint arXiv:2010.02502, 2020.
Song, Y. and Ermon, S. Generative modeling by estimating
gradients of the data distribution. Advances in Neural
Information Processing Systems, 32, 2019.
Stelzner, K., Kersting, K., and Kosiorek, A. R. Decom-
posing 3d scenes into objects via unsupervised volume
segmentation. arXiv preprint arXiv:2104.01148, 2021.
Suhail, M., Esteves, C., Sigal, L., and Makadia, A. Gen-
In European
eralizable patch-based neural rendering.
Conference on Computer Vision, pp. 156–174. Springer,
2022.
Sun, P., Kretzschmar, H., Dotiwalla, X., Chouard, A., Pat-
naik, V., Tsui, P., Guo, J., Zhou, Y., Chai, Y., Caine, B.,
et al. Scalability in perception for autonomous driving:
Waymo open dataset. In Proceedings of the IEEE/CVF
conference on computer vision and pattern recognition,
pp. 2446–2454, 2020.
Tatarchenko, M., Dosovitskiy, A., and Brox, T. Octree
Generating Networks: Efficient Convolutional Architec-
tures for High-resolution 3D Outputs. IEEE International
Conference on Computer Vision, pp. 2088–2096, 2017.
Trevithick, A. and Yang, B. GRF: Learning a General
Radiance Field for 3D Representation and Rendering.
International Conference on Computer Vision, 2021.
Saxena, A., Sun, M. S. M., and Ng, A. Y. a. Learning 3-D
Scene Structure from a Single Still Image. IEEE PAMI,
31(5):824–840, 2009. ISSN 1550-5499. doi: 10.1109/
ICCV.2007.4408828.
Tulsiani, S., Zhou, T., Efros, A. A., and Malik, J. Multi-view
Supervision for Single-view Reconstruction via Differen-
tiable Ray Consistency. IEEE Conference on Computer
Vision and Pattern Recognition, pp. 2626–2634, 2017.
NerfDiff: Single-image View Synthesis with NeRF-guided Distillation from 3D-aware Diffusion
Wang, H., Du, X., Li, J., Yeh, R. A., and Shakhnarovich,
Score jacobian chaining: Lifting pretrained 2d
arXiv preprint
G.
diffusion models for 3d generation.
arXiv:2212.00774, 2022.
Watson, D., Chan, W., Martin-Brualla, R., Ho, J., Tagliasac-
chi, A., and Norouzi, M. Novel view synthesis with dif-
fusion models. arXiv preprint arXiv:2210.04628, 2022.
Wiles, O., Gkioxari, G., Szeliski, R., and Johnson, J. SynSin:
End-to-end View Synthesis from a Single Image. IEEE
Conference on Computer Vision and Pattern Recognition,
2020.
Xu, D., Jiang, Y., Wang, P., Fan, Z., Shi, H., and
Wang, Z. Sinnerf: Training neural radiance fields on
complex scenes from a single image. arXiv preprint
arXiv:2204.00928, 2022.
Yan, X., Yang, J., Yumer, E., Guo, Y., and Lee, H. Perspec-
tive Transformer Nets: Learning Single-View 3D Object
Reconstruction without 3D Supervision. Advances in
Neural Information Processing Systems, pp. 1696–1704,
2016.
Yu, A., Ye, V., Tancik, M., and Kanazawa, A. pixelNeRF:
Neural Radiance Fields from One or Few Images. IEEE
Conference on Computer Vision and Pattern Recognition,
2021.
Zhang, R., Isola, P., Efros, A. A., Shechtman, E., and Wang,
O. The Unreasonable Effectiveness of Deep Features as a
Perceptual Metric. IEEE Conference on Computer Vision
and Pattern Recognition, pp. 586–595, 2018.
Zhou, Z. and Tulsiani, S. Sparsefusion: Distilling view-
arXiv
conditioned diffusion for 3d reconstruction.
preprint arXiv:2212.00792, 2022.
Zhuang, P., Abnar, S., Gu, J., Schwing, A., Susskind, J. M.,
and Bautista, M. ́A. Diffusion probabilistic fields. In
International Conference on Learning Representations,
2023. URL https://openreview.net/forum?
id=ik91mY-2GN.
Appendix
A. Datasets
We validate our NerfDiff algorithm across three datasets.
The details of each are given in the following subsections.
A.1. ShapeNet
ShapeNet-Cars and -Chairs (Sitzmann et al., 2019a) are
standard for few-shot view synthesis benchmarking. We use
the data hosted by pixelNeRF (Yu et al., 2021), which can
be downloaded from GitHub (https://github.com/
sxyu/pixel-nerf). The chairs dataset consists of 6591
scenes, and the cars dataset has 3514 scenes, both with a
predefined train/val/test split. Each training scene contains
50 posed images taken from random points on a sphere.
Each testing scene contains 250 posed images taken on an
Archimedean spiral along the sphere. All scenes share intrin-
sic, and images are rendered at a resolution of (128, 128).
At testing, we choose one pose as input (index 64) and keep
this camera input constant for all scenes.
A.2. Amazon Berkeley Objects (ABO)
We also consider
(Collins et al.,
the ABO dataset
2022) from https://amazon-berkeley-objects.
s3.amazonaws.com/index.html under
the title
"ABO 3D Renderings." We randomly sampled a custom
split. The dataset thus consists of 6743 training scenes,
396 validation scenes, and 794 testing scenes. Each scene
consists of 30 images of an object rendered onto a white
background in a physically-based manner. The objects are
drawn from 64 different object categories, providing an
extensive evaluation of the generalization capabilities of
various models. The images have resolution (256, 256), and
we crop and adjust the intrinsics so that the models are fed
with images of size (128, 128). The cameras are not uni-
formly distributed, but all point at the object. For testing,
we use an input camera index of 0.
A.3. Clevr3D
We consider the Clevr3D dataset provided in (Stelzner et al.,
2021) for multi-object/scene level learning, which can be
downloaded from the github https://github.com/
stelzner/obsurf. We define a custom split in which
there are 70000 training scenes and 1000 held-out testing
scenes. Each scene consists of 3 posed images at a resolution
of (120, 160) with the camera pointing at the origin. These
images are rendered at 120 degree rotations about the z-axis
with varying distances from the origin. We select one input
image (index 0) at testing and render the other two views.
NerfDiff: Single-image View Synthesis with NeRF-guided Distillation from 3D-aware Diffusion
B. Implementation Details
B.1. Architecture and Hyperaparameters
For all datasets, we learn NerfDiff based on the U-Net archi-
tecture adopted from ADM (Dhariwal & Nichol, 2021) with
two sets of configurations (-B: base ∼ 400M parameters,
-L: large ∼ 1B parameters). More specifically, we set the
model dimension d = 192 with 2 residual blocks per reso-
lution for the base architecture and d = 256 with 3 residual
blocks per resolution for the large architecture. All other
hyperparameters follow the default setting as ADM.
Note that the image encoder retains the same architecture
and hyperparameters as the CDM outlined above. Similar
to (Watson et al., 2022), we incorporate a cross-attention
module between the CDM and the image encoder after every
attention block to strengthen the conditioning. The last
layer output of the image encoder is reshaped to a triplane.
As a result, the triplane has the same spatial resolution as
the input image, and we set the feature dimension of the
triplane as 48. We implement the NeRF module (pink box
in Fig. 3) using a 2-layer MLP with a hidden size of 64. For
NeRF rendering, we follow Lin et al. (2023) and uniformly
sample 64 points along each ray, with 64 additional points
by importance sampling. As mentioned in § 4.2, we directly
concat the NeRF rendered image with the noised input and
send it to the CDM for denoising.
B.2. Training phase
The CDM is trained with cosine noise schedule αt =
cos(0.5πt) based on velocity prediction (Salimans & Ho,
2022). We set λIC = λDM = 1, which means that we add
the two losses of the two modules without re-weighting. All
models are trained using AdamW (Loshchilov & Hutter,
2017) with a learning rate of 2e−5 and an EMA decaying
rate of 0.9999. We train all models with a batch size of 32
images for 500K iterations on 8 A100 GPUs. Training takes
3 − 4 days to finish for base models.
Note that for the Clevr3D dataset (Stelzner et al., 2021), we
noticed that the models tended to overfit to the input view
easily, creating a plane of density orthogonal to the camera
axis and thus clearly degenerate geometry. To ameliorate
this, we trained input view reconstruction with slightly noisy
camera locations (variance 0.3). We found that this fixed the
issue for our method, but it still failed for VisionNeRF (Lin
et al., 2023), even after increasing the noise.
B.3. Finetuning phase
When finetuning with NGD, we define K virtual views rela-
tive to the input image by sampling near the test trajectory.
By default, we set K = 50 for shapeNet and Clevr3D and
30 for ABO. See Appendix C for specific K per dataset
and how to obtain these poses. For the multiview diffusion
process, we run 64 DDIM (Song et al., 2020) steps with the
CDM for each view, respectively. At every diffusion step,
we update the NeRF parameters N = 64 steps, with a batch
size of B = 4096 rays. We use Adam optimizer (Kingma
& Ba, 2015) set the learning rates for NeRF MLPs 1e − 4
and the triplane features 5e − 2, respectively. Our empirical
results indicate that a large learning rate on a triplane can
boost the finetuning efficiency.
C. Prior Relative Camera Distribution Π
In order to approximate the expectation in Eq. (8), we re-
quire a sampling of Π, i.e., a sampling of K 'important'
or 'relevant' cameras, which adequately capture the region
of interest. For each of the three datasets, we rely on the
relative (to the input) camera poses of the testing set for this.
The cameras are very different between datasets, requiring
a slightly different procedure.
ShapeNet Because the Shapenet testing trajectory is an
Archimedean spiral around the object consisting of 251
views, we simply uniformly sample every 5th camera yield-
ing 50 cameras total from which we can approximate Π,
thus yielding K = 50 cameras to approximate Eq. (8).
Amazon Berkeley Objects (ABO) Because each scene
contains only 30 cameras, we use all the relative poses of
the testing set (K = 30) to approximate Eq. (8).
Clevr3D As Clevr3D contains only three cameras per
scene, creating a good sample of Π is slightly more difficult.
As we know, all of the Clevr3D cameras are pointing at the
origin; we can calculate the relative position of the world
origin in camera coordinates by intersecting two of the op-
tical axes of the relative cameras. This will serve as the
look-at-point for our virtual cameras. Note that the Clevr
cameras are additionally all of a similar height relative to the
ground plane of the scene. Thus, we can approximate the up
direction in camera coordinates by taking the normal plane
containing all three cameras. In order to resolve uncertainty
about whether this is the up direction or its negation, we
check that the cosine similarity with the camera directions
is negative, as they lie in the upper halfspace in world coor-
dinates. Given a camera center in camera coordinates, we
can thus create a camera pose. To define these centers, we
uniformly sample a circle in the plane containing all three
cameras, which approximately goes through each one (the
radius is the mean distance from the approximate world ori-
gin). We choose K = 50 camera centers and create camera
poses with the estimated world origin and up direction for
the finetuning process. We use these to approximate Eq. (8).
NerfDiff: Single-image View Synthesis with NeRF-guided Distillation from 3D-aware Diffusion
Figure 6. Qualitative examples of ablation studies on fine-tuning strategy. FT refers to finetuning. The red arrow shows floating and noisy
artifacts due to learning from inconsistent CDM predictions.
D. Details of Baseline Methods
E. Additional Comparison Details
The baselines are shown in Table. 1, we gathered the error
metrics of LFN (Sitzmann et al., 2021), 3DiM (Watson et al.,
2022) on the ShapeNet dataset from their respective papers.
As for SRN (Sitzmann et al., 2019b), PixelNeRF (Yu et al.,
2021), CodeNeRF (Jang & Agapito, 2021), FE-NVS (Guo
et al., 2022), and VisionNeRF (Lin et al., 2023), we obtain
the ShapeNet results from the VisionNeRF paper and con-
duct FID calculation using the renderings provided by the
authors of PixelNeRF and VisionNeRF. Moreover, to com-
pare against VisionNeRF on the ABO and Clevr3D datasets,
we used its publicly available source code and modified the
dataloader accordingly. For training, we use the same hyper-
parameter setup denoted by the VisionNeRF paper. Namely,
we set the image feature channels to 512. The learning rate
of the feature extractor is set to 1e−5 and MLP to 1e−4.
We keep the same learning rate schedule and apply warm-
up and decay, as shown in the original paper. We trained
VisionNeRF for 500k steps on the ABO dataset and 250k
steps on the Clevr3D dataset since we found it easier to
overfit the Clevr3D scenes. Moreover, we also adjusted the
batch and ray bundle sizes to fit into the GPU memory.
E.1. Importance of 3D-aware Diffusion
In Table 6, we showed the comparison with different CDM
architectures. "Concat" means directly concat the input
view with the noisy image, while "Cross-attention" adopts a
similar conditioning as X-UNet (Watson et al., 2022). Both
did not involve the volume rendering in the encoding time,
which can be seen as 3D-unaware. The results showed that,
when applying a 3D-aware diffusion model, we can con-
sistently achieve better results and generate more coherent
views based on the input.
Method
PSNR↑ SSIM↑ LPIPS↓ FID↓
No CDM Fine-tuning 23.81
0.915
0.093 42.37
CDM architecture
Concat
Cross-attention
3D-aware (Ours)
20.72
21.13
23.51
0.874
0.885
0.917
0.135 56.27
0.123 35.49
0.082 18.09
Table 6. Experiments of showing importance for 3D-aware CDM
on ShapeNet-Cars.
E.2. Fine-tuning Strategies
In Table 4 and Figure 6, we showed results for multiple
sampling methods for finetuning NeRF. Here we give the
details of these methods.
NerfDiff: Single-image View Synthesis with NeRF-guided Distillation from 3D-aware Diffusion
v.s. Direct distillation For Direct distillation, we directly
sample virtual views from the CDM given the initial pixel-
NeRF renderings and use these to finetune the NeRF directly
with a standard L2 loss. Note that these renderings are un-
likely to be multiview consistent as the denoising process
takes place independently for each. Thus, the resultant ren-
derings are inconsistent and incongruous with the input,
which is also reflected in the learned NeRF.
F. Additional Qualitative Results
Finally, we provide additional qualitative results for our
base single-image models compared with VisionNeRF (Lin
et al., 2023) on ShapeNet Cars (Figure 7), Chairs (Figure 8)
and ABO dataset (Figures 9 and 10). Images are rendered
at a specific viewpoint given a single image input. Please
refer to supplementary materials for more video results.
v.s. Score distillation sampling (SDS) We also com-
pared SDS (Poole et al., 2022), where virtual views are
continually predicted by adding noise directly to renderings
and taking an L2 loss between the NeRF rendering and
the resultant denoised images. Here we note three signifi-
cant differences with SDS, which may result in its poorer
performance:
1. Inconsistent noise schedule. In our method, we only
sample once per view, continually decreasing the noise
with greater NeRF guidance. In contrast, SDS will pro-
vide inconsistent gradient updates as random amounts
of noise are added to the NeRF renderings and then de-
noised, yielding blurry results which regress the mean
of the supervision.
2. The learned score function of the CDM may be in-
adequate. That is to say, the modes of the PDF may
not reflect sharp images of the dataset, causing poorer
results. Our method uses NeRF to guide the process,
which avoids directly seeking a mode.
3. Out-of-distribution inputs. At low noise levels, render-
ing a NeRF with additional noise will not resemble a
real image with a similar amount of noise. Thus, the
inputs to the denoiser may be out-of-distribution. In
contrast, our method uses the CDM to refine the NeRF
during sampling, keeping the samples close to the data
manifold.
v.s. Stochastic Conditioning As shown in the main paper,
naively finetuning the NeRF parameters from the CDM's
generation typically leads to noisy results with severe float-
ing artifacts. It is the inconsistent CDM predictions that
cause conflicts in learning NeRF. Targeting on this, Wat-
son et al. (2022) proposed "stochastic conditioning" – an
autoregressive approach for synthesizing virtual views in
a sequence, where for generating a novel view, each diffu-
sion step stochastically conditions on previously generated
views. Although this model's dependencies are across the
virtual views, the generated images are not guaranteed to
be multiview consistent. Moreover, our initial exploration
showed that the imperfect autoregressive prediction accu-
mulated errors easily, resulting in degenerated results for
long sequences without stable geometry.
NerfDiff: Single-image View Synthesis with NeRF-guided Distillation from 3D-aware Diffusion
Figure 7. Additional examples of single-image view synthesis on ShapeNet Cars.
Ours (w/o NGD)VisionNeRFOursGround TruthInput ViewNerfDiff: Single-image View Synthesis with NeRF-guided Distillation from 3D-aware Diffusion
Figure 8. Additional examples of single-image view synthesis on ShapeNet Chairs.
Ours (w/o NGD)VisionNeRFOursGround TruthInput ViewNerfDiff: Single-image View Synthesis with NeRF-guided Distillation from 3D-aware Diffusion
Figure 9. Additional examples of single-image view synthesis on ABO dataset.
Ours (w/o NGD)VisionNeRFOursGround TruthInput ViewNerfDiff: Single-image View Synthesis with NeRF-guided Distillation from 3D-aware Diffusion
Figure 10. Additional examples of single-image view synthesis on ABO dataset.
Ours (w/o NGD)VisionNeRFOursGround TruthInput View |
|
http://arxiv.org/abs/2302.10106v1 | 2023-02-20T17:08:03 | 2023-02-20T17:08:03 | Towards Understanding the Survival of Patients with High-Grade
Gastroenteropancreatic Neuroendocrine Neoplasms: An Investigation of Ensemble
Feature Selection in the Prediction of Overall Survival | Determining the most informative features for predicting the overall survival
of patients diagnosed with high-grade gastroenteropancreatic neuroendocrine
neoplasms is crucial to improve individual treatment plans for patients, as
well as the biological understanding of the disease. Recently developed
ensemble feature selectors like the Repeated Elastic Net Technique for Feature
Selection (RENT) and the User-Guided Bayesian Framework for Feature Selection
(UBayFS) allow the user to identify such features in datasets with low sample
sizes. While RENT is purely data-driven, UBayFS is capable of integrating
expert knowledge a priori in the feature selection process. In this work we
compare both feature selectors on a dataset comprising of 63 patients and 134
features from multiple sources, including basic patient characteristics,
baseline blood values, tumor histology, imaging, and treatment information. Our
experiments involve data-driven and expert-driven setups, as well as
combinations of both. We use findings from clinical literature as a source of
expert knowledge. Our results demonstrate that both feature selectors allow
accurate predictions, and that expert knowledge has a stabilizing effect on the
feature set, while the impact on predictive performance is limited. The
features WHO Performance Status, Albumin, Platelets, Ki-67, Tumor Morphology,
Total MTV, Total TLG, and SUVmax are the most stable and predictive features in
our study. | [
"Anna Jenul",
"Henning Langen Stokmo",
"Stefan Schrunner",
"Mona-Elisabeth Revheim",
"Geir Olav Hjortland",
"Oliver Tomic"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.10106v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.10106v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.AI"
] | 3
2
0
2
b
e
F
0
2
]
G
L
.
s
c
[
1
v
6
0
1
0
1
.
2
0
3
2
:
v
i
X
r
a
TOWARDS UNDERSTANDING THE SURVIVAL OF PATIENTS WITH
HIGH-GRADE GASTROENTEROPANCREATIC NEUROENDOCRINE
NEOPLASMS: AN INVESTIGATION OF ENSEMBLE FEATURE
SELECTION IN THE PREDICTION OF OVERALL SURVIVAL
A PREPRINT
Anna Jenul
Department of Data Science
Norwegian University of Life Sciences
̊As, Norway
[email protected]
Stefan Schrunner
Department of Data Science
Norwegian University of Life Sciences
̊As, Norway
[email protected]
Henning Langen Stokmo∗
Division of Radiology and Nuclear Medicine
Oslo University Hospital
Oslo, Norway
[email protected]
Mona-Elisabeth Revheim†
Division of Radiology and Nuclear Medicine
Oslo University Hospital
Oslo, Norway
[email protected]
Geir Olav Hjortland
Department of Oncology
Oslo University Hospital
Oslo, Norway
[email protected]
Oliver Tomic
Department of Data Science
Norwegian University of Life Sciences
̊As, Norway
[email protected]
February 21, 2023
ABSTRACT
Determining the most informative features for predicting the overall survival of patients diagnosed
with high-grade gastroenteropancreatic neuroendocrine neoplasms is crucial to improve individual
treatment plans for patients, as well as the biological understanding of the disease. Recently de-
veloped ensemble feature selectors like the Repeated Elastic Net Technique for Feature Selection
(RENT) and the User-Guided Bayesian Framework for Feature Selection (UBayFS) allow the user
to identify such features in datasets with low sample sizes. While RENT is purely data-driven,
UBayFS is capable of integrating expert knowledge a priori in the feature selection process. In this
work we compare both feature selectors on a dataset comprising of 63 patients and 134 features
from multiple sources, including basic patient characteristics, baseline blood values, tumor histol-
ogy, imaging, and treatment information. Our experiments involve data-driven and expert-driven
setups, as well as combinations of both. We use findings from clinical literature as a source of
expert knowledge. Our results demonstrate that both feature selectors allow accurate predictions,
and that expert knowledge has a stabilizing effect on the feature set, while the impact on predictive
performance is limited. The features WHO Performance Status, Albumin, Platelets, Ki-67, Tumor
Morphology, Total MTV, Total TLG, and SUVmax are the most stable and predictive features in our
study.
∗Henning Langen Stokmo is also affiliated with the Institute of Clinical Medicine, University of Oslo, Oslo, Norway
†Mona-Elisabeth Revheim is also affiliated with The Intervention Centre, Oslo University Hospital, Oslo, Norway, and the
Institute of Clinical Medicine, University of Oslo, Oslo, Norway
Feature Selection in High-Grade Gastroenteropancreatic Neuroendocrine Neoplasms
A PREPRINT
1
Introduction
Gastroenteropancreatic (GEP) neuroendocrine neoplasms (NEN) are heterogeneous types of malignancies increas-
ingly common over the last three decades [1, 2]. High-grade GEP NEN encompasses both neuroendocrine tumors
grade 3 (NET G3) and neuroendocrine carcinomas (NEC), where NEC is further subdivided into small cell (SC) and
large cell carcinomas (LC). According to the WHO 2019 Classification of Tumors: Digestive System Tumors, NET
G3 are well differentiated (WD), whilst NEC are poorly differentiated (PD), both with a Ki-67 proliferation index (Ki-
67) > 20% [3]. Although both NET G3 and NEC share features of immunohistochemical staining with chromogranin
A and synaptophysin, they are considered morphologically different [4].
The prognosis for patients with advanced GEP NEC is poor, with a median survival of less than 12 months [5,6], whilst
the prognosis for locoregional GEP NEC is higher; 20.7 months [7]. Numerous recently published studies [5, 8–14]
have shown the prognostic importance of several parameters on overall survival (OS) such as age, performance status
(PS), primary tumor site, tumor differentiation, TNM-stage, serum lactate dehydrogenase (LDH), serum platelet levels,
proliferation marker Ki-67, maximum standardized uptake value (SUVmax), total metabolic tumor volume (tMTV)
and total total lesion glycolysis (tTLG). Establishing more robust prognostic parameters and validating established
parameters is essential to provide optimal care for this patient group.
Forecasting the OS of cancer patients as a major indicator of treatment success by machine learning models is of high
relevance to offering optimal individual treatments for patients. In particular, accurate outcome prediction models
pave the way for decision support in clinical practice. Since GEP NEN are rare, however, the data basis for training
purely data-driven models is limited, leading to problems like overfitting, spurious correlations, and, consequently, to
inaccurate predictions [15–17]. Two major approaches are at hand to overcome these issues: (a) increasing the number
of samples (either by collecting more data or by artificial data augmentation) or (b) reducing the dimensionality of the
feature space. In this work, we elaborate on approach (b), where our method of choice is feature selection. While
general dimensionality reduction methods like Principal Component Analysis [18] transform the data to a new domain
and thereby make identification of influencing factors difficult, feature selection reduces the dimension by subsetting
the dataset by columns. As a result, a subset of the original features is retained, and the interpretability of the data
columns is preserved.
Beyond the obvious benefit that predictive models become tractable, feature selection has the potential to improve
the understanding of biological processes by clinical experts [19]. In particular, feature selectors point to input data
parameters, which are related to explaining the target variable by a data-driven model. This information may either
support or contradict existing hypotheses about the underlying biological processes or disclose previously unknown
relations. The evaluation and interpretation of the findings require close collaboration between clinical experts and
data scientists. However, such an application of feature selectors is still less common in machine learning, where the
focus typically lies exclusively on optimizing performance metrics.
State-of-the-art research in feature selection with applications in healthcare, such as L1 regularization [20], decision
trees [21], Laplace scores [22], or the minimum redundancy-maximum relevance (mRMR) criterion [23], are mainly
data-driven and may suffer from well-known limitations. Among these limitations is the problem that minor changes,
such as the inclusion of new or removal of old samples, may have significant effects on the set of selected features
- the property of feature sets to remain invariant under such changes to the dataset is referred to as feature selection
stability and investigated in [24]. The usage of ensemble feature selectors, which train multiple feature selectors on
subsets of the samples in a dataset, has recently been investigated extensively [25] and achieves a higher feature se-
lection stability compared to a single feature selection run, while retaining a similar predictive performance, as used
e.g., in random forest methods [26]. More recently, this fact has been exploited to introduce more stable feature se-
lection methods tailored for healthcare applications, which offer a large potential with respect to the aspects discussed
above [19, 27].
This paper aims to improve the understanding and insights into the OS in patients with high-grade GEP NEN by
applying recently developed ensemble feature selection techniques. Specifically, we evaluate the Repeated Elastic Net
Technique for Feature Selection (RENT) [27], as well as the User-Guided Bayesian Framework for Feature Selection
(UBayFS) [19] on a dataset containing 63 patients diagnosed with high-grade GEP NEN. Our experiments compare
both ensemble feature selectors in setups with and without the use of expert information. Our main goals are: (I)
to determine the most informative set of features with respect to the outcome prediction task; (II) to interpret those
selected features clinically - to evaluate the first goal, we measure the quality of the selected feature set in terms of
predictive performance and selection stability. Another aspect of interest is: (III) to determine the effect of integrating
prior expert knowledge into the feature selection process, compared to a purely data-driven pipeline. To this end, we
discuss the feature selection results with respect to their clinical relevance and potential to improve our understanding
of what influences OS of GEP NEN patients.
2
Feature Selection in High-Grade Gastroenteropancreatic Neuroendocrine Neoplasms
A PREPRINT
In the following, we denote the input data matrix by X ∈ Rm×n, where m denotes the number of
Notations
patients, and n denotes the number of features. Further, the target variable is denoted by y ∈ Rm. A feature set S is
characterized by the indices, S ⊆ {1, . . . , n}. Vectors and matrices are indicated by bold letters.
2 Materials and Methods
2.1 GEP NEN dataset
Statements of Ethics This study was done in concordance with the Declaration of Helsinki. Approval from the
regional committee for medical and health research ethics (2012/490, 2012/940, 2018/1940) and the local data protec-
tion officer was obtained. Informed consent was obtained from all patients at the time of inclusion but was waived for
the patients in terminal phase and deceased.
Patient cohort Patients were identified from a single institutional cohort at Oslo University Hospital, also included
in two multi-institutional Nordic NEC registries organized by the Nordic Neuroendocrine Tumor Group, previously
In short, this cohort consisted of 192 patients included between January 2000 and July 2018,
described by [8].
with GEP NEC classified according to the WHO 2010-classification [28].
In addition, all patients who had per-
formed a fluorine-18 labeled 2-deoxy-2-fluoroglucose ([18F]FDG) positron emission tomography/computed tomogra-
phy (PET/CT) within 90 days of their histological evaluation were eligible for inclusion. A hundred and seven patients
did not have PET/CT performed, and two patients had no metabolic active lesions available for evaluation. Seventeen
patients had more than 90 days between their biopsy and PET/CT, leaving 66 patients available for inclusion in this
study.
Histological re-evaluation As described previously in [8], the histological re-evaluation was performed on both core
biopsies and surgical specimens from GEP NEC primary tumors and metastases. These were re-classified according
to the most recent WHO 2019-classification [3] with regards to synaptophysin, chromogranin A, and the proliferation
marker Ki-67. In this study, only the re-evaluated histology features were used, while the original histology block was
discarded.
PET/CT acquisition All PET/CT scans were done according to the European Association of Nuclear Medicine
(EANM) guidelines [4, 5] as part of the clinical routine. The three PET scanners used were a 40-slice Siemens
Biograph mCT hybrid PET/CT system (Siemens Healthineers, Erlangen, Germany), a Siemens Biograph 64, and a
64-slice General Electric (GE) Discovery 690 (GE Healthcare, Waukesha, WI, USA). Both Biograph PET/CTs were
both EANM Research Ltd. (EARL)-accredited, whilst the Discovery 690 followed similar routine quality controls
harmonizing with the two Biographs for cross-calibration. All acquisitions were from the vertex or skull base to
mid-thighs. Before the PET acquisition, a low dose CT was acquired for anatomical information and attenuation
correction. Parameters from PET were extracted using the ROI Visualisation, Evaluation, and Image Registration
(ROVER) software v3.0.5 (ABX GmbH).3
Treatment All patients received treatment in the form of surgery, chemotherapy, or a combination of both. In total,
54 patients received the standard treatment of platinum-based chemotherapy. Patients could have surgery prior to or
after [18F]FDG PET/CT. Evaluation of response to chemotherapy treatment was done with CT using the Response
Evaluation Criteria in Solid Tumors (RECIST) [29].
Outcome variable Our outcome variable, or outcome target, was overall survival (OS) in months. This can be
defined as the time a patient remains alive from the time of diagnosis to death of any cause; hence, it is not disease-
specific. It is a reliable and easily available survival measure [30]. We can analyze such survival data, i.e., the time
from diagnosis to the time of death, using the Kaplan-Meier estimator. For those patients who did not experience
the event during the time of the study (or during follow-up) (i.e., death), they are said to be 'censored' [31]. Being
'censored' means that we do not know when this event will occur, only that it has not happened at the end of the study
(or during follow-up). Across the full dataset, the empirical distribution of the outcome variable is illustrated as a
histogram in Fig. 1.
3The detailed imaging- and extraction protocol is described in [8].
3
Feature Selection in High-Grade Gastroenteropancreatic Neuroendocrine Neoplasms
A PREPRINT
Figure 1: Distribution of the overall survival in months.
Figure 2: Correlations between input features (features with absolute correlations ≤ 0.5 were removed).
4
Feature Selection in High-Grade Gastroenteropancreatic Neuroendocrine Neoplasms
A PREPRINT
raw input dataset
66 × 137
remove outliers
less than 25%
missing values?
no
yes
remove
columns
missing value
imputation
feature type?
categorical
ordered
numeric
one-hot
encoding
ordinal
encoding
Yeo-Johnson &
standardization
preprocessed dataset
63 × 134
Figure 3: Preprocessing pipeline for the dataset.
Data blocks The data were grouped into five different blocks
(p) patient characteristics
(b) baseline blood values
(h) re-evaluated histology
(i) PET/CT imaging
(t) treatment
The data contained mainly categorical and ordinal features with very few continuous variables. An overview of the
pairwise correlations between the n = 134 features is provided in Fig. 2.
2.2 Data preprocessing
The data preprocessing consists of several chronological steps prior to applying the ensemble feature selectors, see
Fig. 3.
Data cleaning The first step in data preprocessing is to discard features known to be unimportant, such as features
with only one unique value for all patients or duplicated features. Furthermore, we remove all data columns containing
more than 25% missing values across all patients. By this criterion, we remove 16 features from block (p), one feature
from block (b), six features from block (h), 14 features from block (i), and eight features from block (t).
Further, three patients are excluded from the experiments due to a high number of missing values in at least one block.
All subsequent preprocessing steps are conducted on the remaining 63 patients and are applied by block to retain the
homogeneous block structure.
Missing values Some values were missing because the clinicians did not fill out the case registration forms (CRF)
properly or completely. Amongst other reasons, this may be because the information was missing in the patient journal,
a blood sample was not done, a parameter was forgotten registered in the patient journal, or because the patients are
5
Feature Selection in High-Grade Gastroenteropancreatic Neuroendocrine Neoplasms
A PREPRINT
Table 1: One-hot versus ordinal encoding of a 4-level variable (levels A, B, C, D). Ordinal encoding assumes an order
of the levels (here: A<B<C<D).
level
one-hot encoding
ordinal encoding
A
B
C
D
(0,0,0)
(0,0,1)
(0,1,0)
(1,0,0)
(0,0,0)
(0,0,1)
(0,1,1)
(1,1,1)
referred from other hospitals. Such features, which are unavailable for a large percentage of patients, cannot be
assessed properly in a data-driven manner and were therefore excluded - an imputation of those features would be
unreliable due to the small sample size and may introduce incorrect or misleading information into the model.
As a second step, we impute the features with less than 25% missing values via an adaptation of the k-nearest neighbors
(kNN) imputation algorithm [32]. The number of features and the number of patients that have at least one missing
value for each block are: (p) (7:25), (b) (5:16), (h) (7:6), (i) (2:2), and (t) (3:3) where the first number represents the
number of features and the second number represents the number of patients.
In particular, we restrict the feature space to non-missing columns and compute a matrix of pair-wise distances between
all patients. We denote the set comprising the k-nearest neighbors of patient i by Nk(i) ⊆ {1, . . . , m}. Assuming that
feature j is missing for patient i, we impute xi,j by ximp
i,j , representing the median (instead of the mean, as suggested
by [32]) of feature j across the patient's k nearest neighbors where the feature value is known, i.e.
ximp
i,j ← median {xl,j : l ∈ Nk(i)} .
Ordered categorical features are transformed to an integer scale before interpolation. The usage of an odd value of k
(by default, we use k = 5) guarantees that the median returns an integer, which is a clear benefit over the mean when
using the technique for ordered features.
(1)
Categorical feature encoding Categorical features require encoding in order to be processed alongside numeric
variables in predictive models. In particular, we distinguish between ordinal and nominal categorical variables: Nom-
inal variables (i.e., variables without an internal order of the feature levels), such as clinical institution, are one-hot
encoded [33]. Given a feature j with cj feature levels, the one-hot encoding produces a set of cj − 1 binary features
{e2, . . . , ecj }, given as follows:
(el)i =
(cid:26) 1
0
if xi,j = l,
otherwise,
(2)
for l ∈ {2, . . . , cj} indicating the feature level. The number of one-hot/ordinal categorical features is: 21/5 for block
(p), 0/3 for block (b), 10/2 for block (h), 1/0 for block (i), and 5/0 for block (t). To avoid linear dependencies between
features, the first feature level is not represented by a binary vector in the encoded space, but rather contributes to the
model intercept, see Tab. 1.
Features with an internal order among their levels (ordinal variables), such as the WHO performance status with levels
0, 1, 2, 3, and 4, require an ordinal encoding to retain the relevant information about the order. Under the assumption
that the influence of a feature increases from lower to higher levels (i.e., higher levels comprise the lower levels and
an additive effect), the following encoding is used:
(el)i =
(cid:26) 1
0
if xi,j ≤ l,
otherwise.
(3)
for feature level l ∈ {2, . . . , cj}. Again, the first feature level, which would be assigned a value of 1 across all samples
in the encoded space, is not assigned a binary vector in the encoded space. A comparison between one-hot and ordinal
encoding is provided in Tab. 1. In contrast to transforming to an integer scale, this binary ordinal encoding preserves
the order among the categories but does not pretend equal distances between the categories on a numerical scale.
Feature transformation and normalization During our experiments, we split the dataset into train and test sets. To
normalize the distribution of each numeric feature, we use the Yeo-Johnson power transformation along with standard-
ization [34]. The Yeo-Johnson power transformation is an extension of the well-established Box-Cox transformation
with the benefit that it enables the transformation of negative and zero values. The intention is to bring the data
closer to a normal distribution by simultaneously stabilizing data variance. For a given feature j, Yeo-Johnson's power
transform is defined as
6
Feature Selection in High-Grade Gastroenteropancreatic Neuroendocrine Neoplasms
A PREPRINT
Table 2: Encoding of the target variable "overall survival" (OS) [months].
level
encoding
OS ≤ 12
12 < OS ≤ 24
24 < OS ≤ 36
36 < OS ≤ 48
48 < OS ≤ 60
60 < OS
1
2
3
4
5
6
xYJ
i,j ←
((xi,j + 1)λj − 1)
λj
log(xi,j + 1)
−
((−xi,j + 1)2−λj − 1)
2 − λj
− log(−xi,j + 1)
if λj (cid:54)= 0, xi,j ≥ 0
if λj = 0, xi,j ≥ 0
if λj (cid:54)= 2, xi,j < 0
if λj = 2, xi,j < 0.
(4)
Commonly, the transformation parameter λj is estimated from the data using a maximum likelihood approach. After
the Yeo-Johnson transformation, we scale the data to zero mean and variance of 1. To prevent biased train and test
data, the transformation parameter λj and the mean and variance for the standardization are estimated on the training
data in each split separately.
Encoding of the target variable Even though machine learning models for censored data are evolving, most present
predictive models cannot handle censored data [35]. To avoid the problem presented by censored data, we encode the
OS in months into an integer value (1-6). Using 60 months median follow-up time as a reference, there are no
censored patients with OS below 60 months. Considering survival on a yearly basis we use the representation of the
target variable in our experiments as in Tab. 2. Since each level in the encoded space equals one year, predictive errors
used in the remainder of this paper refer to a yearly scale.
2.3 Feature Selection Methods
In this work, we investigate two ensemble feature selection methods, which have been tailored to fit the requirements
of datasets in the life science domain: the Repeated Elastic Net Technique for Feature Selection (RENT) [27] and the
User-Guided Bayesian Framework for Feature Selection (UBayFS) [19]. Both methods build on the principle of (a)
randomly subsampling the input dataset and (b) training an elementary feature selection model on each sample. The
final feature set is determined by applying a meta-model on the feature sets selected by the elementary models, see Fig.
4. In the case of RENT, the elementary feature selector type is restricted to elastic net regularization [36] using logistic
regression models for binary classification problems or ordinary least squares linear regression models for regression
problems, while UBayFS operates on an arbitrary elementary model type.
RENT The rules to obtain a final feature set further demonstrate the distinct scopes of the methods: RENT defines
three criteria τ1, τ2 and τ3 for the selection of features based on the distribution of their weights across the elementary
models; (I) the number of times the feature weights are non-zero (τ1) is above a level specified by the user; (II) the
alternation of the sign of the feature weights does not surpass a user-defined level (τ2); (III) the size of the feature
weights deviate significantly from 0 (τ3). The hyperparameters for RENT comprise of a number M of elementary
models, an internal data split ratio, two parameters associated with the elastic net regularization in the elementary
models (C and (cid:96)1), as well as one cut-off parameter for each of the three criteria τ1, τ2, τ3.
UBayFS In contrast, UBayFS combines the selection frequency of each feature across the elementary models with
prior information from domain experts, along with side constraints.
In particular, the prior weighting of features
is possible, along with the definition of linear side constraints between features (and feature blocks). In practice,
weights can represent knowledge about the importance of features, which is verified from previous publications. Side
constraints enable the user to restrict the feature set's maximum size maxs and account for the intrinsic block structure
during feature selection (e.g., in multi-source datasets). Hence, RENT implements a purely data-driven approach based
on Elastic Net, while UBayFS is a general meta-model with capabilities to integrate contextual information about the
7
Feature Selection in High-Grade Gastroenteropancreatic Neuroendocrine Neoplasms
A PREPRINT
data generation process. In its most basic setup, UBayFS requires as hyperparameters a number of elementary models
M and an internal data split ratio, a maximum number of features maxs, and a model type to use as the elementary
feature selector.
input
dataset
X
sub-
sampling
data
subsets
X1
X2
. . . Xm
elementary
feature
selectors
elementary
feature sets
δ1
δ2
. . .
δm
prior
knowledge
side
constraints
information from data
information from expert
RENT
UBayFS
selection criteria
meta-model
τ1
τ2
τ3
posterior distribution
over δ
final
feature set
δ(cid:63)
Figure 4: Overall structure of both ensemble feature selection methods, RENT and UBayFS. After training elementary
feature selectors, information is combined in a meta-model. While RENT uses information from data only, UBayFS
additionally includes expert information.
2.4 Outcome prediction
Linear regression Given a set of selected features S, we make use of linear regression models [37] to model the
target variable y. In its simplest form, the linear regression model (with intercept) is given as
y = ̃Xβ + ε,
(5)
where β ∈ Rn+1 is the model parameter vector, ̃X denotes the matrix containing one column of ones, followed by
N (0, σ2) denotes the model error with
the sub-matrix of X restricted to the columns contained in S. Further, ε ∼
iid
constant error variance σ > 0. By default, parameters of linear regression models are obtained via ordinary least
squares (OLS), i.e. by minimizing the least squares error
(cid:107)y − ̃Xβ(cid:107)2
2.
min
β
(6)
Once the parameter vector β is estimated by optimizing Eq. 6 analytically, predictions are obtained by evaluating
ˆy = ̃Xβ.
k-nearest neighbor (kNN) regression As an alternative to the linear regression model, a k-nearest neighbor (kNN)
regression model [37] is used to compute predictive results. In contrast to the linear regression model, the kNN model
does not assume a linear relationship between the predictors and the target variable. Similar to the kNN method used
for missing value imputation in Section 2.2, a neighborhood Nk(i) of sample i containing the k nearest training data
points with respect to a Euclidean metric on the feature space is computed for any data point xi. The prediction for
the target value yi corresponding to sample i is given by the mean of the neighbor's target values
ˆyi =
1
k
(cid:88)
yl.
l∈Nk(i)
8
(7)
Feature Selection in High-Grade Gastroenteropancreatic Neuroendocrine Neoplasms
A PREPRINT
Note that, the neighborhood Nk(i) is a subset of the training samples only, while ˆyi may represent both, training or
test samples.
Both predictive models, linear regression as well as the kNN regression model, are known to suffer from the curse
of dimensionality - hence, we can assume that selecting a high number of features deteriorates each model. The
opposite extreme for both methods, i.e., selecting no features at all, leads to predicting the output with the mean over
the training data regardless of the input. Thus, we expect a well-performing feature selector to deliver a proper subset
S of the feature set {1, . . . , n}, which allows both predictive models to perform better than the baselines given by (a)
the overall mean of the target variable, and (b) a model including all features.
2.5 Implementation
Parts of our analyses are conducted in the programming languages R [38]; other parts are conducted in Python [39].
We use the open-source implementations for RENT [40] and UBayFS [41]. For data preparation and preprocessing,
we deploy the R package caret [42], and the Python package scikit-learn [43]. Fold indices are shared between R and
Python. Predictive models are trained and evaluated in R using the caret package for all model setups. All plots are
created using package ggplot2 [44].
All results are produced on an Intel Core i7 CPU @1.8 GHz, 32GB RAM under a Windows 11 Pro operating system.
3 Experiments
Our experimental results are structured into a pre-study, where we determine optimal hyperparameters for the feature
selection algorithms, followed by two main experiments. Experiment 1 focuses on the comparison of the two models,
RENT and UBayFS, on the dataset without accounting for additional expert knowledge. Experiment 2 is operated on
UBayFS only, as prior information and additional side constraints are included in the feature selection.
Our main focus in the experiments lies on the selected feature sets, along with the impact of the feature selection on
predictive performance. We provide feature counts from both of the investigated feature selectors, RENT and UBayFS,
across five different train-test splits of the dataset. Unless specified otherwise, all experiments are conducted using the
hyperparameters determined during the pre-study.
3.1 Experimental setup
Model parameters Both algorithms, RENT and UBayFS, are trained on M = 100 ensemble models and internal
0.75/0.25-splits for sub-sampling the dataset. The underlying elementary feature selector for RENT is, by definition,
an elastic net regularized linear regression model. Thus, RENT requires five hyperparameters to be determined during
the pre-study (2 elastic net regularization parameters, (cid:96)1 and C, as well as three thresholds τ1, τ2, and τ3 for the
selection criteria). In order to make results comparable with UBayFS, we further deploy a side condition to restrict
the search space to settings, which deliver a maximum number of features maxs during validation. Thus, the number
of features selected by RENT is approximately equal to the pre-defined parameter maxs.
UBayFS uses minimum redundancy max relevance (mRMR) [23] as an elementary feature selector. The internal
number of features in each elementary model is set to maxs, i.e., each elementary model selects exactly maxs features.
For the meta-model, the same parameter maxs is used to restrict the maximum number of selected features via a max-
size side constraint (hard constraint) - while different levels of maxs are evaluated in experiment 1, the parameter is
set to the default maxs = 20 in experiment 2. Further, unless otherwise stated, prior feature weights in UBayFS are
set uniformly to 0.1 across all features, which results in a non-informative prior.
Train-test splits As the ratio between the number of patients and features is unbalanced, with 63 patients and 134
encoded features, the reliability of the feature ranking results must be validated to reduce the risk of spurious correla-
tions and overfitting. Hence, we perform a 5-fold split of the dataset. For all possible permutations, we use four folds
for training UBayFS or RENT, as well as the predictive models and the remaining fold for testing. Hyperparameters
are determined on each split separately by internally subsetting the 4-fold training set (nested split). The 5-fold splits
and hyperparameters determined in the pre-study remain the same across all experiments.
For each feature selection method, we provide the selection frequencies of each feature across the 5 folds, i.e., a feature
obtains an importance score between 0 and 5 according to the number of folds it was selected for. For predictive
performance scores, a linear regression model and a kNN regression model are trained on the same training folds,
using the features from the preceding feature selection, and evaluate the prediction error on the test set (averaged
across all folds).
9
Feature Selection in High-Grade Gastroenteropancreatic Neuroendocrine Neoplasms
A PREPRINT
Table 3: Selected hyperparameters for each train/test split.
parameter
1
2
RENT
(cid:96)1
C
τ1
τ2
τ3
0.3
1
0.3
0.3
0.975
0
1
0.5
0.5
0.975
fold
3
0.3
1
0.3
0.4
0.975
4
5
0.3
1
0.35
0.35
0.975
0.3
1
0.35
0.35
0.975
UBayFS maxs
20
20
20
20
20
Performance metrics To assess whether a feature set contains relevant information for training predictive models,
we analyze the predictive performance in a regression setup following the feature selection step. The performance is
quantified using the root mean squared error (RMSE), which has a lower bound of 0 and shall be minimized.
Using the stability criterion introduced by [24], we further evaluate the feature selection stability across the five folds
for RENT and UBayFS. The computed score is bounded in the interval [0, 1]; a value of 1 indicates perfect stability,
i.e., the same feature set is selected in each model, while 0 indicates that selected feature sets show no overlap.
Furthermore, the redundancy rate (RED) returns an intrinsic feature set quality measure by computing the average
absolute Pearson correlation among the selected features. Small correlations are desirable as highly correlated features
represent redundant information. Equally to the absolute Pearson correlation coefficient, RED is bounded in [0, 1].
In experiment 2, we additionally assign prior weights to a subset of features - therefore, we also evaluate the per-
centage of prior-elevated features (PERC) in the selected feature sets as well. If PERC is high, features extracted
via data-driven feature selectors match the domain experts' knowledge. However, a low PERC does not necessarily
contradict expert knowledge since the features may be highly correlated, and therefore, similar information may be
encoded in multiple distinct sets of features.
3.2 Pre-Study
The pre-study aims to determine the optimal hyperparameters for RENT. Given a 0.75/0.25 outer train-test split as
specified above, only train data are used for hyperparameter selection. For this purpose, 4-fold cross-validation is
performed on each train dataset (using the same 4 folds as in the outer train-test split). Across the resulting 4 models,
hyperparameters are selected by maximizing predictive performance in a grid search over the parameter space C ∈
{1, 10, 100, 1000}, (cid:96)1 ∈ {0, 0.1, 0.2, . . . , 1}, τ1, τ2 ∈ {0, 0.05, 0.1, . . . , 1}, and τ3 = 0.975 (fixed).
The runtime for the full computation associated with the pre-study (parameter selection and final feature selection)
for RENT comprised approx. 350 sec (16 cores, 24 threads in parallel). Since UBayFS does not require parameter
selection, the runtime to evaluate the feature selection model for different levels of maxs (see Experiment 1) is shorter
(approx. 65 sec without parallelization).
Tab. 3 shows the hyperparameters identified for RENT and UBayFS in each train-test split (given by the numbers of
the test folds 1-5). Due to the restriction of the maximum number of features, the stated parameters may not represent
global maxima for the performance of RENT; however, comparability between the methods is preserved. Furthermore,
since the number of features is restricted, the selected hyperparameters are in a similar range between the folds.
3.3 Experiment 1: feature selection without prior knowledge
Having determined hyperparameters for each fold in the pre-study, RENT, and UBayFS are applied in each data split
to the training dataset to select an optimized feature set for a given maxs on a purely data-driven basis.
Selected features For each feature, selection frequencies across the five test folds are further provided in Tab. 4
(columns RENT and UBayFS, w = 0.1). In addition to the selection frequency, the table indicates whether a feature
shows a positive or negative impact on the target variable according to the coefficients in the linear model, if selected.
Thereby, ++ and −− indicate that a feature always shows the same sign across all predictive models. In contrast, +
and − indicate a majority of positive or negative coefficients across the predictive models, respectively.
10
Feature Selection in High-Grade Gastroenteropancreatic Neuroendocrine Neoplasms
A PREPRINT
d
e
s
a
e
r
c
n
i
h
t
i
w
s
e
r
u
t
a
e
F
.
)
s
e
r
u
t
a
e
f
d
e
t
c
e
l
e
s
r
o
f
w
s
l
e
v
e
l
t
h
g
i
e
w
r
o
i
r
p
t
n
e
r
e
f
f
i
d
h
t
i
w
(
S
F
y
a
B
U
d
n
a
T
N
E
R
y
b
s
d
l
o
f
e
v
fi
s
s
o
r
c
a
s
e
i
c
n
e
u
q
e
r
f
n
o
i
t
c
e
l
e
s
e
r
u
t
a
e
F
:
4
e
l
b
a
T
n
o
i
s
s
e
r
g
e
r
r
a
e
n
i
l
f
o
y
t
i
r
o
j
a
m
e
h
t
t
a
h
t
e
t
a
c
i
d
n
i
−
d
n
a
+
,
s
e
s
e
h
t
n
e
r
a
p
n
I
.
s
k
s
i
r
e
t
s
a
h
t
i
w
d
e
t
h
g
i
l
h
g
i
h
e
r
a
n
m
u
l
o
c
t
s
a
l
e
h
t
n
i
d
e
t
r
o
p
e
r
p
u
t
e
s
S
F
y
a
B
U
e
h
t
n
i
s
t
h
g
i
e
w
r
o
i
r
p
s
n
g
i
s
l
a
u
q
e
d
a
h
e
r
u
t
a
e
f
e
h
t
g
n
i
n
i
a
t
n
o
c
s
l
e
d
o
m
l
l
a
t
a
h
t
e
t
a
c
i
d
n
i
−
−
r
o
+
+
;
y
l
e
v
i
t
c
e
p
s
e
r
,
t
n
e
i
c
fi
f
e
o
c
e
v
i
t
a
g
e
n
r
o
e
v
i
t
i
s
o
p
a
t
i
d
e
n
g
i
s
s
a
e
r
u
t
a
e
f
e
h
t
g
n
i
n
i
a
t
n
o
c
s
l
e
d
o
m
.
n
e
v
e
s
a
w
s
n
g
i
s
f
o
n
o
i
t
u
b
i
r
t
s
i
d
e
h
t
t
a
h
t
e
t
a
c
i
d
n
i
s
e
s
e
h
t
n
e
r
a
p
o
n
e
l
i
h
w
,
s
t
n
e
i
c
fi
f
e
o
c
r
i
e
h
t
f
o
0
1
1
=
w
S
F
y
a
B
U
0
5
=
w
1
.
0
=
w
T
N
E
R
e
r
u
t
a
e
f
k
c
o
l
b
)
-
-
(
5
0
)
-
(
3
)
+
(
4
)
-
(
5
)
-
(
5
)
+
+
(
5
)
+
+
(
5
)
+
(
3
0
0
0
)
-
-
(
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
)
-
-
(
5
0
)
-
(
5
)
+
+
(
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
)
-
-
(
5
)
-
-
(
5
)
-
-
(
5
0
0
0
)
-
-
(
1
)
+
+
(
1
)
+
+
(
1
0
0
0
0
0
4
0
0
0
0
0
0
0
0
0
0
0
)
-
-
(
1
0
0
0
)
-
-
(
2
)
+
+
(
1
0
0
)
+
+
(
2
)
+
+
(
4
)
+
+
(
5
0
)
-
-
(
5
)
+
(
3
)
+
+
(
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
)
-
-
(
3
)
+
+
(
1
0
)
-
-
(
2
)
+
+
(
1
0
0
0
0
0
0
0
)
-
-
(
1
)
+
+
(
1
)
-
(
3
)
-
-
(
1
0
)
-
-
(
1
)
+
+
(
2
0
4
0
)
-
-
(
5
)
+
+
(
1
)
+
+
(
4
0
0
0
0
0
0
0
0
)
-
-
(
2
)
+
(
3
)
+
+
(
4
)
+
+
(
5
0
0
0
0
0
0
)
+
+
(
3
)
+
+
(
1
0
0
)
-
-
(
1
)
+
+
(
3
0
0
0
0
0
0
)
+
+
(
4
)
+
+
(
1
0
0
)
+
(
3
)
+
+
(
4
0
0
0
0
0
)
+
+
(
1
0
0
0
0
0
0
)
+
(
4
)
+
+
(
1
)
+
+
(
1
0
)
-
-
(
1
)
+
+
(
1
0
0
0
0
0
2
)
+
+
(
4
)
+
+
(
3
0
0
0
2
0
2
)
-
-
(
2
)
+
(
3
4
)
-
-
(
5
)
+
+
(
1
)
+
+
(
4
0
0
0
)
-
-
(
2
0
)
+
(
4
)
+
+
(
1
)
+
+
(
4
0
0
)
-
-
(
2
0
0
0
)
+
+
(
4
)
+
+
(
1
0
0
3
)
+
+
(
5
.
t
e
m
I
G
f
o
e
c
n
a
n
i
m
o
D
h
t
i
W
.
r
P
n
w
o
n
k
n
U
a
m
o
n
e
d
A
m
s
a
l
p
o
e
N
g
n
i
t
s
i
x
e
-
o
C
a
i
s
a
l
p
s
y
D
m
s
a
l
p
o
e
N
g
n
i
t
s
i
x
e
-
o
C
t
c
u
d
/
r
e
d
d
a
l
b
l
l
a
G
r
u
o
m
u
T
y
r
a
m
i
r
P
c
i
r
t
s
a
G
r
u
o
m
u
T
y
r
a
m
i
r
P
l
a
n
i
m
o
d
b
a
r
e
h
t
O
r
u
o
m
u
T
y
r
a
m
i
r
P
s
u
g
a
h
p
o
s
E
r
u
o
m
u
T
y
r
a
m
i
r
P
s
i
s
a
t
s
a
t
e
M
m
a
x
E
t
s
i
H
s
a
e
r
c
n
a
P
r
u
o
m
u
T
y
r
a
m
i
r
P
m
u
t
c
e
R
r
u
o
m
u
T
y
r
a
m
i
r
P
7
6
-
i
K
m
s
a
l
p
o
e
N
g
n
i
t
s
i
x
e
-
o
C
o
N
D
W
y
g
o
l
o
h
p
r
o
M
r
u
o
m
u
T
g
n
i
n
i
a
t
S
A
n
i
n
a
r
g
o
m
o
r
h
C
e
v
i
t
a
r
t
l
fi
n
I
e
r
u
t
c
e
t
i
h
c
r
A
d
i
o
n
a
g
r
O
e
r
u
t
c
e
t
i
h
c
r
A
d
i
l
o
S
e
r
u
t
c
e
t
i
h
c
r
A
r
a
l
u
c
e
b
a
r
T
e
r
u
t
c
e
t
i
h
c
r
A
t
n
a
t
s
i
D
n
r
e
t
t
a
P
l
e
s
s
e
V
c
i
r
t
s
a
G
n
o
i
t
a
c
o
L
y
s
p
o
i
B
s
i
s
a
t
s
a
t
e
M
r
e
v
i
L
n
o
i
t
a
c
o
L
y
s
p
o
i
B
e
d
o
N
h
p
m
y
L
n
o
i
t
a
c
o
L
y
s
p
o
i
B
s
u
g
a
h
p
o
s
e
O
n
o
i
t
a
c
o
L
y
s
p
o
i
B
m
u
e
n
o
t
i
r
e
P
n
o
i
t
a
c
o
L
y
s
p
o
i
B
s
a
e
r
c
n
a
P
n
o
i
t
a
c
o
L
y
s
p
o
i
B
+
2
+
3
g
n
i
n
i
a
t
S
n
i
s
y
h
p
o
t
p
a
n
y
S
g
n
i
n
i
a
t
S
n
i
s
y
h
p
o
t
p
a
n
y
S
s
i
s
o
r
c
e
N
c
i
h
p
a
r
g
o
e
G
]
n
i
m
[
n
a
c
S
o
t
n
o
i
t
c
e
j
n
I
]
3
ˆ
m
c
[
V
T
M
l
a
t
o
T
]
g
k
[
t
h
g
i
e
W
a
m
o
r
t
S
o
N
a
m
o
r
t
S
t
e
l
a
t
i
p
s
o
h
s
k
i
R
n
o
i
t
u
t
i
t
s
n
I
l
l
a
a
v
e
l
l
U
n
o
i
t
u
t
i
t
s
n
I
]
L
/
l
o
m
m
[
e
s
o
c
u
l
G
]
m
c
[
t
h
g
i
e
H
)
l
a
t
o
t
(
n
a
e
m
V
U
S
)
l
a
t
o
t
(
x
a
m
V
U
S
]
g
[
G
L
T
l
a
t
o
T
n
a
e
m
V
U
S
x
a
m
V
U
S
*
*
*
*
*
*
*
*
*
*
*
*
e
n
i
b
a
t
i
c
e
p
a
C
/
e
d
i
m
o
l
o
z
o
m
e
T
e
p
y
T
y
p
a
r
e
h
t
o
m
e
h
C
s
u
m
i
l
o
r
e
v
E
/
e
d
i
m
o
l
o
z
o
m
e
T
e
p
y
T
y
p
a
r
e
h
t
o
m
e
h
C
D
P
l
a
c
i
n
i
l
C
y
l
n
O
)
T
S
I
C
E
R
(
e
s
n
o
p
s
e
R
e
s
n
o
p
s
e
R
l
a
i
t
r
a
P
)
T
S
I
C
E
R
(
e
s
n
o
p
s
e
R
d
e
s
s
e
s
s
A
t
o
N
)
T
S
I
C
E
R
(
e
s
n
o
p
s
e
R
e
s
a
e
s
i
D
e
v
i
s
s
e
r
g
o
r
P
)
T
S
I
C
E
R
(
e
s
n
o
p
s
e
R
e
s
a
e
s
i
D
e
l
b
a
t
S
)
T
S
I
C
E
R
(
e
s
n
o
p
s
e
R
t
s
e
B
t
s
e
B
t
s
e
B
t
s
e
B
t
s
e
B
e
d
i
s
o
p
o
t
E
n
i
t
a
l
p
s
i
C
h
t
i
w
n
o
i
t
c
u
d
o
r
t
n
i
e
R
)
s
y
a
d
(
t
n
e
m
t
a
e
r
t
t
s
r
fi
o
t
T
E
P
m
o
r
f
e
m
T
i
e
d
i
s
o
p
o
t
E
/
n
i
t
a
l
p
s
i
C
e
p
y
T
y
p
a
r
e
h
t
o
m
e
h
C
r
e
h
t
O
e
p
y
T
y
p
a
r
e
h
t
o
m
e
h
C
e
s
a
e
s
i
D
f
o
n
o
i
s
s
e
r
g
o
r
P
d
e
p
p
o
t
S
t
n
e
m
t
a
e
r
T
y
t
i
c
i
x
o
T
d
e
p
p
o
t
S
t
n
e
m
t
a
e
r
T
r
e
h
t
O
d
e
p
p
o
t
S
t
n
e
m
t
a
e
r
T
s
e
s
r
u
o
C
f
o
r
e
b
m
u
N
n
o
i
s
s
e
r
g
o
r
P
o
N
n
o
i
s
s
e
r
g
o
r
P
)
h
(
)
i
(
)
t
(
0
0
0
0
0
0
0
0
0
0
)
-
(
5
)
-
-
(
5
0
1
1
=
w
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
)
+
(
5
)
-
-
(
5
)
-
-
(
3
)
-
(
3
0
)
+
(
5
0
0
0
0
0
0
0
0
0
0
)
+
(
5
)
+
+
(
4
S
F
y
a
B
U
0
5
=
w
1
.
0
=
w
T
N
E
R
)
-
(
5
)
+
+
(
1
)
-
-
(
1
)
+
+
(
1
0
0
0
0
0
0
0
0
0
0
)
-
-
(
3
0
0
0
0
0
0
0
0
)
-
-
(
5
)
-
-
(
1
)
+
+
(
1
2
0
0
0
0
0
0
0
0
0
)
+
(
3
)
-
(
4
)
+
+
(
2
)
-
-
(
5
)
-
-
(
5
)
-
-
(
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
)
+
(
4
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
)
+
(
4
)
+
+
(
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
)
-
-
(
1
)
+
+
(
3
)
-
-
(
1
)
-
-
(
2
)
-
-
(
2
0
0
)
-
-
(
3
)
-
-
(
5
0
0
0
0
0
)
-
(
5
)
-
(
5
)
-
-
(
1
)
-
-
(
4
0
0
0
0
0
)
+
+
(
1
)
+
+
(
1
0
0
0
0
0
0
)
-
-
(
5
)
-
-
(
4
0
0
0
0
0
)
-
-
(
4
)
-
-
(
5
)
-
-
(
1
)
-
-
(
5
0
0
0
0
0
0
0
0
0
0
2
0
0
)
-
(
5
)
-
-
(
1
)
-
-
(
4
)
+
+
(
1
0
0
0
0
0
0
)
-
-
(
5
)
-
-
(
5
)
-
-
(
4
)
-
-
(
2
)
s
y
a
d
(
s
i
s
a
t
s
a
t
e
M
o
t
T
E
P
m
o
r
f
)
s
y
a
d
(
s
i
s
o
n
g
a
i
D
o
t
T
E
P
m
o
r
f
)
s
h
t
n
o
m
(
s
t
e
m
o
t
g
a
i
d
m
o
r
f
e
s
a
e
s
i
D
e
l
b
a
t
c
e
s
e
R
.
v
d
A
e
c
n
e
r
u
c
c
e
R
e
m
T
i
e
m
T
i
e
m
T
i
x
e
S
.
c
o
L
.
c
o
L
s
i
s
o
n
g
a
i
D
f
o
e
m
T
i
t
a
e
s
a
e
s
i
D
c
i
t
a
t
s
a
t
e
M
e
v
i
t
a
i
l
l
a
P
n
o
i
t
n
e
t
n
I
t
n
e
m
t
a
e
r
T
s
i
s
o
n
g
a
i
D
t
a
e
g
A
*
e
r
u
t
a
e
f
k
c
o
l
b
L
N
U
2
=
<
l
a
m
r
o
N
>
A
n
i
n
a
r
g
o
m
o
r
h
C
L
N
U
3
=
<
l
a
m
r
o
N
>
P
L
A
L
N
U
3
>
P
L
A
)
b
(
L
N
U
2
>
A
n
i
n
a
r
g
o
m
o
r
h
C
L
N
U
2
=
<
l
a
m
r
o
N
>
H
D
L
L
N
U
2
=
<
l
a
m
r
o
N
>
E
S
N
L
N
U
2
>
H
D
L
L
N
U
2
>
E
S
N
s
t
e
l
e
t
a
l
P
*
*
*
d
e
t
c
e
s
e
R
r
u
o
m
u
T
y
r
a
m
i
r
P
1
M
e
g
a
t
s
-
M
I
M
B
r
e
k
o
m
S
n
o
N
r
e
k
o
m
S
1
>
y
t
i
r
e
v
e
S
y
t
i
d
i
b
r
o
m
-
o
C
1
y
t
i
r
e
v
e
S
y
t
i
d
i
b
r
o
m
-
o
C
y
r
e
g
r
u
S
l
a
c
i
d
a
R
l
a
n
o
i
g
e
R
N
L
s
t
e
M
t
n
a
t
s
i
D
N
L
s
t
e
M
o
r
t
e
R
N
L
s
t
e
M
e
n
o
B
s
t
e
M
r
e
v
i
L
s
t
e
M
g
n
u
L
s
t
e
M
r
e
h
t
O
s
t
e
M
n
i
k
S
s
t
e
M
N
L
s
t
e
M
l
a
c
i
g
o
l
o
h
t
a
P
g
n
i
g
a
t
s
V
I
e
g
a
t
S
d
e
p
u
o
r
g
M
N
T
e
g
a
t
S
*
r
e
c
n
a
C
r
e
h
t
O
r
o
i
r
P
e
n
o
l
A
g
n
i
v
i
L
1
2
3
4
t
a
t
S
f
r
e
P
O
H
W
t
a
t
S
f
r
e
P
O
H
W
t
a
t
S
f
r
e
P
O
H
W
t
a
t
S
f
r
e
P
O
H
W
1
N
>
e
g
a
t
s
-
N
2
T
e
g
a
t
s
-
T
3
T
e
g
a
t
s
-
T
4
T
e
g
a
t
s
-
T
1
N
e
g
a
t
s
-
N
t
n
u
o
C
l
i
h
p
o
r
t
u
e
N
.
s
b
A
n
i
b
o
l
g
o
m
e
a
H
e
n
i
n
i
t
a
e
r
C
C
B
W
n
i
m
u
b
l
A
P
R
C
*
*
*
*
*
)
p
(
11
Feature Selection in High-Grade Gastroenteropancreatic Neuroendocrine Neoplasms
A PREPRINT
(a) kNN regression on RENT features
(b) kNN regression on UBayFS features
(c) linear regression on RENT features
(d) linear regression on UBayFS features
Figure 5: Predictive performances (on test set) of models trained after feature selection for different numbers of
features.
Predictive performance Further, Fig. 5 illustrates the predictive performances of kNN and linear regression models
trained after UBayFS and RENT feature selection. The plot shows the RMSE for each fold given a predefined number
of selected features maxs.
Notably, RENT performs better using the linear regression model as the predictor, while UBayFS shows a better
performance in combination with kNN. The stronger performance of RENT with linear regression may be a result of
the fact that the underlying feature selection in RENT is based on a regularized linear regression model. UBayFS,
however, is based on mRMR, which does not build upon a linear predictive model.
While linear regression results deteriorate at a higher number of features (maxs > 30), the kNN model retains a
similar performance level, which suggests that the curse of dimensionality does not yet have a strong effect on the
Euclidean distance for the given feature space dimensionalities. For the linear model, overfitting is triggered by a large
ratio between the number of features and the number of patients.
Among all compared methods, differences between the folds are obvious: for instance, fold 4 is predicted with the
least RMSE across all combinations of feature selector, predictive model, and maxs. On the other hand, fold 2 is
associated with a large RMSE in the models based on UBayFS, while fold 3 shows similar behavior for the kNN
model based on RENT features. Potentially, differences between folds may be caused by two factors (or combinations
of both):
• the cohort of patients in the training set does not represent the global distribution of the data well - e.g., the
training data do not contain a sufficient number of samples with particularly high or low target values (bad
prediction due to a bad model);
• the cohort of patients in the test set is particularly hard to estimate, e.g., due to outliers (bad prediction in
spite of an appropriate model);
Due to the low number of only 12-13 patients in each fold, even a low number of hard-to-predict outliers may deteri-
orate RMSE results significantly.
12
Feature Selection in High-Grade Gastroenteropancreatic Neuroendocrine Neoplasms
A PREPRINT
Figure 6: Histograms of errors on the test set (predicted value by kNN - ground truth) of the folds performing best
(fold 4) and worst (fold 2) at maxs = 20 features.
Residuals
In order to shed light on the dynamics leading to the differences in performance between the data folds,
histogram plots of the residuals for fold 2 (worst fold in UBayFS) and fold 4 (best fold across most setups) at maxs =
20 are provided in Fig. 6. Residuals are defined as the difference between the true value and the prediction; thus a
positive or negative residual value indicates an underestimation or overestimation of the lifetime, respectively.
In contrast to fold 4, the residuals from fold 2 are more dispersed. All histograms are symmetric and centered around
0, which indicates that all methods are able to estimate the intercept correctly. In both folds, the prediction model
was able to predict the correct lifetime category for almost half of the patients in the test set. However, the histogram
indicates that predictive models based on both feature selectors overestimate the lifetime in test fold 4 (positive errors),
while lifetimes in test fold 2 are rather slightly overestimated (negative errors). The main difference in performance
between fold 2 and fold 4 is driven by dispersion, i.e. by a minority of patients, which show a high error - due to the
small sample size, even a small number of such outliers can impact the total RMSE significantly.
When considering patients with absolute residual values > 2.5 as outliers, RENT, and UBayFS show 3 outliers in fold
2, each (RENT: 2 positive, 1 negative; UBayFS: 1 positive, 2 negative). Both methods commonly misclassify one
patient with true target value 6 and predictions 2.6 (UBayFS) and 2 (RENT), which substantiates the highest positive
outlier in both histograms. The remaining two outliers of each method refer to different patients.
Stability In addition to the performance evaluation, we further investigate qualitative aspects of the selected feature
sets, as shown in Fig. 7. The demonstrated stabilities and redundancy rates (RED) of the feature sets selected by
RENT and UBayFS across the five folds tend to increase with maxs. While RENT has a slightly lower and more
fluctuating stability (around 0.5), UBayFS shows a clear convergence at around 0.6. The RED is below 0.25 for all
possible numbers of features, indicating that both RENT and UBayFS select features with small correlations.
3.4 Experiment 2: feature selection with prior knowledge
Previous research on GEP NEN shows that some features impact the survival of patients; those are Age at diagnosis,
WHO performance status, Primary tumor location, Tumor morphology, Tumor differentiation, Lactate dehydrogenase
(LDH), Platelets, Albumin, Ki-67, SUVmax, and TNM-staging [5, 8–14]. Tumor differentiation is highly correlated
to tumor morphology, so we do not include the feature in this work. Furthermore, findings by [8] indicate a high
relevance of the features Total MTV [cm3] and Total TLG [g], which shall be investigated.
In this experiment, we focus on these features (a total number of 22 features in the encoded space) within our feature
selection and prediction pipeline. In particular, during experiment 1, the aforementioned features comprise 30% of the
final feature sets (on average across the five folds and given maxs = 20 features, each). We refer to this score as PERC
(percentage of selected features supported by literature). In the following, we deploy prior weights on these features
to investigate how UBayFS as a hybrid feature selector combining information from experts and data, performs in
comparison to the pure data-driven methods presented in experiment 1. Since RENT cannot incorporate prior feature
importances, this evaluation is restricted to UBayFS.
13
Feature Selection in High-Grade Gastroenteropancreatic Neuroendocrine Neoplasms
A PREPRINT
(a) RENT features
(b) UBayFS features
Figure 7: Stabilities and redundancy rates (RED) of feature sets selected by RENT and UBayFS (maxs = 20 features,
each).
Specifically, we increase the prior weight of the 22 features supported by literature (referred to as prior-elevated fea-
tures) to the following levels: w ∈ {0.1, 10, 20, . . . , 100, 110} - after evaluating all levels with respect to predictive
performance, we restrict to special cases w = 0.1 (non-informative prior weighting), w = 50 (mediocre prior weight-
ing), and w = 110 (strong prior weighting). After applying UBayFS with the given levels of prior information, we
examine how the feature set and the predictive performance develop. The case of 0.1 is equivalent to the uniform
case without prior knowledge (default setup for UBayFS in experiment 1). In contrast, prior weight 110 indicates that
each prior-elevated feature already is assigned a higher score than the maximum score that can be achieved throughout
the elementary models (M = 100) - as a result, the selected features are exclusively restricted to those with prior
information and elementary feature selectors in UBayFS are only used to select a feature set of maxs = 20 features
among the 22 prior-elevated features.
Predictive performance Fig. 8 shows the average performances along with the standard deviations across the 5
test folds. In general, lower levels of prior weights do not significantly impact the performance, although a minor
improvement can be observed in folds 4 (kNN) and fold 3 (linear model) up to w = 40. By increasing the prior weight
to a higher level, performance levels lead to stronger variability and an increase of RMSE in the better-performing
folds, such as fold 4. Finally, if the prior weight is set to the maximum level of 110, all folds converge to a similar
level since the data-driven feature selection hardly contributes to these setups. Thus, a potential conclusion is that
moderate levels of prior knowledge can slightly increase models' capabilities. In contrast, strong prior knowledge
leads to a convergence towards the global mean performance across all folds - such prior setup acts as a strong
restriction of the search space exploited by the feature selector.
Stability In contrast to the minor effects of prior knowledge on predictive performance, stability increases signifi-
cantly, as shown in Fig. 8. Finally, at a maximum level of w = 110, stability converges towards an almost perfectly
stable solution. This is due to the restriction of the search space to the prior-elevated features, which results in a
selection of 20 out of only 22 features in total. As expected, the percentage of selected features supported by literature
(PERC) also increases linearly with the level of prior weights provided. The redundancy rate between the selected
features shows a slight decrease, indicating that the prior-elevated features contain only small correlations.
4 Discussion
Experiment 1 In our first experiment, we left out prior expert knowledge and let the feature selection be purely
data-driven. We know that certain features were prognostic for survival in earlier studies, as mentioned in experiment
2 below. We wanted to study whether the same prognostic features would still be selected and if there were any
currently unknown prognostic features that could be further researched. Comparing the two first columns in Tab. 4
we can see which features are selected repeatedly in different folds with RENT and UBayFS. We must keep in mind
that we cannot directly compare the importance of the features in terms of a coefficient (e.g similar to Cox regression),
just that they are repeatedly selected in each fold. Further, the correlation between features must also be considered
when comparing the importance of features which we can find in Fig. 2. Two or more features with a moderate/high
correlation contain the same information with respect to the model, and one fold may choose one over the other, whilst
14
Feature Selection in High-Grade Gastroenteropancreatic Neuroendocrine Neoplasms
A PREPRINT
(a) Predictive performance using kNN regression
(b) Predictive performance using linear regression
Figure 8: Experiment 2: predictive performances on fold 1-5, and qualitative metrics of features sets produced by
UBayFS at different levels of prior knowledge on features with evidence from literature (maxs = 20).
(c) Qualitative evaluation
another fold may choose a highly correlated one instead. This results in a lower number for both features, not reflecting
the importance of both when comparing them with a feature with a high number.
In block (p) (baseline patient characteristics) we have a few features that one would expect to be prognostic for OS.
One obvious one would be TNM-stage IV disease which does not seem to be chosen at all by RENT and UBayFS. But
looking at the correlation heatmap in Fig. 2 we see that this feature is highly correlated to several other features, among
those Metastatic Disease at Time of Diagnosis and Treatment Intention Palliative. We see that this last one gets chosen
four out of five times with RENT and five out of five times with UBayFS which probably explains why TNM-stage IV
does not seem to be important. Having a palliative treatment intention usually means you have stage IV disease. This
is also a well-known prognostic indicator from the literature [6]. Bone metastasis is usually a poor prognostic indicator
in several types of cancers [45] and it is not surprising that this is chosen all the time. We also know that WHO PS is a
prognostic indicator in these patients. This is also reflected in the number of folds it is chosen by RENT and UBayFS,
but it is only WHO level 2 that seems to be important. That said, Fig. 2 shows that WHO levels 3 and 4 are highly
correlated to some of the SUV-parameters which might contribute to those never being selected. Radical Surgery is
quite often chosen by both RENT and UBayFS and is also a predictable prognostic indicator. Having radical surgery
means that all viable tumors are removed, and that is only possible if you have a low tumor burden. This underlines
the importance of surgery in the curative intended treatment of this type of cancer.
Next, in block (b) (baseline blood values), we see that both CRP and ALP > Normal <= 3UNL get selected equally
many times by both RENT and UBayFS, and both have a high number indicating importance over the other features in
this block. A high CRP at baseline has previously been shown to be a poor prognostic feature in some studies [5,46,47],
whilst others have not replicated this [48]. This is probably not surprising as this has been shown to be a poor
prognostic indicator in advanced cancer patients in a palliative setting, and especially in GEP NEN [49–52]. ALP has
also been shown in studies to be prognostic for a shorter OS [5, 53, 54]. For Albumin and Platelets, RENT chose these
only half as many times as UBayFS. Both have been shown to be prognostic indicators of OS [5, 6]. Interestingly,
Haemoglobin, WBC, LDH, and Chromogranin A are barely chosen or are not chosen neither by RENT nor UBayFS.
All these features have previously been shown to be prognostic for OS [5].
15
Feature Selection in High-Grade Gastroenteropancreatic Neuroendocrine Neoplasms
A PREPRINT
Moving on to block (h) (re-evaluated histology) we have quite a few features that are well-known prognostic indicators.
The strongest one from the literature is probably Ki-67 which is used in the classification system of NEN. The second
strongest is probably Tumor Morphology which has been shown in several studies to be prognostic for OS [5, 6].
We see that Ki-67 is chosen every time from all five folds both for RENT and UBayFS supporting this feature as a
strong prognostic indicator for OS. Further, Tumor Morphology gets chosen four out of five times with RENT and
three out of five times with UBayFS. This is also to be expected since we know that patients with NET G3 have a
better OS than those patients with NEC [55]. What is surprising is that most tumor sites, especially those patients with
unknown primary and esophagus NEN, are not chosen by RENT or UBayFS. Primary Tumor Site has been shown to
be prognostic in several studies [5, 6]. Several of the features like Stroma, Architecture, Vessel Pattern, Co-existing
neoplasm, and Geographic Necrosis are considered typical for either NET G3 or NEC [56], and one might assume
these are highly correlated with Tumor Morphology. Although this is not reflected in Fig. 2. Almost none of these
features are chosen with RENT or UBayFS except for Stroma. NET G3 typically have hyalinized stroma and NEC
have desmoplastic stroma [56].
Further, in block (i) (PET/CT imaging) the interesting features are Total MTV, Total TLG, and the SUV-parameters.
From Fig. 2 and previous literature [8] we know that these features are often (if not always) highly correlated. Hence,
the selection of SUVmax (total) instead of the other features is probably related to this. Moreover, we know from
previous studies [8, 11–13] that global measures such as Total MTV and Total TLG are poor prognostic indicators for
OS in these tumors, but we lack stronger evidence in form of larger studies. Here we see that SUVmax (total) is chosen
in all five folds both for RENT and UBayFS supporting the previous findings that PET-parameters are good prognostic
features of OS.
Finally, in block (t) (treatment) we can see a few features are selected often. Chemotherapy treatment with cis-
platin/etoposide is not surprisingly a predictor for OS, and most of the patients did indeed receive this combination. No
chemotherapy is obviously detrimental. We also see that the Chemotherapy treatment with temozolomide/everolimus
gets chosen often both by RENT and UBayFS. This is probably because this chemotherapy regimen is more often
chosen for those patients with a low Ki-67 and these are more likely to be NET G3 which already have a better OS.
Further, both Number of Courses and Progression are two features that are selected often by RENT and UBayFS. Pro-
gression and No Progression are obviously poor prognostic indicators, and one could assume that the higher Number
of Courses a patient receives the longer before they have progression and hence they live longer. This is of course only
an assumption and interpretation of the data at hand. It is a bit surprising that the response evaluation results did not
get chosen. One would assume that patients with the best response - stable disease would fare better than those with
progressive disease. Looking at Fig. 2 the features from this block have low correlation coefficients.
Experiment 2 Here we added prior expert knowledge and assigned two different weights. A weight w = 50 means
approximately 50% expert-driven and 50% data-driven. A weight w = 110 means almost purely an expert-driven ap-
proach where we effectively force the selection of features only from the subset of those from prior expert knowledge.
We concentrated on features that are well documented in several previous studies, although there exist more features
in the literature suggesting prognostic values than these. The features selected from prior expert knowledge are listed
in the first paragraph in Section 3.4 and marked by an asterisk in Tab. 4.
If we concentrate on the second, third, and fourth columns, which shows the difference between roughly 0%, 50%
and 100% expert-driven, we see that none of the marked features drops in importance as we increase the value of
expert knowledge. Some features that were never chosen with a pure data-driven model are still not chosen. One
could argue that these are probably not strong features to begin with, or that other features contain the same and/or
stronger information. A few features only get chosen when almost completely removing the data-driven part and make
a huge leap from not being chosen to being chosen five times. We argue that one should be careful to put too much
importance on these features as we expect these are more or less forced to be chosen.
A few features stand out by being stable across all values of w; WHO Performance Status, Albumin, Platelets, Ki-67,
Tumor Morphology, Total MTV, Total TLG, and SUVmax. It would be bold to assume that these features are the most
important and stable predictors of OS from the subset of expert knowledge markers, but that would probably be too
premature. Further, it is also interesting to notice that even though several parameters from PET are highly correlated,
several are still chosen very often by the model. This is in line with the results of our previous study ( [8]. Moreover,
it is a bit surprising that Primary Tumor Site, especially Unknown Primary and Esophagus, is not chosen more often
as these are well-known negative predictors of OS [5, 6].
We also notice that some of the other non-marked features drop in importance as we increase w, and this is probably
related to the fact that the features overlap in the information they add to the model. A few of these features are also
moderately or highly correlated. E.g. CRP is correlated with quite a few of the other blood markers, and this could
explain why it falls in importance when increasing w. Mets Bone (bone metastases) is not listed in the correlation
16
Feature Selection in High-Grade Gastroenteropancreatic Neuroendocrine Neoplasms
A PREPRINT
heatmap and thus has no moderate or high correlations with other features, but still completely falls out. Bone metas-
tases usually occur late in several cancers and is a poor prognostic feature. Hence, one should assume that this feature
and similar ones like CRP, ALP, which performs well with low values of w falls of in the pure knowledge-driven
model because the model is "forced" to select only marked features. We must remember that the w = 110 is an ex-
treme expert-driven model which is probably not clinically relevant but was added to explore and evaluate what the
model did in this extreme situation. This is a small, novel study with few patients and really the first of its kind for
exploring and evaluating RENT and UBayFS on clinical data. Using these ensemble feature selectors may be used
for validating already established features, or to find new features not previously known. Evaluation into which w is
optimal should be explored further in future studies.
5 Conclusion
In conclusion, although we cannot ascertain how important different features are compared to each other and if they
contribute to poorer or better survival, we do find similar results as several previous studies. The most stable and
predictive features in our study are WHO Performance Status, Albumin, Platelets, Ki-67, Tumor Morphology, Total
MTV, Total TLG, and SUVmax.
From a data science perspective, we demonstrated the capabilities of the ensemble feature selection techniques RENT
and UBayFS for healthcare problems - in particular, the inclusion and comparison of expert- and data-driven setups,
as well as combinations of both, allow the user to gain relevant information for clinical use.
References
[1] Benjamin E. White, Brian Rous, Kandiah Chandrakumaran, Kwok Wong, Catherine Bouvier, Mieke Van Hemel-
rijck, Gincy George, Beth Russell, Rajaventhan Srirajaskanthan, and John K. Ramage. Incidence and survival of
neuroendocrine neoplasia in England 1995–2018: A retrospective, population-based study. The Lancet Regional
Health - Europe, 23:100510, December 2022.
[2] Raziye Boyar Cetinkaya, Bjarte Aagnes, Espen Thiis-Evensen, Steinar Tretli, Deidi S. Bergestuen, and Svein
Hansen. Trends in incidence of neuroendocrine neoplasms in Norway: A report of 16, 075 cases from 1993
through 2010. Neuroendocrinology, 104(1):1–10, November 2015.
[3] International Agency for Research on Cancer. WHO Classification of Tumours. Digestive System Tumours. World
Health Organization Classification of Tumours. IARC, 1 edition, July 2019.
[4] Guido Rindi, David S. Klimstra, Behnoush Abedi-Ardekani, Sylvia L. Asa, Frederik T. Bosman, Elisabeth
Brambilla, Klaus J. Busam, Ronald R. de Krijger, Manfred Dietel, Adel K. El-Naggar, Lynnette Fernandez-
Cuesta, G ̈unter Kl ̈oppel, W.Glenn McCluggage, Holger Moch, Hiroko Ohgaki, Emad A. Rakha, Nicholas S.
Reed, Brian A. Rous, Hironobu Sasano, Aldo Scarpa, Jean-Yves Scoazec, William D. Travis, Giovanni Tallini,
Jacqueline Trouillas, J.Han van Krieken, and Ian A. Cree. A common classification framework for neuroen-
docrine neoplasms: an International Agency for Research on Cancer (IARC) and World Health Organization
(WHO) expert consensus proposal. Modern Pathology, 31(12):1770–1786, December 2018.
[5] H. Sorbye, S. Welin, S.W. Langer, L.W. Vestermark, N. Holt, P. Osterlund, S. Dueland, E. Hofsli, M.G. Guren,
K. Ohrling, E. Birkemeyer, E. Thiis-Evensen, M. Biagini, H. Gronbaek, L.M. Soveri, I.H. Olsen, B. Federspiel,
J. Assmus, E.T. Janson, and U. Knigge. Predictive and prognostic factors for treatment and survival in 305
patients with advanced gastrointestinal neuroendocrine carcinoma (WHO G3): The NORDIC NEC study. Annals
of Oncology, 24(1):152–160, January 2013.
[6] Arvind Dasari, Kathan Mehta, Lauren A. Byers, Halfdan Sorbye, and James C. Yao. Comparative study of lung
and extrapulmonary poorly differentiated neuroendocrine carcinomas: A SEER database analysis of 162, 983
cases. Cancer, 124(4):807–815, December 2017.
[7] Arvind Dasari, Chan Shen, Anjali Devabhaktuni, Ruda Nighot, and Halfdan Sorbye. Survival according to
primary tumor location, stage, and treatment patterns in locoregional gastroenteropancreatic high-grade neu-
roendocrine carcinomas. The Oncologist, 27(4):299–306, February 2022.
[8] Henning Langen Stokmo, Mahmoud Aly, Inger Marie Bowitz Lothe, Austin J. Borja, Siavash Mehdizadeh Seraj,
Rina Ghorpade, Xuan Miao, Geir Olav Hjortland, Eirik Malinen, Halfdan Sorbye, Thomas J. Werner, Abass
Alavi, and Mona-Elisabeth Revheim. Volumetric parameters from [18F]FDG PET/CT predicts survival in
patients with high-grade gastroenteropancreatic neuroendocrine neoplasms. Journal of Neuroendocrinology,
34(7):e13170, 2022.
17
Feature Selection in High-Grade Gastroenteropancreatic Neuroendocrine Neoplasms
A PREPRINT
[9] M Heetfeld, C N Chougnet, I H Olsen, A Rinke, I Borbath, G Crespo, J Barriuso, M Pavel, D O'Toole, T Walter,
and other Knowledge Network members. Characteristics and treatment of patients with G3 gastroenteropancre-
atic neuroendocrine neoplasms. Endocrine-Related Cancer, 22(4):657–664, June 2015.
[10] Sangwon Han, Hyo Sang Lee, Sungmin Woo, Tae-Hyung Kim, Changhoon Yoo, Baek-Yeol Ryoo, and Jin-Sook
Ryu. Prognostic value of 18F-FDG PET in neuroendocrine neoplasm. Clinical Nuclear Medicine, Publish Ahead
of Print, May 2021.
[11] David L. Chan, Elizabeth J. Bernard, Geoffrey Schembri, Paul J. Roach, Meaghan Johnson, Nick Pavlakis,
Stephen Clarke, and Dale L. Bailey. High metabolic tumour volume on 18-fluorodeoxyglucose positron emission
tomography predicts poor survival from neuroendocrine neoplasms. Neuroendocrinology, 110(11-12):950–958,
November 2019.
[12] Ho Seong Kim, Joon Young Choi, Dong Wook Choi, Ho Yeong Lim, Joo Hee Lee, Sun Pyo Hong, Young Seok
Cho, Kyung-Han Lee, and Byung-Tae Kim. Prognostic value of volume-based metabolic parameters measured by
18F-FDG PET/CT of pancreatic neuroendocrine tumors. Nuclear Medicine and Molecular Imaging, 48(3):180–
186, February 2014.
[13] Sun Min Lim, Hyunki Kim, Beodeul Kang, Hyo Song Kim, Sun Young Rha, Sung Hoon Noh, Woo Jin Hyung,
Jae-Ho Cheong, Hyoung-Il Kim, Hyun Cheol Chung, Mijin Yun, Arthur Cho, and Minkyu Jung. Prognostic value
of 18F-fluorodeoxyglucose positron emission tomography in patients with gastric neuroendocrine carcinoma and
mixed adenoneuroendocrine carcinoma. Annals of Nuclear Medicine, 30(4):279–286, February 2016.
[14] Giovanni Centonze, Patrick Maisonneuve, Natalie Prinzi, Sara Pusceddu, Luca Albarello, Eleonora Pisa, Mas-
simo Barberis, Alessandro Vanoli, Paola Spaggiari, Paola Bossi, Laura Cattaneo, Giovanna Sabella, Enrico
Solcia, Stefano La Rosa, Federica Grillo, Giovanna Tagliabue, Aldo Scarpa, Mauro Papotti, Marco Volante,
Alessandro Mangogna, Alessandro Del Gobbo, Stefano Ferrero, Luigi Rolli, Elisa Roca, Luisa Bercich, Mauro
Benvenuti, Luca Messerini, Frediano Inzani, Giancarlo Pruneri, Adele Busico, Federica Perrone, Elena Tam-
borini, Alessio Pellegrinelli, Ketevani Kankava, Alfredo Berruti, Ugo Pastorino, Nicola Fazio, Fausto Sessa,
Carlo Capella, Guido Rindi, and Massimo Milione. Prognostic factors across poorly differentiated neuroen-
docrine neoplasms: a pooled analysis. Neuroendocrinology, November 2022.
[15] P. Kubben, M. Dumontier, and A. Dekker. Fundamentals of Clinical Data Science. Springer International
Publishing, 2019.
[16] Mattea L. Welch, Chris McIntosh, Benjamin Haibe-Kains, Michael F. Milosevic, Leonard Wee, Andre Dekker,
Shao Hui Huang, Thomas G. Purdie, Brian O'Sullivan, Hugo J.W.L. Aerts, and David A. Jaffray. Vulnerabilities
of radiomic signature development: The need for safeguards. Radiotherapy and Oncology, 130:2–9, January
2019.
[17] David Wallis and Ir`ene Buvat. Clever Hans effect found in a widely used brain tumour MRI dataset. Medical
Image Analysis, 77:102368, April 2022.
[18] Ian T. Jolliffe and Jorge Cadima. Principal component analysis: a review and recent developments. Philosophical
Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences, 374(2065):20150202,
April 2016.
[19] Anna Jenul, Stefan Schrunner, J ̈urgen Pilz, and Oliver Tomic. A user-guided bayesian framework for ensemble
feature selection in life science applications (UBayFS). Machine Learning, 111(10):3897–3923, 2022.
[20] R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society. Series B
(Methodological), 58(1):267–288, 1996.
[21] L. Breiman, J. Friedman, C. J. Stone, and R. A. Olshen. Classification and Regression Trees. Taylor & Francis,
1984.
[22] Xiaofei He, Deng Cai, and Partha Niyogi. Laplacian score for feature selection. In Proceedings of the 18th
International Conference on Neural Information Processing Systems, NIPS'05, page 507–514, Cambridge, MA,
USA, 2005. MIT Press.
[23] Chris Ding and Hanchuan Peng. Minimum redundancy feature selection from microarray gene expression data.
Journal of Bioinformatics and Computational Biology, 3(02):185–205, 2005.
[24] Sarah Nogueira, Konstantinos Sechidis, and Gavin Brown. On the stability of feature selection algorithms.
Journal of Machine Learning Research, 18(174):1–54, 2018.
[25] Ver ́onica Bol ́on-Canedo and Amparo Alonso-Betanzos. Recent advances in ensembles for feature selection.
Intelligent Systems Reference Library. Springer International Publishing, Basel, Switzerland, 1 edition, May
2018.
18
Feature Selection in High-Grade Gastroenteropancreatic Neuroendocrine Neoplasms
A PREPRINT
[26] L. Breiman. Random Forests. Machine Learning, 45(1):5–32, 2001.
[27] Anna Jenul, Stefan Schrunner, Kristian Hovde Liland, Ulf Geir Indahl, Cecilia Marie Futsaether, and Oliver
Tomic. RENT-repeated elastic net technique for feature selection. IEEE Access, 9:152333–152346, 2021.
[28] International Agency for Research on Cancer. WHO classification of tumours of the digestive system. World
Health Organization Classification of Tumours. IARC, 4 edition, November 2010.
[29] E.A. Eisenhauer, P. Therasse, J. Bogaerts, L.H. Schwartz, D. Sargent, R. Ford, J. Dancey, S. Arbuck, S. Gwyther,
M. Mooney, L. Rubinstein, L. Shankar, L. Dodd, R. Kaplan, D. Lacombe, and J. Verweij. New response evalua-
tion criteria in solid tumours: Revised RECIST guideline (version 1.1). European Journal of Cancer, 45(2):228–
247, January 2009.
[30] A. B. Mariotto, A.-M. Noone, N. Howlader, H. Cho, G. E. Keel, J. Garshell, S. Woloshin, and L. M. Schwartz.
Cancer survival: An overview of measures, uses, and interpretation. JNCI Monographs, 2014(49):145–186,
November 2014.
[31] J M. Bland and D. G Altman. Statistics notes: Survival probabilities (the Kaplan-Meier method). BMJ,
317(7172):1572–1580, December 1998.
[32] Max Kuhn and Kjell Johnson. Applied predictive modeling. Springer, New York, NY, 1 edition, May 2013.
[33] Alice Zheng. Feature Engineering for Machine Learning. O'Reilly Media, Sebastopol, CA, April 2018.
[34] I.-K. Yeo. A new family of power transformations to improve normality or symmetry. Biometrika, 87(4):954–
959, December 2000.
[35] B Srujana, Dhananjay Verma, and Sameen Naqvi. Machine learning vs. survival analysis models: a study on
right censored heart failure data. Communications in Statistics-Simulation and Computation, pages 1–18, 2022.
[36] Hui Zou and Trevor Hastie. Regularization and variable selection via the elastic net. Journal of the Royal
Statistical Society: Series B (Statistical Methodology), 67(2):301–320, April 2005.
[37] Trevor Hastie, Robert Tibshirani, and Jerome Friedman. The Elements of Statistical Learning. Springer New
York, 2009.
[38] R Core Team. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Comput-
ing, Vienna, Austria, 2022.
[39] Guido Van Rossum and Fred L. Drake. Python 3 Reference Manual. CreateSpace, Scotts Valley, CA, 2009.
[40] Anna Jenul, Stefan Schrunner, Bao Ngoc Huynh, and Oliver Tomic. RENT: A Python package for repeated
elastic net feature selection. Journal of Open Source Software, 6(63):3323, 2021.
[41] Anna Jenul and Stefan Schrunner. UBayFS: An R package for user guided feature selection. Journal of Open
Source Software, 8(81):4848, 2023.
[42] Max Kuhn. caret: Classification and Regression Training, 2022. R package version 6.0-93.
[43] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss,
V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn:
Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011.
[44] Hadley Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016.
[45] Genlian Chen, Qiang Xu, Shengjun Qian, Zhan Wang, and Shicheng Wang. Survival analysis in gastrointestinal
[46]
neuroendocrine carcinoma with bone metastasis at diagnosis. Frontiers in Surgery, 9, January 2022.
̈Omer Komac ̧, G ̈oksel Bengi, ̈Ozg ̈ul Sa ̆gol, and Mesut Akarsu. C-reactive protein may be a prognostic factor
for the whole gastroenteropancreatic neuroendocrine tumor group. World Journal of Gastrointestinal Oncology,
11(2):139–152, February 2019.
[47] Anna Niessen, Simon Schimmack, Marta Sandini, Dominik Fliegner, Ulf Hinz, Magdalena Lewosinska, Thilo
Hackert, Markus W. B ̈uchler, and Oliver Strobel. C-reactive protein independently predicts survival in pancreatic
neuroendocrine neoplasms. Scientific Reports, 11(1), December 2021.
[48] Patricia Freis, Emmanuelle Graillot, Pascal Rousset, Val ́erie Hervieu, Laurence Chardon, Catherine Lombard-
Bohas, and Thomas Walter. Prognostic factors in neuroendocrine carcinoma: biological markers are more useful
than histomorphological markers. Scientific Reports, 7(1), January 2017.
[49] Niklas Gebauer, Maria Ziehm, Judith Gebauer, Armin Riecke, Sebastian Meyh ̈ofer, Birte Kulemann, Nikolas
von Bubnoff, Konrad Steinestel, Arthur Bauer, and Hanno M. Witte. The glasgow prognostic score predicts
survival outcomes in neuroendocrine neoplasms of the gastro–entero–pancreatic (GEP-NEN) system. Cancers,
14(21):5465, November 2022.
19
Feature Selection in High-Grade Gastroenteropancreatic Neuroendocrine Neoplasms
A PREPRINT
[50] Koji Amano, Isseki Maeda, Tatsuya Morita, Tomofumi Miura, Satoshi Inoue, Masayuki Ikenaga, Yoshihisa
Matsumoto, Mika Baba, Ryuichi Sekine, Takashi Yamaguchi, Takeshi Hirohashi, Tsukasa Tajima, Ryohei Tatara,
Hiroaki Watanabe, Hiroyuki Otani, Chizuko Takigawa, Yoshinobu Matsuda, Hiroka Nagaoka, Masanori Mori,
and Hiroya Kinoshita. Clinical implications of c-reactive protein as a prognostic marker in advanced cancer
patients in palliative care settings. Journal of Pain and Symptom Management, 51(5):860–867, May 2016.
[51] Peter C. Hart, Ibraheem M. Rajab, May Alebraheem, and Lawrence A. Potempa. C-reactive protein and can-
cer-diagnostic and therapeutic insights. Frontiers in Immunology, 11, November 2020.
[52] Shiva Shrotriya, Declan Walsh, Amy S. Nowacki, Cliona Lorton, Aynur Aktas, Barbara Hullihen, Nabila
Benanni-Baiti, Katherine Hauser, Serkan Ayvaz, and Bassam Estfan. Serum c-reactive protein is an important
and powerful prognostic biomarker in most adult solid tumors. PLOS ONE, 13(8):e0202555, August 2018.
[53] Thomas E. Clancy, Tanya P. Sengupta, Jessica Paulus, Fawzia Ahmed, Mei-Sheng Duh, and Matthew H. Kulke.
Alkaline phosphatase predicts survival in patients with metastatic neuroendocrine tumors. Digestive Diseases
and Sciences, 51(5):877–884, May 2006.
[54] Monica Ter-Minassian, Jennifer A Chan, Susanne M Hooshmand, Lauren K Brais, Anastassia Daskalova, Rachel
Heafield, Laurie Buchanan, Zhi Rong Qian, Charles S Fuchs, Xihong Lin, David C Christiani, and Matthew H
Kulke. Clinical presentation, recurrence, and survival in patients with neuroendocrine tumors: results from a
prospective institutional database. Endocrine-Related Cancer, 20(2):187–196, January 2013.
[55] Halfdan Sorbye, Eric Baudin, and Aurel Perren. The problem of high-grade gastroenteropancreatic neuroen-
docrine neoplasms. Endocrinology and Metabolism Clinics of North America, 47(3):683–698, September 2018.
[56] Hege Elvebakken, Aurel Perren, Jean-Yves Scoazec, Laura H. Tang, Birgitte Federspiel, David S. Klimstra,
Lene W. Vestermark, Abir S. Ali, Inti Zlobec, Tor ̊A. Myklebust, Geir O. Hjortland, Seppo W. Langer, Henning
Gronbaek, Ulrich Knigge, Eva Tiensuu Janson, and Halfdan Sorbye. A consensus-developed morphological
re-evaluation of 196 high-grade gastroenteropancreatic neuroendocrine neoplasms and its clinical correlations.
Neuroendocrinology, 111(9):883–894, October 2020.
20
|
|
http://arxiv.org/abs/2302.10093v1 | 2023-02-20T16:57:44 | 2023-02-20T16:57:44 | Progressive Knowledge Distillation: Building Ensembles for Efficient
Inference | We study the problem of progressive distillation: Given a large, pre-trained
teacher model $g$, we seek to decompose the model into an ensemble of smaller,
low-inference cost student models $f_i$. The resulting ensemble allows for
flexibly tuning accuracy vs. inference cost, which is useful for a number of
applications in on-device inference. The method we propose, B-DISTIL, relies on
an algorithmic procedure that uses function composition over intermediate
activations to construct expressive ensembles with similar performance as $g$,
but with much smaller student models. We demonstrate the effectiveness of \algA
by decomposing pretrained models across standard image, speech, and sensor
datasets. We also provide theoretical guarantees for our method in terms of
convergence and generalization. | [
"Don Kurian Dennis",
"Abhishek Shetty",
"Anish Sevekari",
"Kazuhito Koishida",
"Virginia Smith"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.10093v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.10093v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG"
] | Progressive Knowledge Distillation:
Building Ensembles for Efficient Inference
Don Kurian Dennis 1 Abhishek Shetty 2 Anish Sevekari 1 Kazuhito Koishida 3 Virginia Smith 1
3
2
0
2
b
e
F
0
2
]
G
L
.
s
c
[
1
v
3
9
0
0
1
.
2
0
3
2
:
v
i
X
r
a
Abstract
We study the problem of progressive distillation:
Given a large, pre-trained teacher model g, we
seek to decompose the model into an ensemble
of smaller, low-inference cost student models fi.
The resulting ensemble allows for flexibly tuning
accuracy vs. inference cost, which is useful for
a number of applications in on-device inference.
The method we propose, B-DISTIL, relies on an
algorithmic procedure that uses function compo-
sition over intermediate activations to construct
expressive ensembles with similar performance
as g, but with much smaller student models. We
demonstrate the effectiveness of B-DISTIL by de-
composing pretrained models across standard im-
age, speech, and sensor datasets. We also provide
theoretical guarantees for our method in terms of
convergence and generalization.
1. Introduction
Knowledge distillation aims to transfer the knowledge of a
large model into a smaller one (Buciluˇa et al., 2006; Hinton
et al., 2015). While this technique is commonly used for
model compression, one downside is that the procedure is
fairly rigid-resulting in a single compressed model of a
fixed size. In this work, we instead consider the problem
of progressive distillation: approximating a large model via
an ensemble of smaller, low-latency models. The resulting
decomposition is useful for many applications in on-device
inference. For example, components of the ensemble can
be selectively combined to flexibly meet accuracy/latency
constraints (Li et al., 2019; Yang & Fan, 2021), can enable
efficient parallel inference execution schemes, and can facil-
itate early-exit (Bolukbasi et al., 2017; Dennis et al., 2018)
or anytime inference (Ruiz & Verbeek, 2021; Huang et al.,
2017a) applications, which are scenarios where inference
may be interrupted due to variable resource availability.
1Carnegie Mellon University, Pittsburgh, PA, USA 2University
of California at Berkeley, CA, USA 3Microsoft, Redmond, WA,
USA. Correspondence to: Don Dennis <[email protected]>.
Figure 1. In progressive distillation, a large teacher model is dis-
tilled onto low inference cost models. The more student models we
evaluate, the closer the ensemble's decision boundary is to that of
the teacher model. Models in the ensemble are allowed to depend
on previously computed features.
More specifically, we seek to distill a large pre-trained
model, g, onto an ensemble comprised of low-parameter
count, low-latency models, fi. We additionally aim for
the resulting ensemble to form a decomposition, such that
evaluating the first model produces a coarse estimate of the
prediction (e.g., covering common cases), and evaluating
additional models improves on this estimate (see Figure 1).
There are major advantages to such an ensemble for on-
device (user-side) efficient inference: 1) inference cost vs.
accuracy trade-offs can be controlled on-demand at execu-
tion time, 2) the ensemble can either be executed in parallel
or in sequence, or possibly a mix of both, and 3) we can im-
prove upon coarse initial predictions without re-evaluation
in response to resource availability.
While traditional distillation methods are effective when
transferring information to a single model of similar ca-
pacity, it has been shown that performance can degrade
significantly when reducing the capacity of the student
model (Mirzadeh et al., 2020; Gao et al., 2021). More-
over, distillation of a deep network onto a weighted sum
of shallow networks rarely performs better than distillation
onto a single model (Cho & Hariharan, 2019; Allen-Zhu &
Li, 2020). Our insight in this work is that by composing and
reusing activations and by explicitly incentivizing models
to be weak-learners during distillation, we can successfully
find weak learners even when the capacity gap is relatively
large. As long as these composition functions are resource
efficient, we can then increase base class capacity at roughly
the same inference cost as a single model. Moreover, we
show that our procedure retains the theoretical guarantees of
the classical boosting methods (Schapire & Freund, 2013).
. . .Teacher ModelProgressive Distillation+++Student Models. . .+
Progressive Knowledge Distillation: Building Ensembles for Efficient Inference
Concretely, we make the following contributions:
• We formulate progressive distillation as a two player zero-
sum game, derive a weak learning condition for distil-
lation, and present our algorithm, B-DISTIL, to approx-
imately solve this game. To make the search for weak
learners in low parameter count models feasible, we solve
a log-barrier based relaxation of our weak learning con-
dition. By allowing models to reuse computation from
select intermediate layers of previously evaluated mod-
els of the ensemble, we are able to increase the model's
capacity without significant increase in inference cost.
• We empirically evaluate our algorithm on synthetic and
real-world classification tasks from computer vision,
speech, and sensor processing with models suitable for
the respective domains. We show that our ensemble be-
haves like a decomposition, allowing a run-time trade-off
between accuracy and computation, while remaining com-
petitive to the teacher model.
• We provide theoretical guarantees for our algorithm in
terms of in-sample convergence and generalization perfor-
mance. Our framework is not architecture or task specific
and can recover existing ensemble models used in effi-
cient inference, and we believe puts forth a general lens to
view previous work and also to develop new, principled
approaches for efficient inference.
2. Background and Related Work
Knowledge distillation. Machine learning inference is
often resource-constrained in practice due to requirements
around metrics such as memory, energy, cost, or latency.
This has spurred the development of numerous techniques
for model compression. A particularly popular approach
is knowledge distillation, which considers transferring the
knowledge of a larger model (or model ensemble) to a
smaller one (Buciluˇa et al., 2006; Hinton et al., 2015). De-
spite its popularity, performing compression via distillation
has several known pitfalls. Most notably, many have doc-
umented that distillation may not perform well when there
is a capacity gap between the teacher and student, i.e., the
teacher is significantly larger than the student (Mirzadeh
et al., 2020; Gao et al., 2021; Cho & Hariharan, 2019; Allen-
Zhu & Li, 2020). When performing distillation onto a
weighted combination of ensembles, it has been observed
that adding additional models into the ensemble does not
dramatically improve performance over that of a single dis-
tilled model (Allen-Zhu & Li, 2020). There is also a lack of
theoretical work characterizing when and why distillation is
effective for compression (Gou et al., 2021). Our work aims
to address many of these pitfalls by developing a principled
approach for progressively distilling a large model onto an
ensemble of smaller, low-capacity ones.
Early exits and anytime inference. Numerous applica-
tions stand to benefit from the output of progressive distilla-
tion, which allows for flexibly tuning accuracy vs. inference
cost and executing inference in parallel. Enabling trade-
offs between accuracy and inference cost is particularly
useful for applications that use early exit or anytime infer-
ence schemes. In on-device continuous (online) inference
settings, early exit models aim to evaluate common cases
quickly in order to improve energy efficiency and prolong
battery life (Dennis et al., 2018; Bolukbasi et al., 2017). For
instance, a battery powered device continuously listening for
voice commands can use early exit methods to improve bat-
tery efficiency by classifying non-command speech quickly.
Many methods that produce early exit models are also ap-
plicable to anytime inference (Huang et al., 2017a; Ruiz &
Verbeek, 2021). In anytime inference, the aim is to produce
a prediction even when inference is interrupted, say due to
resource contention or a scheduler decision. Unlike early
exit methods where the classifier chooses when to exit early,
anytime inference methods have no control over when they
are interrupted. We explore the effectiveness of using our
method, B-DISTIL, for such applications in Section 5.
Two-player games, online optimization and boosting.
The importance of equilibrium of two player zero-sum
games has been recognized since the foundational work
of von Neumann and Morgenstern (von Neumann & Mor-
genstern, 1944). Their connections to convex programming
duality have lead to many developments in algorithm design,
theoretical computer science, and machine learning (Lu-
gosi & Cesa-Bianchi, 2006; Goodfellow et al., 2014). One
remarkable application is by Schapire (1990) and Freund
(1990) who showed that weak learners can be aggregated
to produce strong learners. This has led to many practi-
cal boosting based learning algorithms and software such
as AdaBoost (Freund & Schapire, 1997), gradient boost-
ing (Mason et al., 1999), and XGboost (Chen & Guestrin,
2016). An application of boosting that is similar to our setup
is by Trevisan et al. (2009). They show that given a target
bounded function g, and class of approximating functions
F, one can approximate g arbitrarily well with respect to
F using ideas from online learning and boosting. Although
boosting has led to many theoretical and practical advances,
these efforts have only recently seen success in deep learn-
ing applications. In particular, Suggala et al. (2020) propose
a generalized boosting framework to train boosting based
ensembles of deep networks using function compositions
in feature space. Our focus in this work is on the distilla-
tion onto low cost models, given an expensive pre-trained
teacher model. We incorporate a restricted version of this
function composition as part of our search for weak learners
(Section 3). This is particularly useful in the early rounds of
our algorithm, where there is usually a significant capacity
gap between the teacher model and the student model class.
Progressive Knowledge Distillation: Building Ensembles for Efficient Inference
Algorithm 1 B-DISTIL: Main algorithm
Require: Target g, rounds T , data {(xi, yi)}N
i=1, learning
m=1
2N ∀(i, j)
t (i, j) ← 1
rate η, model classes {Fm}M
2N , 1
1: K +
t (i, j), K −
2: F, r, t ← ∅, 1, 1
3: while r < R and t < T do
ft = FIND-WL(K +
t , K −
4:
if ft is NONE then
5:
6:
7:
8:
9: With l := ft − g, update K +
r ← r + 1
continue
end if
t , Fr)
t , K −
t . ∀(i, j)
K +
K −
t+1(i, j) ← K +
t+1(i, j) ← K −
t (i, j) exp(−η * l(xi)j)
t (i, j) exp(η * l(xi)j)
(1)
(2)
Normalize K +
F, t ← F ∪ {ft}, t + 1
t , K −
t .
10:
11:
12: end while
13: Return 1
|F |
(cid:80)|F |
i=1 fi
3. Problem Formulation and Algorithm
We start by formulating our distillation task as a two player
zero-sum game and introduce the framework of stochastic
minimax optimization. Consider a class of hypotheses F,
a class of probability distributions P and a loss function
L that is convex in its first argument. We consider two
players whose pure strategy sets are F and P respectively,
with loss (and reward) of the players given by F (f, p) =
Ex∼p[L(f, x)]. This naturally leads to the definition of the
minimax value of the game given by
max
p∈P
min
f ∈F
F (f, p) .
(3)
Note that this game is convex in the hypothesis player (min-
player) and concave in the distribution player (max-player)
and thus amenable to algorithmic approaches. An algorithm
is said to (approximately) solve the above minimax problem
if it produces a distribution over hypotheses and a distribu-
tion that achieve the value in Equation (3). In order for the
problem to be well-defined, we need to specify the access
the algorithm has to the F and P. One general notion is to
allow access to a weak gradient vector h such that, when
queried at distribution μ ∈ P and for β > 0,
(cid:104)h, ∇f F (f, p)(cid:105) ≥ β,
(4)
The advantage of this lens is that many algorithms can be
seen as implementing solutions to such minimax optimiza-
tion problems. See Appendix A for a more involved discus-
sion of the stochastic minmax optimization framework.
Algorithm 2 FIND-WL
Require: Probability matrices K +, K −, model class F
parameterized by θ ∈ Θ, hyper-parameters for SGD
1 by expanding F (section 3.2).
r=1 do
Initialize initial parameter θ0 ∈ F (cid:48).
for i ∈ {1, . . . , max-search} do
Randomly initialize fθi.
Run SGD to solve Equation 6.
if fθi is a weak learner then
1: Obtain {Fr}R
2: for F (cid:48) ∈ {Fr}R
3:
4:
5:
6:
7:
8:
9:
10:
11: end for
12: Return NONE
end if
end for
Return fθi
Although, Equation (4) is a seemingly easier notion than
the full optimization, we emphasize that in many problems
of interest even this is challenging. In fact, in the multil-
abel setting that we focus on, one of the main algorithmic
challenges is to construct an algorithm that reliable and
efficiently finds these weak gradients. Our method FIND-
WL provides a way to do this successfully as demonstrated
in our experimental setup, across a variety of datasets.
For our setting of interest, we restrict our attention the case
where P is the set of all distributions over a sample set
drawn from a fixed distribution p, and defer the details of
the general framework to the Appendix A. As in traditional
distillation we will work with the output of g, often referred
to as logits. Our goal is to produce an ensemble of predictors
from the set of hypothesis classes {Fm} to approximate g
'well'. We will do this by searching for weak learners with
respect to the target g in the class Fm. Whenever this search
fails we restart the search, now allowing models in Fm to
reuse features computed by previous models.
(cid:80)
More formally, to cast our progressive distillation prob-
lem as a two player game, we start with a predictor (a
model or an ensemble) g : X → RL already provided
to us along with a non empty set of low inference cost1
hypothesis class {Fm}M
m=1. We assume that {Fm} is in
increasing order of inference cost. The loss function of
i,j (f (xi) − g(xi))2
interest then is 1
j which is the total
2
squared error between the two predictors. Given a training
set {xi}, we think of the role of the max player in Equa-
tion (3) as producing distributions over the training set and
the role of the min player as producing a hypothesis that
minimizes the loss on this distribution. In this setting, note
i pi,j = 1(cid:9) is the
that P = (cid:8)p ∈ RN ×L : pi,j ≥ 0 ∀j (cid:80)
1We can define 'inference cost' in terms of memory require-
ments, compute requirements, or other metrics, based on out use-
case. We only assume {Fi} can be ordered on this metric.
Progressive Knowledge Distillation: Building Ensembles for Efficient Inference
product of simplices in N × L dimensions, and
(∇f F (f, p))j =
(cid:88)
i
pi,j (f (xi) − g(xi))j .
(5)
t ∈ RN ×L and K −
Concretely, at each iteration t, the algorithm maintains
a matrices K +
t ∈ RN ×L of proba-
bilities (in our setting, it turns out to be easier to main-
tain the positive errors and the negative error separately).
Note that, the matrices K +
t are such that for all
j ∈ [L], (cid:80)
i K +
t (i, j) = 1. Moreover, for
all (i, j) ∈ [N ] × [L], 0 ≤ K +
t (i, j) ≤ 1. The
elements K +
t (i, j) can be thought of as the
weight on the residuals ft−1(x) − g(x) and g(x) − ft−1(x)
respectively, up-weighting large deviations from g(x).
t (i, j) and K −
t (i, j) + K −
t (i, j), K −
t and K −
In order to make updates to this vector, we need access to a
weak gradient similar to h in Equation (4). We formalize this
using Definition 1, which can be seen as a natural extension
of the standard weak learning assumption in the boosting
literature to our setting.
Definition 1 (Weak learning condition). Given a dataset
i=1, a target function g : X → RL and probabil-
{(xi, yi)}N
t , a function ft : X → RL is said to
ity matrices K +
satisfy the weak learning condition with respect to g, ∀j, the
following sum is strictly positive
t , K −
K +
t (i, j)(ft(xi)−g(xi))j +K −
t (i, j)(g(xi)−ft(xi))j.
(cid:88)
i
t , K +
With the current probability matrices K −
t , in each
round t, B-DISTIL performs two steps; first, it invokes a sub-
routine FIND-WL that attempts to find a classifier ft ∈ Fr
satisfying the weak learning condition (Definition 1). If
such a predictor is found, we add it to our ensemble and
proceed to the second step, updating the probability matri-
ces K −
t based on errors made by ft. This is similar in
spirit to boosting algorithms such as AdaBoost (Schapire &
Freund, 2013) for binary classification. If no such predictor
can be found, we invoke the subroutine with the next class,
Fr+1, and repeat the search till a weak learner is found or
we have no more classes to search in.
t , K +
3.1. Finding Weak-learners
As mentioned earlier, the real difficulty in provably boosting
in this setting is in finding a single learner ft at round t that
satisfies our weak learning condition simultaneously for all
labels j. Existing boosting methods for classification treat
multi-class settings (L > 1) as L instances of the binary
classification problem (one vs. all) (Schapire & Freund,
2013). They typically choose L different weak learners
for each instance, which is unsuitable for resource efficient
on-device inference. The difficulty is further increased by
the capacity gap between the student and teacher models we
consider for distillation. In our work, we focus on this aspect
of the problem. Thus, along with controlling temperature
for distillation, we employ two additional strategies: 1) we
use a log-barrier regularizer in the objective FIND-WL solves
to promote weak learning and, 2) we reuse limited stored
activation outputs of previously evaluated models to increase
the expressivity of the current base class.
3.1.1. LOG-BARRIER REGULARIZER
To find a weak learner, the FIND-WL method minimizes
sum of two lose terms using stochastic gradient descent.
The first is standard binary/multi-class cross-entropy distil-
lation loss function (Hinton et al., 2015), with temperature
smoothening. The second term is defined in Equation 6:
−
1
γ
(cid:88)
i,j
I +
ij log
(cid:16)
1 +
(cid:17)
l(xi)j
2B
+ (1 − I +
ij ) log
(cid:16)
1 −
(cid:17)
l(xi)j
2B
(6)
ij := I[K +
t (i, j) > K −
Here I +
t (i, j)], B is an upper bound
on the magnitude of the logits, and l(xi) := f (xi) − g(xi).
To see the intuition behind this expression, first assume the
following is true for all (i, j).
(K +
t (i, j) − K −
t (i, j))(f (xi) − g(xi))j > 0.
(7)
Summing over all data points xi, we can see that this is
sufficient for f to be a weak learner with respect to g. Equa-
tion 6 is a soft log-barrier version of the weak learning
condition, that penalizes those (i, j) for which Equation 7
does not hold. By tuning γ we can increase the relative im-
portance of the regularization objective, encouraging ft to
be a weak learner potentially at the expense of classification
performance.
3.1.2. INTERMEDIATE LAYER CONNECTIONS
As discussed in Section 2, distillation onto a linear combi-
nation of low capacity student models often offers no better
performance than that of any single model in the ensemble
trained independently. For boosting, empirically we see that
once the first weak learner has been found in some class Fm
of low-capacity deep networks, it is difficult to find a weak
learner for the reweighed objective from the same class Fm.
To work around this we let our class of weak learners at
round t include functions that depend on the output of in-
termediate layers of previous weak learners (Suggala et al.,
2020).
As a concrete example, consider a deep fully connected
network with U layers, parameterized as f = W φ1:U . Here
φ1:u can be thought of as a feature transform on x using
the first u layers into Rdu and W ∈ RdU ×L is a linear
transform. With two layer fully connected base model class
F0 := {W (0)φ(0)
1:2 | W (0) ∈ RL×d2} (dropping subscript
Progressive Knowledge Distillation: Building Ensembles for Efficient Inference
m for simplicity), define:
Fr = {W (r)φ(r)
r = {W (r)φ(r)
F (cid:48)
1:2(id + φ(r−1)
2 (id + φ(r)
)} ,
1 + φ(r−1)
1:2
1
)} ,
with id(x) := x. It can be seen that {Fr} and {F (cid:48)
r} define a
variant of residual connection based networks (Huang et al.,
2017b). It can be shown that classes of function {Fr} (and
{F (cid:48)
r}) increase in capacity with r. Moreover, when evalu-
ating sequentially the inference cost of a model from Fr is
roughly equal to that of F, since each subsequent evaluation
reuses stored activations from previous evaluations. For this
reason the parameter count of each Fr remains the same as
that of the base class.
We informally refer to the process of constructing {Fr}
given a choice of base class F0, the parameter R and the
connection type as expanding F0.
In our experiments,
we consider four connection functions: dense connec-
tions (He et al., 2016), residual-connections (Huang et al.,
2017b), LSTM gated-connections (Hochreiter & Schmidhu-
ber, 1997) and GRU (Cho et al., 2014) gated connections
and other accumulation operations, and consider R as a
hyper-parameter.
Note that while intermediate connections help with capacity,
they often reduce parallelizability. For instance, weak learn-
ers from F (cid:48) defined here depend on the output of a (fixed)
learner from Fr−1, and thus can only finish its inference
after the previous models is evaluated. As a practical con-
sequence dependencies on activation outputs of later layers
are preferred, as this allows us more freedom in choosing
execution schemes (see Appendix C).
4. Theoretical Analysis
√
In this section, we provide theoretical analysis and justifica-
tion for our method. We first prove in sample convergence
guarantees; we will show that the ensemble output produced
by algorithm 1 converges to g at O(1/
T ) rate, provided
that the procedure FIND-WL succeeds at every time t.
Theorem 1. Suppose the class F satisfies that for all f ∈
F, (cid:107)f − g(cid:107)∞ ≤ G∞. Let F = {ft} be the ensemble
after T rounds of Algorithm 1, with the final output Ft =
1
t=1 ft. If ft satisfies eq. (7) for all t ≤ T then for
T
T ≥ ln 2N and η = 1
G∞
T , we have for all j
(cid:113) ln 2N
(cid:80)T
(cid:107)Ft,j − gj(cid:107)∞ ≤ G∞
(cid:114)
ln 2N
T
(8)
where Ft,j and gj are the jth coordinates of the functions
Ft and g respectively.
We differ the details of the proof to the Appendix B. The
main idea behind the proof is to bound the rate of conver-
gence of the algorithm towards the minimax solution. This
proceeds by maintaining a potential function and keeping
track of its progress through the algorithm. The bounds
and techniques here are general in the sense that for various
objectives and loss functions appropriate designed weak
learners give similar rates of convergence to the minimax
solution. Furthermore, a stronger version that shows expo-
nential rates can be shown by additionally assuming an edge
for the weak learner.
In addition to the claim above about the in sample risk, we
also show that the algorithm has a strong out of sample
guarantee. We show this by bounding the generalization
error of the algorithm in terms of the generalization error
of the class F. In the following theorem, we restrict to the
case of binary classification for simplicity but general result
follow along similar lines.
Let CT denote the class of functions of the form
H(x) = sign( 1
T
T
(cid:88)
i=1
ht(x)),
where ht are functions in class F. Then we have the follow-
ing generalization guarantee:
Theorem 2 (Excess Risk). Suppose data D contains of N
iid samples from distribution D. Suppose that the func-
tion g has (cid:15) margin on data D with probability μ, that is
Prx∼D [|g(x)| < (cid:15)] < μ. Further, suppose that the class
∞ ln 2N/(cid:15)2,
CT has VC dimension d. Then, for T ≥ 4G2
with probability 1 − δ over the samples, the output FT of
algorithm 1 satisfies
err(FT ) ≤ (cid:99)err(g) + O
(cid:32)(cid:114)
d ln(N/d) + ln(1/δ)
N
(cid:33)
+ μ
Note that the above theorem can easily be adapted to the
case of margins and VC dimension of the class CT being
replaced with the corresponding fat shattering dimensions.
Furthermore, in the setting of stochastic minimax optimiza-
tion, one can get population bounds directly by thinking of
sample losses and gradients as stochastic gradients to the
population objective. This is for example the view taken
by (Suggala et al., 2020). In our work, we separate the
population and sample bounds to simplify the presentation
and the proofs.
Remark 2.1. We further emphasize that though the exact
bound that appear in Theorem 1 and Theorem 2 depend on
our particular algorithm, the forms and the general flavor
of the guarantees of the theorems are general amongst algo-
rithms solving stochastic minimax problems. For example,
the theorems of (Suggala et al., 2020) can be captured by
our framework.
Progressive Knowledge Distillation: Building Ensembles for Efficient Inference
(a) Cube
(b) Ellipsoid
(c) CIFAR-10
(d) CIFAR-100
(e) Google-13
(f) DSA-19
Figure 2. Accuracy vs inference-time trade-offs. Inference time is reported as fraction of teacher's inference time along with average
ensemble accuracy and error bars. B-DISTIL performs this trade-off at runtime. The baseline NO-RESHED at inference time τw (x-axis)
is the accuracy of a single model that is allowed |τw − 0| time for inference. Similarly the baseline RESHED at τw is the accuracy of
an ensemble of models, where the model w is allowed |τw − τw−1| time to perform its inference. This is also the latency between the
successive predictions from B-DISTIL. We can see that B-DISTIL (green) remains competitive to the oracle baseline (NO-RESCHED, blue)
and outperforms weighted averaging (RESCHED, yellow).
5. Empirical Evaluation
We now evaluate B-DISTIL on both real-world and simu-
lated datasets, and over a variety of architecture types. We
consider four real world datasets across three domains-
vision, speech and sensor-data-as well as two simulated
datasets. This allows us to evaluate our method on five of
architecture types: fully connected networks, convolutional
networks, residual networks, densely connected networks,
and recurrent networks.
5.1. Dataset Information
For experiments with simulated data, we construct two
datasets. The first dataset, referred to as ellipsoid is a binary
classification data set. Here the classification labels for each
data point x ∈ R32 is determined by the value of xT Ax
for a random positive semidefinite matrix A. The second
simulated dataset, cube, is for multiclass classification with
4 classes. Here labels are determined by distance to vertices
from {−1, 1}32 in R32, partitioned into 4 classes.
We use four real world data sets for our experiments. Our im-
age classification experiments use the CIFAR-10 and CIFAR-
100 datasets for object detection. These datasets are 10 and
100 label classification tasks respectively. For spoken-audio
classification tasks we use the Google-13 speech commands
dataset. Here the task is keyword detection: given a audio
clip, we need to identify if any of 13 predefined keywords
have been uttered. We use the daily sports activities (DSA)
dataset for experiments with sensor data. Here the task is
identifying the activity performed by an individual from a
predefined set of activities, using sensor data. For detailed
information of all datasets used see Appendix C.
5.2. Model Architecture Details
Teacher models. We use deep fully connected (FC) net-
works for classification on Ellipsoid and convolutional net-
works for Cube. For image classification on CIFAR-10
dataset we use publicly available, pretrained ResNet models.
We train reference DenseNet models for the CIFAR-100
dataset based on publicly available training recipes. As both
spoken audio data (Google-13) and sensor-data (DSA-19)
are time series classification problems, we use recurrent
neural networks (RNNs) for these experiments. We train
LSTM (Hochreiter & Schmidhuber, 1997) based architec-
ture on Google-13 and a GRU (Cho et al., 2014) based
architecture on DSA-19. Except for the pretrained ResNet
models, all other teacher models are selected based on per-
formance on validation data.
Student models. For all distillation tasks, for simplicity
we design the student base model class from the same ar-
chitecture type as the teacher model, but starting with sig-
0.10.20.3frac. inference time8090Accuracy (%)FC-32,32,640.250.500.75frac. inference time80859095FC-16,16,160.00.51.0frac. inference time708090ResNet56NORESHEDRESHEDTeacherBDSTILL0.20.40.6frac. inference time506070Accuracy (%)DenseNet1210.00.20.40.6frac. inference time6080LSTM1280.20.4frac. inference time80.082.585.087.5GRU32Progressive Knowledge Distillation: Building Ensembles for Efficient Inference
Dataset
Algorithm
Early-prediction Acc
Google-13
DSA-19
E-RNN
B-DISTIL
E-RNN
B-DISTIL
T = 50%
T = 75%
Acc (%)
88.31
87.41
83.5
82.1
Frac Acc (%)
0.48
0.49
0.55
0.53
88.42
89.31
83.6
84.1
Frac
0.65
0.71
0.56
0.58
T = 100%
Acc (%)
92.43
92.25
86.8
87.2
Table 1. Early prediction performance. Performance of the ensemble produced by B-DISTIL to the E-RNN algorithm (Dennis et al., 2018).
The accuracy and the cummulative fraction of the data early predicted at 50%, 75% and 100% time steps are shown. At T = 100, frac.
evaluated is 1.0. The ensemble output by B-DISTIL with the early-prediction loss is competitive to the E-RNN algorithm, a method
developed specifically for early prediction of RNNs.
nificantly fewer parameters and resource requirements. We
train for at most T = 7 rounds, keeping η = 1 in all our ex-
periments. Whenever FIND-WL fails to find a weak learner,
we expand the base class F using the connection specified
as a hyperparameter. Since we need only at-most T = 7
weak learners, we can pick small values of R (say, 2). The
details of the intermediate connections used for each data-
set and hyperparameters such as γ, hyper-parameters for
SGD can be found in Appendix C and D.
5.3. Experimental Evaluation and Results
First, we present the trade-off between accuracy and infer-
ence time offered by B-DISTIL in the context of anytime
inference and early prediction. We compare our models on
top-1 classification accuracy and total floating point oper-
ations (FLOPs) required for inference. We use a publicly
available profiler (Rasley et al., 2020) to measure floating
point operations. For simplicity of presentation, we convert
these to the corresponding inference times (τ ) on a reference
accelerator (NVIDIA 3090Ti).
Anytime inference. As discussed previously, in the any-
time inference setting a model is required to produce a
prediction even when its execution is interrupted. Standard
model architectures can only output a prediction once the
execution is complete and thus are unsuitable for this setting.
We instead compare against the idealized baseline where
we assume oracle access to the inference budget ahead of
each execution. Under this assumption, we can train a set of
models suitable various inference time constraints, say by
training models at various depths, and pick the one that fits
the current inference budget obtained by querying the ora-
cle. We refer to this baseline as NO-RESHED and compare
B-DISTIL to it on both synthetic and real world datasets in
Figure 2. This idealized baseline establishes an upper bound
on the accuracy of B-DISTIL.
B-DISTIL can improve on its initial prediction whenever
inference jobs are allowed to be rescheduled. To contex-
tualize this possible improvement, we consider the case
where the execution is interrupted and rescheduled (with
zero-latency, for simplicity) at times {τ1, τ2, . . . , τW }. We
are required to output a prediction at each τw. Assuming we
know these interrupt points in advance, one possible base-
line can be as follows: select models with inference budgets
|τ1|, |τ2 − τ1|, . . . , |τw − τw−1|. Sequentially evaluate them
and at at each interrupt τw, output the (possibly weighted)
average prediction of the w models. We call this baseline
RESCHED. Since the prediction at τw is a simple average
of models, we expect its performance to serve as a lower-
bound for the performance of B-DISTIL. In the same Figure
(Figure 2) we compare B-DISTIL to the RESHED baseline.
Note that both baselines require access to inference budget
ahead of time.
Early prediction. To evaluate the applicability of our
method for early prediction in online time-series inference,
we compare the performance of B-DISTIL to that of E-RNN
from (Dennis et al., 2018). Unlike B-DISTIL, which can
be applied to generic architectures, E-RNN is a method for
early prediction that was developed specifically for RNNs.
When training, we set the classification loss used with Equa-
tion (6) to the early-classification loss used in E-RNN train-
ing. We evaluate our method on the time-series datasets
GoogleSpeech and DSA. The performance in terms of time-
steps evaluated is compared in Table 1. B-DISTIL remains
competitive to E-RNN algorithm for early-prediction. Un-
like E-RNN, B-DISTIL also offers early prediction for offline
evaluation of time-series data - when all of the data arrives
at once. For such cases, a threshold can be tuned similar
to E-RNN and B-DISTIL can evaluate the models in its en-
semble in order of increasing inference cost, exiting as soon
as the confidence-score crosses this threshold.
Overhead of connections. Our method uses intermediate
connections to improve its performance. Although these
connections are designed to be efficient, they still have
an overhead cost over an averaging based ensemble. The
FLOPs required to evaluate intermediate connections cor-
responding to the distillation tasks in Figure 2 is shown in
Figure 3. Here, we compare the FLOPs required to evalu-
ate the model that was added in a round T to the FLOPs
Progressive Knowledge Distillation: Building Ensembles for Efficient Inference
(a) CIFAR-10
(b) CIFAR-100
(c) Google-13
(d) DSA-19
Figure 3. Overhead of connections. The floating point operations required to evaluate the model added in round T , compared to that
required to evaluate just the connections used by this model, for each of the real-world dataset. FLOPs are reported as a fraction of teacher
model's FLOPs. We see that the connections add relatively little overhead.
required evaluate the intermediate connections used by this
model. Note that summing up all the FLOPs up to a round
T , in Figure 3 gives the total FLOPs required to for the
ensemble constructed at the end of round T . For all our
models, this overhead is negligible when compared to the
inference cost of the corresponding model.
To evaluate the benefits offered by the intermediate connec-
tions, we can compare the results of B-DISTIL run with con-
nections and B-DISTIL without connections. The latter case
can be thought of as running the AdaBoost algorithm for
distillation. Note that this is the same as the RESCHED base-
line (simple averaging). Thus comparing the B-DISTIL plot
in Figure 2 to the plot of RESCHED highlights the benefit of
using intermediate connections. As in this work our focus
is on finding weak learners in the presence of capacity gap,
and we do not explore additional compression strategies
like quantization, hard thresholding, low-rank projection
that can further reduce inference cost.
Overheads of training/distillation. B-DISTIL requires
additional compute and memory compared to a single
model's training. Maintaining the two matrices K +
t and K −
t
requires an additional O(N L) memory. Even for relatively
large datasets with, say, N = 106 samples and L = 1000
classes, this comes out to a few gigabytes. Note that the
two matrices can be stored in main memory (or disk) and
loaded into GPU memory for loss computation using data
loaders provided by standard ML frameworks. Thus the
additional GPU memory requirement is quite small, O(bL)
for a mini-batch size b, same as the memory required to
maintain one-hot classification labels for a mini-batch.
As for training time, since the weak-learners we consider in
each round is of significantly smaller complexity than the
teacher model, the computation requirement per mini-batch
of training is significantly reduced, often leading to a reduc-
tion in training time. Of course for models where training
time is dominated by data-loading (communication) and
not compute, such as recurrent networks, the improvements
are not significant. Repeated failure of FIND-WL can also
impact training time, although we did not find this to be an
issue in our experiments.
6. Conclusion and Future Work
In this paper, we propose B-DISTIL, an algorithm for pro-
gressive distillation. B-DISTIL produces an ensemble of
learners that provide efficient inference, with progressively
better results as the ensemble size increases. This allows
for a straightforward way to trade off accuracy and compute
at inference time, and is critical for scenarios where infer-
ence may be interrupted abruptly, or when variable levels
of accuracy are expected/acceptable. We experimentally
demonstrate the effectiveness of B-DISTIL by decompos-
ing well-established deep models onto ensembles for data
from vision, speech, and sensor domains. Our procedure
leverages a stochastic solver combined with log barrier reg-
ularization for finding weak learners during distillation, and
we use intermediary connections to circumvent the issue of
model capacity gap.
A key insight in this work is that posing distillation as a two
player zero-sum game allows us to abstract away model ar-
chitecture details into base class construction F. This means
that, conditioned on us finding a 'weak learner' from the
base class, we retain the guarantees of the traditional boost-
ing setup. A caveat of this abstraction is that the user must
design F. In future work, we would like to extend these
ideas by a running boosting-like procedures on both mod-
els and hyperparameters taken together. Similar methods
have recently found success in applications such as hyperpa-
rameter tuning for federated learning (Khodak et al., 2021).
Finally, although our focus has been on-device continuous
inference, our distillation procedure can be beneficial even
in the cloud/data-center (batch) inference setting, for tasks
such as layer-fusion, load-balancing, and improved resource
utilization, which are applications worth exploring in more
detail in future work.
024Round (T)0.00.10.2ResNet56024Round (T)0.000.050.100.15DenseNet121024Round (T)0.000.050.100.150.20LSTM12802Round (T)0.000.050.100.15Frac. flopsGRU32ModelConn.Progressive Knowledge Distillation: Building Ensembles for Efficient Inference
References
Allen-Zhu, Z. and Li, Y. Towards understanding ensem-
ble, knowledge distillation and self-distillation in deep
learning. arXiv preprint arXiv:2012.09816, 2020.
Bolukbasi, T., Wang, J., Dekel, O., and Saligrama, V. Adap-
tive neural networks for efficient inference. In Interna-
tional Conference on Machine Learning, 2017.
Buciluˇa, C., Caruana, R., and Niculescu-Mizil, A. Model
compression. In International Conference on Knowledge
Discovery and Data-mining, 2006.
Chen, T. and Guestrin, C. Xgboost: A scalable tree boost-
ing system. In International Conference on Knowledge
Discovery and Data-mining, 2016.
Cho, J. H. and Hariharan, B. On the efficacy of knowledge
In Internationa Conference on Computer
distillation.
Vision, 2019.
Cho, K., Van Merriënboer, B., Bahdanau, D., and Bengio, Y.
On the properties of neural machine translation: Encoder-
decoder approaches. arXiv preprint arXiv:1409.1259,
2014.
Dennis, D., Pabbaraju, C., Simhadri, H. V., and Jain, P.
Multiple instance learning for efficient sequential data
classification on resource-constrained devices. Advances
in Neural Information Processing Systems, 2018.
Dua, D. and Graff, C. UCI machine learning repository,
2017. URL http://archive.ics.uci.edu/ml.
Freund, Y. Boosting a weak learning algorithm by majority.
In Workshop on Computational Learning Theory, 1990.
Freund, Y. and Schapire, R. E. A decision-theoretic general-
ization of on-line learning and an application to boosting.
Journal of Computer and System Sciences, 1997.
Gao, M., Wang, Y., and Wan, L. Residual error based
knowledge distillation. Neurocomputing, 2021.
Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B.,
Warde-Farley, D., Ozair, S., Courville, A., and Bengio,
Y. Generative adversarial nets. In Advances in Neural
Information Processing Systems, 2014.
Gou, J., Yu, B., Maybank, S. J., and Tao, D. Knowledge
distillation: A survey. International Journal of Computer
Vision, 2021.
He, K., Zhang, X., Ren, S., and Sun, J. Deep residual
learning for image recognition. In IEEE Conference on
Computer Vision and Pattern Recognition, 2016.
Hinton, G., Vinyals, O., Dean, J., et al. Distilling
arXiv preprint
the knowledge in a neural network.
arXiv:1503.02531, 2015.
Hochreiter, S. and Schmidhuber, J. Long short-term memory.
Neural Computation, 1997.
Huang, G., Chen, D., Li, T., Wu, F., Van Der Maaten, L.,
and Weinberger, K. Q. Multi-scale dense networks for
resource efficient image classification. arXiv preprint
arXiv:1703.09844, 2017a.
Huang, G., Liu, Z., Van Der Maaten, L., and Weinberger,
K. Q. Densely connected convolutional networks. In
IEEE conference on Computer Vision and Pattern Recog-
nition, 2017b.
Khodak, M., Tu, R., Li, T., Li, L., Balcan, M.-F., Smith,
V., and Talwalkar, A. Federated hyperparameter tuning:
Challenges, baselines, and connections to weight-sharing.
In Advances in Neural Information Processing Systems,
2021.
Krizhevsky, A., Nair, V., and Hinton, G. Cifar-10 (canadian
institute for advanced research). URL http://www.
cs.toronto.edu/~kriz/cifar.html.
Li, H., Zhang, H., Qi, X., Yang, R., and Huang, G. Im-
proved techniques for training adaptive deep networks.
In International Conference on Computer Vision, 2019.
Lugosi, G. and Cesa-Bianchi, N. Prediction, Learning, and
Games. Cambridge University Press, 2006.
Mason, L., Baxter, J., Bartlett, P., and Frean, M. Boost-
ing algorithms as gradient descent. Advances in Neural
Information Processing Systems, 1999.
Mirzadeh, S. I., Farajtabar, M., Li, A., Levine, N., Mat-
sukawa, A., and Ghasemzadeh, H. Improved knowledge
distillation via teacher assistant. In AAAI Conference on
Artificial Intelligence, 2020.
Rasley, J., Rajbhandari, S., Ruwase, O., and He, Y. Deep-
speed: System optimizations enable training deep learn-
ing models with over 100 billion parameters. In Inter-
national Conference on Knowledge Discovery & Data
Mining, 2020.
Ruiz, A. and Verbeek, J. Anytime inference with distilled
In Proceedings of the
hierarchical neural ensembles.
AAAI Conference on Artificial Intelligence, 2021.
Schapire, R. E. The strength of weak learnability. Machine
learning, 1990.
Schapire, R. E. and Freund, Y. Boosting: Foundations and
algorithms. Kybernetes, 2013.
Progressive Knowledge Distillation: Building Ensembles for Efficient Inference
Suggala, A., Liu, B., and Ravikumar, P. Generalized boost-
ing. Advances in Neural Information Processing systems,
2020.
Trevisan, L., Tulsiani, M., and Vadhan, S. Regularity, boost-
ing, and efficiently simulating every high-entropy distribu-
tion. In IEEE Conference on Computational Complexity,
2009.
von Neumann, J. and Morgenstern, O. Theory of games and
economic behavior, 1944.
Warden, P. Speech commands: A dataset for limited-
vocabulary speech recognition, 2018.
Yang, L. and Fan, D. Dynamic neural network to enable run-
time trade-off between accuracy and latency. In Asia and
South Pacific Design Automation Conference. Association
for Computing Machinery, 2021.
Progressive Knowledge Distillation: Building Ensembles for Efficient Inference
A. Two-Player Minimax Games
In this section, we will look at the setting of two minimax games more closely.
Consider a class of hypotheses F and class of probability distributions P. In addition, consider a loss function L : F × X →
R that is convex in its first argument. We consider two players whose pure strategy sets are F and P respectively. The loss
and reward of the players is given by F (f, μ) = Ex∼p[L(f, x)] and the minmax value of the game is
max
p∈P
min
f ∈F
F (f, μ) .
(9)
Note that this game is convex in the hypothesis player and concave in the distribution player. The objective of the game for
the hypothesis player is trying to find a hypothesis that has low loss on the worst case distribution from class P. Conversely,
the distribution player is trying to construct a distribution that is as hard as possible for the hypothesis player to learn.
Also, note that under reasonable conditions on F and P, we have the minimax theorem holds (see Chapter 6, Schapire &
Freund (2013)),
max
p∈P
min
f ∈F
Ex∼p[L(f, x)] = min
f ∈∆(F )
max
p∈P
Ex∼p[L(f, x)].
(10)
Here, ∆ (F) is the set distributions over functions F. From this, we can see that as long as we are allowed to aggregate
functions from the base class, we have can do as well as we could if we had access to the distribution
The interesting algorithmic question would be to find a distribution over hypothesis that achieves the minimum above. Note
that the loss function is stochastic and thus, we need to formalize the access the player has to the loss function. We will
formulate this in the following stochastic way.
Definition 2. An algorithm ORACLE is said to be a (β, δ) weak-gradient if
(cid:104)ORACLE(f, p), ∇f F (f, p)(cid:105) ≥ β
(11)
with probability 1 − δ.
Here ∇f denotes the functional gradient of F . This notion is similar to the weak learning assumptions usually used in the
boosting literature. Given such an oracle one can ask for methods similar to first order methods for convex optimization,
such as gradient descent, to solve the minimax problem. These algorithms iteratively maintain candidate solutions for the
both the players and update each of these using feedback from the state of the other player. In our particular setting, the
hypothesis player updates using the vector h in eq. (4).
Motivating Example Let F be a class of hypotheses, let P is the set of all distributions over a finite sample set
{x1, . . . , xn} and let L be the 0-1 loss. Note that in this setting, the oracle from definition 2 is analogous to weak learning. In
this setting, from the minmax theorem and the existence of a weak learner, we get that there is a single mixture of hypothesis
of (cid:80)
i αifi such that loss under every distribution in P which corresponds to zero training error. Thus we can think of
boosting algorithms as approximating this minmax equilibrium algorithmically. Similarly, the weak learning condition in
(Suggala et al., 2020) is similar in spirit to the condition above.
With the condition from Definition 2, one can consider many frameworks for solving minimax games. One general technique
is to consider two no-regret algorithms for online convex optimization to play against each other. Let us briefly look at the
definition of regret in this setting.
Definition 3 (No-Regret). Let K, A be convex sets. At each time, a player observes a point xt ∈ K and chooses an action
at ∈ A. The regret of the algorithm is defined as
RT = max
a∈A
T
(cid:88)
(cid:104)a, xt(cid:105) −
t=1
T
(cid:88)
t=1
(cid:104)at, xt(cid:105).
(12)
Online learning is a well-studied area of machine learning with a rich set of connections to various areas in mathematics
and computer science. In particular, there are frameworks in order to construct algorithms such as follow-the-perturbed
Progressive Knowledge Distillation: Building Ensembles for Efficient Inference
leader, follow-the-regularized leader and mirror descent. In particular, our algorithm can be seen as a version of mirror
descent with the entropy regularizer and theorem 1 as a version of the regret guarantee for the algorithm. In addition to
the ones mentioned above, There are several other frameworks considered to solve minimax games such as variational
inequalities, extragradient methods, optimistic methods and so on. We believe this framework is a useful one to consider for
many learning tasks, especially in settings where we have function approximation.
B. Proofs of Main Theorems
Here, we provide a proof of Theorem 1, which is restated below:
Theorem. Suppose the class F satisfies that for all f ∈ F, (cid:107)f − g(cid:107)∞ ≤ G∞. Let F = {ft} be the ensemble after T
rounds of Algorithm 1, with the final output Ft = 1
T
t=1 ft. Then for T ≥ ln 2N and
(cid:80)T
we have for all j
η =
1
G∞
(cid:114)
ln 2N
T
(cid:107)Ft,j − gj(cid:107)∞ ≤ G∞
(cid:114)
ln 2N
T
−
1
T
T
(cid:88)
t=1
γt(j)
where Ft,j and gj are the jth coordinates of the functions Ft and g respectively.
Proof. For simplicity, we assume that ft and g are scalar valued functions, since the proof goes through coordinate-wise. At
each time, define the edge of the weak learning algorithm to be
γt =
(cid:88)
i
K +
t (i)(ft(xi) − g(xi)) +
K −
t (i)(g(xi) − ft(xi))
(cid:88)
i
Let Zt denote the normalizing constant at time t, that is,
Zt =
(cid:88)
i
From the update rule, we have
K +
t (i) exp (−η (ft (xi) − g(xi))) + K −
t (i) exp (η (ft (xi) − g(xi)))
K +
T +1(i) =
=
=
K +
T (i)eη(fT (xi)−g(xi))
ZT
(cid:16)
K +
1 (i) exp
−η (cid:80)T
(cid:81)T
t=1 Zt
t=1 (ft (xi) − g(xi))j
(cid:17)
K +
1 (i) exp (−ηT (FT (xi) − g(xi))
t=1 Zt
(cid:81)T
and similarly
K −
T +1(i) =
K −
1 (i) exp (ηT (FT (xi) − g(xi))
t=1 Zt
(cid:81)T
Progressive Knowledge Distillation: Building Ensembles for Efficient Inference
First, we bound ln(Zt):
(cid:32)
(cid:88)
ln(Zt) = ln
K +
t (i) exp(−η(ft(xi) − g(xi))) +
K −
t (i) exp(η(ft(xi) − g(xi)))
(cid:33)
(cid:88)
i
(cid:32)
i
(cid:88)
i
≤ ln
K +
t (i) (cid:0)1 − η(ft(xi) − g(xi)) + η2(ft(xi) − g(xi))2(cid:1)
(cid:88)
+
i
K −
t (i) (cid:0)1 + η(ft(xi) − g(xi)) + η2(ft(xi) − g(xi))2(cid:1)
(cid:33)
(cid:33)
K −
t (i)(ft(xi) − g(xi)) + η2G2
∞
(cid:32)
≤ ln
1 − η
(cid:88)
K +
t (i)(ft(xi) − g(xi)) + η
i
≤ −ηγt + η2G2
∞
(cid:88)
i
where the second step follows from the identity exp(x) ≤ 1 + x + x2 for x ≤ 1, provided that η ≤ 1
G∞
bound on regression error after T rounds:
. This gives us a
−ηT (FT (xi) − g(xi)) = ln(K +
T +1(i)) − ln(K +
1 (i)) +
T
(cid:88)
t=1
ln(Zt)
≤ ln
= ln
(cid:32)
(cid:32)
(cid:33)
(cid:33)
K +
T +1(i)
K +
1 (i)
K +
T +1(i)
K +
1 (i)
+
T
(cid:88)
t=1
−ηγt + η2G2
∞
+ η2T G2
∞ − η
T
(cid:88)
t=1
γt
≤ ln 2N + η2T G2
∞ − η
T
(cid:88)
t=1
γt
Where the last bound follows since K +
1 = 1
2N and K +
T +1 ≤ 1. Similarly, we have the bound
ηT (FT (xi) − g(xi)) ≤ ln 2N + η2T G2
∞ − η
T
(cid:88)
t=1
γt
Combining the two equations we get that
|FT (xi) − g(xi)| = (cid:107)FT − g(cid:107)∞ ≤
sup
i
ln 2N
ηT
+ ηG2
∞ −
1
T
T
(cid:88)
t=1
γt
If we choose η = 1
G∞
(cid:113) ln 2N
T
to minimize this expression, then we get the following bound on regression error:
(cid:107)Ft − g(cid:107)∞ ≤ −
1
T
T
(cid:88)
t=1
γt + G∞
(cid:114)
ln 2N
T
which is exactly Equation (8). Note that the value of η only satisfies the condition η ≤ 1
G∞
time horizon after which the bound holds. This finishes the proof of Theorem 1
when T ≥ ln 2N , which is the
Now, we provide a proof of Theorem 2 which follows from the VC dimension bound and Theorem 1. Before we begin, we
setup some notation. Given a function f , distribution D over space X × Y where X is the input space and Y is the label
space, and data D consisting of N iid samples (x, y) ∼ D, we define
(cid:99)err(f ) = Pr
(x,y)∼D
[sign(FT (x) (cid:54)= y)]
err(f ) = Pr
(x,y)∼D
[sign(FT (x) (cid:54)= y)]
Progressive Knowledge Distillation: Building Ensembles for Efficient Inference
Theorem (Excess Risk). Suppose data D contains of N iid samples from distribution D. Suppose that the function g has
large margin on data D, that is
Further, suppose that the class CT has VC dimension d, then for
Pr
x∼D
[|g(x)| < (cid:15)] < μ
T ≥ 4G2
∞ ln 2N
(cid:15)2
,
with probability 1 − δ over the draws of data D, the generalization error of the ensemble FT obtained after T round of
Algorithm 1 is bounded by
err(FT ) ≤ (cid:99)err(g) + O
(cid:32)(cid:114)
d ln(N/d) + ln(1/δ)
N
(cid:33)
+ μ
Proof. Recall the following probability bound Schapire & Freund (2013, theorem 2.5) which follows Sauer's Lemma:
Pr [∃f ∈ CT : err(f ) ≥ (cid:99)err(f ) + (cid:15)] ≤ 8
(cid:17)d
(cid:16) me
d
e−m(cid:15)2/32
which holds whenever |D| = N ≥ d. It follows that with probability 1 − δ over the samples, we have for all f ∈ CT
Since we choose T = 4G2
∞ ln 2N
(cid:15)2
err(f ) ≤ (cid:99)err(f ) + O
(cid:32)(cid:114)
d ln(N/d) + ln(1/δ)
N
(cid:33)
, by Theorem 1, we have
∀x ∈ D : (cid:107)Ft − g(cid:107)1 ≤ G∞
(cid:114)
ln 2N
T
≤
(cid:15)
2
Since g has (cid:15) margin on data with probability 1 − μ, we have
(cid:99)err(Ft) ≤ (cid:99)err(g) + μ
Combining eqs. (13) and (14), we get
err(FT ) ≤ (cid:99)err(g) + O
(cid:32)(cid:114)
d ln(N/d) + ln(1/δ)
N
(cid:33)
+ μ
which completes the proof.
C. Dataset Information and Training Recipe
(13)
(14)
We use four publicly available real world datasets in our experiments. The train-test splits for all the dataset as well as the
sources are listed here:
Dataset
Train-samples Test-samples Num.-labels
Source
CIFAR-10
CIFAR-100
Google-13
DSA-19
50000
50000
52886
6800
10000
10000
6835
2280
10
100
13
19
(Krizhevsky et al.)
(Krizhevsky et al.)
(Warden, 2018)
(Dua & Graff, 2017)
We use two synthetic datasets in our experiments, ellipsoid and cube. To construct the ellipsoid dataset, we first sample a
32 × 32 matrix B, each entry sampled iid. We define A := BT B as our positive semi-definite matrix, and I[xT Ax ≥ 0]
determines the label of a data point x. We sample 10k points uniform randomly from [−1, 1]32 and determine their labels to
construct our data sample. We randomly construct a 80-20 train-test split for our experiments.
To construct cube, we first sample 16 vertices uniform randomly from [−1, 1]32 and split them into 4 equal sets, say
{S1, . . . , S4}. As before, we sample 10k points uniformly from [−1, 1]32 and determine the label y(x) of each point x
based on the closest vertex in {S1, . . . , S4}.
y(x) = arg min
i
(cid:107)x − x(cid:48)(cid:107).
min
x(cid:48)∈Si
Progressive Knowledge Distillation: Building Ensembles for Efficient Inference
D. Model Information, Experimental Details and Additional Results
D.1. Base Model Configuration
The base class configurations used for all our experiments in Figure 2 is provided in Tables 2, 3, 4 and 5. Note that we
use standard model architectures implemented in Pytorch and the parameters correspond to the corresponding function
arguments in these implementation.
Teacher model Residual Blocks Embedding dims
8
8,8
16,16
16,32,64
1
2,2
2,2
2,2,3
ResNet56
Strides
1
1,1
1,2
1,2,2
Table 2. Base model configuration used for ResNet56 distillation on CIFAR-10.
Teacher model
DenseNet121
Blocks
4, 8
4, 8, 8
8, 16, 12
growth-rate
12
6
6
Table 3. Configuration used for DenseNet121 distillation on CIFAR-100.
Teacher model
LSTM128
hid. dims.
4,4
16,8
20,12
20,32
Table 4. Configuration used for LSTM128
distillation on Google-13.
D.2. Training Recepies
Teacher model
GRU32
hid. dims.
4,4
8,16
16,16
32,16
Table 5. Configuration used for GRU32 distillation on DSA-19.
We use stochastic gradient descent (SGD) with momentum for all our experiements. For experiments on CIFAR100 and
CIFAR10, we use a learning rate of 0.1, a momentum paramter of 0.9, and weight decay of 5 × 10−4. We train for 200
epochs and reduce the learning rate by a factor of 0.2 in after 30%, 60% and 90% of the epoch execution. For experiments
with time series data, Google-13 and DSA-19, we use a fixed learning rate of 0.05 and a momentum of 0.9. We do not use
weight decay or learning rate scheduling for time-series data.
D.3. Additional Results
FLOPS measurement. To measure the total floating point operations required for inference, we use the Deep Speed
framework (Rasley et al., 2020). We randomly initialize a single sample with batch-size set to 1, and profile it to obtain our
values for FLOPs for all real-world data sets.
Connections, parallelization and execution schemes. Our focus in this work has been sequential execution of the
models. While reusing previously computed features is clearly beneficial for finding weak learners in this setup, the presence
of connections across models prevent them from being scheduled together for execution whenever otherwise possible. To
manage this trade off between parallelization and expressivity, we try to restrict the number of connections to at most one
between models, and further restrict the connection to later layers of the model. Connections in the later layers of networks
impose fewer sequential blocks in inference and allows for better parallelization.
Let φt,l(x) denote the activation produced at layer l by the weak learner at round t, on data-point x. Then some of the
connections we consider are
Progressive Knowledge Distillation: Building Ensembles for Efficient Inference
(a) Sequential schedule
(b) Hybrid schedule
Figure 4. A schematic description of a sequential execution scheme for an ensemble of four models, being evaluated one after the other
from left to right. The last model in the ensemble reuses the actions of the previous one, causing a blocking dependency. Thus we cannot
trivially execute all models in parallel. However, since the connection is between the last layers of the network, we can construct hybrid
execution schemes as in (b). Here, pairs of models are executed in together.
• φ(t,l)(x) − φ(t+1,l)(x), to learn the error in features at layer l.
• φ(t,l)(x) + id(x), standard residual connection at layer l.
• φ(t+1,l)[φ(1,l)(x), . . . , φt,l)(x)], dense connections at layer l across rounds.
• Simple accumulation operations.
• Recurrent networks: LSTM and GRU.
|
|
http://arxiv.org/abs/2302.10755v1 | 2023-02-20T16:26:29 | 2023-02-20T16:26:29 | Federated Gradient Matching Pursuit | Traditional machine learning techniques require centralizing all training
data on one server or data hub. Due to the development of communication
technologies and a huge amount of decentralized data on many clients,
collaborative machine learning has become the main interest while providing
privacy-preserving frameworks. In particular, federated learning (FL) provides
such a solution to learn a shared model while keeping training data at local
clients. On the other hand, in a wide range of machine learning and signal
processing applications, the desired solution naturally has a certain structure
that can be framed as sparsity with respect to a certain dictionary. This
problem can be formulated as an optimization problem with sparsity constraints
and solving it efficiently has been one of the primary research topics in the
traditional centralized setting. In this paper, we propose a novel algorithmic
framework, federated gradient matching pursuit (FedGradMP), to solve the
sparsity constrained minimization problem in the FL setting. We also generalize
our algorithms to accommodate various practical FL scenarios when only a subset
of clients participate per round, when the local model estimation at clients
could be inexact, or when the model parameters are sparse with respect to
general dictionaries. Our theoretical analysis shows the linear convergence of
the proposed algorithms. A variety of numerical experiments are conducted to
demonstrate the great potential of the proposed framework -- fast convergence
both in communication rounds and computation time for many important scenarios
without sophisticated parameter tuning. | [
"Halyun Jeong",
"Deanna Needell",
"Jing Qin"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.10755v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.10755v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.IT",
"cs.NA",
"math.IT",
"math.NA",
"65-xx, 68W15, 68W20"
] | 3
2
0
2
b
e
F
0
2
]
G
L
.
s
c
[
1
v
5
5
7
0
1
.
2
0
3
2
:
v
i
X
r
a
Federated Gradient Matching Pursuit
1
Halyun Jeong, Deanna Needell, Jing Qin
Abstract
Traditional machine learning techniques require centralizing all training data on one server or data hub. Due to the
development of communication technologies and a huge amount of decentralized data on many clients, collaborative
machine learning has become the main interest while providing privacy-preserving frameworks. In particular, federated
learning (FL) provides such a solution to learn a shared model while keeping training data at local clients. On the
other hand, in a wide range of machine learning and signal processing applications, the desired solution naturally has
a certain structure that can be framed as sparsity with respect to a certain dictionary. This problem can be formulated
as an optimization problem with sparsity constraints and solving it efficiently has been one of the primary research
topics in the traditional centralized setting. In this paper, we propose a novel algorithmic framework, federated gradient
matching pursuit (FedGradMP), to solve the sparsity constrained minimization problem in the FL setting. We also
generalize our algorithms to accommodate various practical FL scenarios when only a subset of clients participate
per round, when the local model estimation at clients could be inexact, or when the model parameters are sparse
with respect to general dictionaries.
Our theoretical analysis shows the linear convergence of the proposed algorithms. A variety of numerical ex-
periments are conducted to demonstrate the great potential of the proposed framework – fast convergence both in
communication rounds and computation time for many important scenarios without sophisticated parameter tuning.
federated learning, sparse recovery, gradient matching pursuit, random algorithm
Index Terms
I. INTRODUCTION
With the development of technology and science, machine learning for big data processing has become an
emerging field with a wide variety of applications. In general, there are several major considerations in dealing
with a large amount of data - data storage and privacy, computation, and communication [34]. To address the
limitation of efficiency and scalability of traditional machine learning algorithms for large-scale data, distributed
centralized learning allows data and/or model parallelism, where all local data are typically uploaded to a central
server but model training is distributed to various clients [54]. Different from the traditional centralized learning,
federated learning (FL) [39] is a collaborative learning framework in which many clients work together to solve
an optimization problem without sharing local data. In order to preserve privacy, and reduce the communication
cost between clients and the server, data sets are only stored at the clients locally and can not be transferred to
other clients or the server in FL. In other words, it aims to learn a central model using decentralized data sets. The
heterogeneous data distributions among the clients pose an additional challenge in federated learning.
As one of the most popular FL algorithms, Federated Averaging (FedAvg) [38] considers an unconstrained
optimization problem where the desired solution has no additional characteristics. FedAvg alternates gradient descent
and averaging of distributed solutions from local clients in an iterative way. However, in a lot of applications, the
solution of interest has some special structures, such as sparsity and low-rankness by itself or in some transformed
domain, which serve as prior information and can be utilized to address the ill-posedness of the problem and improve
performance. Thus, recent interest in FL optimization with additional solution structures has grown, which has been
shown to be especially effective when only a few data samples are available at each client but the underlying signal
dimension is relatively large [52], [61].
In such cases when the solution to an optimization problem from FL applications possesses a certain structure,
for example, sparsity and low-rankness, one can use a regularizer to enforce the desired structure [61]. Federated
Dual Averaging (FedDualAvg) by Yuan et al. [61], different from FedAvg, uses potentially nonsmooth and convex
regularizers to promote the structure of the solution.
H. Jeong and D. Needell are with the Department of Mathematics, the University of California Los Angeles, Los Angeles, CA 90095 (email:
[email protected]; [email protected])
J. Qin is with the Department of Mathematics, University of Kentucky, KY 40506 (email: [email protected])
When we have more prior information about the solution structure, e.g., the sparsity level, then hard-thresholding
based approaches could be often more efficient than the regularization based methods [19], [62]. The hard-
thresholding based methods aim to solve nonconvex formulations of the problem, which have been successfully
applied to many data processing problems lately with improved performance. [7], [16], [21], [42], [46].
Following this line of research, Tong et al. proposed Federated Hard Thresholding (FedHT) and Federated
Iterative Hard Thresholding (FedIterHT) [52], employing hard-thresholding at the aggregation step at the server
with potentially additional hard-thresholding after each stochastic gradient step at clients. With a proper choice of
step sizes for the stochastic gradients at the clients, these methods guarantee linear convergence up to a neighborhood
of the solution to the problem. Despite the fact that these approaches partially inherit the advantages of thresholding
based methods over those based on regularization, they necessitate fine-tuning of learning rates at clients, which
often have practical limitations and they are not applicable for sparse signals with respect to general dictionaries.
Their convergence analysis also requires the mini-batch sizes at the clients to grow exponentially in the number of
communication rounds, which further limits the usage in most applications.
Another popular thresholding based method is the gradient matching pursuit (GradMP) [44] which is a gen-
eralization of the compressive sampling matching pursuit (CoSaMP) [42]. These methods are known to be more
efficient than the others such as regularizer based methods, particularly when the sparsity level of a signal is much
smaller than its dimension [16], [50].
A. Contributions
We summarize our contributions below.
• We propose the Federated Gradient Matching Pursuit algorithm, abbreviated as FedGradMP, to overcome
the aforementioned drawbacks. More precisely, we show that the proposed FedGradMP enjoys the linear
convergence up to a small neighborhood of the solution, without the restrictions for FedHT/FedIterHT to
work. Furthermore, Our analysis has shown that FedGradMP converges linearly up to a statistical bias term
for the recovery of sparse signals under mild conditions.
• The majority of FL algorithm analyses have been carried out either under bounded gradient or bounded
dissimilarity assumptions, which could be problematic for certain scenarios [55]. Only a few recent works
for FL in unconstrained setup provide theoretical guarantees without this type of assumption, but under the
unbounded dissimilarity condition which is considered to be the most general type of heterogeneity assumption
[31], [58]. To the best of our knowledge, this is the first work for solving sparsity-constrained FL problems
that analyzes the convergence under this general dissimilarity condition.
• Thanks to the mechanism of GradMP, FedGradMP does not require intensive tuning of learning rates at the
clients for the sparse linear regression problem, which could be often still challenging because of data hetero-
geneity in the FL setting. Approaches based on the local stochastic gradient at clients including FedHT/FedIterHT,
as described in the literature [26], [52], [55] and demonstrated in our numerical studies, need tweaking the
learning rates (step sizes) else they diverge or converge slowly, especially when the data at distinct clients
are more heterogeneous. In contrast, FedGradMP which is based on solving low-dimensional sub-optimization
problems at clients can be often solved efficiently and does not require fine tuning of learning rates.
• Most of the signals of practical interest are not sparse by themselves in the standard basis but in a certain
dictionary. This observation has led to the development of several sparse recovery methods with general
dictionaries in the centralized setting [4], [14], [44]. FedGradMP is a versatile method under a general dictionary
framework. One potential problem with using dictionaries in FL methods is the privacy concern if they are
correlated with the client data sets. By utilizing dictionaries that are statistically independent with client data
sets such as the random Gaussian dictionary, we demonstrate the effectiveness of FedGradMP as an FL method
without such concerns.
B. Further related works
There have been numerous extensions and analyses of FedAvg [31], [33], [38], [55], [58], a standard algorithm to
train a machine learning model in FL. FedAvg can be considered as a variant of Local SGD, which essentially runs
stochastic gradient iterations at each client and averages these locally computed model parameters at a server. In
addition to the considerations of Local SGD [37], [38] for efficient communication in distributed learning, FedAvg
2
Dictionary sparsity and Linear convergence to the solution No client
convergence speed-up
up to optimal statistical bias
LR tuning Unbounded dissimilarity
FedAvg [38]
FedDualAvg [61]
FedHT/FedIterHT [52]
FedGradMP
(cid:55)
(cid:55)
(cid:55)
(cid:51)
(cid:55)
(cid:55)
(cid:51)*
(cid:51)
(cid:55)
(cid:55)
(cid:55)
(cid:71)**
(cid:55)
(cid:55)
(cid:55)
(cid:51)
* The convergence analysis of FedHT/FedIterHT, however, requires that the mini-batch sizes increase exponentially
in the number of communication rounds, which is generally not practical in many applications.
** FedGradMP does not require learning rate tuning for the sparse linear regression problem that could be still
challenging for baseline algorithms based on the stochastic gradient descent, essentially due to heterogeneity in
the FL environment as we illustrate Section V-C.
TABLE I
COMPARISON OF OUR WORK WITH RELATED REFERENCES.
aims to handle challenges in the FL settings such as heterogeneous client datasets and partial client participation
[31], [55]. Thanks to the recent endeavors of researchers [23], [31], [58], we now have a better understanding
of the convergence behavior of FedAvg, especially when the objective function is (strongly) convex. As for the
nonconvex case, several works provide the convergence of FedAvg to the stationary points and global convergence
under extra assumptions such as Polyak-Lojasiewicz (PL) condition [26], which is a generalization of the strong
convexity condition. However, it is worth noting that these assumptions do not imply our main assumptions, the
restricted strong convexity/smoothness.
An important research direction in FL algorithm analysis is characterizing the trade-off between convergence
speed and accuracy that stems from client data heterogeneity. As the clients run more local iterations, the estimates
of the local solution become more accurate at each client (improving the convergence rate) while they tend to
drift away from the global solution (making the actual residual error larger), especially in a highly heterogeneous
environment [10], [27], [30], [31], [56]. Our analysis and numerical experiments on the convergence behavior of
FedGradMP also reflect this phenomenon, which becomes more noticeable when the client datasets are highly
heterogeneous.
To reduce the communication cost between the server and clients further, techniques such as sparsifying and
reducing the dimensionality of the gradients have been proposed in [5], [24], [40], [47], [51]. In FedGradMP, the
hard-thresholding operation is applied whenever the computed models are sent from a server or clients, so the models
are already sparsified with the effective dimension same as the desired sparsity level. This makes FedGradMP more
attractive in terms of saving communication resources.
Another active area in FL research is client sampling or partial participation. Because of the limited connection
bandwidth or a large population of clients, it is often not possible for every client to participate at each round in
FL. Many methods incorporate this by modeling each client to participate randomly per round according to some
distribution [9], [55], [59]. There have been recent attempts to employ more elaborate sampling strategies such as
importance sampling [11], but this requires extra care since it could leak private information of client data. We
analyze FedGradMP under the more common assumption, i.e., the random client participation model, and show the
more client participate at each round, the faster the convergence rate is. This observation is consistent with recent
findings [59], [60] on the FL algorithms for the unconstrained problem.
C. Organization
The rest of the paper is organized as follows. In Section II, we introduce the sparse federated learning problem
and make important assumptions that will be used for convergence analysis. In Section III, we propose the federated
gradient matching pursuit algorithm and discuss the convergence guarantees in detail. Section IV generalizes Fed-
GradMP and its convergence analysis to several practical settings such as the partial client participation environment
and inexact estimation at the client side. In addition, we provide theoretical justifications of using a shared random
Gaussian dictionary at clients to improve the performance of FedGradMP. Section V provides a variety of numerical
experiments for sparse signal recovery which demonstrate the effectiveness of the proposed approach. Finally, we
draw conclusions in Section VI.
3
D. Notation
We say that a vector is s-sparse if it has at most s nonzero entries. We write (cid:107) * (cid:107)2 to denote the (cid:96)2 norm for
a vector. We use (cid:107) * (cid:107)F and (cid:107) * (cid:107) to denote the Frobenius norm and operator norm of a matrix, respectively. For a
given positive integer m, [m] denotes the set of integers {1, 2, . . . , m}. For positive semidefinite matrices A and B,
A (cid:22) B means that B − A is positive semidefinite.
II. SPARSE FEDERATED LEARNING
Federated learning is a framework to solve machine learning problems collaboratively by multiple clients possibly
with a coordination server. While this provides enhanced privacy, it also poses interesting challenges since clients
still require to exchange local parameters to other clients or a server in a communication-efficient way. Moreover,
in many heterogeneous learning environments, the local data of each client can be non-identically distributed and/or
statistically dependent.
To formally describe FL, we begin with introducing the setup. Assume that the number of the clients is N, and
the local objective function at the i-th client is denoted by fi(x) = Ez∼Di[(cid:96)i(x; z)] where Di is the data set at the i-th
client and (cid:96)i(x; z) is the loss function about x that depends on the data z.
The optimization problem of interest in FL typically takes the form
min
x∈Rn
f (x) :=
N
∑
i=1
pi fi(x)
where x ∈ Rn and pi ∈ [0, 1] is the weight for the i-th client satisfying ∑N
i=1 pi = 1. This formulation is general
enough to cover the majority of machine learning setup, the empirical risk minimization (ERM) by taking the
expectation uniformly over the data set Di and pi = |Di|/ ∑N
i=1 |Di| [32], [55].
On the other hand, because of communication efficiency or the nature of many applications, it is natural to assume
that the solution we are looking for is sparse with respect to a certain dictionary or an atom set. In order to discuss
this general notion of sparsity, we consider a finite set of atoms A = {a1, a2, . . . , ad} in which ai ∈ Rn as defined
in [44], [45]. For example, we recover the standard basis when A = {e1, * * * , en}, where eis are the standard basis
vectors for Rn. We say a vector x is τ-sparse with respect to A if x can be represented as
d
∑
i=1
where at most τ number of the coefficients αi's are nonzero. Then, the support of x with respect to A is defined
in a natural way, suppA (x) = {i ∈ [d] : αi (cid:54)= 0}. We define the (cid:96)0-norm of x with respect to A as
αiai
x =
(cid:40)
(cid:41)
(cid:107)x(cid:107)0,A = min
α
|T | : x = ∑
i∈T
αiai, T ⊆ [d]
,
where α = (α1, α2, . . . , αd)T .
With a sparsity constraint, sparse FL aims to solve the constrained problem
min
x∈Rn
f (x) =
N
∑
i=1
pi fi(x)
subject to (cid:107)x(cid:107)0,A ≤ τ,
(1)
where τ is a preassigned sparsity level. We denote the optimal solution to this problem by x∗. We also assume
further that each local objective function fi can be expressed by the average of the functions gi, j : Rn → R, i.e.,
fi(x) =
1
M
M
∑
j=1
gi, j(x),
(2)
for some integer M. One can interpret gi, j as a loss function associated with the i-th client restricted to the j-th
mini-batch, where the index set of all possible mini-batches is [M].
The objective function of (1) usually depends on the data distribution at clients. For example, the least squares
problem in FL typically sets
fi(x) =
1
2|Di|
(cid:107)ADix − yDi(cid:107)2
2,
4
where ADi is the client i data matrix whose rows consist of the training input data points for client i and yDi are
corresponding observations. Let b be the size of each mini-batch and M be the total number of mini-batches. Then,
M = (cid:0)|Di|
b
(cid:1) and gi, j is given by
gi, j(x) =
1
2b ∑
(ak,bk)∈S j
(yk − (cid:104)ak, x(cid:105))2,
where S j is a subset of Di associated j-th mini-batch of i-th client. We use E(i)
j φi, j(x) to denote the expectation of
a function φi, j(x) provided that the j-th mini-batch index set is chosen from the set of the all possible mini-batches
with size b, uniformly at random. Hence, the function fi can be expressed as fi(x) = E(i)
j gi, j(x).
Since the problem (1) is nonconvex in general, it is difficult to find its solution without additional assumptions
on the objective function. In this work, we adopt the assumptions from [44] shown as follows.
Assumption 1 (A -restricted Strong Convexity (A -RSC)). The local objective function fi at the i-th client satisfies
τ (i)-strongly convexity condition: for each i ∈ [N] and any x1, x2 ∈ Rn with (cid:107)x1 − x2(cid:107)0,A ≤ τ, we
the restricted ρ −
have
fi(x1) − fi(x2) − (cid:104)∇ fi(x2), x1 − x2(cid:105) ≥
(cid:107)x1 − x2(cid:107)2
2.
(3)
ρ −
τ (i)
2
Assumption 2 (A -restricted Strong Smoothness (A -RSS)). The loss function gi, j associated with the j-th mini-
τ (i, j)-strongly smoothness condition: for each i, j and any x1, x2 ∈ Rn
batch at the i-th client satisfies the restricted ρ +
with (cid:107)x1 − x2(cid:107)0,A ≤ τ, we have
(cid:107)∇gi, j(x1) − ∇gi, j(x2)(cid:107)2 ≤ ρ +
τ (i, j)(cid:107)x1 − x2(cid:107)2.
(4)
Remark 1. Assumptions 1 and 2 are widely used in the optimization community for solving the high-dimensional
statistical learning or sparse recovery problems. Note that the local loss function fi and gi, j may not be convex or
smooth in the entire space Rn since we only need strong convexity and smoothness assumptions for vectors that are
sparse with respect to a dictionary. Most convergence analysis for the FL algorithms assumes (strong) convexity of
fi or the Polyak-Lojasiewicz (PL) condition [26]; neither is weaker than Assumption 1.
Several FL algorithms inspired by classical sparse optimization techniques [13], [15], [44] have been proposed
under these assumptions. Such algorithms include FedHT and FedIterHT which are based on IHT [52]. These
algorithms use the hard-thresholding operator Hτ (x), which keeps the τ largest components of the input vector x
in magnitude with respect to the standard basis, whereas our algorithm adopts a more general hard-thresholding
operator - the approximate projection operator. To define an approximate projection, we denote by R(AΓ) the
subspace of Rn spanned by the atoms in A whose indices are restricted to Γ ∈ [d]. For w ∈ Rn, the orthogonal
projection of w to R(AΓ) is denoted by PΓw. Then, an approximate projection operator with η > 0, denoted by
approxτ (x), constructs an index set Γ such that
where Hτ (w) is the best τ-sparse approximation of w with respect to A , i.e.,
(cid:107)PΓw − w(cid:107)2 ≤ η(cid:107)w − Hτ (w)(cid:107)2,
Hτ (w) = argmin
x=A α,(cid:107)α(cid:107)0≤τ
(cid:107)w − x(cid:107)2.
Here, A is the matrix whose columns are the atoms by abusing the notation slightly.
The local dissimilarity in FL captures how the data distributions among clients are different, which is typically
in the following form, especially in the early works in FL [35], [55], [61]:
Ei∼P (cid:107)∇ fi(x) − ∇ f (x)(cid:107)2
2 ≤ β 2(cid:107)∇ f (x)(cid:107)2
2 + ζ 2, ∀ x ∈ Rn.
(5)
When β = 0, this condition reduces to the uniform bounded heterogeneity condition that has been used for analyzing
the convergence of many popular FL algorithms, such as FedAvg [35] and FedDualAvg [55], [61]. In this work,
the assumption of heterogeneity on the client data is much weaker than (5) by assuming heterogeneity only at the
solution x∗ as follows.
5
Assumption 3. There is a minimizer for (1), denoted by x∗ with a finite ζ 2
∗ defined as below:
∗ = Ei∼P (cid:107)∇ fi(x∗)(cid:107)2
ζ 2
2 =
N
∑
i=1
pi(cid:107)∇ fi(x∗)(cid:107)2
2.
Assumption 3 is the same as the one used for more recent analyses giving sharper convergence guarantees of
FL algorithms [31], [58]. This is also a necessary assumption for the FedAvg type of algorithms to converge [58].
But there are a few places where we state the implication of our results under stronger assumptions such as (5), in
order to compare the implications of our results to previous works.
Other common assumptions in the analysis of federated learning algorithms are the unbiased and bounded variance
conditions of local stochastic gradients.
Assumption 4. The local stochastic gradient ∇gi, j associated with the randomly selected j-th mini-batch at the
i-th client satisfies
E(i)
j [∇gi, j(x)] = ∇ fi(x)
for any τ-sparse vector x,
and
where E(i)
j
E(i)
j (cid:107)∇gi, j(x) − ∇ fi(x)(cid:107)2
2 ≤ σ 2
i
for any τ-sparse vector x,
is the expectation taken over the mini-batch index selected from [M] at the client i.
(6)
(7)
Remark 2. The bounded variance condition of local stochastic gradients associated with mini-batches (7) in
Assumption 4 is widely used in FL and stochastic algorithms in general [12], [55], but it may not hold for some
settings [31]. This assumption (7) is actually not essential for our main result to hold (See Appendix for the proof
of our convergence theorem without this assumption) but we present our work under the assumption for the sake
of simplicity.
The following lemma is a well-known consequence of the A -RSS property in Assumption 1.
Lemma 1 (Descent lemma). Suppose that the function h(x) satisfies the A -RSS property in Assumption 2 with a
constant ρ +
τ . Then for any x1, x2 ∈ Rn with (cid:107)x2(cid:107)0,A ≤ τ, it holds
(cid:104)∇h(x1), x2(cid:105) ≥ h(x1 + x2) − h(x1) −
ρ +
τ
2
(cid:107)x2(cid:107)2
2.
III. FEDERATED GRADIENT MATCHING PURSUIT
In this section, we propose Federated Gradient Matching Pursuit (FedGradMP) and discuss its convergence
guarantee. We start with describing FedGradMP in Algorithm 1.
In the FedGradMP framework, the StoGradMP algorithm [44] is implemented at the client side and the server
aggregates the resulting locally computed models after each round followed by a projection onto a subspace of
dimension at most τ. Each iteration of StoGradMP at a client consists of the following five steps:
1) Randomly select a mini-batch from the client batch.
2) Compute the stochastic gradient associated with the selected mini-batch.
3) Merge the subspace associated with the previously estimated local model with the closest subspace of
dimension at most 2τ to the stochastic gradient from Step 2.
4) Solve the minimization problem for the local objective function at the client over the merged subspace from
Step 3.
5) Identify the closest subspace of dimension at most τ to the solution at Step 4.
Note that in Step 4, the clients are not minimizing the local objective function fi over the sparsity constraint, but
over the subspace associated with the estimated sparsity pattern of the solution in Step 3. This subproblem can
be often solved efficiently since fi are strongly convex/smooth with respect to such subspaces by Assumptions
1 and 2, especially when the dimension of the subspace is small or fi are quadratic [6], [43]. Nevertheless, it
could be expensive to solve this subproblem in general, so we discuss how to obtain its approximate solution by
computationally cheap methods in the next section.
6
Algorithm 1 FedGradMP
Input: The number of rounds T , the number of clients N, the number of local iterations K, weight vector p, the
estimated sparsity level τ, η1, η2, η3.
Output: ˆx = xT .
Initialize: x0 = 0, Λ = /0.
for t = 0, 1, . . . , T − 1 do
for client i = 1, 2, . . . , N do
x(i)
t,1 = xt
for k = 1 to K do
t,k, η1)
Select a mini-batch index set jk := i(i)
Calculate the stochastic gradient r(i)
Γ = approx2τ (r(i)
(cid:98)Γ = Γ ∪ Λ
b(i)
t,k = argmin
x
Λ = approxτ (b(i)
t,k+1 = PΛ(b(i)
x(i)
t,k)
x ∈ R(A
t,k, η2)
fi(x),
(cid:98)Γ)
end for
t,k uniformly at random from {1, 2, . . . , M}
t,k = ∇gi, jk
(cid:17)
(cid:16)
x(i)
t,k
end for
(cid:16)
i=1 pix(i)
∑N
Λs = approxτ
t,K+1, η3
(cid:16)
(cid:17)
i=1 pix(i)
∑N
xt+1 = PΛs
t,K+1
(cid:17)
end for
A. Linear Convergence of FedGradMP
This subsection is devoted to proving the linear convergence of FedGradMP in the number of communication
rounds. The first step of the proof for our main theorem is similar to the one for Theorem 3.1 in [52] but also
utilizes several lemmas below from [44] and [45] after some modifications to accommodate the FL setting.
Lemma 2 ([44, Lemma 1]). The approximation error between the (k + 1)-th local iterate x(i)
by
t,k+1 and x∗ is bounded
2 ≤ (1 + η2)2(cid:107)b(i)
For notational convenience, we define the following two quantities:
t,k+1 − x∗(cid:107)2
(cid:107)x(i)
t,k − x∗(cid:107)2
2.
ρ +(i)
τ = max
j
ρ +
τ (i, j),
̄ρ +(i)
τ =
1
M
M
∑
j=1
ρ +
τ (i, j).
Lemma 3 ([45, Lemma 5.7]). Let (cid:98)Γ be the set obtained from the k-th iteration at client i. Then, we have
2 ≤ β1(i)E(i)
Jk
t,k − x∗)(cid:107)2
t,k − x∗(cid:107)2
2 + ξ1(i),
E(i)
Jk
(cid:107)b(i)
(b(i)
(cid:107)P⊥
(cid:98)Γ
where
β1(i) =
̄ρ +(i)
4τ
4τ (i) − ̄ρ +(i)
4τ
2ρ −
,
ξ1(i) =
2E(i)
̄ρ +(i)
4τ
Jk, j(cid:107)P
(2ρ −
(cid:98)Γ∇gi, j(x∗)(cid:107)2
4τ (i) − ̄ρ +(i)
)
4τ
2
.
Here Jk denotes the set of all previous mini-batch indices j1, . . . , jk randomly selected in or before the k-th step of
the local iterations at the i-th client and E(i)
Jk
is the expectation taken over Jk.
The following lemma is an extended version of Lemma 3 in [44], whose proof further utilizes Young's inequality
to control the trade-off between contraction and residual error due to the noise of the stochastic gradient for the FL
7
setting. It also provides a refinement for the exact projection operator. Since the proof of the lemma is substantially
different from the original version due to nontrivial changes to accommodate FL setting, we include its proof.
Lemma 4. Let (cid:98)Γ be the set obtained from the k-th iteration at client i. Then, for any θ > 0, we have
E(i)
jk
(cid:107)P⊥
(cid:98)Γ
(b(i)
t,k − x∗)(cid:107)2
2 ≤ β2(i)(cid:107)x(i)
t,k − x∗(cid:107)2
2 + ξ2(i)
where
β2(i) =
2
(cid:17)
(cid:16)
̄ρ +(i)
4τ + 1
θ 2
1 ρ −
η 2
4τ (i)
− η 2
1 ρ −
4τ (i)
+
(3E jk (ρ +
τ (i, jk))2 + 1)
,
(cid:113)
η 2
1 − 1
2
η1ρ −
4τ (i)
(cid:20)(cid:18)
ξ2(i) =
8
4τ (i))2 max
(ρ −
Ω⊂[d]
|Ω|=4τ
8
4τ (i))2 max
(ρ −
Ω⊂[d]
|Ω|=4τ
(cid:107)PΩ∇ fi(x∗)(cid:107)2
2 + 1
ρ −
4τ (i)
2θ 2 + 6
√
(cid:19)
η 2
1 −1
η1
√
i + 6
σ 2
η 2
1 −1
η1
(cid:21)
(cid:107)∇ fi (x∗) (cid:107)2
2
if η1 > 1,
(cid:107)PΩ∇ fi(x∗)(cid:107)2
2 + 2θ 2σ 2
i
ρ −
4τ (i)
if η1 = 1 (when the projection operator is exact).
Here E(i)
jk
k-th step of the local iterations at the i-th client.
is the expectation taken over the randomly selected mini-batch index jk for the stochastic gradient in the
Proof. We start with by noticing P⊥
(cid:98)Γ
∆ := x∗ − x(i)
b(i)
t,k = 0 and P⊥
(cid:98)Γ
t,k and the set suppA (∆) be denoted by R. Note that |R| ≤ 2τ. Hence, we have
t,k = 0 since both b(i)
x(i)
t,k and x(i)
t,k belong to the span of A
(cid:98)Γ. Let
t,k + x(i)
t,k)(cid:107)2 + (cid:107)P⊥
(cid:98)Γ
t,k − x∗)(cid:107)2
(x(i)
t,k − x∗)(cid:107)2
(b(i)
(cid:107)P⊥
(cid:98)Γ
(b(i)
t,k − x∗)(cid:107)2 = (cid:107)P⊥
(cid:98)Γ
(b(i)
≤ (cid:107)P⊥
(cid:98)Γ
(x(i)
= (cid:107)P⊥
(cid:98)Γ
Γ (x(i)
≤ (cid:107)P⊥
= (cid:107)∆ − PΓ∆(cid:107)2.
t,k − x(i)
t,k − x(i)
t,k − x∗)(cid:107)2
t,k − x∗)(cid:107)2
Here the second inequality follows from the definitions of the sets Γ and (cid:98)Γ, Γ ⊂ (cid:98)Γ.
Now we estimate (cid:107)∆ − PΓ∆(cid:107)2
2. With a slight abuse of notation, E(i)
jk
First, from the A -RSC property of fi, we have
will be denoted by E jk throughout the proof.
t,k(cid:107)2
2
(cid:107)x∗ − x(i)
(cid:69)
t,k), x∗ − x(i)
t,k
(cid:69)
ρ −
4τ (i)
2
≥
fi(x∗) − fi(x(i)
t,k) −
(cid:68)
t,k), x∗ − x(i)
∇ fi(x(i)
(cid:68)
∇gi, jk (x(i)
= E jk
(cid:68)
PR∇gi, jk (x(i)
= E jk
≥ −E jk (cid:107)PR∇gi, jk (x(i)
t,k
t,k), x∗ − x(i)
t,k)(cid:107)(cid:107)∆(cid:107)2
t,k
(cid:69)
(8)
By applying the inequality (15) in [44] and from the fact that Γ is the support set after the projection of the
stochastic gradient ∇gi, jk (x(i)
t,k) in Algorithm 1, we have
(cid:107)PR∇gi, jk (x(i)
t,k)(cid:107)2 ≤ (cid:107)PΓ∇gi, jk (x(i)
t,k)(cid:107)2 +
(cid:113)
η 2
1 − 1
η1
To make the notation simple, we define
z := −
PΓ∇gi, jk (x(i)
t,k)
(cid:107)PΓgi, jk (x(i)
t,k)(cid:107)2
(cid:107)∆(cid:107)2.
8
(cid:107)P⊥
Γ ∇gi, jk (x(i)
t,k)(cid:107)2.
Then, the term −E jk (cid:107)PR∇gi, jk (x(i)
− E jk (cid:107)PR∇gi, jk (x(i)
t,k)(cid:107)2(cid:107)∆(cid:107)2
t,k)(cid:107)2(cid:107)∆(cid:107)2 can be further bounded as follows.
≥ −E jk (cid:107)PΓ∇gi, jk (x(i)
t,k)(cid:107)2(cid:107)∆(cid:107)2 −
= E jk
(cid:68)
PΓ∇gi, jk (x(i)
(cid:69)
t,k), z
−
= E jk
(cid:68)
∇gi, jk (x(i)
(cid:69)
t,k), z
−
≥ E jk
(cid:68)
∇gi, jk (x(i)
(cid:69)
t,k), z
−
(cid:113)
(cid:113)
(cid:113)
η 2
1 − 1
η1
η 2
1 − 1
η1
η 2
1 − 1
2η1
(cid:113)
η 2
1 − 1
η1
E jk (cid:107)P⊥
Γ ∇gi, jk (x(i)
t,k)(cid:107)2(cid:107)∆(cid:107)2
E jk (cid:107)P⊥
Γ ∇gi, jk (x(i)
t,k)(cid:107)2(cid:107)∆(cid:107)2
E jk (cid:107)P⊥
Γ ∇gi, jk (x(i)
t,k)(cid:107)2(cid:107)∆(cid:107)2
E jk
(cid:16)
(cid:107)P⊥
Γ ∇gi, jk (x(i)
t,k)(cid:107)2
(cid:17)
2 + (cid:107)∆(cid:107)2
2
(cid:113)
η 2
1 − 1
2η1
= E jk
(cid:68)
∇ fi
(cid:17)
(cid:16)
x(i)
t,k
(cid:69)
, z
+ E jk
(cid:68)
∇gi, jk (x(i)
t,k) − ∇ fi
(cid:17)
(cid:16)
x(i)
t,k
(cid:69)
, z
−
E jk
(cid:16)
(cid:107)P⊥
Γ ∇gi, jk (x(i)
t,k)(cid:107)2
2 + (cid:107)∆(cid:107)2
2
(cid:17)
,
where the second inequality above follows from the AM-GM inequality, ab ≤ (a2 + b2)/2 for nonnegative real
numbers a, b.
Now, we apply the Young's inequality for the inner product space to the second term in the last line to obtain
(cid:12)
(cid:68)
∇gi, jk (x(i)
(cid:12)
(cid:12)
t,k) − ∇ fi
(cid:17)
(cid:16)
x(i)
t,k
(cid:69)(cid:12)
(cid:12)
(cid:12) ≤
, z
θ 2
2
(cid:107)∇gi, jk (x(i)
t,k) − ∇ fi
(cid:17)
(cid:16)
x(i)
t,k
(cid:107)2
2 +
1
2θ 2 (cid:107)z(cid:107)2
2
for any nonzero θ . Hence, we have
− E jk (cid:107)PR∇gi, jk (x(i)
t,k)(cid:107)2(cid:107)∆(cid:107)2
θ 2
(cid:69)
(cid:17)
2
(cid:16)
x(i)
t,k
≥ E jk
, z
−
(cid:68)
∇ fi
(cid:113)
E jk (cid:107)∇gi, jk (x(i)
t,k) − ∇ fi
(cid:17)
(cid:16)
x(i)
t,k
(cid:107)2
2 −
1
2θ 2
E jk (cid:107)z(cid:107)2
2
−
η 2
1 − 1
2η1
(cid:16)
E jk (cid:107)P⊥
Γ ∇gi, jk (x(i)
t,k)(cid:107)2
(cid:17)
2 + E jk (cid:107)∆(cid:107)2
2
(cid:113)
≥ E jk
(cid:68)
∇ fi
(cid:17)
(cid:16)
x(i)
t,k
(cid:69)
, z
−
θ 2
2
σ 2
i −
1
2θ 2
E jk (cid:107)z(cid:107)2
2 −
η 2
1 − 1
2η1
(cid:16)
E jk (cid:107)P⊥
Γ ∇gi, jk (x(i)
t,k)(cid:107)2
2 + E jk (cid:107)∆(cid:107)2
2
(cid:17)
,
where we have used (7) in Assumption 4 in the last inequality above.
Next, we obtain the upper bound for E jk (cid:107)P⊥
Γ ∇gi, jk (x(i)
t,k)(cid:107)2
2 as follows.
Γ ∇gi, jk (x(i)
E jk (cid:107)P⊥
≤ E jk (cid:107)∇gi, jk (x(i)
≤ 3E jk (cid:107)∇gi, jk (x(i)
≤ 3E jk (ρ +
= 3E jk (ρ +
t,k)(cid:107)2
2
t,k)(cid:107)2
2
t,k) − ∇gi, jk (x∗)(cid:107)2
t,k − x∗(cid:107)2
2 + 3σ 2
where we have used the inequality (cid:107)a + b + c(cid:107)2
2 and Assumption 4 in the third inequality above.
Combining this bound with inequality (8) yields
ρ −
4τ (i)
2
τ (i, jk))2(cid:107)x(i)
τ (i, jk))2(cid:107)∆(cid:107)2
fi(x∗) − fi
(cid:107)x∗ − x(i)
(cid:16)
x(i)
t,k
t,k(cid:107)2
2
−
(cid:17)
≥ E jk
(cid:68)
∇ fi
(cid:17)
(cid:16)
x(i)
t,k
(cid:69)
, z
−
θ 2
2
σ 2
i −
1
2θ 2
E jk (cid:107)z(cid:107)2
2 −
2 + 3E jk (cid:107)∇gi, jk (x∗) − ∇ fi (x∗) (cid:107)2
2 + 3E jk (cid:107)∇ fi (x∗) (cid:107)2
2
i + 3(cid:107)∇ fi (x∗) (cid:107)2
2
2 + 3σ 2
i + 3(cid:107)∇ fi (x∗) (cid:107)2
2,
2 + 3(cid:107)b(cid:107)2
2 ≤ 3(cid:107)a(cid:107)2
2 + 3(cid:107)c(cid:107)2
2 in the second inequality, and Assumption
(cid:16)
E jk (cid:107)P⊥
Γ ∇gi, jk (x(i)
t,k)(cid:107)2
2 + E jk (cid:107)∆(cid:107)2
2
(cid:17)
(9)
(cid:113)
η 2
1 − 1
2η1
9
≥ E jk
(cid:68)
∇ fi
(cid:17)
(cid:16)
x(i)
t,k
(cid:69)
, z
−
θ 2
2
σ 2
i −
1
2θ 2
E jk (cid:107)z(cid:107)2
2 −
(cid:113)
η 2
1 − 1
2η1
(cid:104)
(3E jk (ρ +
τ (i, jk))2 + 1)(cid:107)∆(cid:107)2
2 + 3σ 2
i + 3(cid:107)∇ fi (x∗) (cid:107)2
2
(cid:105)
.
On the other hand, using Lemma 1 for gi, j, a consequence of the A -RSS property, we have
(cid:68)
∇gi, j(x(i)
t,k), z
(cid:69)
≥ gi, j
(cid:17)
(cid:16)
x(i)
t,k + z
− gi, j
(cid:17)
(cid:16)
x(i)
t,k
−
ρ +
4τ (i, j)
2
(cid:107)z(cid:107)2
2
for all j ∈ [M]. By taking the average over all gi, j over j ∈ [M] on both sides of the inequality above and from the
definitions of fi and ρ +(i)
, we obtain
4τ
(cid:17)
(cid:16)
x(i)
t,k + z
Here we have used (6) in Assumption 4. We then take the expectation E jk on both sides of the inequality.
(cid:68)
∇ fi(x(i)
(cid:69)
t,k), z
(cid:16)
x(i)
t,k
(cid:107)z(cid:107)2
2.
≥ fi
− fi
−
(cid:17)
̄ρ +(i)
4τ
2
E jk
(cid:68)
∇ fi(x(i)
(cid:69)
t,k), z
≥ E jk fi
(cid:16)
x(i)
t,k + z
(cid:17)
− fi
(cid:17)
(cid:16)
x(i)
t,k
−
̄ρ +(i)
4τ
2
E jk (cid:107)z(cid:107)2
2.
After applying this bound to inequality (9), we obtain
fi(x∗) − fi
(cid:17)
(cid:16)
x(i)
t,k
−
ρ −
4τ (i)
2
(cid:107)∆(cid:107)2
2 ≥ E jk fi
(cid:17)
(cid:16)
x(i)
t,k + z
(cid:113)
− fi
(cid:17)
(cid:16)
x(i)
t,k
−
̄ρ +(i)
4τ
2
E jk (cid:107)z(cid:107)2
2
−
θ 2
2
σ 2
i −
1
2θ 2
E jk (cid:107)z(cid:107)2
2 −
η 2
1 − 1
2η1
(cid:2)(3E jk (ρ +
τ (i, jk))2 + 1)(cid:107)∆(cid:107)2
2 + 3σ 2
i + 3(cid:107)∇ fi (x∗) (cid:107)2
2
Thus, we have
(cid:32)
̄ρ +(i)
4τ
2
+
1
2θ 2
(cid:113)
3
(cid:33)
E jk (cid:107)z(cid:107)2
2 −
ρ −
4τ (i) −
1
2
(cid:113)
η 2
1 − 1
η1
(3E jk (ρ +
τ (i, jk))2 + 1)
(cid:107)∆(cid:107)2
2
+
θ 2
2
=
≥
=
≥ E jk fi
ρ −
4τ (i)
2
ρ −
4τ (i)
2
ρ −
4τ (i)
2
ρ −
4τ (i)
2
ρ −
4τ (i)
2
ρ −
4τ (i)
2
=
≥
≥
η 2
1 − 1
σ 2
i +
(cid:113)
3
η 2
1 − 1
2η1
(cid:107)∇ fi (x∗) (cid:107)2
2
+
2η1
(cid:17)
(cid:16)
x(i)
t,k + z
− fi (x∗)
E jk (cid:107)x(i)
t,k + z − x∗(cid:107)2
2 + E jk
(cid:68)
∇ fi(x∗), x(i)
t,k + z − x∗(cid:69)
E jk (cid:107)∆ − z(cid:107)2
2 + E jk (cid:104)∇ fi(x∗), z − ∆(cid:105)
E jk (cid:107)∆ − z(cid:107)2
2 + E jk (cid:104)∇ fi(x∗), PΓ∪R(z − ∆)(cid:105)
E jk (cid:107)∆ − y(cid:107)2
2 + E jk (cid:104)PΓ∪R∇ fi(x∗), (z − ∆)(cid:105)
E jk (cid:107)∆ − z(cid:107)2
2 − E jk (cid:107)PΓ∪R∇ fi(x∗)(cid:107)2(cid:107)z − ∆(cid:107)2
(cid:107)∆ − z(cid:107)2
2 − max
Ω⊂[d]
|Ω|=4τ
(cid:107)PΩ∇ fi(x∗)(cid:107)2E jk (cid:107)∆ − z(cid:107)2.
(cid:3) .
(10)
((cid:63))
(11)
Here, the inequality (10) follows from A -RSC. In ((cid:63)) of the above inequality chain, we have used the fact that
z = −
PΓ∇gi, jk
(cid:107)PΓgi, jk
(x(i)
t,k)
(x(i)
t,k)(cid:107)
(cid:107)∆(cid:107)2.
10
Let u = E jk (cid:107)∆ − z(cid:107)2, a = ρ −
4τ (i), b = max
Ω⊂[d]
|Ω|=4τ
(cid:107)PΩ∇ fi(x∗)(cid:107)2, and
(cid:18)
̄ρ +(i)
4τ +
c =
(cid:19)
1
θ 2
E jk (cid:107)z(cid:107)2
2 −
(cid:113)
ρ −
4τ (i) −
η 2
1 − 1
η1
(3E jk (ρ +
τ (i, jk))2 + 1)
(cid:107)∆(cid:107)2
2
θ 2 +
+
(cid:113)
3
η 2
1 − 1
η1
(cid:113)
3
σ 2
i +
η 2
1 − 1
η1
(cid:107)∇ fi (x∗) (cid:107)2
2.
Then the inequality (11) can be rewritten as au2 − 2bu − c ≤ 0 which gives
Moreover, we have
E jk (cid:107)∆ − z(cid:107)2 ≤
(cid:114) c
a
+
2b
a
.
(cid:107)∆ − PΓ∆(cid:107)2
2 ≤ (cid:107)∆ − z(cid:107)2
2.
Combining the previous two bounds yields
On the other hand, since
E jk (cid:107)∆ − PΓ∆(cid:107)2
2 ≤
(cid:19)2
(cid:18)(cid:114) c
a
+
2b
a
≤
2c
a
+
8b2
a2 .
(cid:107)z(cid:107)2
2 =
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
−
PΓ∇gi, jk (x(i)
t,k)
(cid:107)PΓgi, jk (x(i)
t,k)(cid:107)2
(cid:107)∆(cid:107)2
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
2
= (cid:107)∆(cid:107)2
2,
we have
Thus,
(cid:113)
η 2
1 − 1
η1
(3E jk (ρ +
τ (i, jk))2 + 1)
(cid:107)∆(cid:107)2
2
̄ρ +(i)
4τ +
c ≤
4τ (i) +
1
θ 2 − ρ −
(cid:113)
3
θ 2 +
+
η 2
1 − 1
η1
(cid:113)
3
σ 2
i +
η 2
1 − 1
η1
(cid:107)∇ fi (x∗) (cid:107)2
2.
E jk (cid:107)∆ − PΓ∆(cid:107)2
2
(cid:16)
̄ρ +(i)
4τ + 1
θ 2
1 ρ −
η 2
2
≤
(cid:17)
4τ (i)
− η 2
1 ρ −
4τ (i)
(cid:113)
η 2
1 − 1
2
η1ρ −
4τ (i)
+
(3E jk (ρ +
τ (i, jk))2 + 1)
(cid:107)∆(cid:107)2
2
+
8
(ρ −
4τ (i))2
max
Ω⊂[d]
|Ω|=4τ
(cid:107)PΩ∇ fi(x∗)(cid:107)2
2 +
2θ 2 +
6
(cid:113)
η 2
1 − 1
η1
σ 2
i +
6
(cid:113)
η 2
1 − 1
η1
1
ρ −
4τ (i)
(cid:107)∇ fi (x∗) (cid:107)2
2
.
Equipped with these lemmas, we are ready to prove our main result for the linear convergence of FedGradMP.
Theorem 5. Let x∗ be the solution to (1) and x0 be the initial feasible solution. Assume that the local objective
fi satisfies A -RSC with constant ρ −
4τ (i) in Assumption 1 and all of the functions gi, j associated with mini-batches
satisfy A -RSS with constant ρ +
4τ (i, j) in Assumption 2. We further assume that gi, j satisfies the bounded variance
condition of local stochastic gradients in Assumption 4 with variance bound σ 2
i . Let K be the number of local
iterations at each client.
11
Then, for any θ > 0, the expectation of the recovery error at the (t + 1)-th round of FedGradMP described in
Algorithm 1 obeys
E(cid:107)xt+1 − x∗(cid:107)2
2 ≤ κt+1(cid:107)x0 − x∗(cid:107)2
2 +
(2η 2
3 + 2)ν
1 − κ
N
∑
i=1
pi
1 − μ(i)K
1 − μ(i)
,
where
Here
β1(i) =
κ = (2η 2
3 + 2)
N
∑
i=1
(cid:2)(1 + η2)2β1(i)β2(i)(cid:3)K
pi
and
μ(i) = (1 + η2)2β1(i)β2(i).
̄ρ +(i)
4τ
4τ (i) − ̄ρ +(i)
4τ
2ρ −
,
β2(i) =
2
(cid:17)
(cid:16)
̄ρ +(i)
4τ + 1
θ 2
1 ρ −
η 2
4τ (i)
− η 2
1 ρ −
4τ (i)
(cid:113)
η 2
1 − 1
2
η1ρ −
4τ (i)
+
(3E jk (ρ +
τ (i, jk))2 + 1)
,
(1 + η2)2 maxi
(cid:18)
+(1 + η2)2
(cid:18)
(1 + η2)2 maxi
ν =
+(1 + η2)2 ∑N
̄ρ
+(i)
4τ
(cid:18)
8β1(i)
4τ (i))2 +
(ρ −
(cid:20)
N
β1(i)
pi
∑
ρ −
4τ (i)
i=1
8β1(i)
4τ (i))2 +
(ρ −
(cid:20)
2 β1(i)
ρ −
4τ (i)
i=1 pi
+(i)
4τ
̄ρ
4
+(i)
(2ρ −
4τ (i)− ̄ρ
)
√
4τ
η 2
1 −1
2θ 2 + 6
η1
+ β1(i)
ρ −
4τ (i)
(cid:19)
+
4
(2ρ −
4τ (i)− ̄ρ
+(i)
4τ
)
(cid:19) N
∑
i=1
√
6
η 2
1 −1
η1
(cid:19)
ζ 2
∗
(cid:21)
σ 2
i
4
(2ρ −
4τ (i)− ̄ρ
(cid:107)PΩ∇ fi(x∗)(cid:107)2
2
+(i)
4τ
)
̄ρ
+(i)
4τ
pi max
Ω⊂[d]
|Ω|=4τ
(cid:21)
θ 2 +
̄ρ
+(i)
4τ
4
(2ρ −
4τ (i)− ̄ρ
+(i)
4τ
)
σ 2
i
if η1 = 1.
if η1 > 1,
Remark 3. There are key factors that impact the rate of convergence of FedGradMP in the number of communication
rounds and the residual error in Theorem 5 as we discuss below.
1) Impact of parameters β1(i) and β2(i). For a fixed number of local iterations K, one can see that as the
product of the two parameters β1(i) and β2(i) becomes small, the convergence rate κ improves (decreases).
4τ (i) increases or the A -RSS constant ̄ρ +(i)
The product β1(i)β2(i) becomes small as the A -RSC constant ρ −
decreases. Choosing a proper dictionary could often improve the RSC/RSS constants as shown in Section
IV-D consequently leading to better convergence, which is also numerically demonstrated in Section V-B2.
2) Impact of the local iteration number K on the convergence rate. Increasing the local iteration number
K also makes the convergence rate κ decrease when all the terms (1 + η2)2β1(i)β2(i) are less than 1. To see
this, recall that the convergence rate is given by
4τ
κ = (2η 2
3 + 2)
N
∑
i=1
(cid:2)(1 + η2)2β1(i)β2(i)(cid:3)K
.
pi
(cid:2)(1 + η2)2β1(i)β2(i)(cid:3)K, improving the
In this case, increasing K leads to the decay of each term in ∑N
convergence rate. It is possible, however, some of the terms in the sum (1 + η2)2β1(i)β2(i) exceed 1, while
(cid:2)(1 + η2)2β1(i)β2(i)(cid:3)K is still less than 1 for small K, making the convergence rate less than
the sum ∑N
1. In this case, as we increase the local iteration number K, the largest term starts dominating the sum which
could increase the convergence rate (even make it greater than 1 for large K), degrading the performance of
FedGradMP.
i=1 pi
i=1 pi
3 +2)ν
1−κ ∑N
3) Impact of the local iteration number K on the residual error.
i=1 pi
The residual error (2η 2
1−μ(i)K
1−μ(i) depends on the local iteration number K in a more complicated way.
Even when all terms (1 + η2)2β1(i)β2(i) are less than 1, in which case increasing K makes the convergence
increases in
rate κ decrease (making the factor
K. Hence, the dependence of residual error on the local iteration number K may not be simple and this
is actually what we observe in the numerical experiment in Section V-D. This is consistent with commonly
accepted knowledge on the effect of the local iteration number on the residual error in the FL literature
[10], [31], [52], [55], [61]: taking more local steps at clients makes the local estimates closer to the local
solutions while the local estimates could deviate from the global solution in the FL environment in general.
1−κ in the residual error decrease), but the factor 1−μ(i)K
1−μ(i)
1
12
Remark 4 (Interpretation of Theorem 5). Theorem 5 states that the iterates of FedGradMP converge linearly up
to the residual error of the solution x∗ as long as κ < 1. The size of the residual error is proportional to ν. In
particular, from the expression for ν in Theorem 5, one can see that ν = 0 if the heterogeneity parameter ζ∗ = 0
and stochastic gradient noise σi = 0 for all i ∈ [N]. We take a look at the related scenarios in more detail below.
• ζ∗ = 0 or ∇ fi(x∗) = 0 for all the client objective function fi. For example, the function fi could be the square
loss for the noiseless observations of x∗ with sparsity level τ.
• σi = 0 for all 1 ≤ i ≤ N holds if and only if ∇gi, j(x) = ∇ fi(x) almost surely for all τ-sparse vectors. This
happens when the full batch of each client is used instead of mini-batches. In particular, when the projection
operator is exact (η1 = 1) and under a slightly strong heterogeneity assumption, the residual error is statistically
optimal. More precisely, under slightly strong heterogeneity assumptions only at the solution x∗ such as
(cid:107)PΩ∇ fi(x∗) − PΩ∇ f (x∗)(cid:107)2
2 ≤ β 2(cid:107)PΩ∇ f (x∗)(cid:107)2
2,
(12)
where β > 0 and Ω is any subset of [d] with size 4τ, one can see that we have
(cid:107)PΩ∇ f (x∗)(cid:107)2
(cid:107)PΩ∇ fi(x∗)(cid:107)2
2.
max
Ω⊂[d]
|Ω|=4τ
2 ≤ 2(1 + β 2) max
Ω⊂[d]
|Ω|=4τ
From Theorem 5, after a sufficient number of rounds, we have
(cid:32)(cid:18) N
∑
i=1
E(cid:107)xt+1 − x∗(cid:107)2 ≤ (cid:2)E(cid:107)xt+1 − x∗(cid:107)2
≤ O
(cid:3)1/2
2
(cid:107)PΩ∇ fi(x∗)(cid:107)2
2
(cid:19)1/2(cid:33)
,
pi max
Ω⊂[d]
|Ω|=4τ
which is bounded from above by O
max
Ω⊂[d]
|Ω|=4τ
(cid:107)PΩ∇ f (x∗)(cid:107)2
. This is the optimal statistical bias for commonly
(cid:32)
(cid:33)
used FL data including sub-Gaussian data sets of size |D| that are independently generated for each client,
for the sparse linear regression problem (when fi are the square loss
which is of order of O
functions). The uniform bounded heterogeneity condition, which is much stronger than (12) is used to show
the optimal statistical recovery of Fast FedDualAvg [3]. See [3], [44], [52] for more details.
(cid:16)(cid:113) τ log n
N|D|
(cid:17)
• The parameter θ provides a trade-off between the convergence rate and the residual error due to the stochastic
gradient. In particular, when the full batch is used (σi = 0), then one can set θ = ∞ giving the fastest
convergence.
• When σi (cid:54)= 0, the second term of the residual error ν is not vanishing in the number of rounds t. The similar
term for FedHT/FedIterHT [52] decreases in t, but this requires that the mini-batch size at each client goes
to infinity in t, which could severely restrict the number of communication rounds for the applicability of
their theory. The idea of increasing the mini-batch size in the number of iterations is not new and has been
used in [17], [62]. However, the settings for these works are not for FL and the rate of mini-batch size
growth is moderate, whereas the growth rates of FedHT/FedIterHT need to be generally much higher – they
grow exponentially in the number of local iterations at clients. This potential issue in FL methods based on
exponentially increasing mini-batch sizes is also pointed out in [23].
Remark 5 (Comparisons between our results and previous works). Under strong convexity/smoothness assumptions
for local objective functions fi, it has been proved that the methods based on FedAvg cannot converge linearly
to the solution x∗ in general [31], [58]. As for general convex and smoothness conditions, the convergence to a
neighborhood of x∗ is proven to be at most sublinear, whereas our work shows the linear convergence up to a small
neighborhood under restricted convexity/smoothness assumptions. We want to make clear that we are not claiming
that FedGradMP converges linearly to the x∗ but a small neighborhood of x∗ unless ζ∗ = 0 and σi = 0 for all i.
Proof of Theorem 5. Let F (t) be the filtration by all the randomness up to the t-th communication round, which is all
2|F (t)(cid:105)
the selected mini-batch indices at all the client up to the t-th round. We begin with analyzing E
,
the expected error of the global iterate xt+1 at the (t + 1)-th round and x∗ conditioned on F (t). Because we will
*|F (t)(cid:105)
(cid:104)
work with this conditional expectation until the very end of the proof, by abusing the notation slightly, E
will be denoted by E[*].
(cid:104)
(cid:107)xt+1 − x∗(cid:107)2
13
E(cid:107)xt+1 − x∗(cid:107)2
2 = E
pix(i)
t,K+1
pix(i)
t,K+1 +
pix(i)
t,K+1 − x∗
(cid:13)
(cid:13)
(cid:13)
PΛs
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
PΛs
(cid:13)
(cid:13)
(cid:32) N
∑
i=1
(cid:32) N
∑
i=1
(cid:32) N
∑
i=1
(cid:13)
(cid:13)
Hτ
(cid:13)
(cid:13)
(cid:13)
≤ 2E
≤ 2η 2
3
E
(cid:33)
−
N
∑
i=1
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
2
N
∑
i=1
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
2
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
N
∑
i=1
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
N
∑
i=1
+ 2E
pix(i)
t,K+1 − x∗
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
2
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
2
pix(i)
t,K+1
+ 2E
pix(i)
t,K+1 − x∗
pix(i)
t,K+1
(cid:33)
−
N
∑
i=1
pix(i)
t,K+1
(cid:33)
−
pix(i)
t,K+1
N
∑
i=1
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
2
≤ (2η 2
3 + 2)E
pix(i)
t,K+1 − x∗
= (2η 2
3 + 2)E
N
∑
i=1
pix(i)
t,K+1 −
N
∑
i=1
pix∗
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
2
N
∑
i=1
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
N
∑
i=1
≤ (2η 2
3 + 2)
piE(i)
JK
t,K+1 − x∗(cid:13)
(cid:13)
(cid:13)x(i)
(cid:13)
2
(cid:13)
(cid:13)
2
(13)
where the second inequality follows from the definition of the approximation projector operator, the third follows
from the fact that both x∗ and Hτ
is the best τ-sparse
t,K+1 with respect to the dictionary A , and the last one is obtained by applying the
approximation of ∑N
Jensen's inequality.
are τ-sparse but Hτ
(cid:16)
i=1 pix(i)
∑N
(cid:16)
i=1 pix(i)
∑N
i=1 pix(i)
t,K+1
t,K+1
(cid:17)
(cid:17)
After applying Lemma 2, 3, and 4 sequentially to (13), we obtain
N
∑
i=1
piE(i)
JK
t,K+1 − x∗(cid:13)
(cid:13)
(cid:13)x(i)
(cid:13)
2
(cid:13)
(cid:13)
2
(14)
≤ (1 + η2)2
≤ (1 + η2)2
= (1 + η2)2
≤ (1 + η2)2
= (1 + η2)2
N
∑
i=1
N
∑
i=1
N
∑
i=1
N
∑
i=1
N
∑
i=1
piE(i)
JK
(cid:13)
(cid:13)b(i)
(cid:13)
t,K − x∗(cid:13)
2
(cid:13)
(cid:13)
2
(cid:104)
β1(i)E(i)
JK
pi
(cid:107)P⊥
(cid:98)Γ
(b(i)
t,K − x∗)(cid:107)2
(cid:105)
2 + ξ1(i)
piβ1(i)E(i)
JK−1, jK
(cid:107)P⊥
(cid:98)Γ
(b(i)
t,K − x∗)(cid:107)2
2 + (1 + η2)2
N
∑
i=1
piξ1(i)
piβ1(i)
(cid:104)
β2(i)E(i)
JK−1
(cid:107)x(i)
t,K − x∗(cid:107)2
(cid:105)
2 + ξ2(i)
+ (1 + η2)2
N
∑
i=1
piξ1(i)
piβ1(i)β2(i)E(i)
JK−1
(cid:107)x(i)
t,K − x∗(cid:107)2
2 + (1 + η2)2
N
∑
i=1
pi (β1(i)ξ2(i) + ξ1(i)) .
(15)
First, the term ξ1(i) can be bounded as follows:
ξ1(i) =
2(E(i)
̄ρ +(i)
4τ
JK , j(cid:107)P
(2ρ −
(cid:98)Γ∇gi, j(x∗)(cid:107)2
2)
4τ (i) − ̄ρ +(i)
)
4τ
≤
̄ρ +(i)
4τ
4
4τ (i) − ̄ρ +(i)
4τ
(2ρ −
max
Ω⊂[d]
|Ω|=4τ
)
(cid:107)PΩ∇ fi(x∗)(cid:107)2
2 + σ 2
i
This is from the property of the projection operator and (7) in Assumption 4 implying
E(i)
j (cid:107)P
(cid:98)Γ∇gi, j(x) − P
(cid:98)Γ∇ fi(x)(cid:107)2
2 ≤ E(i)
j (cid:107)∇gi, j(x) − ∇ fi(x)(cid:107)2
2 ≤ σ 2
i ,
so we have
E(i)
j (cid:107)P
(cid:98)Γ∇gi, j(x∗)(cid:107)2
2 ≤ 2(E(i)
j (cid:107)P
(cid:98)Γ∇ fi(x∗)(cid:107)2
2 + σ 2
i ) ≤ 2
max
Ω⊂[d]
|Ω|=4τ
(cid:107)PΩ∇ fi(x∗)(cid:107)2
2 + σ 2
i
.
14
Hence, each term β1(i)ξ2(i) + ξ1(i) in (15) can be bounded as below.
β1(i)ξ2(i) + ξ1(i)
≤ β1(i)
8
(ρ −
4τ (i))2
max
Ω⊂[d]
|Ω|=4τ
(cid:107)PΩ∇ fi(x∗)(cid:107)2
2 +
2θ 2 +
(cid:113)
6
η 2
1 − 1
η1
(cid:113)
6
σ 2
i +
η 2
1 − 1
η1
1
ρ −
4τ (i)
(cid:107)∇ fi (x∗) (cid:107)2
2
+
̄ρ +(i)
4τ
4
4τ (i) − ̄ρ +(i)
4τ
(2ρ −
max
Ω⊂[d]
|Ω|=4τ
)
(cid:107)PΩ∇ fi(x∗)(cid:107)2
2 + σ 2
i
(cid:32)
≤
8β1(i)
(ρ −
4τ (i))2
+
̄ρ +(i)
4τ
4
4τ (i) − ̄ρ +(i)
(2ρ −
4τ
(cid:113)
(cid:33)
)
max
Ω⊂[d]
|Ω|=4τ
(cid:107)PΩ∇ fi(x∗)(cid:107)2
2 +
6
β1(i)
ρ −
4τ (i)
(cid:113)
η 2
1 − 1
η1
(cid:107)∇ fi (x∗) (cid:107)2
2
+
β1(i)
ρ −
4τ (i)
2θ 2 +
6
η 2
1 − 1
η1
4
4τ (i) − ̄ρ +(i)
4τ
(2ρ −
σ 2
i .
)
+
̄ρ +(i)
4τ
By plugging the above bound to (15), we have
N
∑
i=1
piE(i)
JK
t,K+1 − x∗(cid:13)
(cid:13)
(cid:13)x(i)
(cid:13)
2
(cid:13)
(cid:13)
2
piβ1(i)β2(i)E(i)
JK−1
(cid:107)x(i)
t,K − x∗(cid:107)2
2
(16)
≤ (1 + η2)2
+ (1 + η2)2
+ (1 + η2)2
N
∑
i=1
N
∑
i=1
N
∑
i=1
(cid:32)
pi
8β1(i)
(ρ −
4τ (i))2
+
pi
β1(i)
ρ −
4τ (i)
2θ 2 +
4
̄ρ
+(i)
4τ
(cid:113)
6
(2ρ −
4τ (i) − ̄ρ
η 2
1 − 1
η1
+
̄ρ
+(i)
4τ
Now consider first the case when η1 > 1. Then, since max
Ω⊂[d]
|Ω|=4τ
N
∑
i=1
piE(i)
JK
(cid:13)
t,K+1 − x∗(cid:13)
(cid:13)x(i)
(cid:13)
2
(cid:13)
(cid:13)
2
piβ1(i)β2(i)E(i)
JK−1
(cid:107)x(i)
t,K − x∗(cid:107)2
2
(cid:33)
+(i)
4τ
)
max
Ω⊂[d]
|Ω|=4τ
(cid:107)PΩ∇ fi(x∗)(cid:107)2
2 +
(cid:113)
6
η 2
1 − 1
η1
β1(i)
ρ −
4τ (i)
(cid:107)∇ fi (x∗) (cid:107)2
2
σ 2
i .
4
(2ρ −
4τ (i) − ̄ρ
)
+(i)
4τ
(cid:107)PΩ∇ fi(x∗)(cid:107)2
2 ≤ (cid:107)∇ fi (x∗) (cid:107)2
2, we have
≤ (1 + η2)2
N
∑
i=1
+ (1 + η2)2
+ (1 + η2)2
N
∑
i=1
N
∑
i=1
≤ (1 + η2)2
N
∑
i=1
pi
pi
+
8β1(i)
(ρ −
4τ (i))2
2θ 2 +
β1(i)
ρ −
4τ (i)
4
4τ (i) − ̄ρ +(i)
4τ
̄ρ +(i)
(2ρ −
4τ
(cid:113)
6
η 2
1 − 1
η1
+
̄ρ +(i)
4τ
β1(i)
ρ −
4τ (i)
+
)
(cid:113)
6
η 2
1 − 1
η1
(cid:107)∇ fi (x∗) (cid:107)2
2
4
4τ (i) − ̄ρ +(i)
4τ
(2ρ −
σ 2
i
)
piβ1(i)β2(i)E(i)
JK−1
(cid:107)x(i)
t,K − x∗(cid:107)2
2
+ (1 + η2)2 max
i
8β1(i)
(ρ −
4τ (i))2
+
̄ρ +(i)
4τ
4
4τ (i) − ̄ρ +(i)
4τ
(2ρ −
15
6
β1(i)
ρ −
4τ (i)
+
)
(cid:113)
η 2
1 − 1
η1
N
∑
i=1
pi(cid:107)∇ fi (x∗) (cid:107)2
2
+ (1 + η2)2
pi
N
∑
i=1
β1(i)
ρ −
4τ (i)
2θ 2 +
6
(cid:113)
η 2
1 − 1
η1
+
̄ρ +(i)
4τ
4
4τ (i) − ̄ρ +(i)
4τ
(2ρ −
σ 2
i .
)
Let μ(i) = (1 + η2)2β1(i)β2(i) and
ν = (1 + η2)2 max
i
+ (1 + η2)2
pi
N
∑
i=1
Hence, when η1 > 1, we have
β1(i)
ρ −
4τ (i)
+
)
(cid:113)
6
η 2
1 − 1
η1
ζ 2
∗
(2ρ −
4
4τ (i) − ̄ρ +(i)
4τ
+
8β1(i)
(ρ −
4τ (i))2
2θ 2 +
β1(i)
ρ −
4τ (i)
̄ρ +(i)
4τ
(cid:113)
6
η 2
1 − 1
η1
+
̄ρ +(i)
4τ
4
4τ (i) − ̄ρ +(i)
4τ
(2ρ −
N
∑
i=1
piE(i)
JK
t,K+1 − x∗(cid:13)
(cid:13)
(cid:13)x(i)
(cid:13)
2
(cid:13)
(cid:13)
2
≤
N
∑
i=1
piμ(i)E(i)
JK−1
(cid:107)x(i)
t,K − x∗(cid:107)2
2 + ν.
σ 2
i .
)
(17)
The case when the projection operator for the gradient is exact (η1 = 1) follows the same argument. Setting
η1 = 1 in the inequality (16) reduces the inequality to
N
∑
i=1
piE(i)
JK
t,K+1 − x∗(cid:13)
(cid:13)
(cid:13)x(i)
(cid:13)
2
(cid:13)
(cid:13)
2
≤ (1 + η2)2
+ (1 + η2)2
N
∑
i=1
N
∑
i=1
piβ1(i)β2(i)E(i)
JK−1
(cid:107)x(i)
t,K − x∗(cid:107)2
2
(cid:32)
pi
8β1(i)
(ρ −
4τ (i))2
+
̄ρ +(i)
4τ
4
4τ (i) − ̄ρ +(i)
4τ
(2ρ −
(cid:33)
)
max
Ω⊂[d]
|Ω|=4τ
(cid:107)PΩ∇ fi(x∗)(cid:107)2
2
+ (1 + η2)2
(cid:34)
2
pi
N
∑
i=1
β1(i)
ρ −
4τ (i)
θ 2 +
4
4τ (i) − ̄ρ +(i)
4τ
(2ρ −
(cid:35)
σ 2
i
)
̄ρ +(i)
4τ
(cid:107)x(i)
piβ1(i)β2(i)E(i)
JK−1
t,K − x∗(cid:107)2
2
≤ (1 + η2)2
N
∑
i=1
+ (1 + η2)2 max
i
(cid:32)
8β1(i)
(ρ −
4τ (i))2
+
̄ρ +(i)
4τ
4
4τ (i) − ̄ρ +(i)
4τ
(2ρ −
(cid:33) N
∑
i=1
)
pi max
Ω⊂[d]
|Ω|=4τ
(cid:107)PΩ∇ fi(x∗)(cid:107)2
2
+ (1 + η2)2
(cid:34)
2
pi
N
∑
i=1
β1(i)
ρ −
4τ (i)
θ 2 +
̄ρ +(i)
4τ
4
4τ (i) − ̄ρ +(i)
4τ
(2ρ −
(cid:35)
)
σ 2
i .
The bound for ν for the exact projection case (η1 = 1) is given as below.
(cid:33) N
∑
i=1
ν = (1 + η2)2 max
8β1(i)
(ρ −
4τ (i))2
4
4τ (i) − ̄ρ +(i)
̄ρ +(i)
4τ
(2ρ −
(cid:32)
+
4τ
)
i
pi max
Ω⊂[d]
|Ω|=4τ
(cid:107)PΩ∇ fi(x∗)(cid:107)2
2
+ (1 + η2)2
(cid:34)
2
pi
N
∑
i=1
β1(i)
ρ −
4τ (i)
θ 2 +
4
4τ (i) − ̄ρ +(i)
4τ
(cid:35)
σ 2
i .
̄ρ +(i)
4τ
Then, applying the bound (17) to (13) repeatedly using the induction argument on K, we have
(cid:33)
(2ρ −
)
E(cid:107)xt+1 − x∗(cid:107)2
2 ≤ (2η 2
3 + 2)
(cid:104)
E(i)μ(i)K(cid:107)x(i)
t,1 − x∗(cid:107)2
2
(cid:105)
+
pi
(cid:32) N
∑
i=1
(cid:32) N
∑
i=1
= (2η 2
3 + 2)E
N
∑
i=1
pi
ν(1 − μ(i)K)
1 − μ(i)
(cid:33)
ν(1 − μ(i)K)
1 − μ(i)
(cid:2)μ(i)K(cid:107)xt − x∗(cid:107)2
2
(cid:3) +
pi
N
∑
i=1
pi
16
= κ(cid:107)xt − x∗(cid:107)2
2 + (2η 2
3 + 2)ν
N
∑
i=1
pi
(1 − μ(i)K)
1 − μ(i)
,
where the first equality follows from x(i)
t,1 = xt and the second follows from
κ = (2η 2
3 + 2)
N
∑
i=1
piμ(i)K = (2η 2
3 + 2)
N
∑
i=1
(cid:2)(1 + η2)2β1(i)β2(i)(cid:3)K
.
pi
Now, taking the unconditional expectation on both sides of the above yields
(cid:104)
E
(cid:104)
(cid:107)xt+1 − x∗(cid:107)2
E (cid:2)(cid:107)xt+1 − x∗(cid:107)2
(cid:3) = E
2
≤ κE
(cid:104)
E
(cid:104)
(cid:107)xt − x∗(cid:107)2
2|F (t)(cid:105)(cid:105)
2|F (t−1)(cid:105)(cid:105)
+ (2η 2
3 + 2)ν
N
∑
i=1
pi
(1 − μ(i)K)
1 − μ(i)
.
By applying this result repeatedly, we obtain
E(cid:107)xt+1 − x∗(cid:107)2
2 ≤ κt+1(cid:107)x0 − x∗(cid:107)2
2 +
(2η 2
3 + 2)ν
1 − κ
N
∑
i=1
pi
1 − μ(i)K
1 − μ(i)
.
Corollary 6. Under the same conditions and notation in Theorem 5, we have
E f (xt+1) ≤ f (x∗) +
1
2ρ
(cid:107)∇ f (x∗)(cid:107)2
2 + ρ
(cid:34)
κt+1(cid:107)x0 − x∗(cid:107)2
2 +
(2η 2
3 + 2)ν
1 − κ
N
∑
i=1
pi
1 − μ(i)K
1 − μ(i)
(cid:35)
,
where ρ = ∑N
i=1 pi ̄ρ +(i)
τ
.
See Appendix for the proof of Lemma 6.
A. Inexact FedGradMP
IV. DISCUSSION AND EXTENSIONS
x
In FedGradMP, each client solves the minimization problem argmin
(cid:98)Γ) to update the
support estimate of the solution x∗. When a closed-form solution exists to the minimization problem such as the
least squares problem and the sparsity level τ is relatively small compared with the signal dimension, an exact
minimizer can be obtained efficiently. This can be achieved, for example, by computing the pseudo-inverse with
respect to a τ-dimensional subspace R(A
(cid:98)Γ) or by algorithms based on Cholesky, QR factorizations, or SVD for
the least squares problem [18], [53].
fi(x) over a subspace R(A
But for the other cases, although the sub-optimization problem is typically convex due to the A -RSC assumption,
one may still want to reduce the computational cost in the optimization. By solving it only approximately but with
a desired accuracy, we can save computational resources further. Because the local loss function fi for the i-th
client satisfies the A -RSC and A -RSS properties with the respective constants ρ −
fi is strongly
convex/smooth with the same constants on the domain of the minimization problem, the linear subspace R(A
(cid:98)Γ).
fi(x)
Recall that |Di| is the number of data points at the i-th client. We define a δ -approximate solution to argmin
with x ∈ R(A
2 ≤ δ 2 where bopt is its exact solution. The number of steps
required to achieve a δ -approximate solution at client i using popular standard algorithms is shown as follows:
τ (i) and ̄ρ +(i)
,
x
τ
(cid:98)Γ) as a vector b such that (cid:107)b − bopt(cid:107)2
(cid:18)
(cid:19)
(cid:1)
(cid:18)
(cid:19)
• Gradient descent (GD): O
|Di|
+(i)
̄ρ
τ
ρ −
τ (i)
log (cid:0) 1
δ
[43].
• Stochastic gradient descent with variance reduction such as SAG or SVRG: O
[48].
(cid:18)
+(i)
|Di| + ̄ρ
τ
ρ −
τ (i)
(cid:19)
(cid:1)
log (cid:0) 1
δ
[29],
Since the domain is a τ-dimensional space, the computational complexity per data point of the above algorithms
is O(τ) for the squared or logistic loss, so the overall complexity of the local step to compute a δ -approximate
17
Algorithm 2 Inexact FedGradMP with partial participation
Input: The number of rounds T , the number of clients N, the cohort size L, the number of local iterations K,
weight vector p, the estimated sparsity level τ, η1, η2, η3, δ .
Output: ˆx = xT .
Initialize: x0 = 0, Λ = /0.
for t = 0, 1, . . . , T − 1 do
Randomly select a subset St of clients with size L
for each client i in St , do
x(i)
t,1 = xt
for k = 1 to K do
t,k, η1)
Select a mini-batch index set jk := i(i)
Calculate the stochastic gradient r(i)
Γ = approx2τ (r(i)
(cid:98)Γ = Γ ∪ Λ
Solve b(i)
x
Λ = approxτ (b(i)
t,k, η2)
t,k+1 = PΛ(b(i)
x(i)
t,k)
(cid:16)
(cid:16)
x(i)
x(i)
t,k+1 ← ΠR
t,k+1
t,k = argmin
x ∈ R(A
fi(x),
(cid:17) (cid:17)
t,k uniformly at random from {1, 2, . . . , M}
t,k = ∇gi, jk
(cid:17)
(cid:16)
x(i)
t,k
(cid:98)Γ) up to accuracy δ
[Optional projection onto a ball]
end for
end for
(cid:16)
i=1 pix(i)
∑N
Λs = approxτ
t,K+1, η3
(cid:16)
(cid:17)
i=1 pix(i)
∑N
(cid:17)
xt+1 = PΛs
(cid:16)
t,K+1
(cid:17)
xt+1 ← ΠR (xt+1)
[Optional projection onto a ball]
end for
(cid:18)
(cid:18)
+(i)
̄ρ
τ
ρ −
τ (i)
log (cid:0) 1
δ
(cid:19)(cid:19)
(cid:1)
|Di|τ
solution is O
for GD. For Newton's method, the total computational cost to achieve a δ -
approximate solution is roughly O (cid:0)(|Di|τ 2 + τ 3) log (cid:0) 1
(cid:1)(cid:1) [43]. Hence, if the sparsity level τ is much smaller than
the signal dimension n, the subproblem in FedGradMP can be solved efficiently up to accuracy δ . As a comparison,
fi(x) over the whole space Rn, which would
most FL methods run (stochastic) gradient descent to solve argmin
δ
x
cost computationally more to acquire its δ -approximate solution.
Theorem 7. Under the same notation and assumptions as in Theorem 5, for any θ > 0, the expectation of the
recovery error at the (t + 1)-th round of inexact FedGradMP described in Algorithm 2 obeys
E(cid:107)xt+1 − x∗(cid:107)2
2 ≤ κt+1(cid:107)x0 − x∗(cid:107)2
2 +
(2η 2
3 + 2)(ν + δ 2)
1 − κ
N
∑
i=1
pi
1 − μ(i)K
1 − μ(i)
,
where
κ = (2η 2
3 + 2)
N
∑
i=1
(cid:2)2(1 + η2)2β1(i)β2(i)(cid:3)K
pi
and
μ(i) = 2(1 + η2)2β1(i)β2(i).
Here, the parameters β1(i), β2(i), and ν are the same as in Theorem 5.
See Appendix for the proof of Theorem 7.
B. Client sampling and the impact of cohort size
In practical FL scenarios, it may not be possible for all of the clients to participate in each communication round.
This could particularly stand out when there are a large population of clients or the communication bandwidth
18
of connections between the server and clients is limited. A common theoretical assumption to capture this partial
client participation is that participating clients for each communication round are drawn randomly according to
some probability distribution, independent with other rounds. It could be considered as client sampling as noted
in [55]. One could also consider more sophisticated sampling strategies such as importance sampling, but it seems
to be not easy to implement such sampling techniques for FL since it could leak the private information of the
client data sets [11]. Furthermore, in many real-world scenarios, client availability (which is usually random) solely
controls participation rather than the server, ruling out the potential of using such methods [8].
For simplicity, we assume that the weight pi is 1/N in the global objective function f and a fixed number of
clients (the cohort size) participate per round as in [20] to study the impact of the cohort size.
Theorem 8. Assume the uniform weights pi = 1/N and L participating clients are drawn uniformly at random
over the client set without replacement per round. Then, under the same assumptions and notation in Theorem 5,
for any θ > 0, the expectation of the recovery error is bounded from above by
where
and
E(cid:107)xt+1 − x∗(cid:107)2
2 ≤ κt+1(cid:107)x0 − x∗(cid:107)2
2 +
(2η 2
3 + 2) ̃ν(1 − μ K)
(1 − μ)(1 − κ)
,
κ = (2η 2
3 + 2) max
S⊂[N]
|S|=L
1
L ∑
i∈S
(cid:2)(1 + η2)2β1(i)β2(i)(cid:3)K
,
μ = max
i∈[N]
(cid:2)(1 + η2)2β1(i)β2(i)(cid:3)K
,
(1 + η2)2 maxi
+(1 + η2)2 1
L
8β1(i)
4τ (i))2 +
(ρ −
(cid:20)
N
β1(i)
∑
ρ −
4τ (i)
i=1
̄ρ
+(i)
4τ
(cid:18)
4
(2ρ −
4τ (i)− ̄ρ
√
2θ 2 + 6
+(i)
)
4τ
η 2
1 −1
η1
(cid:18)
(cid:18)
̃ν =
(1 + η2)2 max
i
√
6
η 2
1 −1
η1
(cid:19)
ζ 2
∗
4
(2ρ −
4τ (i)− ̄ρ
+(i)
4τ
)
̄ρ
+(i)
4τ
+ β1(i)
ρ −
4τ (i)
(cid:19)
+
1
N
(cid:19)
)
N
∑
i=1
4
(2ρ −
4τ (i)− ̄ρ
+(i)
4τ
̄ρ
+(i)
4τ
8β1(i)
4τ (i))2 +
(ρ −
(cid:20)
β1(i) 2θ 2
ρ −
4τ (i)
N
∑
i=1
+
4
(2ρ −
4τ (i)− ̄ρ
+(i)
4τ
)
̄ρ
+(i)
4τ
max
Ω⊂[d]
|Ω|=4τ
(cid:21)
σ 2
i
(cid:107)PΩ∇ fi(x∗)(cid:107)2
2
if η1 = 1.
+(1 + η2)2 1
L
(cid:21)
σ 2
i ,
if η1 > 1,
.
See Appendix for the proof of Theorem 8.
Remark 6. Note that the convergence rate κ of FedGradMP improves (decreases) as the cohort size L increases
in Theorem 8, aligning with some of the previous works about the impact of cohort size on the convergence speed
[59]. Our numerical experiments in Section V-E also validate our theory about the impact of cohort size on the
convergence rates. On the other hand, it appears that the residual error in Theorem 8 is pessimistic and the actual
behavior of FL algorithms depends on the cohort size in a more complicated way. See Section V-E for the numerical
experiment and discussion.
C. FedGradMP with a constraint
Many machine learning problems can be formulated as an (cid:96)2-norm constrained optimization problem [36], [50],
[61]. Since we focus on the FL setting with a sparse structure, our goal is to solve the following problem:
min
x∈Rn
f (x) =
N
∑
i=1
pi fi(x)
subject to (cid:107)x(cid:107)0,A ≤ τ,
(cid:107)x(cid:107)2 ≤ R,
(18)
for some R > 0, which is our main optimization problem (1) with the additional (cid:96)2 constraint (cid:107)x(cid:107)2 ≤ R. The (cid:96)2
constraint ensures the global minimum exists in the domain. Another advantage of using the (cid:96)2-norm constraint is
that its orthogonal projection computationally is cheaper than projections of other constraints such as the (cid:96)1-norm
[50]. We denote by ΠR the orthogonal projection of a vector to the set {(cid:107)x(cid:107)2 ≤ R}, which is implemented as
follows. For any vector u ∈ RN,
ΠR(u) =
(cid:40)
u,
Ru/(cid:107)u(cid:107)2, otherwise.
if (cid:107)u(cid:107)2 ≤ R;
19
Let x∗ be a minimizer of the problem (18) and the heterogeneity at the solution x∗ is defined as in Assumption
3. By executing additional steps, the projection to a (cid:96)2-norm ball in Algorithm 2, FedGradMP converges to the
solution x∗ under the same conditions in Theorem 5, 7, and 8. The proof follows a simple modification of the
proofs of the theorems due to the fact that the orthogonal projection of a vector u to a ball with radius R does not
increase the (cid:96)2-norm distance between u and v for a vector v in the ball. For instance, we replace (14) in the proof
of Theorem 5 as follows.
N
∑
i=1
piE(i)
JK
2
(cid:13)
(cid:13)
2
t,K+1 − x∗(cid:13)
(cid:13)
(cid:13)x(i)
(cid:13)
(cid:13)
(cid:13)
(cid:13)ΠR
(cid:16)
PΛs
piE(i)
JK
piE(i)
JK
(cid:13)
(cid:13)
(cid:13)PΛs
(cid:17)
(cid:16)
b(i)
t,K
=
≤
N
∑
i=1
N
∑
i=1
≤ (1 + η2)2
N
∑
i=1
piE(i)
JK
(cid:16)
b(i)
t,K
(cid:17)(cid:17)
− x∗(cid:13)
2
(cid:13)
(cid:13)
2
− x∗(cid:13)
2
(cid:13)
(cid:13)
2
t,K − x∗(cid:13)
2
(cid:13)
(cid:13)
2
(cid:13)
(cid:13)b(i)
(cid:13)
,
where we have used the fact that x∗ belongs the (cid:96)2-norm ball with radius R and the aforementioned property of ΠR
in the first inequality above.
Similarly, note that all the local iterates satisfy (cid:107)x(i)
t,K+1(cid:107)2 ≤ R because of the projection to the ball in Algorithm
2. Thus, their convex combination ∑N
i=1 pix(i)
Now we apply the same argument to the first step of the proof of Theorem 5
t,K+1 also belongs to the ball.
E(cid:107)xt+1 − x∗(cid:107)2
2 = E
(cid:32)
PΛs
(cid:32)
PΛs
(cid:32) N
∑
i=1
(cid:32) N
∑
i=1
ΠR
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
PΛs
(cid:13)
(cid:13)
ΠR
≤ 2E
≤ 2E
pix(i)
t,K+1
(cid:33)(cid:33)
−
N
∑
i=1
pix(i)
t,K+1 +
pix(i)
t,K+1 − x∗
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
2
(cid:33)(cid:33)
pix(i)
t,K+1
−
N
∑
i=1
pix(i)
t,K+1
+ 2E
pix(i)
t,K+1 − x∗
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
N
∑
i=1
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
2
(cid:32) N
∑
i=1
pix(i)
t,K+1
(cid:33)
−
N
∑
i=1
pix(i)
t,K+1
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
2
+ 2E
pix(i)
t,K+1 − x∗
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
2
.
N
∑
i=1
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
N
∑
i=1
After these modifications, we proceed as in the rest of the proof of Theorem 5.
D. Impact of dictionary choice
4τ (i) and ̄ρ +(i)
Recall that our convergence guarantees depend on the restricted convexity/smoothness (A -RSC, A -RSS) con-
stants ρ −
as many works for sparse recovery [16], [42], [44], [52]. In particular, the product β1(i)β2(i)
in Theorems 5, 7, and 8 critically impact the convergence rate κ; for faster convergence, β1(i) and β2(i) should be
4τ (i) and ̄ρ +(i)
small as stated in Remark 3. This can be achieved especially when the A -RSS/A -RSC constants ρ −
are close to each other or their ratio (the restricted condition number) is close to 1.
4τ
4τ
Sparse linear regression: When the local objective function is the square loss function associated with the local
data set at the client, the A -RSC and A -RSS constants essentially reduce to the restricted isometry property
(A -RIP) [4], [14]. Indeed, let the square loss function be given by h(x) = 1
2 where the rows of matrix
B ∈ Rl×m are the input data vectors denoted by bi and y is the observation vector. Assume that (cid:107)bi(cid:107)2 = 1 for all
1 ≤ i ≤ l, which can be done by normalizing the data vector bi and corresponding yi. Since the function h is the
square loss function, by looking into its Hessian, we study the restricted strong convexity (RSC) and smoothness
(RSS) properties. The Hessian ∇2h of h is given by
2l (cid:107)Bx − y(cid:107)2
BT B.
1
l
The RSC and RSS constants are the largest c ≥ 0 and the smallest d ≥ 0 such that c(cid:107)w − z(cid:107)2
z) ≤ d(cid:107)w − z(cid:107)2
2 for all vectors w and z such that (cid:107)w − z(cid:107)0 ≤ τ.
2 ≤ (w − z)T (cid:0) 1
l BT B(cid:1) (w −
20
This observation and the definition of RIP [16] imply that if the RIP constant of
B is at least δ then (1 −
2 for all τ-sparse vectors z, making it satisfy the RSC/RSS with constants 1 − δ
1√
l
2 ≤ zT (cid:0) 1
δ )(cid:107)z(cid:107)2
and 1 + δ respectively.
l BT B(cid:1) z ≤ (1 + δ )(cid:107)z(cid:107)2
It could be possible, however, that the data matrix B whose rows consist of the local data at each client may not
satisfy RSC with respect to the standard basis, but RSC with respect to a certain dictionary A . Put it differently,
if h is not restricted strong convex for τ-sparse vectors, then B(w − z) = 0 for some vectors w and z such that
(cid:107)w − z(cid:107)0 ≤ τ or Bu = 0 for some τ-sparse vector u, i.e., B is not τ-RIP.
We present our idea of simply using a random Gaussian dictionary A to improve the ratio RSS to RSC constants
2 (or improve the A -RIP constant of B with respect to a dictionary
2l (cid:107)BAx − y(cid:107)2
of the associated new loss function 1
A) with high probability.
Our idea to improve the RIP with a random dictionary is based on a recent development in high dimensional
geometry. More specifically, we use the following theorem from [28].
Theorem 9 (Theorem 1.1 in [28]). Let B ∈ Rl×m be a fixed matrix, let A ∈ Rm×n be a mean zero, isotropic and
sub-Gaussian matrix with sub-Gaussian parameter K and let T ⊂ Rn be a bounded set. Then
(cid:12)
(cid:12)
(cid:12)(cid:107)BAx(cid:107)2 − (cid:107)B(cid:107)F (cid:107)x(cid:107)2
(cid:12)
(cid:12) ≤ CK(cid:112)
(cid:12)
E sup
x∈T
log K (cid:107)B(cid:107) [w(T ) + rad(T )] ,
and with probability at least 1 − 3e−u2,
(cid:12)
(cid:12) ≤ CK(cid:112)
(cid:12)
Here w(T ) is the Gaussian width for the set T , rad(T ) = sup
y∈T
(cid:12)
(cid:12)
(cid:12)(cid:107)BAx(cid:107)2 − (cid:107)B(cid:107)F (cid:107)x(cid:107)2
sup
x∈T
log K (cid:107)B(cid:107) [w(T ) + u * rad(T )] .
(cid:107)y(cid:107)2, and C is an absolute constant.
The following is an immediate consequence of the above theorem and the well-known fact that w(T ) ≤ Cr(cid:112)τ log(n/τ)
for the set T of all τ-sparse vectors x with (cid:107)x(cid:107) ≤ r for some universal constant C > 0.
Corollary 10. Let r > 0 and B be the closed unit ball in Rn. For the set T of all τ-sparse vectors in rB and
Gaussian random matrix A, we have
|(cid:107)BAx(cid:107)2 − (cid:107)B(cid:107)F (cid:107)x(cid:107)2| ≤ C(cid:107)B(cid:107)
(cid:104)
r(cid:112)
τ log(n/τ) + r
(cid:105)
,
E sup
x∈T
and with probability at least 1 − 3e−u2,
|(cid:107)BAx(cid:107)2 − (cid:107)B(cid:107)F (cid:107)x(cid:107)2| ≤ C(cid:107)B(cid:107)
sup
x∈T
(cid:104)
r(cid:112)
τ log(n/τ) + ru
(cid:105)
.
Since both terms in the bounds in Corollary 10 are homogeneous in r for all x in T with (cid:107)x(cid:107)2 = r, the corollary
τ log(n/τ) with high probability, whenever
BA satisfies the RIP with a constant δτ = C1
(cid:107)B(cid:107)2
(cid:107)B(cid:107)2
F
implies that matrix
the stable rank of B
1
(cid:107)B(cid:107)F
sr(B) :=
(cid:107)B(cid:107)2
F
(cid:107)B(cid:107)2 ≥ C2τ log(n/τ)
for a sufficiently large constant C2 > 0.
The above corollary can be readily applied to the data matrix BDi in the local objective function fi = 1
2|Di| (cid:107)BDiAx−
2 for client i. First, recall that (cid:107)bi(cid:107)2 = 1 and by the definition of the Frobenious norm, (cid:107)BDi(cid:107)F = (cid:112)|Di|. The
1
(cid:107)BDi (cid:107)F
y(cid:107)2
data matrix BDi may not satisfy the RIP in general but
BDiA does with RIP constant
BDiA = 1√
|Di|
δτ = C
(cid:107)BDi(cid:107)2
(cid:107)BDi(cid:107)2
F
2 is A -RSC and A -RSS with the constant ratio 1+δτ
2|Di| (cid:107)BDiAx − y(cid:107)2
1−δτ
(cid:107)BDi(cid:107)2
|Di|
τ log(n/τ) = C
τ log(n/τ).
1
Thus, with high probability,
with respect to
the Gaussian random dictionary A, under the stable rank condition for BDi (which could be a mild condition for
many data matrices). Since 1+δτ
is close to 1 whenever the RIP constant δτ is close to 0, this makes β1(i) and
1−δτ
β2(i) small, improving the convergence rate in Theorems 5 7, and 8 as we discussed before. Furthermore, note that
since the Gaussian random matrix is statistically independent of the client data sets, there is no privacy leakage.
21
l ∑l
Sparse binary logistic regression: The previous analysis for the square loss can be extended to the logistic losses.
First, we consider the binary logistic loss function h(x) = 1
j x)) with input data vector b j
and labels y j ∈ {−1, 1}. Assume that (cid:107)bi(cid:107)2 = 1 for all 1 ≤ i ≤ l and x is a τ-sparse vector with (cid:107)x(cid:107) ≤ r. Since
the function h is twice-differentiable, we can study the RSC and RSS by investigating its Hessian. We denote the
sigmoid function by s(z) =
1+exp(z) . By a direct computation or from the lecture notes https://www.cs.mcgill.ca/
∼dprecup/courses/ML/Lectures/ml-lecture05.pdf, one can verify that Hessian ∇2h of the logistic loss function h is
given by
i=1 log(1 + exp(−2y jbT
1
l
where B is the matrix whose rows bi consist of a client data set and Λ(x) is the diagonal matrix whose j-th diagonal
entry is 4s(2bT
BT Λ(x)B,
∇2h(x) =
1
j x)).
First, it is easy to check that h is L-smooth [49] with
j x)(1 − s(2bT
L ≤
1
l
l
∑
i=1
max
x
4s(2bT
j x)(1 − s(2bT
j x)) ≤ 1.
Next, since x is a τ-sparse vector with (cid:107)x(cid:107)2 ≤ r, from the definition of the sigmoid function τ, we deduce [Λ(x)] j j ≥
(1+exp(r))2 . Then, we have
4
4
(1 + exp(r))2 *
BT B
l
(cid:22) ∇2h =
1
l
BT Λ(x)B (cid:22)
BT B
l
.
Note that the above bound does not imply that h is RSC since it is possible that Bx = 0 for some τ-sparse vector
x. However, if we use a random Gaussian dictionary A, then a similar derivation gives
AT BT BA
l
4
(1 + exp(r))2 *
AT BT BA
l
AT BT Λ(x)BA (cid:22)
(cid:22) ∇2h =
1
l
.
Collorary 10 implies that
(cid:107)B(cid:107)F (cid:107)x(cid:107) −C(cid:107)B(cid:107)(cid:107)x(cid:107)
(cid:104)(cid:112)
τ log(n/τ) + u
(cid:105)
≤
√
xT AT BT BAx ≤ (cid:107)B(cid:107)F (cid:107)x(cid:107) +C(cid:107)B(cid:107)(cid:107)x(cid:107)
(cid:104)(cid:112)
τ log(n/τ) + u
(cid:105)
for all τ-sparse vectors with probability at least 1 − 3e−u2
the previous bound on ∇2h yields that with high probability, h is A -RSS and A -RSC with the constant ratio
. Finally, it is easy to check that applying this bound to
(1 + exp(r))2
4
*
(cid:107)B(cid:107)F +C(cid:107)B(cid:107)
(cid:107)B(cid:107)F −C(cid:107)B(cid:107)
(cid:104)(cid:112)τ log(n/τ) + u
(cid:104)(cid:112)τ log(n/τ) + u
(cid:105)
2
(cid:105)
,
which is close to (1+exp(r))2
4
as long as the stable rank
sr(B) =
(cid:107)B(cid:107)2
F
(cid:107)B(cid:107)2 (cid:29) τ log(n/τ).
This implies that for any τ-sparse vector x with (cid:107)x(cid:107)2 ≤ r, the logistic loss function is A -RSC/A -RSS with respect
to a random Gaussian dictionary with constant ≈ (1+exp(r))2
under a mild condition, even if the function is not
4
RSC/RSS in the standard basis (for example, the ratio is infinite if the RSC constant in the standard basis is 0).
We apply the above argument to each binary logistic loss function fi. Note that since the RSC/RSS ratio can be
understood as a restricted condition number that controls the convergence rates by Theorems 5, 7, and 8, a random
Gaussian dictionary is appropriate for FedGradMP with an (cid:96)2-norm constraint that is discussed in Section IV-C.
22
Sparse multiclass logistic regression: We only highlight the difference between the multiclass and binary logistic
regression cases since the arguments are very similar to each other. Consider the multinomial logistic regression
function with K classes. The label yi j is 1 if the j-th training input belongs to the class i and 0 otherwise, b j are
normalized data vectors (i.e., (cid:107)bi(cid:107)2 = 1), and x(i) are τ-sparse classifier vectors with (cid:107)x(i)(cid:107)2 ≤ r.
The corresponding loss function is given as
h(x(1), x(2), . . . , x(K)) =
(cid:34) K
∑
i=1
l
∑
j=1
(cid:32)
−yi jbT
j x(i) + ln
exp
(cid:33)(cid:33)(cid:35)
j x(i)
bT
.
(cid:32) K
∑
i=1
Similar to the binary logistic regression case, the direct computation of the Hessian of h gives
∇2
x(i)h =
1
l
BT Λ(x(i))B.
Here Λ(x) is a diagonal matrix whose diagonal entries are defined as [Λ(x)] j j = s(bT
j x)(1 − s(bT
j x)), where
1 + ∑K
By the same argument used for the sparse binary logistic regression, h is A -RSS and A -RSC with a constant ratio
i x)
s(bT
j x) =
exp(bT
j x)
i=1 exp(bT
.
(1 + K exp(2r))2 *
(cid:107)B(cid:107)F +C(cid:107)B(cid:107)
(cid:107)B(cid:107)F −C(cid:107)B(cid:107)
(cid:104)(cid:112)τ log(n/τ) + u
(cid:104)(cid:112)τ log(n/τ) + u
(cid:105)
2
(cid:105)
.
This again indicates that for any τ-sparse vector x with (cid:107)x(cid:107) ≤ r, the multiclass logistic loss function is A -RSC/A -
RSS with respect to a random Gaussian dictionary even if it may not be RSC/RSS in the standard basis. As we
saw in the binary logistic regression, this shows that it is beneficial to use a random Gaussian dictionary in logistic
regression for (cid:96)2-norm constrained FedGradMP, which is also verified in our numerical experiments in Section
V-B2.
Remark 7 (Random dictionary). The idea of using a Gaussian random dictionary to improve the restricted condition
number should be distinguished from the sketching in the FL literature [25], [47], [51]. Our formulation and
analysis are fundamentally different from those for sketching schemes that focus on compressing the gradient to
save communication cost between a server and clients. In these work [25], [47], [51], the sketching mappings
(commonly random matrices) developed for numerical linear algebra [57] are applied after the clients computed
the gradients to compress the information, whereas our Gaussian random mappings are used to transform the
domain of the solution space to improve the restricted condition number.
Remark 8 (Sharing the dictionary among clients). The server either broadcasts the dictionary to clients or the
shared memory can be used to share the dictionary among clients as suggested in [22], [41]. When the latter option
is available, the server does not need to send the dictionary to the clients.
In this section, we provide numerical experiments validating our theory and showing the effectiveness of the
V. NUMERICAL EXPERIMENTS
proposed algorithm.
A. FedGradMP for sparse linear regression
1) Synthetic dataset:
23
Fig. 1. Linear convergence of FedGradMP with for data sets with various heterogeneity levels.
Experiment settings: The first numerical experiment uses synthetic data sets. We run FedGradMP (Algorithm 1)
with the square loss function. More precisely, we consider the component function of the form fi = 1
2(cid:107)Di| (cid:107)ADix−yDi(cid:107)2
2
where ADi is the client i data matrix in R100×1000 whose elements are synthetically generated according to the normal
distribution N (μi, 1/i1.1) with the mean value μi that is randomly generated from the mean-zero Gaussian with
variance α. Here, yDi are observations with yDi = ADix# and x# ∈ R1000 is a randomly generated vector that is
10-sparse with respect to the standard basis whose 10 nonzero components are drawn from the unit sphere S ⊂ R10.
Since the random mean μi obeys the normal distribution N (α, 0), the parameter α modulates the degree of client
data heterogeneity: as α increases, the more likely μi vary wildly which in turn makes the client dataset distributions
more different. This type of model is commonly used in FL numerical experiments to generate synthetic datasets [52],
[55], [61] since randomly generated mean μi and decreasing variance 1/i1.1 make the client data set heterogeneous.
The number of clients is 50, the number of data points of each client is 100, and the mini-batch size of each
client for FedGradMP is 40.
Simulation results: Figure 1 shows that FedGradMP converges linearly for various heterogeneity level α, val-
idating Theorem 5. Note that the higher α is, the larger the variance of random mean shift μi or the higher the
degree of heterogeneity is. The curves on the left panel are the relative error of FedGradMP for the noiseless case
and the curves on the right are for the Gaussian noise case. We observe that FedGradMP still converges for highly
heterogeneous data sets but with slower convergence rates in both cases.
2) Real data set: sparse video recovery: In this experiment, we test FedGradMP on video frame recovery from a
real-world dataset. Our dataset is a xylophone video consisting of 120 frames from YouTube https://www.youtube.
com/watch?v=ORipY6OXltY, which can be also downloaded from the MathWorks website https://www.mathworks.
com/help/matlab/ref/videoreader.html. Each frame is of size 240 × 320 after the conversion to gray-scale frames.
We reshape the 82-th frame as a vector in R76800 and our goal is to recover this frame.
For this experiment, we use the K-SVD algorithm [2] to generate a dictionary Ψ ∈ R76800×50 consisting of 50
atoms that are trained over the first 80 frames.
The number of clients to reconstruct this video frame is 50 and non i.i.d. random matrix of size 30 × 76800 is
used for each client. More specifically, it is generated according to the normal distribution N (μi, 1/i0.9) where
μi ∼ N (0, α = 0.5), similar to the one in Sections V-A and V-B1.
Figure 2 shows one frame of the input image sequence on the left, the image recovered by FedGradMP + K-
SVD in the middle, and the difference on the right. Considering that the sensing matrices for clients are highly
heterogeneous, the recovered image quality is reasonably satisfactory.
B. Comparison of FedGradMP with other FL algorithms
1) Federeated sparse linear regression: The next experiments illustrate FedGradMP outperforms other FL
algorithms in both low and highly heterogeneous data environments.
24
02468101214161820Number of rounds10-1510-1010-5100Relative erroralpha:0.5alpha:1alpha:1.5alpha:2alpha:2.502468101214161820Number of rounds10-410-310-210-1100Relative erroralpha:1alpha:2alpha:3alpha:4alpha:5Fig. 2.
The difference of the two images is displayed on the right.
Input image on the left: 82-th frame of the xylophone video. The output image of FedGradMP with K-SVD dictionary in the middle.
Experiment settings: We compare FedGradMP with FedAvg, FedIterHT, FedMid, and FedDualAvg for the sparse
linear regression or compressed sensing. The (cid:96)1 regularization hyperparameter for FedMid and FedDualAvg is
0.55. The client learning rates for FedAvg, FedIterHT, FedMid, and FedDualAvg are chosen by grid search with
grid {0.01, 0.005, 0.001, 0.0005, 0.0001, 0.00005, 0.00001, 0.000005} to achieve their best performance. The number
of clients is 50 and the mini-batch size of each client is 50. The loss function for client i is given by fi =
2|Di| (cid:107)ADix − yDi(cid:107)2
2, where yDi = ADix# + e are noisy measurements of a 15-sparse vector x# and e is a noise vector
whose components are generated according to N (0, 0.005).
1
In the low-heterogeneity data experiments for Figure 3, the 100 × 1000 data matrices ADi are generated by the
randomly shifted mean Gaussian model used for the experiments for Figure 1 with whose elements are synthetically
generated according to N (μi, 1/i0.2) where μi ∼ N (0, α = 0.2).
On the other hand, under the same setting as before but a higher value of the parameter α = 0.5 is used to
generate the data matrices ADi to obtain a more heterogeneous client data set for the experiment for Figure 4.
The previous two experiments are conducted for relatively low-sparsity level signals. The relative error curves in
Figure 5 are obtained for a signal x# that 400-sparse under the same heterogeneous model as in Figure 4. Because
of the high sparsity level (about the same order as the ambient dimension 1000), we run the Inexact-FedGradMP
(Algorithm 2) with gradient descent to solve the sub-optimization problem more efficiently as we have discussed
in Section IV.
Simulation results: The plots for Figure 3 demonstrate FedGradMP converges faster than other methods in the
number of communication rounds for a low heterogeneous environment both in the number of rounds and wall-clock
time. FedIterHT converges linearly as shown in [52], but with a slower convergence rate than FedGradMP. FedMid
and FedDualAvg also appear to converge as their theory suggest [35], [55], [61] but slower than FedGradMP.
FedAvg is the slowest among all algorithms we tested and it generally does not produce a sparse solution. We also
notice that FedGradMP offers the smallest residual error evidencing our theory that FedGradMP guarantees the
optimal statistical bias in Remark 4.
In the highly heterogenous environment setting, FedGradMP still performs well whereas other algorithms start
degrading significantly, as we observe in the plots in Figure 4.
As for the signals with higher sparsity levels, from the plots in Figure 5 show, we see that FedGradMP performs
better than other baseline algorithms in terms of both criteria.
2) Logistic regression for Federated EMNIST dataset:
Experiment settings: The data set we use is the Federated EMNIST-10 dataset (FEMNIST-10), a commonly used
dataset to test FL algorithms. FEMNIST-10 is a collection of handwritten digits and 10 labels, grouped by writers.
Each data point of FEMNIST-10 consists of a 28 × 28 gray-scale image and its label belongs to one of the 10
classes. Note that the dimension of solution space is 28 × 28 = 784.
In the experiment, we use 350 clients, which is about 10% of the original dataset with 100 examples each. We
split the data into a training dataset with 300 clients and a test dataset with 50 clients. The number of participating
clients per round is 10 and the mini-batch size is 50. This is similar to the standard settings used for FL algorithm
benchmark [3], [61]. We run the Inexact-FedGradMP with an (cid:96)2 norm constraint with 20 local iterations, in which
we solve the sub-optimization problem in FedGradMP by SGD with 2 iterations. The number of local iterations
25
Fig. 3. FedGradMP outperforms other methods in a low data heterogeneous environment.
Fig. 4. FedGradMP outperforms other methods in a high data heterogeneous environment.
Fig. 5. FedGradMP outperforms other methods in a high data heterogeneous environment for high sparsity level signals.
26
0102030405060708090100Number of rounds10-410-310-210-1100Relative errorFedGradMPFedIterHTFedAvgFedMidFedDualAvg051015202530354045CPU Time10-410-310-210-1100Relative errorFedGradMPFedIterHTFedAvgFedMidFedDualAvg020406080100120140160180200Number of rounds10-310-210-1100Relative errorFedGradMPFedIterHTFedAvgFedMidFedDualAvg0102030405060708090100CPU Time10-310-210-1100Relative errorFedGradMPFedIterHTFedAvgFedMidFedDualAvg050100150200250300Number of rounds10-210-1100Relative errorFedGradMPFedIterHTFedAvgFedMidFedDualAvg020406080100120140160180200CPU Time0.30.40.50.60.70.80.91Relative errorFedGradMPFedIterHTFedAvgFedMidFedDualAvgFig. 6. In both of experiments using the traning dataset (on the left) and the test dataset (on the right), the performance of FedGradMP is better
than other baseline methods.
Fig. 7. Training accuracy curves of FedGradMP for the FEMINST dataset with respect to the random Gaussian dictionary and the standard
basis.
|Di|
∑
j=1
(cid:20) 10
∑
i=1
for FedIterHT, FedAvg, FedMid, FedDualAvg is 40. Note that the total number of the effective number of local
iterations for all the algorithms is the same, 40 iterations. The number of communication rounds is 1000.
(cid:18)
(cid:18) 10
∑
i=1
(cid:19)(cid:19)(cid:21)
The local objective function fi(x(1), x(2), . . . , x(N)) = 1
|Di|
class logistic regression function. Additionally, we use (cid:96)1 regularization with hyperparameter λ is chosen to be
0.0001 for FedMid and FedDualAvg as in [11], [61] and the (cid:96)2 ball constraint (cid:107)x(cid:107) ≤ 105 for FedGradMP.
j x(i) + ln
, the multi-
−yi jbT
j x(i)
bT
exp
Simulation results: Figure 6 demonstrates that FedGradMP outperforms the baseline algorithms in terms of
prediction accuracy on training and test datasets.
Improving FedGradMP performance using random dictionaries: In this section, we show that FedGradMP com-
bined with a random Gaussian dictionary empirically outperforms the one with the standard basis. The experiment
settings are the same as the ones in Section V-B2 except we use the random Gaussian dictionary of size 200 × 784.
As a comparison, we have also included the prediction accuracy curves of FedGradMP in Figure 6.
The plot in Figure 7 indicates that FedGradMP + random Gaussian dictionary outperforms FedGradMP + the
standard basis, supporting our theory in Section IV-D.
27
01002003004005006007008009001000Number of rounds0.750.80.850.90.95Training accuracyFedGradMPFedIterHTFedAvgFedMidFedDualAvg01002003004005006007008009001000Number of rounds0.750.80.850.90.95Test accuracyFedGradMPFedIterHTFedAvgFedMidFedDualAvg01002003004005006007008009001000Number of rounds0.750.80.850.90.95Training accuracyFedGradMP/Gaussian dictionaryFedGradMP/Standard basis01002003004005006007008009001000Number of rounds0.750.80.850.90.95Test accuracyFedGradMP/Gaussian dictionaryFedGradMP/Standard basisFig. 8. FedIterHT with learning rates {0.0001, 0.0005, 0.001, 0.002, 0.004, 0.01, 0.02} for non i.i.d. data sets.
C. Difficulties of tuning learning rates for FL methods
As we saw in the numerical experiments, Section V-B1, other FL methods suffer especially in a highly heteroge-
neous environment. This can be alleviated by tuning hyperparameters individually for each client such as learning
rates, but it could be challenging or at least time-consuming. To showcase the difficulties of tuning the learning
rates of FL methods, we study FedIterHT but we empirically observed the same phenomenon for other baseline
algorithms. Another reason we tested FedIterHT is that it is actually the only method among baseline that aims to
solve the sparsity-constrained problem (1) as ours.
The convergence of FedIterHT in [52] strongly depends on the learning rates. Although they provide the learning
rates that depend on the dissimilarity parameter and restricted strong convexity/smoothness parameters at the clients,
they are quite often not available and difficult to estimate in practice since the data at clients are non i.i.d..
FedGradMP is free from this issue at least for sparse linear regression and is often still computationally efficient
since clients only solve optimization problems over smaller spaces after the support estimation.
Experiment settings: We run FedIterHT for the squared loss function with a randomly generated 10-sparse vector
2 where ADi is the client i data matrix in R100×1000
as ground truth. The local loss function fi = 1
whose elements are synthetically generated according to N (μi, 1/i1.1) with randomly generated mean μi from the
mean-zero Gaussian with variance α = 1.0. This setting is similar to the synthetic dataset in [52] except we have
common sparse ground truth. The number of clients is 30 with mini-batch size 40. The number of total data points
m = 3000 and the dimension of solution space n = 1000. The client learning rate combinations for the experiment
are {0.0001, 0.0005, 0.001, 0.002, 0.004, 0.01, 0.02}.
2(cid:107)Di| (cid:107)ADix − yDi(cid:107)2
Simulation results: If the learning rates are chosen from {0.004, 0.01, 0.02}, then the left plot in Figure 8 show
that they quickly diverge from the optimal solution.
On the other hand, the right panel in Figure 8 shows the relative error and squared loss curves for FedIterHT when
the learning rate is in {0.0001, 0.0005, 0.001, 0.002}. For these smaller learning rates, the iterates of FedIterHT tend
to converge to a highly suboptimal local solution. It has been observed in the literature [1] that approaches based
on stochastic gradient descents combined with hard-thresholding (such as FedIterHT) suffer from such phenomena
when the learning rates are chosen to be too small.
Hence, our numerical experiments indicate that the learning rates should be chosen very carefully for each
client. Working learning rates should depend on the statistics and heterogeneity of the local data set at the client.
Obtaining this information could be challenging because it might not be available in general, so usually, a grid
search is performed to find learning rates.
On the other hand, the iterates of FedGradMP converge to the ground truth up to (almost) machine precision
as shown in Figure 9 under the same setting, only in four rounds with three local iterations at the clients. Unlike
FedIterHT, FedGradMP does not require fine tuning of learning rates per client.
28
01020304050607080Number of rounds10-5010010501010010150102001025010300Relative errorlearningRate :0.0001learningRate :0.0005learningRate :0.001learningRate :0.002learningRate :0.004learningRate :0.01learningRate :0.0202468101214161820Number of rounds10-1100101102Relative errorlearningRate :0.0001learningRate :0.0005learningRate :0.001learningRate :0.002learningRate :0.004learningRate :0.01learningRate :0.02Fig. 9. FedGradMP for non i.i.d. data sets.
D. Impact of the number of local iterations
We provide numerical evidence supporting Theorem 5 about how the number of local iterations at clients affects
the convergence rate and the residual error of FedGradMP.
Experiment settings: The number of clients is 50, the dimension of solution space is 1000, the number of
data points of each client is 100, the mini-batch size of each client is 30, and the cohort size is 50. The local
objective function fi is the squared loss with associated data matrix ADi for client i, similar to the one used for
the heterogeneous case with α = 2.5 in Section V-A. We run FedGradMP with local iterations 3, 6, 9, 12, 15 for
noiseless and noisy setup (yDi = ADix# + e, where e is a Gaussian noise where each component are independently
generated according to N (0, 4 × 10−6) ).
Simulation results: We display the relative error curves of iterates of FedGradMP on the left and right panels of
Figure 10 for noiseless and noisy case respectively.
The error decay curves in the left plot for the noiseless case demonstrate that as we increase the number of local
iterations at clients, FedGradMP converges faster or the convergence rates improve. The plot on the right for the
noisy case also exhibits a similar pattern but with a few exceptions probably due to the noise. This supports our
theory about the dependence of convergence rate κ on the number of local iterations in Theorem 5 as explained in
Remark 3.
As for the residual error of FedGradMP, we observe a general trend in the right panel that increasing the local
iterations decreases the residual error, but this effect is not as noticeable as the convergence rate. This is somewhat
expected since the residual error term in 5 depends on the local iteration numbers complicated way as explained
in Remark 3.
E. Impact of cohort size
The next experiment illustrates how well FedGradMP performs when cohort size (the number of participating
clients per round) varies. We notice that Figure 11 provides numerical evidence supporting Theorem 8 about how
the cohort size affects the convergence rate and the residual error of FedGradMP.
Experiment settings: The number of clients is 50, the dimension of solution space is 50 and we set the mini-batch
size 30. The local objective function fi is the squared loss with associated non iid data matrix ADi for client i,
similar to the one used for the heterogeneous case with α = 2.5 in Section V-A. We run FedGradMP with cohort
size 10, 15, 20, 25, 30 for noiseless and noisy setup.
Simulation results: The relative error curves of iterates of FedGradMP are given on the left panel (noiseless
case) and right panels (noisy case) of Figure 11. These error plots indicate that the convergence rate improves as
we increase the cohort size, for both noiseless and noisy cases as predicted in Theorem 8. On the other hand, a
careful reader might have noticed that the residual error actually slightly increases as the cohort size increases.
29
12345678910Number of rounds10-1510-1010-5100Relative errorFedGradMPFig. 10. The convergence rate improves as the local iterations at clients increase in Theorem 5.
Fig. 11. The convergence rates improve as the cohort size increases as predicted in Theorem 8. Note that the residual errors in the right panel
decay to zero (up to the machine precision) since all the non i.i.d. measurements are noiseless with the squared loss function.
This implies that the dependence of our residual error bound on the cohort size in Theorem 8 is pessimistic and
may not capture the true dependence as most of the other works in FL algorithm analysis. For more details, see
the discussion and criticism on the gap between the current theoretical analyses of the impact of cohort size in FL
algorithms and their empirical performance [9].
VI. CONCLUSION
In this paper, we propose a novel federated stochastic gradient matching pursuit algorithm framework and show
the linear convergence in expectation under certain assumptions of the objective function, including the dictionary
restricted-RSS/RSC conditions and the unbounded dissimilarity assumption. For the sparse linear regression problem,
our method does not require learning rate tuning at the client side, which could be challenging for existing baseline
algorithms in highly heterogeneous data environments. Numerical experiments on large scale heterogeneous data
sets such as EFMINIST and videos have shown the effectiveness of the proposed approach over the state-of-the-art
federated learning algorithms. Our analysis reveals the benefits of adopting random dictionaries such as Gaussian
random dictionary, which is also confirmed by our numerical experiments.
30
12345678910Number of rounds10-1610-1410-1210-1010-810-610-410-2100Relative errorLocal iteration number K:3Local iteration number K:6Local iteration number K:9Local iteration number K:12Local iteration number K:1512345678910Number of rounds10-310-210-1100Relative errorLocal iteration number K:3Local iteration number K:6Local iteration number K:9Local iteration number K:12Local iteration number K:1502468101214161820Number of rounds10-1610-1410-1210-1010-810-610-410-2100Relative errorCohort size n:10Cohort size n:15Cohort size n:20Cohort size n:25Cohort size n:3002468101214161820Number of rounds10-410-310-210-1100Relative errorCohort size n:10Cohort size n:15Cohort size n:20Cohort size n:25Cohort size n:30DN is supported by NSF DMS 2011140 and NSF DMS 2108479. The research of Qin is supported by the NSF
grant DMS-1941197.
ACKNOWLEDGEMENTS
APPENDIX A
PROOFS
Proof of Corollary 6. First, we recall that the global objective function f (x) = ∑N
From Assumption 2 on the A -RSS property of gi, j with constant ρ +
τ (i, j), we have
i=1 pi fi(x) and fi(x) = 1
M ∑M
j=1 gi, j(x).
(cid:107)∇gi, j(x1) − ∇gi, j(x2)(cid:107)2 ≤ ρ +
for all x1, x2 ∈ Rn with (cid:107)x1 − x2(cid:107)0,A ≤ τ. By Lemma 1, we have
τ (i, j)(cid:107)x1 − x2(cid:107)2
(cid:10)∇gi, j(x1), x2
(cid:11) ≥ gi, j(x1 + x2) − gi, j(x1) −
ρ +
τ (i, j)
2
(cid:107)x2(cid:107)2
2.
Taking average gi, j over j to recover fi and over i with probability pi to recover f , the above inequality implies
that
(cid:104)∇ f (x1), x2(cid:105) ≥ f (x1 + x2) − f (x1) −
1
2
N
∑
i=1
pi ̄ρ +(i)
τ
(cid:107)x2(cid:107)2
2.
by ρ. Setting x2 = xt+1 − x∗ and x1 = x∗ in the above inequality yields
Denote ∑N
i=1 pi ̄ρ +(i)
τ
f (xt+1) ≤ f (x∗) + (cid:104)∇ f (x∗), xt+1 − x∗(cid:105) +
ρ
2
(cid:107)xt+1 − x∗(cid:107)2
2
≤ f (x∗) + (cid:107)∇ f (x∗)(cid:107)2(cid:107)xt+1 − x∗(cid:107)2 +
(cid:107)∇ f (x∗)(cid:107)2
2 +
ρ
2
(cid:107)xt+1 − x∗(cid:107)2
(cid:107)xt+1 − x∗(cid:107)2
2
ρ
2
(cid:107)xt+1 − x∗(cid:107)2
2
ρ
2
2 +
(cid:107)∇ f (x∗)(cid:107)2
2 + ρ(cid:107)xt+1 − x∗(cid:107)2
2.
≤ f (x∗) +
≤ f (x∗) +
1
2ρ
1
2ρ
Here the third inequality follows from the AM-GM inequality. Taking the expectation to the last inequality, we
have
E f (xt+1) ≤ f (x∗) +
1
2ρ
(cid:107)∇ f (x∗)(cid:107)2
2 + ρE(cid:107)xt+1 − x∗(cid:107)2
2.
Finally, we apply Theorem 5 to the above inequality to establish the statement in the corollary.
Proof of Theorem 7. We follow the same arguments used in the first few steps of the proof of Theorem 5 and
obtain the following inequality.
E(cid:107)xt+1 − x∗(cid:107)2
2 ≤ (2η 2
3 + 2)
N
∑
i=1
piE(i)
JK
t,K+1 − x∗(cid:13)
(cid:13)
(cid:13)x(i)
(cid:13)
2
(cid:13)
(cid:13)
2
.
Because we are solving b(i)
t,k = argmin
fi(x) for x ∈ R(D
(cid:98)Γ) with an accuracy δ , we have
x
N
∑
i=1
piE(i)
JK
t,K+1 − x∗(cid:13)
(cid:13)
(cid:13)x(i)
(cid:13)
2
(cid:13)
(cid:13)
2
≤ (1 + η2)2
≤ (1 + η2)2
N
∑
i=1
N
∑
i=1
piE(i)
JK
(cid:20)
2E(i)
JK
pi
(cid:13)
(cid:13)b(i)
(cid:13)
(cid:13)
(cid:13)b(i,opt)
(cid:13)
t,K − x∗(cid:13)
2
(cid:13)
(cid:13)
2
t,K − x∗(cid:13)
2
(cid:13)
(cid:13)
2
31
+ 2E(i)
JK
(cid:13)
(cid:13)b(i,opt)
(cid:13)
t,K−1 − b(i)
t,K
(cid:21)
(cid:13)
2
(cid:13)
(cid:13)
2
≤ (1 + η2)2
(cid:20)
2E(i)
JK
(cid:13)
(cid:13)b(i,opt)
(cid:13)
t,K − x∗(cid:13)
2
(cid:13)
(cid:13)
2
(cid:21)
+ 2δ 2
pi
≤ 2(1 + η2)2
(cid:104)
β1(i)E(i)
JK
pi
(cid:107)P⊥
(cid:98)Γ
(b(i)
t,K − x∗)(cid:107)2
2 + ξ1(i) + δ 2(cid:105)
.
N
∑
i=1
N
∑
i=1
The rest of the proof is similar to that of Theorem 5.
Proof of Theorem 8. As in the proof of Theorem 5, let F (t) be the filtration by all the randomness up to the t-th
communication round, but in this case, it is all the selected participating clients and the selected mini-batch indices
at all these clients up to the t-th round. Let us denote the client subset selected at round t by It . Note that It is
chosen uniformly at random over all possible subsets of cardinality L whose elements belong to [N], so |It | = L.
Again, as we did in the proof of Theorem 5, by abusing the notation slightly, E
will be denoted E(It ) [E[*]],
where E(It ) is the expectation taken over the randomly selected participating clients at round t.
*|F (t)(cid:105)
(cid:104)
We first consider the case for η1 > 1. By following the same argument for the first step of the proof for Theorem
5, we have
E(It )E(cid:107)xt+1 − x∗(cid:107)2
2 = E(It )E
(cid:13)
(cid:13)
(cid:13)
PΛs
(cid:13)
(cid:13)
(cid:32)
∑
i∈It
(cid:32)
(cid:33)
1
L
x(i)
t,K+1
1
L
− ∑
i∈It
(cid:33)
1
L
x(i)
t,K+1
− ∑
i∈It
x(i)
t,K+1 + ∑
i∈It
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
2
x(i)
t,K+1
1
L
1
L
x(i)
t,K+1 − x∗
+ 2E(It )E
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
∑
i∈It
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
2
1
L
x(i)
t,K+1 − x∗
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
2
≤ 2E(It )E
(cid:13)
(cid:13)
(cid:13)
PΛs
(cid:13)
(cid:13)
∑
i∈It
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:34)
x∗
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
2
(cid:35)
= (2η 2
3 + 2)E(It )E
1
L
x(i)
t,K+1 − ∑
i∈It
1
L
∑
i∈It
≤ (2η 2
3 + 2)E(It )
≤ (2η 2
3 + 2)E(It )
∑
i∈It
(cid:34)
∑
i∈It
1
L
1
L
E
t,K+1 − x∗(cid:13)
(cid:13)
(cid:13)x(i)
(cid:13)
2
(cid:13)
(cid:13)
2
E(i)
JK
t,K+1 − x∗(cid:13)
(cid:13)
(cid:13)x(i)
(cid:13)
2
(cid:13)
(cid:13)
2
(cid:35)
.
Moreover, the argument used in the proof of Theorem 5 yields
1
L
E(i)
JK
t,K+1 − x∗(cid:13)
(cid:13)
(cid:13)x(i)
(cid:13)
2
(cid:13)
(cid:13)
2
≤ (1 + η2)2 ∑
i∈It
1
L
∑
i∈It
β1(i)β2(i)E(i)
JK−1
(cid:107)x(i)
t,K − x∗(cid:107)2
2
+ (1 + η2)2 max
i
+ (1 + η2)2 ∑
i∈It
1
L
̄ρ +(i)
4τ
+
8β1(i)
(ρ −
4τ (i))2
2θ 2 +
β1(i)
ρ −
4τ (i)
6
(2ρ −
(cid:113)
4τ
4
4τ (i) − ̄ρ +(i)
η 2
1 − 1
η1
+
6
β1(i)
ρ −
4τ (i)
+
)
(cid:113)
η 2
1 − 1
η1
ζ 2
∗
4
4τ (i) − ̄ρ +(i)
4τ
(2ρ −
σ 2
i .
)
̄ρ +(i)
4τ
We define ν(It ) that depends on the random index set It as follows:
ν(It ) = (1 + η2)2 max
i
+ (1 + η2)2 ∑
i∈It
+
8β1(i)
(ρ −
4τ (i))2
1
L
β1(i)
ρ −
4τ (i)
(2ρ −
̄ρ +(i)
4τ
2θ 2 +
4τ
4
4τ (i) − ̄ρ +(i)
)
(cid:113)
η 2
1 − 1
η1
6
+
(cid:113)
6
ζ 2
∗
η 2
1 − 1
η1
+
β1(i)
ρ −
4τ (i)
4
4τ (i) − ̄ρ +(i)
4τ
(2ρ −
̄ρ +(i)
4τ
σ 2
i .
)
After rewriting the previous inequality, we obtain
1
L
E(i)
JK
t,K+1 − x∗(cid:13)
(cid:13)
(cid:13)x(i)
(cid:13)
2
(cid:13)
(cid:13)
2
1
L
≤ ∑
i∈It
∑
i∈It
μ(i)E(i)
JK−1
32
(cid:107)x(i)
t,K − x∗(cid:107)2
2 + ν(It ).
(19)
(20)
(21)
Hence, by the induction on K and using the fact that the cohort set It is fixed while the local iterations are
running, we obtain a similar upper bound on E(cid:107)xt+1 − x∗(cid:107)2
μ(i)K (cid:104)
E(cid:107)xt+1 − x∗(cid:107)2
2 ≤ (2η 2
(cid:18)
2 as follows.
1
3 + 2)E(It ) ∑
L
i∈It
(cid:32)(cid:32)
= (2η 2
3 + 2)E(It )
≤ (2η 2
3 + 2)E(It )
∑
i∈It
(cid:32)(cid:32)
∑
i∈It
E(i)(cid:107)x(i)
t,1 − x∗(cid:107)2
2
(cid:105)
+
ν(It )(1 − μ(i)K)
1 − μ(i)
(cid:19)
(cid:33)
(cid:33)
1
L
1
L
μ(i)K
μ(i)K
E(cid:107)xt − x∗(cid:107)2
E(cid:107)xt − x∗(cid:107)2
1
L
(1 − μ(i)K)
1 − μ(i)
(cid:33)
2 + ν(It ) ∑
i∈It
(1 − μ K)
1 − μ
2 + ν(It )
.
(cid:33)
Recall that the index set It is a subset of [N], uniformly selected at random, for the communication round t. By
taking the maximum of ∑
i∈It
1
L μ(i)K over all possible subsets, we have
E(cid:107)xt+1 − x∗(cid:107)2
2 ≤ κE(cid:107)xt − x∗(cid:107)2
2 +
(2η 2
3 + 2)(1 − μ K)
1 − μ
E(It )[ν(It )]
≤ κE(cid:107)xt − x∗(cid:107)2
2 +
(2η 2
3 + 2) ̃ν(1 − μ K)
1 − μ
κ = (2η 2
3 + 2) max
S⊂[N]
|S|=L
1
L ∑
z∈S
(cid:2)(1 + η2)2β1(z)β2(z)(cid:3)K
,
where
and
̃ν = (1 + η2)2 max
i
+ (1 + η2)2 1
L
8β1(i)
(ρ −
4τ (i))2
N
∑
i=1
β1(i)
ρ −
4τ (i)
+
̄ρ +(i)
4τ
2θ 2 +
4
4τ (i) − ̄ρ +(i)
(2ρ −
4τ
(cid:113)
η 2
1 − 1
6
η1
+
6
β1(i)
ρ −
4τ (i)
+
)
(cid:113)
η 2
1 − 1
η1
ζ 2
∗
4
4τ (i) − ̄ρ +(i)
4τ
(2ρ −
̄ρ +(i)
4τ
σ 2
i .
)
Hence, by the induction on t, we have
E(cid:107)xt+1 − x∗(cid:107)2
2 ≤ κt+1E(cid:107)x0 − x∗(cid:107)2
2 +
(2η 2
3 + 2) ̃ν(1 − μ K)
(1 − κ)(1 − μ)
.
The case for η1 = 1 follows from a similar argument.
APPENDIX B
FEDGRADMP CONVERGENCE WITHOUT THE BOUNDED VARIANCE CONDITION OF STOCHASTIC GRADIENTS
We start with the following lemma replacing the bounded variance condition of stochastic gradients (7) in
Assumption 4 only under the A -RSS condition.
Lemma 11. Let E j be the expectation over the uniform distribution on all possible mini-batches. Then, for all
τ-sparse vectors x, we have
E j(cid:107)∇gi, j(x) − ∇ fi (x) (cid:107)2
2 ≤ 3E j((ρ +
τ (i, j))2 + ̄ρ +(i)
4τ
)(cid:107)∆(cid:107)2
2 + 12E j(cid:107)∇gi, j(x∗)(cid:107)2
2
and
E j(cid:107)PΓ(∇gi, j(x) − ∇ fi (x))(cid:107)2
where x∗ is a solution to (1) and ∆ = x − x∗.
2 ≤ 3E j((ρ +
τ (i, j))2 + ̄ρ +(i)
4τ
)(cid:107)∆(cid:107)2
2 + 12E j(cid:107)PΓ∇gi, j(x∗)(cid:107)2
2,
Proof of Lemma.
E j(cid:107)∇gi, j(x) − ∇ fi (x) (cid:107)2
2
33
≤ 3E j(cid:107)∇gi, j(x) − ∇gi, j(x∗)(cid:107)2
≤ 3E j(ρ +
= 3E j(ρ +
≤ 3E j((ρ +
≤ 3E j((ρ +
τ (i, j))2(cid:107)x − x∗(cid:107)2
τ (i, j))2(cid:107)∆(cid:107)2
τ (i, j))2 + ̄ρ +(i)
τ (i, j))2 + ̄ρ +(i)
4τ
4τ
2 + 3E j(cid:107)∇gi, j(x∗) − ∇ fi (x∗) (cid:107)2
2 + 6(cid:107)∇ fi (x∗) (cid:107)2
2 + 6E j(cid:107)∇gi, j(x∗)(cid:107)2
2 + 6E j(cid:107)∇gi, j(x∗)(cid:107)2
2 + 6(cid:107)∇ fi (x∗) (cid:107)2
2 + 3E j(cid:107)∇ fi (x∗) − ∇ fi (x) (cid:107)2
2
2 + 3E j ̄ρ +(i)
4τ (cid:107)∆(cid:107)2
2
4τ (cid:107)x − x∗(cid:107)2
2 + 3E j ̄ρ +(i)
2
)(cid:107)∆(cid:107)2
)(cid:107)∆(cid:107)2
2 + 6E j(cid:107)∇gi, j(x∗)(cid:107)2
2 + 6(cid:107)∇ fi (x∗) (cid:107)2
2
2 + 12E j(cid:107)∇gi, j(x∗)(cid:107)2
2.
The second inequality follows from the A -RSS condition for ∇gi, j with constant ρ +
τ (i, j), and the fact that ∇ fi is
the average of ∇gi, j. The last inequality is from the Jensen's inequality. This proves the first part of the lemma and
the second part follows from a similar argument.
This lemma allows us to prove a similar statement as in Lemma 4 without the bounded variance condition (7).
Since the underlying argument of the proof of the following lemma is the same, we only point out the difference
from the proof for Lemma 4.
Lemma 12. Let (cid:98)Γ be the set obtained from the k-th iteration at client i. Then, for any θ > 0, we have
E(i)
jk
(cid:107)P⊥
(cid:98)Γ
(b(i)
t,k − x∗)(cid:107)2
2 ≤ β2(i)(cid:107)x(i)
t,k − x∗(cid:107)2
2 + ξ2(i),
where
β2(i) =
4
(2η 2
1 − 1)
(cid:17)
(cid:16)
̄ρ +(i)
4τ + 1
θ 2
1 ρ −
η 2
4τ (i)
− η 2
1 ρ −
4τ (i)
(cid:32)
+
ξ2(i) =
8
(ρ −
4τ (i))2
max
Ω⊂[d]
|Ω|=4τ
(cid:107)PΩ∇ fi(x∗)(cid:107)2
2 + 2
6θ 2 +
(cid:33)
)
4τ
τ (i, jk) + ̄ρ +(i)
3θ 2E jk (ρ +
ρ −
4τ (i)
E jk (cid:107)∇gi, jk (x∗)(cid:107)2
2.
η 2
1 − 1
(cid:113)
+
15
2η1
2(η 2
1 − 1)
η 2
1
Note that if η1 = 1, then the projection operator is exact. Here E(i)
jk
selected index jk at the k-th step of the local iterations of the i-th client.
is the expectation taken over the randomly
Proof. We follow the same steps in the proof of Lemma 4 for the bound fi(x∗) − fi
apply Lemma 12 to the inequality 22 as follows.
(cid:17)
(cid:16)
x(i)
t,k
− ρ −
4τ (i)
2 (cid:107)x∗ − x(i)
t,k(cid:107)2
2 but
fi(x∗) − fi
(cid:17)
(cid:16)
x(i)
t,k
−
ρ −
4τ (i)
2
(cid:107)x∗ − x(i)
t,k(cid:107)2
2
≥ E jk
(cid:68)
∇ fi
(cid:17)
(cid:16)
x(i)
t,k
(cid:69)
, z
−
−
1
2θ 2
(cid:68)
∇ fi
≥ E jk
E jk (cid:107)z(cid:107)2
2 −
(cid:17)
(cid:16)
x(i)
t,k
(cid:69)
, z
−
1
2θ 2
E jk (cid:107)z(cid:107)2
2 −
θ 2
2
̄ρ +(i)
4τ
2
θ 2
2
̄ρ +(i)
4τ
2
(cid:107)∇gi, jk (x(i)
t,k) − ∇ fi
(cid:113)
(cid:17)
(cid:16)
x(i)
t,k
(cid:107)2
2
E jk (cid:107)z(cid:107)2
2 −
η 2
1 − 1
2η1
τ (i, j))2 + ̄ρ +(i)
4τ
E jk (cid:107)z(cid:107)2
(cid:113)
2 −
η 2
1 − 1
2η1
Γ ∇gi, jk (x(i)
t,k)(cid:107)2
2 as follows.
(cid:16)
E jk (cid:107)P⊥
Γ ∇gi, jk (x(i)
t,k)(cid:107)2
2 + E jk (cid:107)∆(cid:107)2
2
−
(3E j((ρ +
)(cid:107)∆(cid:107)2
2 + 12E j(cid:107)∇gi, j(x∗)(cid:107)2
2)
(cid:16)
E jk (cid:107)P⊥
Γ ∇gi, jk (x(i)
t,k)(cid:107)2
2 + E jk (cid:107)∆(cid:107)2
2
(cid:17)
(cid:17)
.
(22)
Similarly, we obtain the upper bound for E jk (cid:107)P⊥
Γ ∇gi, jk (x(i)
E jk (cid:107)P⊥
≤ E jk (cid:107)∇gi, jk (x(i)
≤ 3E jk (cid:107)∇gi, jk (x(i)
≤ 3E jk (ρ +
t,k)(cid:107)2
2
t,k)(cid:107)2
2
t,k) − ∇gi, jk (x∗)(cid:107)2
t,k − x∗(cid:107)2
τ (i, jk))2(cid:107)x(i)
2 + 3E jk (cid:107)∇gi, jk (x∗) − ∇ fi (x∗) (cid:107)2
2 + 6(cid:107)∇ fi (x∗) (cid:107)2
2 + 6E jk (cid:107)∇gi, jk (x∗)(cid:107)2
2 + 3E jk (cid:107)∇ fi (x∗) (cid:107)2
2
2 + 3(cid:107)∇ fi (x∗) (cid:107)2
2
34
= 3E jk (ρ +
= 3E jk (ρ +
τ (i, jk))2(cid:107)∆(cid:107)2
τ (i, jk))2(cid:107)∆(cid:107)2
2 + 6E jk (cid:107)∇gi, jk (x∗)(cid:107)2
2 + 9(cid:107)∇ fi (x∗) (cid:107)2
2
2 + 15E jk (cid:107)∇gi, jk (x∗)(cid:107)2
2,
where the last inequality is from the Jensen's inequality.
Applying this bound for E jk (cid:107)P⊥
ρ −
4τ (i)
2
fi(x∗) − fi
(cid:16)
x(i)
t,k
−
(cid:17)
(cid:107)∆(cid:107)2
2
Γ ∇gi, jk (x(i)
t,k)(cid:107)2
2 yields
≥ E jk
(cid:68)
∇ fi
(cid:17)
(cid:16)
x(i)
t,k
(cid:69)
, z
−
1
2θ 2
E jk (cid:107)z(cid:107)2
2 −
−
(cid:113)
θ 2
2
η 2
1 − 1
2η1
(3E j((ρ +
τ (i, j))2 + ̄ρ +(i)
4τ
)(cid:107)∆(cid:107)2
2 + 12E j(cid:107)∇gi, j(x∗)(cid:107)2
2) −
̄ρ +(i)
4τ
2
E jk (cid:107)z(cid:107)2
2
(cid:0)3E jk (ρ +
τ (i, jk))2(cid:107)∆(cid:107)2
2 + 15E jk (cid:107)∇gi, jk (x∗)(cid:107)2
2 + E jk (cid:107)∆(cid:107)2
2
(cid:1) .
Following the same argument in the proof of Lemma 4, we have
(cid:33)
(cid:32)
̄ρ +(i)
4τ
2
+
1
2θ 2
E jk (cid:107)z(cid:107)2
2 −
1
2
ρ −
4τ (i) − 3θ 2E jk ((ρ +
τ (i, jk))2 + ̄ρ +(i)
4τ
(cid:113)
η 2
1 − 1
η1
) −
(3E jk ρ +
τ (i, jk))2 + 1)
(cid:107)∆(cid:107)2
2
6θ 2 +
+
(cid:16)
x(i)
t,k + z
(cid:113)
15
η 2
1 − 1
2η1
(cid:17)
− fi (x∗)
E jk (cid:107)∇gi, jk (x∗)(cid:107)2
2
(cid:107)∆ − z(cid:107)2
2 − max
Ω⊂[d]
|Ω|=4τ
(cid:107)PΩ∇ fi(x∗)(cid:107)2E jk (cid:107)∆ − z(cid:107)2.
≥ E jk fi
ρ −
4τ (i)
2
≥
Let u = E jk (cid:107)∆ − y(cid:107)2, a = ρ −
4τ (i), b = max
Ω⊂[d]
|Ω|=4τ
(cid:107)PΩ∇ fi(x∗)(cid:107)2, and
(cid:33)
(cid:32)
̄ρ
+(i)
4τ
2
+
1
2θ 2
c =
E jk (cid:107)z(cid:107)2
2 −
1
2
ρ −
4τ (i) − 3θ 2E jk ((ρ +
τ (i, jk))2 + ̄ρ
+(i)
4τ
) −
(cid:113)
η 2
1 − 1
η1
(3E jk ρ +
τ (i, jk))2 + 1)
(cid:107)∆(cid:107)2
2
6θ 2 +
+
15
(cid:113)
η 2
1 − 1
2η1
E jk (cid:107)∇gi, jk (x∗)(cid:107)2
2.
Then above inequality can be rewritten in au2 − 2bu − c ≤ 0 and solving it gives
E jk (cid:107)∆ − y(cid:107)2 ≤
(cid:114) c
a
+
2b
a
.
Again, following the same argument for the proof of Lemma 4, we get
8b2
a2 .
(cid:107)∆ − PΓ∆(cid:107)2
E(i)
jk
2c
a
2 ≤
+
Thus,
E(i)
jk
(cid:107)∆ − PΓ∆(cid:107)2
2
(cid:16)
̄ρ +(i)
4τ + 1
θ 2
1 ρ −
η 2
2
(cid:17)
≤
4τ (i)
− η 2
1 ρ −
4τ (i)
(cid:32)
+
3θ 2E jk ((ρ +
(cid:107)PΩ∇ fi(x∗)(cid:107)2
2 + 2
6θ 2 +
8
(ρ −
4τ (i))2
max
Ω⊂[d]
|Ω|=4τ
2η1
35
(cid:33)
)
+
(cid:113)
η 2
1 − 1
η1
(3E jk ρ +
τ (i, jk))2 + 1)
(cid:107)∆(cid:107)2
2
4τ
τ (i, jk))2 + ̄ρ +(i)
ρ −
4τ (i)
(cid:113)
15
η 2
1 − 1
E jk (cid:107)∇gi, jk (x∗)(cid:107)2
2.
We follow the idea of the proof for Theorem 5 but use Lemma 12 to show the following convergence theorem
of FedGradMP.
Theorem 13. Under the same notations and assumptions but without the bounded variance condition (7), the
expectation of the recovery error at the (t + 1)-th round of FedGradMP described in Algorithm 1 is upper bounded
by
E(cid:107)xt+1 − x∗(cid:107)2
2 ≤ κt+1(cid:107)x0 − x∗(cid:107)2
2 +
(2η 2
3 + 2)ν
1 − κ
N
∑
i=1
pi
1 − μ(i)K
1 − μ(i)
,
where
Here
β1(i) =
β2(i) =
κ = (2η 2
3 + 2)
N
∑
i=1
(cid:2)(1 + η2)2β1(i)β2(i)(cid:3)K
.
pi
,
̄ρ +(i)
4τ
4τ (i) − ̄ρ +(i)
2ρ −
4τ
(cid:16)
̄ρ +(i)
4τ + 1
θ 2
1 ρ −
η 2
2
(cid:17)
4τ (i)
− η 2
1 ρ −
4τ (i)
(cid:32)
+
3θ 2E jk ((ρ +
τ (i, jk))2 + ̄ρ +(i)
ρ −
4τ (i)
4τ
(cid:33)
)
+
(cid:113)
η 2
1 − 1
η1
(3E jk ρ +
τ (i, jk))2 + 1)
,
ν = (1 + η2)2 max
i
(cid:18) 8β1(i)
(ρ −
4τ (i))2
(cid:19) N
∑
i=1
(cid:107)PΩ∇ fi(x∗)(cid:107)2
2
pi max
Ω⊂[d]
|Ω|=4τ
(cid:113)
6
+ (1 + η2)2
pi
N
∑
i=1
β1(i)
ρ −
4τ (i)
2θ 2 +
+
η 2
1 − 1
η1
̄ρ +(i)
4τ
4
4τ (i) − ̄ρ +(i)
4τ
(2ρ −
N
∑
i=1
)
piE j(cid:107)∇gi, j(x∗)(cid:107)2
2.
REFERENCES
[1] Amirali Aghazadeh, Ryan Spring, Daniel LeJeune, Gautam Dasarathy, Anshumali Shrivastava, et al. Mission: Ultra large-scale feature
selection using count-sketches. In International Conference on Machine Learning, pages 80–88. PMLR, 2018.
[2] Michal Aharon, Michael Elad, and Alfred Bruckstein. K-svd: An algorithm for designing overcomplete dictionaries for sparse representation.
IEEE Transactions on signal processing, 54(11):4311–4322, 2006.
[3] Yajie Bao, Michael Crawshaw, Shan Luo, and Mingrui Liu. Fast composite optimization and statistical recovery in federated learning. In
International Conference on Machine Learning, pages 1508–1536. PMLR, 2022.
[4] Rich Baraniuk, Simon Foucart, Deanna Needell, Yaniv Plan, and Mary Wootters. One-bit compressive sensing of dictionary-sparse signals.
Information and Inference: A Journal of the IMA, 7(1):83–104, 2018.
[5] Debraj Basu, Deepesh Data, Can Karakus, and Suhas Diggavi. Qsparse-local-sgd: Distributed sgd with quantization, sparsification and
local computations. Advances in Neural Information Processing Systems, 32, 2019.
[6] Amir Beck. First-order methods in optimization. SIAM, 2017.
[7] Thomas Blumensath and Mike E Davies. Iterative hard thresholding for compressed sensing. Applied and computational harmonic analysis,
27(3):265–274, 2009.
[8] Keith Bonawitz, Hubert Eichner, Wolfgang Grieskamp, Dzmitry Huba, Alex Ingerman, Vladimir Ivanov, Chloe Kiddon, Jakub Koneˇcn`y,
Stefano Mazzocchi, Brendan McMahan, et al. Towards federated learning at scale: System design. Proceedings of Machine Learning and
Systems, 1:374–388, 2019.
[9] Zachary Charles, Zachary Garrett, Zhouyuan Huo, Sergei Shmulyian, and Virginia Smith. On large-cohort training for federated learning.
Advances in neural information processing systems, 34:20461–20475, 2021.
[10] Zachary Charles and Jakub Koneˇcn`y. Convergence and accuracy trade-offs in federated learning and meta-learning.
In International
Conference on Artificial Intelligence and Statistics, pages 2575–2583. PMLR, 2021.
[11] Wenlin Chen, Samuel Horvath, and Peter Richtarik. Optimal client sampling for federated learning. arXiv preprint arXiv:2010.13723,
2020.
[12] Yae Jee Cho, Jianyu Wang, and Gauri Joshi. Towards understanding biased client selection in federated learning.
In International
Conference on Artificial Intelligence and Statistics, pages 10351–10375. PMLR, 2022.
[13] Ingrid Daubechies, Michel Defrise, and Christine De Mol. An iterative thresholding algorithm for linear inverse problems with a sparsity
constraint. Communications on Pure and Applied Mathematics: A Journal Issued by the Courant Institute of Mathematical Sciences,
57(11):1413–1457, 2004.
[14] Mark A Davenport, Deanna Needell, and Michael B Wakin. Signal space cosamp for sparse recovery with redundant dictionaries. IEEE
Transactions on Information Theory, 59(10):6820–6829, 2013.
36
[15] John C Duchi, Shai Shalev-Shwartz, Yoram Singer, and Ambuj Tewari. Composite objective mirror descent. In COLT, volume 10, pages
14–26. Citeseer, 2010.
[16] Simon Foucart and Holger Rauhut. An invitation to compressive sensing. In A mathematical introduction to compressive sensing, pages
1–39. Springer, 2013.
[17] Michael P Friedlander and Mark Schmidt. Hybrid deterministic-stochastic methods for data fitting. SIAM Journal on Scientific Computing,
34(3):A1380–A1405, 2012.
[18] Gene H Golub and Charles F Van Loan. Matrix computations. JHU press, 2013.
[19] Ian Goodfellow, Yoshua Bengio, and Aaron Courville. Deep learning. MIT press, 2016.
[20] Robert Mansel Gower, Nicolas Loizou, Xun Qian, Alibek Sailanbayev, Egor Shulgin, and Peter Richt ́arik. Sgd: General analysis and
improved rates. In International Conference on Machine Learning, pages 5200–5209. PMLR, 2019.
[21] Rachel Grotheer, Shuang Li, Anna Ma, Deanna Needell, and Jing Qin. Iterative hard thresholding for low cp-rank tensor models. Linear
and Multilinear Algebra, pages 1–17, 2021.
[22] Xinran Gu, Kaixuan Huang, Jingzhao Zhang, and Longbo Huang. Fast federated learning in the presence of arbitrary device unavailability.
Advances in Neural Information Processing Systems, 34:12052–12064, 2021.
[23] Farzin Haddadpour, Mohammad Mahdi Kamani, Mehrdad Mahdavi, and Viveck Cadambe. Local sgd with periodic averaging: Tighter
analysis and adaptive synchronization. Advances in Neural Information Processing Systems, 32, 2019.
[24] Farzin Haddadpour, Mohammad Mahdi Kamani, Aryan Mokhtari, and Mehrdad Mahdavi. Federated learning with compression: Unified
analysis and sharp guarantees. In International Conference on Artificial Intelligence and Statistics, pages 2350–2358. PMLR, 2021.
[25] Farzin Haddadpour, Belhal Karimi, Ping Li, and Xiaoyun Li. Fedsketch: Communication-efficient and private federated learning via
sketching. arXiv preprint arXiv:2008.04975, 2020.
[26] Farzin Haddadpour and Mehrdad Mahdavi. On the convergence of local descent methods in federated learning.
arXiv preprint
arXiv:1910.14425, 2019.
[27] Tzu-Ming Harry Hsu, Hang Qi, and Matthew Brown. Measuring the effects of non-identical data distribution for federated visual
classification. arXiv preprint arXiv:1909.06335, 2019.
[28] Halyun Jeong, Xiaowei Li, Yaniv Plan, and Ozgur Yilmaz. Sub-gaussian matrices on sets: Optimal tail dependence and applications.
Communications on Pure and Applied Mathematics, 2021.
[29] Rie Johnson and Tong Zhang. Accelerating stochastic gradient descent using predictive variance reduction. Advances in neural information
processing systems, 26, 2013.
[30] Sai Praneeth Karimireddy, Satyen Kale, Mehryar Mohri, Sashank Reddi, Sebastian Stich, and Ananda Theertha Suresh. Scaffold: Stochastic
controlled averaging for federated learning. In International Conference on Machine Learning, pages 5132–5143. PMLR, 2020.
[31] Ahmed Khaled, Konstantin Mishchenko, and Peter Richt ́arik. Tighter theory for local sgd on identical and heterogeneous data.
In
International Conference on Artificial Intelligence and Statistics, pages 4519–4529. PMLR, 2020.
[32] Anastasia Koloskova, Sebastian U Stich, and Martin Jaggi. Sharper convergence guarantees for asynchronous sgd for distributed and
federated learning. arXiv preprint arXiv:2206.08307, 2022.
[33] Jakub Koneˇcn`y, H Brendan McMahan, Daniel Ramage, and Peter Richt ́arik. Federated optimization: Distributed machine learning for
on-device intelligence. arXiv preprint arXiv:1610.02527, 2016.
[34] Tian Li, Anit Kumar Sahu, Ameet Talwalkar, and Virginia Smith. Federated learning: Challenges, methods, and future directions. IEEE
Signal Processing Magazine, 37(3):50–60, 2020.
[35] Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi, Ameet Talwalkar, and Virginia Smith. Federated optimization in heterogeneous
networks. arXiv preprint arXiv:1812.06127, 2018.
[36] Po-Ling Loh and Martin J Wainwright. High-dimensional regression with noisy and missing data: Provable guarantees with non-convexity.
Advances in neural information processing systems, 24, 2011.
[37] LO Mangasarian. Parallel gradient distribution in unconstrained optimization. SIAM Journal on Control and Optimization, 33(6):1916–1925,
1995.
[38] Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-efficient learning of deep
networks from decentralized data. In Artificial intelligence and statistics, pages 1273–1282. PMLR, 2017.
[39] Brendan McMahan and Daniel Ramage. Federated learning: Collaborative machine learning without centralized training data. Google AI
Blog, 2017.
[40] Aritra Mitra, Rayana Jaafar, George J Pappas, and Hamed Hassani. Linear convergence in federated learning: Tackling client heterogeneity
and sparse gradients. Advances in Neural Information Processing Systems, 34:14606–14619, 2021.
[41] Fan Mo, Hamed Haddadi, Kleomenis Katevas, Eduard Marin, Diego Perino, and Nicolas Kourtellis. Ppfl: privacy-preserving federated
learning with trusted execution environments. In Proceedings of the 19th Annual International Conference on Mobile Systems, Applications,
and Services, pages 94–108, 2021.
[42] Deanna Needell and Joel A Tropp. Cosamp: Iterative signal recovery from incomplete and inaccurate samples. Applied and computational
harmonic analysis, 26(3):301–321, 2009.
[43] Yurii Nesterov et al. Lectures on convex optimization, volume 137. Springer, 2018.
[44] Nam Nguyen, Deanna Needell, and Tina Woolf. Linear convergence of stochastic iterative greedy algorithms with sparse constraints. IEEE
Transactions on Information Theory, 63(11):6869–6895, 2017.
[45] Jing Qin, Shuang Li, Deanna Needell, Anna Ma, Rachel Grotheer, Chenxi Huang, and Natalie Durgin. Stochastic greedy algorithms for
multiple measurement vectors. Inverse Problems & Imaging, 15(1):79–107, 2021.
[46] Holger Rauhut, Reinhold Schneider, and ˇZeljka Stojanac. Low rank tensor recovery via iterative hard thresholding. Linear Algebra and
its Applications, 523:220–262, 2017.
[47] Daniel Rothchild, Ashwinee Panda, Enayat Ullah, Nikita Ivkin, Ion Stoica, Vladimir Braverman, Joseph Gonzalez, and Raman Arora.
In International Conference on Machine Learning, pages 8253–
Fetchsgd: Communication-efficient federated learning with sketching.
8265. PMLR, 2020.
[48] Nicolas Roux, Mark Schmidt, and Francis Bach. A stochastic gradient method with an exponential convergence rate for finite training
sets. Advances in neural information processing systems, 25, 2012.
[49] Shai Shalev-Shwartz and Shai Ben-David. Understanding machine learning: From theory to algorithms. Cambridge university press, 2014.
[50] Jie Shen and Ping Li. A tight bound of hard thresholding. The Journal of Machine Learning Research, 18(1):7650–7691, 2017.
37
[51] Zhao Song, Yitan Wang, Zheng Yu, and Lichen Zhang. Sketching for first order method: Efficient algorithm for low-bandwidth channel
and vulnerability. arXiv preprint arXiv:2210.08371, 2022.
[52] Qianqian Tong, Guannan Liang, Tan Zhu, and Jinbo Bi. Federated nonconvex sparse learning. arXiv preprint arXiv:2101.00052, 2020.
[53] Lloyd N Trefethen and David Bau III. Numerical linear algebra, volume 50. Siam, 1997.
[54] Joost Verbraeken, Matthijs Wolting, Jonathan Katzy, Jeroen Kloppenburg, Tim Verbelen, and Jan S Rellermeyer. A survey on distributed
machine learning. ACM Computing Surveys (CSUR), 53(2):1–33, 2020.
[55] Jianyu Wang, Zachary Charles, Zheng Xu, Gauri Joshi, H Brendan McMahan, Maruan Al-Shedivat, Galen Andrew, Salman Avestimehr,
Katharine Daly, Deepesh Data, et al. A field guide to federated optimization. arXiv preprint arXiv:2107.06917, 2021.
[56] Jianyu Wang, Qinghua Liu, Hao Liang, Gauri Joshi, and H Vincent Poor. Tackling the objective inconsistency problem in heterogeneous
federated optimization. Advances in neural information processing systems, 33:7611–7623, 2020.
[57] David P Woodruff et al. Sketching as a tool for numerical linear algebra. Foundations and Trends® in Theoretical Computer Science,
10(1–2):1–157, 2014.
[58] Blake E Woodworth, Kumar Kshitij Patel, and Nati Srebro. Minibatch vs local sgd for heterogeneous distributed learning. Advances in
Neural Information Processing Systems, 33:6281–6292, 2020.
[59] Haibo Yang, Minghong Fang, and Jia Liu. Achieving linear speedup with partial worker participation in non-iid federated learning. arXiv
preprint arXiv:2101.11203, 2021.
[60] Haibo Yang, Xin Zhang, Prashant Khanduri, and Jia Liu. Anarchic federated learning. In International Conference on Machine Learning,
pages 25331–25363. PMLR, 2022.
[61] Honglin Yuan, Manzil Zaheer, and Sashank Reddi. Federated composite optimization. In International Conference on Machine Learning,
pages 12253–12266. PMLR, 2021.
[62] Pan Zhou, Xiaotong Yuan, and Jiashi Feng. Efficient stochastic gradient hard thresholding. Advances in Neural Information Processing
Systems, 31, 2018.
38
|
|
http://arxiv.org/abs/2302.10066v2 | 2023-06-22T16:22:47 | 2023-02-20T16:13:19 | Sharp analysis of EM for learning mixtures of pairwise differences | We consider a symmetric mixture of linear regressions with random samples
from the pairwise comparison design, which can be seen as a noisy version of a
type of Euclidean distance geometry problem. We analyze the
expectation-maximization (EM) algorithm locally around the ground truth and
establish that the sequence converges linearly, providing an $\ell_\infty$-norm
guarantee on the estimation error of the iterates. Furthermore, we show that
the limit of the EM sequence achieves the sharp rate of estimation in the
$\ell_2$-norm, matching the information-theoretically optimal constant. We also
argue through simulation that convergence from a random initialization is much
more delicate in this setting, and does not appear to occur in general. Our
results show that the EM algorithm can exhibit several unique behaviors when
the covariate distribution is suitably structured. | [
"Abhishek Dhawan",
"Cheng Mao",
"Ashwin Pananjady"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.10066v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.10066v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "math.ST",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"math.ST",
"cs.LG",
"stat.ML",
"stat.TH"
] | 3
2
0
2
n
u
J
2
2
]
T
S
.
h
t
a
m
[
2
v
6
6
0
0
1
.
2
0
3
2
:
v
i
X
r
a
Sharp analysis of EM for learning mixtures of
pairwise differences
Abhishek Dhawan⋆, Cheng Mao⋆, Ashwin Pananjady†,‡
⋆School of Mathematics
†School of Industrial and Systems Engineering
‡School of Electrical and Computer Engineering
Georgia Institute of Technology
June 23, 2023
Abstract
We consider a symmetric mixture of linear regressions with random samples from the pairwise
comparison design, which can be seen as a noisy version of a type of Euclidean distance geometry
problem. We analyze the expectation-maximization (EM) algorithm locally around the ground
truth and establish that the sequence converges linearly, providing an l∞-norm guarantee on the
estimation error of the iterates. Furthermore, we show that the limit of the EM sequence achieves
the sharp rate of estimation in the l2-norm, matching the information-theoretically optimal
constant. We also argue through simulation that convergence from a random initialization is
much more delicate in this setting, and does not appear to occur in general. Our results show
that the EM algorithm can exhibit several unique behaviors when the covariate distribution is
suitably structured.
Contents
1 Introduction
1.1 Contributions and organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 Background and problem formulation
3 Main results
2
3
4
4
5
4 Experiments and discussion
4.1 Failure of random initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2 Spectral method, initialization, and comparison . . . . . . . . . . . . . . . . . . . . .
4.3 Extensions of the model
7
7
9
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5 Proof techniques
11
5.1 Contraction in the l∞ norm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5.2 Expansion around the ground truth . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Infinity operator norm of the inverse covariance . . . . . . . . . . . . . . . . . . . . . 13
5.3
5.4 Proof organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1
6 Analysis of the EM algorithm
15
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
6.1 Preliminaries
6.2 Sample covariance
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
6.3 One-step iterate from the ground truth . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.4 Convergence analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
6.5 Sharp results in the low-noise regime . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6.6 Proof of main results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
A Probability tools
B Improved sample complexity
C Minimax lower bounds with a fixed design
1
Introduction
39
40
41
Mixtures of linear regressions are classical methods used to model heterogeneous populations (Jor-
dan and Jacobs, 1994; Xu et al., 1994; Viele and Tong, 2002) and have been widely studied in
recent years (see, e.g., Chaganty and Liang (2013); Chen et al. (2017); Balakrishnan et al. (2017);
Li and Liang (2018); Kwon et al. (2019); Chen et al. (2020)). A common approach is to apply a
spectral algorithm to initialize the parameters of interest, and then run a locally convergent non-
convex optimization algorithm; alternatively, one could even run the nonconvex algorithm from a
random initialization. These nonconvex optimization algorithms have been extensively analyzed
under Gaussian assumptions on the covariates (see, e.g. Balakrishnan et al. (2017); Klusowski et al.
(2019); Chen et al. (2019); Kwon and Caramanis (2020)), and it is known that they can exhibit
favorable behavior globally in some settings.
In many tasks such as ranking (Bradley and Terry, 1952), crowd-labeling (Dawid and Skene,
1979) and web search (Chen et al., 2013), however, measurements are taken as pairwise comparisons
between entities, which renders the covariates inherently discrete. These designs or covariates are
far from Gaussian, and it is natural to ask how standard nonconvex optimization algorithms now
perform. Motivated by this question, we study how the celebrated expectation-maximization (EM)
algorithm behaves when estimating a mixture of symmetric linear regressions under the pairwise
comparison design. More specifically, we consider the following model of a symmetric mixture of
two linear regressions with parameter vectors θ∗, −θ∗ ∈ Rd. For r = 1, . . . , N , suppose that we
observe (xr, yr) ∈ Rd × R satisfying
yr = zr x⊤
r θ∗ + εr.
(1)
Here the covariates xr follow the pairwise comparison design, i.e., xr = eir − ejr for ir, jr ∈ [d] :=
{1, . . . , d}, where ei is the ith standard basis vector in Rd; zr ∈ {−1, 1} is a latent sign indicating
whether the observation is from component θ∗ or −θ∗; εr models additive noise, assumed to be
i.i.d. Gaussian for theoretical results. Our goal is to estimate the parameter vector θ∗ ∈ Rd.
The model (1) can also be seen as a special case of the Euclidean distance geometry prob-
lem (Gower, 1982; Liberti et al., 2014) and multidimensional scaling (Borg and Groenen, 2005),
and bears some resemblance to real phase retrieval (see Eldar and Mendelson (2014); Chen et al.
2
(2019) and the references therein). Let y′
Because the sign zr is unobserved, (1) is equivalent to
r = |yr| be the observation and ε′
r = zrεr denote noise.
r = |x⊤
y′
r θ∗ + ε′
r|.
(2)
+ ε′
− θ∗
jr
1, . . . , θ∗
Since xr = eir − ejr , we observe |θ∗
r| which is the distance between two parameters con-
ir
taminated by noise1. Hence our goal is to reconstruct θ∗
d from pairwise distances. This is a
noisy version of the classical Euclidean distance geometry problem, also known as multidimensional
scaling (although the latter is more often used for a class of visualization methods). The above
model is also related to the problem of angular or phase synchronization (Singer, 2011; Zhong
and Boumal, 2018; Gao and Zhang, 2021), where angles θ∗
1, . . . , θ∗
d ∈ [0, 2π) are estimated from
noisy measurements of θ∗
j mod 2π. Moreover, a heterogeneous version of angular synchroniza-
tion (Cucuringu and Tyagi, 2020) aims to reconstruct multiple groups of angles from a mixture of
pairwise differences between angles from unknown groups. For all the aforementioned observation
models, researchers have considered convex, spectral, and nonconvex fitting approaches.
i − θ∗
As mentioned previously, our focus is on the EM algorithm (Dempster et al., 1977)-and we
discuss other estimation procedures briefly in Section 4-which has long been used for estimation
in latent variable models. Asymptotic convergence guarantees for EM to local optima in general
latent variable models are classical (Wu, 1983). For Gaussian covariates xr in (1), nonasymptotic,
local linear convergence of the EM algorithm for symmetric mixtures of linear regressions was
established in Balakrishnan et al. (2017). In the same setting, a form of "global convergence"-
where the EM algorithm is first initialized with a close relative called "Easy-EM" which is in itself
randomly initialized (see the background section to follow)-was established in Kwon et al. (2019).
There is a large literature on EM and other iterative algorithms for mixtures of regressions and
related models; see, e.g., Daskalakis et al. (2017); Xu et al. (2016); Li and Liang (2018); Klusowski
et al. (2019); Wu and Zhou (2021); Dwivedi et al. (2020); Kwon and Caramanis (2020); Kwon et al.
(2021) and references therein. EM has also been analyzed in progressively more complex settings,
most recently in Gaussian latent tree models (Dagan et al., 2022). Our paper should be seen, in
spirit, as extending this line of investigation.
1.1 Contributions and organization
In this paper, we apply the EM algorithm to model (1) and establish its local linear convergence
around the ground truth θ∗, proving that once the algorithm is initialized sufficiently close to the
ground truth θ∗, it converges linearly fast to a fixed point ˆθ. Moreover, we provide optimal bounds
on the l∞ and l2 estimation errors achieved by the EM fixed point in estimating θ∗. Despite the
extensive study of the EM algorithm for mixture models, our results differ from existing works in
several crucial ways.
First, we establish entrywise guarantees on the EM algorithm-our results hold in the stronger
l∞-norm, not just the l2-norm. Second, and in contrast to several results in the Gaussian case for
mixtures of linear regressions (Kwon et al., 2019; Chandrasekher et al., 2021), we do not assume
that each iterate of the EM algorithm takes in a fresh sample, i.e., our convergence guarantee is
not based on sample-splitting2. Third, our result for the l2-norm is sharp in that it also is optimal
1It is more natural to have the noise ε′
2Some results of Balakrishnan et al. (2017) do not assume sample-splitting but are suboptimal in the low-noise
r inside the absolute value because the distance is nonnegative.
regime.
3
in terms of the constant factor, while most previous results for EM only achieve the optimal rate
up to constant factors. Fourth, our simulation results show that EM's convergence from a random
initialization is quite delicate: convergence does not occur in general and this stands in sharp
contrast to the case with Gaussian covariates. On a technical level, our results are enabled by
analyzing the finite-sample EM operator directly, whereas many previous results proceed through
the population update. En route to establishing our results, we analyze the l∞→∞ operator norm
of the psedoinverse of the sample covariance in this problem, a result that may be of independent
interest (see Section 5).
The rest of this paper is organized as follows. In Section 2, we formally introduce our assump-
tions and the EM iteration that we study. In Section 3, we state and discuss the main theorems
proved in this paper. In Section 4, we present a host of experiments showing that the conditions
appearing in our theorem statements are indeed necessary in some respect. These experiments
also confirm that global convergence of EM in this setting is a delicate phenomenon and does not
appear to occur in general. Section 4 also discusses other algorithms and the related literature, and
discusses the (non-)identifiability of mixtures with more than two components. We conclude with
a sketch of the proof techniques in Section 5. Full proofs can be found in Section 6.
1.2 Notation
Let d and N be positive integers such that 3 ≤ d ≤ N throughout the paper. Define [d] := {1, . . . , d}
(cid:1) := {(i, j) : i, j ∈ [d], i < j}. Let 1 denote the all-ones vector in Rd, and let H denote
and (cid:0)[d]
2
the orthogonal complement of 1 in Rd. We use the standard asymptotic notation O(*) and o(*) as
N → ∞; we use Op(*) and op(*) when the asymptotic relation holds between two random variables
with high probability. We also write aN ≪ bN if aN = o(bN ), aN ≫ bN if bN = o(aN ), and aN ≲ bN
if aN = O(bN ). For a matrix A ∈ Rd×d, we denote the trace of A by tr(A).
2 Background and problem formulation
For the results to follow, we consider model (1) with the following assumptions.
Assumption 1. In (1), the covariates are xr = eir − ejr where (ir, jr)N
r=1 are i.i.d. and uniformly
random in (cid:0)[d]
(cid:1) = {(i, j) : i, j ∈ [d], i < j}. The noise terms (εr)N
r=1 are i.i.d. N (0, σ2) and
2
independent from the covariates. Moreover, 1⊤θ∗ = 0, i.e., θ∗ ∈ H where H is the orthogonal
complement of the all-ones vector 1 in Rd.
The assumption on the covariates states that the comparisons are chosen uniformly at random and
with replacement among all pairs of indices. There is no loss of generality in assuming 1⊤θ∗ = 0,
because the model (1) is invariant under any constant shift of θ∗: If θ∗ is replaced by θ∗ + c 1
for a constant c ∈ R, the response yr stays the same. Define the sample covariance matrix of the
covariates to be
ˆΣ :=
d − 1
2N
N
(cid:88)
r=1
xrx⊤
r .
(3)
Note that 1 is in the kernel of ˆΣ and H is an invariant subspace of ˆΣ. Therefore, ˆΣ can be viewed
as a linear map on H. Let ˆΣ† denote the pseudoinverse of ˆΣ; it is the true inverse of ˆΣ if ˆΣ is
4
restricted to H and is invertible. Moreover, the normalization d−1
has entries
2N is chosen so that E[ ˆΣ] ∈ Rd×d
(cid:40)
(E[ ˆΣ])ij =
(d − 1)/d
−1/d
if i = j,
if i ̸= j.
It is not hard to check that E[ ˆΣ] is the identity map on H.
It is convenient to define the so-called "Easy-EM" operator ̄Q : H → H (Kwon et al., 2019) and
write the EM operator ˆQ : H → H in terms of it:
̄Q(θ) :=
N
(cid:88)
tanh
d − 1
2N
r=1
ˆQ(θ) := ˆΣ† ̄Q(θ).
(cid:17)
(cid:16) yr x⊤
r θ
σ2
yrxr,
(4a)
(4b)
See Balakrishnan et al. (2017) for a derivation of the EM operator. Starting from an initialization
θ(0), the EM iteration is then given by
θ(t+1) := ˆQ(θ(t)) =
(cid:18) N
(cid:88)
xrx⊤
r
(cid:19)† N
(cid:88)
r=1
r=1
tanh
r θ(t)
(cid:16) yr x⊤
σ2
(cid:17)
yrxr,
t ≥ 0.
(5)
3 Main results
It is helpful to define the following class of parameter vectors. For a constant β > 0, let
(cid:26)
Θ(β) :=
θ ∈ H : θ1 ≤ * * * ≤ θd, |θi − θj| ≥ β
|i − j|
d
for any (i, j) ∈
(cid:19)(cid:27)
.
(cid:18)[d]
2
(6)
Operationally, the set Θ(β) is a natural family of parameters to consider. First, up to a relabeling
of the coordinates, there is no loss of generality in restricting our attention to parameter vectors
with nondecreasing entries. Second, each parameter vector in Θ(β) has its ith and jth entries
separated by at least β |i−j|
d . This separation condition is imposed to simplify the statement of our
main results. It also appeared in, e.g., Chen et al. (2022), where the pairwise comparison design was
studied. Our full results in Section 6 are more general, assuming a condition weaker than that in
(6) (see (36b) in particular). In short, for every i ∈ [d], we require the set {j ∈ [d] : |θi − θj| ≤ c1β}
to contain at most c2 d elements for some constants c1, c2 > 0; in other words, θi should not have
too many "neighbors" θj. This weaker condition is satisfied with high probability if θ∗
i are i.i.d.
uniform random variables in [−1, 1], for example.
With this setup in hand, we are now ready to state our main results. Our first result shows that
the EM sequence {θ(t)}t≥0 converges linearly to a limit ˆθ around the ground truth θ∗, and provides
an estimation error guarantee in the l∞-norm with high probability.
Theorem 1. Consider the model in (1) satisfying Assumption 1. For any fixed constants ρ, D > 0,
there exist constants N0, c1, C2 > 0 depending only on ρ and D such that the following holds. For
β > 0, suppose θ∗ ∈ Θ(β) as defined in (6). Suppose N ≥ max{d1+ρ, N0} and σ ≤ c1β. Fix
θ(0) ∈ H such that ∥θ(0) − θ∗∥∞ ≤ c1β. Let {θ(t)}t≥0 be the EM iterates defined in (5). Moreover,
let
τ := C2σ
log N ,
T := max
0,
log4/3
(cid:26)
(cid:24)
(cid:18) ∥θ(0) − θ∗∥∞
4τ
(cid:19)(cid:25)(cid:27)
.
(cid:114)
d
N
Then it holds with probability at least 1 − N −D that
5
• there exists ˆθ ∈ H such that ˆQ(ˆθ) = ˆθ and ∥ˆθ − θ∗∥∞ ≤ 4τ ;
• the sequence {θ(t)}t≥0 converges to ˆθ;
• ∥θ(T +t) − ˆθ ∥∞ ≤ 8τ /2t for all t ≥ 0.
Theorem 1 is proved in Section 6.6 and is a result of Proposition 3. We begin with a discussion of
the conditions in the theorem. First, the setting is nearly high-dimensional because we only require
N ≥ d1+ρ for an arbitrarily small ρ > 0. We remark that it is possible to improve this condition to
N ≥ d * polylog(d) by a more careful application of Proposition 3 at the cost of complicating the
conditions on the other parameters (see Section B for details). Focusing on the setting where β is a
constant for clarity, we have |θ∗
i = O(1) for all i, j ∈ [d]. The constant-sized
noise condition σ ≤ c1β is mild, because it should be compared against the minimum signal strength
|θ∗
i+1| ≍ 1/d (see Eq. (6)). Next, the initialization θ(0) has to be close to the true parameter
vector θ∗ so that ∥θ(0) − θ∗∥∞ ≤ c1β. This is the sense in which the convergence guarantee is local,
and we conjecture that some such condition is necessary (see Section 4 for experimental verification
of this conjecture).
j | ≍ |i − j|/d, and θ∗
i − θ∗
i − θ∗
(cid:113) d
With these conditions assumed, we now explain the conclusions of Theorem 1. It is useful to
N log N is the optimal rate3 we expect to have when estimating each entry θ∗
i
It is easiest to interpret
note that τ ≍ σ
of a d-dimensional vector from N samples with probability 1 − N −D.
Theorem 1 as a two-stage result for the EM iteration:
• First, the quantity T indicates that it takes at most a logarithmic number of steps for the
EM iteration to get from distance ∥θ(0) − θ∗∥∞ to an O(τ )-neighborhood around the ground
truth θ∗. By the bounds ∥ˆθ − θ∗∥∞ ≤ 4τ and ∥θ(T ) − ˆθ∥∞ ≤ 8τ (by taking t = 0 in the last
statement), we have ∥θ(T ) − θ∗∥∞ = O(τ ). Hence, θ(T ) already achieves the optimal rate of
estimation in the l∞-norm.
• Second, beyond time T , the EM sequence {θ(t)}t≥0 eventually converges to a limit ˆθ, and
In other words, the EM operator is locally contractive.
the rate of convergence is linear.
Moreover, the limit ˆθ lies in the 4τ -neighborhood of θ∗ in the l∞-norm.
Finally, we once again remark that the theorem does not require any resampling for the EM
iteration. The conclusions of the theorem hold simultaneously on a high-probability event.
Our second theorem shows that the limit ˆθ of the EM sequence achieves the sharp estimation
error in the l2-norm with high probability in the low-noise regime, in that the constant is also
sharp.
Theorem 2. In the setting of Theorem 1 (which in particular assumes N ≥ d1+ρ for fixed ρ > 0),
we additionally assume σ ≪ β
(log N )2 and d ≫ log N . Then it holds with probability at least 1 − N −D
that
∥ˆθ − θ∗∥2
2 ≤ (1 + op(1)) σ2 d − 1
2N
tr( ˆΣ†).
The proof of Theorem 2 is deferred to Section 6.6. Compared to the noise condition σ ≤ c1β
in Theorem 1, here we need σ to be smaller by a polylogarithmic factor, and an additional, mild
3In fact, this is the optimal rate even if we consider linear regression without a mixture, i.e., where all the signs
zr are known a priori.
6
condition on the dimension. While we assume a random design of xr and thus the right-hand side
of the above equation is random, the result can be understood as follows. Conditional on a typical
r=1, the squared error ∥ˆθ − θ∗∥2
realization of the covariates (xr)N
2 is within a (1 + o(1)) factor of
σ2 d − 1
2N
tr( ˆΣ†) = σ2 tr
(cid:18)(cid:16) N
(cid:88)
(cid:17)†(cid:19)
xrx⊤
r
r=1
(7)
with high probability over the randomness of the noise (εr)N
r=1. Note that (7) is the optimal rate
even for vanilla linear regression with a fixed design (see Section C for more discussion). As a result,
we obtain the optimal l2 error (including the sharp constant) for the EM algorithm provided that
the initialization is sufficiently informative and the noise level is sufficiently small.
4 Experiments and discussion
In this section, we further discuss our model and results, related methods, and possible extensions.
Our discussion is accompanied by numerical experiments.
4.1 Failure of random initialization
Theorem 1 requires that the initialization of the EM algorithm satisfies ∥θ(0) − θ∗∥∞ ≤ cβ for a
constant c > 0. We believe that this is not an artifact of the analysis and that some such condition
is necessary. To test this hypothesis, let us numerically test if a "random" initialization suffices for
the convergence of EM.
i = i
d − d+1
For simplicity, we take θ∗
d . Then θ∗ ∈ Θ(β) with
2d for i ∈ [d] so that |θ∗
β = 1. Let θ ∈ Rd be a random vector whose entries are i.i.d. uniform in [−0.5, 0.5]; then define
θR = θ−a1 where the scalar a ∈ R is chosen so that 1⊤θR = 0. The vector θR is a canonical random
initialization, because the entries of both θR and θ∗ are approximately in the range [−0.5, 0.5], yet
θR is random. For η ∈ [0, 1], define θ(0) = θ(0)(η) = (1 − η)θ∗ + η θR, which interpolates between the
ground truth θ∗ and the random vector θR. We use θ(0) as the initialization of the EM algorithm
and study its performance. Note that
i − θ∗
j | = |i−j|
∥θ(0) − θ∗∥∞ = η ∥θR − θ∗∥∞
which is approximately η. Our theory predicts that the EM algorithm performs well when η is
a small constant. On the other hand, if a random initialization is not sufficient, then the EM
algorithm will have poor performance when η is close to 1. We indeed observe this phenomenon in
the left plot of Figure 1.
To be more precise, we set d = 50, N = 1000, and σ = 0.1. For η ∈ {0.1, 0.2, . . . , 1}, we start
from θ(0) = θ(0)(η) and run the EM algorithm for T = 100 steps4. We plot the initial squared error
2 (solid blue line)5, averaged
∥θ(0) −θ∗∥2
over 100 independent repetitions for each value of η. The error ∥θ(T ) − θ∗∥2
2 for each repetition is
2 (dashed red line) and the eventual squared error ∥θ(T ) −θ∗∥2
4The EM algorithm typically converges within a few steps, especially when the initialization is close to the ground
truth, but we make the conservative choice T = 100 to ensure convergence.
5Since the model (1) is invariant if θ∗ is replaced by −θ∗, convergence to a neighborhood of −θ∗ should also be
2} in all our experiments.
considered as a success. Hence, we actually compute the error min{∥θ(T ) − θ∗∥2
For brevity, we do no mention this elsewhere.
2, ∥θ(T ) + θ∗∥2
7
Figure 1. Left: Pairwise-comparison design. Right: Gaussian design. We plot the initial squared
error ∥θ(0) − θ∗∥2
2 (dashed red line) and the eventual squared error ∥θ(T ) − θ∗∥2
2 (solid blue line) of
the EM algorithm against a varying randomness parameter η in the initialization. The experiment
for each value of η is averaged over 100 repetitions, and the error ∥θ(T ) − θ∗∥2
2 for each repetition is
indicated by a yellow cross.
indicated by a yellow cross. As shown by the left plot of Figure 1, an initialization with η ≤ 0.5
leads to an extremely small error ∥θ(T ) − θ∗∥2
2 with high probability, while for an initialization with
a larger η, the EM algorithm fails to achieve a small error with constant probability.
d I), where the normalization 2
The failure of random initialization in the setting of the pairwise comparison design stands in
sharp contrast to its behavior for Gaussian designs, as confirmed by the right plot of Figure 1. The
setup and parameters of this experiment are exactly the same as before, except that we now take
i.i.d. covariates xr ∼ N (0, 2
d is chosen to match the scaling of xr in
Assumption 1. As we see in the figure, the EM algorithm achieves a small error ∥θ(T ) − θ∗∥2
2 with
high probability6 even if η is close to 1. We remark that there is a sizable literature on the success
of iterative algorithms with random initialization for a variety of problems, such as phase retrieval
(Chen et al., 2019), Gaussian mixtures (Dwivedi et al., 2020; Wu and Zhou, 2021), mixtures of log-
concave distributions (Qian et al., 2019), and general regression models with Gaussian covariates
(Chandrasekher et al., 2021). However, Gaussianity or continuous density is typically part of
the assumption, and analyzing iterative algorithms beyond the Gaussian setting appears to be a
generally more challenging problem. See also Dudeja et al. (2022); Wang et al. (2022) for recent
work in this direction in the framework of approximate message passing.
An interesting open problem is to offer an explanation for the contrasting behavior of the
randomly initialized EM algorithm given the two types of covariates. We speculate that random
initialization tends to fail if the covariates are discrete and sparse. Note that our covariates xr
are supported in the highly structured set {ei − ej : (i, j) ∈ (cid:0)[d]
(cid:1)}, unlike the Gaussian covariates
which are in general positions in Rd. However, we do not have a theoretical explanation for this
phenomenon and leave the question to future work.
2
6The occasional failures of random initialization with η = 1 can be explained by a few factors, such as our moderate
choices of d and N , the nontrivial error probability, etc.
8
0.20.40.60.81024680.20.40.60.81024684.2 Spectral method, initialization, and comparison
Spectral methods form another popular class of algorithms for tackling mixture models and the
Euclidean distance geometry problem. One canonical spectral method for localizing points given
their pairwise distances is the classical multidimensional scaling (Borg and Groenen, 2005). It takes
the following form for model (1). Define a matrix D ∈ Rd×d that stores noisy pairwise distances by
Dij = Dji =
d(d − 1)
2N
N
(cid:88)
(y2
r − σ2) 1{xr = ei − ej}.
r=1
Since E[y2
that
r − σ2 | xr = ei − ej] = E[(θ∗
i − θ∗
j )2 + 2εrzr(θ∗
i − θ∗
j ) + ε2
r − σ2 | xr] = (θ∗
i − θ∗
j )2, we see
E[Dij] = (θ∗
i − θ∗
j )2.
In other words, E[D] stores the pairwise distances between the entries of θ∗. Let J = I − 1
d 11⊤
where I is the identity matrix in Rd×d and 1 is the all-ones vector in Rd. Using that E[D] is the
pairwise distance matrix, it is not hard to verify that
−
1
2
J E[D]J = θ∗(θ∗)⊤,
which is the Gram matrix of θ∗. Therefore, if (λ1, v1) is the leading eigenpair of the matrix − 1
then we can use ̃θ =
λ1 v1 as an estimator of θ∗.
√
2 JDJ,
Using standard spectral perturbation theory and random matrix theory, it is straightforward
to analyze the error ̃θ − θ∗ in either the l2 or l∞ norm (see, e.g., Chen et al. (2021)). We do not
provide a theoretical analysis of ̃θ in this work, but let us discuss it qualitatively. There are two
sources of error in the spectral estimator ̃θ: the noise εr, which is inevitable, and the incompleteness
(cid:1), if we never have xr = ei − ej for a pair of indices (i, j), then
of observations. In the regime N < (cid:0)d
2
j )2. As a result, the spectral estimator ̃θ does not recover θ∗ even
Dij = 0 while E[Dij] = (θ∗
if σ → 0. On the other hand, the limit of the EM algorithm ˆθ recovers θ∗ as shown by Theorem 2
in this regime. Nevertheless, this does not mean that the spectral estimator is useless, because it
can be used as an initialization of the EM algorithm. The experiment exhibited in the left plot of
Figure 2 confirms these observations.
i − θ∗
In the left plot of Figure 2, we set d = 50, N = 1000, and let the noise variance σ2 vary from
0.002 to 2. Let us first focus on the performance of estimators in the small-noise regime. When
σ → 0, the squared error ∥ ̃θ − θ∗∥2
2 of the spectral method (dash-dotted red line) does not converge
to zero. However, we can set θ(0) = ̃θ and run the EM algorithm from this initialization for T = 20
steps. The squared error ∥θ(T ) − θ∗∥2
2 (solid blue line) goes to zero as σ → 0. Recall that Theorem 2
predicts a sharp optimal rate (7) for the EM algorithm in the small-noise regime. We also plot this
optimal error (dashed yellow line) and observe that it is very close to the actual error ∥θ(T ) − θ∗∥2
2
as σ → 0. In addition, we consider the Easy-EM iteration with θ(t+1) = ̄Q(θ(t)) where ̄Q is defined
in (4a). Compared to the EM iteration, Easy-EM does not have the multiplication by ˆΣ† at each
step, which turns out to be crucial: We observe that the Easy-EM algorithm (dotted green line)
fails to achieve a small error as σ → 0.
Next, we consider the regime of large noise in the left plot of Figure 2. The error of the EM
algorithm no longer follows the sharp rate predicted by Theorem 2, which suggests that some
condition on the noise may be necessary for this theorem (although the condition σ ≪ β
(log N )2 we
9
Figure 2. Left: Varying noise standard deviation. Right: Varying sample size. The log-log plots
show the performance of different algorithms against the varying parameters. The squared error
∥ ̃θ − θ∗∥2
2 for the spectral estimator is shown in dash-dotted red lines. The EM and Easy-EM
algorithms are initialized with θ(0) = ̃θ and run for T = 20 steps. Their eventual squared errors
∥θ(T ) − θ∗∥2
2 are shown in solid blue lines and dotted green lines respectively. The experiment for
each value of σ2 or N is averaged over 100 independent repetitions. The theoretically predicted
optimal rate is shown in dashed yellow lines.
impose may not be optimal). Nevertheless, the EM and Easy-EM algorithms still improve upon
the spectral initialization, and all the three algorithms appear to differ only by a constant factor
from the optimal rate as σ2 grows.
To further investigate the rate of estimation achieved by these algorithms, we consider another
experiment shown in the right plot of Figure 2. We take d = 50, σ = 0.1, and let the sample size
N vary from 500 to 2000. We again run the EM and the Easy-EM algorithm from the spectral
initialization θ(0) = ̃θ for T = 20 steps, and plot the squared errors. Given that the noise is small,
the optimal rate from Theorem 2 accurately predicts the actual error of the EM algorithm. The
spectral estimator and the Easy-EM algorithm clearly have worse performance, but their rates of
estimation appear to be optimal as N grows.
4.3 Extensions of the model
There are several directions for extending our model. For example, one may consider a mixture of
k linear regressions
yr = x⊤
r θ[lr] + εr,
where we have θ[1], . . . , θ[k] ∈ Rd and (lr)N
satisfying wl ≥ 0 and (cid:80)k
the identifiability of the mixture model is a nontrivial open problem.
l=1 wlδl with weights
l=1 wl = 1. When the covariates xr are from a discrete distribution, even
r=1 are i.i.d. from the distribution (cid:80)k
To see the difficulty of the problem, let us consider a negative example. Suppose that we have
a mixture of k = 3 equally weighted linear regressions, and the covariates are pairwise comparisons
10
10-210-110010-210050010001500200010-210-1100xr = eir − ejr for ir, jr ∈ [d]. For simplicity, suppose that the noise εr is zero. Let
θ[1] =
,
θ[2] =
1
2
θ3
...
θd
3
3
θ3
...
θd
,
θ[3] =
2
4
θ3
...
θd
,
̃θ[1] =
,
̃θ[2] =
2
2
θ3
...
θd
1
3
θ3
...
θd
,
̃θ[3] =
,
3
4
θ3
...
θd
where the unspecified entries θ3, . . . , θd can take any values. It is not hard to see that, even if we
observe the sets
(cid:110)
i − θ[l]
θ[l]
j
: l = 1, 2, 3
for all (i, j) ∈
(cid:111)
(cid:19)
(cid:18)[d]
2
with no noise, the two mixtures {θ[l] : l = 1, 2, 3} and { ̃θ[l] : l = 1, 2, 3} yield the same sets of
observations. As a consequence, the mixture model with 3 components is not identifiable with the
pairwise comparison design.
Therefore, to have an identifiable mixture model with multiple components, it is necessary
to assume a richer design of covariates xr.
Instead of pairwise comparisons, one may consider
comparisons between multiple objects as in the Plackett–Luce model (Luce, 1959; Plackett, 1975)
or groups of pairwise comparisons used for mixtures of permutations (Mao and Wu, 2022). We
leave this interesting topic to future research.
Beyond a mixture of linear regressions with additive noise, one may consider a mixture of
generalized linear regressions (see, e.g., Heumann et al. (2008); Sun et al. (2014); Sedghi et al.
(2016)), and in particular, the case of binary response is of practical interest in classification tasks.
Similar to the linear setting, existing theories for mixtures of generalized linear models are often
based on a Gaussian or continuous design.
In the discrete setting, there have been a series of
recent works on mixtures of the Placket–Luce or multinomial logit models motivated by ranking
tasks (see, e.g., Zhao et al. (2016); Mollica and Tardella (2017); Chierichetti et al. (2018); Liu et al.
(2019); Zhao et al. (2022)). In particular, Zhang et al. (2022) show that a mixture of two Bradley–
Terry–Luce models (i.e., logistic regressions with the pairwise comparison design) are identifiable
except when the parameters are in a set of measure zero. Very recently, Nguyen and Zhang (2023)
provide a spectral initialization and an accurate implementation of the EM algorithm for learning
a mixture of Plackett–Luce models. It would be interesting to analyze the convergence of iterative
algorithms such as the EM algorithm for these models.
Along another direction, one may extend the model (2) to the noisy Euclidean distance geometry
d ∈ Rm based on
problem in dimension m > 1. Namely, we aim to estimate vectors θ∗
incomplete, noisy observations of pairwise distances ∥θ∗
j ∥2. While this problem and its variants
have long been studied (see the survey by Liberti et al. (2014)), progress in understanding the sample
complexity has been made only in recent years using tools of matrix completion (Lai and Li, 2017;
Tasissa and Lai, 2018), and the theory is even less complete in the noisy setting (Drusvyatskiy
et al., 2017; Sremac et al., 2019). Compared to semidefinite programs used in many of these works,
iterative algorithms are faster to run, but remain to be understood for this problem.
1, . . . , θ∗
i − θ∗
5 Proof techniques
We now informally discuss the strategies and key ingredients in the proofs of our main results; full
proofs are provided in Section 6.
11
5.1 Contraction in the l∞ norm
The first main result of this work is the linear convergence of the EM iteration in the l∞-norm
in Theorem 1. To shed light on this result, let us first consider the zero-noise limit of the EM
algorithm for simplicity. Suppose that the noise εr is zero in (1). Letting σ → 0 in (5), we see that
the EM iteration becomes
θ(t+1) =
(cid:18) N
(cid:88)
xrx⊤
r
(cid:19)† N
(cid:88)
r=1
r=1
sign(yr x⊤
r θ(t)) yrxr
(8)
for t ≥ 0, where sign(a) = 1 if a > 0, sign(a) = 0 if a = 0, and sign(a) = −1 if a < 0. In fact, this
is equivalent to the alternating minimization procedure where we iteratively compute
• z(t)
r
:= minz∈{−1,1}(yr − z x⊤
r θ(t))2 = sign(yr x⊤
r θ(t)) for r ∈ [N ];
• θ(t+1) := minθ∈H
(cid:80)N
r=1(yr − z(t)
r x⊤
r θ)2 =
(cid:16)(cid:80)N
r=1 xrx⊤
r
(cid:17)† (cid:80)N
r=1 z(t)
r yrxr.
We now explain why the iteration (8) contracts to θ∗ locally. By slightly abusing the notation,
we denote (only in this subsection) the noiseless Easy-EM and EM operators respectively by
̄Q(θ) =
d − 1
2N
N
(cid:88)
r=1
sign(yr x⊤
r θ) yrxr,
ˆQ(θ) = ˆΣ† ̄Q(θ),
where the sample covariance ˆΣ is defined in (3). We first note that θ∗ is a fixed point of the operator
ˆQ. Indeed, since yr = zrx⊤
r θ∗, we have
ˆQ(θ∗) =
(cid:18) N
(cid:88)
xrx⊤
r
(cid:19)† N
(cid:88)
r=1
r=1
sign
(cid:16)
zr(x⊤
r θ∗)2(cid:17)
zr(x⊤
r θ∗)xr =
(cid:18) N
(cid:88)
xrx⊤
r
(cid:19)† N
(cid:88)
r=1
r=1
xrx⊤
r θ∗ = θ∗.
Next, fix θ ∈ H in an l∞ neighborhood of θ∗. We have ˆQ(θ) − θ∗ = ˆΣ† (cid:0) ̄Q(θ) − ̄Q(θ∗)(cid:1), so
∥ ˆQ(θ) − θ∗∥∞ ≤ ∥ ˆΣ†∥∞
(cid:13) ̄Q(θ) − ̄Q(θ∗)(cid:13)
(cid:13)
(cid:13)∞ ,
(9)
It remains to show, for example, that for a quantity
where ∥ ˆΣ†∥∞ := maxv∈H:∥v∥∞=1 ∥ ˆΣ†v∥∞.
L > 0, we have
∥ ˆΣ†∥∞ ≤ L,
so that we have the desired contraction ∥ ˆQ(θ) − θ∗∥∞ ≤ 1
In fact, bounding ∥ ˆΣ†∥∞ is one of the most important and technical steps of our proof. We
discuss this step in more detail in Section 5.3 below and establish a bound formally in Proposition 2.
For the remaining portion of the proof, we must bound (cid:13)
(cid:13) ̄Q(θ) − ̄Q(θ∗)(cid:13)
(cid:13)∞. Note that
̄Q(θ) − ̄Q(θ∗) =
d − 1
2N
N
(cid:88)
(cid:104)
r=1
sign (cid:0)yrx⊤
r θ(cid:1) − sign (cid:0)yrx⊤
r θ∗(cid:1)(cid:105)
yrxr.
(10)
If θ is in an l∞ neighborhood of θ∗, i.e., θ is close to θ∗ entrywise, then x⊤
r θ(cid:1) will coincide with sign (cid:0)yrx⊤
to x⊤
. As a result, sign (cid:0)yrx⊤
r θ∗ = θ∗
ir
− θ∗
jr
r θ = θir − θjr is close
r θ∗(cid:1) for most r ∈ [N ],
12
(cid:13) ̄Q(θ) − ̄Q(θ∗)(cid:13)
(cid:13)
,
(cid:13)∞ ≤
1
2L
2 ∥θ − θ∗∥∞.
and a majority of terms in the above sum will vanish. Based on this intuition, we can perform an
entrywise analysis of ̄Q(θ) − ̄Q(θ∗) and obtain a bound on ∥ ̄Q(θ) − ̄Q(θ∗)∥∞. We omit the details.
In the noisy setting, the strategy for analyzing the EM iteration (5) is similar to the above
noiseless analysis. However, there are complications due to the presence of noise. First, the fixed
point of the EM operator ˆQ is the random vector ˆθ, not the deterministic vector θ∗. Therefore, we
cannot directly show Q(ˆθ) = ˆθ; rather, it follows as a consequence of ˆQ being a contraction locally
around θ∗. Second, to prove that ˆQ is contractive, we again reduce it to analyzing the Easy-EM
operator ̄Q via (9), but now for θ, θ′ ∈ H,
̄Q(θ) − ̄Q(θ′) =
d − 1
2N
N
(cid:88)
(cid:20)
r=1
tanh
(cid:17)
(cid:16) yr x⊤
r θ
σ2
− tanh
(cid:17)(cid:21)
(cid:16) yr x⊤
r θ′
σ2
yrxr.
As the function tanh(*) is a soft approximation of the sign(*) function in (10), the intuition for why
we can control ̄Q(θ) − ̄Q(θ′) remains the same, but a more quantitative analysis is necessary. See
Section 6.4 for details.
5.2 Expansion around the ground truth
Our second main result is the sharp l2 bound for the EM fixed point ˆθ in Theorem 2. The
strategy for proving this result consists in an expansion of ˆθ around the ground truth θ∗. Recall
the definitions of ̄Q and ˆQ in (4). Since ˆθ is a fixed point of ˆQ, we have
ˆθ − θ∗ = ˆQ(ˆθ) − ˆQ(θ∗) + ˆQ(θ∗) − θ∗
= ˆΣ† d − 1
2N
N
(cid:88)
(cid:18)
r=1
tanh
ˆθ
(cid:17)
(cid:16) yrx⊤
r
σ2
− tanh
(cid:16) yrx⊤
r θ∗
σ2
(cid:17)(cid:19)
yrxr + ˆQ(θ∗) − θ∗.
Applying Taylor's expansion of the function tanh(*), we obtain
ˆθ − θ∗ ≈ ˆΣ†A(ˆθ − θ∗) + ˆQ(θ∗) − θ∗,
σ2 tanh′ (cid:16) yrx⊤
where A := d−1
2N
∥ ˆΣ†A(ˆθ − θ∗)∥2 ≪ ∥ˆθ − θ∗∥2 and so
(cid:80)N
r=1
y2
r
r θ∗
σ2
(cid:17)
xrx⊤
r . By analyzing the matrix A, we then show that
∥ˆθ − θ∗∥2 ≈ ∥ ˆQ(θ∗) − θ∗∥2.
It remains to study how far the one-step EM iterate ˆQ(θ∗) moves away from the ground truth θ∗.
Since ˆQ(θ∗) is an independent sum conditional on the covariates x1, . . . , xN , and θ∗ is deterministic,
we can apply tools from matrix concentration to obtain the desired sharp bound
∥ ˆQ(θ∗) − θ∗∥2
2 ≤ (1 + o(1)) σ2 d − 1
2N
tr( ˆΣ†).
5.3 Infinity operator norm of the inverse covariance
As discussed in Section 5.1 above, a key ingredient in our analysis of the EM iteration is an upper
bound on ∥ ˆΣ†∥∞ := maxv∈H:∥v∥∞=1 ∥ ˆΣ†v∥∞. Recall that E[ ˆΣ] is the identity map on H by the
13
discussion after the definition of ˆΣ in (3). Hence, it is plausible that ˆΣ and ˆΣ† have bounded norms.
To prove ∥ ˆΣ†∥∞ ≤ L for a quantity L > 0, we start with the relation (see Lemma 3)
∥ ˆΣ†∥∞ =
(cid:16)
min
u∈H:∥u∥∞=1
∥ ˆΣu∥∞
(cid:17)−1
.
It therefore suffices to prove
min
u∈H:∥u∥∞=1
∥ ˆΣu∥∞ ≥ 1/L.
(11)
The proof of (11) is the most technical step in our analysis and spans Lemmas 4, 5, 6, 7, and
Proposition 2. In short, it is not sufficient to control ∥ ˆΣu∥∞ for each fixed u and then apply a
union bound. Instead, we carefully split the constraint set {u ∈ H : ∥u∥∞ = 1} into a union of
subsets according to the sizes of entries u1, . . . , ud. On each subset consisting of vectors u, we use
the specific properties of sizes of entries u1, . . . , ud to bound ∥ ˆΣu∥∞ simultaneously for all u in that
subset. Finally, we combine all the subsets using a union bound. See Section 6.2 for details.
While (11) arises as a technical ingredient in our work, we believe the analysis of the quantity
minu∈H:∥u∥∞=1 ∥ ˆΣu∥∞ is interesting in its own right in view of its connection to the literature.
First, consider the graph G with vertex set [d] and edge set {(ir, jr) : xr = eir − ejr , r ∈ [N ]}. Then
(cid:1)(cid:1) except that the edges are sampled with
the graph G resembles an Erd ̋os–R ́enyi graph G(cid:0)d, N/(cid:0)d
2
replacement. Moreover, it is not hard to see that ˆΣ is a rescaled version of the Laplacian matrix of
the graph G, which is a well-researched object. In fact, if the l∞-norms in (11) were replaced by
the l2-norms, then the quantity minu∈H:∥u∥2=1 ∥ ˆΣu∥2 would be the second-smallest eigenvalue of
the Laplacian matrix, known as the algebraic connectivity or the Fiedler value. This eigenvalue for
an Erd ̋os–R ́enyi graph has long been studied; see, e.g., Feige and Ofek (2005); Coja-Oghlan (2007);
Chung and Radcliffe (2011); Kolokolnikov et al. (2014). However, we are not aware of an existing
bound for the l∞-norm that would imply (11).
Moreover, if the minimization problem in (11) were over u ∈ {−1, 1}d, then it would be related
to the vast literature on discrepancy theory: minu∈{−1,1}d ∥ ˆΣu∥∞ is the combinatorial discrepancy
of the matrix ˆΣ. We refer the interested reader to the celebrated work by Spencer (1985) which
has generated extensive research on this topic, and see, e.g., Perkins and Xu (2021); Abbe et al.
(2022); Altschuler (2022) for recent breakthroughs. The relaxation that we study is thus a natural
object.
5.4 Proof organization
Finally, we overview how the proofs are organized in Section 6. Recall that our results do not require
a fresh sample for each step of the EM iteration. To achieve this, we first condition on a high-
probability event globally, and then show that the EM operator is contractive deterministically on
this event. More precisely, this high-probability event consists of two sets of conditions: Section 6.1
proves that certain preliminary conditions hold for the observations (xr, yr)N
r=1 with high probability
(Lemma 1); Section 6.2 mainly establishes a high probability bound on ∥ ˆΣ†∥∞ (Proposition 2)
together with a few other conditions on ˆΣ. With these conditions assumed, Lemma 12 in Section 6.4
shows that the EM operator is contractive locally around θ∗, and note that this lemma is completely
deterministic. Finally, using an additional bound on ∥ ˆQ(θ∗) − θ∗∥∞ in Section 6.3, Proposition 3
in Section 6.4 summarizes the convergence of the EM sequence and directly leads to Theorem 1.
14
For Theorem 2, we first need a sharp analysis of ∥ ˆQ(θ∗)−θ∗∥2 in Section 6.3: its expectation and
concentration are controlled by Lemmas 10 and 11 respectively. Then, in Section 6.5, we analyze
the lower order terms and conclude with Proposition 4, which immediately implies Theorem 2.
6 Analysis of the EM algorithm
Throughout the proof section, we use C, C1, C′, etc., to denote universal, positive constants that
may change from line to line. Recall the definitions of ̄Q and ˆQ in (4) and that yr = zr x⊤
r θ∗ + εr
where zr = ±1. Since tanh(*) is an odd function, we may assume without loss of generality that
zr = 1 for all r = 1, . . . , N , which does not change the EM operator. Therefore, we take the liberty
r θ∗ + εr when analyzing the EM operator.
of assuming that the observations take the form yr = x⊤
6.1 Preliminaries
For i ∈ [d], define Ri to be the set of indices r ∈ [N ] for which the entry (xr)i is non-zero, i.e.,
Ri := (cid:8)r ∈ [N ] : xr = ±(ei − ej), j ∈ [d] \ {i}(cid:9),
(12)
where ± is + if i < j and is − if i > j. In addition, for a fixed separation parameter ∆ > 0, define
Si(∆) := {j ∈ [d] \ {i} : |θ∗
Ri(∆) := {r ∈ [N ] : xr = ±(ei − ej), j ∈ Si(∆)}.
j | ≤ ∆}
i − θ∗
and
(13a)
(13b)
In other words, Si(∆) is the set of indices j such that θ∗
consisting of indices r ∈ [N ] for which xr compares θ∗
j is close to θ∗
i , and Ri(∆) is a subset of Ri
i to a nearby parameter θ∗
j .
Lemma 1. There is an absolute constant C > 0 such that the following holds for any δ ∈ (0, 0.1).
Suppose that N ≥ Cd log d
δ . It holds with probability at least 1 − δ that, for all i ∈ [d] and all ∆ ≥ σ:
• 1.9N
d ≤ |Ri| ≤ 2.1N
d ;
r∈Ri(∆) |yr| ≤ C∆ (cid:0)|Si(∆)| N
r ≤ C∆2 (cid:0)|Si(∆)| N
r∈Ri(∆) y2
• (cid:80)
• (cid:80)
d2 + log d
δ
d2 + log d
δ
(cid:1);
(cid:1).
Proof. For a fixed i ∈ [d], each xr is equal to ±(ei − ej) for some j ∈ [d] \ {i} with probability
(d − 1)/(cid:0)d
(cid:1) = 2/d. Hence |Ri| ∼ Bin (N, 2/d). It then follows from a binomial tail bound for any
2
δ ∈ (0, 0.1) that
(cid:12)
(cid:12)
|Ri| −
(cid:12)
(cid:12)
2N
d
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:114)
≤ C1
N
d
log
d
δ
+ C1 log
d
δ
with probability at least 1 − δ
and using the condition N ≥ Cd log d
Similarly, |Ri(∆)| ∼ Bin (cid:0)N, 2|Si(∆)|
d(d−1)
(cid:1) and
d for an absolute constant C1 > 0. Taking a union bound over i ∈ [d]
δ , we obtain the desired bound on |Ri|.
|Ri(∆)| ≤
2N |Si(∆)|
d(d − 1)
+ C2
(cid:115)
N |Si(∆)|
d(d − 1)
log
d
δ
+ C2 log
d
δ
≤
3N |Si(∆)|
d(d − 1)
+ C3 log
d
δ
15
with probability at least 1 − δ
d2 for absolute constants C2, C3 > 0.
Condition on Ri(∆) henceforth. For r ∈ Ri(∆), we have |yr| = |x⊤
r ≤ 2∆2 + 2ε2
y2
r. Consequently, by a sub-Gaussian tail bound on (cid:80)
r θ∗ + εr| ≤ ∆ + |εr| and so
r∈Ri(∆) |εr|, we obtain
(cid:88)
r∈Ri(∆)
|yr| ≤ ∆ |Ri(∆)| +
(cid:88)
r∈Ri(∆)
|εr| ≤ ∆ |Ri(∆)| +
(cid:114)
σ |Ri(∆)| + C4σ
|Ri(∆)| log
(cid:114) 2
π
d
δ
with probability at least 1 − δ
(cid:80)
r∈Ri(∆) ε2
r, we obtain
d2 for an absolute constant C4 > 0. Moreover, by a χ2 tail bound on
(cid:88)
r∈Ri(∆)
r ≤ 2∆2 |Ri(∆)|+2
y2
(cid:88)
r∈Ri(∆)
r ≤ 2∆2 |Ri(∆)|+2σ2 |Ri(∆)|+C5σ2(cid:16)(cid:114)
ε2
|Ri(∆)| log
d
δ
+log
(cid:17)
d
δ
with probability at least 1 − δ
d2 for an absolute constant C5 > 0.
Combining the above three bounds and using the condition ∆ ≥ σ, we obtain
(cid:88)
|yr| ≤ 2∆
r∈Ri(∆)
(cid:16) 3N |Si(∆)|
d(d − 1)
+ C3 log
(cid:17)
d
δ
+ C4σ
(cid:115)
(cid:16) 3N |Si(∆)|
d(d − 1)
+ C3 log
(cid:17)
d
δ
log
d
δ
≤
7N ∆|Si(∆)|
d(d − 1)
+ C6∆ log
d
δ
for an absolute constant C6 > 0 and
(cid:88)
r∈Ri(∆)
r ≤ 4∆2 (cid:16) 3N |Si(∆)|
y2
d(d − 1)
+ C3 log
(cid:17)
d
δ
+ C5σ2
(cid:18)(cid:115)
(cid:16) 3N |Si(∆)|
d(d − 1)
+ C3 log
(cid:17)
d
δ
log
d
δ
+ log
(cid:19)
d
δ
≤
13N ∆2|Si(∆)|
d(d − 1)
+ C7∆2 log
d
δ
for an absolute constant C7 > 0.
Finally, note that the sets Si(∆) are nested as ∆ varies, and Si(∆) can take at most d−1 values;
hence, the same statements are true for Ri(∆). We can then take a union bound over all (≤ d − 1)
possibilities for Ri(∆) as ∆ varies, together with a union bound over i ∈ [d] to conclude.
6.2 Sample covariance
In this section, we study the sample covariance matrix (3). Recall that H denotes the orthogonal
complement of 1 in Rd, and the pseudoinverse ˆΣ† is the inverse of ˆΣ when viewed as a map on H.
We first bound the spectral norms of ˆΣ and ˆΣ†.
Proposition 1. There is an absolute constant C > 0 such that the following holds for any δ ∈
(0, 0.1). If N ≥ Cd log d
δ , then with probability at least 1 − δ,
• ∥ ˆΣ∥op ≤ 3;
• ˆΣ has d − 1 nonzero eigenvalues;
16
• ∥ ˆΣ†∥op ≤ 5.
Proof. Since ˆΣ is positive semidefinite, we have ∥ ˆΣ∥op = λmax( ˆΣ). Let us first upper-bound λmax( ˆΣ).
Let v ∈ Rd such that ∥v∥2 = 1. By the definition (3), we have
v⊤ ˆΣv =
d − 1
2N
N
(cid:88)
(x⊤
r v)2 =
r=1
d − 1
2N
N
(cid:88)
r=1
(vir − vjr )2 ≤
d − 1
N
N
(cid:88)
(v2
ir + v2
jr ) =
r=1
d − 1
N
d
(cid:88)
i=1
|Ri|v2
i ,
where the inequality follows since (a − b)2 ≤ 2(a2 + b2) for any a, b ∈ R, and Ri is defined in (12).
By the bound on |Ri| from Lemma 1, we conclude that with probability at least 1 − δ,
∥ ˆΣ∥op = max
v∈Rd:∥v∥2=1
v⊤ ˆΣv ≤
d − 1
N
*
2.1N
d
≤ 3.
Note since ˆΣ† is also positive semidefinite, we have ∥ ˆΣ†∥op = λmax( ˆΣ†). Furthermore, we have
λmax( ˆΣ†) = 1/λ,
where λ is the minimum nonzero eigenvalue of ˆΣ. It suffices to lower-bound the smallest eigenvalue
of ˆΣ as a map on H, and then this eigenvalue is precisely λ.
To this end, let us make a few definitions. First define the set
Then define the random matrices
S := {v ∈ H : ∥v∥2 = 1}.
D ∈ Rd×d, such that Dij =
A ∈ Rd×d, such that Aij =
(cid:26) |Ri|
0
(cid:26) (cid:80)N
r=1
i = j,
i ̸= j,
1{xr = ±(ei − ej)} i ̸= j,
i = j,
0
M =
N
(cid:1) (J − I) − A,
(cid:0)d
2
where J = 11⊤. With these in hand, we have the following
λ = min
v∈S
v⊤ ˆΣv =
d − 1
2N
min
v∈S
v⊤(D − A)v ≥
d − 1
2N
(cid:18)
min
v∈S
v⊤Dv − max
u∈S
(cid:19)
u⊤Au
.
Let us consider the first term. We have
min
v∈S
v⊤Dv = min
v∈S
d
(cid:88)
i=1
|Ri|v2
i ≥ min
v∈S
d
(cid:88)
i=1
1.9N
d
v2
i =
1.9N
d
,
(14)
(15)
where the inequality holds with probability at least 1 − δ by Lemma 1.
Let us now consider the second term. Note that (I − J)u = u for u ∈ S. By the definition of
A, we have
max
u∈S
u⊤Au = max
u∈S
u⊤(−M )u +
≤ max
u,v∈S
u⊤(−M )v +
N
(cid:1) u⊤(I − J)u
(cid:0)d
2
N
(cid:1)
(cid:0)d
2
≤ ∥(−M )∥op +
N
(cid:1) = ∥M ∥op +
(cid:0)d
2
N
(cid:1) .
(cid:0)d
2
17
(16)
It remains to bound ∥M ∥op using Lemma 17. To this end, let us define random matrices
Xr =
1
(cid:1) (J − I) −
(cid:0)d
2
(cid:88)
1≤i<j≤d
1{xr = ±(ei − ej)}(eie⊤
j + eje⊤
i ),
and then M = (cid:80)N
r=1 Xr. First, let us show E[Xr] = 0. We have
(cid:18)
1
(cid:1) (J − I) −
(cid:0)d
2
(cid:88)
1≤i<j≤d
1
(cid:1) (eie⊤
(cid:0)d
2
j + eje⊤
i ) =
E[Xr] =
1
(cid:1)
(cid:0)d
2
J − I −
(cid:19)
eie⊤
j
= 0.
(cid:88)
i̸=j
Next, we find a bound on ∥Xr∥op. Note that (cid:80)
With this in mind, we have
1≤i<j≤d
1{xr = ±(ei − ej)} = 1 for every r ∈ [N ].
∥Xr∥op ≤
1
(cid:1) (∥J∥op + ∥I∥op) +
(cid:0)d
2
(cid:88)
1≤i<j≤d
1{xr = ±(ei − ej)} ∥eie⊤
j + eje⊤
i ∥op =
d + 1
(cid:0)d
2
(cid:1) + 1 ≤ 2.
Finally, we need a bound on ∥ (cid:80)N
r=1
E[X 2
r ]∥op. To this end, we compute
X 2
r =
1
(cid:1)2 ((d − 2)J + I) +
(cid:0)d
2
(cid:88)
1≤i<j≤d
1{xr = ±(ei − ej)}(eie⊤
i + eje⊤
j )
−
1
(cid:1)
(cid:0)d
2
(cid:88)
1≤i<j≤d
1{xr = ±(ei − ej)}
(cid:16)
which implies
1e⊤
j + 1e⊤
i + ei1⊤ + ej1⊤ − 2(eie⊤
(cid:17)
j + eje⊤
i )
,
E[X 2
r ] =
1
(cid:1)2 ((d − 2)J + I) +
(cid:0)d
2
1
(cid:1)
(cid:0)d
2
(cid:88)
(eie⊤
i + eje⊤
j )
1≤i<j≤d
−
1
(cid:1)2
(cid:0)d
2
(cid:88)
(cid:16)
1≤i<j≤d
1e⊤
j + 1e⊤
i + ei1⊤ + ej1⊤ − 2(eie⊤
(cid:17)
j + eje⊤
i )
=
=
Finally, we have
1
(cid:1)2 ((d − 2)J + I) +
(cid:0)d
2
d − 1
(cid:0)d
2
(cid:1) I −
1
(cid:1)2 ((d − 2)J + I).
(cid:0)d
2
d − 1
(cid:0)d
2
(cid:1) I −
2
(cid:1)2 ((d − 2)J + I)
(cid:0)d
2
v(M ) = (cid:13)
(cid:13)N E[X 2
1 ](cid:13)
(cid:13)op ≤ N
(cid:18) 2
d
+
4(d − 1)2
d2(d − 1)2
(cid:19)
≤
4N
d
.
By Lemma 17, we have that for some absolute constant C′ > 0,
∥M ∥op ≤ C′
(cid:32)(cid:114)
N
d
log
d
δ
+ log
(cid:33)
,
d
δ
with probability at least 1 − δ.
18
Putting the above together with (15) and (16), we have
min
v∈S
v⊤Dv − max
u∈S
u⊤Au ≥
1.9N
d
−
N
(cid:1) − C′
(cid:0)d
2
(cid:32)(cid:114)
N
d
log
d
δ
+ log
(cid:33)
,
d
δ
with probability at least 1 − 2δ. Since d ≥ 3, combining this with (14) yields that for some absolute
constant C′′ > 0,
λ ≥ 0.3 − C′′
(cid:32)(cid:114)
d
N
log
d
δ
+
d
N
log
d
δ
(cid:33)
,
with probability at least 1 − 2δ. In particular, for N ≥ C d log d
δ , we have λ ≥ 0.2 and
with probability at least 1 − 2δ.
∥ ˆΣ†∥op = 1/λ ≤ 5
Lemma 2. There is an absolute constant C > 0 such that the following holds for any δ ∈ (0, 0.1).
Suppose that N ≥ Cd log d
δ . With probability at least 1 − δ, we have
tr( ˆΣ†) ≥ (d − 1)/3.
Proof. Condition on the event where the bounds in Proposition 1 hold. Let λ1 ≥ * * * ≥ λd−1 > 0
be the nonzero eigenvalues of ˆΣ. Then we have λ1 ≤ 3 and so tr( ˆΣ†) = (cid:80)d−1
i=1
≥ d−1
3 .
1
λi
For any linear map A : H → H, define the norm
∥A∥∞ :=
max
v∈H:∥v∥∞=1
∥Av∥∞.
We bound the norm ∥ ˆΣ†∥∞ in the rest of this section: starting with Lemmas 4, 5, 6, and 7, the
bound is completed in Proposition 2.
Lemma 3. Suppose that
Then we have
min
u∈H:∥u∥∞=1
∥ ˆΣu∥∞ > 0.
(cid:18)
∥ ˆΣ†∥∞ =
(cid:19)−1
∥ ˆΣu∥∞
min
u∈H:∥u∥∞=1
Proof. By the assumption, there is no vector u ∈ H such that ˆΣu = 0, so ˆΣ is invertible on H.
Then we have
.
∥ ˆΣ†∥∞ =
max
v∈H:∥v∥∞=1
∥ ˆΣ†v∥∞ =
max
u∈H:∥ ˆΣu∥∞=1
∥u∥∞ =
max
u∈H:∥ ˆΣu∥∞>0
∥u∥∞
∥ ˆΣu∥∞
=
max
u∈H:∥u∥∞=1
1
∥ ˆΣu∥∞
which yields the desired result.
Lemma 4. There exists an absolute constant C > 0 such that the following holds for any fixed
δ ∈ (0, 0.1), κ ∈ (0, 1], and u ∈ H with ∥u∥∞ = 1. Define I := {i ∈ [d] : ui ≥ κ}. Suppose that
N |I| ≥ d log 1
δ . With probability at least 1 − δ, we have
∥ ˆΣu∥∞ ≥ κ − C
(cid:115)
d
N |I|
log
1
δ
.
19
Proof. For any i ∈ [d], we have
( ˆΣu)i =
d
(cid:88)
j=1
ˆΣijuj =
d
(cid:88)
j=1
ˆΣij(uj − ui),
since (cid:80)d
j=1
ˆΣij = ( ˆΣ1)i = 0. Then, by the definition of ˆΣ,
( ˆΣu)i =
d − 1
2N
(cid:88)
N
(cid:88)
j∈[d]\{i}
r=1
(cid:0)xrx⊤
r
(cid:1)
ij(uj − ui) =
d − 1
2N
N
(cid:88)
(cid:88)
(ui − uj)1{xr = ±(ei − ej)}. (17)
r=1
j∈[d]\{i}
Then it holds that
∥ ˆΣu∥∞ ≥
1
|I|
(cid:88)
i∈I
( ˆΣu)i =
d − 1
2N |I|
N
(cid:88)
(cid:88)
(cid:88)
(ui − uj)1{xr = ±(ei − ej)}.
(18)
r=1
i∈I
j∈[d]\{i}
For any r ∈ [N ], define
Xr :=
d − 1
2
(cid:88)
(cid:88)
i∈I
j∈[d]\{i}
(ui − uj)1{xr = ±(ei − ej)}.
Then we have
E[Xr] =
d − 1
2
(cid:88)
(cid:88)
(ui − uj)
i∈I
j∈[d]\{i}
2
d(d − 1)
(cid:88)
=
i∈I
dui − (cid:80)d
d
j=1 uj
(cid:88)
=
ui ∈ (cid:2)κ |I|, |I|(cid:3)
i∈I
since (cid:80)d
j=1 uj = 0 and κ ≤ ui ≤ ∥u∥∞ = 1 for i ∈ I. Moreover, it follows that
|Xr − E[Xr]| ≤ |Xr| + E[Xr] ≤ d * 2∥u∥∞ + |I| ≤ 3d
and that
Var(Xr) ≤ E[X 2
r ] =
(d − 1)2
4
(cid:88)
(cid:88)
(ui − uj)2
i∈I
j∈[d]\{i}
2
d(d − 1)
≤ 2d |I|.
Since X1, . . . , XN are independent, Bernstein's inequality together with (18) implies that
∥ ˆΣu∥∞ ≥
1
N |I|
N
(cid:88)
r=1
Xr ≥ κ − C1
(cid:18)(cid:115)
d
N |I|
log
1
δ
+
d
N |I|
log
(cid:19)
1
δ
with probability at least 1 − δ for an absolute constant C1 > 0. This completes the proof since
N |I| ≥ d log 1
δ by assumption.
Lemma 5. There exists an absolute constant C > 0 such that the following holds for any fixed
δ ∈ (0, 0.1) and α, κ ∈ (0, 1]. Suppose that N ≥ C d
ακ2 log 2
κδ . Define
U := (cid:8)u ∈ H : ∥u∥∞ = 1, |{i ∈ [d] : ui ≥ κ}| ≥ αd(cid:9).
With probability at least 1 − δ, we have
∥ ˆΣu∥∞ ≥ κ/2.
min
u∈U
20
Proof. For ε ∈ (0, 1), the set
N := {u ∈ U : ui = 0, ±ε, ±2ε, . . . , ±⌊1/ε⌋ε for all i ∈ [d]}
is clearly an ε-net of U in the l∞ norm, and it has cardinality |N | ≤ (2/ε)d.
For any u ∈ U, let v ∈ N be such that ∥u − v∥∞ ≤ ε. Then we have
∥ ˆΣv∥∞ = ∥ ˆΣ(v − u + u)∥∞ ≤ ∥ ˆΣ∥∞∥v − u∥∞ + ∥ ˆΣu∥∞ ≤ ε∥ ˆΣ∥∞ + ∥ ˆΣu∥∞.
(19)
By the definition of ˆΣ and the fact that (cid:80)d
j=1
ˆΣij = 0 for any i ∈ [d], we obtain
∥ ˆΣ∥∞ = max
i∈[d]
d
(cid:88)
j=1
| ˆΣij| = 2 max
i∈[d]
(cid:88)
| ˆΣij| =
j∈[d]\{i}
d − 1
N
max
i∈[d]
(cid:88)
j∈[d]\{i}
(cid:12)
(cid:12)
(cid:12)
(cid:12)
N
(cid:88)
(xrx⊤
r )ij
r=1
(cid:12)
(cid:12)
(cid:12)
(cid:12)
=
d − 1
N
max
i∈[d]
(cid:88)
N
(cid:88)
j∈[d]\{i}
r=1
1{xr = ±(ei − ej)}.
It then follows from the definition of Ri in (12) and Lemma 1 that
∥ ˆΣ∥∞ =
d − 1
N
max
i∈[d]
|Ri| ≤ 3
with probability at least 1 − δ/2. Combining this bound with (19) gives
min
u∈U
∥ ˆΣu∥∞ ≥ min
v∈N
∥ ˆΣv∥∞ − 3ε.
Recall that |{i ∈ [d] : vi ≥ κ}| ≥ αd for every v ∈ N ⊂ U. Let ε = κ/10. We apply Lemma 4
2(2/ε)d and a union bound over all v ∈ N to obtain that, with probability at
δ
with δ replaced by
least 1 − δ/2,
∥ ˆΣv∥∞ ≥ κ − C1
min
v∈N
(cid:114)
d
N αd
log
2(2/ε)d
δ
≥ κ − C2
(cid:114)
d
N α
log
2
κδ
for absolute constants C1, C2 > 0.
In view of the above two displays together with the condition N ≥ C d
ακ2 log 2
κδ for a large
constant C > 0, we conclude that minu∈U ∥ ˆΣu∥∞ ≥ κ/2 with probability at least 1 − δ.
Lemma 6. There exists an absolute constant C > 0 such that the following holds for any fixed
δ ∈ (0, 0.1), 0 ≤ λ < κ ≤ 1, and nonempty subsets I ⊂ J ⊂ [d]. With probability at least 1 − δ, we
have that
∥ ˆΣu∥∞ ≥ (κ − λ)
d − |J|
d
−
|I|
d
− C
(cid:18)(cid:115)
d
N |I|
log
1
δ
+
d
N |I|
log
(cid:19)
1
δ
for all u ∈ H with ∥u∥∞ = 1, {i ∈ [d] : ui ≥ κ} = I, and {i ∈ [d] : ui ≥ λ} = J.
21
Proof. By (17), we have
∥ ˆΣu∥∞ ≥
1
|I|
(cid:88)
( ˆΣu)i =
i∈I
d − 1
2N |I|
=
d − 1
2N |I|
N
(cid:88)
(cid:88)
(cid:88)
(ui − uj)1{xr = ±(ei − ej)}
r=1
N
(cid:88)
r=1
j∈[d]\{i}
i∈I
(cid:18) (cid:88)
(cid:88)
(ui − uj)1{xr = ±(ei − ej)}
i∈I
(cid:88)
j∈I\{i}
(cid:88)
+
(ui − uj)1{xr = ±(ei − ej)}
i∈I
j∈J\I
(cid:88)
(cid:88)
+
i∈I
j∈[d]\J
(ui − uj)1{xr = ±(ei − ej)}
(cid:19)
.
In view of the assumptions ∥u∥∞ = 1, {i ∈ [d] : ui ≥ κ} = I, and {i ∈ [d] : ui ≥ λ} = J, we see
that for i ∈ I,
ui − uj ≥
It then follows that
−1
0
κ − λ
if j ∈ I \ {i},
if j ∈ J \ I,
if j ∈ [d] \ J.
∥ ˆΣu∥∞ ≥ −
1
N |I|
N
(cid:88)
r=1
d − 1
2
(cid:88)
(cid:88)
i∈I
j∈I\{i}
1{xr = ±(ei − ej)}
+
κ − λ
N |I|
N
(cid:88)
r=1
d − 1
2
(cid:88)
(cid:88)
i∈I
j∈[d]\J
1{xr = ±(ei − ej)}.
(20)
(21)
We now bound the above two terms. To control (20), we define
Xr :=
d − 1
2
(cid:88)
(cid:88)
i∈I
j∈I\{i}
1{xr = ±(ei − ej)}
for r ∈ [N ]. Then we have
E[Xr] =
d − 1
2
(cid:88)
(cid:88)
i∈I
j∈I\{i}
2
d(d − 1)
=
|I|(|I| − 1)
d
≤
|I|2
d
,
|Xr − E[Xr]| ≤ d,
and
Var(Xr) ≤ E[X 2
r ] =
(d − 1)2
4
(cid:88)
(cid:88)
i∈I
j∈I\{i}
2
d(d − 1)
≤
|I|2
2
.
Since X1, . . . , XN are independent, Bernstein's inequality implies that
N
(cid:88)
r=1
Xr ≤ N
|I|2
d
+ C1
(cid:18)(cid:114)
N |I|2 log
1
δ
+ d log
(cid:19)
1
δ
22
with probability at least 1−δ/2 for an absolute constant C1 > 0 and any δ ∈ (0, 0.1). Consequently,
the term (20) can be bounded as
1
N |I|
N
(cid:88)
r=1
d − 1
2
(cid:88)
(cid:88)
i∈I
j∈I\{i}
1{xr = ±(ei − ej)} ≤
|I|
d
+ C1
(cid:18)(cid:114) 1
N
log
1
δ
+
d
N |I|
log
(cid:19)
.
1
δ
Analogously, if we define
X ′
r :=
d − 1
2
(cid:88)
(cid:88)
i∈I
j∈[d]\J
1{xr = ±(ei − ej)},
we can apply Bernstein's inequality to obtain that
N
(cid:88)
r=1
X ′
r ≥ N
|I|(d − |J|)
d
(cid:18)(cid:114)
− C2
N |I|(d − |J|) log
1
δ
+ d log
(cid:19)
1
δ
with probability at least 1 − δ/2 for an absolute constant C2 > 0 and any δ ∈ (0, 0.1). Then the
term (21) can be bounded as
κ − λ
N |I|
N
(cid:88)
r=1
d − 1
2
(cid:88)
(cid:88)
i∈I
j∈[d]\J
1{xr = ±(ei − ej)} ≥ (κ − λ)
(cid:18)(cid:115)
d − |J|
d
− C2
d
N |I|
log
1
δ
+
d
N |I|
log
(cid:19)
.
1
δ
Plugging the above bounds into (20) and (21) respectively completes the proof.
Lemma 7. There exists an absolute constant C > 0 such that the following holds for any fixed
δ ∈ (0, 0.1) and 0 ≤ λ < κ ≤ 1. For u ∈ Rd, define
l(u) := |{i ∈ [d] : ui ≥ κ}|,
m(u) := |{i ∈ [d] : ui ≥ λ}|.
With probability at least 1 − δ, we have that
∥ ˆΣu∥∞ ≥
κ − λ
2
for all u ∈ H with ∥u∥∞ = 1, m(u) ≤ d
(κ−λ)2l(u) log d
δ .
(cid:1) ≤ dm pairs of subsets (I, J)
Proof. For fixed positive integers l ≤ m ≤ d, there are at most (cid:0) d
m
such that |I| = l, |J| = m, and I ⊂ J ⊂ [d]. Therefore, by Lemma 6 with δ replaced by δ/dm and
a union bound over all possible (I, J), we obtain the following: With probability at least 1 − δ,
8 , and N ≥ Cd m(u)
(cid:1)(cid:0)m
l
4 , l(u) ≤ (κ − λ) d
∥ ˆΣu∥∞ ≥ (κ − λ)
d − m
d
−
l
d
− C1
(cid:18)(cid:114)
dm
N l
log
d
δ
+
dm
N l
log
(cid:19)
d
δ
(22)
for all u ∈ H with ∥u∥∞ = 1, l(u) = l, and m(u) = m, where C1 > 0 is an absolute constant,
and l(u) and m(u) are defined as in the lemma. Moreover, there are at most d2 possible choices
for the pair of integers (l, m). Thus, by a further union bound over (l, m), the bound (22) holds
for all u ∈ H with ∥u∥∞ = 1, provided that the constant C1 is replaced by a larger absolute
constant. The conclusion then follows from the imposed conditions m ≤ d
8 , and
N ≥ Cd m
4 , l ≤ (κ − λ) d
(κ−λ)2l log d
δ .
23
Proposition 2. There exists an absolute constant C > 0 such that the following holds for any
δ ∈ (0, 0.1). Fix an integer L ≥ 2. Suppose that
N ≥ C max
(cid:110)
L2d
L
L−1 log
dL
δ
, L3d log
(cid:111)
.
L
δ
Then it holds with probability at least 1 − δ that,
and, as a result,
min
u∈H:∥u∥∞=1
∥ ˆΣu∥∞ ≥
1
2L
∥ ˆΣ†∥∞ ≤ 2L.
Proof. By Lemma 3, it suffices to prove the lower bound on ∥ ˆΣu∥∞ for u ∈ H with ∥u∥∞ = 1. For
t = 0, 1, . . . , L, define
κt := 1 − t/L,
lt(u) := |{i ∈ [d] : ui ≥ κt}|.
For t = 1, 2, . . . , L − 1, define
(cid:26)
Ut :=
u ∈ H : ∥u∥∞ = 1, lt(u) ≤
d
4
, lt−1(u) ≤
d
8L
, N ≥
C1dL2lt(u)
lt−1(u)
log
(cid:27)
,
dL
δ
where C1 > 0 is a constant to be chosen. In addition, define
(cid:26)
UL :=
u ∈ H : ∥u∥∞ = 1, lL−1(u) ≥
We claim that
L
(cid:91)
t=1
(cid:26)
Ut =
u ∈ H : ∥u∥∞ = 1, max
i∈[d]
ui = 1
.
(23)
We first finish the proof based on the above claim. For u ∈ (cid:83)L−1
t=1 Ut, we apply Lemma 7 with
κ = κt−1, λ = κt, l(u) = lt−1(u), m(u) = lt(u), and δ replaced by δ
2L , together with a union bound
over t ∈ [L − 1]. Note that κ − λ = 1/L. Hence we obtain that, with probability at least 1 − δ/2,
min
u∈(cid:83)L−1
t=1 Ut
∥ ˆΣu∥∞ ≥
1
2L
,
provided that C1 is a sufficiently large absolute constant. Moreover, for u ∈ UL, we apply Lemma 5
with κ = KL−1 = 1/L and α = 1/(8L) to obtain that, with probability at least 1 − δ/2,
∥ ˆΣu∥∞ ≥
min
u∈UL
1
2L
,
provided that N ≥ C2L3d log L
δ for a large constant C2 > 0.
The above two bounds together with (23) imply that, with probability at least 1 − δ, we have
∥ ˆΣu∥∞ ≥ 1/(2L) for all u ∈ H with ∥u∥∞ = 1 and maxi∈[d] ui = 1. Finally, for u ∈ H with
∥u∥∞ = 1 and mini∈[d] ui = −1, it suffices to apply the bound to −u.
24
(cid:27)
.
d
8L
(cid:27)
t=1 Ut. Then for any t ∈ [L − 1], we have lt(u) > d
Proof of Claim (23). Consider u ∈ H with ∥u∥∞ = 1 and maxi∈[d] ui = 1. Suppose that u /∈
(cid:83)L−1
δ . If
8L for some t ∈ {0, 1, . . . , L − 1}.
8L . Thus u ∈ UL. Let us
either of the first two conditions holds, then we have lt(u) > d
Since κL−1 ≤ κt, by the definition of lt(u), we have lL−1(u) ≥ lt(u) > d
further suppose that u /∈ UL. Then, for all t ∈ [L − 1], we must have
8L , or N < C1dL2lt(u)
4 , lt−1(u) > d
log dL
lt−1(u)
N <
C1dL2lt(u)
lt−1(u)
log
dL
δ
⇐⇒
lt(u) > lt−1(u) *
N
C1L2d log(dL/δ)
.
Since κ0 = 1 and l0(u) = |{i ∈ [d] : ui = 1}| ≥ 1, we apply the above bound iteratively to obtain
lL−1(u) ≥
(cid:18)
N
C1L2d log(dL/δ)
(cid:19)L−1
≥ d >
d
8L
,
where the second inequality holds by the assumption N ≥ CL2d
finishing the proof.
L
L−1 log dL
δ . As a result, u ∈ UL,
6.3 One-step iterate from the ground truth
In this subsection, we study the difference between the ground truth θ∗ and the one-step EM iterate
ˆQ(θ∗) from it. All the results in this subsection are conditional on a realization of x1, . . . , xN . For
brevity, we often take the liberty of using E and P to denote the conditional expectation and
probability on x1, . . . , xN respectively. Let us start with a lemma.
Lemma 8. Let X ∼ N (μ, σ2). Then we have
and
(cid:20)
X tanh
E
(cid:19)(cid:21)
(cid:18) μX
σ2
= μ,
(cid:18)
Var
X tanh
(cid:19)(cid:19)
(cid:18) μX
σ2
≤ σ2.
(24)
(25)
Proof. Equation (24) is well-known, but we provide a proof for completeness. By a change of
variable ν = μ
σ ∼ N (ν, 1), it suffices to show that
σ and Z = X
E [Z tanh(νZ)] = ν.
(26)
We have E[Z] = ν and
E [Z (tanh(νZ) − 1)] =
1
√
2π
(cid:90)
R
z
−2e−νz
eνz + e−νz e−(z−ν)2/2 dz = −
2e−ν2/2
√
2π
(cid:90)
R
ze−z2/2
eνz + e−νz dz = 0, (27)
because the integrand is an odd function. Then (26) immediately follows.
Next, it holds that
Var (cid:0)X tanh(μX/σ2)(cid:1) = σ2 Var (Z tanh(νZ)) = σ2 E (cid:2)(Z tanh(νZ) − ν)2(cid:3) .
(28)
25
Furthermore, we have
(Z tanh(νZ) − ν)2 = (Z − ν)2 − 2vZ(tanh(νZ) − 1) + Z2(tanh(νZ)2 − 1)
≤ (Z − ν)2 − 2vZ(tanh(νZ) − 1) + Z2 tanh(νZ) (tanh(νZ) − 1)
since tanh(νZ) ≤ 1. Let us compute the expectations of these three terms. We have
E[(Z − ν)2] = 1,
E[2vZ(tanh(νZ) − 1)] = 0,
by Z ∼ N (ν, 1) and (27) respectively. For the third term,
E[Z2 tanh(νZ) (tanh(νZ) − 1)] =
=
(cid:90)
1
√
2π
R
−2e−v2/2
√
2π
z2 (eνz − e−νz)(−2e−νz)
(eνz + e−νz)2
z2e−z2/2 eνz − e−νz
(cid:90)
R
(eνz + e−νz)2 dz = 0,
e−(z−ν)2/2 dz
because the integrand is an odd function. Combining the three terms with (28) proves (25).
We now control ˆQ(θ∗) − θ∗ in the l∞-norm.
Lemma 9. Condition on a realization of x1, . . . , xN such that ∥ ˆΣ†∥∞ ≤ 2L. There is an absolute
constant C > 0 such that for any δ ∈ (0, 0.1), it holds with (conditional) probability at least 1 − δ
that
∥ ˆQ(θ∗) − θ∗∥∞ ≤ Cσ
(cid:114)
L d
N
log
d
δ
.
Proof. Let us first check that E[ ˆQ(θ∗)] = θ∗. By (24), we have
E
yr∼N (x⊤
r θ∗,σ2)
(cid:20)
yr tanh
(cid:19)(cid:21)
(cid:18) yrx⊤
r θ∗
σ2
= x⊤
r θ∗.
Then, it follows that
E[ ̄Q(θ∗)] =
d − 1
2N
N
(cid:88)
r=1
xrx⊤
r θ∗ = ˆΣ θ∗,
E[ ˆQ(θ∗)] = θ∗.
Next, we study ˆQ(θ∗) − θ∗, whose ith entry is
e⊤
i
(cid:0) ˆQ(θ∗) − θ∗(cid:1) = e⊤
i
ˆΣ†(cid:0) ̄Q(θ∗) − E[ ̄Q(θ∗)](cid:1).
For w ∈ H, define
fw(y) := w⊤ ̄Q(θ∗) =
d − 1
2N
N
(cid:88)
r=1
yrx⊤
r w tanh
(cid:18) yrx⊤
r θ∗
σ2
(cid:19)
.
(29)
(30)
(31)
(32)
We will show that fw(y) − Ey[fw(y)] is sub-Gaussian with variance parameter of order σ2L d
N when
w⊤ is a row of ˆΣ†. The proof is similar to that of Proposition 11 of Kwon et al. (2019), with the
main tool being Lemma 18, a standard concentration result for Gaussian random variables. To this
26
end, let vr = yr−x⊤
i.i.d. standard Gaussians ζ1, . . . , ζN . Let us define a new function
= εr
σ be i.i.d. standard Gaussians and introduce another independent set of
r θ∗
σ
gw(v) := fw(y) =
d − 1
2N
N
(cid:88)
(σvr + x⊤
r θ∗)x⊤
r w tanh
r=1
For each r ∈ [N ], we have
(∇gw(v))r =
d − 1
2N
x⊤
r w
(cid:20)
r θ∗
σ tanh
+ (σvr + x⊤
(cid:18) (σvr + x⊤
r θ∗)x⊤
σ2
x⊤
r θ∗
σ
(cid:18) (σvr + x⊤
r θ∗
r θ∗)x⊤
σ2
r θ∗)
(cid:19)
,
=
d − 1
2N
x⊤
r wσ * h
(cid:18) (σvr + x⊤
r θ∗)x⊤
σ2
r θ∗
(cid:19)
.
(cid:19)
tanh′
(cid:18) (σvr + x⊤
r θ∗)x⊤
σ2
r θ∗
(cid:19) (cid:21)
where h(t) := tanh(t)+t*tanh′(t). We will use the inequality |h(t)| ≤ 2 for all t ∈ R. By Lemma 18,
E[exp(λ(fw(y) − E[fw(y)]))] = E[exp(λ(gw(v) − E[gw(v)]))]
(cid:19)(cid:21)
⟨∇g, ζ⟩
≤ Ev,ζ
(cid:20)
exp
(cid:34)
(cid:18) λπ
2
(cid:32)
= EvEζ
exp
λπ
2
(cid:32)
d − 1
2N
N
(cid:88)
r=1
ζrx⊤
r wσ * h
(cid:18) (σvr + x⊤
r θ∗)x⊤
σ2
r θ∗
(cid:19)(cid:33)(cid:33)(cid:35)
= Ev
≤ exp
(cid:34)
exp
(cid:32)(cid:18) λ2σ2π2(d − 1)
16N
(cid:32)(cid:18) λ2σ2π2(d − 1)
4N
(cid:19) (cid:32)
(cid:19) (cid:32)
d − 1
2N
N
(cid:88)
(cid:16)
r=1
r w * h((σvr + x⊤
x⊤
r θ∗)x⊤
r θ∗)
(cid:33)(cid:33)(cid:35)
(cid:17)2
(cid:33)(cid:33)
d − 1
2N
N
(cid:88)
(x⊤
r w)2
r=1
≤ exp
(cid:18) λ2σ2π2d
4N
w⊤ ˆΣw
(cid:19)
.
If w⊤ is the ith row of ˆΣ†, we have w = ˆΣ†ei and
by assumption. It follows that
w⊤ ˆΣw = e⊤
i
ˆΣ†ei ≤ ∥ ˆΣ†∥∞ ≤ 2L
E[exp(λ(fw(y) − E[fw(y)]))] ≤ exp
(cid:18) λ2σ2π2dL
2N
(cid:19)
,
so fw(y) is sub-Gaussian with variance parameter σ2π2dL
least 1 − δ/d that
N . Therefore, it holds with probability at
(cid:12)fw(y) − E[fw(y)](cid:12)
(cid:12)
(cid:12) ≤ Cσ
(cid:114)
Ld
N
log
d
δ
for a constant C > 0. In view of (31) and (32), the left-hand side of the above bound is precisely
i ( ˆQ(θ∗) − θ∗)| when w⊤ is the ith row of ˆΣ†. Taking a union bound over i ∈ [d] proves the desired
|e⊤
result on ∥ ˆQ(θ∗) − θ∗∥∞.
27
The following two lemmas provide a sharp control on ˆQ(θ∗)−θ∗ in the l2-norm: they respectively
bound the expectation and deviation of ∥ ˆQ(θ∗) − θ∗∥2
2.
Lemma 10. Condition on a realization of x1, . . . , xN such that ˆΣ† is the inverse of ˆΣ as a map
on H. Let E[*] denote the conditional expectation. Then we have
E(cid:2)∥ ˆQ(θ∗) − θ∗∥2
2
(cid:3) ≤ σ2 d − 1
2N
tr( ˆΣ†).
Proof. By the definition of ˆQ in (4b), it is not difficult to see that
ˆQ(θ∗) − θ∗ =
(cid:18) N
(cid:88)
xrx⊤
r
(cid:19)† N
(cid:88)
(cid:18)
r=1
r=1
tanh
(cid:16) yr x⊤
r θ∗
σ2
(cid:17)
yr − x⊤
r θ∗
(cid:19)
xr.
Then it follows that
E (cid:2)( ˆQ(θ∗) − θ∗)( ˆQ(θ∗) − θ∗)⊤(cid:3)
(cid:18) N
(cid:88)
=
xrx⊤
r
(cid:19)†(cid:32) N
(cid:88)
(cid:20)(cid:18)
E
r=1
r=1
tanh
r θ∗
(cid:16) yr x⊤
σ2
(cid:17)
yr − x⊤
r θ∗
(cid:19)2(cid:21)
xrx⊤
r
(cid:33)(cid:18) N
(cid:88)
(cid:19)†
,
xrx⊤
r
r=1
where the cross terms vanish thanks to (29). By (25), we have
σr := E
(cid:20)(cid:18)
tanh
r θ∗
(cid:16) yr x⊤
σ2
(cid:17)
yr − x⊤
r θ∗
(cid:19)2(cid:21)
≤ σ2.
As a result, the matrix
(cid:18) N
(cid:88)
σ2
xrx⊤
r
(cid:19)†
r=1
−E (cid:2)( ˆQ(θ∗)−θ∗)( ˆQ(θ∗)−θ∗)⊤(cid:3) =
(cid:18) N
(cid:88)
r=1
xrx⊤
r
(cid:19)†(cid:32) N
(cid:88)
r=1
(σ2 −σ2
r )xrx⊤
r
(cid:33)(cid:18) N
(cid:88)
(cid:19)†
xrx⊤
r
r=1
is positive semi-definite. In other words,
E (cid:2)( ˆQ(θ∗) − θ∗)( ˆQ(θ∗) − θ∗)⊤(cid:3) ≼ σ2
(cid:19)†
xrx⊤
r
(cid:18) N
(cid:88)
r=1
in the Loewner order. Since the trace operator is monotone in the Loewner order, we obtain
E(cid:2)∥ ˆQ(θ∗) − θ∗∥2
2
(cid:3) = tr
(cid:16)
E (cid:2)( ˆQ(θ∗) − θ∗)( ˆQ(θ∗) − θ∗)⊤(cid:3)(cid:17)
≤ σ2 tr
(cid:32)(cid:18) N
(cid:88)
(cid:19)†(cid:33)
,
xrx⊤
r
r=1
which completes the proof.
Lemma 11. Condition on a realization of x1, . . . , xN such that ∥ ˆΣ∥op ≤ 3 and ∥ ˆΣ†∥op ≤ 5. Then
there exists an absolute constant C > 0 such that for any δ ∈ (0, 0.1), we have
(cid:12)
(cid:12)∥ ˆQ(θ∗) − θ∗∥2
(cid:12)
2 − E(cid:2)∥ ˆQ(θ∗) − θ∗∥2
2
(cid:3)(cid:12)
(cid:12) ≤ Cσ2
(cid:12)
(cid:18) d3/2
N
(cid:114)
log
1
δ
+
d
N
log
(cid:19)
1
δ
with (conditional) probability at least 1 − δ.
28
Proof. Let ε′ := ε/σ ∼ N (0, IN ), and then yr = x⊤
r θ∗ + σε′
r. Consider the random vector
f (ε′) := ˆQ(θ∗) − θ∗ = ˆΣ†
(cid:32)
d − 1
2N
N
(cid:88)
tanh
(cid:18) (x⊤
r θ∗ + σε′
σ2
r)x⊤
r θ∗
(cid:19)
(x⊤
r θ∗ + σε′
r)xr
(cid:33)
− θ∗.
r=1
We claim that the function f (*) is 15σ(cid:112)d/N -Lipschitz in the Euclidean distance.
Assuming the claim for a moment, we now show that the random vector f (ε′) satisfies the
convex concentration property in Definition 1. To this end, let φ be an arbitrary 1-Lipschitz
function. (Note that we do not require φ to be convex and hence prove something stronger.) Then
φ ◦ f is 15σ(cid:112)d/N -Lipschitz, so by Lemma 15,
P (cid:8)(cid:12)
(cid:12)φ(f (ε′)) − E[φ(f (ε′))](cid:12)
(cid:12) ≥ t(cid:9) ≤ 2 exp
(cid:19)
(cid:18) −t2
C2
1 σ2d/N
for an absolute constant C1 > 0. Therefore, f (ε′) satisfies the convex concentration property for
K = C1 σ (cid:112)d/N . We have seen in (30) that E[f (ε′)] = 0. Then Lemma 16 with A = Id yields that
for an absolute constant C2 > 0,
(cid:110)(cid:12)
(cid:12)∥ ˆQ(θ∗) − θ∗∥2
Pr
2](cid:12)
2 − E[∥ ˆQ(θ∗) − θ∗∥2
(cid:12) ≥ t
(cid:111)
(cid:18)
≤ 2 exp
−
1
C2
min
(cid:18) N 2t2
σ4d3 ,
N t
σ2d
(cid:19)(cid:19)
.
From here, the lemma follows.
It remains to prove the claim that the function f (*) is 15σ(cid:112)d/N -Lipschitz. Let ε′, ε′′ ∈ RN . By
Taylor's theorem, we have for some tr ∈ (0, 1),
(cid:18) (x⊤
r θ∗ + σε′′
r )x⊤
r θ∗
(cid:19)
tanh
(x⊤
r θ∗ + σε′′
r ) − tanh
(cid:18) (x⊤
r θ∗ + σε′
σ2
r)x⊤
r θ∗
(cid:19)
(x⊤
r θ∗ + σε′
r)
σ2
(cid:18)
= (ε′′
r − ε′
r)
d
d ̃ε
= (ε′′
r − ε′
r) σ h
(cid:19)
r θ∗
tanh
(cid:18) (x⊤
(cid:18) (x⊤
r θ∗ + σ ̃ε)x⊤
σ2
r θ∗ + σ ̃εr)x⊤
r θ∗
σ2
(cid:19)
,
(x⊤
r θ∗ + σ ̃ε)
(cid:19) (cid:12)
(cid:12)
(cid:12)
(cid:12) ̃ε=ε′
r+tr(ε′′
r −ε′
r)
where h(t) := tanh(t) + t tanh′(t) for t ∈ R, and ̃εr := ε′
r + tr(ε′′
r − ε′
r). Then we have
f (ε′′) − f (ε′) = ˆΣ†
(cid:32)
d − 1
2N
N
(cid:88)
(ε′′
r − ε′
r) σ h
r=1
(cid:18) (x⊤
r θ∗ + σ ̃εr)x⊤
σ2
r θ∗
(cid:19)
(cid:33)
xr
= σ ˆΣ† ̃XD(ε′′ − ε′),
where ̃X ∈ Rd×N is the matrix whose rth column is d−1
defined by
2N xr, and D ∈ RN ×N is the diagonal matrix
Drr := h
(cid:18) (yr + tr(yr − yr))x⊤
r θ∗
(cid:19)
.
σ2
As a result,
Note that ̃X ̃X ⊤ = d−1
2N
∥f (ε′′) − f (ε′)∥2 ≤ σ∥ ˆΣ†∥op∥ ̃X∥op∥D∥op∥ε′ − ε′′∥2.
ˆΣ and so we have
∥ ̃X∥op =
(cid:114)
d − 1
2N
∥ ˆΣ∥op ≤
(cid:114)
3d
2N
29
by the conditioning. Moreover, we have ∥ ˆΣ†∥op ≤ 5 by the conditioning, and ∥D∥op ≤ 2 by the fact
that |h(t)| = | tanh(t) + t tanh′(t)| ≤ 2 for all t ∈ R. Combining all the bounds gives
∥f (ε′′) − f (ε′)∥2 ≤ 15 σ
(cid:114)
d
N
∥ε′′ − ε′∥2,
completing the proof.
6.4 Convergence analysis
Assuming the bounds in Lemma 1 and the control on ∥ ˆΣ†∥∞ in Proposition 2, the following result
shows that the EM operator is contractive locally around θ∗, deterministically.
Lemma 12. There exist absolute constants C, C′ > 0 such that the following holds. Suppose that
all the bounds in Lemma 1 hold with C > 0 and δ ∈ (0, 0.1). Consider θ, θ′ ∈ H, λ ∈ (0, 1), and
∆ := max{ 1
}, such that
λ ∥θ − θ′∥∞, 3σ√
λ
max{∥θ − θ∗∥∞, ∥θ′ − θ∗∥∞} ≤
∆
6
,
N ≥ C′ d
λ2 log
d
δ
,
max
i∈[d]
|Si(∆)| ≤
λ2
C′ d,
where Si(*) is defined as in (13a). Then we have
∥ ̄Q(θ) − ̄Q(θ′)∥∞ ≤ λ∥θ − θ′∥∞.
If, in addition, ∥ ˆΣ†∥∞ ≤ 1
2λ , then
∥ ˆQ(θ) − ˆQ(θ′)∥∞ ≤
1
2
∥θ − θ′∥∞.
Proof. For notational simplicity, let us consider iteration of the first entry of each vector and bound
| ̄Q(θ)1 − ̄Q(θ′)1|. The same analysis applies to any other entry with straightforward modification.
We can write the iteration of the first entry as
̄Q(θ)1 =
d − 1
2N
(cid:88)
r∈R1
tanh
(cid:17)
(cid:16) yr x⊤
r θ
σ2
yr,
where R1 is defined as in (12). It follows that
| ̄Q(θ)1 − ̄Q(θ′)1| ≤
d − 1
2N
(cid:88)
r∈R1
(cid:12)
(cid:12)
tanh
(cid:12)
(cid:12)
(cid:17)
(cid:16) yr x⊤
r θ
σ2
− tanh
(cid:16) yr x⊤
r θ′
σ2
(cid:17)(cid:12)
(cid:12)
(cid:12)
(cid:12)
|yr|.
Define θ(z) := θ′ + z(θ − θ′) for z ∈ [0, 1]. By the fundamental theorem of calculus, we have
(cid:12)
(cid:12)
(cid:12)
(cid:12)
tanh
(cid:19)
(cid:18) yr x⊤
r θ
σ2
− tanh
(cid:18) yr x⊤
r θ′
σ2
(cid:19)(cid:12)
(cid:12)
(cid:12)
(cid:12)
=
≤
(cid:90) 1
(cid:12)
(cid:12)
(cid:12)
(cid:12)
0
|yr x⊤
tanh′
(cid:18) yr x⊤
r θ(z)
σ2
(cid:90) 1
(cid:18)
−2
4 exp
(cid:19) (cid:18) yr x⊤
r (θ − θ′)|
σ2
r (θ − θ′)|
|yr x⊤
σ2
≤ 4
0
exp
(cid:18)
−2 min
0≤z≤1
(cid:19)
(cid:19)
r (θ − θ′)
σ2
|yr x⊤
r θ(z)|
σ2
|yr x⊤
r θ(z)|
σ2
dz
(cid:12)
(cid:12)
(cid:12)
(cid:12)
dz
(cid:19)
,
30
where we used the fact 0 ≤ tanh′(t) = (cosh(t))−2 ≤ 4 exp(−2|t|) for all t ∈ R. Combining the
above bounds with the trivial bound | tanh(t)| ≤ 1 for t ∈ R, we obtain
| ̄Q(θ)1 − ̄Q(θ′)1| ≤
d
N
(cid:88)
r∈R1
(cid:26)
min
|yr|, 2
r |x⊤
y2
r (θ − θ′)|
σ2
(cid:18)
exp
−2 min
0≤z≤1
|yr x⊤
r θ(z)|
σ2
(cid:19)(cid:27)
.
(33)
For brevity, we let η := ∥θ − θ′∥∞ in the sequel. Then ∆ = max{ η
} by definition. Recall
that the sets S1(∆) and R1(∆) are defined in (13a) and (13b) respectively. We now analyze the
summands in (33) for r ∈ R1(∆) and r ∈ R1 \ R1(∆) separately.
λ , 3σ√
λ
First, for r ∈ R1 \ R1(∆), we have xr = e1 − ej such that |x⊤
∥θ − θ∗∥∞ ≤ ∆/6 and ∥θ′ − θ∗∥∞ ≤ ∆/6 by assumption. It follows that
r θ∗| = |θ∗
1 − θ∗
j | > ∆. Moreover,
|x⊤
r θ(z)| = |θ(z)1 − θ(z)j| ≥ |θ∗
≥ |θ∗
1 − θ∗
1 − θ∗
j | − |θ(z)1 − θ∗
j | − z|θ1 − θ∗
1| − |θ(z)j − θ∗
j |
1 − θ∗
1| − (1 − z)|θ′
1| − z|θj − θ∗
j | − (1 − z)|θ′
j − θ∗
j |
for any z ∈ [0, 1]. Moreover, it holds that |x⊤
2
r |x⊤
y2
r (θ − θ′)|
σ2
(cid:18)
exp
−2 min
0≤z≤1
≥ |x⊤
r θ∗| −
∆
3
>
|x⊤
r θ∗|
2
3
r (θ − θ′)| ≤ 2∥θ − θ′∥∞ = 2η. Therefore,
(cid:19)
r θ∗|
|yr x⊤
r θ(z)|
.
σ2
(cid:18) −4 |yr| |x⊤
y2
r
σ2 exp
≤ 4η
3σ2
(cid:19)
It is not hard to see that maxa≥0 a2 exp(−ab) = 4/(eb)2 for b > 0. Taking a = |yr| and b = 4 |x⊤
r θ∗|
3σ2
in the above bound then yields
2
r |x⊤
y2
r (θ − θ′)|
σ2
(cid:18)
exp
−2 min
0≤z≤1
|yr x⊤
r θ(z)|
σ2
(cid:19)
≤
9σ2
r θ∗|2 η ≤
e2 |x⊤
(cid:16) 3σ
e∆
(cid:17)2
η.
As a result,
d
N
(cid:88)
r∈R1\R1(∆)
2
r |x⊤
y2
r (θ − θ′)|
σ2
(cid:18)
exp
−2 min
0≤z≤1
(cid:19)
|yr x⊤
r θ(z)|
σ2
≤
d
N
|R1|
(cid:16) 3σ
e∆
(cid:17)2
η ≤
λ
2
η
(34)
by the bound |R1| ≤ 3N/d in Lemma 1 and the condition ∆ ≥ 3σ√
λ
Second, for r ∈ R1(∆), since exp(−t) ≤ 1 for t ≥ 0 and |x⊤
.
r (θ − θ′)| ≤ 2η, we have
d
N
≤
r∈R1(∆)
d
N
(cid:88)
r∈R1(∆)
(cid:88)
(cid:26)
min
|yr|, 2
r |x⊤
y2
r (θ − θ′)|
σ2
(cid:18)
exp
−2 min
0≤z≤1
(cid:19)(cid:27)
|yr x⊤
r θ(z)|
σ2
(cid:26)
min
|yr|, 4η
(cid:27)
y2
r
σ2
≤
d
N
(cid:26) (cid:88)
min
r∈R1(∆)
|yr|,
4η
σ2
(cid:88)
(cid:27)
.
y2
r
r∈R1(∆)
Plugging the bounds from Lemma 1 into the above then yields
d
N
(cid:88)
(cid:26)
min
|yr|, 2
r |x⊤
y2
r (θ − θ∗)|
σ2
(cid:18)
exp
−2 min
0≤z≤1
(cid:19)(cid:27)
|yr x⊤
r θ(z)|
σ2
r∈R1(∆)
(cid:18)
d
N
≤ C
|S1(∆)|
N
d2 + log
d
δ
(cid:19)
(cid:26)
min
∆,
(cid:27)
.
4η
σ2 ∆2
31
(35)
Lastly, combining (34) and (35) with (33) gives
| ̄Q(θ)1 − ̄Q(θ′)1| ≤
λ
2
η + C
(cid:18) |S1(∆)|
d
+
d
N
log
(cid:19)
d
δ
(cid:26)
min
∆,
(cid:27)
.
4η
σ2 ∆2
Since ∆ = max{ η
λ , 3σ√
λ
}, we have
(cid:26)
min
∆,
(cid:27)
4η
σ2 ∆2
≤ max
(cid:26) η
λ
,
4η
σ2
(cid:16) 3σ
√
λ
(cid:17)2(cid:27)
≤ 36
η
λ
.
The above two bounds together with the assumptions N ≥ C′ d
δ and |S1(∆)| ≤ λ2
C′ d yield
| ̄Q(θ)1 − ̄Q(θ′)1| ≤
λ
2
η + C
(cid:18) λ2
C′ +
λ2
C′
λ2 log d
(cid:19)
η
λ
* 64
≤ λη,
once C′ is chosen to be sufficiently large.
For the final statement of the lemma, note that ˆQ(θ) = ˆΣ† ̄Q(θ), so we have
∥ ˆQ(θ) − ˆQ(θ′)∥∞ ≤ ∥ ˆΣ†∥∞∥ ̄Q(θ) − ̄Q(θ′)∥∞,
from which the conclusion follows.
We summarize the convergence results for the EM sequence in the following proposition.
Proposition 3. There exist absolute constants C, C′ > 0 such that the following holds for any
δ ∈ (0, 0.1) and any integer L ≥ 2. Fix θ(0) ∈ H and let ∆(0) := max{4L∥θ(0) − θ∗∥∞, 6
L σ}.
Suppose that
√
N ≥ C max
(cid:110)
L2d
L
L−1 log
dL
δ
, L3d log
(cid:111)
,
L
δ
|Si(∆(0))| ≤
max
i∈[d]
d
CL2 ,
(36a)
(36b)
where Si(*) is defined in (13a). Let {θ(t)}t≥0 be the EM iterates defined in (5). Moreover, let
τ := C′σ
(cid:114)
L d
N
log
d
δ
,
(cid:26)
(cid:24)
T := max
0,
log4/3
(cid:18) ∥θ(0) − θ∗∥∞
4τ
(cid:19)(cid:25)(cid:27)
.
Then it holds with probability at least 1 − δ that
• there exists ˆθ ∈ H such that ˆQ(ˆθ) = ˆθ and ∥ˆθ − θ∗∥∞ ≤ 4τ ;
• the sequence {θ(t)}t≥0 converges to ˆθ;
• ∥θ(T +t) − ˆθ ∥∞ ≤ 8τ /2t for all t ≥ 0.
Proof. By Proposition 2 and the assumption on N , it holds with probability at least 1 − δ/3 that
∥ ˆΣ†∥∞ ≤ 2L.
32
By Lemma 9, it holds with probability at least 1 − δ/3 that
∥ ˆQ(θ∗) − θ∗∥∞ ≤ C′σ
(cid:114)
L d
N
log
d
δ
= τ
(37)
for a constant C′ > 0. Applying Lemma 1 and Lemma 12 with λ = 1
at least 1 − δ/3, the following holds: For all θ, θ′ ∈ H and ∆ := max{4L∥θ − θ′∥∞, 6
that
4L , we see that with probability
L σ} such
√
max{∥θ − θ∗∥∞, ∥θ′ − θ∗∥∞} ≤
we have
∥ ˆQ(θ) − ˆQ(θ′)∥∞ ≤
d
CL2 ,
∆
6
max
i∈[d]
|Si(∆)| ≤
∥θ − θ′∥∞.
,
1
2
(38)
(39)
In the sequel, we condition on the event of probability at least 1 − δ that all the above bounds hold.
We split the rest of the proof into two parts as we will use the above conclusion twice.
Part I: Convergence to a neighborhood of the ground truth. Let us take θ = θ(t) for t ≥ 0
and θ′ = θ∗ in (38) and (39). Let ∆(t) := max{4L∥θ(t) − θ∗∥∞, 6
L σ}. Note that we have
∥θ(t) − θ∗∥∞ ≤ 4L
6 , so the first condition in (38) holds. We now show inductively
that, for t ≥ 0,
6 ∥θ(t) − θ∗∥∞ ≤ ∆(t)
√
∆(t) ≤ ∆(0),
(40)
and furthermore,
1
2
First, (40) is trivial for t = 0. Suppose that (40) holds. Then, by maxi∈[d] |Si(∆(0))| ≤ d
CL2
and that Si(*) is a nondecreasing function defined in (13a), we see that maxi∈[d] |Si(∆(t))| ≤ d
CL2 .
Hence (38) is satisfied, and then (39) implies
∥θ(t+1) − θ∗∥∞ ≤
∥θ(t) − θ∗∥∞ + τ.
(41)
Combining this bound with (37) gives (41).
∥θ(t+1) − ˆQ(θ∗)∥∞ ≤
1
2
∥θ(t) − θ∗∥∞.
Next, suppose that (41) holds. If ∥θ(t) − θ∗∥∞ ≥ 2τ , then (41) implies that ∥θ(t+1) − θ∗∥∞ ≤
∥θ(t) − θ∗∥∞. As a result, ∆(t+1) ≤ ∆(t), so (40) holds for t + 1 in place of t. On the other
hand, if ∥θ(t) − θ∗∥∞ ≤ 2τ , then (41) implies that ∥θ(t+1) − θ∗∥∞ ≤ 2τ . By the definition of
τ and our assumption on N , it is clear that 4L∥θ(t+1) − θ∗∥∞ ≤ 8Lτ ≤ 6
L σ. As a result,
∆(t+1) ≤ 6
L σ ≤ ∆(0), so again (40) holds for t + 1 in place of t. This completes the induction.
√
√
To conclude this part, note that by (41), the EM iterates {θ(t)}t≥0 satisfy
∥θ(t+1) − θ∗∥∞ ≤
3
4
∥θ(t) − θ∗∥∞
(42)
if ∥θ(t) − θ∗∥∞ > 4τ . Moreover, define
B := {θ ∈ H : ∥θ − θ∗∥∞ ≤ 4τ },
T1 := min (cid:8)t ≥ 0 : θ(t) ∈ B(cid:9).
By (42), we have
(cid:26)
(cid:24)
T1 ≤ max
0,
log4/3
(cid:18) ∥θ(0) − θ∗∥∞
4τ
(cid:19)(cid:25)(cid:27)
= T.
Finally, θ(t) ∈ B for all t ≥ T1 by (41).
33
Part II: Convergence to a fixed point. We now focus on the set B defined above. Fix any
θ, θ′ ∈ B. We have ∥θ − θ′∥∞ ≤ 8τ . By the definition of τ and our assumption on N , it holds that
4L∥θ − θ′∥∞ ≤ 16Lτ ≤ 6
L σ ≤ ∆(0). By our
L σ. Hence, ∆ = max{4L∥θ − θ′∥∞, 6
assumption on ∆(0) and that Si(*) is a nondecreasing function, we obtain maxi∈[d] |Si(∆)| ≤ d
CL2 .
In addition, max{∥θ − θ∗∥∞, ∥θ′ − θ∗∥∞} ≤ 4τ ≤
6 . Therefore, (38) is satisfied, and so
(39) holds.
L σ = ∆
L σ} = 6
√
√
√
√
Similar to Part I, taking θ′ = θ∗ in (39), we obtain
∥ ˆQ(θ) − θ∗∥∞ ≤ ∥ ˆQ(θ) − ˆQ(θ∗)∥∞ + ∥ ˆQ(θ∗) − θ∗∥∞ ≤
1
2
∥θ − θ∗∥∞ + τ ≤ 4τ,
so the EM operator ˆQ can be viewed as a map on B. Furthermore, (39) says that ˆQ is a contraction
on B. By the Banach fixed-point theorem, ˆQ has a unique fixed point ˆθ in B, and the EM sequence
{θ(t)}t≥0 converges to ˆθ with
∥θ(t+1) − ˆθ ∥∞ ≤
∥θ(t) − ˆθ ∥∞
1
2
for all t ≥ T1. Since ∥θ(T1) − ˆθ∥∞ ≤ 8τ , the conclusion follows immediately.
6.5 Sharp results in the low-noise regime
Before proving the sharp bound on ∥ˆθ − θ∗∥2, let us start with two lemmas that control the lower
order terms.
Lemma 13. There exist absolute constants C, C′ > 0 such as the following holds for any δ ∈
r θ∗| ≤
(0, 0.1). Suppose that all the bounds in Lemma 1 hold with the constant C, and that |yr − x⊤
Cσ
log N
δ for all r ∈ [N ]. Define
(cid:113)
A :=
d − 1
2N
N
(cid:88)
r=1
y2
r
σ2 tanh′
(cid:18) yrx⊤
r θ∗
σ2
(cid:19)
xrx⊤
r .
(43)
Moreover, let ∆ := 2Cσ
(cid:113)
log N
δ , and define Si(∆) as in (13a). Then we have
∥A∥∞ ≤ C′
(cid:18)
max
i∈[d]
|Si(∆)|
d
+
d
N
log
(cid:19)
d
δ
log
N
δ
.
Proof. We have ∥A∥∞ = maxi∈[d]
r )ii = (xrx⊤
entries (xrx⊤
σ2 tanh′ (cid:0) yrx⊤
r θ∗
y2
r
σ2
j=1 |Aij|.
r )ij = (xrx⊤
(cid:1) ≥ 0. Then, by the definition of A, it is not hard to see that
is the matrix with
r )ji = −1, and 0 elsewhere. Also, note that
If xr = ei − ej, then xrx⊤
r
r )jj = 1, (xrx⊤
(cid:80)d
d
(cid:88)
j=1
|Aij| =
d − 1
N
(cid:88)
r∈Ri
y2
r
σ2 tanh′
(cid:18) yrx⊤
r θ∗
σ2
(cid:19)
≤
4d
N
(cid:18)
y2
r
σ2 exp
− 2
(cid:12)
(cid:12)
(cid:12)
(cid:12)
r θ∗
yrx⊤
σ2
(cid:12)
(cid:19)
(cid:12)
(cid:12)
(cid:12)
(cid:88)
r∈Ri
(44)
where Ri is defined in (12), and the inequality follows from the fact 0 ≤ tanh′(t) = (cosh(t))−2 ≤
4 exp(−2|t|) for all t ∈ R.
34
(cid:113)
log N
For ∆ = 2Cσ
δ , let Ri(∆) be defined in (13b). Similar to the proof of Lemma 12, we
split the analysis of the sum in (44) into two parts. First, let us consider r ∈ Ri \ Ri(∆). Then
r θ∗| ≤ Cσ
|x⊤
r θ∗| > ∆, and by the assumption |yr − x⊤
δ = ∆/2, we have
log N
(cid:113)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
yrx⊤
r θ∗
σ2
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≥
(x⊤
r θ∗)2
2σ2
.
Consequently,
4d
N
(cid:88)
r∈Ri\Ri(∆)
(cid:18)
y2
r
σ2 exp
− 2
(cid:12)
(cid:12)
(cid:12)
(cid:12)
yrx⊤
r θ∗
σ2
(cid:12)
(cid:19)
(cid:12)
(cid:12)
(cid:12)
≤
4d
N
N
4(x⊤
r θ∗)2
σ2
(cid:18)
exp
−
(cid:19)
(x⊤
r θ∗)2
σ2
(a)
≤ 16 d
∆2
σ2 exp
(cid:18)
−
(cid:19) (b)
≤
∆2
σ2
1
N 10 ,
where (a) holds as the function t exp(−t) is decreasing for t ≥ 1, and (b) holds by the definition of
∆ provided that the constant C is sufficiently large.
Next, consider r ∈ Ri(∆). We have
(cid:12)
(cid:12)
(cid:12)
(cid:12)
y2
r
σ2 exp
4d
N
− 2
(cid:88)
(cid:18)
r θ∗
yrx⊤
σ2
r∈Ri(∆)
(cid:12)
(cid:19)
(cid:12)
(cid:12)
(cid:12)
≤
≤
4d
σ2N
4d
σ2N
(cid:88)
y2
r
r∈Ri(∆)
(cid:18)
C∆2
|Si(∆)|
= 16C3
(cid:18) |Si(∆)|
d
+
d
N
N
d2 + log
(cid:19)
d
δ
log
(cid:19)
d
δ
log
N
δ
,
where the second inequality follows from Lemma 1.
Finally, combining the above two bounds with (44) finishes the proof.
Lemma 14. There exist absolute constants C, C′ > 0 such as the following holds for any δ ∈
r θ∗| ≤
(0, 0.1). Suppose that all the bounds in Lemma 1 hold with the constant C, and that |yr − x⊤
Cσ
δ for all r ∈ [N ]. For θ ∈ H, t ∈ [0, 1]d, and r ∈ [N ], define
log N
(cid:113)
(cid:18) yrx⊤
r (θ∗ + tr(θ − θ∗))
(cid:19)
σ2
(x⊤
r (θ − θ∗))2,
ω(θ, r, tr) :=
ω(θ, t) :=
y2
r
2σ4 tanh′′
N
d − 1
(cid:88)
2N
r=1
ω(θ, r, tr) yr xr.
(45a)
(45b)
Suppose further that ∥θ − θ∗∥∞ ≤ C
4 σ
(cid:113)
log N
δ . Then we have
∥ω(θ, t)∥∞ ≤
C′
σ
∥θ − θ∗∥2
∞
(cid:16)
log
(cid:17)3/2
.
N
δ
Proof. Fix i ∈ [d]. By (45) and the definition of Ri in (13b), we have
|ω(θ, t)i| ≤
d − 1
2N
(cid:88)
r∈Ri
|ω(θ, r, tr) yr| ≤
d
4N
(cid:88)
r∈Ri
|y3
r |
σ4
(cid:12)
(cid:12)
tanh′′
(cid:12)
(cid:12)
(cid:18) yrx⊤
r (θ∗ + tr(θ − θ∗))
σ2
(cid:19)(cid:12)
(cid:12)
(cid:12)
(cid:12)
(x⊤
r (θ − θ∗))2.
35
Using that (cid:12)
(cid:12)tanh′′ (t)(cid:12)
(cid:12) ≤ 8 exp(−2|t|) for all t ∈ R and (x⊤
r (θ − θ∗))2 ≤ 4∥θ − θ∗∥2
∞, we obtain
|ω(θ, t)i| ≤
8d
σN
∥θ − θ∗∥2
∞
(cid:88)
r∈Ri
|y3
r |
σ3 exp
(cid:18)
−2
(cid:12)
(cid:12)
(cid:12)
(cid:12)
yrx⊤
r (θ∗ + tr(θ − θ∗))
σ2
(cid:12)
(cid:19)
(cid:12)
(cid:12)
(cid:12)
.
(46)
Similar to the proof of the previous lemma, we again split the analysis into two parts. Define
r θ∗| > ∆, and by the assumptions
δ . First, consider r ∈ Ri \ Ri(∆). Then |x⊤
log N
(cid:113)
r θ∗| ≤ ∆/2 and ∥θ − θ∗∥∞ ≤ ∆/4, we have tr|x⊤
r (θ − θ∗)| ≤ 2∥θ − θ∗∥∞ ≤ ∆/2 and
∆ := 2Cσ
|yr − x⊤
(cid:12)
(cid:12)
(cid:12)
(cid:12)
yrx⊤
r (θ∗ + tr(θ − θ∗))
σ2
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≥
(x⊤
r θ∗)2
4σ2
.
It follows that
|y3
r |
σ3 exp
(cid:18)
−2
(cid:12)
(cid:12)
(cid:12)
(cid:12)
yrx⊤
r (θ∗ + tr(θ − θ∗))
σ2
(cid:19)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤ 8
|x⊤
r θ∗|3
σ3
(cid:18)
exp
−
(cid:19)
(x⊤
r θ∗)2
2σ2
≤ 16
since the function t3 exp(−t2/2) ≤ 2 for t ∈ R. Next, consider r ∈ Ri(∆). Then |x⊤
|yr| ≤ 2∆. Hence we have
r θ∗| ≤ ∆ and so
|y3
r |
σ3 exp
(cid:18)
−2
(cid:12)
(cid:12)
(cid:12)
(cid:12)
yrx⊤
r (θ∗ + tr(θ − θ∗))
σ2
(cid:12)
(cid:19)
(cid:12)
(cid:12)
(cid:12)
≤ 8
∆3
σ3 = 64C3(cid:16)
log
(cid:17)3/2
.
N
δ
Putting the two cases together with (46), we obtain
|ω(θ, t)i| ≤
8d
σN
∥θ − θ∗∥2
∞ |Ri| * 64C3(cid:16)
log
(cid:17)3/2
N
δ
≤
C′
σ
∥θ − θ∗∥2
∞
(cid:16)
log
(cid:17)3/2
,
N
δ
where the second inequality follows from Lemma 1. This holds for any i ∈ [d], so the proof is
complete.
With these results in hand, we are now ready to perform a sharp analysis of ∥ˆθ − θ∗∥2.
Proposition 4. There exist absolute constants C, C′ > 0 such that the following holds for any
δ ∈ (0, 0.1) and any integer L ≥ 2. Fix θ(0) ∈ H and let ∆(0) := max{4L∥θ(0) − θ∗∥∞, 6
L σ}.
Also, let ∆ := 2Cσ
log N
(cid:113)
√
δ . Suppose that
N ≥ C max
(cid:110)
L2d
L
L−1 log
dL
δ
, L3d log
(cid:111)
,
L
δ
N ≫ L4 d
(cid:18)
log
|Si(∆(0))| ≤
max
i∈[d]
d
CL2 ,
(cid:18)
max
i∈[d]
|Si(∆)| = o
d
(L log(N/δ))3/2
(cid:19)5
N
δ
(cid:19)
,
,
(47a)
(47b)
where Si(*) is defined in (13a). Let ˆθ be the limit of the EM sequence {θ(t)}t≥0 defined in (5) as
guaranteed by Proposition 3. Then we have
∥ˆθ − θ∗∥2
2 ≤ (1 + o(1)) σ2 d − 1
2N
tr( ˆΣ†) + C′σ2
(cid:32)
(cid:114)
log
d3/2
N
1
δ
+
d
N
log
(cid:33)
.
1
δ
36
Proof. There is an event E of probability at least 1 − δ on which
• |yr − x⊤
r θ∗| ≤ Cσ
(cid:113)
log N
δ for all r ∈ [N ];
• the bounds in Lemma 1 hold;
• ∥ ˆΣ∥op ≤ 3, ∥ ˆΣ†∥op ≤ 5, and tr( ˆΣ†) ≥ (d − 1)/3 by Proposition 1 and Lemma 2;
• ∥ ˆΣ†∥∞ ≤ 2L by Proposition 2;
• ∥ ˆQ(θ∗) − θ∗∥2
2 ≤ σ2 d−1
2N tr( ˆΣ†) + Cσ2 (cid:16) d3/2
N
(cid:113)
log 1
δ + d
N log 1
δ
(cid:17)
by Lemmas 10 and 11;
• ∥ˆθ − θ∗∥∞ ≤ Cσ
(cid:113) L d
N log d
δ by Proposition 3;
• ∥A∥∞ ≤ C′ (cid:16)
maxi∈[d]
|Si(∆)|
d + d
N log d
δ
(cid:17)
log N
δ ≤ o
(cid:18)
(cid:19)
1
√
log(d/δ)
L3/2
by Lemma 13 and the as-
sumptions (47a) and (47b);
• ∥ω(ˆθ, t)∥∞ ≤ C′
σ ∥ˆθ − θ∗∥2
above bound on ∥ˆθ − θ∗∥∞, and (47a).
(cid:0)log N
δ
(cid:1)3/2
∞
≤ C′C2σ L d
N
(cid:0)log N
δ
(cid:1)5/2
≤ o
(cid:19)
(cid:18)
(cid:113) d
N
σ
L
by Lemma 14, the
Let us condition on the event E in the rest of the proof.
Since ˆΣˆθ = ˆΣ ˆQ(ˆθ) = ̄Q(ˆθ), we have
ˆΣ(ˆθ − θ∗) = ̄Q(ˆθ) − ̄Q(θ∗) + ̄Q(θ∗) − ˆΣθ∗
N
(cid:88)
(cid:33)
(cid:32)
(cid:32)
ˆθ
tanh
− tanh
yrx⊤
r
σ2
=
d − 1
2N
r=1
(cid:19)(cid:33)
(cid:18) yrx⊤
r θ∗
σ2
yrxr + ̄Q(θ∗) − ˆΣθ∗.
By Taylor's theorem, it holds that
tanh
(cid:33)
ˆθ
(cid:32)
yrx⊤
r
σ2
− tanh
(cid:19)
(cid:18) yrx⊤
r θ∗
σ2
= tanh′
(cid:18) yrx⊤
r θ∗
σ2
(cid:19) yrx⊤
r (ˆθ − θ∗)
σ2
+ ω(ˆθ, r, tr),
where the error term ω(ˆθ, r, tr) is defined in (45a) for some tr ∈ [0, 1]. With this in hand, we have
ˆΣ(ˆθ − θ∗) =
d − 1
2N
N
(cid:88)
r=1
tanh′
(cid:18) yrx⊤
r θ∗
σ2
(cid:19) yrx⊤
r (ˆθ − θ∗)
σ2
= A(ˆθ − θ∗) + ̄Q(θ∗) − ˆΣθ∗ + ω(ˆθ, t),
yrxr + ω(ˆθ, t) + ̄Q(θ∗) − ˆΣθ∗
where ω(ˆθ, t) is defined in (45b) for t = (t1, . . . , td), and A is defined in (43). It follows that
ˆθ − θ∗ = ˆQ(θ∗) − θ∗ + ˆΣ†A(ˆθ − θ∗) + ˆΣ†ω(ˆθ, t).
On the event E, the main term ˆQ(θ∗) − θ∗ in the above formula satisfies
∥ ˆQ(θ∗) − θ∗∥2
2 ≤ σ2 d − 1
2N
tr( ˆΣ†) + Cσ2
(cid:32)
(cid:114)
log
d3/2
N
1
δ
+
d
N
log
(cid:33)
.
1
δ
(48)
(49)
37
The error term satisfies
∥ ˆΣ†A(ˆθ − θ∗) + ˆΣ†ω(ˆθ, t)∥∞ ≤ ∥ ˆΣ†∥∞∥A∥∞∥ˆθ − θ∗∥∞ + ∥ ˆΣ†∥∞∥ω(ˆθ, t)∥∞ ≤ o
(cid:16)
σ(cid:112)d/N
(cid:17)
in view of the bounds ∥ ˆΣ†∥∞ ≤ 2L, ∥ˆθ − θ∗∥∞ ≤ Cσ
(cid:113) L d
N log d
δ , ∥A∥∞ ≤ o
∥ω(ˆθ, t)∥∞ ≤ o
(cid:19)
(cid:18)
(cid:113) d
N
σ
L
on the event E. It follows that
(cid:18)
1
√
log(d/δ)
L3/2
(cid:19)
, and
∥ ˆΣ†A(ˆθ − θ∗) + ˆΣ†ω(ˆθ, t)∥2
2 ≤ o (cid:0)σ2d2/N (cid:1) .
(50)
Finally, since tr( ˆΣ†) ≥ (d − 1)/3 on the event E, the first term of the bound in (49) dominates the
bound in (50). Combining (49) and (50) with (48) then completes the proof.
6.6 Proof of main results
Proof of Theorem 1. The theorem follows from Proposition 3 together with the assumption θ∗ ∈
Θ(β). We first check that the conditions in Theorem 1 imply the conditions in (36).
Checking (36a): On the one hand, and as claimed in the statement of the theorem,
On the other hand, choosing L = 1 + ⌈2/ρ⌉ and δ = N −D in Proposition 3, we obtain the sample
size requirement
N ≥ max{d1+ρ, N0}.
(51)
N ≥ C max
(cid:110)
L2d
L
L−1 log
dL
δ
, L3d log
(cid:111)
.
L
δ
(52)
It can be easily verified that for a sufficiently large constant N0 > 0, (51) implies (52).
Checking (36b): Furthermore, since θ∗ ∈ Θ(β), if |θ∗
we have
j | ≤ ∆, then |i − j| ≤ ∆d/β. Therefore,
i − θ∗
Si(∆) = {j ∈ [d] \ {i} : |θ∗
i − θ∗
j | ≤ ∆} ⊂ {j ∈ [d] \ {i} : |i − j| ≤ ∆d/β},
so
As a result, for ∆(0) = max{4L∥θ(0) − θ∗∥∞, 6
L σ}, it holds that
|Si(∆)| ≤ 2∆d/β.
√
|Si(∆(0))| ≤ max{8L∥θ(0) − θ∗∥∞d/β, 12
√
L σd/β} ≤
d
CL2
max
i∈[d]
(53)
in view of the assumptions ∥θ(0) − θ∗∥∞ ≤ c1β and σ ≤ c1β.
It remains to compare τ in Theorem 1 and Proposition 3: once we set δ = N −D, the two are
the same up to multiplicative factors depending solely on the pair (ρ, D).
Proof of Theorem 2. The theorem follows from Proposition 4. Continuing from the proof of Theo-
rem 1, we check the two additional conditions in (47) compared to (36).
Checking (47a): Choosing L = 1 + ⌈2/ρ⌉ and δ = N −D again, we can use the assumption
N ≥ max{d1+ρ, N0} to verify that
N ≫ L4 d
(cid:18)
log
(cid:19)5
.
N
δ
38
Checking (47b): We again have |Si(∆)| ≤ 2∆d/β, so for ∆ = 2Cσ
(cid:113)
log N
δ , it holds
max
i∈[d]
|Si(∆)| ≤
4Cσd
β
(cid:114)
log
N
δ
(cid:18)
= o
d
(L log(N/δ))3/2
(cid:19)
in view of the assumption σ = o
Implication: Proposition 4 then gives
β
(log N )2
(cid:16)
(cid:17)
.
∥ˆθ − θ∗∥2
2 ≤ (1 + o(1)) σ2 d − 1
2N
tr( ˆΣ†) + C′σ2
(cid:32)
d3/2
N
(cid:112)log N +
(cid:33)
log N
.
d
N
Finally, tr( ˆΣ†) ≥ (d − 1)/3 with high probability by Lemma 2, so the first term above dominates
the other terms when d ≫ log N . Therefore, Theorem 2 follows.
A Probability tools
Lemma 15 (Gaussian concentration, Theorem 5.2.2 of Vershynin (2018)). Consider a random
vector X ∼ N (0, In) and an L-Lipschitz function f : Rn → R. Then we have
Pr{|f (X) − E[f (X)]| ≥ t} ≤ 2 exp (cid:0)−c t2/L2(cid:1)
for an absolute constant c > 0.
Definition 1 (Convex concentration property). Let X be a random vector in Rn. We say that
X has the convex concentration property with constant K if for every 1-Lipschitz convex function
φ : Rn → R, we have E[|φ(X)|] < ∞, and for every t > 0,
Pr{|φ(X) − E[φ(X)]| ≥ t} ≤ 2 exp (cid:0)−t2/K2(cid:1) .
Lemma 16 (Theorem 2.3 of Adamczak (2015)). Let X be a mean zero random vector in Rn. If
X has the convex concentration property with constant K, then for any A ∈ Rn×n and any t > 0,
Pr{|X ⊤AX − E[X ⊤AX]| ≥ t} ≤ 2 exp
(cid:18)
−
1
C
(cid:18)
min
t2
K4∥A∥2
F
,
t
K2∥A∥op
(cid:19)(cid:19)
,
for an absolute constant C > 0.
Lemma 17 (Matrix Bernstein, Theorem 1.6.2 of Tropp (2015)). Consider a finite sequence {Xk}N
of independent, random, Hermitian matrices in Rd×d. Assume that
k=1
E[Xk] = 0 and
∥Xk∥op ≤ L for each k ∈ [N ].
Introduce the random matrix
Y =
Xk.
N
(cid:88)
k=1
39
Let v(Y ) be the matrix variance statistic of the sum:
Then
Furthermore, for all t > 0,
v(Y ) = ∥E[Y 2]∥ =
(cid:13)
(cid:13)
(cid:13)
(cid:13)
N
(cid:88)
k=1
(cid:13)
(cid:13)
E[X 2
.
k ]
(cid:13)
(cid:13)
E[∥Y ∥] ≤ (cid:112)2v(Y ) log(2d) +
1
3
L log(2d).
Pr{∥Y ∥ ≥ t} ≤ 2d exp
−
(cid:18)
t2/2
v(Y ) + Lt/3
(cid:19)
.
Lemma 18 (Lemma 2.27 of Wainwright (2019)). Let f : RN → R be a differentiable function.
Then for every convex function φ : R → R, we have
E[φ(f (X) − E[f (X)])] ≤ E
(cid:104)
φ
(cid:16) π
2
(cid:17)(cid:105)
⟨∇f, Y ⟩
,
where X, Y ∼ N (0, IN ) are independent standard Gaussians.
B Improved sample complexity
In Theorem 1, we assume the conditions
• (sample size) N ≥ d1+ρ;
• (noise) σ ≤ c1β;
• (initialization) ∥θ(0) − θ∗∥∞ ≤ c1β.
It is possible to improve the sample complexity at the cost of strengthening the other two conditions.
Namely, we may assume the alternative conditions
• (sample size) N ≥ d (log d)C1;
• (noise) σ ≤ c2 β
(log d)5/2 ;
• (initialization) ∥θ(0) − θ∗∥∞ ≤ c2 β
(log d)3 .
To see the sufficiency of this set of conditions, we apply Proposition 3 with L = (cid:6) log d
δ = N −D for a constant D > 0. It suffices to check the two conditions in (36). We have
log log d ⌉ and
1
L−1 ≤ d
Therefore, if N ≥ d (log d)C1 for a sufficiently large constant C1 = C1(D) > 0, then
(cid:110)
log d = (log d)2.
d
2 log log d
N ≥ C max
L2d
L
L−1 log
, L3d log
dL
δ
(cid:111)
.
L
δ
Further, as in (53), we have
|Si(∆(0))| ≤ max{8L∥θ(0) − θ∗∥∞d/β, 12
√
L σd/β} ≤
d
CL2
max
i∈[d]
provided that ∥θ(0) − θ∗∥∞ ≤ β
be sufficiently small.
8CL3 and σ ≤
β
12CL5/2 . These are satisfied once we choose c2 > 0 to
40
C Minimax lower bounds with a fixed design
If the signs zr are given in the model (1) and the covariates xr are fixed, then the problem reduces
to linear regression with a fixed design. It is an elementary fact that the least squares estimator
ˆθLS achieves the risk
E ∥ˆθLS − θ∗∥2
2 = σ2 tr
(cid:18)(cid:16) N
(cid:88)
(cid:17)†(cid:19)
.
xrx⊤
r
r=1
It is well-known that this risk is minimax-optimal. To show that σ2 tr
is a lower
bound on the minimax risk, the standard proof is via the Bayes risk assuming that θ∗ has the
prior distribution N
for a parameter τ . One can compute the Bayes-optimal
estimator which is the posterior mean of θ∗. Then the Bayes risk achieved by the posterior mean
evaluates to τ 2
. Since the Bayes risk is a lower bound on the minimax risk,
letting τ → ∞ proves the desired lower bound.
0, τ 2(cid:0) (cid:80)N
1+τ 2 σ2 tr
r=1 xrx⊤
r
r=1 xrx⊤
r
r=1 xrx⊤
r
(cid:16)(cid:0) (cid:80)N
(cid:1)†(cid:17)
(cid:1)†(cid:17)
(cid:16)
(cid:16)(cid:0) (cid:80)N
(cid:1)†(cid:17)
(cid:1)†(cid:17)
r=1 xrx⊤
r
If the signs zr are unknown in the mixture model (1) and the covariates xr are fixed, then
(cid:16)(cid:0) (cid:80)N
is still a lower bound on the minimax risk for estimating θ∗. Therefore,
σ2 tr
conditional on a typical realization of (xr)N
r=1, the proof of Theorem 2 in fact shows that the EM
fixed point ˆθ achieves the minimax rate with the sharp constant (see Theorem 2 and Eq. (7)). Since
this work assumes a random design of the covariates, to keep our terminology consistent, we do not
further formalize a minimax result in the fixed-design setting.
Acknowledgments
AD was supported in part by NSF grant DMS-2053333. CM was supported in part by NSF grants
DMS-2053333 and DMS-2210734. AP was supported in part by NSF grants CCF-2107455 and
DMS-2210734, and by Research Awards from Adobe and Amazon. CM thanks Dylan J. Altschuler
and Anderson Ye Zhang for helpful discussions.
References
E. Abbe, S. Li, and A. Sly. Proof of the contiguity conjecture and lognormal limit for the sym-
metric perceptron. In 2021 IEEE 62nd Annual Symposium on Foundations of Computer Science
(FOCS), pages 327–338. IEEE, 2022.
R. Adamczak. A note on the Hanson–Wright inequality for random vectors with dependencies.
Electronic Communications in Probability, 20:1–13, 2015.
D. J. Altschuler. Critical window of the symmetric perceptron. arXiv preprint arXiv:2205.02319,
2022.
S. Balakrishnan, M. J. Wainwright, and B. Yu. Statistical guarantees for the EM algorithm: From
population to sample-based analysis. The Annals of Statistics, 45(1):77 – 120, 2017.
I. Borg and P. J. Groenen. Modern multidimensional scaling: Theory and applications. Springer
Science & Business Media, 2005.
41
R. A. Bradley and M. E. Terry. Rank analysis of incomplete block designs: I. the method of paired
comparisons. Biometrika, 39(3/4):324–345, 1952.
A. T. Chaganty and P. Liang. Spectral experts for estimating mixtures of linear regressions. In
International Conference on Machine Learning, pages 1040–1048. PMLR, 2013.
K. A. Chandrasekher, A. Pananjady, and C. Thrampoulidis. Sharp global convergence guar-
antees for iterative nonconvex optimization: A Gaussian process perspective. arXiv preprint
arXiv:2109.09859, 2021.
P. Chen, C. Gao, and A. Y. Zhang. Optimal full ranking from pairwise comparisons. The Annals
of Statistics, 50(3):1775–1805, 2022.
S. Chen, J. Li, and Z. Song. Learning mixtures of linear regressions in subexponential time via
Fourier moments. In Proceedings of the 52nd Annual ACM SIGACT Symposium on Theory of
Computing, pages 587–600, 2020.
X. Chen, P. N. Bennett, K. Collins-Thompson, and E. Horvitz. Pairwise ranking aggregation in a
crowdsourced setting. In Proceedings of the sixth ACM international conference on Web search
and data mining, pages 193–202, 2013.
Y. Chen, X. Yi, and C. Caramanis. Convex and nonconvex formulations for mixed regression with
IEEE Transactions on Information Theory, 64(3):
two components: Minimax optimal rates.
1738–1766, 2017.
Y. Chen, Y. Chi, J. Fan, and C. Ma. Gradient descent with random initialization: Fast global
convergence for nonconvex phase retrieval. Mathematical Programming, 176:5–37, 2019.
Y. Chen, Y. Chi, J. Fan, and C. Ma. Spectral methods for data science: A statistical perspective.
Foundations and Trends® in Machine Learning, 14(5):566–806, 2021.
F. Chierichetti, R. Kumar, and A. Tomkins. Learning a mixture of two multinomial logits.
In
International Conference on Machine Learning, pages 961–969. PMLR, 2018.
F. Chung and M. Radcliffe. On the spectra of general random graphs. the electronic journal of
combinatorics, pages P215–P215, 2011.
A. Coja-Oghlan. On the Laplacian eigenvalues of G(n, p). Combinatorics, Probability and Com-
puting, 16(6):923–946, 2007.
M. Cucuringu and H. Tyagi. An extension of the angular synchronization problem to the hetero-
geneous setting. arXiv preprint arXiv:2012.14932, 2020.
Y. Dagan, V. Kandiros, and C. Daskalakis. EM's convergence in Gaussian latent tree models. In
P.-L. Loh and M. Raginsky, editors, Proceedings of Thirty Fifth Conference on Learning Theory,
volume 178 of Proceedings of Machine Learning Research, pages 2597–2667. PMLR, 02–05 Jul
2022.
C. Daskalakis, C. Tzamos, and M. Zampetakis. Ten steps of EM suffice for mixtures of two
Gaussians. In Conference on Learning Theory, pages 704–710. PMLR, 2017.
42
A. P. Dawid and A. M. Skene. Maximum likelihood estimation of observer error-rates using the EM
algorithm. Journal of the Royal Statistical Society: Series C (Applied Statistics), 28(1):20–28,
1979.
A. P. Dempster, N. M. Laird, and D. B. Rubin. Maximum likelihood from incomplete data via
the EM algorithm. Journal of the royal statistical society: series B (methodological), 39(1):1–22,
1977.
D. Drusvyatskiy, N. Krislock, Y.-L. Voronin, and H. Wolkowicz. Noisy euclidean distance real-
ization: robust facial reduction and the pareto frontier. SIAM Journal on Optimization, 27(4):
2301–2331, 2017.
R. Dudeja, Y. M. Lu, and S. Sen. Universality of approximate message passing with semi-random
matrices. arXiv preprint arXiv:2204.04281, 2022.
R. Dwivedi, N. Ho, K. Khamaru, M. J. Wainwright, M. I. Jordan, and B. Yu. Singularity, misspec-
ification and the convergence rate of EM. The Annals of Statistics, 48(6):3161 – 3182, 2020.
Y. C. Eldar and S. Mendelson. Phase retrieval: Stability and recovery guarantees. Applied and
Computational Harmonic Analysis, 36(3):473–494, 2014.
U. Feige and E. Ofek. Spectral techniques applied to sparse random graphs. Random Structures &
Algorithms, 27(2):251–275, 2005.
C. Gao and A. Y. Zhang. Exact minimax estimation for phase synchronization. IEEE Transactions
on Information Theory, 67(12):8236–8247, 2021.
J. C. Gower. Euclidean distance geometry. Math. Sci, 7(1):1–14, 1982.
C. Heumann, B. Gr ̈un, and F. Leisch. Finite mixtures of generalized linear regression models.
Recent advances in linear models and related areas: essays in honour of helge toutenburg, pages
205–230, 2008.
M. I. Jordan and R. A. Jacobs. Hierarchical mixtures of experts and the EM algorithm. Neural
computation, 6(2):181–214, 1994.
J. M. Klusowski, D. Yang, and W. Brinda. Estimating the coefficients of a mixture of two linear
IEEE Transactions on Information Theory, 65(6):
regressions by expectation maximization.
3515–3524, 2019.
T. Kolokolnikov, B. Osting, and J. Von Brecht. Algebraic connectivity of Erd ̈os–R ́enyi graphs near
the connectivity threshold. Manuscript in preparation, 2014.
J. Kwon and C. Caramanis. EM converges for a mixture of many linear regressions. In International
Conference on Artificial Intelligence and Statistics, pages 1727–1736. PMLR, 2020.
J. Kwon, W. Qian, C. Caramanis, Y. Chen, and D. Davis. Global convergence of the EM algorithm
for mixtures of two component linear regression. In Conference on Learning Theory, pages 2055–
2110. PMLR, 2019.
43
J. Kwon, N. Ho, and C. Caramanis. On the minimax optimality of the EM algorithm for learning
In International Conference on Artificial Intelligence
two-component mixed linear regression.
and Statistics, pages 1405–1413. PMLR, 2021.
R. Lai and J. Li. Solving partial differential equations on manifolds from incomplete interpoint
distance. SIAM Journal on Scientific Computing, 39(5):A2231–A2256, 2017.
Y. Li and Y. Liang. Learning mixtures of linear regressions with nearly optimal complexity. In
Conference On Learning Theory, pages 1125–1144. PMLR, 2018.
L. Liberti, C. Lavor, N. Maculan, and A. Mucherino. Euclidean distance geometry and applications.
SIAM review, 56(1):3–69, 2014.
A. Liu, Z. Zhao, C. Liao, P. Lu, and L. Xia. Learning Plackett–Luce mixtures from partial pref-
In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages
erences.
4328–4335, 2019.
R. D. Luce. Individual choice behavior: A theoretical analysis. Wiley, 1959.
C. Mao and Y. Wu. Learning mixtures of permutations: Groups of pairwise comparisons and
combinatorial method of moments. The Annals of Statistics, 50(4):2231–2255, 2022.
C. Mollica and L. Tardella. Bayesian Plackett–Luce mixture models for partially ranked data.
Psychometrika, 82(2):442–458, 2017.
D. Nguyen and A. Y. Zhang. Efficient and accurate learning of mixtures of Plackett–Luce models.
arXiv preprint arXiv:2302.05343, 2023.
W. Perkins and C. Xu. Frozen 1-rsb structure of the symmetric ising perceptron. In Proceedings
of the 53rd Annual ACM SIGACT Symposium on Theory of Computing, pages 1579–1588, 2021.
R. L. Plackett. The analysis of permutations. Journal of the Royal Statistical Society Series C:
Applied Statistics, 24(2):193–202, 1975.
W. Qian, Y. Zhang, and Y. Chen. Global convergence of least squares EM for demixing two
log-concave densities. Advances in Neural Information Processing Systems, 32, 2019.
H. Sedghi, M. Janzamin, and A. Anandkumar. Provable tensor methods for learning mixtures of
generalized linear models. In Artificial Intelligence and Statistics, pages 1223–1231. PMLR, 2016.
A. Singer. Angular synchronization by eigenvectors and semidefinite programming. Applied and
computational harmonic analysis, 30(1):20–36, 2011.
J. Spencer. Six standard deviations suffice. Transactions of the American mathematical society,
289(2):679–706, 1985.
S. Sremac, F. Wang, H. Wolkowicz, and L. Pettersson. Noisy Euclidean distance matrix completion
with a single missing node. Journal of Global Optimization, 75:973–1002, 2019.
Y. Sun, S. Ioannidis, and A. Montanari. Learning mixtures of linear classifiers. In International
Conference on Machine Learning, pages 721–729. PMLR, 2014.
44
A. Tasissa and R. Lai. Exact reconstruction of Euclidean distance geometry problem using low-rank
matrix completion. IEEE Transactions on Information Theory, 65(5):3124–3144, 2018.
J. A. Tropp. An introduction to matrix concentration inequalities. Foundations and Trends® in
Machine Learning, 8(1-2):1–230, 2015.
R. Vershynin. High-dimensional probability: An introduction with applications in data science,
volume 47. Cambridge university press, 2018.
K. Viele and B. Tong. Modeling with mixtures of linear regressions. Statistics and Computing, 12:
315–330, 2002.
M. J. Wainwright. High-dimensional statistics: A non-asymptotic viewpoint, volume 48. Cambridge
University Press, 2019.
T. Wang, X. Zhong, and Z. Fan. Universality of approximate message passing algorithms and
tensor networks. arXiv preprint arXiv:2206.13037, 2022.
C. J. Wu. On the convergence properties of the EM algorithm. The Annals of statistics, pages
95–103, 1983.
Y. Wu and H. H. Zhou. Randomly initialized EM algorithm for two-component Gaussian mixture
n) iterations. Mathematical Statistics and Learning, 4(3), 2021.
achieves near optimality in O(
√
J. Xu, D. J. Hsu, and A. Maleki. Global analysis of expectation maximization for mixtures of two
gaussians. Advances in Neural Information Processing Systems, 29, 2016.
L. Xu, M. Jordan, and G. E. Hinton. An alternative model for mixtures of experts. Advances in
neural information processing systems, 7, 1994.
X. Zhang, X. Zhang, P.-L. Loh, and Y. Liang. On the identifiability of mixtures of ranking models.
arXiv preprint arXiv:2201.13132, 2022.
Z. Zhao, P. Piech, and L. Xia. Learning mixtures of Plackett–Luce models.
In International
Conference on Machine Learning, pages 2906–2914. PMLR, 2016.
Z. Zhao, A. Liu, and L. Xia. Learning mixtures of random utility models with features from
incomplete preferences. arXiv preprint arXiv:2006.03869, 2022.
Y. Zhong and N. Boumal. Near-optimal bounds for phase synchronization. SIAM Journal on
Optimization, 28(2):989–1016, 2018.
45
|
|
http://arxiv.org/abs/2302.10062v1 | 2023-02-20T16:08:54 | 2023-02-20T16:08:54 | An evaluation of deep learning models for predicting water depth
evolution in urban floods | In this technical report we compare different deep learning models for
prediction of water depth rasters at high spatial resolution. Efficient,
accurate, and fast methods for water depth prediction are nowadays important as
urban floods are increasing due to higher rainfall intensity caused by climate
change, expansion of cities and changes in land use. While hydrodynamic models
models can provide reliable forecasts by simulating water depth at every
location of a catchment, they also have a high computational burden which
jeopardizes their application to real-time prediction in large urban areas at
high spatial resolution. Here, we propose to address this issue by using
data-driven techniques. Specifically, we evaluate deep learning models which
are trained to reproduce the data simulated by the CADDIES cellular-automata
flood model, providing flood forecasts that can occur at different future time
horizons. The advantage of using such models is that they can learn the
underlying physical phenomena a priori, preventing manual parameter setting and
computational burden. We perform experiments on a dataset consisting of two
catchments areas within Switzerland with 18 simpler, short rainfall patterns
and 4 long, more complex ones. Our results show that the deep learning models
present in general lower errors compared to the other methods, especially for
water depths $>0.5m$. However, when testing on more complex rainfall events or
unseen catchment areas, the deep models do not show benefits over the simpler
ones. | [
"Stefania Russo",
"Nathanaël Perraudin",
"Steven Stalder",
"Fernando Perez-Cruz",
"Joao Paulo Leitao",
"Guillaume Obozinski",
"Jan Dirk Wegner"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.10062v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.10062v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"physics.ao-ph"
] | 3
2
0
2
b
e
F
0
2
]
G
L
.
s
c
[
1
v
2
6
0
0
1
.
2
0
3
2
:
v
i
X
r
a
An evaluation of deep learning models for predicting water depth
evolution in urban floods
Stefania Russo2, Nathana ̈el Perraudin1, Steven Stalder1, Fernando Perez-Cruz1, Joao Paulo
Leitao3, Guillaume Obozinski1, and Jan Dirk Wegner4
1Swiss Data Science Center, ETH Z ̈urich and EPF Lausanne, Switzerland
2Photogrammetry and Remote Sensing group, ETH Zurich, Switzerland
3Department of Urban Water Management, EAWAG, Switzerland
4Institute for Computational Science, University of Zurich, Switzerland
August 2022
Abstract
In this technical report we compare different deep learning models for prediction of water depth rasters
at high spatial resolution. Efficient, accurate, and fast methods for water depth prediction are nowadays
important as urban floods are increasing due to higher rainfall intensity caused by climate change, expansion
of cities and changes in land use. While hydrodynamic models models can provide reliable forecasts by
simulating water depth at every location of a catchment, they also have a high computational burden which
jeopardizes their application to real-time prediction in large urban areas at high spatial resolution. Here,
we propose to address this issue by using data-driven techniques. Specifically, we evaluate deep learning
models which are trained to reproduce the data simulated by the CADDIES cellular-automata flood model,
providing flood forecasts that can occur at different future time horizons. The advantage of using such
models is that they can learn the underlying physical phenomena a priori, preventing manual parameter
setting and computational burden. We perform experiments on a dataset consisting of two catchments areas
within Switzerland with 18 simpler, short rainfall patterns and 4 long, more complex ones. Our results show
that the deep learning models present in general lower errors compared to the other methods, especially for
water depths > 0.5m. However, when testing on more complex rainfall events or unseen catchment areas,
the deep models do not show benefits over the simpler ones.
1
Introduction
Floods are one of the most common natural disasters with an unpredictable and destructive force carrying
devastating consequences for infrastructure, economy and societies [34]. At the whim of nature, floods can
affect massive areas leaving no possibility to prevent or undo the destruction following the disaster. In urban
areas, floods occur when natural water sources or drainage systems in cities lack the capacity to convey
excess water caused by intense rainfall events [1]. Thus, early warning systems through real-time flood
predictions [31], and a quick and effective response from rescue services make up the most essential counter-
measures to floods [41]. While hydrodynamic flood simulation models can provide reliable forecasts for water
depth at every location of a catchment, their high computational burden, as well as required expertise and
in-depth knowledge about hydrological parameters [36] is hindering their application. For this reason, data-
driven models have been developed in recent years for flood forecasting and prediction [45, 33, 22, 18], In
this technical report, we compare several deep learning models for dense water depth prediction at different
future time horizons. The models only require terrain features such as the Digital Elevation Model (DEM)
of the area under study and a rainfall forecast.
1
We evaluate the models on a dataset consisting of two catchments areas within Switzerland with 18
simple, short rainfall patterns and 4 long, more complex ones. Our results show that the deep learning
models present in general lower errors compared to the other methods, especially for water depths > 0.5m.
On the other hand, the deep models do not show any benefits over the simpler one when testing on more
complex rainfall events or unseen catchment areas. We discuss that this is probably caused by the fact
that the networks only capture the easiest correlations in the dataset so and fail to do so for the complex
dynamics in the long rainfall events. We conclude this report proposing potential solutions for future works.
2 Related Works
Flooding is and has been a massive concern over past decades, causing wide-spread damage to infrastructure
and economy. Greatest damages can arise especially in the case of urban flash-floods where the reaction
time and planning time is limited. Predicting large scale flash-floods is therefore crucial to support counter
measures such as early warning systems. In this section, an overview of techniques for flood prediction is
given.
Hydrodynamic models have been in use for long time to predict water-related events, such as floods [14],
storms [4, 13], rainfall/runoff [6, 16] and flows [12, 49]. Physically-based hydrodynamic models have been used
for a long time in urban flood simulation [5, 9, 2]. Nevertheless, the development of physically-based models
often requires expertise related to hydrological parameters, making the application to spatial flood forecasting
challenging [28], in addition to its high computational cost. Other approaches used for flood prediction are
simple and easy-to-use statistical models, such as multiple criteria decision methods, weights-of-evidence and
flood frequency analysis [40]. However, due to various simplifying assumptions, they often produce results
with insufficient precision and tend to be unreliable. Another group of models for flood estimation are the so-
called physically-simplified approaches [32, 25] predicting floods through simplified hydraulic notions. As a
result, these model provide predictions with much lower computational costs [24, 38]. The cellular-automata
flood models [20] have recently gained attention by the hydrological community. Instead of solving complex
shallow water equations, these models carry out faster flood modelling by using transition rules which work
by predicting the new state (i.e. the amount of water in each cell) based on the cell's previous state and its
neighbors. This is applied on all raster cells in parallel, thus supporting GPU parallelism, greatly reducing
the simulation time [20] at the cost of accuracy.
The shortcomings of the above mentioned hydrodynamic models encouraged the use of advanced data-
driven models, such as Machine Learning (ML). A further reason for the popularity of ML is that it can
numerically formulate the nonlinear characteristics of the flood without the need to learn the physical pro-
cesses from scratch [37]. Many ML models, such as multilayer perceptron [42], wavelet neural networks [39],
support vector machine [46, 11], decision tree based classifiers [27, 26], neuro-fuzzy [35], and artificial neural
networks (ANNs) [26], have been applied to flood forecasting.
In recent years, Deep Learning (DL) models, which fall into the general umbrella of ML, have gained
more popularity since they overcome many of the limitations of traditional ML methods on the modelling
process [47]. Compared to earlier ANNs, DL models can identify complex nonlinear relationships underlying
predictor and outcome variables [40], which also enables DL models to outperform traditional ML methods
in flood forecasting tasks successfully. In [8], the authors forecast a river stream flow based on the rainfall
measurements from several gauge stations using a recurrent neural network. This method was later extended
to multiple-step-ahead using an expandable ANN architecture in [7].
In [30], a single long short-term
memory model was trained on hundreds of basins using meteorological time series data and static catchment
attributes. Their approach significantly outperformed hydrological models that were calibrated regionally.
[45] used a convolutional neural network (CNN) model to perform a daily runoff prediction. Similarly, [33]
employed a CNN to predict the maximum water depth maps (i.e. an hazard map) in urban pluvial flood
events. [22] also used a CNN-based U-Net [43] model, exploring the where the generalization capabilities of
CNNs as flood prediction models. Recently, in [18], DL techniques were used for predicting gauge height,
with higher accuracy than the physical and statistical models currently in use.
While most of the above works focus on predicting the maximum water depth that can occur for any point
in the map in the near future, in this technical report we consider the task of providing flood forecasts at
different future time horizons (i.e. 30 minutes, 1 hour). In this way, we aim at modeling the full evolution of
2
water depth at different time steps.
3 Experiment setup
Figure 1: DEM (normalized elevation) of the main catchment area 709. Dark to light color indicates low to
high elevation. The values that are completely zero are not part of the catchment area.
3.1 Dataset
For our experiments, we use a dataset consisting of simulations run by the CADDIES cellular-automata
flood model [19]. The transformation rules of the CADDIES model establish flow motions through a weight-
based mechanism, which avoid the need to solve complicated and time-consuming equations. It outperforms
physically-based models for solving shallow water equations in terms of computational performance, with
a decrease in accuracy [19]. Using this dataset allows us to conveniently verify our approach with low
computational effort. The simulated results consist of pairings of rainfall events and water depths in two
catchment areas across Switzerland, which are named 709 and 744 according to a DEM numbering system.
The data comes with a spatial resolution of 1m.
Data Preparation Most experiments are performed on the catchment area 709 from the dataset, whose
elevation map we show in Fig. 1. Eighteen different one-hour short rainfall events in this catchment area are
created based on the return periods of 2, 5, 10, 20, 50, and 100 years. Additionally, we have access to four
long rainfall events over time periods of up to four hours. In Figure 2, we show the amount of rainfall for
the short events, split into training and test sets, as well as for all long events, which we individually add to
the training or test set for some experiments. The simulation are discretized with a time step of 5 minutes.
The evolution of spatial water depths for one rainfall event is shown in
Fig. 4. The time steps 1, 6, 8, 12, 16, 36, 46, and 61 are chosen to give an
overview of the entire event. Note that one time step equals 5 minutes. It can
be seen that the water depth quickly rises during time steps 1 to 12, and starts
to decrease slowly after until the last time step 61. This is consistent with the
rainfall event that only lasts for 60 minutes, which equals 12 time steps.
Note that most areas have very low water depths or no water at all (see
Figure 3). Most of the water will be densely concentrated in a few small areas.
These areas are also the most critical ones, and therefore we care most about
correctly predicting these extreme water depths.
In Section 4, we will also show one experiment on catchment area 744. How-
ever, because that data is structured and preprocessed in the same way as the
one for catchment area 709, we will omit its details from the next paragraphs.
Figure 3: Histogram of wa-
ter depths for event tr2 1.
Data Preprocessing Five features are selected and concatenated as input data X for the models, including
the DEM elevation D, spatial differential DEM elevation ∆D, rainfall R, water depth W , as well as temporal
differential water depth ∆W if the number of given input time steps is greater than 1.
These features are concatenated as multi-channel images (rasters), which are composed of 3×T+H+3
channels, where T is the number of input time steps ordered from oldest to latest, and H is the amount of
3
0.60.70.80.91.00246810Water depth (m)101103105107Figure 2: Hyetographs of rainfall events used for simulations. For the short events, the first number of the
label denotes the return period, while the second denotes the time step discretization (5 minutes - "1", 10
minutes - "2" and 15 minutes - "3"). For the long events: the same naming is applied, in addition to "c"
that stands for "continued" rainfall. Additionally, two real long rainfall events were also used, real1 c1 and
real2 c1, lasting two hours and with a return period of approximately 20 years.
Figure 4: Evolution of spatial water depth over time for event tr2 1.
time steps we want to predict ahead for. The resolution of the catchment area 709 is 2525×3000, resulting
in the corresponding shapes of the features, as shown in the Table 1.
Variable Feature
D
∆D
R
W
∆W
DEM
spatial differential DEM
rainfall
water depth
temporal differential water depth
Shape
2525×3000×1
2525×3000×4
2525×3000×(T + H − 1)
2525×3000×T
2525×3000×(T − 1)
Table 1: Shape of the input features for catchment area 709. The input X consist of the concatenation of
some or all of these features.
The process to obtain ∆D and ∆W is as follows:
• ∆D: The DEM can be viewed as a 2D grid, where the elevation change can be measured in four
4
0102030405060Minutes020406080100120140Rainfall (mm/h)709 Short Events (Train + Val)tr5_1tr20_1tr50_1tr2_2tr10_2tr20_2tr50_2tr5_3tr10_3tr100_3tr100_2tr2_30102030405060Minutes020406080100120140160Rainfall (mm/h)709 Short Events (Test)tr2_1tr10_1tr100_1tr5_2tr20_3tr50_3050100150200250Minutes020406080100Rainfall (mm/h)709 Long Eventsreal1_c1tr50_3c2tr50_3c1real2_c1directions: left, right, down and up. For each direction, we pad D with -1 on the respective side before
performing the subtractions along the columns (c) or rows (r) to introduce the correct shift in the
output and to obtain the ∆D with the same resolution as D:
∆D(i)
1 = c(i) − c(i−1) (Leftward change)
∆D(i)
2 = c(i) − c(i+1) (Rightward change)
∆D(j)
3 = r(j) − r(j−1) (Downward change)
∆D(j)
4 = r(j) − r(j+1) (Upward change)
(1)
(2)
(3)
(4)
where i and j are the column and row indices in the range [1, 3000] and [1, 2525], respectively. Remember
that because of the padding, c(0), r(0), c(3001), and r(2526) denote added vectors which all equal −1.
• ∆W : There are a series of spatial water depths for each rainfall event, and the water depths W of
adjacent time steps can be subtracted in time order. Then, ∆W with T-1 channels can be computed
as follows:
∆W (t) = W (t+1) − W (t),
(5)
where t is the time step in the range [1, T -1].
Note that the selection of these features was inspired by the work of [22]. Naturally, we cannot handle
the full input at once due to its size. Therefore, the input data X is sampled in patches size of 128×128. In
addition to reducing the input size, training on a large amount of randomly sampled patches can also help
the models to generalize better.
3.2 Neural network models
Figure 5: Overview of the simple FCN architecture. The spatial dimensions of the patch are preserved
throughout the network.
In this subsection, we describe our neural network architectures. Each model is given the same inputs
for a fixed amount of previous time steps T and a fixed amount of future time steps H, which we want to
predict ahead for (see Table 1). All data is provided for a catchment patch of size 128x128 and concatenated.
Finally, the models output a patch of equal size that predicts the amount of change in water depth for each
5
196464Input Tile128x128 5x5 conv, ReLU128x128128x128128x1281Output tilepixel. Predicting changes instead of directly predicting water depths facilitates training. However, one can
easily retrieve the actual water depths from these values.
Fully Convolutional Network (FCN) As a first, relatively simple model, we have chosen to implement
a Fully Convolutional Network (FCN). The FCN consists of three convolutional layers with a kernel size of
5 and adequate zero padding on the sides to preserve the input dimensions (see Figure 5).
AutoEncoder Our second network has been inspired by [21], who use a Convolutional AutoEncoder,
which is another fully convolutional architecture. The network first increases the amount of features while
decreasing the spatial dimensions through pooling operations. This part of the model is called the encoder as
it "encodes" information into a reduced representation. In the second half of the network – the decoder – the
spatial dimensions are restored through transposed convolutions. The architecture is visualized in Figure 6.
Figure 6: Overview of the CNN AutoEncoder architecture. The spatial dimensions of the full image with
K input features (depending on amount of time steps given and other settings, and equaling 19 for our
experiments) are first reduced through pooling operations. Later, they are restored through transposed
convolutions to produce an output of the original input size.
U-Net The U-Net architecture [43] is similar to the CNN AutoEncoder in the sense that the spatial di-
mensions of the input are first down- and later upsampled to produce an output of the original dimensions.
However, there are a few key changes to the architecture. Most importantly, the U-Net utilizes skip connec-
tions to concatenate the outputs of the left and right half of the network. Furthermore, we have decided to
use bi-linear upsampling instead of transposed convolutions. The U-Net architecture is visualized in Figure 7.
Graph Our graph model was designed with the specific goal of mimicking the underlying physical process
of water flooding. To do so, we view the image as a graph where each pixel is a node with only 4 edges:
up, down, left and right connection. This graph allows us to easily encode two simple hypotheses into the
model: 1) the waterflow between two nodes depends only the elevation difference and the current amount
of water on both nodes. 2) The resulting waterlevel on a node consists in the sum of the 4 waterflows (from
the edges) and the remaining water on the node. A simplified1 version of the model is provided in Figure 8.
The learnable parameters of the network are the two Multilayer Linear Perceptrons (MLP) in blue. For
efficiency reasons, we implemented these MLPs using 1x1 and 1x2 convolutions.
3.3 Baselines
To better evaluate the performance of our neural network models, we have implemented two non-parametric
baselines.
1For simplicity, we omitted some of the input features in the network
6
193232Input Tile128x12832646464x646432x3212812816x1632x32128128128646464x64 643232128x128 321Output tile 3x3 conv, LeakyReLU 2x2 Max Pool 2x2 Transposed convFigure 7: Overview over the U-Net architecture. The spatial dimensions of input are first downsampled
through pooling operations and later upsampled through bi-linear upsampling. The skip connections seen
in this figure give the architecture its characteristic U-shape.
A. No change. Our first baseline outputs no change in water depth at the next predicted time step.
Assuming T given time steps:
with Y denoting the output (note that T is the latest time step). Equivalently,
Y = W (t),
with ∆Y = Y − W (t).
∆Y = 0,
B. Linear extrapolation. The second baseline performs linear extrapolation, i.e. it predicts
or, equivalently,
Note that ∆W (t−1) = W (t) − W (t−1).
Y = W (t) + ∆W (t−1),
∆Y (t) = ∆W (t−1).
(6)
(7)
(8)
(9)
Furthermore, we also implemented two baselines using classic autoregressive models. These models are
only given the water depth data without any information on the DEM or the rainfall data. The incentive for
leaving out this information here is to test whether the more complex models are able to sufficiently utilize
this additional data for improved predictions over these baselines.
C. Autoregressive (AR) 1x1. We implement a single convolutional layer with a 1x1 kernel to predict
the next water depths in a pixel-wise manner.
D. Autoregressive (AR) 5x5. As a second model, we implement a single convolutional layer but with
a 5x5 kernel to take into account some information of close-by locations.
The models are only trained to predict the water depths in the next time step. If we require a prediction
for a later time step, we apply the model autoregressively until we arrive at this point in time. To be precise,
each output of the model will be added to the input in place for the oldest time step in a looping manner
until we reach the desired time step.
7
196464Input Tile128x12864x64 12812832x32 25625616x16 5125128x8 10245125125122562561281286464116x16 32x32 64x64 128x128 3x3 conv, BN, ReLUOutput Tile 2x2 Max Pool 2x2 Bilinear Upsampling Skip ConnectionsFigure 8: Simplified scheme of the graph architecture. The only learnable blocks are in blue. They can
In a first step, we compute the "water acceleration" based on the DEM in the edge
be seen as MLPs.
block. Then, we combine this information with the water level on neighboring nodes in the "node block".
Eventually, the output is one flow per edge and some remaining water on the node. Finally, we aggregate
the water with a simple sum (orange block).
3.4 Loss function
The loss function, which is optimized during training, measures the quality of a set of network parameters
w.r.t. the training data. For this loss function, we have experimented with several variations of the mean
absolute error (MAE) and mean squared error (MSE). Finally, due to difficulties with learning the largest
differences in water depths (which are considered the most important predictions), we have settled for a
variant of MAE that increases the loss by a factor of 4 wherever the target water depth changes by more
than 20cm. As it can be observed in Figure 3, the amount of large water depths is relatively small but
most critical for our case. However, in practice such water levels are of the highest importance since they
correspond to the most dangerous situations.
3.5 Evaluation method
We predict water depths for the test rainfall events that have not been seen during training to test the
performance of the implemented models. Since our main interest is to avoid errors at higher water depths,
we define different water depth ranges: our main evaluation metric M measures the absolute errors within
5 buckets (intervals) depending on the ground truths, for water depths of 0-10cm, 10-20cm, 20-50cm, 50-
100cm, and >100cm, respectively. Since the errors will vary greatly between buckets, we further normalize
them by the standard deviation of the ground truths within each bucket. To summarize, we compute for
every pixel-wise prediction ˆyi in each bucket b:
Mb(yi, ˆyi) =
|yi − ˆyi|
σb
,
(10)
where y is a vector of all ground truths in bucket b, and σb denotes the standard deviation over these ground
truths. Naturally, we want to minimize this metric.
The normalization (division by the standard ground truth deviation) used in our metric, i.e. (10) has the
advantage to provide an error theoretically scale-independent of the water level. Furthermore, similar to the
coefficient of determination, this metric quantifies globally learning in comparison with a mean predictor.
The error of a mean predictor is in average 1 as the numerator will be, in average, the standard deviation.
Therefore, we consider that the models are learning if the metric (10) is below 1 and that the model is failing
to learn if the metric is above 1.
4 Results
Through testing many different configurations, we have found the following settings that work well across all
of the models. Each model receives 5 previous time steps as input, where the spatial dimension of the features
8
Edge block Water accelerationNode blockWater displacementRepeat for all edgesWater aggregation4 edgesflowsremainingwaterPrediction rainfallis of size 128x128, and predicts the change in water depth one hour ahead (12 time steps of 5 minutes). All
parametric models are trained for 30 epochs with a learning rate of 10−3 and the Adam optimizer [29],
except the AutoEncoder, which we train for 50 epochs with a learning rate of 10−4 because it failed to train
with a higher learning rate.
4.1 Training methods
To facilitate further evaluations on all networks and baselines, we first aim to establish a preferred training
method. We consider three options:
A. 1 TS: The network is trained to predict one time step ahead and evaluated iteratively to get predictions
for 12 time steps ahead.
B. 12 TS Direct: The network is trained to directly predict 12 time steps ahead.
C. 12 TS Iterative: The network is trained to predict 12 time steps ahead iteratively, i.e. already during
training it uses predictions for one time step as an additional input for predicting the next time step
until all 12 time steps are predicted.
We have implemented all training methods for two of our models with the hope that the results will
be sufficiently predicative to assume that the behavior will generalize to the other models as well. To this
end, we have evaluated the training methods for our FCN as well as the Graph model in Figure 9. Despite
some issues with low water depths, we can conclude that training to directly predict 12 time steps ahead
yields clearly better results than the other training methods, especially for larger water depths, which are
the most critical ones. This comes with the additional benefit that direct prediction is significantly faster
than autoregressively predicting one step after another. Therefore, all models in subsequent experiments
will use this training method, except the last two baselines that are designed to be applied autoregressively.
Figure 9: Comparison of training methods for the FCN (left) and Graph (right) models. The error metric is
described in Section 3.5. Both models have been trained and evaluated on the 709 short rainfall events (see
Figure 2).
4.2 Model comparison
In this section, we evaluate all four deep models, the two non-parametric baselines, as well as our two versions
of the autoregressive baseline. Out of all experiments that have been performed, we chose three that should
give the most complete picture over the overall performance of the models.
Short rainfall events For our first evaluation, we compare the models' performance on the short events
of the 709 catchment. The specific training, validation and testing split that we use for this experiment can
be seen in Table 2.
9
0-10 cm10-20 cm20-50cm50-100cm>100cm0.000.250.500.751.001.251.501 TS12 TS Direct12 TS Iterative0-10 cm10-20 cm20-50cm50-100cm>100cm0.000.250.500.751.001.251.501 TS12 TS Direct12 TS IterativeOur results are summarized in Figure 10. For the lower water depths, some of the baseline models
outperform the deep networks. Under the assumption that lower water depths also show less change over
time, it is not too surprising that predicting no change at all might result in relatively small errors overall.
For the two non-parametric baselines, this behavior is certain, but also the simple autoregressive baselines
seem to be able to capture little to no change better than the more involved models. However, we care
about more about predictions for large water depths which are more critical. In the range of 50-100cm and
especially for water depths of more than 1m, we see that both the U-Net as well as the graph model show
significantly lower errors compared to the other methods.
Dataset
Rainfall Events
Training Set
tr5 1, tr20 1, tr50 1, tr2 2, tr10 2,
tr20 2, tr50 2, tr5 3, tr10 3, tr100 3
Validation Set
tr100 2, tr2 3
Test Set
tr2 1, tr10 1, tr100 1, tr5 2, tr20 3, tr50 3
Table 2: Allocation of training, validation and test set for the 709 catchment
with only short rainfall events.
Figure 10: Box plots for all models trained and tested on catchment area 709 with short events only. The
medians are denoted by a black dash.
In a next step, we want to introduce long rainfall events to the training and testing
Long rainfall events
procedures. We add the events real1 c1 and tr50 3c2 (see rightmost plot in Figure 2) to the training set
from Table 2 and event tr50 3c1 to the validation set. As the test set, we replace the two short events with
the long event real2 c1. We decided to replace the short events in the test set because we want to measure
the performance on a long event specifically, without influence from the possibly different performance on
the short events.
From the results from Figure 11 we see that the errors are considerably higher for all models compared
to the short events. Unfortunately, we cannot observe any advantages from the more involved models over
a simple model like the FCN or even over the autoregressive baselines. There is a small, but – due to the
overall poor performance – insignificant benefit over the non-parametric baselines that predict no change at
all or linearly interpolate the water depth.
Generalization to different catchment Finally, we want to evaluate the models' capabilities of gener-
alizing to a different catchment area. To this end, we take the same trained models from the last paragraph
(i.e. trained on catchment area 709 with both short and long events) and test them on a long event for catch-
ment area 744. The event chosen has the same rainfall pattern as the long event real1 c1 from catchment
10
0-10 cm10-20 cm20-50cm50-100cm>100cm0.000.250.500.751.001.251.501.75FCNAutoEncoderU-NetGraphNo changeLinear extrapolationAutoregressive 1x1Autoregressive 5x5Figure 11: Box plots for all models trained and tested on catchment area 709 with both short and long
events. The medians are denoted by a black dash.
area 709.
The results for this experiment are presented in Figure 12. Once again, the deep models do not show any
benefits over the simpler ones. For the largest water depths, even linear extrapolation of the water depths
is on par with the predictions from parameterized models.
Figure 12: Box plots for all models trained on catchment area 709 with both short and long events and
tested on one long event from catchment 744. The medians are denoted by a black dash.
We have performed further tests on other long events, and experimented with training on long events
only. Unfortunately, those additional experiments have also not yielded dramatically changed results. This
leaves the more involved, deep models with improved results only on the short rainfall events but without
any advantages on the experiments with long events for either catchment area.
5 Discussion
In Figure 10, where only short events are used in the training set, the metric values are significantly below
1 indicating that the models are learning the distribution and generalizing to unseen data. We also observe
that learned models are better than the baselines, especially for high water levels (> 0.5m). U-Net is overall
the best model. While the graph network is the best for high water levels, it has bad performance for low
water levels. Despite the fact that the reconstruction error is low, we are not satisfied with the proposed
networks as they are not significantly better than the baselines. This probably indicates that the networks
only capture the easiest correlations in the dataset.
In Figure 11 and Figure 12, we evaluate the model on two different test sets with distribution shifts. In
Figure 11, we observe that for long rainfall events the performance drops significantly (the metric is above
11
0-10 cm10-20 cm20-50cm50-100cm>100cm012345FCNAutoEncoderU-NetGraphNo changeLinear extrapolationAutoregressive 1x1Autoregressive 5x50-10 cm10-20 cm20-50cm50-100cm>100cm012345FCNAutoEncoderU-NetGraphNo changeLinear extrapolationAutoregressive 1x1Autoregressive 5x51), meaning that the model does not generalize. Similarly, in the case of a different catchment (Figure 12),
the model is also not able to generalize. Our interpretation is that long rainfall events likely include more
complex dynamics that the networks were not able to learn. This hypothesis is supported by the fact that the
performance of non-learnable baselines has also dropped significantly compared to the short rainfall event
test set. One final observation is that on these more challenging test sets, the networks are not improving
over the baselines.
6 Conclusion
As discussed in the previous Section 5, our current model provides unsatisfying results for two reasons. First
the overall performance improvement of the proposed models compared to the baselines is insufficient to
justify their additional complexity. Second, the proposed models are not able to generalize to events outside
of the training distribution, making them unsuitable for a real use case.
One possible problem with the current setup might be the lack of diversity in the training rainfall events.
While the models do not overfit the data per se (i.e. the loss does not drop below a constant significantly
above 0), it is likely that the models overfit some characteristics of the training distribution, preventing them
from generalizing to different rainfall events. Unfortunately, generating a training set with a high rainfall
diversity would be very computationally expensive. Another potential weakness of our setup lies in the fact
that the proposed model are more appropriate to exploit space correlations instead of time correlations.
This choice might not be suitable for modeling water flows, which are affected by complex time dynamics.
Therefore, the problem could benefit from architectures more designed for time series, such as recurrent
networks [23], dilated convolutions [15], or transformers [48].
Possibly, the physics of flood simulation might be too challenging to learn from scratch and a different
approach might be preferable. They are multiple "physically inspired" contributions [17, 3, 44, 10] leveraging
using the structure of a simulator with some parts being replaced with a neural network. Typically, this would
allow to work with large time step (in comparison with the original simulator) and significantly accelerate
the simulation process. In the interest of reproducibility, we make our code and datasets available at and .
12
References
[1] Y. Adikari and J. Yoshitani. Global trends in water-related disasters: An insight for policymakers, 2009.
Last accessed: 18 Oct. 2022.
[2] P. D. Bates, M. S. Horritt, and T. J. Fewtrell. A simple inertial formulation of the shallow water
equations for efficient two-dimensional flood inundation modelling. Journal of Hydrology, 387(1-2):33–
45, 2010.
[3] T. Beucler, M. Pritchard, S. Rasp, J. Ott, P. Baldi, and P. Gentine. Enforcing analytic constraints in
neural networks emulating physical systems. Physical Review Letters, 126(9):098302, 2021.
[4] D. K. Borah. Hydrologic procedures of storm event watershed models: a comprehensive review and
comparison. Hydrological Processes, 25(22):3472–3489, 2011.
[5] K. Bradbrook, S. Lane, S. Waller, and P. Bates. Two dimensional diffusion wave modelling of flood
inundation using a simplified channel representation. International Journal of River Basin Management,
2(3):211–223, 2004.
[6] L. Cea, M. Garrido, and J. Puertas. Experimental validation of two-dimensional depth-averaged models
for forecasting rainfall-runoff from precipitation data in urban areas. Journal of Hydrology, 382(1):88–
102, March 2010.
[7] F.-J. Chang, P.-A. Chen, Y.-R. Lu, E. Huang, and K.-Y. Chang. Real-time multi-step-ahead water level
forecasting by recurrent neural networks for urban flood control. Journal of Hydrology, 517:836–846,
2014.
[8] L.-C. Chang, F.-J. Chang, and Y.-M. Chiang. A two-step-ahead recurrent neural network for stream-flow
forecasting. Hydrological Processes, 18(1):81–92, 2004.
[9] A. S. Chen, S. Djordjevic, J. Leandro, and D. Savic. The urban inundation model with bidirectional
flow interaction between 2d overland surface and 1d sewer networks. In Novatech 2007-6`eme Conf ́erence
sur les techniques et strat ́egies durables pour la gestion des eaux urbaines par temps de pluie/Sixth Inter-
national Conference on Sustainable Techniques and Strategies in Urban Water Management. GRAIE,
Lyon, France, 2007.
[10] C. Cheng and G.-T. Zhang. Deep learning method based on physics informed neural network with
resnet block for solving fluid flow problems. Water, 13(4):423, 2021.
[11] B. Choubin, E. Moradi, M. Golshan, J. Adamowski, F. Sajedi-Hosseini, and A. Mosavi. An ensemble
prediction of flood susceptibility using multivariate discriminant analysis, classification and regression
trees, and support vector machines. Science of the Total Environment, 651:2087–2096, 2019.
[12] P. Costabile, C. Costanzo, and F. Macchione. Comparative analysis of overland flow models using finite
volume schemes. Journal of Hydroinformatics, 14(1):122–135, 04 2011.
[13] P. Costabile, C. Costanzo, and F. Macchione. A storm event watershed model for surface runoff based
on 2d fully dynamic wave equations. Hydrological Processes, 27(4):554–569, 2013.
[14] P. Costabile and F. Macchione. Enhancing river model set-up for 2-d dynamic flood modelling. Envi-
ronmental Modelling & Software, 67:89–107, 2015.
[15] P. Dutilleux. An implementation of the "algorithme `a trous" to compute the wavelet transform. In
Wavelets, pages 298–304. Springer, 1990.
[16] J. Fern ́andez-Pato, D. Caviedes-Voulli`eme, and P. Garc ́ıa-Navarro. Rainfall/runoff simulation with 2d
full shallow water equations: Sensitivity analysis and calibration of infiltration parameters. Journal of
Hydrology, 536:496–513, 2016.
13
[17] J. M. Frame, F. Kratzert, D. Klotz, M. Gauch, G. Shelev, O. Gilon, L. M. Qualls, H. V. Gupta, and
G. S. Nearing. Deep learning rainfall–runoff predictions of extreme events. Hydrology and Earth System
Sciences, 26(13):3377–3392, 2022.
[18] V. Gude, S. Corns, and S. Long. Flood prediction and uncertainty estimation using deep learning.
Water, 12(3), 2020.
[19] M. Guidolin, A. S. Chen, B. Ghimire, E. C. Keedwell, S. Djordjevi ́c, and D. A. Savi ́c. A weighted
cellular automata 2d inundation model for rapid flood analysis. Environmental Modelling & Software,
84:378–394, 2016.
[20] M. Guidolin, A. S. Chen, B. Ghimire, E. C. Keedwell, S. Djordjevi ́c, and D. A. Savi ́c. A weighted
cellular automata 2d inundation model for rapid flood analysis. Environmental Modelling & Software,
84:378–394, 2016.
[21] Z. Guo, J. P. Leit ̃ao, N. E. Sim ̃oes, and V. Moosavi. Data-driven flood emulation: Speeding up ur-
ban flood predictions by deep convolutional neural networks. Journal of Flood Risk Management,
14(1):e12684, 2021.
[22] Z. Guo, J. P. Leit ̃ao, N. E. Sim ̃oes, and V. Moosavi. Data-driven flood emulation: Speeding up ur-
ban flood predictions by deep convolutional neural networks. Journal of Flood Risk Management,
14(1):e12684, 2021.
[23] M. Hermans and B. Schrauwen. Training and analysing deep recurrent neural networks. Advances in
neural information processing systems, 26, 2013.
[24] N. M. Hunter, P. D. Bates, S. Neelz, G. Pender, I. Villanueva, N. G. Wright, D. Liang, R. A. Falconer,
B. Lin, S. Waller, A. J. Crossley, and D. C. Mason. Benchmarking 2d hydraulic models for urban
flooding. Proceedings of the Institution of Civil Engineers - Water Management, 161(1):13–30, 2008.
[25] B. Jamali, P. M. Bach, L. Cunningham, and A. Deletic. A cellular automata fast flood evaluation
(ca-ff ́e) model. Water Resources Research, 55(6):4936–4953, 2019.
[26] S. Janizadeh, M. Avand, A. Jaafari, T. V. Phong, M. Bayat, E. Ahmadisharaf, I. Prakash, B. T. Pham,
and S. Lee. Prediction success of machine learning methods for flash flood susceptibility mapping in
the tafresh watershed, iran. Sustainability, 11(19):5426, 2019.
[27] K. Khosravi, B. T. Pham, K. Chapi, A. Shirzadi, H. Shahabi, I. Revhaug, I. Prakash, and D. T. Bui.
A comparative assessment of decision trees algorithms for flash flood susceptibility modeling at haraz
watershed, northern iran. Science of the Total Environment, 627:744–755, 2018.
[28] B. Kim, B. F. Sanders, J. S. Famiglietti, and V. Guinot. Urban flood modeling with porous shallow-water
equations: A case study of model errors in the presence of anisotropic porosity. Journal of Hydrology,
523:680–692, 2015.
[29] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980,
2014.
[30] F. Kratzert, D. Klotz, G. Shalev, G. Klambauer, S. Hochreiter, and G. Nearing. Towards learning uni-
versal, regional, and local hydrological behaviors via machine learning applied to large-sample datasets.
Hydrology and Earth System Sciences, 23(12):5089–5110, 2019.
[31] J. P. Leit ̃ao and S. Pe ̃na-Haro. Leveraging video data to assess urban pluvial flood hazard, 2022. Last
accessed: 02 Feb. 2022.
[32] J. Lhomme, P. Sayers, B. Gouldby, P. Samuels, M. Wills, and J. Mulet-Marti. Recent development and
application of a rapid flood spreading method. Flood Risk Management: Research and Practice. Taylor
& Francis Group, London, UK, 2008.
14
[33] R. L ̈owe, J. B ̈ohm, D. G. Jensen, J. Leandro, and S. H. Rasmussen. U-flood – topographic deep learning
for predicting urban pluvial flood water depth. Journal of Hydrology, 603:126898, 2021.
[34] A. K. Misra. Climate change and challenges of water and food security.
International Journal of
Sustainable Built Environment, 3(1):153–165, 2014.
[35] A. Mosavi and M. Edalatifar. A hybrid neuro-fuzzy algorithm for prediction of reference evapotranspi-
ration. In International conference on global research and education, pages 235–243. Springer, 2018.
[36] A. Mosavi, P. Ozturk, and K.-w. Chau. Flood prediction using machine learning models: Literature
review. Water, 10(11), 2018.
[37] A. Mosavi, P. Ozturk, and K.-w. Chau. Flood prediction using machine learning models: Literature
review. Water, 10(11):1536, 2018.
[38] S. Neelz and G. Pender. Benchmarking of 2d hydraulic modelling packages. SC080035/SR2 Environment
Agency, 01 2010.
[39] V. Nourani, A. H. Baghanam, J. Adamowski, and O. Kisi. Applications of hybrid wavelet–artificial
intelligence models in hydrology: a review. Journal of Hydrology, 514:358–377, 2014.
[40] M. Panahi, A. Jaafari, A. Shirzadi, H. Shahabi, O. Rahmati, E. Omidvar, S. Lee, and D. T. Bui. Deep
learning neural networks for spatially explicit prediction of flash flood probability. Geoscience Frontiers,
12(3):101076, 2021.
[41] E. J. Plate. Flood risk and flood management. Journal of Hydrology, 267(1):2–11, 2002. Advances in
Flood Research.
[42] M. Rezaeian Zadeh, S. Amin, D. Khalili, and V. P. Singh. Daily outflow prediction by multi layer
perceptron with logistic sigmoid and tangent sigmoid activation functions. Water resources management,
24(11):2673–2688, 2010.
[43] O. Ronneberger, P. Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmen-
tation. In International Conference on Medical image computing and computer-assisted intervention,
pages 234–241. Springer, 2015.
[44] Y. Ruckstuhl, T. Janji ́c, and S. Rasp. Training a convolutional neural network to conserve mass in data
assimilation. Nonlinear Processes in Geophysics, 28(1):111–119, 2021.
[45] C. M. Song. Data construction methodology for convolution neural network based daily runoff prediction
and assessment of its applicability. Journal of Hydrology, 605:127324, 2022.
[46] M. S. Tehrany, B. Pradhan, S. Mansor, and N. Ahmad. Flood susceptibility assessment using gis-based
support vector machine model with different kernel types. Catena, 125:91–101, 2015.
[47] D. Van Dao, A. Jaafari, M. Bayat, D. Mafi-Gholami, C. Qi, H. Moayedi, T. Van Phong, H.-B. Ly, T.-T.
Le, P. T. Trinh, et al. A spatially explicit deep learning neural network model for the prediction of
landslide susceptibility. Catena, 188:104451, 2020.
[48] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, (cid:32)L. Kaiser, and I. Polosukhin.
Attention is all you need. Advances in neural information processing systems, 30, 2017.
[49] X. Xia, Q. Liang, X. Ming, and J. Hou. An efficient and stable hydrodynamic model with novel
source term discretization schemes for overland flow and flood simulations. Water Resources Research,
53(5):3730–3759, 2017.
15
|
|
http://arxiv.org/abs/2302.10058v1 | 2023-02-20T16:05:04 | 2023-02-20T16:05:04 | Differentiable Arbitrating in Zero-sum Markov Games | We initiate the study of how to perturb the reward in a zero-sum Markov game
with two players to induce a desirable Nash equilibrium, namely arbitrating.
Such a problem admits a bi-level optimization formulation. The lower level
requires solving the Nash equilibrium under a given reward function, which
makes the overall problem challenging to optimize in an end-to-end way. We
propose a backpropagation scheme that differentiates through the Nash
equilibrium, which provides the gradient feedback for the upper level. In
particular, our method only requires a black-box solver for the (regularized)
Nash equilibrium (NE). We develop the convergence analysis for the proposed
framework with proper black-box NE solvers and demonstrate the empirical
successes in two multi-agent reinforcement learning (MARL) environments. | [
"Jing Wang",
"Meichen Song",
"Feng Gao",
"Boyi Liu",
"Zhaoran Wang",
"Yi Wu"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.10058v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.10058v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.MA",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.MA",
"cs.AI",
"cs.LG"
] | 3
2
0
2
b
e
F
0
2
]
A
M
.
s
c
[
1
v
8
5
0
0
1
.
2
0
3
2
:
v
i
X
r
a
Differentiable Arbitrating in Zero-sum Markov Games
Jing Wang∗,†
New York University
New York, United States
[email protected]
Meichen Song∗,†
Stony Brook University
New York, United States
[email protected]
Boyi Liu
Northwestern University
Illinois, United States
[email protected]
Zhaoran Wang
Northwestern University
Illinois, United States
[email protected]
Feng Gao‡
IIIS, Tsinghua University
Beijing, China
[email protected]
Yi Wu
IIIS, Tsinghua University;
Shanghai Qi Zhi Institute
[email protected]
ABSTRACT
We initiate the study of how to perturb the reward in a zero-sum
Markov game with two players to induce a desirable Nash equi-
librium, namely arbitrating. Such a problem admits a bi-level op-
timization formulation. The lower level requires solving the Nash
equilibrium under a given reward function, which makes the overall
problem challenging to optimize in an end-to-end way. We propose
a backpropagation scheme that differentiates through the Nash equi-
librium, which provides the gradient feedback for the upper level.
In particular, our method only requires a black-box solver for the
(regularized) Nash equilibrium (NE). We develop the convergence
analysis for the proposed framework with proper black-box NE
solvers and demonstrate the empirical successes in two multi-agent
reinforcement learning (MARL) environments.
KEYWORDS
Zero-sum game; Equilibrium refinement; Bi-level optimization
ACM Reference Format:
Jing Wang∗,†, Meichen Song∗,†, Feng Gao‡, Boyi Liu, Zhaoran Wang, and Yi
Wu. 2023. Differentiable Arbitrating in Zero-sum Markov Games. In Proc.
of the 22nd International Conference on Autonomous Agents and Multiagent
Systems (AAMAS 2023), London, United Kingdom, May 29 – June 2, 2023,
IFAAMAS, 29 pages.
1 INTRODUCTION
Arbitrating the conflict between self-interest and collective inter-
ests permeates the development of human societies [32]. We study
Markov games [53] as abstractions of human societies. Nash equi-
librium (NE) [8], where none of the players could benefit from
unilaterally deviating its strategy, is an essential concept in Markov
games. While players modeled by Markov games act rationally
to maximize their own rewards, the lack of collective considera-
tion may lead to an undesirable NE, which undermines the overall
welfare from a system perspective [23].
Incentive design [73], which was originally developed for bandit
settings, aims to arbitrate such a conflict by perturbing the rewards
to refine NE so that the self-interested players reach a desirable one,
*These authors contributed equally to this work
†Work finished during the internship in Shanghai Qi Zhi Institute.
‡Feng Gao contributed the entire experiment part of this work.
Proc. of the 22nd International Conference on Autonomous Agents and Multiagent Sys-
tems (AAMAS 2023), A. Ricci, W. Yeoh, N. Agmon, B. An (eds.), May 29 – June 2, 2023,
London, United Kingdom. © 2023 International Foundation for Autonomous Agents
and Multiagent Systems (www.ifaamas.org). All rights reserved.
e.g., the higher social welfare or the lager exploration rate. More
specifically, the incentive design problem is naturally formulated
as a bi-level structure [19, 58]. The upper-level designer aims to
determine the optimal incentives and the lower-level players per-
form under incentive-perturbed rewards. To this end, it needs to
anticipate how the lower-level players react to the prescribed incen-
tives when they play a Markov game. However, taking a derivative
through the bi-level structure is difficult [27], especially when the
lower level has multiple agents. In particular, the lower-level equi-
librium appears to be a black box for the upper-level designer, which
makes it challenging for the upper-level designer to assess how the
prescribed incentives will influence the lower-level equilibrium. As
a result, the upper-level designer lacks the gradient feedback for
effectively updating its policy for prescribing the incentives [51].
Some attempts have been proposed to work around the difficulty
of derivatives in solving bi-level optimization. One direction is to get
rid of the bi-level problem structure by converting the problem into
a multi-objective problem: i.e., the low-level players simultaneously
optimize the game reward and the designer's objective by exploring
multiple NEs [15, 22, 38, 49, 71, 81]. The simplified problem can be
directly solved by an NE solver. However, there is no theoretical
guarantee for finding the optimal NE subject to the designer's
objective [21]. The other direction is to keep the bi-level problem
structure and avoid the derivative issue by applying a gradient-free
optimizer to the upper level [64]. However, this suffers from a high
computation cost since a zeroth-order method typically requires
a large number of queries to the lower-level solver to derive the
desired NE. Therefore, a first-order method that can be applied
to complicated environments under the bi-level structure with a
convergence guarantee is urgently needed to overcome the sample
efficiency issue.
We extend the incentive design problem to the MARL settings
and construct a provably differentiable arbitrating (DA) framework.
We derive the derivatives through the NE for the DA framework,
which enables the upper level to utilize the policy gradient feed-
back from the lower level to obtain the gradient of the designer's
objective. Theoretical convergence proof for DA is presented in
the setting of the two-player zero-sum game by choosing proper
NE solvers which have convergence guarantee, e.g. Policy Extra-
gradient Method (PEM) [14] and Entropy-regularized OMWU [13].
In practice, we implement the DA framework using a multi-agent
variant of the soft actor-critic algorithm (MASAC) [30], leading to
a practical algorithm, DASAC. We evaluate our algorithm in two
two-player zero-sum MARL environments. Empirical results show
that the incentive proposed by the designer arbitrates the conflict
well: i.e., the upper-level designer's loss function reduces while
lower-level self-interested players still attain an NE. The emergent
arbitrated behaviors are consistent with human intuitions in each
setting. Besides, the sample efficiency for the upper level is signifi-
cantly improved compared with a zeroth-order method.
Contributions. i) We consider the problem of incentive design
in MARL settings and tackle the challenge of deriving the gradi-
ent of the upper-level objective through the bi-level structure. ii)
We develop the first differentiable first-order framework, Differen-
tiable Arbitrating (DA), which can arbitrate the conflict to obtain
a desirable NE in Markov games. iii) We theoretically prove the
convergence of DA with proper NE solvers for two-player zero-sum
Markov games. iv) We empirically show that a desirable NE with
interpretable behaviors can be found by DA more efficiently than
zeroth-order methods in two MARL environments.
2 RELATED WORKS
Nash equilibrium for Markov Games. There is a large amount
of work on finding the Nash equilibrium in multi-agent Markov
games. Claus and Boutilier propose fictitious play [18] (FS), i.e., all
players presuming that the opponents are stationary, for equilib-
rium selection with guaranteed convergence to a Nash equilibrium.
FS was originally developed for normal form games and therefore
was not widely applied to complex applications [34, 45, 61] until
the fictitious self-play (FSP) [33] was proposed. [35] extends SP
from extensive-form games to imperfect-information games. [55]
proposes the smooth FSP algorithm, which expands the PPO al-
gorithm [74] from the single-agent to the multi-agent zero-sum
Markov game and provides with convergence guarantee. In the
multi-agent reinforcement learning setting, MADDPG in [57] and
MAAC in [39] adapt the actor-critic [43] and soft-actor-critic [30]
algorithms from the single-agent to complex multi-agent setting
and empirically show better performances fully than decentral-
ized multi-agent RL on finding NEs. MADDPG and MAAC do not
have theoretical convergence guarantee even though they achieve
empirical successes. On the other hand, many works have devel-
oped convergence guarantee for value-based methods [13, 14, 16]
and policy-based methods [3, 94] for two-player zero-sum Markov
games. Cen [13, 14] introduce the entropy regularization term into
the two-player zero-sum Markov game and propose the Policy Ex-
tragradient Methods and Entropy-regularized OMWU Methods,
which have convergence guarantee without the NE uniqueness
assumption on the two-player zero-sum Markov game.
Equilibrium Selection/Refinement. Since even team Markov
Games (where the players have common interests) could have mul-
tiple NEs, there exists a large volume of work in game theory on NE
selection [66, 75], e.g. admissibility [7], subgame perfection [75],
Pareto efficiency [10] or stability against opponent's deviation from
best response [24]. [73] raises emphasis on adaptive incentive design,
which modifies intrinsic rewards via additional incentive to balance
the individuals' self-interests and system's social welfare for desir-
able NE selection. The incentive design was first proposed in eco-
nomics [70] and attracts substantial attentions with many follow-up
works [11, 44, 88]. During the past decades, people explored the
economic incentive to various domains, including energy [12, 65],
transportation [42, 62], healthcare [5, 59], and education [60]. More
recently, incentive design has also been extended to the area of game
theory and reinforcement learning. [54] utilize the incentive design
in the multi-bandit problem and prove that the proposed algorithm
converges to the global optimum at a sub-linear rate for a broad
class of games. [64] provide an incentive-design mechanism for
an uncooperative multi-agent system and optimize the upper-level
incentive objective with Bayesian optimization, a sample-efficient
optimization algorithm, instead of the gradient-based methods be-
cause the lower-level MARL problem is a black box. [90] propose a
decentralized incentive mechanism that allows each individual to
directly give rewards to others and learn its own incentive function,
respectively. Also, [78] proposes a bi-level incentive mechanism
for a single lower-level player, which can be viewed as a special
case of our setting. Stackelberg game [48, 52] is a strategic game
in economics in which the leader moves first and the followers
behave sequentially. The incentive design could be reformulated
as the Stackelberg game by treating the incentive design objective
as the leading player. [86] proposed a gradient-decent algorithm to
find NE for the Stackelberg bandit problem. [95] propose a value
iteration method for solving the Stackelberg Markov game with
convergence guarantee. [85] features differentiation through policy
gradient on Sequential Decision Problems without global conver-
gence guarantee.
Bi-level optimization. In machine learning, a large amount of
tasks can be formulated as bi-level optimization problems, e.g. ad-
versarial learning [40], meta-learning [26], hyperparameter opti-
mization [9], and end-to-end learning [4]. Many gradient-based
algorithms are used for solving these problems. Most of them are
first-order gradient-based methods [9, 26, 28, 67] thanks to both
computational efficiency of first-order gradients and fast empirical
convergence. By contrast, zeroth-order methods [79, 87] suffer from
a heavy workload of data sampling, which requires tremendous
computing resources. [69] develop a second-order method. How-
ever, the proposed algorithm requires computation of the inverse
of Hessian, which restricts the algorithm to simple tabular settings.
The most challenging part for gradient-based methods to solve the
bi-level optimization problem is to derive the derivative of lower-
level solution with respect to the incentive variables in the higher
level. Feng [25] and Yang [91] expand the lower-level optimization
process as a sequence of gradient updates and directly compute
gradients throughout the entire optimization process. Despite of
the simplicity, such a method suffers from tremendous computation
troubles due to memory explosion and numerical issues. Therefore,
approximation techniques such as truncated gradient with a sliding
window would be necessary. By contrast, our DA framework gives
an accurate first-order formula for exact gradient computation for
the lower-level optima. Wang [85] constructed a bi-level problem to
infer the missing parameters in MDP by learning a predictive model.
This paper is under the single-agent setting where the objective in
the lower-level is to minimize a clear performance measure while
our setting is more complex by requiring the computation of NE.
3 PROBLEM FORMULATION
This section organizes as follows. Section 3.1 begins with a typical
definition for two-player zero-sum Markov games G. To illustrate
how the designer induces the behaviors of players, Section 3.2 intro-
duces the incentive parameter θ into the reward of the two-player
zero-sum Markov game and formulate the incentivized Markov
game Gθ . Section 3.3 designs an entropy-regularized Markov game
G′
by adding entropy regularization terms into the reward of Gθ
θ
and demonstrates G′
owns the unique NE. Section 3.4 formulates
θ
the arbitrating system as a bi-level optimization scheme based on
the regularized Markov game with the incentive-perturbed reward.
3.1 Two-player Zero-sum Markov Game
Consider a two-player zero-sum Markov game G = (S, {Ai }i ∈ {1,2},
P, {ri }i ∈ {1,2}, γ), where S is the state space observed by all players,
Ai is the action space of player i and A := A1 × A2 is the joint
action space of two players, then P : S × A × S → [0, 1] denotes
the transition probability from state s ∈ S to state s ′ ∈ S for taking
joint action a ∈ A. ri : S × A → [−1, 1] is the immediate reward
function of player i, which implies r 1 = −r 2 in zero-sum game.
γ ∈ [0, 1) is the discounted factor. ]We remark that we consider the
two-player zero-sum setting for notation simplicity. Extensions to
more general settings will be discussed in Appendix C.
3.2 Markov Game with the Incentive-perturbed
Reward
Let Gθ = (S, {Ai }i ∈ {1,2}, P, {ri (*; θ )}i ∈ {1,2}, γ) be a two-player
zero-sum Markov game with an incentive-perturbed reward func-
tion ri (*; θ ) explicitly parameterized by θ , where θ ∈ Rm repre-
sents the incentives added by the designer. We assume that ri (*; θ ) :
S × A → [−1, 1] is uniformly bound in θ and remains zero-sum.
For a given trajectory τ = (s0, {ai
T −1}i ∈ {1,2}, sT ),
we denote the total discounted reward for player i ∈ {1, 2} as
T −1
∑︁
0}i ∈ {1,2}, s1, ..., {ai
Ri (τ; θ ) =
γtri (st , at ; θ ).
t =0
Define πi: S×Ai→[0, 1] as the probability distribution of policy of
player i and π=(π 1, π 2) as that of the joint policy.
Let Dπ (τ) denote the probability distribution of the trajectory τ
based on the policy pair π. That is,
Dπ (τ) := ρ0 (s0)
T −1
(cid:214)
t =0
P (st +1|st , at )
πi (ai
t |st )
(cid:33)
,
(cid:32) 2
(cid:214)
i=1
where ρ0 (s0) is the distribution for the initial state. We denote
Eπ [ * ] as the expectation over the trajectory τ ∼ Dπ (τ). Then the
performance of the policy pair π for the game Gθ is evaluated by
the state-value function V i
π : S → R, which is defined as
(cid:34)T −1
∑︁
(cid:35)
γt *ri (st , ai
t , a−i
t
; θ )|s0 = s
V i
π (s; θ ) = Eπ
t =0
= Eτ∼Dπ (cid:2)Ri (τ; θ )(cid:12)
(cid:12)s0 = s(cid:3) .
(3.1)
′
3.3 Entropy-regularized Markov Game
To ensure the NE to be unique, we follow [14, 20, 93] and introduce
θ = (S, {Ai }i ∈ {1,2}, P, {r (i)
the entropy-regularized counterpart G
(*; θ )}i ∈ {1,2}, γ, λ), where λ ≥ 0 is the regularization parameter.
The entropy regularization technique is commonly utilized in rein-
forcement learning to encourage exploration to avoid being trapped
at sub-optimal solutions [2, 29, 46] and keep the policies of differ-
ent agents away from being heavily affected by the opponents'
strategy [56, 89].
Specifically, the reward function for player i is replaced by its
π (*; θ ) : S ×Ai ×A−i → R,
entropy-regularized reward function r (i)
which is defined as,
r (i)
π (s, ai, a−i ; θ ) =ri (s, ai, a−i ; θ ) − λ log(πi (ai |s))
+ λ log(π −i (a−i |s)).
(3.3)
Here we clarify what the entropy we use with a light abuse of
notation. The state-reward function and the entropy-regularized
state-reward function associated with policy pair π are defined as
ri
π (s; θ ) = E(ai,a−i )∼π
r (i)
π (s; θ ) = E(ai,a−i )∼π
=ri
(cid:2)ri (s, ai, a−i ; θ )(cid:3) ,
(cid:105)
(cid:104)
r (i)
π (s, ai, a−i ; θ )
π (s; θ ) +λH (πi (*|s)) − λH (π −i (*|s)),
(3.4)
where H (πi (*|s))= −(cid:205)ai ∈Ai πi (ai |s) log(πi (ai |s)) is the Shannon
entropy. Correspondingly, the total discounted reward R (i)
π for a
given trajectory τ of the player i in game G′
and the entropy-
θ
regularized state-value function with incentive parameter V (i)
π
S → R are defined as
:
R (i)
π (τ; θ ) =
T −1
∑︁
t =0
γtr (i)
π (st , ai
t , a−i
t
; θ ),
V (i)
π (s; θ ) = Eπ
(cid:34)T −1
∑︁
γt *r (i)
π (st , ai
t , a−i
t
(cid:35)
; θ )|s0 = s
t =0
(cid:104)
= Eτ∼Dπ
(cid:105)
.
(cid:12)s0 = s
R (i)
π (τ; θ )(cid:12)
Suppose the NE of the regularized Markov game with incentive-
perturbed reward G′
∗ (θ )). We write Player -i
θ
as Player i's opponent then the joint policy could also be rewritten
as the policy pair π = (πi, π −i ), where i ∈ {1, 2}. Then the NE can
be defined as follows, for ∀i ∈ {1, 2}, the NE π ∗ satisfies
is π∗ (θ ) = (π 1
∗ (θ ), π 2
(3.5)
V (i)
π∗ (θ )
(s; θ ) = max
πi
V (i)
(πi,π -i
∗ (θ ))
(s; θ ), ∀s ∈ S.
(3.6)
The NE for the regularized Markov game G′
θ
solution of the following min-max optimization problem
V (1)
π
(s; θ ), ∀s ∈ S.
min
π 2
max
π 1
is equivalent to the
(3.7)
The Nash equilibrium (NE) is an essential concept where no
agent could benefit by individually changing its policy. The NE
for the incentivized two-player zero-sum Markov game Gθ is the
solution for the following min-max game:
min
π 2
max
π 1
V 1
π (s; θ ),
s ∈ S.
(3.2)
Shapley [76] proves that there exists a NE pair for the min-max
game 3.2 for all state s ∈ S and the min-max value is unique [84].
As is known from [13, 14, 63], there exists a unique policy pair π
for the min-max optimization problem (3.7). Therefore the entropy-
regularized Markov game has the unique NE. Moreover, [14] proves
that an ε/2-optimal NE for the regularized Markov game G′
is an
θ
ε-optimal NE for the original when the regularization parameter
, which indicates the difference between
λ ≤
NE for the regularized Markov game and NE for the original can
be controlled by the regularization parameter. The definition for
(1−γ )ε
2(log( | A1 |)+log( | A2 |))
ε-optimal NE is clearly defined in [14], which means the optimal
gap of the policy is smaller than ε.
3.4 Bi-level Optimization Scheme
Our final goal is to arbitrate conflicts between self-interested players
and the collective-interested designer by navigating all individuals
to the desirable refined NE with higher system welfare. Section 3.2
introduces the incentive parameter θ to modify the intrinsic reward
ri (*; θ ) of Markov games, which is utilized as a tool to design the
system objective and refine NE for arbitration. In this section, we
formulate a bi-level optimization scheme with equilibrium con-
straints induced by such an arbitrating system. Among the bi-level
optimization scheme, for the lower-level players, we aim at finding
the NE for the given incentivized Markov game G′
. Regarding the
θ
upper-level designer, we define a system arbitrating objective tar-
geting the optimal θ that could channel all individuals towards a
desirable NE.
φ 1, π 2
φi (w.r.t πi
For the purpose of gradient computation in Section 4 and exper-
φi with φi ∈ Rdi for
iments in Section 7, we parameterize policy πi
the player i (i ∈ {1, 2}) and denote the policy pair as πφ = (π 1
φ 2 ),
where φ = (φ 1, φ 2) ∈ Rd, d = d1 + d2. To avoid the abuse of subscrip-
tion, we omit i of φi in πi
). The simplification will not
cause confusion because the policy πi of a single player i is only
determined by φi . Then the joint policy could also be rewritten
as the policy pair πφ = (πi
φ ), where i ∈ {1, 2}. The NE of the
φ
′
is de-
regularized Markov game with incentive-perturbed reward G
θ
∗ (θ ), φ 2
noted as πφ∗ (θ ) = (π 1
∗ (θ ))
is the parameter of NE under incentive θ . The definition of NE for
regularized Markov game in (3.6) can be rewritten as,
), where φ∗ (θ ) = (φ 1
, π −i
φ∗ (θ )
φ∗ (θ )
, π 2
φ
(s; θ ), ∀s ∈ S.
V (i)
πφ∗ (θ )
(s; θ ) = max
φi ∈Rdi
V (i)
(πi
φ
φ∗ (θ ) )
,π -i
Arbitrating system. Suppose the arbitrating objective for game
system G′
is only determined by the incentive parameter θ and
θ
the joint policy πφ , written as mapping f (θ, φ) : Θ × Rd → R.
The system aims to minimize the arbitrating objective loss at the
NE of Gθ , f (θ, φ∗ (θ )) . Therefore, the arbitrating system could be
formulated as a bi-level optimization problem:
f∗ (θ ) = f (θ, φ∗ (θ ))
min
θ ∈Θ
s.t . Eν ∗
(cid:104)
V (i)
πφ∗ (θ )
(cid:105)
(s; θ )
= max
φi ∈Rdi
Eν ∗
(cid:20)
V (i)
(πi
φ
,π -i
(cid:21)
(s; θ )
, ∀i ∈ {1, 2}
(3.8)
φ∗ (θ ) )
Remark: Eq. 3.8 is our major objective. We primarily focus
on efficiently learning the upper-level incentive parameter while
treating the lower level as a black-box NE solver. In the following
sections, we focus on deriving the first-order gradient of the upper-
level loss function f∗ (θ ), then establish our Differentiable Arbitrating
(DA) framework based on it.
4 METHOD
The bi-level arbitrating system (Eq. 3.8) with NE constraints guides
players indirectly via the incentive parameter θ to safeguard the
arbitrating objective f . For the lower level, we attempt to determine
the policy parameter of NE under a certain incentivized environ-
ment G′
, remarked as φ ∗ (θ ). For the upper-level designer, we aim
θ
to derive the first-order algorithm to find the optimal incentive
parameter θ such that the objective f∗ (θ ) = f (θ, φ∗ (θ )) can be
optimized while players attain their NE. In such a bi-level problem,
it is challenging to obtain the gradient of f∗, especially when the
solver for regularized NE in the lower level is a black box, since
the incentive parameter θ affects objective f∗ implicitly via refining
the regularized NE for players. Our goal is to derive the gradient of
f∗ w.r.t θ with NE constrains and then develop a backpropagation
scheme that utilize the feedback of policy gradients from the lower
level to establish the gradient of the incentive objective function at
a regularized NE, ∇θ f (θ, φ ∗ (θ )). To be more specific, the gradient
∇θ f (θ, φ ∗ (θ )) can be derived as,
∇θ f∗ = (cid:2)∇θ f (θ,φ) +∇θ φ ∗ (θ )⊺∇φ f (θ, φ)(cid:3)(cid:12)
(cid:12)φ=φ ∗ (θ ).
(4.1)
where ∇θ f (θ,φ) and ∇φ f (θ, φ) are known while the NE gradient
∇θ φ∗ (θ ) need to be derived based on the policy gradient feedback
from the lower level. The computing of the NE gradient ∇θ φ ∗ (θ ) is
in detail discussed in Section 4.1 and then a general backpropagation
framework that for the regularized NE is proposed in Section 4.2.
4.1 Gradient for the Incentive
In this section, we will derive the gradient at NE ∇θ f (θ, φ ∗ (θ )), in
which the key point is to derive NE gradient ∇θ φ ∗ (θ ). For notation
simplification, we denote u (i)
φ (s; θ ) w.r.t
φi then we define
θ (φ; s) as the gradient of V (i)
uθ (φ) := Eν (∗) [uθ (φ; s)],
uθ (φ; s) := (u (1)
(φ; s), u (2)
πφ (s; θ )).
θ
θ
Then, the gradient of uθ (φ) w.r.t. to θ and φ are straightforward as
follows,
πφ (s; θ ), ∇φ 2V (2)
(φ; s)) = (∇φ 1V (1)
(4.2)
∇θuθ (φ) =
∇φuθ (φ) =
Eν (∗)∇2
Eν (∗)∇2
Eν (∗) ∇2
Eν (∗) ∇2
θφ 1V (1)
θφ 2V (2)
φφ 1V (1)
φφ 2V (2)
πφ (s; θ )
πφ (s; θ )
πφ (s; θ )
πφ (s; θ )
∈ Rd×m,
(4.3)
∈ Rd×d .
(4.4)
θφiV (i)
φφiV (i)
The following Lemma 4.1 implies the computation of ∇2
πφ (s; θ )
and ∇2
πφ (s; θ ) can be explicitly derived based on the policy gra-
dient, which are backpropagated from NE solver in the lower level.
The computation details for the gradients and Hessians in Lemma
4.1 are presented throughout Lemma A.1 in appendix due to limi-
tation of space. Then in light of (4.3-4.4) and Lemma 4.1, ∇θ φ ∗ (θ )
can be expressed in policy gradient as derived in the following
Lemma 4.2, inducing the final expression of objective gradient at
NE ∇θ f∗ (θ ).
Lemma 4.1. In an incentive regularized Markov game G
:= π −i
πi
φi
notation simplicity, then we have
t |st ), π −i
φ −i
′
θ , we denote
|st ) and πφ := πφ (at |st ) for
φ −i (a−i
φi (ai
:= πi
t
∇θV (i)
πφ (s; θ ) = ∇θV i
πφ (s; θ ); ∇2
θφiV (i)
πφ (s; θ ) = ∇2
θφiV i
πφ (s; θ );
+
+
+
(cid:32)T −1
∑︁
t =0
(cid:32)T −1
∑︁
t =0
(cid:32)T −1
∑︁
t =0
∇φiV (i)
πφ (s; θ ) = ∇φiV i
πφ (s; θ ) −λEDπφ
(cid:34)T −1
∑︁
t =0
γt ∇φi log πi
φi
(cid:32)T −1
∑︁
+
γt (cid:16)logπi
φi − logπ −i
φ −i
(cid:33) (cid:32)T −1
∑︁
(cid:17)
t =0
∇φi log πi
φi
(cid:33)(cid:35)
;
t =0
φφiV (i)
∇2
πφ (s; θ ) = ∇2
(cid:34) (cid:32)T −1
∑︁
− λEDπφ
t =0
γt (cid:16)log πi
φφiV i
πφ (s; θ )
∇φi logπi
φi
(cid:33) (cid:32)T −1
∑︁
γt (cid:16)
∇φ logπi
φi − ∇φ logπ −i
φ −i
φi − log π −i
φ −i
∇φi log πi
φi
∇φ logπφ
(cid:33)⊺
(cid:17)
(cid:33)⊺
(cid:33) (cid:32)T −1
∑︁
t =0
(cid:33)⊺
t =0
(cid:33) (cid:32)T −1
∑︁
(cid:17)
t =0
(cid:33) (cid:32)T −1
∑︁
(cid:17)
t =0
(cid:33)⊺
γt (cid:16)log πi
φi − log π −i
φ −i
∇2
φφi log πφ
γt ∇φi logπi
φi
∇φ log πφ
+
(cid:33) (cid:32)T −1
∑︁
t =0
(cid:32)T −1
∑︁
t =0
γt ∇2
φφi logπφ
(cid:33)(cid:35)
,
where EDπφ [ * ] denotes the expectation over the trajectory τ ∼
Dπφ (τ) and ∇θV i
πφ (s; θ ), ∇2
are computed from Lemma A.1 in appendix.
πφ (s; θ ), ∇φiV i
φ (s; θ ) and ∇2
φφiV i
θφiV i
φ (s; θ )
Lemma 4.1 utilizes the policy gradient information, which is
easily accessible in a NE solver, to describe how self-interested
players react to the adjustment in the incentive parameter. It is
straightforward to prove but is essential to provide the lower-level
information embedded in the policy gradient to guide the direction
of updates for the incentive parameter against a high collective loss.
In light of Lemma 4.1, Lemma 4.2 presents the gradient of NE
w.r.t. the incentive parameter, which is crucial to leverage the back-
propagated information from the lower level to update the incentive
parameter. It describes how the equilibrium among players is af-
fected by the incentive from the designer and shows that such
information is related to the Hessian of V (i)
πφ (s; θ ) at NE.
Lemma 4.2. The following formula holds for the policy parameter
′
φ (∗) (θ ) of NE πφ ∗ (θ ) for incentive regularized Markov game G
θ :
(4.5)
∇θ φ (∗) (θ ) = − (cid:2)∇φuθ (φ)(cid:3) −1
∇θuθ (φ)(cid:12)
.
(cid:12)φ=φ ∗ (θ )
Then substituting Eq. (4.5) into Eq. (4.1) leads to the final explicit
expression of ∇θ f∗ (θ ):
∇θ f∗ (θ, φ ∗ (θ ))
(cid:104)
∇θ f (θ,φ)−∇θuθ (φ)⊺ (cid:2)∇φuθ (φ)(cid:3) −1
=
∇φ f (θ, φ)
(cid:105) (cid:12)
(cid:12)φ=φ ∗ (θ ).
(4.6)
4.2 Differentiable Arbitrating
Based on the gradient computation in Section 4.1, we propose the
Differentiable Arbitrating (DA) framework to solve the arbitrat-
ing system (Eq. 3.8). DA differentiates the upper-level designer's
objective function through NE and backpropagates the gradient
information of policies from the lower level to derive the upper-
level gradient. In this scheme, the black-box solver for the reg-
ularized NE in the lower level could be any methods contain-
ing gradient information of the policies, for example, SAC [30],
MADDPG [57], MAAC [39], Policy Extragradient Method [14] and
Entropy-regularized OMWU [13].
Framework 1 DA: Differentiable Arbitrating in MARL.
Input: βk : learning rate for upper-level iteration
Output: θ : incent. param.; φ: param. of policy πφ
Initialize the incentive parameter θ = θ0.
for k=0,1,... do
Initialize param. φ = φ0 of policy πφ0
for t=0,1... do
for game G′
θk
.
Update φ = φt with NE solver until corresponding policy
converge to the Nash equilibrium of game G′
, w.r.t
πφt
θk
φ ∗ (θk ).
end for
Update incentive parameter
θ = θk+1 ← θk − βk ∇f∗ (θk ),
where ∇f∗ (θk ) is defined in (4.6).
end for
The workflow of DA is shown in Framework 1. In this work, we
specifically develop the convergence guarantee for the DA frame-
work with lower-level NE solvers which have convergence guaran-
tee and implement our DA framework using a multi-agent variant
of SAC, which will be described in detail later in Section 6.
DA framework is a first-order method. This is because the
update of upper-level incentive θ only relies on the first-order
gradient ∇f∗ (θ ) without any hessian information of θ . The second-
order gradients defined in Lemma 4.1 are hessian matrices of lower-
level value function V and are used for the computation of first-
order gradient ∇f∗ (θ ).
Extension to general settings. Although DA framework is de-
scribed under two-player zero-sum fully observable Markov games,
it could be extended to more general settings: N-players, general-
sum and partially observable Markov decision process (POMDP). For
N-player general-sum Markov games, the game Gθ is required to
be monotone to ensure the entropy-regularized game G′
to be
θ
strongly-monotone and therefore has unique NE. Then the DA
framework could leverage a proper lower-level black-box NE solver
for the (regularized) NE. For POMDPs, some minor adjustments
are required, replacing the state-based policy πi (ai |s) with the
observation-based policy πi (ai |oi ), where oi =Oi (s) is the obser-
vation of the player i in state s. Such adjustments will not change
the gradient computation, which is essential for the DA framework.
The detailed discussions of problem formulation and the gradient
derivation for the general settings are deferred to Appendix C.
5 CONVERGENCE ANALYSIS
In this section, we develop the convergence analysis for the DA
framework with proper lower-level NE solvers in the two-player
zero-sum setting. Section 5.1 discuss lower-level NE solvers with
convergence guarantee in literature that could be applied to our DA
framework. Section 5.2 guarantees the convergence of incentive
parameter θ in the upper level for the bi-level DA framework under
convergent lower-level NE solvers.
5.1 Convergence of the Lower Level
The convergence of the bi-level DA framework requires the lower-
level NE solver for having the convergence guarantee to the NE π∗
of the entropy-regularized Markov game G′
. There are diverse NE
θ
solvers that have good empirical performance in practical games [30,
39, 57]. Some proposed NE solvers have the theoretical conver-
gence proofs [37, 77, 80]. For the illustration of the DA framework
convergence, we take two NE solvers proposed under entropy-
regularization that are directly related with our setting. It is known
that the Policy Extragradient Method (PEM) [14] and Entropy-
regularized OMWU [13] all have the convergence guarantee under
our setting. This section restates the main convergence results for
PEM and Entropy-regularized OMWU for the purpose of complete-
ness of convergence guarantee for DA framework.
Proposition 5.1 (Theorem 3 in [14]). Assume |S1| ≥ |S2| and
λ ≤ 1. Setting learning rate ηt = η =
2(1+λ (log |S1 |+1−γ )) , the Policy
Extragradint Method (Algorithm 4 in supplementary) takes no more
iterations to achieve the policy pair π =
than (cid:101)O
(π1, π2) that satisfies:
Es∼ρ
λ (1−γ ) 2 log2 (cid:16) 1
(s; θ )
≤ ε,
1−γ
(cid:17)(cid:17)
(cid:104)(cid:16)
(cid:17)(cid:105)
(cid:16)
1
ε
V (1)
π ′
1,π2
(s; θ ) − V (1)
π1,π ′
2
max
π ′
1,π ′
2
where ρ is an arbitrary distribution over the state space S.
Proposition 5.2 (Theorem 1 in [13]). Setting 0 < η ≤ (1−γ ) 3
32000|S |
and αt = ηλ, the Entropy-regularized OMWU (Algorithm 5 in supple-
mentary) takes no more than (cid:101)O
iterations to achieve
achieve the policy pair π = (π1, π2) that satisfies:
(cid:16)
(cid:17)
V (1)
π ′
1,π2
(s; θ ) − V (1)
π1,π ′
2
1
(1−γ )ηλ
log 1
ε
(s; θ )
≤ ε.
max
s ∈S,π ′
(cid:17)
(cid:16)
1,π ′
2
Proposition 5.1 and Proposition 5.2 demonstrate that the PEM
and Entropy-regularized OMWU algorithms converges to the NE
for the lower-level incentivized entropy-regularized Markov games
G′
θ
in linear rate.
5.2 Convergence of the Upper Level
Assume that θ ∗ = arg minθ f∗ (θ ) represents the optimal point of
incentive parameter θ in the arbitrating system (3.8). In this section,
we are going to show that the framework 1 guarantees that the
incentive parameter θ converges to θ ∗ under certain assumptions.
Assumption 5.3. We assume that ∇θ f∗ (θ ) is L-Lipschitz continu-
ous (L-smooth) w.r.t θ ∈ Θ, which means
(cid:13)∇θ f∗ (θ ) − ∇θ f∗ (θ ′)(cid:13)
(cid:13)
(cid:13) ≤ L (cid:13)
We also assume that f∗ (θ ) is bounded w.r.t θ ∈ Θ, which means
there exists M > 0 such that
(cid:13) , ∀θ, θ ′ ∈ Θ
(cid:13)θ − θ ′(cid:13)
|f∗ (θ )| ≤ M, ∀θ ∈ Θ
L-smooth assumption is a common assumption in convergence
proofs for different algorithms [1, 41, 50, 72, 92]. We also illustrate
a concrete example to justify Assumption 5.3 is rational in practical
setting in Appendix E. Assumption 5.3 does not require the compos-
ite function f∗ (θ ) = f (θ, φ ∗ (θ )) to be convex and the convergence
guarantee for the upper level even suitable for non-convex cases.
Theorem 5.4. Suppose that Assumption 5.3 holds and the lower-
level NE solver has convergence guarantee. In Framework 1, let the
update rule θk+1 = θk − βk ∇θ f∗ (θk ) for incentive parameter θk run
for T iterations with learning rates βk = 1
L , then we have
min
k=0,...,T
∥∇θ f∗ (θk )∥2 ≤
2L(f∗ (θ0) − f∗ (θ ∗))
T + 1
≤
4LM
T + 1
.
Theorem 5.4 implies that there exist a subsequence in the se-
quence of gradient norms {∥∇θ f∗ (θk )∥}∞
which converges to
k=0
zero. Therefore, Theorem 5.4 guarantees that the incentive parame-
ter θ could always converge to a sub-optimal point with sublinear
convergence rate in the upper level. It is easy to know if the com-
posite function f ∗ (θ ) is convex, it converges to the global optimal
point. The detailed proof is shown in Appendix F.
6 IMPLEMENTATIONS
The direct implementation of PEM and Entropy-regularized OMWU
are not practical/efficient although they have the theoretical con-
vergence guarantee. PEM is a double-loop algorithm that invokes
solving the NE of an entropy-regularized Matrix game for each
inner-loop. Although Entropy-regularized OMWU is a single-loop
algorithm that adapts a two-timescale iteration, its update rules are
for the tabular setting, in which the policy are per state updated.
Therefore, we modify the vanilla algorithm of Entropy-regularized
OMWU with some techniques inspired by the multi-agent soft-
actor-critic (MASAC) and propose the DA-SAC algorithm (Algo. 6).
We organize the modifications as the following:
i) In stead of the per-state policy update in Entropy-regularized
OMWU, we optimize a separate policy model via minimizing
its KL divergence from the exponential energy function, i.e.,
we establish an actor-critic structure as widely accepted in
SAC.
ii) We use one-step gradient update with great practical suc-
cess accepted by most of MARL practical algorithms, e.g.
SAC [30], MADDPG [57] and MAAC [39], instead of the
extragradient technique introduced in Entropy-regularized
OMWU.
iii) We follow SAC to set the energy function as a multiple of
the Q function, where the scale factor is the reciprocal of the
auto-tuned temperature coefficient [31].
Updated pseudo-code and all remaining details are included in
Appendix G.
7 EXPERIMENTS
We evaluate the performance of the DA framework in sense of sam-
ple efficiency for the upper level in two zero-sum Markov games
with two players and their incentivized variant, running with scis-
sors (RWS) [83] which contains cyclic reinforcement learning chal-
lenges [6, 47, 68] and a standard predator-prey, both of which are
implemented on a grid-world environment [17].
7.1 Evaluation Environments
Running with scissors (RWS). In 5×5 grid-world RWS, resources
(rock, scissors, or paper) are tailed in resources pools (Figure 2).
Three of them are deterministic pools spaced with fixed resources
and six others are nondeterministic filled with random resources.
Two players randomly spawn among the free grids and fully observe
the environment and resources owned by their opponent. Each
(a) RWS (θ0)
(b) RWS (θ ∗)
(c) PP (θ0)
(d) PP (θ ∗)
Figure 1: Trace for incentivized RWS and incentivized PP with different incentive parameters θ0 and θ ∗ (left to right). θ0 is the
initial incentive parameter and θ ∗ is the optimized parameter with DA framework. The NEs after arbitration (Figure (b) & (d))
ensure higher exploration rate in the grid-world games compared with the initial NEs (Figure (a) & (c)) without arbitration.
Figure 2: Configuration of the Rock-with-Scissors (RWS).
Two players are randomly spawned among the free grids
and collect resources for confrontation. The bonus coins
are the incentive added by the designer to encourage explo-
ration.
Figure 3: Configuration of the Predator-Prey (PP). The preda-
tor aims to catch the prey and the prey aims to return to the
nest. Both of them are randomly spawned in born region.
The water pools are set as the incentive by the designer.
chooses to move one grid in four directions at one step. When the
player i steps on the grid with the resource, it collects the resource
to its inventory vi , and the resource is removed from the grid. Four
rocks, papers and scissors are randomly distributed to two players
at the initial state and each player is assigned at least one for each
resource. After 25 steps, the confrontation occurs and the payoffs
for each player, r 0 and r 1, are calculated on the basis of the standard
antisymmetric matrix M [36] as
(cid:18) v 1
∥v 1 ∥
= −r 1, where M =
v 0
∥v 0 ∥
r 0 =
(cid:19) ⊺
M
.
−1
0
1
0
1
−1
1
−1
0
Besides, the rules of the game are assumed to be a blank to the
players and they must explore to discover them.
RWS is an extension of the classic matrix game rock-paper-
scissors (RPS) with increasing complexity, and the game-theoretic
structures of the RPS are satisfied in RWS. Since NE is to keep the
same number of each resource in their inventory [82], players tend
to stay around a grid after they achieve NE instead of continuing
to explore, while the upper-level designer hopes more grids can
be explored. Given such a conflict, the designer intervenes in the
rewards by scattering gold coins as an incentive to channel players
exploring more grids.
There are four grids that generate coins. Two of them are filled
with fixed bonuses 0.5, and others are filled with adjustable bonuses
marked as the incentive parameter θ = (θ1, θ2) ∈ R2. Once the
player i collects coins, the corresponding bonuses are added to
its total reward. Conversely, the bonuses collected by player i are
deducted from its opponent −i. The total reward for the player i is
j − I −i
j ) + 0.5(N i
ri
total =ri +
fixed − N −i
fixed),
θ j (Ii
∑︁
j=1,2
where Ii
j = 1 if the coin with incentive bonus θ j is collected by the
player i, otherwise Ii
is the number of fixed coins
collected by the player i. Then the exploration rate (ER) can be
defined as
j = 0 and N i
fixed
ER(θ ) =
e (θ )
(cid:205)i Gi
Gtotal
,
(7.1)
where the Gi
e (θ ) denotes the number of grids explored by player
i and Gtotal denotes the total number of grids. Therefore, the de-
signer's loss is defined as f∗ (θ ) = 1 − ER(θ ).
Predator-prey (PP). The environment for the predator-prey is
set in a 7 × 7 grid-world as Figure 3, containing the prey's nest,
two shelters, and water pools. Both the predator and prey cannot
stop at the shelter. At each step, the prey can move one grid and
the predator can move one or two grids in four directions. The
game is terminated under three conditions: i) the episode achieves
maximum length 25; ii) the prey returns the nest, then the reward
for the prey, rprey, is +1 and the reward for the predator, rpred, is
−1; iii) the predator catches the prey (they arrive on the same grid
at the same time), then the reward for prey, rprey, is −1 and the
player 0player 1bonus coinrockpaperscissorsdeterministicpreypredatorshelternestdeterministic bonusborn regionbonus waterreward for predator, rpred, is +1. From a whole-ecosystem perspec-
tive, like the dissemination of plant seeds, the designer stimulates
them to explore more places by setting four pools with different
volumes of water in the four fixed grids. Two of them are filled with
fixed water volume with an additional 0.1 bonuses and others are
filled with adjustable water volume, whose bonuses are denoted
as the incentive parameter θ = (θ1, θ2) ∈ R2. The player gets the
corresponding bonus if it finds and drinks up a pool of water while
its opponent gets the corresponding penalty. Then the total pay-off
for the predator is
∑︁
j=1,2
− I prey
j
θ j (I pred
j
) +0.5(N pred
rpred =Icatch −Inest +
fixed − N prey
fixed),
where Icatch and Inest are two indicators for that the predator catch
the prey or the prey back to the nest, I pred
) is the indication
functions of whether the pool with θ j amount of water is found by
the predator (or prey) and N pred
) represents the number
fixed
of fixed pools discovered by the predator (or prey). In addition,
we define the reward for prey as rprey = −rpred. The arbitrating
objective for PP is the same as what is defined for RWS.
(or N prey
fixed
(or I prey
j
j
7.2 Results and Analysis
We use GridSearch(M) to denote the zeroth-order method, which
spreads M number of points into the feasible region for incentive
parameter θ , as a competitor to DASAC. Additionally, we adopt
Bayesian optimization to improve the efficiency of the zeroth-order
method, denoted as BayesOpt, which is also used in [64]. The ex-
perimental details of GridSearch(M) and BayesOpt are included in
Appendix G.2. Figure 4 shows the trend of the arbitrating objective
f∗ after applying DASAC onto the environments. The green dotted
line in Figure 4 is the best objective score of GridSearch(100). On
the one hand, Figure 4 shows the differentiable first-order frame-
work we propose is capable to admit a better incentive parameter
θ with a lower objective loss. On the other hand, Figure 4 indicates
that GridSearch(M) requires 100 samples, in another word, solving
the lower-level Markov game 100 times, to achieve an equivalent
performance of DASAC. DASAC can achieve better efficiency ( 5
outer-loop iterations) than these zeroth-order methods even though
BayesOpt ( 12 outer-loop iterations, >2 times slower than ours) has
improved the efficiency of GridSearch (100 outer-loop iterations).
After considering the gradient computation, DASAC requires 3.5h
for one iteration and the zeroth-order methods (Gridsearch and
BayesOpt) requires 3h for one iteration under the same GPU set-
ting. Our method is 2x faster than BayesOpt and 17x faster than
Gridsearch(100). It means our first-order framework requires fewer
evaluations for the upper level to obtain a desirable NE policy,
leading to a higher sample efficiency.
Furthermore, we will present our DASAC tends to reach a desir-
able NE via analyzing the NE behavior at the initial incentive θ0 and
the optimal incentive θ ∗ (marked in Figure 4). Figure 1 illustrates
the trace of players when taking the NE policies in RWS and PP
environments with initial incentive θ0 and the optimal incentive
θ ∗ respectively. It demonstrates that the optimal θ ∗ navigates the
system to a better NE that players are more exploration-minded.
To be more specific, with the initial incentive parameter θ0, al-
though players start to take account of the exploration rate and
think outside the habitual behaviors in an unincentivized system,
Figure 4: Arbitrating objective loss f∗ for DASAC, BayesOpt,
and GridSearch(100) in RWS (top) and PP (bottom). The
green dotted line indicates the best objective score of Grid-
Search(100). Our DASAC can outperform two zeroth-order
baselines, GridSearch(100) and BayesOpt, by a large margin,
which shows that our first-order framework requires fewer
evaluations for the upper level to obtain a desirable NE pol-
icy, leading to a higher sample efficiency.
e.g., standstill but not collecting resources after a few steps in RWS
or stalemate in a relative diagonal position in PP, they still tend
to maintain the habitual behavior after a few explorations. As the
training for the incentive parameter goes on, the habitual behav-
iors in an unincentivized system are gradually abandoned and they
develop new patterns of behavior that lead to a higher exploration
rate and ensure their own goals at the same time. For example, in
PP, the predator still tries their best to catch the prey, and the prey
tries to escape as soon as possible. The difference is that the prey
tends to circle around, exploring the water source to replenish its
energy instead of staying in one place and avoiding risky moves.
8 CONCLUSION
Our work initiates a provably differentiable framework in context
with MARL to solve a bi-level arbitrating problem. We provide the
convergence proof and empirically validate the effectiveness of the
DASAC on arbitrating in two Markov games. Our work can be
extended to multiple-player and general-sum settings with proper
NE solvers whose convergence properties have been empirically
shown. Therefore, we will empirically test the performance of the
02468101214outer-loop iteration0.1250.1500.1750.2000.2250.2500.2750.300incentive lossRock with ScissorsDASACBayesOptGridsearch(100)024681012outer-loop iteration0.4250.4500.4750.5000.5250.5500.5750.600incentive lossPredator PreyDASACBayesOptGridsearch(100)performance of the DA framework on more general cases in our
future work.
REFERENCES
[1] Hadi Abbaszadehpeivasti, Etienne de Klerk, and Moslem Zamani. 2022. The exact
worst-case convergence rate of the gradient method with fixed step lengths for
L-smooth functions. Optimization Letters 16, 6 (2022), 1649–1661.
[2] Zafarali Ahmed, Nicolas Le Roux, Mohammad Norouzi, and Dale Schuurmans.
2019. Understanding the impact of entropy on policy optimization. In Interna-
tional Conference on Machine Learning. PMLR, 151–160.
[3] Ahmet Alacaoglu, Luca Viano, Niao He, and Volkan Cevher. 2022. A natural
actor-critic framework for zero-sum Markov games. In International Conference
on Machine Learning. PMLR, 307–366.
[4] Brandon Amos and J Zico Kolter. 2017. Optnet: Differentiable optimization as a
layer in neural networks. In International Conference on Machine Learning. PMLR,
136–145.
[5] Haris Aziz and Florian Brandl. 2021. Efficient, fair, and incentive-compatible
healthcare rationing. arXiv preprint arXiv:2102.04384 (2021).
[6] David Balduzzi, Karl Tuyls, Julien Perolat, and Thore Graepel. 2018. Re-evaluating
evaluation. arXiv preprint arXiv:1806.02643 (2018).
[7] Jeffrey S Banks and Joel Sobel. 1987. Equilibrium selection in signaling games.
Econometrica: Journal of the Econometric Society (1987), 647–661.
[8] Tamer Başar and Geert Jan Olsder. 1998. Dynamic noncooperative game theory.
SIAM.
[9] Atilim Gunes Baydin, Robert Cornish, David Martinez Rubio, Mark Schmidt,
and Frank Wood. 2018. Online Learning Rate Adaptation with Hypergradient
Descent. In International Conference on Learning Representations.
[10] B Douglas Bernheim and Michael D Whinston. 1987. Coalition-proof Nash
equilibria II. applications. Journal of Economic Theory 42, 1 (1987), 13–29.
[11] Patrick Bolton and Mathias Dewatripont. 2004. Contract theory. MIT press.
[12] Carlo Cambini and Laura Rondi. 2010.
Incentive regulation and investment:
evidence from European energy utilities. Journal of regulatory economics 38, 1
(2010), 1–26.
[13] Shicong Cen, Yuejie Chi, Simon S Du, and Lin Xiao. 2022. Faster Last-iterate
Convergence of Policy Optimization in Zero-Sum Markov Games. arXiv preprint
arXiv:2210.01050 (2022).
[14] Shicong Cen, Yuting Wei, and Yuejie Chi. 2021. Fast policy extragradient meth-
ods for competitive games with entropy regularization. Advances in Neural
Information Processing Systems 34 (2021), 27952–27964.
[15] Georgios Chalkiadakis and Craig Boutilier. 2003. Coordination in Multiagent
Reinforcement Learning: A Bayesian Approach. In Proceedings of the Second
International Joint Conference on Autonomous Agents and Multiagent Systems
(Melbourne, Australia) (AAMAS '03). Association for Computing Machinery,
New York, NY, USA, 709–716. https://doi.org/10.1145/860575.860689
[16] Ziyi Chen, Shaocong Ma, and Yi Zhou. 2021. Sample Efficient Stochastic Policy
Extragradient Algorithm for Zero-Sum Markov Game. In International Conference
on Learning Representations.
[17] Maxime Chevalier-Boisvert, Lucas Willems, and Suman Pal. 2018. Minimalistic
Gridworld Environment for OpenAI Gym. https://github.com/maximecb/gym-
minigrid.
[18] Caroline Claus and Craig Boutilier. 1998. The dynamics of reinforcement learning
in cooperative multiagent systems. AAAI/IAAI 1998, 746-752 (1998), 2.
[19] Benoît Colson, Patrice Marcotte, and Gilles Savard. 2007. An overview of bilevel
optimization. Annals of operations research 153, 1 (2007), 235–256.
[20] Bo Dai, Albert Shaw, Lihong Li, Lin Xiao, Niao He, Zhen Liu, Jianshu Chen, and
Le Song. 2018. SBEED: Convergent Reinforcement Learning with Nonlinear
Function Approximation. In Proceedings of the 35th International Conference on
Machine Learning (Proceedings of Machine Learning Research, Vol. 80), Jennifer
Dy and Andreas Krause (Eds.). PMLR, 1125–1134. https://proceedings.mlr.press/
v80/dai18c.html
[21] Sam Devlin and Daniel Kudenko. 2011. Theoretical considerations of potential-
based reward shaping for multi-agent systems. In The 10th International Confer-
ence on Autonomous Agents and Multiagent Systems. ACM, 225–232.
[22] Yali Du, Lei Han, Meng Fang, Ji Liu, Tianhong Dai, and Dacheng Tao. 2019.
Liir: Learning individual intrinsic reward in multi-agent reinforcement learning.
(2019).
[23] Pradeep Dubey. 1986. Inefficiency of Nash Equilibria. Mathematics of Operations
Research 11, 1 (1986), 1–8. http://www.jstor.org/stable/3690047
[24] Fei Fang, Albert Xin Jiang, and Milind Tambe. 2013. Protecting moving targets
with multiple mobile resources. Journal of Artificial Intelligence Research 48 (2013),
583–634.
[25] Xidong Feng, Oliver Slumbers, Ziyu Wan, Bo Liu, Stephen McAleer, Ying Wen,
Jun Wang, and Yaodong Yang. 2021. Neural auto-curricula in two-player zero-sum
games. Advances in Neural Information Processing Systems 34 (2021), 3504–3517.
[26] Chelsea Finn, Pieter Abbeel, and Sergey Levine. 2017. Model-agnostic meta-
learning for fast adaptation of deep networks. In International Conference on
Machine Learning. PMLR, 1126–1135.
[27] Terry L Friesz, Roger L Tobin, Hsun-Jung Cho, and Nihal J Mehta. 1990. Sensitivity
analysis based heuristic algorithms for mathematical programs with variational
inequality constraints. Mathematical Programming 48, 1 (1990), 265–284.
[28] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley,
Sherjil Ozair, Aaron Courville, and Yoshua Bengio. 2020. Generative adversarial
networks. Commun. ACM 63, 11 (2020), 139–144.
[29] Tuomas Haarnoja, Haoran Tang, Pieter Abbeel, and Sergey Levine. 2017. Rein-
forcement learning with deep energy-based policies. In International Conference
on Machine Learning. PMLR, 1352–1361.
[30] Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. 2018. Soft
actor-critic: Off-policy maximum entropy deep reinforcement learning with a
stochastic actor. In International conference on machine learning. PMLR, 1861–
1870.
[31] Tuomas Haarnoja, Aurick Zhou, Kristian Hartikainen, George Tucker, Sehoon
Ha, Jie Tan, Vikash Kumar, Henry Zhu, Abhishek Gupta, Pieter Abbeel, et al. 2018.
Soft actor-critic algorithms and applications. arXiv preprint arXiv:1812.05905
(2018).
[32] Yuval Noah Harari. 2014. Sapiens: A brief history of humankind. Random House.
[33] Johannes Heinrich, Marc Lanctot, and David Silver. 2015. Fictitious Self-Play in
Extensive-Form Games. In Proceedings of the 32nd International Conference on
Machine Learning (Proceedings of Machine Learning Research, Vol. 37), Francis
Bach and David Blei (Eds.). PMLR, Lille, France, 805–813. https://proceedings.
mlr.press/v37/heinrich15.html
[34] Johannes Heinrich and David Silver. 2015. Smooth uct search in computer poker.
In Twenty-Fourth International Joint Conference on Artificial Intelligence.
[35] Johannes Heinrich and David Silver. 2016. Deep reinforcement learning from
self-play in imperfect-information games. arXiv preprint arXiv:1603.01121 (2016).
[36] Josef Hofbauer and Karl Sigmund. 2003. Evolutionary game dynamics. Bulletin
of the American mathematical society 40, 4 (2003), 479–519.
[37] Junling Hu and Michael P Wellman. 2003. Nash Q-learning for general-sum
stochastic games. Journal of machine learning research 4, Nov (2003), 1039–1069.
[38] Aly Ibrahim, Anirudha Jitani, Daoud Piracha, and Doina Precup. [n.d.]. Reward
Redistribution Mechanisms in Multi-agent Reinforcement Learning. ([n. d.]).
[39] Shariq Iqbal and Fei Sha. 2019. Actor-attention-critic for multi-agent reinforce-
ment learning. In International Conference on Machine Learning. PMLR, 2961–
2970.
[40] Haoming Jiang, Zhehui Chen, Yuyang Shi, Bo Dai, and Tuo Zhao. 2021. Learn-
ing to Defend by Learning to Attack. In International Conference on Artificial
Intelligence and Statistics. PMLR, 577–585.
[41] Diederik P Kingma and Jimmy Ba. 2014. Adam: A method for stochastic opti-
mization. arXiv preprint arXiv:1412.6980 (2014).
[42] Zafeiris Kokkinogenis, Nuno Monteiro, Rosaldo JF Rossetti, Ana LC Bazzan,
and Pedro Campos. 2014. Policy and incentive designs evaluation: A social-
oriented framework for Artificial Transportation Systems. In 17th International
IEEE Conference on Intelligent Transportation Systems (ITSC). IEEE, 151–156.
[43] Vijay R Konda and John N Tsitsiklis. 2000. Actor-critic algorithms. In Advances
in neural information processing systems. 1008–1014.
[44] Jean-Jacques Laffont and David Martimort. 2009. The theory of incentives. Prince-
ton university press.
[45] Theodore J Lambert Iii, Marina A Epelman, and Robert L Smith. 2005. A fictitious
play approach to large-scale optimization. Operations Research 53, 3 (2005),
477–489.
[46] Kyungjae Lee, Sungjoon Choi, and Songhwai Oh. 2018. Sparse markov decision
processes with causal sparse tsallis entropy regularization for reinforcement
learning. IEEE Robotics and Automation Letters 3, 3 (2018), 1466–1473.
[47] Joel Z Leibo, Edward Hughes, Marc Lanctot, and Thore Graepel. 2019. Autocur-
ricula and the emergence of innovation from social interaction: A manifesto for
multi-agent intelligence research. arXiv preprint arXiv:1903.00742 (2019).
[48] George Leitmann. 1978. On generalized Stackelberg strategies. Journal of opti-
mization theory and applications 26, 4 (1978), 637–643.
[49] Chenghao Li, Chengjie Wu, Tonghan Wang, Jun Yang, Qianchuan Zhao, and
Chongjie Zhang. 2021. Celebrating Diversity in Shared Multi-Agent Reinforce-
ment Learning. arXiv preprint arXiv:2106.02195 (2021).
[50] Huan Li, Cong Fang, Wotao Yin, and Zhouchen Lin. 2018. A sharp conver-
gence rate analysis for distributed accelerated gradient methods. arXiv preprint
arXiv:1810.01053 (2018).
[51] Jiayang Li, Jing Yu, Yu Nie, and Zhaoran Wang. 2020. End-to-end learning and
intervention in games. Advances in Neural Information Processing Systems 33
(2020).
[52] Tao Li and Suresh P Sethi. 2017. A review of dynamic Stackelberg game models.
Discrete & Continuous Dynamical Systems-B 22, 1 (2017), 125.
[53] Michael L Littman. 1994. Markov games as a framework for multi-agent rein-
forcement learning. In Machine learning proceedings 1994. Elsevier, 157–163.
[54] Boyi Liu, Jiayang Li, Zhuoran Yang, Hoi-To Wai, Mingyi Hong, Yu Marco Nie,
Inducing Equilibria via Incentives: Simultaneous
and Zhaoran Wang. 2021.
Design-and-Play Finds Global Optima. arXiv preprint arXiv:2110.01212 (2021).
[81] Zhenggang Tang, Chao Yu, Boyuan Chen, Huazhe Xu, Xiaolong Wang, Fei Fang,
Simon Shaolei Du, Yu Wang, and Yi Wu. 2021. Discovering Diverse Multi-Agent
Strategic Behavior via Reward Randomization. In International Conference on
Learning Representations. https://openreview.net/forum?id=lvRTC669EY_
[82] Anne van den Nouweland. 2007. Rock-paper-scissors; a new and elegant proof.
(2007).
[83] Alexander Vezhnevets, Yuhuai Wu, Maria Eckstein, Rémi Leblond, and Joel Z
Leibo. 2020. OPtions as REsponses: Grounding behavioural hierarchies in multi-
agent reinforcement learning. In International Conference on Machine Learning.
PMLR, 9733–9742.
[84] John Von Neumann and Oskar Morgenstern. 2007. Theory of games and economic
behavior. In Theory of games and economic behavior. Princeton university press.
[85] Kai Wang, Sanket Shah, Haipeng Chen, Andrew Perrault, Finale Doshi-Velez,
and Milind Tambe. 2021. Learning MDPs from Features: Predict-Then-Optimize
for Sequential Decision Making by Reinforcement Learning. Advances in Neural
Information Processing Systems 34 (2021), 8795–8806.
[86] Kai Wang, Lily Xu, Andrew Perrault, Michael K Reiter, and Milind Tambe. 2022.
Coordinating followers to reach better equilibria: End-to-end gradient descent for
stackelberg games. In Proceedings of the AAAI Conference on Artificial Intelligence,
Vol. 36. 5219–5227.
[87] Xiaoxing Wang, Wenxuan Guo, Junchi Yan, Jianlin Su, and Xiaokang Yang. 2021.
ZARTS: On Zero-order Optimization for Neural Architecture Search. arXiv
preprint arXiv:2110.04743 (2021).
[88] Thomas A Weber and AV Kryazhimskiy. 2011. Optimal control theory with
applications in economics. Vol. 10. MIT press Cambridge, MA.
[89] Changnan Xiao, Haosen Shi, Jiajun Fan, and Shihong Deng. 2021. An Entropy
Regularization Free Mechanism for Policy-based Reinforcement Learning. arXiv
preprint arXiv:2106.00707 (2021).
[90] Jiachen Yang, Ang Li, Mehrdad Farajtabar, Peter Sunehag, Edward Hughes, and
Hongyuan Zha. 2020. Learning to Incentivize Other Learning Agents. Advances
in Neural Information Processing Systems 33 (2020).
[91] Jiachen Yang, Ethan Wang, Rakshit Trivedi, Tuo Zhao, and Hongyuan Zha. 2022.
Adaptive Incentive Design with Multi-Agent Meta-Gradient Reinforcement Learn-
ing. In Proceedings of the 21st International Conference on Autonomous Agents and
Multiagent Systems. 1436–1445.
[92] Tianbao Yang, Qihang Lin, and Zhe Li. 2016. Unified convergence analysis of
stochastic momentum methods for convex and non-convex optimization. arXiv
preprint arXiv:1604.03257 (2016).
[93] Rui Zhao, Xudong Sun, and Volker Tresp. 2019. Maximum Entropy-Regularized
Multi-Goal Reinforcement Learning. In Proceedings of the 36th International
Conference on Machine Learning (Proceedings of Machine Learning Research,
Vol. 97), Kamalika Chaudhuri and Ruslan Salakhutdinov (Eds.). PMLR, 7553–
7562. https://proceedings.mlr.press/v97/zhao19d.html
[94] Yulai Zhao, Yuandong Tian, Jason Lee, and Simon Du. 2022. Provably Efficient
Policy Optimization for Two-Player Zero-Sum Markov Games. In International
Conference on Artificial Intelligence and Statistics. PMLR, 2736–2761.
[95] Han Zhong, Zhuoran Yang, Zhaoran Wang, and Michael I Jordan. 2021. Can Re-
inforcement Learning Find Stackelberg-Nash Equilibria in General-Sum Markov
Games with Myopic Followers? arXiv preprint arXiv:2112.13521 (2021).
[55] Boyi Liu, Zhuoran Yang, and Zhaoran Wang. 2020. Policy Optimization in
Zero-Sum Markov Games: Fictitious Self-Play Provably Attains Nash Equilibria.
(2020).
[56] Jingbin Liu, Xinyang Gu, and Shuai Liu. 2019. Policy optimization reinforcement
learning with entropy regularization. arXiv preprint arXiv:1912.01557 (2019).
[57] Ryan Lowe, Yi Wu, Aviv Tamar, Jean Harb, Pieter Abbeel, and Igor Mordatch.
2017. Multi-agent actor-critic for mixed cooperative-competitive environments.
In Proceedings of the 31st International Conference on Neural Information Processing
Systems. 6382–6393.
[58] Zhi-Quan Luo, Jong-Shi Pang, and Daniel Ralph. 1996. Mathematical programs
with equilibrium constraints. Cambridge University Press.
[59] Xiaochen Ma, Hong Wang, Li Yang, Leiyu Shi, and Xiaoyun Liu. 2019. Realigning
the incentive system for China's primary healthcare providers. Bmj 365 (2019).
[60] Hugh Macartney, Robert McMillan, and Uros Petronijevic. 2016. Incentive de-
sign in education: An empirical analysis. Technical Report. National Bureau of
Economic Research.
[61] H Brendan McMahan and Geoffrey J Gordon. 2007. A fast bundle-based anytime
algorithm for poker and other convex games. In Artificial Intelligence and Statistics.
PMLR, 323–330.
[62] Joy Melnikow, Mary Paliescheskey, and Gary K Stewart. 1997. Effect of a trans-
portation incentive on compliance with the first prenatal appointment: a ran-
domized trial. Obstetrics & Gynecology 89, 6 (1997), 1023–1027.
[63] Panayotis Mertikopoulos and William H Sandholm. 2016. Learning in games
via reinforcement and regularization. Mathematics of Operations Research 41, 4
(2016), 1297–1324.
[64] David Mguni, Joel Jennings, Emilio Sison, Sergio Valcarcel Macua, Sofia Ceppi,
and Enrique Munoz de Cote. 2019. Coordinating the Crowd: Inducing Desirable
Equilibria in Non-Cooperative Systems. In Proceedings of the 18th International
Conference on Autonomous Agents and MultiAgent Systems. 386–394.
[65] Amir-Hamed Mohsenian-Rad, Vincent WS Wong, Juri Jatskevich, and Robert
Schober. 2010. Optimal and autonomous incentive-based energy consumption
scheduling algorithm for smart grid. In 2010 Innovative Smart Grid Technologies
(ISGT). IEEE, 1–6.
[66] Roger B Myerson. 1978. Refinements of the Nash equilibrium concept. Interna-
tional journal of game theory 7, 2 (1978), 73–80.
[67] Alex Nichol, Joshua Achiam, and John Schulman. 2018. On first-order meta-
learning algorithms. arXiv preprint arXiv:1803.02999 (2018).
[68] Shayegan Omidshafiei, Christos Papadimitriou, Georgios Piliouras, Karl Tuyls,
Mark Rowland, Jean-Baptiste Lespiau, Wojciech M Czarnecki, Marc Lanctot,
Julien Perolat, and Remi Munos. 2019. α-rank: Multi-agent evaluation by evolu-
tion. Scientific reports 9, 1 (2019), 1–29.
[69] Jack Parker-Holder, Luke Metz, Cinjon Resnick, Hengyuan Hu, Adam Lerer,
Alistair Letcher, Alex Peysakhovich, Aldo Pacchiano, and Jakob Foerster. 2020.
Ridge Rider: Finding Diverse Solutions by Following Eigenvectors of the Hessian.
arXiv preprint arXiv:2011.06505 (2020).
[70] A.C. Pigou and N. Aslanbeigui. 1920. The Economics of Welfare (1st ed.). Routledge.
[71] Aida Rahmattalabi, Jen Jen Chung, Mitchell Colby, and Kagan Tumer. 2016. D++:
Structural credit assignment in tightly coupled multiagent domains. In 2016
IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS). IEEE,
4424–4429.
[72] Ali Ramezani-Kebrya, Ashish Khisti, and Ben Liang. 2018. On the generalization
of stochastic gradient descent with momentum. arXiv preprint arXiv:1809.04564
(2018).
[73] Lillian J Ratliff, Roy Dong, Shreyas Sekar, and Tanner Fiez. 2019. A perspective
on incentive design: Challenges and opportunities. Annual Review of Control,
Robotics, and Autonomous Systems 2 (2019), 305–338.
[74] John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov.
2017. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347
(2017).
[75] Reinhard Selten. 1965. Spieltheoretische behandlung eines oligopolmodells mit
nachfrageträgheit: Teil i: Bestimmung des dynamischen preisgleichgewichts.
Zeitschrift für die gesamte Staatswissenschaft/Journal of Institutional and Theoreti-
cal Economics H. 2 (1965), 301–324.
[76] Lloyd S Shapley. 1953. Stochastic games. Proceedings of the national academy of
sciences 39, 10 (1953), 1095–1100.
[77] Satinder Singh, Tommi Jaakkola, Michael L Littman, and Csaba Szepesvári. 2000.
Convergence results for single-step on-policy reinforcement-learning algorithms.
Machine learning 38, 3 (2000), 287–308.
[78] Chen Siyu, Yang Donglin, Li Jiayang, Wang Senmiao, Yang Zhuoran, and Wang
Zhaoran. 2022. Adaptive Model Design for Markov Decision Process. Technical
Report.
[79] Xingyou Song, Wenbo Gao, Yuxiang Yang, Krzysztof Choromanski, Aldo Pacchi-
ano, and Yunhao Tang. 2020. ES-MAML: Simple Hessian-Free Meta Learning. In
ICLR.
[80] Csaba Szepesvári and Michael L Littman. 1999. A unified analysis of value-
function-based reinforcement-learning algorithms. Neural computation 11, 8
(1999), 2017–2060.
Differentiable Arbitrating in Zero-sum Markov Games
Contents
Proof for Lemma 4.1
Proof for Lemma 4.2
Extensions of DA framework
PEM and Entropy-regularized OMWU
Policy Extragradient Method (PEM)
Entropy-regularized OMWU
Clarification for Assumption 5.3
section*.1section.1section.2section.3subsection.3.1subsection.3.2subsection.3.3subsection.3.4section.4subsection.4.1subsection.4.2section.5subsection.5.1subsection.5.2section.6section.7subsection.7.1subsection.7.2section.8section*.9
A
B
C
D
D.1
D.2
E
E.1
F
G
G.1
G.2
G.3
DASAC
GridSearch(M) and BayesOpt baselines
Implementation Details
Proof for Theorem 5.4
Experimental Details
11
15
15
22
22
22
23
25
27
28
28
29
29
Proof for Lemma E.3
A PROOF FOR LEMMA 4.1
In this section, we provide the formulation of gradients ∇θV (i)
derivation of gradients for V i
πφ (s; θ ), ∇φiV (i)
φφiV (i)
πφ (s; θ ) in the following Lemma A.1 and then move into the proof for Lemma 4.1.
Lemma A.1. For incentivized Markov game Gθ = (N, S, {Ai }i ∈ {1,2}, P, {ri (*; θ )}i ∈ {1,2}, γ), let Ri (τ; θ ) be the total reward for an sample
trajectory τ on following πφ for T steps, starting from initial state s0 = s. We have
πφ (s; θ ). We first introduce the
πφ (s; θ ) and ∇2
πφ (s; θ ), ∇2
θφiV (i)
∇θV i
πφ (s; θ ) = Eτ∼Dπφ
∇φiV i
πφi (s; θ ) = Eτ∼Dπφ
∇2
θφiV i
πφ (s; θ ) = Eτ∼Dπφ
∇2
φφiV i
πφ (s; θ ) = Eτ∼Dπφ
(cid:2)∇θ Ri (τ; θ )|s0 = s(cid:3) ,
(cid:34)
T −1
∑︁
Ri (τ; θ )
∇φi log πi
t =0
φi (at |st )
(cid:35)
,
(cid:12)
s0 = s
(cid:12)
(cid:12)
(cid:34)(cid:32)T −1
∑︁
t =0
∇φi log πi
φi (at |st )
(cid:33)
∇θ Ri (τ; θ )⊺(cid:12)
s0 = s
(cid:12)
(cid:12)
(cid:35)
,
(cid:34)
Ri (τ; θ )
(cid:32)
T −1
∑︁
(
t =0
∇φi log πi
φi (at |st ))(
∇φ log πφ (at |st ))⊺
T −1
∑︁
t =0
(cid:35)
,
(cid:12)
s0 = s
(cid:12)
(cid:12)
where
∇2
φφi log πφ (at |st )
(cid:33)
+
T −1
∑︁
t =0
∇φ log πφ (at |st ) = (∇φ 1 log π 1
φ 1φi log π 1
φφi log πφ (at |st ) = (∇2
∇2
φ 1 (at |st ), ∇φ 2 log π 2
φ 1 (at |st ), ∇2
φ 2φi log π 2
φ 2 (at |st ))
φ 2 (at |st )).
Proof for Lemma A.1. First, we find out ∇φi log Dπφ (τ |s0 = s):
(cid:32) 2
(cid:214)
(cid:34)T −1
(cid:214)
∇φi log Dπφ (τ |s0 = s) = ∇φi log
P (st +1|st , at )
(cid:33)(cid:35)
φi (ai
πi
t |st )
t =0
= ∇φi
(cid:34)T −1
∑︁
t =0
log P (st +1|st , at ) +
i=1
T −1
∑︁
t =0
log πi
φi (at |st ) +
T −1
∑︁
t =0
log π −i
φ −i (at |st )
(cid:35)
=
T −1
∑︁
t =0
∇φi log πi
φi (at |st ).
Similarly, we have ∇φ log Dπφ (τ |s0 = s) = (cid:205)T −1
over, recall that ∇φφi log πφ (at |st ) = (∇φ 1φi log π 1
and ∇2
πφ (s; θ ) as follows,
φφiV i
t =0 ∇φ log πφ (at |st ), where ∇φ log πφ (at |st ) = (∇φ 1 log π 1
φ 2 (at |st )), we could derive ∇θV i
φ 1 (at |st ), ∇φ 2φi log π 2
φ 1 (at |st ), ∇φ 2 log π 2
πφ (s; θ ), ∇2
φiθ
φ 2 (at |st )). More-
πφ (s; θ )
πφ (s; θ ),∇φiV i
V i
∇θV i
πφ (s; θ ) = ∇θ Eτ∼Dπφ
∇φiV i
πφ (s; θ ) = ∇φi Eτ∼Dπφ
(cid:2)Ri (τ; θ )|s0 = s(cid:3) = Eτ∼Dπφ
τ∼Dπφ
(cid:2)Ri (τ; θ )|s0 = s(cid:3) = ∇φi
∑︁
∑︁
=
Dπφ (τ |s0 = s)∇φi log Dπφ (τ |s0 = s)Ri (τ; θ )
(cid:2)∇θ Ri (τ; θ )|s0 = s(cid:3) ,
Dπφ (τ |s0 = s)Ri (τ; θ )
τ∼Dπφ
= Eτ∼Dπφ
= Eτ∼Dπφ
(cid:104)
(cid:34)
∇φi log Dπφ (τ |s0 = s)Ri (τ; θ )|s0 = s
(cid:105)
Ri (τ; θ )
T −1
∑︁
t =0
∇φi log πi
φi (at |st )|s0 = s
(cid:35)
,
where the third equation follows as ∇φi Dπφ = Dπφ
∇φi Dπφ
Dπφ
= Dπφ ∇φi log Dπφ and interchanging the gradient and summation.
∇2
θφiV i
πφ (s; θ ) = ∇θ Eτ∼Dπφ
(cid:34)
Ri (τ; θ )
T −1
∑︁
t =0
∇φi log πi
φi (at |st )|s0 = s
(cid:35)
= Eτ∼Dπφ
(cid:34)(cid:32)T −1
∑︁
t =0
∇φi log πi
φi (at |st )
(cid:33)
∇θ Ri (τ; θ )⊺ |s0 = s
(cid:35)
,
∇2
φφiV i
πφ (s; θ ) = ∇φφi
Dπφ (τ |s0 = s)Ri (τ; θ )
∑︁
τ∼Dπφ
∑︁
Dπφ (τ |s0 = s)∇φi log Dπφ (τ |s0 = s)Ri (τ; θ )
= ∇φ
= ∇φ
τ∼Dπφ
τ∼Dπφ
∑︁
∑︁
=
τ∼Dπφ
Dπφ (τ |s0 = s)
(cid:32)T −1
∑︁
t =0
∇φi log πi
Ri (τ; θ )
∇φi log πi
φi (at |st )
(cid:33)
(cid:34)(cid:32)T −1
∑︁
t =0
Ri (τ; θ )
(cid:33)
φi (at |st )
∇φ Dπφ (τ |s0 = s)⊺
+Dπφ (τ |s0 = s)
∇φφi log πφ (at |st )
(cid:33)(cid:35)
(cid:32)T −1
∑︁
t =0
Ri (τ; θ )Dπφ (τ |s0 =s)
∑︁
=
τ∼Dπφ
∇φi log πi
φi (at |st )
(cid:33)
(cid:34)(cid:32)T −1
∑︁
t =0
∇φ log Dπφ (τ |s0 =s)⊺
∇φφi log πφ (at |st )
(cid:35)
+
T −1
∑︁
t =0
= Eτ∼Dπφ
(cid:34)
Ri (τ; θ )
(cid:32)
T −1
∑︁
(
t =0
∇φi log πi
φi (at |st ))(
T −1
∑︁
t =0
∇φ log πφ (at |st ))⊺
In the remaining of this section, we complete the proof of Lemma 4.1 in main body.
+
T −1
∑︁
t =0
∇2
φφi log πφ (at |st )
(cid:33)
(cid:35)
.
(cid:12)
s0 = s
(cid:12)
(cid:12)
□
Proof for Lemma 4.1. Recall the definition of V (i)
πφ (s; θ ) in (3.5) and ri
π (s, ai, a−i ; θ ) in (3.3), we have,
V (i)
πφ (s; θ ) = Eτ∼Dπφ
= Eτ∼Dπφ
(cid:34)T −1
∑︁
t =0
(cid:34)T −1
∑︁
t =0
γt *r (i)
π (st , ai
t , a−i
t
(cid:35)
; θ )|s0 = s
γt *ri
π (st , ai
t , a−i
t
; θ ) − λ
T −1
∑︁
t =0
γt (cid:16)log πi
φi (ai
t |st ) − log π −i
φ −i (a−i
t
(cid:35)
(cid:17)
|st )
|s0 = s
= V i
πφ (s; θ ) − λEτ∼Dπφ
(cid:34)T −1
∑︁
t =0
γt (cid:16)log πi
φi (ai
t |st ) − log π −i
φ −i (a−i
t
(cid:17)
|st )
(cid:35)
|s0 = s
.
For easy notation, we define
Then we have,
U i
πφ (s) = Eτ∼Dπφ
(cid:34)T −1
∑︁
t =0
γt (cid:16)log πi
φi (ai
t |st ) − log π −i
φ −i (a−i
t
(cid:17)
|st )
(cid:35)
|s0 = s
.
∇θU i
πφ (s) =0;
∇φiU i
πφ (s) =∇φi
(cid:34)
∑︁
τ
Dπφ (τ |s0 =s)
T −1
∑︁
t =0
γt (cid:16)log πi
φi (ai
t |st ) − log π −i
φ −i (a−i
t
(cid:35)
(cid:17)
|st )
∑︁
=
Dπφ (τ |s0 =s)
(cid:34)
τ
∇φi
log Dπφ (τ |s0 =s)
T −1
∑︁
t =0
γt (cid:16)log πi
φi (ai
t |st ) − log π −i
φ −i (a−i
t
γt ∇φi log πi
φi (ai
t |st )
T −1
∑︁
+
t =0
(cid:34)(cid:32)T −1
∑︁
t =0
T −1
∑︁
+
(cid:35)
(cid:35)
;
γt ∇φi log πi
φi (ai
t |st )
∇θφiU i
πφ (s) =0;
t =0
=Eτ∼Dπφ
γt (cid:16)log πi
φi (ai
t |st ) − log π −i
φ −i (a−i
t
(cid:33) (cid:32)T −1
∑︁
(cid:17)
|st )
t =0
∇φi log πi
φi (ai
t |st )
(A.1)
(A.2)
(A.3)
(A.4)
(cid:17)
|st )
(cid:33)
(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)
(cid:122)
∇φφiU i
πφ (s) =
∇φ
(cid:34)
∑︁
Dπφ (τ |s0 = s)
(cid:32)T −1
∑︁
γt (cid:16)log πi
φi (ai
:= (I )
(cid:125)(cid:124)
t |st ) − log π −i
(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)
(cid:33) (cid:32)T −1
∑︁
(cid:17)
(cid:123)
(cid:33)(cid:35)
∇φi log πi
φi (ai
t |st )
φ −i (a−i
t
|st )
t =0
τ
(cid:34)
(cid:124)
+ ∇φ
∑︁
Dπφ (τ |s0 = s)
(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)
τ
γt ∇φi log πi
t |st )
(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)
φi (ai
(cid:35)
.
(cid:125)
t =0
T −1
∑︁
t =0
(cid:123)(cid:122)
:= (II )
Next we are going to compute (I) and (II).
(I ) =
∑︁
Dπφ(τ |s0 =s)
(cid:32)T −1
∑︁
γt (cid:16)log πi
φi (ai
t |st ) − log π −i
φ −i (a−i
t
|st )
(cid:33)(cid:32)T −1
(cid:17)
∑︁
t =0
∇φi logπi
φi (ai
(cid:33)
t |st)
∇φ log Dπφ (τ |s0 = s)⊺
τ
t =0
∑︁
+
Dπφ (τ |s0 = s)∇φ
τ
(cid:34)(cid:32)T −1
∑︁
t =0
γt (cid:16)log πi
φi (ai
t |st ) − log π −i
φ −i (a−i
t
(cid:33) (cid:32)T −1
∑︁
(cid:17)
|st )
t =0
∇φi log πi
φi (ai
t |st )
(cid:33)(cid:35)
∑︁
(I ) =
Dπφ(τ |s0 = s)
(cid:32)T −1
∑︁
γt (cid:16)log πi
t =0
Dπφ (τ |s0 = s)
(cid:34)(cid:32)T −1
∑︁
τ
+
∑︁
τ
φi (ai
t |st ) − log π −i
φ −i (a−i
t
∇φi log πi
φi (ai
t |st)
(cid:33)(cid:32)T −1
(cid:17)
∑︁
|st )
t =0
(cid:33)(cid:32)T −1
∑︁
(cid:33) ⊺
∇φ log πφ (at |st)
t =0
∇φi log πi
φi (ai
t |st )
(cid:33) (cid:32)T −1
∑︁
γt (cid:16)
t =0
∇φ log πi
φi (ai
t |st ) − ∇φ log π −i
φ −i (a−i
t
(cid:33) ⊺
(cid:17)
|st )
γt (cid:16)log πi
φi (ai
t |st ) − log π −i
φ −i (a−i
t
(cid:33) (cid:32)T −1
∑︁
(cid:17)
|st )
t =0
∇2
φφi log πφ (ai
t |st )
(cid:33)(cid:35)
t =0
+
(cid:32)T −1
∑︁
t =0
=Eτ∼Dπφ
(cid:34)(cid:32)T −1
∑︁
t =0
γt (cid:16)log πi
φi (ai
t |st ) − log π −i
φ −i (a−i
t
(cid:33) (cid:32)T −1
∑︁
(cid:17)
|st )
t =0
∇φi log πi
φi (ai
t |st )
(cid:33) (cid:32)T −1
∑︁
t =0
(cid:33) ⊺
∇φ log πφ (at |st )
+
+
(cid:32)T −1
∑︁
t =0
(cid:32)T −1
∑︁
t =0
∇φi log πi
φi (ai
t |st )
(cid:33) (cid:32)T −1
∑︁
γt (cid:16)
t =0
∇φ log πi
φi (ai
t |st ) − ∇φ log π −i
φ −i (a−i
t
(cid:17)
|st )
(cid:33) ⊺
γt (cid:16)log πi
φi (ai
t |st ) − log π −i
φ −i (a−i
t
(cid:33) (cid:32)T −1
∑︁
(cid:17)
|st )
t =0
∇2
φφi log πφ (ai
t |st )
(cid:33)(cid:35)
;
(II ) =
∑︁
τ
Dπφ (τ |s0 = s)
(cid:34)(cid:32)T −1
∑︁
t =0
γt ∇φi log πi
φi (at |st )
(cid:33) ⊺
∇φ log πφ (at |st )
(cid:33) (cid:32)T −1
∑︁
t =0
+
(cid:32)T −1
∑︁
(cid:33)(cid:35)
φφi log πφ (at |st )
γt ∇2
t =0
(cid:34)(cid:32)T −1
∑︁
t =0
γt∇φi log πi
φi (at |st)
∇φ log πφ (at |st)
(cid:33)(cid:32)T −1
∑︁
(cid:33) ⊺
+
(cid:32)T −1
∑︁
(cid:33)(cid:35)
φφi log πφ (at |st)
γt ∇2
.
t =0
t =0
=Eτ∼Dπφ
Therefore,
∇φφiU i
πφ (s) = Eτ∼Dπφ
(cid:34)(cid:32)T −1
∑︁
t =0
γt (cid:16)log πi
φi (ai
t |st ) − log π −i
φ −i (a−i
t
(cid:33) (cid:32)T −1
∑︁
(cid:17)
|st )
t =0
(cid:33) ⊺
∇φ log πφ (at |st )
(cid:33) (cid:32)T −1
∑︁
t =0
∇φi log πi
t |st )
φi (ai
(cid:33) ⊺
(cid:17)
|st )
(cid:32)T −1
∑︁
t =0
(cid:32)T −1
∑︁
t =0
(cid:32)T −1
∑︁
+
+
+
∇φi log πi
φi (ai
t |st )
(cid:33) (cid:32)T −1
∑︁
γt (cid:16)
t =0
∇φ log πi
φi (ai
t |st ) − ∇φ log π −i
φ −i (a−i
t
γt (cid:16)log πi
φi (ai
t |st ) − log π −i
φ −i (a−i
t
(cid:33) (cid:32)T −1
∑︁
(cid:17)
|st )
t =0
t |st )
∇2
φφi log πφ (ai
(cid:33) ⊺
(cid:32)T −1
∑︁
(cid:33)
(cid:33)(cid:35)
t =0
(cid:33) (cid:32)T −1
∑︁
t =0
γt ∇φi log πi
φi (at |st )
∇φ log πφ (at |st)
+
γt ∇2
φφi log πφ (at |st )
(A.5)
t =0
Since (A.1) can be written as
V (i)
πφ (s; θ ) = V i
πφ (s; θ ) − λU i
πφ (s),
then together with (A.2-A.5), we have
∇θV (i)
πφ (s; θ ) = ∇θV i
πφ (s; θ );
∇φiV (i)
πφ (s; θ ) = ∇φiV i
πφ (s; θ ) − λEτ∼Dπφ
(cid:34)(cid:32)T −1
∑︁
t =0
θφiV (i)
∇2
πφ (s; θ ) = ∇2
θφiV i
πφ (s; θ );
γt (cid:16)log πi
φi (ai
t |st ) − log π −i
φ −i (a−i
t
(cid:33) (cid:32)T −1
∑︁
(cid:17)
|st )
t =0
∇φi log πi
φi (ai
t |st )
(cid:33)
+
T −1
∑︁
t =0
γt ∇φi log πi
φi (ai
t |st )
φφiV (i)
∇2
πφ (s; θ ) = ∇2
φφiV i
πφ (s; θ ) −λEτ∼Dπφ
(cid:34)(cid:32)T −1
∑︁
t =0
γt (cid:16)log πi
φi (ai
t |st ) − log π −i
φ −i (a−i
t
(cid:33) (cid:32)T −1
∑︁
(cid:17)
|st )
t =0
∇φi log πi
φi (ai
t |st )
(cid:33) (cid:32)T −1
∑︁
t =0
(cid:33) ⊺
∇φ log πφ (at |st )
(cid:32)T −1
∑︁
t =0
(cid:32)T −1
∑︁
t =0
(cid:32)T −1
∑︁
+
+
+
∇φi log πi
φi (ai
t |st )
(cid:33) (cid:32)T −1
∑︁
γt (cid:16)
t =0
∇φ log πi
φi (ai
t |st ) − ∇φ log π −i
φ −i (a−i
t
(cid:17)
|st )
(cid:33) ⊺
γt (cid:16)log πi
φi (ai
t |st ) − log π −i
φ −i (a−i
t
(cid:33) (cid:32)T −1
∑︁
(cid:17)
|st )
t =0
t |st )
∇2
φφi log πφ (ai
(cid:33) ⊺
(cid:32)T −1
∑︁
(cid:33)
(cid:33)(cid:35)
γt ∇φi log πi
φi (at |st )
∇φ log πφ (at |st)
+
γt ∇2
φφi log πφ (at |st )
t =0
(cid:33) (cid:32)T −1
∑︁
t =0
t =0
B PROOF FOR LEMMA 4.2
In this section, we prove Lemma 4.2 based on Lemma 4.1.
(cid:35)
;
□
Proof for Lemma 4.2. Since φ (∗) (θ ) is the policy parameter of Nash equilibrium πφ (∗) (θ )
incentivized reward G′
θ
θ on both sides, for any i ∈ {1, 2}, we have
, uθ (φ (∗) (θ )) = (Eν ∗ ∇φ 1V (1)
πφ (θ ), Eν ∗ ∇φ 2V (2)
πφ (θ ))(cid:12)
for the regularized Markov game with the
(cid:12)φ=φ (∗) (θ ) = 0. Then, by differentiating the equality with respect to
Thus, define
where ν∗ is νπ
φ (∗) (θ )
(s). We have,
Eν ∗ ∇θφiV (i)
πφ (θ ) + Eν ∗ ∇φφiV (i)
πφ (θ ) [∇θ φ (∗) (θ )] = 0.
∇θuθ (φ) =
∇φuθ (φ) =
(cid:35)
(cid:34)Eν ∗ ∇θφ 1V (1)
Eν ∗ ∇θφ 2V (2)
(cid:34)Eν ∗ ∇φφ 1V (1)
Eν ∗ ∇φφ 2V (2)
πφ (θ )
πφ (θ )
πφ (θ )
πφ (θ )
∈ Rd×m,
(cid:35)
∈ Rd×d,
∇θ φ (∗) (θ ) = − (cid:2)∇φuθ (φ)(cid:3) −1
∇θuθ (φ)(cid:12)
(cid:12)φ=φ ∗ (θ )
.
□
C EXTENSIONS OF DA FRAMEWORK
Note that the DA framework itself is general given a proper lower-level NE solver. In this section, we detail the extension of DA framework to
two general cases: i) N-players and no restriction to reward; ii) partial observations. Since the primary part in DA framework is the derivation
of upper-level loss gradient at NE ∇f∗ (θ ), in the following we present the calculation of ∇f∗ (θ ) based on the policy gradient information
from the lower level in extended settings.
Extension to N-player and no reward restriction. We first define the incentivized Markov game with N players as Gθ = (S, {Ai,
ri (*; θ )}i ∈ {1,*** ,N }, λ, P, γ). Then the total discounted reward Ri
π (τ; θ ) and value function V i
π (s; θ ) for all i ∈ {1, ..., N } are defined as
Ri
π (τ; θ ) =
T −1
∑︁
t =0
V i
π (s; θ ) = Eπ
γtri (st , ai
t , a−i
t
; θ ),
γt *ri
π (st , ai
t , a−i
t
(cid:35)
; θ )|s0 = s
(cid:34)T −1
∑︁
t =0
= Eτ∼Dπ (cid:2)Ri
π (τ; θ )(cid:12)
(cid:12)s0 = s(cid:3) .
(C.1)
(C.2)
Then define the entropy-regularized G′
θ = (S, {Ai, r (i)
π (*; θ )}i ∈ {1,*** ,N }, λ, P, γ), where r (i) (*; θ ) : S × Ai × A−i → R is defined as:
r (i)
π (*; θ ) = ri (*; θ ) − λ log(πi (ai |s)) +
λ
N − 1
∑︁
j =1,...,n
j ≠i
log(π j (a j |s)).
Then the entropy-regularized value function is
R (i)
π (τ; θ ) =
T −1
∑︁
t =0
γtr (i)
π (st , ai
t , a−i
t
; θ ),
V (i)
π (s; θ ) = Eπ
(cid:34)T −1
∑︁
γt *r (i)
π (st , ai
t , a−i
t
(cid:35)
; θ )|s0 = s
t =0
(cid:104)
= Eτ∼Dπ
R (i)
π (τ; θ )(cid:12)
(cid:12)s0 = s
(cid:105)
.
(C.3)
(C.4)
Other definitions remain same as defined in Section 3.2 except for the zero-sum restriction to ri (*; θ ). We are going to paramterized the
i=1 di . In N-player
φ N ), where φ = (φ 1, * * * , φ N ) ∈ Rd, d = (cid:205)N
joint policy π with φ for computation simplicity. Therefore, πφ = (π 1
Markov game, we denote
φ 1, * * * , π N
∇φ log πφ (at |st ) = (∇φ 1 log π 1
∇2
φφi log πφ (at |st ) = (∇2
φ 1φi log π 1
φ 1 (at |st ), * * * , ∇φ N log π N
φ 1 (at |st ), * * * , ∇2
φ N φi log π N
φ N (at |st ))
φ N (at |st )).
Lemma C.1 and Lemma C.2 extends the Lemma A.1 and Lemma 4.1 into the N-player general-sum game respectively.
For extension of Lemma 4.2, we switch the notation in (4.2) and (4.3) as
uθ (φ; s) := (∇φ 1V (1)
Eν (∗)∇2
∇θuθ (φ) =
Eν (∗)∇2
πφ (s; θ ), * * * , ∇φ N V (N )
πφ
θφ 1V (1)
πφ (s; θ )
* * *
θφ N V (N )
πφ
(s; θ )
∈ Rd×m, ∇φuθ (φ) =
(s; θ )),
uθ (φ) := Eν (∗) [uθ (φ; s)],
Eν (∗) ∇2
πφ (s; θ )
φφ 1V (1)
* * *
φφ N V (N )
πφ
Eν (∗) ∇2
(s; θ )
(C.5)
(C.6)
∈ Rd×d .
Then (4.5) in Lemma 4.2 and the gradient of upper-level loss ∇f∗ (θ ) in (4.6) remain the same.
Lemma C.1. For an incentivized Markov game Gθ = (S, {Ai, Ωi, Oi, ri (*; θ )}i ∈ {1,*** ,N }, P, γ), let Ri (τ; θ ) be the total reward for an sample
trajectory τ following πφ for T steps, starting from initial state s0 = s. We have
∇θV i
πφ (s; θ ) = Eτ∼Dπφ
∇φiV i
πφi (s; θ ) = Eτ∼Dπφ
∇2
θφiV i
πφ (s; θ ) = Eτ∼Dπφ
∇2
φφiV i
πφ (s; θ ) = Eτ∼Dπφ
(cid:2)∇θ Ri (τ; θ )|s0 = s(cid:3) ,
(cid:34)
T −1
∑︁
Ri (τ; θ )
∇φi log πi
t =0
φi (at |st )
(cid:35)
,
(cid:12)
s0 = s
(cid:12)
(cid:12)
(cid:34)(cid:32)T −1
∑︁
t =0
∇φi log πi
φi (at |st )
(cid:33)
∇θ Ri (τ; θ )⊺(cid:12)
s0 = s
(cid:12)
(cid:12)
(cid:35)
,
(cid:34)
Ri (τ; θ )
(cid:32)
T −1
∑︁
(
t =0
∇φi log πi
φi (at |st ))(
∇φ log πφ (at |st ))⊺
T −1
∑︁
t =0
(cid:35)
,
(cid:12)
s0 = s
(cid:12)
(cid:12)
where
∇2
φφi log πφ (at |st )
(cid:33)
+
T −1
∑︁
t =0
∇φ log πφ (at |st ) = (∇φ 1 log π 1
φ 1φi log π 1
φφi log πφ (at |st ) = (∇2
∇2
φ 1 (at |o1
φ 1 (at |o1
t ), * * * , ∇φ N log π N
φ N (at |oN
t ), * * * , ∇2
φ N φi log π N
t )),
φ N (at |oN
t )).
Proof for Lemma C.1. According to the proof of Lemma A.1, the derivation for ∇φiV i
(cid:104)ΠN
i=1πi
t =0 ρ (s0)P (st +1|at , st )
Recall Dπφ (τ) = ΠT −1
(cid:105), we have
φi (ai
t |oi )
πφ (s; θ ) and ∇2
φφiV i
πφ (s; θ ) are based on ∇φi log Dπφ (τ |s0 = s).
∇φi log Dπφ (τ |s0 = s) = ∇φi
(cid:34)T −1
∑︁
t =0
log P (st +1|st , at ) +
T −1
∑︁
t =0
=
T −1
∑︁
t =0
∇φi log πi
φi (at |st ).
log πi
φi (at |st ) +
T −1
∑︁
t =0
(cid:35)
log π −i
φ −i (at |o−i
t )
(C.7)
Similarly, we have ∇φ log Dπφ (τ |s0 = s) = (cid:205)T −1
of Lemma A.1.
t =0 ∇φ log πφ (at |st ). The remaining of the proof based on (C.7) is exactly the same as the proof
□
In the light of Lemma C.1, we replace Lemma 4.1 by the following Lemma C.2 for the gradient of regularized state-value function based
on the incentivized reward.
Lemma C.2. In an incentive regularized Markov game G
′
θ , we have
∇θV (i)
πφ (s; θ ) = ∇θV i
πφ (s; θ );
log πi
t =0
T −1
∑︁
(cid:169)
(cid:173)
(cid:173)
(cid:171)
T −1
∑︁
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
γt ∇φi log πi
φi (ai
t |st ) −
(cid:35)
;
φi (ai
t |st )
1
N − 1
∑︁
j =1,...,N
j ≠i
log π j
φ j (a j
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:172)
∇φi log πi
φi (ai
t |st )
(cid:33)
(cid:32)T −1
∑︁
t =0
(cid:170)
(cid:174)
(cid:174)
(cid:172)
∇φiV (i)
πφ (s; θ ) = ∇φiV i
πφ (s; θ ) − λEτ∼Dπφ
+
θφiV (i)
∇2
πφ (s; θ ) = ∇2
θφiV i
πφ (s; θ );
φφiV (i)
∇2
πφ (s; θ ) = ∇2
φφiV i
πφ (s; θ ) −λEτ∼Dπφ
t =0
(cid:32)T −1
∑︁
t =0
(cid:33)
∇φi log πi
φi (ai
t |st )
∇φ log πi
φi (ai
t |st ) −
1
N − 1
∑︁
j =1,...,N
j ≠i
∇φ log π j
φ j (a j
∇φi log πi
φi (ai
t |st )
(cid:33) ⊺
∇φ log πφ (at |st )
(cid:33) (cid:32)T −1
∑︁
t =0
⊺
(cid:170)
(cid:174)
(cid:174)
(cid:172)
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:172)
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
T −1
∑︁
(cid:169)
(cid:173)
(cid:173)
t =0
(cid:171)
(cid:32)T −1
∑︁
t =0
(cid:170)
(cid:174)
(cid:174)
(cid:172)
(cid:32)T −1
∑︁
t =0
T −1
∑︁
+ (cid:169)
(cid:173)
(cid:173)
(cid:171)
T −1
∑︁
+ (cid:169)
(cid:173)
(cid:173)
t =0
(cid:171)
(cid:32)T −1
∑︁
+
t =0
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
log πi
φi (ai
t |st ) −
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
1
N − 1
∑︁
j =1,...,N
j ≠i
log π j
φ j (a j
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:172)
log πi
φi (ai
t |st ) −
log π j
φ j (a j
∑︁
j =1,...,N
j ≠i
γt ∇φi log πi
φi (at |st )
∇φ log πφ (at |st)
+
1
N − 1
(cid:33) (cid:32)T −1
∑︁
t =0
∇2
φφi log πφ (ai
t |st )
(cid:33)
γt ∇2
φφi log πφ (at |st )
(cid:33)(cid:35)
(cid:170)
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:174)
(cid:174)
(cid:172)
(cid:172)
(cid:32)T −1
∑︁
(cid:33) ⊺
t =0
t =0
Proof for Lemma C.2. Recall the definition of V (i)
πφ (s; θ ) in (C.3), we have,
V (i)
πφ (s; θ ) = Eτ∼Dπφ
= Eτ∼Dπφ
(cid:34)T −1
∑︁
t =0
T −1
∑︁
t =0
γt *r (i)
π (st , ai
t , a−i
t
(cid:35)
; θ )|s0 = s
γt *ri
π (st , ai
t , a−i
t
; θ ) − λ
T −1
∑︁
t =0
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
log πi
φi (ai
t |st ) −
1
N − 1
∑︁
j =1,...,N
j ≠i
log π j
φ j (a j
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:172)
= V i
πφ (s; θ ) − λEτ∼Dπφ
T −1
∑︁
t =0
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
log πi
φi (ai
t |st ) −
1
N − 1
∑︁
j =1,...,N
j ≠i
log π j
φ j (a j
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:172)
|s0 = s
.
|s0 = s
(C.8)
For easy notation, we define
U i
πφ (s) = Eτ∼Dπφ
T −1
∑︁
t =0
φi (ai
t |st ) −
γt (cid:169)
log πi
(cid:173)
(cid:173)
(cid:171)
1
N − 1
∑︁
j =1,...,N
j ≠i
log π j
φ j (a j
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:172)
|s0 = s
.
Then we have,
∇θU i
πφ (s) =0;
∇φiU i
πφ (s) =∇φi
∑︁
=
τ
t =0
∇θφiU i
πφ (s) =0;
∇φφiU i
πφ (s) =
∇φ
∑︁
τ
Dπφ (τ |s0 =s)
T −1
∑︁
t =0
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
log πi
φi (ai
t |st ) −
1
N − 1
∑︁
j =1,...,N
j ≠i
log π j
φ j (a j
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:172)
Dπφ (τ |s0 =s)
log Dπφ (τ |s0 =s)
∇φi
γt ∇φi log πi
(cid:35)
φi (ai
t |st )
log πi
φi (ai
t |st ) −
T −1
∑︁
t =0
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
+
T −1
∑︁
t =0
T −1
∑︁
(cid:169)
(cid:173)
(cid:173)
(cid:171)
T −1
∑︁
t =0
=Eτ∼Dπφ
log πi
φi (ai
t |st ) −
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
+
γt ∇φi log πi
φi (ai
t |st )
1
N − 1
∑︁
j =1,...,N
j ≠i
(cid:35)
;
log π j
φ j (a j
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:172)
1
N − 1
∑︁
j =1,...,N
j ≠i
log π j
φ j (a j
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:172)
∇φi log πi
φi (ai
t |st )
(cid:33)
(cid:32)T −1
∑︁
t =0
(cid:170)
(cid:174)
(cid:174)
(cid:172)
(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)
(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)
∑︁
j =1,...,N
j ≠i
log π j
φ j (a j
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:172)
∇φi log πi
φi (ai
t |st )
(cid:32)T −1
∑︁
t =0
(cid:170)
(cid:174)
(cid:174)
(cid:172)
(cid:123)
(cid:33)
(cid:122)
+ ∇φ
(cid:124)
τ
∑︁
T −1
∑︁
Dπφ (τ |s0 = s) (cid:169)
(cid:173)
(cid:173)
(cid:171)
Dπφ (τ |s0 = s)
(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)
∑︁
t =0
(cid:34)
τ
T −1
∑︁
log πi
φi (ai
t |st ) −
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
γt ∇φi log πi
t |st )
(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)(cid:32)
φi (ai
t =0
(cid:123)(cid:122)
:= (II )
:= (I )
(cid:125)(cid:124)
1
N − 1
(cid:35)
.
(cid:125)
(C.9)
(C.10)
(C.11)
(C.12)
Next we are going to compute (I) and (II).
(I ) =
∑︁
τ
T −1
∑︁
Dπφ(τ |s0 =s)(cid:169)
(cid:173)
(cid:173)
(cid:171)
t =0
∑︁
+
τ
Dπφ (τ |s0 = s)∇φ
∑︁
=
τ
T −1
∑︁
Dπφ(τ |s0 = s)(cid:169)
(cid:173)
(cid:173)
t =0
(cid:171)
∑︁
+
Dπφ (τ |s0 = s)
τ
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
(cid:32)T −1
∑︁
log πi
φi (ai
t |st ) −
1
N − 1
∑︁
j =1,...,N
j ≠i
log π j
φ j (a j
(cid:32)T −1
∑︁
(cid:170)
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:174)
(cid:174)
(cid:172)
(cid:172)
t =0
∇φi logπi
φi (ai
(cid:33)
t |st)
∇φ log Dπφ (τ |s0 = s)⊺
T −1
∑︁
(cid:169)
(cid:173)
(cid:173)
(cid:171)
t =0
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
log πi
φi (ai
t |st ) −
1
N − 1
∑︁
j =1,...,N
j ≠i
log π j
φ j (a j
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:172)
∇φi log πi
φi (ai
t |st )
(cid:32)T −1
∑︁
t =0
(cid:170)
(cid:174)
(cid:174)
(cid:172)
log πi
φi (ai
t |st ) −
1
N − 1
∑︁
j =1,...,N
j ≠i
log π j
φ j (a j
(cid:32)T −1
∑︁
(cid:170)
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:174)
(cid:174)
(cid:172)
(cid:172)
t =0
∇φi log πi
φi (ai
t |st)
(cid:33)(cid:32)T −1
∑︁
t =0
(cid:33)
(cid:33) ⊺
∇φ log πφ (at |st)
∇φi log πi
φi (ai
t |st )
(cid:33)
T −1
∑︁
(cid:169)
(cid:173)
(cid:173)
(cid:171)
t =0
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
∇φ log πi
φi (ai
t |st ) −
1
N − 1
∑︁
j =1,...,N
j ≠i
∇φ log π j
φ j (a j
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:172)
log πi
φi (ai
t |st ) −
1
N − 1
∑︁
j =1,...,N
j ≠i
log π j
φ j (a j
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:172)
∇2
φφi log πφ (ai
t |st )
(cid:32)T −1
∑︁
t =0
(cid:170)
(cid:174)
(cid:174)
(cid:172)
t =0
T −1
∑︁
+ (cid:169)
(cid:173)
(cid:173)
(cid:171)
t =0
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
⊺
(cid:170)
(cid:174)
(cid:174)
(cid:172)
(cid:33)
(cid:33) ⊺
=Eτ∼Dπφ
T −1
∑︁
(cid:169)
(cid:173)
(cid:173)
(cid:171)
t =0
log πi
φi (ai
t |st ) −
1
N − 1
∑︁
j =1,...,N
j ≠i
log π j
φ j (a j
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:172)
∇φi log πi
φi (ai
t |st )
(cid:33) (cid:32)T −1
∑︁
t =0
(cid:32)T −1
∑︁
t =0
(cid:170)
(cid:174)
(cid:174)
(cid:172)
∇φ log πφ (at |st )
∇φi log πi
φi (ai
t |st )
(cid:33)
T −1
∑︁
(cid:169)
(cid:173)
(cid:173)
t =0
(cid:171)
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
∇φ log πi
φi (ai
t |st ) −
1
N − 1
∑︁
j =1,...,N
j ≠i
∇φ log π j
φ j (a j
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:172)
⊺
(cid:170)
(cid:174)
(cid:174)
(cid:172)
log πi
φi (ai
t |st ) −
1
N − 1
∑︁
log π j
φ j (a j
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:172)
(cid:170)
(cid:174)
(cid:174)
(cid:172)
(cid:32)T −1
∑︁
t =0
(cid:33) ⊺
∇2
φφi log πφ (ai
t |st )
;
(cid:33)
j =1,...,N
j ≠i
(cid:33) (cid:32)T −1
∑︁
t =0
(II ) =
∑︁
τ
Dπφ (τ |s0 = s)
γt ∇φi log πi
φi (at |st )
∇φ log πφ (at |st )
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
(cid:32)T −1
∑︁
t =0
+
T −1
∑︁
+ (cid:169)
(cid:173)
(cid:173)
t =0
(cid:171)
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
(cid:34)(cid:32)T −1
∑︁
t =0
+
(cid:32)T −1
∑︁
(cid:33)(cid:35)
φφi log πφ (at |st )
γt ∇2
t =0
=Eτ∼Dπφ
Therefore,
(cid:34)(cid:32)T −1
∑︁
t =0
γt∇φi log πi
φi (at |st)
∇φ log πφ (at |st)
(cid:33)(cid:32)T −1
∑︁
(cid:33) ⊺
+
(cid:32)T −1
∑︁
(cid:33)(cid:35)
φφi log πφ (at |st)
γt ∇2
.
t =0
t =0
∇φφiU i
T −1
∑︁
(cid:169)
πφ (s) = Eτ∼Dπφ
(cid:173)
(cid:173)
(cid:171)
t =0
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
log πi
φi (ai
t |st ) −
1
N − 1
∑︁
j =1,...,N
j ≠i
log π j
φ j (a j
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:172)
(cid:32)T −1
∑︁
t =0
(cid:170)
(cid:174)
(cid:174)
(cid:172)
∇φi log πi
φi (ai
t |st )
+
(cid:32)T −1
∑︁
t =0
∇φi log πi
φi (ai
t |st )
(cid:33)
T −1
∑︁
(cid:169)
(cid:173)
(cid:173)
t =0
(cid:171)
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
∇φ log πi
φi (ai
t |st ) −
1
N − 1
∑︁
j =1,...,N
j ≠i
∇φ log π j
φ j (a j
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:172)
⊺
(cid:170)
(cid:174)
(cid:174)
(cid:172)
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
T −1
∑︁
+ (cid:169)
(cid:173)
(cid:173)
t =0
(cid:171)
(cid:32)T −1
∑︁
+
t =0
log πi
φi (ai
t |st ) −
log π j
φ j (a j
∑︁
j =1,...,N
j ≠i
γt ∇φi log πi
φi (at |st )
∇φ log πφ (at |st)
+
1
N − 1
(cid:33) (cid:32)T −1
∑︁
t =0
(cid:32)T −1
∑︁
∇2
φφi log πφ (ai
t |st )
(cid:33)
γt ∇2
φφi log πφ (at |st )
(cid:33)(cid:35)
(cid:170)
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:174)
(cid:174)
(cid:172)
(cid:172)
(cid:32)T −1
∑︁
(cid:33) ⊺
t =0
t =0
(cid:33) ⊺
∇φ log πφ (at |st )
(cid:33) (cid:32)T −1
∑︁
t =0
(C.13)
(C.14)
Since (C.8) can be written as
then together with (A.2-A.5), we have
∇θV (i)
πφ (s; θ ) = ∇θV i
πφ (s; θ );
V (i)
πφ (s; θ ) = V i
πφ (s; θ ) − λU i
πφ (s),
∇φiV (i)
πφ (s; θ ) = ∇φiV i
πφ (s; θ ) − λEτ∼Dπφ
φi (ai
t |st ) −
log πi
t =0
T −1
∑︁
(cid:169)
(cid:173)
(cid:173)
(cid:171)
T −1
∑︁
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
γt ∇φi log πi
+
φi (ai
t |st )
(cid:35)
;
(cid:33)
∇φi log πi
φi (ai
t |st )
θφiV (i)
∇2
πφ (s; θ ) = ∇2
θφiV i
πφ (s; θ );
t =0
φφiV (i)
∇2
πφ (s; θ ) = ∇2
φφiV i
πφ (s; θ ) −λEτ∼Dπφ
(cid:32)T −1
∑︁
t =0
t =0
T −1
∑︁
+ (cid:169)
(cid:173)
(cid:173)
(cid:171)
T −1
∑︁
+ (cid:169)
(cid:173)
(cid:173)
t =0
(cid:171)
(cid:32)T −1
∑︁
+
t =0
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
log πi
φi (ai
t |st ) −
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
1
N − 1
∑︁
j =1,...,N
j ≠i
log π j
φ j (a j
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:172)
(cid:170)
(cid:174)
(cid:174)
(cid:172)
log πi
φi (ai
t |st ) −
γt ∇φi log πi
φi (at |st )
1
N − 1
(cid:33) (cid:32)T −1
∑︁
t =0
∇φ log π j
φ j (a j
∑︁
j =1,...,N
j ≠i
(cid:33) ⊺
∇φ log πφ (at |st)
(cid:32)T −1
∑︁
t =0
t |st )(cid:170)
(cid:170)
(cid:174)
(cid:174)
(cid:174)
(cid:174)
(cid:172)
(cid:172)
(cid:32)T −1
∑︁
γt ∇2
+
t =0
∇2
φφi log πφ (ai
t |st )
(cid:33)
(cid:33)(cid:35)
φφi log πφ (at |st )
1
N − 1
∑︁
j =1,...,N
j ≠i
log π j
φ j (a j
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:172)
∇φi log πi
φi (ai
t |st )
(cid:33)
(cid:32)T −1
∑︁
t =0
(cid:170)
(cid:174)
(cid:174)
(cid:172)
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
T −1
∑︁
(cid:169)
(cid:173)
(cid:173)
t =0
(cid:171)
(cid:32)T −1
∑︁
t =0
∇φ log πi
φi (ai
t |st ) −
1
N − 1
∑︁
j =1,...,N
j ≠i
∇φ log π j
φ j (a j
t |st )(cid:170)
(cid:174)
(cid:174)
(cid:172)
∇φi log πi
φi (ai
t |st )
(cid:33) ⊺
∇φ log πφ (at |st )
(cid:33) (cid:32)T −1
∑︁
t =0
⊺
(cid:170)
(cid:174)
(cid:174)
(cid:172)
□
Extension to partial observations. We first formulate the multi-agent POMDP with incentivized reward. With a light abuse of notation,
: S → Ωi is the observation
we denote Gθ = (S, {Ai, Ωi, Oi, ri (*; θ )}i ∈ {1,*** ,N }, P, γ), where Ωi is the observation set for agent i, Oi
function for agent i, and we denote oi = Oi (s) as the observation of agent i at state s. Other elements in the tuple remain same as in
Section 3.2 except for the zero-sum restriction to ri (*; θ ). We define observation-based policy of player i as πi : Ωi × Ai → [0, 1] and
parameterize the policy for the player i by φi . Then based on Gθ , we formulate the regularized multi-agent POMDP with incentivized reward
πφ (s, ai, a−i ; θ ) = ri (s, ai, a−i ; θ ) −λ log(πi
φi (ai |oi ))
as G′
and λ ≥ 0. For a trajectory τ = (s0, a0, s1, * * * , aT −1, sT ), where at = (a1
t ), t = 0, * * * ,T , the probability distribution of the trajectory
is,
θ = (S, {Ai, Ωi, Oi, r (i) (*; θ )}i ∈ {1,*** ,N }, λ, P, γ), where r (i) (s, ai, a−i ; θ ) represents r (i)
t , * * * , aN
Dπφ (τ) :=
T −1
(cid:214)
t =0
ρ (s0)P (st +1|at , st )
φi (ai
πi
t |oi
t )
(cid:35)
,
(cid:34) N
(cid:214)
i=1
where oi
t = Oi (st ). In this setting, we replace Lemma C.1 by the following Lemma C.3 for the gradient of state-value function.
Lemma C.3. For an incentivized Markov game Gθ = (S, {Ai, Ωi, Oi, ri (*; θ )}i ∈ {1,*** ,N }, P, γ), let Ri (τ; θ ) be the total reward for an sample
trajectory τ following πφ for T steps, starting from initial state s0 = s. We have
∇θV i
πφ (s; θ ) = Eτ∼Dπφ
∇φiV i
πφi (s; θ ) = Eτ∼Dπφ
(cid:2)∇θ Ri (τ; θ )|s0 = s(cid:3) ,
(cid:34)
T −1
∑︁
Ri (τ; θ )
∇φi log πi
φi (at |oi
t )
(cid:35)
,
(cid:12)
s0 = s
(cid:12)
(cid:12)
t =0
∇2
θφiV i
πφ (s; θ ) = Eτ∼Dπφ
(cid:34)(cid:32)T −1
∑︁
t =0
∇φi log πi
φi (at |oi
t )
(cid:33)
∇θ Ri (τ; θ )⊺(cid:12)
s0 = s
(cid:12)
(cid:12)
(cid:35)
,
∇2
φφiV i
πφ (s; θ ) = Eτ∼Dπφ
(cid:34)
Ri (τ; θ )
(cid:32)
T −1
∑︁
(
t =0
∇φi log πi
φi (at |oi
t ))(
∇φ log πφ (at |ot ))⊺
T −1
∑︁
t =0
(cid:35)
,
(cid:12)
s0 = s
(cid:12)
(cid:12)
where
∇2
φφi log πφ (at |ot )
(cid:33)
+
T −1
∑︁
t =0
φ 1 (at |o1
φ 1 (at |o1
In the light of Lemma C.3, we replace Lemma C.2 by the following Lemma C.4 for the gradient of regularized state-value function based
∇φ log πφ (at |ot ) = (∇φ 1 log π 1
∇2
φφi log πφ (at |ot ) = (∇2
φ 1φi log π 1
t )),
φ N (at |oN
t ), * * * , ∇φ N log π N
φ N φi log π N
φ N (at |oN
t ), * * * , ∇2
t )).
on partially observed state.
Lemma C.4. For a regularized Markov game with incentivized reward G′
θ = (S, {Ai, Ωi, Oi, r (i) (*; θ )}i ∈ {1,*** ,N }, λ, P, γ), we have
∇θV (i)
πφ (s; θ ) = ∇θV i
πφ (s; θ );
∇φiV (i)
πφ (s; θ ) = ∇φiV i
πφ (s; θ ) − λEτ∼Dπφ
log πi
t =0
T −1
∑︁
(cid:169)
(cid:173)
(cid:173)
(cid:171)
T −1
∑︁
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
γt ∇φi log πi
+
φi (ai
t |oi
t ) −
(cid:35)
;
φi (ai
t |oi
t )
1
N − 1
∑︁
j =1,...,N
j ≠i
log π j
φ j (a j
t |o j
t )(cid:170)
(cid:174)
(cid:174)
(cid:172)
∇φi log πi
φi (ai
t |oi
t )
(cid:33)
(cid:32)T −1
∑︁
t =0
(cid:170)
(cid:174)
(cid:174)
(cid:172)
∇φi log πi
φi (ai
t |oi
t )
(cid:33)
∇φ log πi
φi (ai
t |oi
t ) −
1
N − 1
∑︁
j =1,...,N
j ≠i
∇φ log π j
φ j (a j
t |o j
⊺
(cid:170)
(cid:174)
(cid:174)
(cid:172)
t )(cid:170)
(cid:174)
(cid:174)
(cid:172)
log π j
φ j (a j
t |o j
∇φi log πi
φi (ai
t |ai
t )
(cid:33) ⊺
∇φ log πφ (at |ot )
(cid:33) (cid:32)T −1
∑︁
t =0
θφiV (i)
∇2
πφ (s; θ ) = ∇2
θφiV i
πφ (s; θ );
t =0
φφiV (i)
∇2
πφ (s; θ ) = ∇2
φφiV i
πφ (s; θ ) −λEτ∼Dπφ
(cid:32)T −1
∑︁
t =0
log πi
φi (ai
t |oi
t ) −
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
1
N − 1
∑︁
j =1,...,N
j ≠i
t =0
T −1
∑︁
+ (cid:169)
(cid:173)
(cid:173)
(cid:171)
T −1
∑︁
+ (cid:169)
(cid:173)
(cid:173)
t =0
(cid:171)
(cid:32)T −1
∑︁
+
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
γt (cid:169)
(cid:173)
(cid:173)
(cid:171)
T −1
∑︁
(cid:169)
(cid:173)
(cid:173)
t =0
(cid:171)
(cid:32)T −1
∑︁
t =0
(cid:170)
t )(cid:170)
(cid:174)
(cid:174)
(cid:174)
(cid:174)
(cid:172)
(cid:172)
(cid:32)T −1
∑︁
t =0
(cid:170)
t )(cid:170)
(cid:174)
(cid:174)
(cid:174)
(cid:174)
(cid:172)
(cid:172)
(cid:32)T −1
∑︁
+
log πi
φi (ai
t |oi
t ) −
log π j
φ j (a j
t |o j
∇2
φφi log πφ (ai
t |oi
t )
∑︁
j =1,...,N
j ≠i
1
N − 1
(cid:33) (cid:32)T −1
∑︁
(cid:33) ⊺
∇φ log πφ (at |ot)
(cid:33)
(cid:33)(cid:35)
γt ∇φi log πi
φi (at |ot )
γt ∇2
φφi log πφ (at |ot )
t =0
The proofs for Lemma C.3 and C.4 are quite similar to the proofs for C.1 and C.2 with little change on the notation. Therefore, we do not
t =0
t =0
discuss the proof in this section.
D PEM AND ENTROPY-REGULARIZED OMWU
In this section, we are going to briefly state the pseudocode for NE solvers Policy Extragradient Method (PEM) [14] and Entropy-regularized
OMWU [13] in this section.
D.1 Policy Extragradient Method (PEM)
To begin with, we first introduce the entropy-regualrized zero-sum two-player matrix game.
max
π1 ∈Δ( A1)
min
π2 ∈Δ( A2)
fλ (A; π1, π2) := π ⊺
1 Aπ2 + λH (π1) − λH (π2),
(D.1)
where A ∈ Rm×n denotes the payoff matrix, π1 ∈ Δ(A1) and π2 ∈ Δ(A2) stand for the mixed/randomized policies of each player, defined as
distributions over the probability simplex Δ(A1) and Δ(A2), H (π) = − (cid:205)i πi log(πi ), and λ is the regularization parameter.
Cen [14] proposed two extragradient methods: PU and OMWU with linear convergence guarantees to solve the entropy-regularized
zero-sum two-player matrix game (D.1).
Algorithm 2 The PU method
Initialization: π (0)
1
Parameters: Learning rate ηt
for t=0,1,2,... do
, π (0)
2
.
Update π 1 and π 2 for every action a = (a1, a2) ∈ A = A1 ×
A2 according to
Algorithm 3 The OMWU method
1 , π (0)
Initialization: π (0)
Parameters: Learning rate ηt
for t=0,1,2,... do
1 = π (0)
2 = π (0)
2
.
Update π 1 and π 2 for every action a = (a1, a2) ∈ A = A1 ×
A2 according to
π (t +1)
1
π (t +1)
2
(a1) ∝ π (t )
1
(a2) ∝ π (t )
2
(a1)1−ηt λ exp(ηt [Aπ (t )
]a1 )
2
(a2)1−ηt λ exp(−ηt [A⊺π (t )
1
]a2 )
π (t +1)
1
π (t +1)
2
(a1) ∝ π (t )
1
(a2) ∝ π (t )
2
(a1)1−ηt λ exp(ηt [Aπ (t )
]a1 )
2
(a2)1−ηt λ exp(−ηt [A⊺π (t )
1
]a2 )
Update π1 and π2 for every action a = (a1, a2) ∈ A = A1 ×
A2 according to
Update π1 and π2 for every action a = (a1, a2) ∈ A = A1 ×
A2 according to
π (t +1)
1
π (t +1)
2
(a1) ∝ π (t )
1
(a2) ∝ π (t )
2
(a1)1−ηt λ exp(ηt [Aπ (t )
2 ]a1 )
(a2)1−ηt λ exp(−ηt [A⊺π (t )
1 ]a2 )
π (t +1)
1
π (t +1)
2
(a1) ∝ π (t )
1
(a2) ∝ π (t )
2
(a1)1−ηt λ exp(ηt [Aπ (t )
2 ]a1 )
(a2)1−ηt λ exp(−ηt [A⊺π (t )
1 ]a2 )
end for
end for
The Policy Extragradient Method (PEM) is based on the PU and OMWU methods. We provide the pseudocode for PEM (Algorithm 4)
below for your reference.
Algorithm 4 PEM: Policy Extragradient Method
Initialization: Q (0) = 0.
for t=0,1,2,...,Tmain do
Let Q (t ) denote
Q (t ) (s, a1, a2) = r 1 (s, a1, a2) + λEs′∼P ( * |s,a1,a2)V (t ) (s ′)
Invode PU (Algorithm 2) or OMWU (Algorithm 3) for Tsub iterations to solve the following entropy-regularized matrix game for every
state s, where initial state is set as uniform distribution
max
π1 (s) ∈Δ( A1)
min
π2 (s) ∈Δ( A2)
fλ (Q (t ) (s); π1 (s), π2 (s)).
Return the last iterate π (t,Tsub )
Set V (t +1) (s) = fλ (Q (t ) (s); π (t,Tsub )
(s), π (t,Tsub )
(s).
2
(s), π (t,Tsub )
2
1
1
(s)).
end for
D.2 Entropy-regularized OMWU
In this section, we provide the pseudocode of Entropy-regularized OMWU method [13].
Algorithm 5 Entropy-regularized OMWU
Input: Regularization parameter λ > 0, learning rate for policy update η > 0, learning rate for value update {αt }∞
Initialization: Set π 0
2 as uniform policies; and set
2 and π 0
1 , π 0
1, π 0
t =0.
Q (0) = 0, V (0) = λ(log |A1| + log |A2|).
for t=0,1,2,... do
for all s ∈ S do
When t ≥ 1, update policy pair π = (π1, π2) as:
π (t +1)
1
π (t +1)
2
Update policy pair π = (π 1, π 2) as:
(a1|s) ∝ π (t )
1
(a2|s) ∝ π (t )
2
π (t +1)
1
π (t +1)
2
(a1|s) ∝ π (t )
1
(a2|s) ∝ π (t )
2
Update Q (t +1) (s) and V (t +1) (s) as
(a1|s)1−ηt λ exp(η [Q (t ) (s)π (t )
2
(a2|s)1−ηt λ exp(−η [Q (t ) (s)π (t )
1
(s)]a1 )
(s)]a2 )
(a1|s)1−ηt λ exp(η [Q (t ) (s)π (t )
2
(a2|s)1−ηt λ exp(−η [Q (t ) (s)π (t )
1
(s)]a1 )
(s)]a2 )
Q (t +1) (s, a1, a2) = r 1 (s, a1, a2) + λEs′∼P ( * |s,a1,a2) [V (t ) (s ′)]
V (t +1) (s) = (1 − αt +1)V (t ) (s) + αt +1 [π (t +1) ⊺
1
Q (t +1) (s)π (t +1)
2
+ λH (π (t +1)
1
) − λH (π (t +1)
2
)]
end for
end for
E CLARIFICATION FOR ASSUMPTION 5.3
Based on the definition f∗ (θ ) = f (θ, φ∗ (θ )), f∗ (θ ) is a composite function consists of f (θ, φ) : Θ × Φ → R and φ∗ (θ ) : Θ → Φ, where Θ and
Φ are the feasible areas of incentive parameter θ and policy parameter φ, respectively. Therefore, directly making assumptions for f∗ (θ )
might be aggressive and hard to verified. In this section we give an example that if the loss function f (θ, φ) and value function V (i)
πφ (s; θ )
defined in equation (3.3) satisfy proper conditions, the composite function f∗ (θ ) satisfy Assumption 5.3 when the loss function f (θ, φ) and
the value functions V (i)
πφ (s; θ ) satisfies proper conditions.
Assumption 5.3 consists of 2 parts. Firstly, we require the composite function f∗ (θ ) to be bounded. This assumption is mild and easy to
satisfy if loss f (θ, φ) is bounded. Secondly, we require f∗ to be L-smooth (∇θ f∗ (θ ) is L-lipschitz continuous). This assumption need to be
verified. The following Proposition E.4 provide an exact example that f∗ (θ ) is both bounded and L-smooth.
Assumption E.1. Assume that loss function f (θ, φ) : Θ × Φ → R satisfies the following conditions:
(1) (Bounded) ∃Mf > 0, such that |f (θ, φ)| ≤ Mf , ∀(θ, φ) ∈ Θ × Φ ⊂ R3.
(2) (Lip-continuous) ∃G f > 0, such that ∥∇f (θ, φ)∥2 ≤ G f . ∀(θ, φ) ∈ Θ × Φ ⊂ R3.
(3) (Smooth) ∃Lf > 0, such that for ∀(θ1, φ1), (θ2, φ2) ∈ Θ × Φ ⊂ R3
∥∇f (θ1, φ1) − ∇f (θ2, φ2)∥2 ≤ Lf ∥(θ1, φ1) − (θ2, φ2) ∥2 .
Assumption E.2. Assume that the feasible area for θ , φ1, and φ2 are all one-dimensional, which means θ ∈ Θ ⊂ R, φ1 ∈ Φ1 ⊂ R,
φ2 ∈ Φ2 ⊂ R and φ = (φ1, φ2) ∈ Φ = Φ1 × Φ1 ⊂ R2. Assume that for arbitrary fixed state s ∈ S, the value functions V (i)
πφ (s; θ ) : Θ → R,
(i = 1, 2) satisfy the following conditions:
(4) (Second-order gradient bounded) ∃Gv > 0, such that for ∀(θ, φ) ∈ Θ × Φ ⊂ R3 and i = 1, 2,
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤ Gv,
∂2V (i)
πφ (s; θ )
∂θ ∂φi
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(5) (Third-order gradient bounded) ∃Lv > 0, such that for ∀(θ, φ) ∈ Θ × Φ ⊂ R3 and i = 1, 2,
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
∂2V (i)
πφ (s; θ )
∂φ 2
i
∂3V (i)
πφ (s; θ )
∂θ ∂φi ∂φ−i
πφ (s; θ )
∂φi ∂φ−i
πφ (s; θ )
∂θ ∂φ 2
i
πφ (s; θ )
∂θ 2∂φi
∂3V (i)
∂3V (i)
∂2V (i)
≤ Lv,
≤ Gv
≤ Lv
and
and
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤ Gv .
≤ Lv .
(6) (Positive definite matrix) ∃ρv > 0, such that for ∀(θ, φ) ∈ Θ × Φ ⊂ R3,
∂2V (1)
πφ (s;θ )
∂φ 2
1
∂2V (2)
πφ (s;θ )
∂φ2φ1
∂2V (1)
πφ (s;θ )
∂φ1∂φ2
∂2V (2)
πφ (s;θ )
∂φ 2
2
≻ ρvI,
where I is the identity matrix.
Lemma E.3. Suppose that Assumption E.2 holds. φ∗ (θ ) : Θ → Φ is the mapping from incentive parameter theta θ to policy parameter of Nash
policy for regularized MG G′
θ defined in section 3.4. Then we have
2Gv
ρv .
(i) For ∀θ ∈ Θ, we have ∥∇θ φ∗ (θ )∥F ≤
(ii) For ∀θ1, θ2 ∈ Θ, we have ∥∇θ φ∗ (θ1) − ∇θ φ∗ (θ2)∥F ≤
2Lv
ρv
(cid:16)1 + 4Gv +
(cid:17)
16G 2
v
ρv
∥θ1 − θ2 ∥2,
where ∥*∥F is the Frobenius Norm for matrix.
Proof. See Appendix E.1.
□
Proposition E.4. If Assumption E.1 and E.2 hold, we could conclude that f∗ (θ ) defined in optimization problem (3.8) satisfies the following
conditions:
(i) (Bounded) |f∗ (θ )| ≤ Mf for ∀θ ∈ Θ.
(ii) (Smooth) f∗ (θ ) is L-smooth (∇θ f∗ (θ ) is L-Lipschitz continuous), where
L = Lf (1 +
2Gv
ρv
)(1 +
4Gv
ρv
) +
2LvG f
ρv
(1 + 4Gv +
16G 2
v
ρv
).
Proof. Firstly, |f∗ (θ )| ≤ Mf is easy to generated from condition (1) since φ ∗ (θ ) ∈ Φ. We are going to focus on showing f∗ (θ ) is L-smooth
in the following proof.
For ∀θ1, θ2 ∈ Θ,
∥∇θ f∗ (θ1) − ∇θ f∗ (θ2)∥2 = (cid:13)
(cid:13)∇θ f (θ1, φ∗ (θ1)) + ∇θ φ∗ (θ1)⊺∇φ f (θ1, φ∗ (θ1)) − ∇θ f (θ2, φ∗ (θ2)) − ∇θ φ∗ (θ2)⊺∇φ f (θ2, φ∗ (θ2))(cid:13)
(cid:13)2
≤ ∥∇θ f (θ1, φ∗ (θ1)) − ∇θ f (θ2, φ∗ (θ2))∥2 + (cid:13)
≤ ∥∇θ f (θ1, φ∗ (θ1)) − ∇θ f (θ2, φ∗ (θ2))∥2 + ∥∇θ φ∗ (θ1)∥F
(cid:13)∇θ φ∗ (θ1)⊺∇φ f (θ1, φ∗ (θ1)) − ∇θ φ∗ (θ2)⊺∇φ f (θ2, φ∗ (θ2))(cid:13)
(cid:13)2
(cid:13)∇φ f (θ1, φ∗ (θ1)) − ∇φ f (θ3, φ∗ (θ2))(cid:13)
(cid:13)
(cid:13)2
(E.1)
(cid:13)∇φ f (θ2, φ∗ (θ2))(cid:13)
+ (cid:13)
(cid:13)2 ∥∇θ φ∗ (θ1) − ∇θ φ∗ (θ2)∥F
We are going to bound three terms in formula (E.1) one by one.
i) By the condition (3) in Assumption E.1 and property (i) in Lemma E.3, we have
∥∇θ f (θ1, φ∗ (θ1)) − ∇θ f (θ2, φ∗ (θ2)) ∥2 ≤ ∥∇θ f (θ1, φ∗ (θ1)) − ∇θ f (θ2, φ∗ (θ2))∥2
≤ Lf ∥(θ1, φ∗ (θ1)) − (θ2, φ∗ (θ2))∥2
≤ Lf (∥θ1 − θ2 ∥2 + ∥φ∗ (θ1) − φ∗ (θ2)∥2)
≤ Lf (∥θ1 − θ2 ∥2 + max
θ ∈Θ
∥∇θ φ∗ (θ ) ∥F ∥θ1 − θ2 ∥2)
≤ Lf (1 +
2Gv
ρv
) ∥θ1 − θ2 ∥2
(Condition (3) in Assumption E.1)
(Mean value Theorem)
(Property (i) in Lemma E.3)
(E.2)
ii) By property (i) in Lemma E.3 and the condition (3) in Assumption E.1, we have
(cid:13)∇φ f (θ1, φ∗ (θ1)) − ∇φ f (θ3, φ∗ (θ2))(cid:13)
(cid:13)
(cid:13)2
(cid:13)∇φ f (θ1, φ∗ (θ1)) − ∇φ f (θ3, φ∗ (θ2))(cid:13)
(cid:13)
(cid:13)2
∥ (θ1, φ∗ (θ1)) − (θ2, φ∗ (θ2))∥2
∥∇θ φ∗ (θ1)∥F
2Gv
ρv
2GvLf
ρv
2GvLf
ρv
(1 +
≤
≤
≤
2Gv
ρv
(Property (i) in Lemma E.3)
(Condition (3) in Assumption E.1)
) ∥θ1 − θ2 ∥2
(E.3)
iii) By condition (2) in Assumption E.1 and property (ii) in Lemma E.3, we have
(cid:13)∇φ f (θ2, φ∗ (θ2))(cid:13)
(cid:13)
(cid:13)2 ∥∇θ φ∗ (θ1) − ∇θ φ∗ (θ2)∥F
≤G f ∥∇θ φ∗ (θ1) − ∇θ φ∗ (θ2)∥F
(cid:18)
2LvG f
ρv
≤
1 + 4Gv +
(cid:19)
16G 2
v
ρv
∥θ1 − θ2 ∥2
Combine inequalities (E.1-E.4), we could get
(Condition (2) in Assumption E.1)
(Property (ii) in Lemma E.3)
(E.4)
∥∇θ f∗ (θ1) − ∇θ f∗ (θ2)∥2 ≤ Lf (1 +
2Gv
ρv
)(1 +
4Gv
ρv
) +
2LvG f
ρv
(1 + 4Gv +
16G 2
v
ρv
) ∥θ1 − θ2 ∥2
We already prove that f∗ (θ ) is L-smooth with L = Lf (1 +
2Gv
ρv
)(1 +
4Gv
ρv
) +
2LvG f
ρv
(1 + 4Gv +
16G 2
v
ρv
).
(E.5)
□
E.1 Proof for Lemma E.3
Proof for Lemma E.3. When conditions (4-6) in Assumption E.2 hold for V (i)
(4-6) also hold for Ev (∗) V (i)
properties one by one.
πφ (s; θ ). For notation simplicity, we denote Ev (∗) V (i)
πφ (s; θ ) on every state s ∈ S, it is obvioud that conditions
πφ (s; θ ) := V i (θ, φ) in this section. We are going to prove 2
i) Firstly, we are going to bound ∥∇θ φ∗ (θ ) ∥F . For arbitrary θ ∈ Θ and φ ∈ Φ, since φ1 ∈ R, φ2 ∈ R and φ = (φ1, φ2) ∈ R2, formula
(4.3-4.4) in section 4 could be written as
∇θuθ (φ) =
∂2V 1 (θ,φ)
∂θφ1
∂2V 2 (θ,φ)
∂θφ2
∈ R2×1,
∇φuθ (φ) =
∂2V 1 (θ,φ)
∂φ 2
1
∂2V 2 (θ,φ)
∂φ1∂φ2
∂2V 1 (θ,φ)
∂φ1∂φ2
∂2V 1 (θ,φ)
∂φ 2
2
∈ R2×2
(E.6)
By formula (4.5) in Lemma 4.2 and condition (4, 6) in Assumption E.2, we have
∂2V 1 (θ,φ)
∂φ 2
1
∂2V 2 (θ,φ)
∂φ1∂φ2
∂2V 1 (θ,φ)
∂φ1∂φ2
∂2V 1 (θ,φ)
∂φ 2
2
∂2V 1 (θ,φ)
∂φ 2
1
∂2V 2 (θ,φ)
∂φ1∂φ2
∂2V 1 (θ, φ)
(cid:18)(cid:12)
(cid:12)
(cid:12)
∂θφ1
(cid:12)
∂2V 1 (θ,φ)
∂φ1∂φ2
∂2V 1 (θ,φ)
∂φ 2
2
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
+
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)F
∂2V 1 (θ,φ)
∂θφ1
∂2V 2 (θ,φ)
∂θφ2
∂2V 1 (θ,φ)
∂θφ1
∂2V 2 (θ,φ)
∂θφ2
−1
−1
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
F
∂2V 2 (θ, φ)
(cid:12)
(cid:12)
(cid:12)
∂θφ2
(cid:12)
(cid:19)
(cid:13)∇θ φ ∗ (θ )(cid:13)
(cid:13)
(cid:13)F ≤
≤
≤
≤
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
1
ρv
2Gv
ρv
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)F
(Condition (6) in Assumption E.2)
(Condition (4) in Assumption E.2)
(E.7)
ii) Secondly, we are going to bound ∥∇θ φ∗ (θ1) − ∇θ φ∗ (θ2)∥F . For ∀θ1, θ2 ∈ Θ,
∥∇θ φ∗ (θ1) − ∇θ φ∗ (θ2)∥F =
≤
(cid:13)
∇θuθ1 (φ∗ (θ1)) − (cid:2)∇φuθ2 (φ∗ (θ2))(cid:3) −1
(cid:2)∇φuθ1 (φ∗ (θ1))(cid:3) −1
(cid:13)
(cid:13)
(cid:2)∇φuθ1 (φ∗ (θ1))(cid:3) −1(cid:13)
(cid:13)
(cid:13)∇θuθ1 (φ∗ (θ1)) − ∇θuθ2 (φ∗ (θ2))(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)F
(cid:13)F
(cid:13)
(cid:13)
(cid:2)∇φuθ1 (φ∗ (θ1))(cid:3) −1
(cid:13)∇θuθ2 (φ∗ (θ2))(cid:13)
+ (cid:13)
(cid:13)
(cid:13)F
(cid:13)
− (cid:2)∇φuθ2 (φ∗ (θ2))(cid:3) −1(cid:13)
(cid:13)
(cid:13)F
∇θuθ2 (φ∗ (θ2))
By Condition (6) we have
By Condition (4) we have
(cid:13)
(cid:13)
(cid:13)
(cid:2)∇φuθ1 (φ∗ (θ1))(cid:3) −1(cid:13)
(cid:13)
(cid:13)F
≤
1
ρ
.
(cid:13)∇θuθ2 (φ∗ (θ2))(cid:13)
(cid:13)
(cid:13)F ≤
∂2V 1 (θ2, φ∗ (θ2))
∂θφ1
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
+
∂2V 2 (θ2, φ∗ (θ2))
∂θφ2
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤ 2Gv .
(cid:13)
(cid:13)
(cid:13)F
(E.8)
(E.9)
(E.10)
By Condition (5) we have
(cid:13)
(cid:13)∇θuθ1 (φ∗ (θ1)) − ∇θuθ2 (φ∗ (θ2))(cid:13)
(cid:13)F ≤
(cid:12)
(cid:12)
(cid:12)
(cid:12)
−
∂2V 1 (θ1, φ∗ (θ1))
∂θφ1
∂3V 1 (θ1, φ∗ (θ1))
∂θ 2φ1
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤2Lv ∥θ1 − θ2 ∥ .
≤ max
θ,φ
∂2V 1 (θ2, φ∗ (θ2))
∂θφ1
(cid:12)
(cid:12)
(cid:12)
(cid:12)
+
(cid:12)
(cid:12)
(cid:12)
(cid:12)
∥θ1 − θ2 ∥2 + max
θ,φ
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
∂2V 2 (θ1, φ∗ (θ1))
∂θφ2
∂3V 2 (θ1, φ∗ (θ1))
∂θ 2φ2
−
∂2V 2 (θ2, φ∗ (θ2))
∂θφ2
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
∥θ1 − θ2 ∥2
Last but not least,
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
=
(cid:2)∇φuθ1 (φ∗ (θ1))(cid:3) −1
∂2V 1 (θ1,φ∗ (θ1))
∂φ 2
1
∂2V 2 (θ1,φ∗ (θ1))
∂φ1∂φ2
− (cid:2)∇φuθ2 (φ∗ (θ2))(cid:3) −1(cid:13)
(cid:13)
(cid:13)F
∂2V 1 (θ1,φ∗ (θ1))
∂2V 1 (θ2,φ∗ (θ2))
∂φ 2
∂φ1∂φ2
1
∂2V 2 (θ2,φ∗ (θ2))
∂2V 2 (θ1,φ∗ (θ1))
∂∂φ 2
∂φ1∂φ2
2
−1
−
For notation simplicity we denote
∂2V 1 (θ2,φ∗ (θ2))
∂φ1∂φ2
∂2V 2 (θ2,φ∗ (θ2))
∂∂φ 2
2
−1(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)F
a1 =
a2 =
, b1 =
, b2 =
∂2V 1 (θ1, φ∗ (θ1))
∂φ 2
1
∂2V 1 (θ2, φ∗ (θ2))
∂φ 2
1
(cid:18) (cid:20)a1
c1
b1
d1
(cid:21) (cid:19)
∂2V 1 (θ1, φ∗ (θ1))
∂φ1∂φ2
∂2V 1 (θ2, φ∗ (θ2))
∂φ1∂φ2
(cid:18) (cid:20)a2
c2
b2
d2
(cid:21) (cid:19)
M1 = det
, M2 = det
, c1 =
, c2 =
∂2V 2 (θ1, φ∗ (θ1))
∂φ1∂φ2
∂2V 2 (θ2, φ∗ (θ2))
∂φ1∂φ2
, d1 =
, d2 =
∂2V 2 (θ1, φ∗ (θ1))
∂∂φ 2
2
∂2V 2 (θ2, φ∗ (θ2))
∂∂φ 2
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
.
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
Therefore, we have
=
≤
We are first going to bound
(cid:12)
(cid:12)
(cid:12)
a1
M1
−
a2
M2
By Condition (6), we have
By Condition (5) we have
By Condition (4) we have
Similarly, by Condition (4,5) we have
(cid:21)
(cid:2)∇φuθ1 (φ∗ (θ1))(cid:3) −1
1
M1
a1
M1
(cid:20) d1
−c1
a2
M2
−b1
a1
(cid:12)
(cid:12)
(cid:12)
(cid:12)
b1
M1
(cid:12)
(cid:12)
(cid:12)
(cid:12)
−
−
−
+
− (cid:2)∇φuθ2 (φ∗ (θ2))(cid:3) −1(cid:13)
(cid:13)
(cid:13)F
1
−b2
a2
M2
b2
M2
(cid:20) d2
−c2
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:21)(cid:13)
(cid:13)
(cid:13)
(cid:13)F
(cid:12)
(cid:12)
(cid:12)
(cid:12)
c2
M2
c1
M1
d1
M1
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
−
+
+
−
d2
M2
(cid:12)
(cid:12)
(cid:12)
(cid:12)
a1
M1
−
a2
M2
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤
1
|M1|
|a1 − a1| +
|a2|
|M1M2|
|M1 − M2|.
|M1| ≥ ρv
and
|M2| ≥ ρv .
|a1 − a1| ≤ Lv ∥θ1 − θ2 ∥2 .
|a2| ≤ Gv .
|M1 − M2| =|a1d1 − b1c1 − a2d2 + b2c2|
≤|a1||d1 − d2| + |d2||a1 − a2| + |b1||c1 − c2| + |c2||b1 − b2|
≤4GvLv ∥θ1 − θ2 ∥2 .
Combine formula (E.15-E.18) we have
(cid:12)
(cid:12)
(cid:12)
(cid:12)
a1
M1
a2
M2
(cid:12)
(cid:12)
(cid:12)
(cid:12)
−
≤ (
Similarly, we could compute the bound for
Lv
ρv
(cid:12)
(cid:12)
(cid:12)
+
Gv
ρ2
v
× 4GvLv) ∥θ1 − θ2 ∥2 =
b1
M1
−
b2
M2
(cid:12)
,
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
c1
M1
−
c2
M2
(cid:12)
(cid:12)
(cid:12)
and
(cid:12)
(cid:12)
(cid:12)
d1
M1
(cid:13)
(cid:13)
(cid:13)
(cid:2)∇φuθ1 (φ∗ (θ1))(cid:3) −1
− (cid:2)∇φuθ2 (φ∗ (θ2))(cid:3) −1(cid:13)
(cid:13)
(cid:13)F
≤
Lv
ρv
−
(1 +
4G 2
v
ρv
) ∥θ1 − θ2 ∥2 .
d2
M2
(cid:12)
(cid:12)
(cid:12)
. Therefore, we have
4Lv
ρv
(1 +
4G 2
v
ρv
) ∥θ1 − θ2 ∥2
(E.11)
(E.12)
(E.13)
(E.14)
(E.15)
(E.16)
(E.17)
(E.18)
(E.19)
(E.20)
Combine formula (E.9,E.10,E.11,E.20) we have
∥∇θ φ∗ (θ1) − ∇θ φ∗ (θ2)∥F ≤
≤
1
ρv
2Lv
ρv
× 2Lv ∥θ1 − θ2 ∥2 + 2Gv ×
4Lv
ρv
(1 +
4G 2
v
ρv
) ∥θ1 − θ2 ∥2
(1 + 4Gv +
16G 2
v
ρv
) ∥θ1 − θ2 ∥2 .
F PROOF FOR THEOREM 5.4
Proof for Theorem 5.4. By Assumption 5.3,the gradient ∇θ f∗ (θ ) is L-Lipschitz continuous implies for ∀k
f∗ (θk+1) ≤ f∗ (θk ) + ∇θ f∗ (θk )⊺ (θk+1 − θk ) +
L
2
∥θk+1 − θk ∥2 .
Since θk+1 = θk − β∇θ f∗ (θk ), we have θk+1 − θk = −β∇θ f∗ (θk ). Substitute θk+1 − θk in formula F.1, we have
f∗ (θk+1) − f∗ (θk ) ≤ − β∇θ f∗ (θk )⊺∇θ f∗ (θk ) +
Lβ
2
− 1) ∥∇θ f∗ (θk ) ∥2 .
=β (
Lβ
2
∥∇θ f∗ (θk )∥2
Since the learning rate β = 1
L , substitute β in formula F.2 we have
Therefore, summing for k = 0, ...,T for both LHS and RHS of inequality F.3 we have
f∗ (θk+1) − f∗ (θk ) ≤ −
1
2L
∥∇θ f∗ (θk ) ∥2 .
T
∑︁
[f∗ (θk+1) − f∗ (θk )] ≤ −
T
∑︁
∥∇θ f∗ (θk )∥2 =⇒
1
2L
k=0
Since θ ∗ = arg min θ f∗ (θ ), we have f∗ (θT ) ≥ f∗ (θ ∗). Then
k=0
T
∑︁
k=0
∥∇θ f∗ (θk )∥2 ≤ 2L(f∗ (θ0) − f∗ (θT ))
T
∑︁
k=0
∥∇θ f∗ (θk )∥2 ≤ 2L(f∗ (θ0) − f∗ (θ ∗))
(E.21)
□
(F.1)
(F.2)
(F.3)
(F.4)
Therefore, since the square of norms are all positive, the minimum of the square of norms must be smaller than the mean of the square of
norms. we have
min
k=0,...,T
∥∇θ f∗ (θk )∥2 ≤
1
T + 1
T
∑︁
k=0
∥∇θ f∗ (θk )∥2 ≤
2L(f∗ (θ0) − f∗ (θ ∗))
T + 1
.
By Assumption 5.3, |f∗ (θ )| ≤ M for all θ ∈ Θ and f∗ (θ0) ≥ f∗ (θ ∗), we could conclude
f∗ (θ0) − f∗ (θ ∗) = |f∗ (θ0) − f∗ (θ ∗)| ≤ |f∗ (θ0)| + |f∗ (θ ∗)| ≤ 2M.
Therefore,
min
k=0,...,T
∥∇θ f∗ (θk )∥2 ≤
1
T + 1
T
∑︁
k=0
∥∇θ f∗ (θk )∥2 ≤
2L(f∗ (θ0) − f∗ (θ ∗))
T + 1
≤
4LM
T + 1
.
(F.5)
(F.6)
□
G EXPERIMENTAL DETAILS
G.1 DASAC
Algorithm 6 DASAC: SAC-based Differentiable Arbitrating in MARL.
{ ̄α (i)
t
}t ∈ [0,T−1],i ∈ {1,2}, βk
Input:Seq. of stepsize (cid:16)
{1, 2}, target entropy for SAC algorithm ̄H .
Initialization actor parameter θ0 ∈ Θ, marginalized Q estimator parameter ψ0 ∈ Ψ, and centralized joint Q estimator parameter (namely
centralized critic) ξ0 ∈ Ξ.
for k=0,1,... do
0, i ∈ {1, 2}, truncation parameters (cid:110)
(cid:17), initial regularization parameters λi
max, E (i)
Q (i)
max
i ∈
(cid:111)
(s, ai ; θk ) ← 0 (i ∈ {1, 2})
Q (i)
ψ i
0
for t=0,1... do
Sample transitions (st , ui
// Update the actor
Update policy via minimizing the KL divergence
t , u−i
t
, ri
t , st +1) from the replay buffer
πi
φi
t
(*|st ; θk ) ← arg min
φ ∈Φ
(cid:32)
DKL
πφ ||exp
(cid:33)(cid:33)
Qψ i
t
(st , ai
t )
(cid:32) 1
λi
t
// Optimize the centralized joint Q estimator
Compute the value function of the next state with the centralized joint Q function
t |st +1; θk )) + λ−i
t
; θk ) − λi
(st +1, ai
t log(πφi
t , a−i
t
(ai
V cent,(i)
t +1
t
= Qcent
ξ (i )
t
log(πφ −i
t
(a−i
t
|st +1; θk ))
Update the parameter ξi by minimizing
(cid:18)
t + (1 − is_done)γV cent,(i)
ri
t +1
− Qcent
ξ (i )
t
(st , u (i)
t
, u (−i)
t
; θk )
(cid:19)2
// Optimize the marginalized Q estimator
Compute the marginalized Q (i) -function from the learned centralized joint Q function
(cid:21)
(cid:98)Q (i)
πφt
(s, ai
t ; θk ) = E ˆa−i
t ∼π −i
φt
(cid:20)
Qcent
ξ (i )
t
(st , ai
t , ˆa−i
t
; θk )
Update the estimated ideal energy function
(cid:98)Q (i)
t +1 (s, ai
t ; θk ) =(1 − ̄α (i)
t
) * Q (i)
φi
t
(s, ai
t ; θk ) + ̄α (i)
t
* (cid:98)Q (i)
πφt
(s, ai
t ; θk ).
Update the parameters ψ of marginalized Q estimator to obtain Q (i)
ψ i (s, ai ; θ ) ∈ F
:
Q (i )
max
ψt +1 ← arg min
ψ
Eσt
// Auto-tune the regularization parameters
Update the regularization parameters λi
(cid:16)
∑︁
i ∈ {1,2}
Q (i)
ψ i (s, ai
t ;θ ) − (cid:98)E (i)
t +1 (s, ai
t ;θ )
.
(cid:17)2
λi
t +1 ← arg min
λ
Eai
t ∼πi
φt
(cid:104)
t log πi
λi
φt
(ai
t |st ) − λi
t
̄H
(cid:105)
θk+1 ← θk − βk ∇f∗ (θk ),
ψ (∗) (θk ) = ψt +1.
end for
Update incentive parameter
where ∇f∗ (θk ) is defined in (4.6).
end for
G.2 GridSearch(M) and BayesOpt baselines
For comparison, we apply the grid search over the incentive parameters as a zeroth-order algorithm. We first perform a round of coarse-
grained grid search, using the same modified MASAC algorithm under the incentive parameters from 0.0 to 0.5 with a step size of 0.05, and
then for two games respectively, a round of fine-grained search is applied. For Predator-prey, we do grid search from 0.3 to 0.35 with a step
size of 0.005 while we search from 0.35 to 0.4 with the same step size for Running-with-scissors.
For the improved zeroth-order baseline, BayesOpt, we use the most popular expected improvement (EI) as the acquisition function and use
L-BFGS-B method to maximize the acquisition function with a random start point in order to compute the next sampling point.
G.3 Implementation Details
G.3.1 Computation Resources. We conduct our experiments on one NVIDIA GeForce RTX 3090 GPU with 24 GB GDDR6X memory. We
implement our codes on the PyTorch framework with CUDA acceleration, which we can run in parallel on one GPU card.
G.3.2 Hyper-parameters.
Hyper-parameter
initialization method
num GRU layers
Actor MLP hidden state dim
Actor RNN hidden state dim
Critic MLP&RNN hidden state dim
num FC after
optimizer
optimizer eps
weight decay
activation function
use reward normalization
episode length
last action layer gain
batch size
buffer size
gamma
epsilon
epsilon anneal time
Q function loss
initial regularization parameter
target entropy coefficient
Value
orthogonal
1
32
16
64
1
Adam
1e-5
0
ReLU
true
25
0.01
64
5000
0.99
from 1.0 to 0.05
50000
MSE loss
1
0.3
Table 1: Hyper-parameters used in our experiments by DASAC.
Meichen Song*„ Feng GaoâĂą, Boyi Liu, Zhaoran Wang, Yi Wu„
|
|
http://arxiv.org/abs/2302.11992v1 | 2023-02-20T15:57:56 | 2023-02-20T15:57:56 | Solving Recurrent MIPs with Semi-supervised Graph Neural Networks | We propose an ML-based model that automates and expedites the solution of
MIPs by predicting the values of variables. Our approach is motivated by the
observation that many problem instances share salient features and solution
structures since they differ only in few (time-varying) parameters. Examples
include transportation and routing problems where decisions need to be
re-optimized whenever commodity volumes or link costs change. Our method is the
first to exploit the sequential nature of the instances being solved
periodically, and can be trained with ``unlabeled'' instances, when exact
solutions are unavailable, in a semi-supervised setting. Also, we provide a
principled way of transforming the probabilistic predictions into integral
solutions. Using a battery of experiments with representative binary MIPs, we
show the gains of our model over other ML-based optimization approaches. | [
"Konstantinos Benidis",
"Ugo Rosolia",
"Syama Rangapuram",
"George Iosifidis",
"Georgios Paschos"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.11992v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.11992v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "math.OC",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"math.OC",
"cs.LG",
"stat.ML"
] | SOLVING RECURRENT MIPS WITH SEMI-SUPERVISED GRAPH
NEURAL NETWORKS
3
2
0
2
b
e
F
0
2
]
C
O
.
h
t
a
m
[
1
v
2
9
9
1
1
.
2
0
3
2
:
v
i
X
r
a
Konstantinos Benidis
Amazon Research
Berlin, Germany
[email protected]
Ugo Rosolia
Amazon Research
Luxembourg
[email protected]
Syama Rangapuram
Amazon Research
Berlin, Germany
[email protected]
George Iosifidis∗
Delft University of Technology
Delft, Netherlands
[email protected]
Georgios Paschos
Amazon Research
Luxembourg
[email protected]
ABSTRACT
We propose an ML-based model that automates and expedites the solution of MIPs by predicting
the values of variables. Our approach is motivated by the observation that many problem instances
share salient features and solution structures since they differ only in few (time-varying) parameters.
Examples include transportation and routing problems where decisions need to be re-optimized
whenever commodity volumes or link costs change. Our method is the first to exploit the sequen-
tial nature of the instances being solved periodically, and can be trained with "unlabeled" instances,
when exact solutions are unavailable, in a semi-supervised setting. Also, we provide a principled
way of transforming the probabilistic predictions into integral solutions. Using a battery of ex-
periments with representative binary MIPs, we show the gains of our model over other ML-based
optimization approaches.
Keywords Graph Neural Networks, Discrete Optimization, Semi-supervised Learning, MIP
1 Introduction
The solution of mixed integer programming (MIP) problems is as important as it is challenging to achieve. Indeed,
MIP is employed for optimizing real-world operations, decision processes and systems, including transportation [28,
34], facility location [25], production planning [62, 14], content distribution networks [29], all the way to structured
predictions [30, 46] and neural network (NN) training [48]. However, despite the success and wide availability of MIP
solvers, the fast and accurate optimization of such problems remains largely elusive. This has given rise to perpetual
efforts for approximation algorithms [59] and heuristic solutions [37], and for improving the performance of solvers
[54].
Nonetheless, an aspect that has received less attention is that several MIP instances share properties and common
In fact, practitioners, more often than not, need to solve repeatedly problems that differ only in few
structures.
parameters, cf.
[51, 11]. For example, routing and other transportation problems are re-solved periodically over
the same graph whenever new demands or costs are obtained. This motivates the use of ML in order to explore
correlations among problem properties and solution values, which in turn can be leveraged to expedite the solution of
new instances, enabling their solution even in real-time as an increasing number of applications require [10]. The idea
of ML-assisted optimization is not new per se; it has been successfully applied to configure solvers [44], and design
heuristics, e.g., in Branch-and-Bound (BnB) techniques [31]. Importantly, recent studies focused on learning problem
structures towards predicting (some) variables [31, 19, 52, 39] and/or active constraints [10, 11], with promising results
– we review them in Sec. 2.
∗Work done while at Amazon.
In this work we make several steps towards the latter direction by developing an ML-based method for facilitating
the solution of binary MIPs which (might) exhibit temporal structure. For example, internet traffic follows a diurnal
(and not random) pattern [47, 27]; and the same holds for a plenitude of transportation problems [49]. Motivated by
these observations, we propose MIPnet, a Long Short-Term Memory (LSTM)-based probabilistic variable-prediction
model [56] that operates on a permutation and scale-invariant embedding space created by a Graph Convolutional
Network (GCN) [8]. The GCN exploits the intuitive bipartite graph MIP representation [31, 52], towards encoding the
problems' salient properties without manual feature engineering.
Furthermore, unlike prior works, MIPnet employs semi-supervised learning to augment the training data without
computational costs, while still benefiting from the robustness of supervised learning when possible. And including
this unsupervised loss provides additional gains. Namely, not all variables have the same impact on the MIP's objective
and on constraint violation. Indeed, misprediction of some variables can render the problem infeasible, while others
affect only the objective (and to different extent). Clearly, while a model using only supervised loss cannot discern such
conditions, MIPnet can learn these effects with per-variable granularity, and mitigate their impact accordingly. Our
goal is to predict a significant portion of the binary variables so as to facilitate the optimization of the remaining (binary
and continuous) variables. The selection of these variables is based on a confidence metric following a principled
Bayesian approach that enables tunable variable selection without (expensive) model re-training.
MIPnet is evaluated through a battery of experiments, using both real and synthetic traces, and in diverse real-world
problems that include network routing, facility location and TSP, among others. These are representative problems
in operational research, and have been used in prior works [10, 11, 52, 19] and references therein. The experiments
reveal significant gains over these previous works in terms of variable prediction accuracy, while maintaining high
constraint feasibility. We also demonstrate the importance of exploiting the temporal dimension of these problems
(whenever it is prevalent), towards improving our predictions. Finally, we stress that we focus on binary MILPs which
have applications in a vast range of real-world problems;2 yet, our method paves the road towards tackling general
MIPs.
In summary, the contributions of this work are:
• We propose MIPnet, a GCN-based probabilistic model that learns to solve MIPs and selects the most confident
variables based on a principled Bayesian approach. MIPnet speeds up significantly the solution of general binary
MIPs while exploiting, for the first time, any temporal relation across the problem instances.
• MIPnet employs semi-supervised learning to benefit from labeled data when available, and remain operative when
these are hard to obtain. This hybrid approach further allows the model to identify and prioritize variables that are
pivotal for feasibility and optimality.
• In a series of experiments, MIPnet is proved to find accurate solutions to a range of different problems, consistently
outperforming SotA benchmarks such as [10, 52].
Paper Structure. Sec. 2 reviews the related work and Sec. 3 introduces the model, training and inference approach.
Sec. 4 presents the experimental results and Sec. 5 concludes the study. Model and dataset details, and additional
experiments are provided as supplementary material.
2 Related work
Learning Configurations & Heuristics A first thrust of works learn to tune (hyper) parameters of solvers [22, 23,
50, 44, 4, 6]. For example, [22, 23] leverage local search to identify good configurations and [50] developed a pertinent
software library. These suggestions are oblivious to, and hence unable to benefit from, the problem structure. A
different approach is to learn heuristics. Many works in this context learn how to select BnB variables [1, 21, 31, 2, 35]
or BnB nodes [36, 38], and how to run primal heuristics [20]. Similar ideas are used in cutting planes [7] and in
optimization over graphs [16, 40, 41]. On the other hand, [12, 45] (and references therein) learn optimization models
via alternative decompositions and problem reformulations.
Identifying Substructures The third thrust of related work focuses on learning and exploiting problem substruc-
tures. Early efforts include predicting backdoor variables [17, 18], i.e., instantiating key variables to increase the
problem's tractability. Similarly, assuming the availability of training data, [51, 43] propose sampling methods for
predicting active constraints. Along these lines, [10, 11] builds Optimal Classification Trees and Feedforward NNs
to predict active constraints and variables. Similarly, [61] assigns variables using a k-Nearest Neighbours classifier.
Finally, [57, 60] use Imitation Learning and RL for splitting ILPs. These works do not employ richer (and more
promising) problem representations, nor they design bespoke NN architectures for the problems at hand.
2E.g., 164 of 240 benchmarks in [33] are binary/integer LPs; while 90% of variables are binary in the rest.
2
Benidis et al.
Employing GCNs To that end, [31, 52, 19] use GCNs where the MIPs are encoded with bipartite graphs. This
approach is permutation-invariant, thus can yield generalizable learned policies. In [31] the GCN is used for variable
selection in BnB; [52] learns also how to initialize (Neural Diving); and [19] uses cross-entropy loss to predict prob-
ability distributions for the binary variables so as to expedite branch exploration. On the other hand, [39] proposes a
GNN-based unsupervised approach for graph-related problems, where the integral solution is recovered with deran-
domization through sequential decoding. This interesting approach yields feasible solutions with high probability, yet
is not applicable to general MIPs.
Unlike these works (see overview [9]), MIPnet considers the temporal evolution of problem's parameters; employs
semi-supervised learning to reduce the requirement for training datasets; and follows a Bayesian approach to variable
selection through learned distributions with tunable confidence and infeasibility penalization. Appendix J includes
further comparisons with prior work.
3 Semi-supervised Temporal GCN
3.1 Problem Setting
Consider the binary MILP in standard form:3
minimize
z
cT z
subject to Az
b,
(cid:22)
(1)
where z = [z(b); z(c)], with z(b)
z +D(c)
and Dz = D(b)
z
b
RDc (notation details in Appendix A).
D(b)
z
, and z(c)
. An instance of (1) is defined by the set of parameters φ =
z being the binary and continuous variables, respectively,
RDc×Dz ,
RDz , A
0, 1
}
∈ {
∈
RD(c)
, with c
c, A, b
}
{
∈
∈
S
with
and t
and ̄
∈ S
S ⊆ S
We focus on applications where (1) needs to be solved recurrently with different parameters that follow a temporal
structure. Consider a set of time series
Ts timesteps, where each timestep corresponds to an instance with
φs,t}s∈S,t∈Ts, consider their optimal solutions
parameters φs,t, with s
{
s,t}s∈ ̄S,t∈ ̄Ts , with ̄
z(cid:63)
Ts ⊆ Ts, i.e., we assume the availability of solution only for a subset of instances.
{
Our goal is to train a model that learns a globally shared mapping from the problem parameters φs,t to a probabilistic
representation p(z(cid:63)
s,t) of the optimal solution. Leveraging this mapping, we present a method to select a subset of
variables for which the optimal assignment is known with high confidence – the size of the subset is a user-defined
parameter. Then, we fix these variables in problem (1) and we solve the resulting lower dimensional sub-problem. As
s , the proposed methods is able to expedite
shown in the result section, for every new set of instances
the computation of the optimal solution.
∈ Ts. For the set of instances
φ(cid:48)
s,t}s∈S (cid:48),t∈T (cid:48)
{
∈
We elaborate next on the model architecture, training and inference procedures. For clarity of exposition we drop the
time series and timestep subscripts unless necessary.
3.2 Proposed Method
Inspired by [31, 19, 52], we represent an instance of (1) as a bipartite graph by having one node for each variable and
constraint, and connecting a variable node to a constraint node iff the variable is active on that constraint. We use a
GCN block to map the nodes to an embedding space, followed by an LSTM block to capture the temporal structure of
the MILP instances
φs,t}s∈S,t∈Ts. The model is trained in a semi-supervised manner, exploiting both a supervised
{
and an unsupervised component.
Two key properties of (1) are the scale and permutation invariance, i.e., the solution of the problem does not change if
we scale (appropriately) the problem, or permute its parameters and variables. If a model does not satisfy these prop-
erties, it would need to be re-trained for each variation of a problem. Our architecture satisfies both scale invariance
by introducing a normalization step and permutation invariance by allowing only symmetric functions among nodes.
Parameter Normalization We initially normalize all parameters φ of (1) in order to make the training more stable
and the model scale-invariant. This means that the model will learn to solve the problem with parameters drawn
from a "base" distribution, and every scaled problem version can be solved just by normalizing the parameters. The
normalization needs to ensure that the relative weights of the objective parameters and each constraint remain the same;
3We do not specifically include equality constraints since they can be rewritten as two inequality constraints.
3
therefore we normalize them separately. The normalized parameters
Dc, j
Dz, are computed as follows:
[aT
(cid:107)
where ai is the i-th row of A. We use p = 2. For problem instances of different sizes the normalization can lead to a
distribution shift. We discuss this in Appendix B.
[aT
(cid:107)
(cid:107)p
(cid:107)p
(cid:107)
(2)
ai,j =
, bi =
ai,j
i ; bi]
i
∀
≤
, cj =
bi
i ; bi]
≤
,
cj
c
(cid:107)p
,
E
V
V
, with
= Dz + Dc, the set of edges
, A(adj)) defined by the set of nodes
Model Architecture. The model builds on the bipartite graph representation of MILPs. Formally, consider a graph
equal to the number
G = (
R|V|×|V|,
of nonzero entries in the constraint matrix A, and the graph adjacency matrix A(adj) = [IDz , AT ; A, IDc ]
i.e., the (non-binary) adjacency matrix contains the coefficients from the constraint matrix A and self-loops for all
nodes given by the identity matrices. One set of Dz nodes in the bipartite graph corresponds to variables and the other
set of Dc nodes to constraints. An edge ei,j ∈ E
R|V|×Du derived by the problem parameters
The nodes of the graph are associated with a set of features U = U(φ)
φ, where Du is the feature dimension. The feature vector of each node is constructed by linearly combining in a
permutation invariant way all the variable and constraint parameters that the node is related to. We refer the reader to
Appendix C for a detailed description.
indicates that variable j appears in the i-th constraint.
, with
E
|
|V|
∈
∈
E
|
The graph representation of (1) motivates using a GCN [42]. A GCN with L layers is denoted:
X(l+1) = g(X(l), A(adj); θ(l)
g ),
l = 0, . . . , L
1,
−
∀
(3)
∈
with X(0) = U and θ(l)
Θ the learnable parameters of each layer. The adjacency matrix defines the graph connec-
g
tivity and determines how information is aggregated at each layer, while the number of layers define the number of
hops away that a node gets information from. Note that the GCN is applied to each node in parallel and the resulting
embedding is by construction permutation invariant. We follow the GCN propagation rule as defined in [42, 8], with a
few (optional) modifications between each layer of the GCN as in [52]: (i) We include a nonlinearity after each layer,
(ii) we include skip connection inputs and (iii) we apply layer normalization [5] in the output of each layer.
R|V|×Dx is the final embedding of each node which will be used as input
The output of the final layer X = X(L)
to the next NN block of the model architecture. We use an LSTM network to capture the temporal evolution of (1).
The inputs to the LSTM at time t are the embedded nodes X as well as the previous network output hs,t−1, i.e.,
hs,t = h(hs,t−1, Xs,t−1; θh), with θh ∈
Θ the learnable parameters of the LSTM. The LSTM retains the permutation
invariance since it acts on the feature dimension. The network output at time t, i.e., hs,t, is appropriately projected
to the parameters of the selected probabilistic representation of each variable using a multilayer perceptron (MLP). In
general the projection has the following form:
∈
ψs,t,j = f (xs,t,j, hs,t; θf ),
(4)
Θ are the learnable MLP parameters and xs,t,j = [Xs,t]j are the embedded features of the j-th variable
where θf ∈
node that acts as a skip connection, while the constraint nodes are discarded. Note that the mapping layer can apply any
function in the feature dimension of hs,t but only symmetric functions across the node dimension. Here, ψ represents
a generic set of parameters for the binary variables that may differ based on the selected model output. If (1) includes
continuous variables the model outputs their values and not a distribution, i.e., ψs,t =
. In particular,
we leverage two MLPs to project the output of the LSTM to the estimates of binary and continuous variables (for a
discussion about the prediction of continuous variables please see Appendix D). The probabilistic representation of
binary variables becomes concrete in Sec. 3.3.
s,t ), ˆz(c)
s,t}
p(z(b)
{
3.3 Training
A common characteristic of MILP applications is the difficulty in obtaining labels. Specifically, to obtain one label,
one has to solve an instance of the MILP, which depending on the use case may take from minutes to hours or even
days. It is therefore of high interest for the generality of MIPnet to be able to train with a semi-supervised loss,
exploiting labeled data and benefiting from unlabeled data.
Supervised Setting. For the instances that have available labels (optimal solutions) we can train the model with an
MLE approach. A natural choice for a probabilistic representation of binary variables is the Bernoulli distribution
Ber(z; π) [52, 60], where π is the Bernoulli parameter. Given a Bernoulli representation of a binary variable it is
straightforward to assign a value to the variable, but hard to quantify how accurate or confident this prediction is (see
Appendix E for a discussion). A different approach was proposed in [52] that used the SelectiveNet [32] and learned
4
Benidis et al.
Loss
(cid:96)s,t−1
(cid:96)s,t
(cid:96)s,t+1
Projection
LSTM
GCN
ψs,t−1 = {p(z(b)
s,t−1), ˆz(c)
s,t−1}
hs,t−1
Xs,t−1; A(adj)
s,t−1
Features
Us,t−1
Input
φs,t−1
ψs,t = {p(z(b)
s,t), ˆz(c)
s,t}
ψs,t+1 = {p(z(b)
s,t+1), ˆz(c)
s,t+1}
hs,t
Xs,t; A(adj)
s,t
Us,t
φs,t
hs,t+1
Xs,t+1; A(adj)
s,t+1
Us,t+1
φs,t+1
Figure 1: MIPnet – At each time step t, we construct the features Us,t of all nodes based on the MILP temporal
parameters, feed them into a GCN that produces the final embedding Xs,t. The embeddings are fed to an LSTM
whose output is projected to the set of parameters ψs,t and the corresponding loss (cid:96)s,t is computed.
two sets of binary variables. One set indicates if a variable is going to be selected and the other its binary value (to
be used if selected). Here, we introduce a principled way to define how accurate or confident is a prediction via its
own variance. We leverage this notion of variance and follow a Bayesian approach by using the Beta distribution
Beta(π; α, β) to model the Bernoulli parameters, where α and β are the parameters of the Beta distribution. This
approach can be readily used as a statistically principled selection method, and is a key advantage of our method.
(we ignore
Now, we elaborate on the model output (4). The model yields the Beta distribution parameters ψ =
the continuous variables and drop subscripts), and for each variable with optimal value z(cid:63) the likelihood is computed
as (cid:82) 1
0 Beta(π; α, β)Ber(z(cid:63); π)dπ, i.e., we need to integrate over all values of π. Unfortunately this integral does not
have a closed-form solution; yet, we can approximate it efficiently using a quadrature method (Monte-Carlo sampling
can be also used, but is not as efficient). We use the Clenshaw-Curtis quadrature method [15] where the function to
be integrated is evaluated at the K roots of a Chebyshev polynomial and the integral is approximated by a weighted
average of the integral's function I(π) = Beta(π; α, β)Ber(z(cid:63); π) in specific and predefined points
α, β
{
}
K/2
k=0, i.e.,
̄πk}
{
(cid:90) 1
Beta(π; α, β)Ber(z(cid:63); π)dπ =
(cid:90) 1
I(π)dπ
wT I( ̄π),
≈
0
RK/2+1 is independent of the function (precomputed) and I( ̄π) = [I( ̄π0), . . . , I( ̄πK/2)]T . For details of
where w
∈
the method we refer the reader to Appendix F.1. With the above formulation the negative log-likelihood (NLL) of all
the instances becomes:
0
(cid:96)sup(z(cid:63), ψ)
|S|
(cid:88)
|Ts|
(cid:88)
Dz(cid:88)
≈ −
s=1
t=1
j=1
log (cid:0)wT I( ̄πs,t,j)(cid:1) ,
(5)
where ψ =
αs,t, βs,t}
.
{
In Appendix F.2 we propose an additional regularization term, while in Appendix F.3 we describe a weighted version
of 5 for imbalanced labels.
Unsupervised Setting. Apart from (5) we consider an unsupervised loss that is optimized together and is essentially
the objective of (1) with a penalty term for the constraint violations:
(cid:96)unsup =
|S|
(cid:88)
|Ts|
(cid:88)
s=1
t=1
cT
s,tˆzs,t + λc
(As,tˆzs,t −
(cid:107)
2,
bs,t)+ (cid:107)
(6)
(cid:17)
, where σ(
(cid:16) α
α+β
0 and (x)+ = max(x, 0). Here, ˆzs,t represents a prediction based on the learned Beta distribution that is
where λc
≥
α+β is the mean of Beta. Applying the sigmoid
computed as ˆz = σ
to the mean gives values close to the limits that we use as a proxy for the true binary since exact rounding would block
the gradient flow. Further, in the unsupervised loss we include the continuous variables that are directly given by the
where αs,t, βs,t ∈
network output (4), i.e., ψs,t =
The unsupervised loss, as explained earlier, allow us to work with instances for which labels are hard to obtain and,
at the same time, provides the means to learn the impact of erroneous predictions (with per-variable granularity) on
) is the sigmoid function and α
*
αs,t, βs,t, ˆz(c)
s,t}
{
and ˆz(c)
s,t ∈
RD(b)
RD(c)
.
z
z
5
the objective function and constraint violation. This, in turn, is proved an effective practical control for mitigating the
effect of the (few) miss-predictions that MIPnet yields. Note also that the continuous variables are optimized jointly
with the binary through this loss.
Putting the above together, the overall loss is given by
(cid:96) = (cid:96)sup + λ(cid:96)unsup,
(7)
with λ
unsupervised loss. Fig. 1 summarizes the architecture.
≥
0. Note that if a label is not available, the supervised loss of that instance is masked and we compute only the
3.4
Inference and Variable Selection
Our prediction problem is very challenging since it can return an infeasible solution even if it mispredicts only few
variables. Hence, instead of targeting an all-or-nothing solution (as in [11], see Table 4), we apply a variable selection
method where we generate a recommended assignment for each variable associated with a notion of confidence. By
fixing the value of high-confidence variables and calling an MILP solver on the reduced problem, we speed up the
discovery of high-quality solutions, as shown also in [19, 52, 11, 61]. Differently to these works however, we take a
formal Bayesian approach into this variable selection problem, which additionally, does not require retraining.
z
z
∈
RD(c)
RD(b)
and ˆz(c)
the model outputs the parameters ψ(cid:48) =
Given a trained model and a new instance φ(cid:48) =
c, A, b
with
{
}
. For each of the D(b)
α, β
z binary variables we compute the mean and the standard deviation
∈
of its Beta distribution, given by μj = αj
(αj +βj )(αj +βj +1) . Since a confident output has mean
and σj =
αj+βj
, and we
close to 0 or 1 and low variance, we define the score sj = min(μj, 1
select a desired percentage ρ of the variables with the lowest score. Parameter γ
0 is tuned on a validation set.
For a given set of selected variables, we fix their values rounding their mean, and optimize the remaining binary and
continuous variables.Following this approach we solve the remaining problem only once, although one has the option
to take multiple samples from the learned distribution, solve the remaining problems multiple times and keep the best
solution [52].
μj) + γσj, for j = 1, . . . , D(b)
α, β, ˆz(c)
{
αj βj
(cid:113)
−
≥
}
z
4 Experiments
We evaluate MIPnet using carefully-selected problems and datasets, as detailed in Appendix G. For the routing prob-
lem we used the dataset Geant [53] collecting real-world temporal traffic data from Internet Service Providers; for the
facility-loc we used the real-world topology from the nobel-germany dataset [53]; and for the caching problem
we used actual requests from the MovieLens datasets [24]. We generated synthetic data for the tsp, energy-grid
and revenue-max problems. We ran every experiment 3 times in order to evaluate model variance. Appendices H
and I include evaluation details and additional experiments, respectively.
4.1 Evaluating Accuracy & Feasibility
We assess the accuracy, optimality and feasibility of MIPnet against various state of the art methods. Namely, we
compare our results with Neural Diving (N-div) [52], a GCN model that selects variables using the SelectiveNet
approach [32]; the method proposed in [11], an approach that learns a classifier from problem parameters to complete
solutions (based on the unique solutions appeared in the training set); and a variant of our model trained only with
supervised loss, MIPnet-sup, to evaluate the importance of the unsupervised loss component. As a further ablation,
we also evaluate our method when trained only with unsupervised loss which, however, did not achieve satisfactory
performance (see Appendix I). As a final method we use the MIP solver SCIP [58]. For all problems expect for
routing, SCIP finds an optimal solution for all instances within the 15-minutes time limit. On the other hand for
routing, SCIP finds an optimal solution for 99.73% of instances within the 60-minutes time limit, which highlights
the problem's complexity. These optimal solutions – and the suboptimal ones when optimals are not available – serve
as ground truth, and the results of all other methods are presented relative to them.
z binary variables, we fix the (cid:6)ρD(b)
For a problem with D(b)
(0, 1), and use a solver
z
for the exact optimization of the remaining subproblem, subject to MIPnet's assignments. Table 1 summarizes the
percentage of correct predictions on the assigned variables (accuracy) across all instances, while Table 2 presents
the percentage of infeasible instances. Table 3 compares the optimality gap of the different approaches, which is
computed using only the set of feasible solutions (denoted with
Nf ), and is defined as the average difference between
(cid:7) most-confident ones, where ρ
∈
6
Benidis et al.
Table 1: Accuracy (mean ± std)% of MIPnet vs. N-div. Bold indicates the best method (higher values are better).
ρ (%)
Method
routing
facility-loc
tsp
energy-grid
revenue-max
caching
30%
40%
50%
60%
70%
MIPnet
MIPnet-sup
N-div
MIPnet
MIPnet-sup
N-div
MIPnet
MIPnet-sup
N-div
MIPnet
MIPnet-sup
N-div
MIPnet
MIPnet-sup
N-div
97.60 ± 0.13
97.60 ± 0.04
84.40 ± 0.72
96.03 ± 0.13
96.01 ± 0.15
87.17 ± 3.68
94.46 ± 0.09
94.46 ± 0.11
89.34 ± 0.11
92.83 ± 0.08
93.15 ± 0.11
90.38 ± 2.55
91.25 ± 0.07
91.86 ± 0.09
90.30 ± 0.92
100.00 ± 0.00
99.88 ± 0.16
100.00 ± 0.00
100.00 ± 0.00
99.87 ± 0.16
99.98 ± 0.02
100.00 ± 0.00
99.79 ± 0.24
99.91 ± 0.03
99.98 ± 0.01
99.71 ± 0.29
99.91 ± 0.02
99.84 ± 0.05
99.41 ± 0.58
99.64 ± 0.06
98.12 ± 1.38
94.56 ± 1.73
93.43 ± 0.00
97.54 ± 1.73
93.97 ± 1.49
96.09 ± 1.76
96.97 ± 1.94
93.42 ± 1.40
95.02 ± 0.54
96.38 ± 2.05
92.96 ± 1.35
95.41 ± 2.61
95.72 ± 2.05
92.62 ± 1.19
93.93 ± 0.84
100.00 ± 0.00
99.97 ± 0.05
100.00± 0.00
100.00 ± 0.00
99.97 ± 0.04
99.20 ± 1.13
99.99± 0.00
99.94 ± 0.03
99.61 ± 0.53
99.96 ± 0.01
99.86 ± 0.13
99.96 ± 0.01
99.80 ± 0.01
99.74 ± 0.14
99.64 ± 0.11
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
Table 2: Infeasibility (mean ± std)% of MIPnet vs. N-div. Bold indicates the best method (lower values are better).
ρ (%)
Method
routing
facility-loc
tsp
energy-grid
revenue-max
caching
30%
40%
50%
60%
70%
MIPnet
MIPnet-sup
N-div
MIPnet
MIPnet-sup
N-div
MIPnet
MIPnet-sup
N-div
MIPnet
MIPnet-sup
N-div
MIPnet
MIPnet-sup
N-div
59.09 ± 3.31
61.27 ± 0.04
100.00 ± 0.00
99.97 ± 0.04
99.97 ± 0.04
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.02 ± 0.01
0.11 ± 0.04
7.82 ± 11.06
0.07 ± 0.05
1.03 ± 0.03
0.28 ± 0.40
0.24 ± 0.18
3.78 ± 0.75
5.19 ± 4.19
2.92 ± 3.47
10.83 ± 0.39
19.75 ± 12.90
0.09 ± 0.13
75.52 ± 38.37
31.22 ± 17.52
0.46 ± 0.58
80.79 ± 27.16
0.18± 0.26
2.83 ± 2.78
94.26 ± 8.12
76.14 ± 8.49
13.06 ± 7.82
99.8 ± 0.28
34.07 ± 46.62
48.90 ± 17.19
100.00 ± 0.00
48.23 ± 36.64
0.00 ± 0.00
0.02 ± 0.03
0.00 ± 0.00
0.00 ± 0.00
0.02 ± 0.03
0.00 ± 0.00
0.00 ± 0.00
0.09 ± 0.08
0.09 ± 0.08
0.04 ± 0.03
0.09 ± 0.08
0.04 ± 0.03
0.02 ± 0.03
0.11 ± 0.11
0.04 ± 0.06
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
a method's objective (obj) and SCIP's optimal value (obj∗), i.e., opt_gap = 1
|Nf |
the experiments for different ρ values.4
(cid:80)
obj∈Nf
(obj
−
obj∗). We repeat
We observe that MIPnet matches or outperforms N-div in almost all cases, while it exhibits more consistent be-
haviour across runs. Compared to MIPnet-sup, it is either on par or better, especially in feasibility. A notable ob-
servation is that accuracy itself is not adequate to validate the performance of a model. For example, in the routing
and tsp datasets we observe that accuracy values well-above 90% can lead to (almost) 100% infeasibility; while
in facility-loc accuracy values > 99% can yield a significant portion of infeasible instances – especially for
MIPnet-sup and N-div. This is associated with the complexity of the constraints and highlights the importance of
using an unsupervised component in model training.
Since [11] is an approach that selects a complete solution, i.e., there is no option for selecting ρ% of variables,
we present the results of this method separately. As shown in Table 4, this all-or-nothing approach learns feasible
solutions for tsp, facility-loc, and caching (no variance was observed across runs).
In these problems the
constraints are time-invariant (do not change across instances). Hence, optimal solutions from the training dataset
are feasible for the test dataset, and indeed we see that [11] finds feasible solutions. Alas, these are often far from
optimal, e.g., for tsp and caching the average gap is 19.61% and 52.49%, respectively. On the other hand, for
revenue-max where the constraints change across instances, optimal solutions from the training dataset are infeasible
for new problem instances and the method returns infeasible variable assignments. That is, this approach does not
generalize to solutions not seen in the training dataset. Finally, we highlight that we were able to run the approach
from [11] only on a smaller version of the routing dataset, which alludes to potential implementation difficulties of
this approach – see Appendix I.
4In MIPnet, we can decide a different portion of assigned variables without model retraining. This stands in stark contrast to
N-div where the variable selection percentage is predefined.
7
Table 3: Optimality gap (mean ± std)% of MIPnet vs. N-div. Bold indicates the best method (lower values are better).
ρ (%)
Method
routing
facility-loc
tsp
energy-grid
revenue-max
caching
30%
40%
50%
60%
70%
MIPnet
MIPnet-sup
N-div
MIPnet
MIPnet-sup
N-div
MIPnet
MIPnet-sup
N-div
MIPnet
MIPnet-sup
N-div
MIPnet
MIPnet-sup
N-div
6.59 ± 0.15
6.03 ± 0.63
-
6.27 ± 0.00
27.59 ± 0.00
-
-
-
-
-
-
-
-
-
-
0.07 ± 0.01
0.04 ± 0.05
0.28 ± 0.23
0.16 ± 0.01
0.20 ± 0.10
0.44 ± 0.35
0.34 ± 0.03
0.72 ± 0.42
3.55 ± 4.88
0.73 ± 0.10
2.15 ± 1.72
1.22 ± 0.55
2.66 ± 0.72
5.80 ± 5.04
5.83 ± 1.97
0.24 ± 0.02
2.38 ± 0.00
0.25 ± 0.04
0.37 ± 0.07
4.20 ± 0.00
0.26 ± 0.04
0.74 ± 0.19
6.05 ± 0.00
5.70 ± 0.63
1.49 ± 0.30
4.18 ± 0.00
0.48 ± 0.01
2.08 ± 0.17
-
1.79 ± 0.21
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.08 ± 0.04
0.00 ± 0.00
0.00 ± 0.00
8.81 ± 12.45
0.00 ± 0.00
0.01 ± 0.01
0.01 ± 0.00
0.01 ± 0.00
0.01 ± 0.01
0.04 ± 0.03
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
Table 4: Accuracy, infeasibility and optimality gap of [11].
Accuracy
Infeasibility
Optimality gap
routing
facility-loc
tsp
revenue-max
caching
-
98.13
86.29
99.22
99.91
-
0.00
0.00
100.00
0.00
-
1.78
19.61
-
52.49
4.2 Evaluating the Temporal Component of MIPnet
In this section we explore the benefit of leveraging the temporal aspect of the problem instances. Figure 2 illustrates
the differences in accuracy and infeasibility when MIPnet employs an MLP instead of an LSTM, for three problems
with different temporal properties. Namely, the real-world demands in routing follow a diurnal pattern; the de-
mands in facility-loc have a strong time-dimension; while the edge costs in tsp are generated by adding random
perturbations in successive instances.
We observe that the LSTM-based MIPnet outperforms consistently, and most-often substantially, its MLP-based ver-
In other words, all else being equal in the model and inference
sion both in terms of mean and variance values.
approach, the addition of LSTM has substantial gains, without requiring any compromises (MLP never outperforms
LSTM). This finding underlines the importance of leveraging the temporal evolution pattern of the problem parame-
ters, a hitherto overlooked aspect in all prior works.
4.3 Trading Off Accuracy and Solution Speed via ρ
Finally, we explore how the percentage of assigned variables ρ, affects the solution time. These experiments reveal
also the gains of MIPnet in terms of solution speed, compared to off-the-shelf solvers. In detail, we denote with tp the
ρ is the percentage of variables that
time the SCIP solver requires for solving the optimization problem, where p = 1
are not assigned by MIPnet (hence, need to be optimized by the solver). Figure 3 reports the normalized time defined
as the ration tp/t100, i.e., the ratio between the solver (SCIP) time when ρ variables are assigned using MIPnet, and
the time for solving the entire problem with SCIP.5 As expected, the time decreases when a higher percentage of
variables is assigned. For all problems an average of, at least, 2
speedup is obtained by setting ρ = 0.7, while for
revenue-max, energy-grid, and caching we achieve a 2x speedup already for ρ = 0.3, i.e., when assigning only
30% of the variables, and a maximum 5
speed up. These experiments manifest the solution speed gains of MIPnet
compared to a solver, and the importance of our variable selection threshold which indeed can be used to trade off
accuracy with solution speed.
×
−
×
5 Conclusions
Solving MIPs via ML methods can revolutionize the solution of large-scale NP-hard problems and avail MIP to new
application domains. This potential is hampered by unprecedented challenges: the values of variables are inherently
correlated and need to be jointly predicted; even tiny value assignment errors may lead to infeasibility or unbounded
5These times are calibrated in order to account for the different computational environments we have used in the experiments.
8
Benidis et al.
(a) routing
(b) facility-loc
(c) tsp
Figure 2: Comparison of MIPnet w\ and w\o a temporal component.
Figure 3: Calibrated running time for various ρ values. tp is the solution time when a percentage ρ of variables is
assigned by MIPnet and p = 1
ρ variables are assigned by the solver. t100 is the time when using only the solver.
−
suboptimality; training data are not readily available; and generalizing trained models is highly non-trivial. In this
work, we propose MIPnet, a systematic framework for tackling general binary MILPs that may exhibit temporal
structure, which: employs GCNs to automate embeddings and capture correlation among variables; uses an LSTM
to account for, hitherto-overlooked, time dependencies across problem instances (a regularly-encountered operational
condition); and includes a principled Bayesian assignment strategy with user-tunable confidence. We follow a semi-
supervised approach so as to account for the lack of solved instances, a practical limitation when dealing with NP-hard
problems, and in order, also, to identify key variables impacting feasibility and optimality. Our work fills (some of)
the gaps in the literature and, we believe, contributes towards establishing ML as an off-the-shelf MIP technology,
including for non-binary and nonlinear problems that were not addressed by the proposed approach.
9
References
[1] A. H. Land, and A. G. Doig. An Automatic Method of Solving Discrete Programming Problems. Econometrica,
28(3):497–520, 1960.
[2] A. M. Alvarez. A Machine Learning-based Approximation of Strong Branching. INFORMS Journal on Com-
puting, 29(1):185–195, 2017.
[3] Akshay Agrawal, Brandon Amos, Shane Barratt, Stephen Boyd, Steven Diamond, and J Zico Kolter. Differen-
tiable convex optimization layers. Advances in Neural Information Processing Systems (NeurIPS), 2019.
[4] Carlos Ansótegui, Yuri Malitsky, Horst Samulowitz, Meinolf Sellmann, and Kevin Tierney. Model-based genetic
In Twenty-Fourth International Joint Conference on Artificial Intelli-
algorithms for algorithm configuration.
gence, 2015.
[5] Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton.
Layer normalization.
arXiv preprint
arXiv:1607.06450, 2016.
[6] Maria-Florina Balcan, Travis Dick, Tuomas Sandholm, and Ellen Vitercik. Learning to branch. In International
Conference on Machine Learning (ICML), pages 344–353, 2018.
[7] Maria-Florina F Balcan, Siddharth Prasad, Tuomas Sandholm, and Ellen Vitercik. Sample complexity of
tree search configuration: Cutting planes and beyond. Advances in Neural Information Processing Systems
(NeurIPS), 2021.
[8] Peter W Battaglia, Jessica B Hamrick, Victor Bapst, Alvaro Sanchez-Gonzalez, Vinicius Zambaldi, Mateusz
Malinowski, Andrea Tacchetti, David Raposo, Adam Santoro, Ryan Faulkner, et al. Relational inductive biases,
deep learning, and graph networks. arXiv preprint arXiv:1806.01261, 2018.
[9] Yoshua Bengio, Andrea Lodi, and Antoine Prouvost. Machine learning for combinatorial optimization: a
methodological tour d'horizon. European Journal of Operational Research, 290(2):405–421, 2021.
[10] Dimitris Bertsimas and Bartolomeo Stellato. Online Mixed-integer Optimization in Milliseconds. arXiv preprint
arXiv:1907.02206, 2019.
[11] Dimitris Bertsimas and Bartolomeo Stellato. The Voice of Optimization. Machine Learning, 110(2):249–277,
2021.
[12] Pierre Bonami, Andrea Lodi, and Giulia Zarpellon. Learning a classification of mixed-integer quadratic pro-
gramming problems. In International Conference on the Integration of Constraint Programming, Artificial In-
telligence, and Operations Research, pages 595–604. Springer, 2018.
[13] Francesco Borrelli, Alberto Bemporad, and Manfred Morari. Predictive control for linear and hybrid systems.
Cambridge University Press, 2017.
[14] Zhi-Long Chen. Integrated production and outbound distribution scheduling: review and extensions. Operations
research, 58(1):130–148, 2010.
[15] Charles W Clenshaw and Alan R Curtis. A method for numerical integration on an automatic computer. Nu-
merische Mathematik, 2(1):197–205, 1960.
[16] Hanjun Dai, Bo Dai, and Le Song. Discriminative embeddings of latent variable models for structured data. In
International conference on machine learning, pages 2702–2711, 2016.
[17] Bistra Dilkina, Carla P Gomes, Yuri Malitsky, Ashish Sabharwal, and Meinolf Sellmann. Backdoors to com-
In International Conference on Integration of Constraint
binatorial optimization: Feasibility and optimality.
Programming, Artificial Intelligence, and Operations Research, pages 56–70. Springer, 2009.
[18] Bistra Dilkina, Carla P Gomes, and Ashish Sabharwal. Backdoors in the context of learning. In International
Conference on Theory and Applications of Satisfiability Testing, pages 73–79. Springer, 2009.
[19] Jian-Ya Ding, Chao Zhang, Lei Shen, Shengyin Li, Bing Wang, Yinghui Xu, and Le Song. Accelerating pri-
In Proceedings of the AAAI
mal solution findings for mixed integer programs based on solution prediction.
Conference on Artificial Intelligence, volume 34, pages 1452–1459, 2020.
[20] E. B. Khalil, B. Dilkina, G. L. Nemhauser, S. Ahmed, and Y. Shao. Learning to Run Heuristics in Tree Search.
In International Joint Conference on Artificial Intelligence (IJCAI), 2017.
[21] E. B. Khalil, et al. Learning to Branch in Mixed Integer Programming. In Proceedings of the AAAI conference
on artificial intelligence, page 724–731, 2016.
[22] F. Hutter, et al. ParamILS: An Automatic Algorithm Configuration Framework. Journal of Artificial Intelligence
Research, 36(1), 2009.
10
Benidis et al.
[23] F. Hutter, et al. Sequential Model-based Optimization for General Algorithm Configuration. Learning and
intelligent optimization, pages 507–523, 2011.
[24] F. M. Harper, and J. A. Konstan. The MovieLens Datasets: History and Context. ACM Transactions on Interac-
tive Intelligent Systems, 5:19:1–19:2, 2015.
[25] R. Z. Farahani and M. Hekmatfar. Facility Location: Concepts, Models, Algorithms and Case Studies. Springer,
2009.
[26] Nuno P. Faísca, Vivek Dua, and Efstratios N. Pistikopoulos. Multiparametric Linear and Quadratic Program-
ming, chapter 1, pages 1–23. John Wiley & Sons, Ltd, 2007. ISBN 9783527631216. doi: https://doi.org/10.1002/
9783527631216.ch1. URL https://onlinelibrary.wiley.com/doi/abs/10.1002/9783527631216.
ch1.
[27] G. Barlacchi, et al. A Multi-source Dataset of Urban Life in the City of Milan and the Province of Trentino.
Scientific Data, 2, 2015.
[28] G. Laporte. Fifty Years of Vehicle Routing. Transportation Science, pages 408–416, 2009.
[29] G. S. Paschos, et al. Cache Optimization Models and Algorithms. Found. Trends Commun. Inf. Theory, 16(3-4):
156–343, 2019.
[30] G. Vivek, K. Srikumar, and D. Roth. On amortizing inference cost for structured prediction. Joint Conference
on Empirical Methods in Natural Language Processing and Computational Natural Language Learning, pages
1114–1124, 2012.
[31] Maxime Gasse, Didier Chételat, Nicola Ferroni, Laurent Charlin, and Andrea Lodi. Exact combinatorial op-
timization with graph convolutional neural networks. Advances in Neural Information Processing Systems
(NeurIPS), 2019.
[32] Yonatan Geifman and Ran El-Yaniv. Selectivenet: A deep neural network with an integrated reject option. In
International Conference on Machine Learning (ICML), pages 2151–2159, 2019.
[33] Ambros Gleixner, Gregor Hendel, Gerald Gamrath, Tobias Achterberg, Michael Bastubbe, Timo Berthold,
Philipp M. Christophel, Kati Jarck, Thorsten Koch, Jeff Linderoth, Marco Lübbecke, Hans D. Mittelmann,
Derya Ozyurt, Ted K. Ralphs, Domenico Salvagnin, and Yuji Shinano. MIPLIB 2017: Data-Driven Compi-
lation of the 6th Mixed-Integer Programming Library. Mathematical Programming Computation, 2021. doi:
10.1007/s12532-020-00194-3. URL https://doi.org/10.1007/s12532-020-00194-3.
[34] B. Gopalakrishnan and E. L. Johnson. Airline Crew Scheduling: State-of-the-Art. Annals of Operations Re-
search, 140(1):305–337, 2005.
[35] Christoph Hansknecht, Imke Joormann, and Sebastian Stiller. Cuts, primal heuristics, and learning to branch for
the time-dependent traveling salesman problem. arXiv preprint arXiv:1805.01415, 2018.
[36] He He, Hal Daume III, and Jason M Eisner. Learning to search in branch and bound algorithms. Advances in
Neural Information Processing Systems (NeurIPS), 2014.
[37] I. Boussaıd, et al. A Survey on Optimization Metaheuristics. Information Sciences, 237:82–117, 2013.
[38] J. Song, R. Lanka, A. Zhao, Y. Yue, and M. Ono. Learning to Search via Retrospective Imitation.
In
arXiv:1804.00846, 2018.
[39] Nikolaos Karalias and Andres Loukas. Erdos goes neural: an unsupervised learning framework for combinatorial
optimization on graphs. In Proceedings of NeurIPS, 2020.
[40] Elias Khalil, Hanjun Dai, Yuyu Zhang, Bistra Dilkina, and Le Song. Learning combinatorial optimization algo-
rithms over graphs. Advances in Neural Information Processing Systems (NeurIPS), 2017.
[41] Minsu Kim, Jinkyoo Park, et al. Learning collaborative policies to solve np-hard routing problems. Advances in
Neural Information Processing Systems (NeurIPS), 2021.
[42] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv
preprint arXiv:1609.02907, 2016.
[43] Martin Klauˇco, Martin Kalúz, and Michal Kvasnica. Machine learning-based warm starting of active set methods
in embedded model predictive control. Engineering Applications of Artificial Intelligence, 77:1–8, 2019.
[44] Robert Kleinberg, Kevin Leyton-Brown, Brendan Lucier, and Devon Graham. Procrastinating with confidence:
Near-optimal, anytime, adaptive algorithm configuration. Advances in Neural Information Processing Systems
(NeurIPS), 2019.
11
[45] Markus Kruber, Marco E Lübbecke, and Axel Parmentier. Learning when to use a decomposition. In Interna-
tional conference on AI and OR techniques in constraint programming for combinatorial optimization problems,
pages 202–210. Springer, 2017.
[46] Alex Kulesza and Fernando Pereira. Structured learning with approximate inference. Advances in Neural Infor-
mation Processing Systems (NeurIPS), 2007.
[47] Anukool Lakhina, Konstantina Papagiannaki, Mark Crovella, Christophe Diot, Eric D. Kolaczyk, and Nina Taft.
Structural analysis of network traffic flows. In Proceedings of ACM Sigmetrics, 2004.
[48] Cong Leng, Zesheng Dou, Hao Li, Shenghuo Zhu, and Rong Jin. Extremely low bit neural network: Squeeze
the last bit out with ADMM. In Proceedings of the AAAI Conference on Artificial Intelligence, 2018.
[49] M. C. Gonzalez, et al. Understanding Individual Human Mobility Patterns. Nature, 453:779–782, 2008.
[50] M. Lopez-Ibanez, et al. The Irace Package: Iterated Racing for Automatic Algorithm Configuration. Operations
Research Perspectives, pages 43–58, 2016.
[51] Sidhant Misra, Line Roald, and Yeesian Ng. Learning for constrained optimization: Identifying optimal active
constraint sets. INFORMS Journal on Computing, 34(1):463–480, 2022.
[52] Vinod Nair, Sergey Bartunov, Felix Gimeno, Ingrid von Glehn, Pawel Lichocki, Ivan Lobov, Brendan
O'Donoghue, Nicolas Sonnerat, Christian Tjandraatmadja, Pengming Wang, et al. Solving mixed integer pro-
grams using neural networks. arXiv preprint arXiv:2012.13349, 2020.
[53] S. Orlowski, M. Pióro, A. Tomaszewski, and R. Wessäly. SNDlib 1.0–Survivable Network Design Library.
In Proceedings of the 3rd International Network Optimization Conference (INOC 2007), Spa, Belgium, April .
http://sndlib.zib.de, extended version accepted in Networks, 2009.
[54] R. E. Bixby. A Brief History of Linear and Mixed-Integer Programming Compucation. Documenta Mathematica,
pages 107–121, 2010.
[55] S. Chopra, I. Gilboa, and S. T. Sastry. Source Sink Flows with Capacity Installation in Batches. Discrete Applied
Mathematics, 85:165–192, 1998.
[56] S. Hochreiter, et al. Long short-term memory. Neural Computation, 9(8):1735–1780, 1997.
[57] Jialin Song, Yisong Yue, Bistra Dilkina, et al. A general large neighborhood search framework for solving integer
linear programs. Advances in Neural Information Processing Systems (NeurIPS), 2020.
[58] T. Achterberg. SCIP: Solving Constraint Integer Programs. Mathematical Programming Computation, 1:1–41,
2009.
[59] David Williamson and David Shmoys. The Design of Approximation Algorithms. Cambridge University Press,
2011.
[60] Yaoxin Wu, Wen Song, Zhiguang Cao, and Jie Zhang. Learning large neighborhood search policy for integer
programming. Advances in Neural Information Processing Systems (NeurIPS), 2021.
[61] Alinson S Xavier, Feng Qiu, and Shabbir Ahmed. Learning to solve large-scale security-constrained unit com-
mitment problems. INFORMS Journal on Computing, 33(2):739–756, 2021.
[62] Y. Pochet, and L. A. Wolsey. Production Planning by Mixed Integer Programming.
Springer Science and
Business Media, 2006.
12
Benidis et al.
Appendix
A Notation
Supplementary Materials
Matrices, vectors and scalars are denoted by uppercase bold, lowercase bold and lowercase normal letters, i.e., X, x
and x, respectively. The set of D-dimensional real numbers is defined by RD. x
ZD denote vectors of
real and integer variables with dimension D. [x; z] and [x, z] indicates column and row concatenation, respectively.
XT denotes the transpose of matrix X and [X]j its j-th row. ID and 0D denote the D-dimensional identity and zero
matrix, respectively. The number of variables is denoted as Dz and the number of constraints as Dc. We use a hat
to indicate a variable prediction, e.g., ˆz. We use the subscript j as a variable index and i as a constraint index. We
use uppercase calligraphic and Greek letters to define sets. We denote by
a set of time series (indexed by s) and
the set of timesteps of time series s (indexed by t). φ represents the set of parameters of an
by
optimization problem and Θ the set of parameters of a NN. The symbol 1condition denotes the indicator function with
value 1 if condition is true and 0 otherwise. KL (p
q) denotes the KL-divergence of distributions p and q.
RD and z
Ts =
|Ts|}
1, . . . ,
∈
∈
S
{
||
B Parameter Normalization & Distribution Shift
As mentioned in Section 3, the parameter normalization (see Eq. (2)) makes our model scale invariant, i.e., our trained
model can be applied to new instances where the magnitudes of the constraint matrix and cost vector are entirely
different from what was seen during training. More importantly, our trained model can also be used in solving MIP
problems whose sizes (i.e., length of the cost vector Dz) are different from that of training instances. However, during
test time, if the problem size grows (or shrinks), the parameters will become smaller (or larger), causing a distribution
shift.
The distribution shift is caused since in training time with the normalization given in (2) (with p = 2) the parameters
aij and bi are proportional to
, whereas at test time these would be proportional
to
, respectively. This can be rectified by a further rescaling of parameters during test time.
1√
Dz+1 , and cj is proportional to
and
1√
Dz
1
√ ̄Dz+1
1
√ ̄Dz
More precisely, given a model that is trained on instances of size Dz and applied on test instances of size ̄Dz, we
normalize the test instance's parameters as
(cid:115)
ai,j =
̄Dz + 1
Dz + 1
ai,j
i ; bi]
2
(cid:107)
[aT
(cid:107)
,
(cid:115)
bi =
̄Dz + 1
Dz + 1
bi
i ; bi]
(cid:107)
[aT
(cid:107)
,
2
(cid:115)
cj =
̄Dz
Dz
cj
c
(cid:107)
(cid:107)
.
2
(8)
This reduces to Eq. (2) (with p = 2), if ̄Dz = Dz. With this normalization, the parameters (ai,j, bi) and cj during test
time are also proportional to
respectively.
1√
1√
Dz+1 and
Dz
Given this normalization, our model can also be trained on MIP instances of different sizes. We just need to fix one
size Dz as the reference size and for every instance of different size ̄Dz, the parameters would have a further rescaling
as in (8).
C Graph Features
R|V|×Du , which is
An integral part of MIPnet is the creation of the features of each node that form the matrix U
fed into the GCN (see Eq. (3)), where Du is the feature dimension. We differentiate the feature construction between
variable and constraint nodes.
∈
The set of parameters that the j-th variable is associated with are: (i) its cost in the objective cj, (ii) all its parameters
in the constraint matrix A, i.e., aj = [AT ]j and (iii) the right-hand side of the constraints b. Usually the constraint
matrix A is sparse, especially for large problems, which means that each variable participates in only a small subset
of the constraints. We leverage this observation and we include as relevant features only the subset of constraints that
= 0. In particular, we calculate
each variable is included, i.e., for the j-th variable we include the constraint i if ai,j (cid:54)
the maximum number of constraints that any variable appears, mc, and we keep that many constraint parameters for
all variables (so all the feature dimensions are consistent).6
6The maximum number of constraints per variable mc is calculated across the whole dataset. This number can vary in different
datasets but this does not affect the model since no operation is done across this dimension.
13
Now, for the j-th variable we construct mc triplets (ai,j, bi, cj), where i
in less that mc constraints, i.e., if
|Ij|
target feature dimension Du using an MLP with parameters learned jointly across all variables:
< mc, then we include mc − |Ij|
. If a variable is included
zero triplets. Each triplet is mapped to the
∈ Ij =
= 0
}
ai,j (cid:54)
i
|
{
W(var-map),
Vj = f (var-map)(aIj ,j, bIj , cj) =
cj
...
cj
R3×Du is the learnable weight matrix of the MLP and Vj ∈
where W(var-map)
all rows using a symmetric function (e.g., average):
u(var)
j = f (var-agg)(Vj),
ai1,j
...
aimc ,j
bi1
...
bimc
∈
j
RDu . Note that u(var)
where u(var)
for the variable nodes is constructed by concatenating all the feature vectors u(var)
RDz×Du .
∈
j
j
Rmc×Du . Finally, we aggregate over
(9)
, i.e., U(var) = [u(var)
1
, . . . , u(var)
Dz ]
∈
is variable and constraint permutation invariant. The complete feature matrix
The features of the constraints are constructed in a similar manner. The set of parameters that the i-th constraint is
associated with are: (i) all its parameters in the constraint matrix A, i.e., ai = [A]i (ii) the right-hand side of the
constraint bi and (iii) the costs in the objective c for the variables in the constraint. As in the variable nodes, we
leverage the sparsity of A and find the maximum number of variables in all the constraints, mv. Now, for the i-th
constraint we create mv triplets (ai,j, bi, cj), where j
. The triplets are projected to the target
= 0
∈ Ji =
}
dimension Du and then aggregated in the same way as the variable features:
j : ai,j (cid:54)
{
Ci = f (con-map)(ai,Ji, bi, cJi) =
ai,j1
bi
...
...
ai,jmv
bi
= f (con-agg)(Ci),
W(con-map),
cj1
...
cjmv
∈
u(con)
i
R3×Du is the learnable weight matrix of the MLP, Ci ∈
, i.e., U(con) = [u(con)
RDu . Note
is variable and constraint permutation invariant. The complete feature matrix for the constraint nodes is
where W(con-map)
that u(con)
i
constructed by concatenating all the feature vectors u(con)
It is possible to differentiate between the equality and inequality constraints and treat them separately. In that case,
a different set of triplets is constructed for each constraint and a different MLP can be used to map the triplets to the
feature dimension.
Rmv×Du and u(con)
, . . . , u(con)
Dc
RDc×Du .
∈
∈
1
]
i
i
The final feature matrix U is:
D MLP for Continuous Variables
U =
(cid:21)
(cid:20)U(var)
U(con)
∈
R|V|×Du .
(10)
Given an assignment of integer variables, we can re-write the MILP (1) as the following parametric linear program:
V (z(b)) = minimize
z
(c(b))T z(b) + (c(c))T z(c)
subject to A(b)z(c)
b
≤
−
A(b)z(b).
(11)
where z = [z(b); z(c)], A = [A(b), A(c)], and c = [c(b), c(c)]. The above function V : RDz
R is a piecewise
convex function [26, 13], and therefore it can be approximated by an MLP with ReLU activation units. This fact
motivated us to use an MLP to map the embedding from the GCN to the continuous variables. Notice that also a
convex layer [3] can be used to approximate optimization programs. However, training convex layers is expensive as it
requires to differentiate through the optimization program and in our testing it significantly increased the time needed
for training. For this reason, we opted to use an MLP instead.
→
E On the Bernoulli and Beta Distributions
The goal of our model is to learn the value of each binary variable as well as measure how reliable is each prediction.
A natural approach to assess how reliable or risky is a decision is via the variance. Recall that a Bernoulli distribution,
14
Benidis et al.
π). Thus, for a given mean, the variance is completely defined
defined as Ber(π), has a mean π and variance π(1
and fixed, i.e., we cannot have different variance values for a given mean value. This essentially renders the variance
uninformative (given the mean) for the purpose of assessing how reliable is a binary variable prediction. On the other
hand, in the Beta distribution a fixed mean does not correspond to a fixed variance value and therefore can be used
(along with the mean) as a measure to select trustworthy variables. For example, when selecting the ρ% most reliable
variable predictions, one might prefer to include a variable with mean 0.2 and small variance (and fix it to the integer
value 0) than a variable with mean 0.1 and very large variance, which indicates that the model has low confidence on
that particular prediction although its mean is closer to 0.
−
F Training
F.1 Clenshaw-Curtis Quadrature
The Clenshaw-Curtis quadrature [15] is a method for numerical integration that is based on the expansion of the
integrand in terms of Chebyshev polynomials, where the function f (x) to be integrated over the fixed interval [
1, 1]
is evaluated at the K roots of a Chebyshev polynomial. Then, the integral can be approximated as:
(cid:90) 1
−
f (x)dx
≈
−1
w(cid:62)y,
where
are the quadrature weights, with d
zero-based indexing) is given by
∈
RK/2+1 and D
∈
w = D(cid:62)d,
(13)
R(K/2+1)×(K/2+1). In particular, the k-th element of d (with
1,
2/(1
1/(1
while the (m, k)-th element of D is defined as
dk =
(2k)2),
K 2),
−
−
k = 0,
k = 1, . . . , K/2
k = K/2,
1,
−
(14)
Dmk =
cos
2
K
(cid:19)
(cid:18) mkπ
K/2
(cid:26)1/2,
1,
k = 0, K/2,
otherwise.
×
Notice that both D and d are independent of the function f (x) and therefore can be precomputed in O(K log K). The
RK/2+1, where its k-th element, with k = 0, . . . , K/2, can
information of the function is encoded in the vector y
be computed as
∈
Finally, if the function needs to be integrated in the [0, 1] interval, we can apply the simple change of variable x(cid:48) =
2x
x = (x(cid:48) + 1)/2 and the new integral becomes
1
yk = f (cos(kπ/K)) + f (
cos(kπ/K)).
(16)
−
−
→
(cid:90) 1
−1
1
2
f ((x(cid:48) + 1)/2)dx(cid:48),
(17)
where we have also accounted for the Jacobian factor which is equal to 1/2. The integral in (17) has the right limits
and the Clenshaw-Curtis quadrature can be applied accordingly.
F.2 Regularization
Ideally, we would like the model to produce Beta distributions with mean close to 0.5 and high variance if it is not
confident. We propose the following regularization term to reinforce this behaviour:
(12)
(15)
r(α, β, z(cid:63)) =
(cid:90) 1
0
(cid:18)
z(cid:63)
Beta(π; α, β)
|
π
dπ
|
*
−
KL (U(0, 1)
Beta(π, α, β))
||
z(cid:63))
(cid:90) 1
0
Beta(π; α, β)πdπ + z(cid:63)
(cid:90) 1
0
Beta(π; α, β)(1
(cid:19)
π)dπ
−
=
(1
−
(cid:90) 1
0
×
(cid:18)
=
(1
(cid:18) (1
=
−
−
(cid:19)
(cid:18)
log
1
Beta(π; α, β)
+ z(cid:63) β
(cid:19)
z(cid:63))
α
α + β
z(cid:63))α + z(cid:63)β
α + β
α + β
dπ
(18)
(cid:19) (cid:18)
(cid:90) 1
log
−
0
(cid:18) πα−1(1
π)β−1
−
B(α, β)
(cid:19)
(cid:19)
dπ
(α
−
1 + β
−
1 + log (B(α, β))) ,
15
where Uni(0, 1) is the uniform distribution in the unit interval and B(α, β) the Beta function. The goal is to minimize
the KL-divergence between the learned Beta distribution and the Uniform only when a prediction is wrong. The term
(cid:82) 1
dπ evaluates how far is the distribution from the true label z(cid:63): if Beta is close to the label and
0 Beta(π; α, β)
|
has small variance (confident and correct) then this term is very small and the regularization becomes negligible. If
the distribution is far from the label, the KL divergence regularizes Beta towards Uniform (pushes its mean towards
0.5) and increases its variance.
z(cid:63)
−
π
|
The overall supervised loss is given by:
(cid:96)sup-reg = (cid:96)sup(z(cid:63), ψ =
αs,t, βs,t}
{
) + λregr(z(cid:63), ψ =
αs,t, βs,t}
{
),
(19)
where λreg
≥
0 is a regularization parameter.
F.3 Weighted Loss
It is common in classification tasks to include weights in the loss when the classes are imbalanced or to trade off
precision and recall.
Our problem can be interpreted as a classification task with 2D(b)
z classes, one for each possible binary sequence of
length D(b)
z , and each instance then belongs to a specific class. With this interpretation the number of classes explodes
very fast and no meaningful technique can be applied since the samples required to have a decent representation of
each class in unattainable (e.g., for D(b)
z = 100 and assuming an average of only 10 samples per class we would
require 2100
An interpretation that scales is to consider our problem as D(b)
classification tasks (one fore each variable) with 2
z
classes each (since we consider binary variables). With this approach, each instance is a combination of D(b)
classes.
z
Now, each classification task has as many samples as the number of instances, which are split in a different way among
the 2 classes.
107 samples).
10
≈
*
Note that the above interpretations do not change the mathematical formulation of the problem or the loss but the way
we think of the class weighting. Following the second approach, we can calculate the class representation percentage
rj of the j-th variable (i.e., each classification task) from the available instances (labels). For example, if in 80% of
the labels zj = 0 and in 20% of the labels zj = 1, then rj = 0.2. Then, the (supervised) loss in its generic form would
be:
(cid:96)(z(cid:63), φ) =
S
(cid:88)
T
(cid:88)
Dz(cid:88)
−
s=1
t=1
j=1
z(cid:63)
s,t,j
r
j
(1
log(
)
*
rj)1−z(cid:63)
−
s,t,j
.
(20)
The use (or not) of these weights for the computation of the supervised loss is a hyperparameter that is optimized for
each dataset.
G Datasets
We introduce the six types of problems which we employed in the evaluation of MIPnet. The results for the problems
from Tables 5 and 7 can be found in Section 4, and the results from problems from Tables 6 and 8 are discussed in
Section I.1 of the Appendix. These problems were selected in line with the evaluation studies in prior works, see
[52, 19, 11] and references therein; they appear regularly in different application domains and, furthermore, constitute
building blocks for a very wide range of optimization problems. In the sequel we describe the mathematical formula-
tion of each problem, denoted as Pt
and p = 1, . . . , 6, to indicate that each formulation corresponds to a
particular instance of the problem with time-varying parameters.78 We further identify the problems' complexity and
class (type of problem), and we map them to real-world applications. Finally, we provide details about the datasets
and instances we used in training, testing and validation – see also the summarized view in Tables 5–8.
p with t
∈ T
G.1 Multicommodity Network Design and Routing
We consider the joint unsplittable-routing and network design problem where the goal is to minimize the aggregate
routing cost by deciding how much capacity to purchase for each link and which path to select for each commodity.
7We have ignored the time series index s to avoid notational cluttering.
8For the problem formulations we have used t as a superscript in all the time-varying parameters (t is fixed per instance and it
just indicates that a specific parameter changes across instances), while all the subscripts are instance-dependent indices.
16
Benidis et al.
Table 5: Datasets problem sizes.
routing
facility-loc
# Integer variables
2812
1989
# Continuous variables
# Equality constraints
# Inequality constraints
Data
0
450
36
real
Fraction of non-zeros in A
0.0374
Fraction of non-zeros in b
1.0
Fraction of non-zeros in c
Fraction of non-zeros in z∗
0.579
0.0001
0
50
39
mixed
0.0226
0.5
0.9804
0.0278
energy-grid
revenue-max
caching
1000
30000
39942
tsp
144
500
36
0
1
4082
1010
0
0
20
0
0
1
synthetic
synthetic
synthetic
mixed
0.1414
0.8333
0.9996
0.0833
0.6723
0.9876
1.0
0.7375
0.50
1.0
1.0
0.0044
1.0
1.0
0.0187
0.0006
Table 6: Additional datasets problem sizes.
routing-sm
revenue-max-sm
# Integer variables
# Continuous variables
# Equality constraints
# Inequality constraints
Data
1044
0
390
36
real
Fraction of non-zeros in A
0.0333
Fraction of non-zeros in b
Fraction of non-zeros in c
Fraction of non-zeros in z∗
1.0
0.9169
0.4298
10000
0
0
10
synthetic
0.501
1.0
1.0
0.0166
Formally, the network is modeled by a graph
) and serves a set of
commodities with time varying demands
dt =
dt
k}k∈K, and predetermined sources and destinations. Specifically, our goal is to solve the following binary
{
problem:
k +
1 : minimize
vk,lpk,ldt
uiqe,i
= (
(cid:88)
(cid:88)
(cid:88)
(cid:88)
Pt
K
V
G
E
,
k
∀
e
∀
,
∈ K
,
∈ E
p,q
subject to
k∈K
(cid:88)
l∈Pk
e∈E
i∈I
pk,l = 1,
Problem Pt
∈ {
1 has the following binary variables:
p
0, 1
|K|, q
}
0, 1
∈ {
l∈Pk
(cid:88)
(cid:88)
k∈K
l∈Pk
ae,k,lpk,ldt
k ≤
(cid:88)
be +
ciqe,i,
i∈I
|E||I|.
}
• pk,l ∈ {
• qe,i ∈ {
: selection of path l for routing commodity k
0, 1
}
: installment of i-type capacity at edge e
0, 1
}
∈ E
,
∈ K
,
and the following parameters:
Pk: set of eligible paths for commodity k
•
• vk,l ∈
• ak
e,l ∈ {
• be ∈
R+: routing cost (per unit of traffic) of path l
: parameter indicating that edge e is contained in path l
0, 1
}
R+: initial capacity installed at edge e
∈ Pk,
∈ K
∈ E
,
,
∈ Pk,
17
Table 7: Datasets time series dimensions.
routing
facility-loc
tsp
energy-grid
revenue-max
caching
# of time series for training
# of time series for testing
# of time series for validation
# of instances per time series
46
5
5
96
80
20
20
700
80
20
20
400
80
20
20
100
80
20
20
100
80
20
20
150
Table 8: Additional datasets time series dimensions.
routing-sm
revenue-max-sm
# of time series for training
# of time series for testing
# of time series for validation
# of instances per time series
96
18
10
96
80
20
20
100
• ui ∈
• ci ∈
• dt
k ∈
R+: cost of buying i-th capacity installment,
R+: capacity of i-th installment,
R+: demand of commodity k at time t.
Complexity. Pt
1 is known to be NP-hard even for a single commodity, i.e.,
= 1, cf. [55].
|K|
Datasets. The problem parameters, including the graph topology, were taken from the SNDlib database [53] that
contains real-world traffic matrices and network topologies from different communication (and other) networks (e.g.,
from backbone ISP networks).9 In particular, for this problem we used the dataset geant dataset, the size of which can
be seen in Table 5. The capacity and instalment costs are fixed over time, while the demand vector dt is being updated
every 15 minutes over a period of 4 months. We note that we have scaled the demand dt and edge capacity by a factor
of 100 and 1/40, respectively, to increase the complexity of the problem.10 The number of time series we used, and
the number of instances for each time series can be found in Table 7, where the instances differ in vector dt.
G.2 Facility Location
of clients, the goal is to decide which
In the facility location problem, given a set
facilities to open and how to assign clients to the opened facilities. The objective is to minimize the total opening and
assignment cost. More formally, we solve the following binary problem:
(cid:88)
of facility locations and a set
(cid:88)
(cid:88)
J
I
Pt
2 : minimize
z
cj,idt
jzj,i +
fixi
subject to
i∈I
(cid:88)
i∈I
(cid:88)
j∈J
j∈J
i∈I
zj,i = 1,
zj,i ≤
2
|J |
xi,
z
0, 1
∈ {
|I||J ||I|,
}
j
∀
i
∀
,
∈ J
,
∈ I
where the vector of binary variables z = [z11, . . . , z|I||J |, x1, . . . , x|I|]. In the above problem, we introduced the
following binary variables:
• zj,i ∈ {
• xi ∈ {
0, 1
0, 1
: assignment of client j
}
: deployment of facility i
}
to facility i
,
∈ I
∈ J
∈ I
,
9SNDlib is a rich and well-known database which is regularly used in the evaluation of routing algorithms in communication
networks.
10This scaling renders capacity purchase necessary in order to fulfill the demands.
18
Benidis et al.
and the following parameters:
• fi ∈
• cj,i ∈
• dt
j ∈
R+: cost for opening facility i
∈ I
R+: cost for associating client j
R+: demand of client j
∈ J
at time t.
,
∈ J
to facility i
,
∈ I
Complexity. Pt
1.463 ratio, with the currently-known algorithm achieving a solution within 1.488 ratio, see [67].
2 is the metric uncapacitated facility location problem, which is NP-hard and inapproximable below
Datasets. The graph topology is borrowed from the germany50 dataset [53], the cost parameters fi are randomly
generated from a uniform distribution for each problem instance and the time-varying demand dt =
dt
j}j∈J is
{
defined as:
dt+1 = max (cid:8)0, Adt + a1 sin(t/period1) + a2 sin(t/period2) + w(cid:9) ,
R|J |×|J | constructed by randomly sampling the eigenvalues λi ∼ U
for a Hurwitz matrix A
(0.98, 0.999) and the
associated orthonormal eigenvectors vi
(2, 10),
R|J |×|J |
and the random vector w
is a diagonal matrix of ones. In the above definition the max operator is applied component-wise and guarantees
nonnegative demand. Finally, the periodicity of the sine functions are period1 = 20 and period2 = 70.
(1, 5) and a2
R|J | and the covariance matrix Σ1
∈ {
(0, Σ1), where the vector of zeros 0
. The random variables a1
∼ U
∈
11 for i
1, . . . ,
|J |}
∼ N
∼ U
∈
∈
G.3 Travelling Salesman
We consider the Travelling Salesman Problem (TSP) under the Dantzig–Fulkerson–Johnson formulation [64].
detail, we have a set
are connected with a graph G = (
(i, j)
minimize the aggregate (travelling) cost of the route. In detail, the formulated binary problem is:
(cid:88)
In
of N cities, which we need to visit exactly once and return to the starting node. The cities
. Our goal is to
) which induces routing (or distance) costs ci,j,
∈ E
(cid:88)
N
N
∀
E
,
Pt
3 : minimize
z
ct
i,jzi,j
subject to
j∈N
zi,j = 1,
zi,j = 1,
j
∀
i
∀
,
,
∈ N
∈ N
i∈N
(cid:88)
i∈N
(cid:88)
j∈J
(cid:88)
i∈S
(cid:88)
j∈S
zi,j ≤ |S| −
N 2
0, 1
}
.
z
∈ {
1,
∀S ⊆ {
1, . . . , N
,
}
|S| ≥
2,
The problem includes the binary variables:
• zi,j ∈ {
and parameters:
0, 1
: inclusion of link (i, j)
}
∈ E
or not (xij = 0) in the route,
• ct
i,j ∈
R+: cost for traversing link (i, j) at time t.
Complexity. Pt
3 is NP-hard to approximate within any polynomial factor for general distance functions, while im-
proved approximation ratios are available for certain restricted cases (metric spaces, etc.). We refer the reader to [63]
for an up-to-date discussion on the complexity of TSP.
Datasets. We created instances with N = 12 nodes. The location of each node is randomly generated using a uniform
Rn is given by the distance
distribution and we assumed that the graph is fully connected. The cost vector ct
between each city pair and it changes at each time step as follows:
∈
ct+1 = max
0, ct + w
{
U(dmin, dmax)n and the max operator is applied component-wise; where dmin, dmax are positive con-
,
}
where w
stants.
∼
11The eigenvectors are computed randomly sampling from a standard normal and then using the Gram–Schmidt procedure to
compute a set of orthonormalized vectors.
19
Figure 4: Microgrid energy storage optimization for a community of
prosumers and a two-tier battery system.
F
G.4 Revenue Maximization
We consider the problem of shipping commodities from a set
source nodes (each commodity cor-
responds to one node) towards their intended destinations over predetermined (overlapping) paths. Our goal is to
maximize the revenue from delivering as many commodities as possible, while satisfying the time-varying capacity of
each edge i
n. Formally, we consider the following
∈ I
binary problem:
that lies along the path of each commodity n
of N =
, i.e., i
∈ N
|N |
N
(cid:51)
P4t : maximize
z
subject to
(cid:88)
n∈N
(cid:88)
ct
nzn
ai,nzn ≤
N .
}
0, 1
n∈N
z
∈ {
bt
i,
i
∀
,
∈ I
The problem includes the binary variables:
• zn ∈ {
and parameters:
: transporting commodity n to its destination via a predetermined path, or not,
0, 1
}
R+: revenue when delivering commodity n, at time t,
R+: transportation capacity of link i
, at time t,
∈ I
• ct
n ∈
• bt
i ∈
• ai,n ∈ {
Complexity. Pt
: indicating if link i lies in the predetermined path of commodity n, i.e., i
0, 1
}
n.
(cid:51)
4 is NP-complete as it falls in the category of multi-dimensional Knapsack problems, see [66].
Datasets. We randomly generated from a uniform distribution the scalars ai,n representing the resources needed to
ship commodity n from the i-th facility. Furthermore, for each time series the time-varying capacity and revenue
vectors are defined as follows:
ct+1 = ct + a1 sin(t/period1) + a2 sin(t/period2) + wc,
bt+1 = bt + wb,
where ct = [ct
1, . . . , ct
the random vectors wc ∈
instances per time series please refer to Table 7.
1, . . . , bt
R|I||N | and wb ∈
N ], bt = [bt
|I|], the scalars a1, a2 are randomly generated for each time series, and
R|I|. For further details about the number of time series and problem
G.5 Energy Grid
energy producers-consumers (or,
We consider a microgrid energy-sharing problem, cf. [65], where a set
prosumers) coordinate their energy prosumption plan over several time periods. The prosumers have at their disposal
a hierarchical energy storage system, where the primary batteries are already in place and the secondary batteries are
deployed upon demand by paying additional cost. The goal is to optimize the overall microgrid operation, by solving
of F =
|F|
F
20
Secondary BatteriesPrimaryBatteries<latexit sha1_base64="/oI7/GtOsF1cbhH6QjZIdsw7BM0=">AAAB8nicbVBNS8NAFHypX7V+VT16WSyCp5KIqMeiF71VsLaQhrLZbtqlm03YfRFK6c/w4kERr/4ab/4bN20O2jqwMMy8x86bMJXCoOt+O6WV1bX1jfJmZWt7Z3evun/waJJMM95iiUx0J6SGS6F4CwVK3kk1p3EoeTsc3eR++4lrIxL1gOOUBzEdKBEJRtFKfjemOGRUkrtKr1pz6+4MZJl4BalBgWav+tXtJyyLuUImqTG+56YYTKhGwSSfVrqZ4SllIzrgvqWKxtwEk1nkKTmxSp9EibZPIZmpvzcmNDZmHId2Mo9oFr1c/M/zM4yugolQaYZcsflHUSYJJiS/n/SF5gzl2BLKtLBZCRtSTRnalvISvMWTl8njWd27qHv357XGdVFHGY7gGE7Bg0towC00oQUMEniGV3hz0Hlx3p2P+WjJKXYO4Q+czx9FcZCX</latexit>I<latexit sha1_base64="kQlvnhSt6TF1MpsjV35jaJyKMkE=">AAAB8nicbVBNS8NAFHypX7V+VT16WSyCp5KIqMeiF09SwdpCGspmu2mXbjZh90UopT/DiwdFvPprvPlv3LQ5aOvAwjDzHjtvwlQKg6777ZRWVtfWN8qbla3tnd296v7Bo0kyzXiLJTLRnZAaLoXiLRQoeSfVnMah5O1wdJP77SeujUjUA45THsR0oEQkGEUr+d2Y4pBRSe4qvWrNrbszkGXiFaQGBZq96le3n7As5gqZpMb4nptiMKEaBZN8WulmhqeUjeiA+5YqGnMTTGaRp+TEKn0SJdo+hWSm/t6Y0NiYcRzayTyiWfRy8T/PzzC6CiZCpRlyxeYfRZkkmJD8ftIXmjOUY0so08JmJWxINWVoW8pL8BZPXiaPZ3Xvou7dn9ca10UdZTiCYzgFDy6hAbfQhBYwSOAZXuHNQefFeXc+5qMlp9g5hD9wPn8ATQqQnA==</latexit>N<latexit sha1_base64="izx0mNdI8WAbYNPOkYIbGfYiXoY=">AAAB8nicbVBNS8NAFHypX7V+VT16WSyCp5KIqMeiIB4rWFtIQ9lsN+3SzSbsvgil9Gd48aCIV3+NN/+NmzYHbR1YGGbeY+dNmEph0HW/ndLK6tr6RnmzsrW9s7tX3T94NEmmGW+xRCa6E1LDpVC8hQIl76Sa0ziUvB2ObnK//cS1EYl6wHHKg5gOlIgEo2glvxtTHDIqyW2lV625dXcGsky8gtSgQLNX/er2E5bFXCGT1Bjfc1MMJlSjYJJPK93M8JSyER1w31JFY26CySzylJxYpU+iRNunkMzU3xsTGhszjkM7mUc0i14u/uf5GUZXwUSoNEOu2PyjKJMEE5LfT/pCc4ZybAllWtishA2ppgxtS3kJ3uLJy+TxrO5d1L3781rjuqijDEdwDKfgwSU04A6a0AIGCTzDK7w56Lw4787HfLTkFDuH8AfO5w9A4pCU</latexit>FProsumers<latexit sha1_base64="hpo6U332PzLAPwVGnxjrRvnyyz8=">AAAB7nicbVBNS8NAEJ3Ur1q/qh69LBbBU0lE1GPRi8cK9gPaUDbbSbt0swm7G6GE/ggvHhTx6u/x5r9x0+agrQ8GHu/NMDMvSATXxnW/ndLa+sbmVnm7srO7t39QPTxq6zhVDFssFrHqBlSj4BJbhhuB3UQhjQKBnWByl/udJ1Sax/LRTBP0IzqSPOSMGit1hoNM8lllUK25dXcOskq8gtSgQHNQ/eoPY5ZGKA0TVOue5ybGz6gynAmcVfqpxoSyCR1hz1JJI9R+Nj93Rs6sMiRhrGxJQ+bq74mMRlpPo8B2RtSM9bKXi/95vdSEN37GZZIalGyxKEwFMTHJfydDrpAZMbWEMsXtrYSNqaLM2ITyELzll1dJ+6LuXdW9h8ta47aIowwncArn4ME1NOAemtACBhN4hld4cxLnxXl3PhatJaeYOYY/cD5/AA06j2I=</latexit>dni<latexit sha1_base64="U69szQhJDFHVc/hfJ6yzt8KQ1qg=">AAAB7nicbVBNS8NAEJ3Ur1q/qh69LBbBU0lE1GPRi8cK9gPaUCbbTbt0swm7G6GE/ggvHhTx6u/x5r9x0+agrQ8GHu/NMDMvSATXxnW/ndLa+sbmVnm7srO7t39QPTxq6zhVlLVoLGLVDVAzwSVrGW4E6yaKYRQI1gkmd7nfeWJK81g+mmnC/AhHkoecorFSBweZDGeVQbXm1t05yCrxClKDAs1B9as/jGkaMWmoQK17npsYP0NlOBVsVumnmiVIJzhiPUslRkz72fzcGTmzypCEsbIlDZmrvycyjLSeRoHtjNCM9bKXi/95vdSEN37GZZIaJuliUZgKYmKS/06GXDFqxNQSpIrbWwkdo0JqbEJ5CN7yy6ukfVH3rurew2WtcVvEUYYTOIVz8OAaGnAPTWgBhQk8wyu8OYnz4rw7H4vWklPMHMMfOJ8/BAqPXA==</latexit>anf<latexit sha1_base64="Img4E/rmxjvT7pImU6DGQUxFDWk=">AAAB7XicbVBNS8NAEJ3Ur1q/qh69LBbBU0lE1GPRi8cK9gPaWDbbTbt2sxt2J0IJ/Q9ePCji1f/jzX9j0vagrQ8GHu/NMDMviKWw6LrfTmFldW19o7hZ2tre2d0r7x80rU4M4w2mpTbtgFouheINFCh5OzacRoHkrWB0k/utJ26s0OoexzH3IzpQIhSMYiY1g556wFKvXHGr7hRkmXhzUoE56r3yV7evWRJxhUxSazueG6OfUoOCST4pdRPLY8pGdMA7GVU04tZPp9dOyEmm9EmoTVYKyVT9PZHSyNpxFGSdEcWhXfRy8T+vk2B45adCxQlyxWaLwkQS1CR/nfSF4QzlOCOUGZHdStiQGsowCygPwVt8eZk0z6reRdW7O6/UrudxFOEIjuEUPLiEGtxCHRrA4BGe4RXeHO28OO/Ox6y14MxnDuEPnM8fCaGOxw==</latexit>btn<latexit sha1_base64="xYeHN4vs3FJKe/2cIHsX5Hxdhv8=">AAAB6XicbVBNS8NAEJ3Ur1q/qh69LBbBU0lE1GPRi8cq1hbaUDbbSbt0swm7G6GE/gMvHhTx6j/y5r9x0+agrQ8GHu/NMDMvSATXxnW/ndLK6tr6RnmzsrW9s7tX3T941HGqGLZYLGLVCahGwSW2DDcCO4lCGgUC28H4JvfbT6g0j+WDmSToR3QoecgZNVa655V+tebW3RnIMvEKUoMCzX71qzeIWRqhNExQrbuemxg/o8pwJnBa6aUaE8rGdIhdSyWNUPvZ7NIpObHKgISxsiUNmam/JzIaaT2JAtsZUTPSi14u/ud1UxNe+RmXSWpQsvmiMBXExCR/mwy4QmbExBLKFLe3EjaiijJjw8lD8BZfXiaPZ3Xvou7dndca10UcZTiCYzgFDy6hAbfQhBYwCOEZXuHNGTsvzrvzMW8tOcXMIfyB8/kDBfmNBw==</latexit>i<latexit sha1_base64="Frx5NAJe5WtOQSibiyzgSPVaNek=">AAAB6XicbVBNS8NAEJ3Ur1q/qh69LBbBU0lE1GPRi8cq1hbaUDbbSbt0swm7G6GE/gMvHhTx6j/y5r9x0+agrQ8GHu/NMDMvSATXxnW/ndLK6tr6RnmzsrW9s7tX3T941HGqGLZYLGLVCahGwSW2DDcCO4lCGgUC28H4JvfbT6g0j+WDmSToR3QoecgZNVa6l5V+tebW3RnIMvEKUoMCzX71qzeIWRqhNExQrbuemxg/o8pwJnBa6aUaE8rGdIhdSyWNUPvZ7NIpObHKgISxsiUNmam/JzIaaT2JAtsZUTPSi14u/ud1UxNe+RmXSWpQsvmiMBXExCR/mwy4QmbExBLKFLe3EjaiijJjw8lD8BZfXiaPZ3Xvou7dndca10UcZTiCYzgFDy6hAbfQhBYwCOEZXuHNGTsvzrvzMW8tOcXMIfyB8/kDDZKNDA==</latexit>n<latexit sha1_base64="BBtDCpCKnFSTGuZ0cCMn7bxilU4=">AAAB6XicbVBNS8NAEJ3Ur1q/qh69LBbBU0lE1GPRi8cq1hbaUDbbSbt0swm7G6GE/gMvHhTx6j/y5r9x0+agrQ8GHu/NMDMvSATXxnW/ndLK6tr6RnmzsrW9s7tX3T941HGqGLZYLGLVCahGwSW2DDcCO4lCGgUC28H4JvfbT6g0j+WDmSToR3QoecgZNVa6Dyv9as2tuzOQZeIVpAYFmv3qV28QszRCaZigWnc9NzF+RpXhTOC00ks1JpSN6RC7lkoaofaz2aVTcmKVAQljZUsaMlN/T2Q00noSBbYzomakF71c/M/rpia88jMuk9SgZPNFYSqIiUn+NhlwhcyIiSWUKW5vJWxEFWXGhpOH4C2+vEwez+reRd27O681ros4ynAEx3AKHlxCA26hCS1gEMIzvMKbM3ZenHfnY95acoqZQ/gD5/MHAWqNBA==</latexit>fTransferLosses<latexit sha1_base64="IFtCM6n9ye/DXhnXZd+bOZz9RJ0=">AAAB/XicbVDLSsNAFL2pr1pf8bFzEy2CCymJiLosunFZwT6gCWEynbRDJ5MwMxHaEPwVNy4Ucet/uPNvnLRdaOuBezmccy9z5wQJo1LZ9rdRWlpeWV0rr1c2Nre2d8zdvZaMU4FJE8csFp0AScIoJ01FFSOdRBAUBYy0g+Ft4bcfiZA05g9qlBAvQn1OQ4qR0pJvHoz9jObukUu5bpl95rh5xTerds2ewFokzoxUYYaGb365vRinEeEKMyRl17ET5WVIKIoZyStuKkmC8BD1SVdTjiIivWxyfW6daKVnhbHQxZU1UX9vZCiSchQFejJCaiDnvUL8z+umKrz2MsqTVBGOpw+FKbNUbBVRWD0qCFZspAnCgupbLTxAAmGlAytCcOa/vEha5zXnsubcX1TrN7M4ynAIx3AKDlxBHe6gAU3AMIZneIU348l4Md6Nj+loyZjt7MMfGJ8/0A6UJw==</latexit>zi2{0,1}<latexit sha1_base64="5DBI1u49yCOJH0uy74+pIJj9dJk=">AAAB83icbVBNS8NAEJ3Ur1q/qh69bC2Cp5KIqCcpevFYwX5AE8pmu2mXbjZhdyPU0L/hxYMiXv0z3vw3btIctPXBwOO9GWbm+TFnStv2t1VaWV1b3yhvVra2d3b3qvsHHRUlktA2iXgkez5WlDNB25ppTnuxpDj0Oe36k9vM7z5SqVgkHvQ0pl6IR4IFjGBtJPdpkAYzt3bt1uzKoFq3G3YOtEycgtShQGtQ/XKHEUlCKjThWKm+Y8faS7HUjHA6q7iJojEmEzyifUMFDqny0vzmGToxyhAFkTQlNMrV3xMpDpWahr7pDLEeq0UvE//z+okOrryUiTjRVJD5oiDhSEcoCwANmaRE86khmEhmbkVkjCUm2sSUheAsvrxMOmcN56Lh3J/XmzdFHGU4gmM4BQcuoQl30II2EIjhGV7hzUqsF+vd+pi3lqxi5hD+wPr8AW5FkKE=</latexit>zf>0Benidis et al.
the mixed binary problem:
Pt
5 : maximize
z
subject to
(cid:88)
f ∈F
(cid:88)
f ∈F
(cid:88)
f ∈F
z(c)
where the last constraint enforces the prosumers
of their community.
The main variables of Pt
5 are:
f z(c)
ct
f −
(cid:88)
iz(b)
pt
i
i∈I
bt
n +
anf z(c)
f ≤
dn,iz(b)
i
,
(cid:88)
i∈I
n
∀
,
∈ N
z(c)
f = 1,
RF , z(b)
0, 1
}
∈ {
F ,
to keep at least 1 (normalized) unit of energy for serving the needs
∈
F
• z(c)
R: continuous variable deciding how much energy prosumer f
f ∈
(if negative),12
will store (if positive) or purchase
∈ F
• z(b)
i ∈ {
and the main parameters:
0, 1
}
: decides whether to deploy or not (zi = 0) the secondary battery i
,
∈ I
• an,f ∈
values indicate larger losses,
R+: energy transfer loss coefficient when prosumer f
∈ F
transfers energy to battery n
. Larger
∈ N
R+: selling or purchase (when z(c)
R+: available capacity at primary battery n
f < 0) price for the energy of prosumer f
at time t,
, at time t,
∈ F
R+: energy loss coefficient when transferring energy from primary battery n
∈ N
to secondary
∈ N
• ct
f ∈
• bt
n ∈
• dn,i ∈
battery i
.
∈ I
Complexity. Pt
5 is NP-hard as it generalizes the facility location problem [65].
Datasets. We created instances using a non-stationary formula for the time-varying vectors that exhibits temporal
properties as follows:
ct+1 = ct + a sin(t/period1) + wc,
bt+1 = bt + wb,
where the scalar a is randomly generated for each time series, and the random vectors wc ∈
G.6 Caching
R|I||P| and wb ∈
R|I|.
Our final problem is a standard data caching problem where we wish to store the most popular files in a cache of
files and a single cache
limited capacity, see [29]. In particular, we consider a content library of
1, 2, . . . , N
{
with C bytes capacity. Each file n
n at time t, which captures the expected requests for file n at
that time, and size of qn bytes. The goal is to store, at each time, those files that will be requested by the larger number
of content viewers, i.e., to maximize the cache hits. This can be formalized with the following binary problem:
has popularity pt
∈ N
N
=
}
pt
nxn
Pt
6 : maximize
z
subject to
N
(cid:88)
n=1
N
(cid:88)
n=1
xnqn ≤
,
0, 1
}
C
n
∀
.
∈ N
xn ∈ {
The variables of Pt
6 are:
• xn ∈ {
0, 1
: binary variables that select a file to be cached or not,
}
12Negative transfers release capacity that can be used for stored-energy transfers.
21
Table 9: Hyperparameters of the loss components.
Schedule
Parameter
λ
λreg
λc
warm-up steps
warm-up initial value
warm-up final value
final value
{500, 1000, 1500, 2000}
{0.01, 0.1}
{0.1, 1}
{1, 10, 50}
{250, 500}
{0.01, 0.1}
{0.1, 1}
{0.1, 1, 10, 100}
{1000, 1500}
0.1
{1, 10}
{10, 100}
and the main parameters:
• pt
n ∈
• qn ∈
R+: normalized file popularity parameters at time t,
R+: size of file n
.
∈ N
Complexity. Pt
through dynamic programming.
6 is a standard Knapsack problem which is NP-Complete but can be solved in pseudo-polynomial time
Datasets. The file sizes were created randomly from a uniform distribution
(1, 10), while for the file popularity we
used the standard dataset for request traces from Movielens [24], which we sliced in order to create the different time
series.
U
H Experimental Details
H.1 Benchmarks
In our experiments we use as benchmark the N-div model [52] as it is the most related approach to our method
MIPnet.
N-div uses a GCN based on the bipartite graph representation of the MILP, similar to our approach, while the output
of the GCN is mapped to Bernoulli parameters using an MLP. The model is trained by minimizing the NLL (cross-
entropy) modified based on the SelectiveNet approach [32]. The idea is to learn two sets of binary variables: one
set indicates if a variable is going to be selected and the other its binary value (to be used if selected). Therefore, the
overall loss can be seen as a weighted cross-entropy. Further, this loss assumes a predefined target selection percentage
and therefore a different model is required for different variable selection percentages.
We implemented N-div by keeping the common structure of our model and changing the final layers and the loss.
Further, we used the same set of features (see Appendix C) as in our method for a fair comparison. Note that in [52] it
is not clearly mentioned what features are used for the N-div method. The authors only mention a set of solver-based
features that can be used in their neural-branching method but are not applicable for N-div since no such features
are available during inference.
For the method from [11], we use the implementation available online at github.com/bstellato/mlopt. This
strategy learns a mapping from problem parameters to feasible variable assignments. First, the input data is categorized
into strategies, i.e., feasible variables assignment. Then, the mapping is learned as a multi-class classification problem.
Notice that this approach does not generalize when a class is not in the training dataset, i.e., when at test time all
feasible assignments seen during training are note feasible for the new problem instance. In order to scale to large
datasets, we modified their implementation so that it accepts sparse training data. Moreover, we made sure that their
method receives the same train/validation/test split as our method.
H.2 Hyperparameters
For all datasets we used the Adam optimizer for the gradient updates with 10−5 weight-decay and clipped the gradient
10−2 for the first 500 steps after which a
norm to 10. The learning rate was warmed-up linearly from 1
×
cosine decay follows for the remaining time steps with a decay rate of 0.99.
10−4 to 1
×
For each dataset we performed a hyperparameter optimization on the model and loss parameters. The batch size
and the number of training steps were tuned per dataset with values in
,
}
respectively. All the loss hyperparameters were linearly warmed-up to an initial value and then linearly scaled up to
8, 12, 16, 32
{
8000, 15000, 20000
and
}
{
22
Benidis et al.
Table 10: Hyperparameters of the model blocks.
Parameter
Block
MLP (features)
GCN
LSTM MLP (binary map) MLP (continuous map)
# of layers
# of units
nonlinearity
1
{8, 16}
{ReLU, No}
{2, 3}
{8, 16}
{ReLU, No}
{1, 2, 3}
{16, 32}
No
1
2 × D(b)
z
ReLU
1
D(c)
z
No
Table 11: Accuracy, infeasibility and optimality gap (mean ± std) of MIPnet vs. N-div. Bold indicates best method.
ρ
Method
routing-sm
revenue-max-sm
routing-sm
revenue-max-sm
routing-sm
revenue-max-sm
Accuracy
Infeasibility
Optimality gap
30%
40%
50%
60%
70%
MIPnet
N-div
MIPnet
N-div
MIPnet
N-div
MIPnet
N-div
MIPnet
N-div
99.18 ± 0.17
95.67 ± 0.48
98.29 ± 0.22
78.33 ± 25.14
97.32 ± 0.40
89.46 ± 0.93
95.19 ± 0.42
92.41 ± 1.26
92.79 ± 0.43
89.52 ±2.55
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
7.88 ± 0.63
77.91 ± 9.73
35.63 ± 21.02
96.27 ± 4.32
65.07 ± 29.85
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
100.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
0.35 ± 0.01
0.39 ± 0.04
0.95 ± 0.37
0.27 ± 0.02
1.48 ± 0.89
-
-
-
-
-
0.12 ± 0.03
0.16 ± 0.05
0.07 ± 0.02
0.11 ± 0.07
0.05 ± 0.02
0.03 ± 0.03
0.03 ± 0.03
0.02 ± 0.01
0.03 ± 0.04
0.03 ± 0.01
a final target value in the final training step. The loss scheduling hyperparameter ranges are provided in Table 9. The
model hyperparameter ranges are provided in Table 10.13
H.3 Computational Environment
For running our experiments we used p3.8xlarge AWS EC2 instances with 4 Tesla V100 GPUs, 36 CPUs, and 244 GB
of memory, and m5.8xlarge instances with 32 CPUs and 128 GB of memory.
I Additional Results
I.1 Additional Datasets
infeasibility, and optimality gap for the two additional datasets
In Table 11 we provide results for accuracy,
routing-sm and revenue-max-sm, which are smaller versions of routing and revenue-max-sm, respectively. Ta-
ble 12 shows the accuracy, infeasibility, and optimality gap on these two additional datasets for the method from [11].
We notice that our method performs better than N-div and the method from [11] in almost all additional experi-
ments. Notice that the method from [11] is able to find a feasible solution for routing-sm in more cases than MIPnet
and N-div. However, this method is always infeasible in revenue-max, MIPnet and N-div always find a feasible
solution.
I.2 Unsupervised Loss
As we already showed in Section 4.1, training MIPnet only with supervised loss (MIPnet-sup) leads to decreased per-
formance for reasons we discussed throughout the paper. Here, we complete the picture by including the performance
of MIPnet-unsup, i.e., MIPnet trained only with unsupervised loss. Tables 13-15 show the accuracy, infeasibility and
optimality gap, respectively. It is clear that the performance of MIPnet-unsup compared to MIPnet is significantly
degraded in most datasets, with the sole exception of the caching.
It is important to highlight some key observations based on these results. First, the accuracy of MIPnet-unsup in
the energy-grid dataset is less than 50% for all values of ρ. This does not lead to significant infeasibilities since
apparently the constraints of the problem are not that hard to satisfy, however it causes a significant optimality gap. This
is a case where labels make a big difference in the model training process and in fact the performance of MIPnet-sup
is in par with MIPnet, i.e., most of the learning is done from the labels. On the other end, we observe that in the
13Note that the number of units in GCN increases due to skip connections.
23
Table 12: Accuracy, infeasibility and optimality gap of [11].
Accuracy
Infeasibility
Optimality gap
routing-sm
revenue-max-sm
85.4
99.22
93.0
100.00
9.4
∞
Table 13: Accuracy (mean ± std)% of MIPnet-unsup.
ρ (%)
routing
facility-loc
tsp
energy-grid
revenue-max
caching
30% 95.46 ± 1.47
99.02 ± 1.12
96.45 ± 2.69
49.38 ± 1.36
100.00 ± 0.00
100.00 ± 0.00
40% 94.13 ± 1.16
98.90 ± 1.25
95.83 ± 2.90
48.16 ± 0.75
100.00 ± 0.00
100.00 ± 0.00
50% 92.60 ± 1.13
98.85 ± 1.26
95.28 ± 3.04
47.61± 0.77
99.99 ± 0.00
100.00 ± 0.00
60% 91.24 ± 1.01
98.76 ± 1.21
94.76 ± 3.03
47.59 ± 0.86
99.99 ± 0.00
100.00 ± 0.00
70% 89.49 ± 0.76
98.50 ± 1.02
94.32 ± 2.84
47.78 ± 0.79
99.99 ± 0.00
100.00 ± 0.00
Table 14: Infeasibility (mean ± std)% of MIPnet-unsup.
ρ (%)
routing
facility-loc
tsp
energy-grid
revenue-max
caching
30% 100.00 ± 0.00
6.92 ± 0.56
33.43 ± 47.07
0.02 ± 0.03
0.00 ± 0.00
0.00 ± 0.00
40% 100.00 ± 0.00
13.87 ± 10.09
41.94 ± 42.22
0.06 ± 0.00
0.00 ± 0.00
0.00 ± 0.00
50% 100.00 ± 0.00
29.89 ± 25.36
54.68 ± 39.66
0.11 ± 0.06
0.00 ± 0.00
0.00 ± 0.00
60% 100.00 ± 0.00
47.28 ± 24.40
69.16 ± 40.00
0.15 ± 0.03
0.00 ± 0.00
0.00 ± 0.00
70% 100.00 ± 0.00
72.68 ± 15.37
84.04 ± 21.92
0.17 ± 0.08
0.00 ± 0.00
0.00 ± 0.00
Table 15: Optimality gap (mean ± std)% of MIPnet-unsup.
ρ (%)
routing
facility-loc
tsp
energy-grid
revenue-max
caching
30%
40%
50%
60%
70%
-
-
-
-
-
8.83 ± 12.33
1.55 ± 1.27
8.59 ± 0.04
0.00 ± 0.00
0.00 ± 0.00
12.44 ± 17.31
3.11 ± 2.78
12.62 ± 0.36
0.00 ± 0.00
0.00 ± 0.00
15.08 ± 20.06
5.95 ± 5.38
17.16 ± 0.63
0.66 ± 0.01
0.00 ± 0.00
18.97 ± 24.36
11.06 ± 9.82
22.00 ± 0.95
1.23 ± 0.01
0.00 ± 0.00
32.20 ± 27.12
19.73 ± 17.64
27.41 ± 1.11
1.57 ± 0.07
0.00 ± 0.00
caching dataset the model is able to learn the optimal values without labels. Arguably this is an easy problem to learn
since all the models achieve optimal performance. In such cases the overhead of collecting (many) labels might not be
necessary. All the other datasets fall in the case where both MIPnet-sup and MIPnet-unsup underperform compared
to MIPnet and a combination of supervised and unsupervised loss gives the best performance.
I.3 Missing Labels
Finally, we examine how missing labels affect the performance of a model trained with and without unsupervised loss.
For this experiment we used the tsp dataset. Figure 5 illustrates the accuracy of the models for different percentages
of missing labels. In the presence of missing labels the model that is trained with both supervised and unsupervised
loss clearly outperforms the one without unsupervised loss in all cases.
J Discussion of Related Work
Table 16 summarizes the key differences of MIPnet from the most-related models and approaches. In the evaluation
section we have presented detailed comparisons of MIPnet with [52], [32] and [11], while here we focus on qualitative
24
Benidis et al.
Figure 5: Comparison of MIPnet w\ and w\o unsupervised loss for different missing label percentages.
differences. In detail, we see that MIPnet is the only model that uses semi-supervised learning. This is very important
since obtaining labels requires, in most cases, solving large-scale NP-hard problems, while the unsupervised loss
component can improve the performance of the model further, by allowing us to identify the effect (in terms of
optimality gap and infeasibility) of mispredictions at a per-variable granularity. These benefits are evident in the
experiments. We note that other works, such as [52] and [19], identify the importance of unsupervised learning as
well, but this approach is esssentially explored only in [39].
In particular, [39] proposes an unsupervised approach specifically for graph problems where a GNN is used to learn
a distribution over the graph nodes, representing a solution.
In order to produce an integral solution, the authors
derandomize the continuous values using sequential decoding. The method comes with theoretical guarantees, giving
good and feasible solutions with high probability. However, this approach is not applicable to general MIPs, while
even for the targeted graph problems it is not trivial to include general constraints. Besides, this work does not benefit
from the availability of labels, which, in certain operational environments are available.
On the other hand, in [52] the authors provide only a preliminary evaluation with training datasets that might include
noisy labels (obtained from suboptimal solutions); while [19] performs an initial variable assignment and then uses
neighborhood search to increase the training data without solving the problem exactly – which works under the as-
sumption of locality, as the authors stress. On the contrary, MIPnet uses a semi-supervised learning approach which,
apart from allowing us to expand the training dataset, enables tuning the impact of each variable on the feasibility and
objective value of the problem.
Another distinguishing feature of MIPnet is that, unlike all prior works, it accounts for the temporal structure across
the different instances, which, as shown in the experiments, indeed enhances the model's performance. This aspect
is crucial as, more often than not, the different instances that practitioners solve exhibit a temporal structure, namely
problem parameters such as the commodity volumes, user requests, transportation costs or electricity prices, follow
some type of diurnal pattern.
We also note that the related works in Table 16 can be separated to those that use GCN in order to automate feature
embedding, and to those that do not follow this approach, as e.g., [10, 11]. GCNs seem to enhance the performance
and provide the means to account for dependencies across the variables and, indirectly, among the constraints as
well. Finally, MIPnet is the only work that uses a Bayesian approach and a tunable confidence for performing the
assignment of variables, unlike, e.g., the threshold-based variable selection rule of [19]. We note also that [52] offers
the option to select different percentage ρ of the binary variables, but this decision needs to be made in advance so as
to train the model accordingly.
Table 16: Comparison of MIPnet with most related models.
Uses GCN
Vars Select Method
Temporal
Learning
[52]
[11]
[19]
[10]
[31]
[39]
MIPnet
Yes
No
Yes
No
Yes
Yes
Yes
Bernoulli
No
Threshold-based
No
Threshold-based
No
No
No
No
No
No
No
Superv.
Superv.
Superv.
Superv.
Superv.
Unsuperv.
Bayesian (& tunable thresh.)
Yes
Superv. + Unsuperv.
25
Additional References
[63] A. R. Karlin, N. Klein, and S. O. Gharan. A (Slightly) Improved Approximation Algorithm for Metric TSP.
Arxiv, 2022. URL arXiv:2007.01409.
[64] G. Dantzig, R. Fulkerson, and S. Johnson. Solution of a Large-Scale Traveling-Salesman Problem. Journal of
the Operations Research Society of America, 2(4):393–410, 1954.
[65] I. Koutsopoulos, T. G. Papaioannou, and V. Hatzi. Modeling and Optimization of the Smart Grid Ecosystem.
Found. Trends Netw., 10(2-3), 2016.
[66] Martello, Silvano and Toth, Paolo. Knapsack Problems: Algorithms and Computer Implementations. John Wiley
& Sons, ISBN 978-0471924203, 1990.
[67] S. Li. A 1.488 Approximation Algorithm for the Uncapacitated Facility Location Problem. Information and
Computation, 222:45–58, 2013.
26
|
|
http://arxiv.org/abs/2302.10034v2 | 2023-10-10T05:55:10 | 2023-02-20T15:33:26 | Over-Parameterization Exponentially Slows Down Gradient Descent for
Learning a Single Neuron | We revisit the problem of learning a single neuron with ReLU activation under
Gaussian input with square loss. We particularly focus on the
over-parameterization setting where the student network has $n\ge 2$ neurons.
We prove the global convergence of randomly initialized gradient descent with a
$O\left(T^{-3}\right)$ rate. This is the first global convergence result for
this problem beyond the exact-parameterization setting ($n=1$) in which the
gradient descent enjoys an $\exp(-\Omega(T))$ rate. Perhaps surprisingly, we
further present an $\Omega\left(T^{-3}\right)$ lower bound for randomly
initialized gradient flow in the over-parameterization setting. These two
bounds jointly give an exact characterization of the convergence rate and
imply, for the first time, that over-parameterization can exponentially slow
down the convergence rate. To prove the global convergence, we need to tackle
the interactions among student neurons in the gradient descent dynamics, which
are not present in the exact-parameterization case. We use a three-phase
structure to analyze GD's dynamics. Along the way, we prove gradient descent
automatically balances student neurons, and use this property to deal with the
non-smoothness of the objective function. To prove the convergence rate lower
bound, we construct a novel potential function that characterizes the pairwise
distances between the student neurons (which cannot be done in the
exact-parameterization case). We show this potential function converges slowly,
which implies the slow convergence rate of the loss function. | [
"Weihang Xu",
"Simon S. Du"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.10034v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.10034v2",
"@rel": "related",
"@type": "application/pdf"
}
] | [
"Proceedings of Thirty Sixth Conference on Learning Theory, PMLR\n 195:1155-1198, 2023"
] | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"math.OC",
"stat.ML"
] | 3
2
0
2
t
c
O
0
1
]
G
L
.
s
c
[
2
v
4
3
0
0
1
.
2
0
3
2
:
v
i
X
r
a
Over-Parameterization Exponentially Slows Down
Gradient Descent for Learning a Single Neuron
Weihang Xu* 1
Simon S. Du†2
1Institute for Interdisciplinary Information Sciences, Tsinghua University.
2Paul G. Allen School of Computer Science and Engineering, University of Washington
October 11, 2023
Abstract
We revisit the problem of learning a single neuron with ReLU activation under Gaussian
input with square loss. We particularly focus on the over-parameterization setting where the
student network has n ≥ 2 neurons. We prove the global convergence of randomly initial-
ized gradient descent with a O (cid:0)T −3(cid:1) rate. This is the first global convergence result for this
problem beyond the exact-parameterization setting (n = 1) in which the gradient descent en-
joys an exp(−Ω(T )) rate. Perhaps surprisingly, we further present an Ω (cid:0)T −3(cid:1) lower bound
for randomly initialized gradient flow in the over-parameterization setting. These two bounds
jointly give an exact characterization of the convergence rate and imply, for the first time, that
over-parameterization can exponentially slow down the convergence rate. To prove the global
convergence, we need to tackle the interactions among student neurons in the gradient descent
dynamics, which are not present in the exact-parameterization case. We use a three-phase
structure to analyze GD's dynamics. Along the way, we prove gradient descent automatically
balances student neurons, and use this property to deal with the non-smoothness of the ob-
jective function. To prove the convergence rate lower bound, we construct a novel potential
function that characterizes the pairwise distances between the student neurons (which cannot
be done in the exact-parameterization case). We show this potential function converges slowly,
which implies the slow convergence rate of the loss function.
1
Introduction
In recent years, theoretical explanations of the success of gradient descent (GD) on training deep
neural networks emerge as an important problem. A prominent line of work Allen-Zhu et al.
[2018], Du et al. [2018c], Jacot et al. [2018], Safran and Shamir [2018], Chizat et al. [2019] sug-
gests that over-parameterization plays a key role in the successful training of neural networks.
*[email protected]. Part of this work was done while W. Xu was visiting University of Washington.
†[email protected]
1
However, the drawback of over-parameterization is under-explored. In this paper, we consider
training two-layer ReLU networks, with a particular focus on learning a single neuron in the over-
parameterization setting. We give a rigorous proof for the following surprising phenomenon:
Over-parameterization exponentially slows down the convergence of gradient descent.
Specifically, we consider two-layer ReLU networks with n neurons and input dimension d:
n
(cid:88)
[w⊤
i x]+,
x →
(1)
i=1
where [x]+ = max{0, x} denotes the ReLU function, w1, . . . , wn ∈ Rd are n neurons. The input
x ∼ N (0, I) follows a standard Gaussian distribution.
We consider the teacher-student setting, where a student network is trained to learn a ground
truth teacher network. Following the architecture (1), the student network f : Rd → R is given
by f (x) = (cid:80)n
i x]+, where w1, . . . , wn ∈ Rd are n student neurons. Similarly, the teacher
i=1[w⊤
network is given by f ∗(x) = (cid:80)m
i x]+, where v1, . . . , vm ∈ Rd are m teacher neurons. It is
natural to study the square loss:
i=1[v⊤
L(w) = Ex∼N (0,I)
1
2
(cid:32) n
(cid:88)
[w⊤
i x]+ −
i=1
(cid:33)2
,
[v⊤
i x]+
m
(cid:88)
i=1
(2)
1 , w⊤
2 , . . . , w⊤
where w = (w⊤
n )⊤ ∈ Rn×d denotes the parameter vector formed by student neurons.
In this paper, we focus on the special case where the teacher network consists of one single
neuron v1, i.e., m = 1. For simplicity, we omit the subscript and denote v1 with v. The student
network is initialized with a Gaussian distribution: ∀1 ≤ i ≤ n, wi(0) ∼ N (0, σ2I), (σ ∈ R+
denotes the initialization scale), then trained by gradient descent with a step size η.
In this widely-studied setting, we discover a new phenomenon: compared to the exact-parameterized
case (n = 1), the loss L(w(t)) converges much slower in the over-parameterized case. Empirically
(see Figure 1), the slow-down effect happens universally for all n ≥ 2. Moreover, log(ηT ) L(w(T ))
has a tendency of converging towards −3, which seems to suggest that the convergence rate should
be L(w(T )) = Θ(T −3).
For the exact-parameterized case (n = 1), Yehudai and Ohad [2020] proved that L(w(t))
convergences with a linear rate: L(w(t)) ≤ exp (−Ω(t)), which is also validated in Figure 1.
For the over-parameterized case, an exact characterization of the convergence rate is given in this
paper as L(w(t)) = Θ(t−3). As a result, we show that (even very mild) over-parameterization
exponentially slows down the convergence rate. Specifically, our main results are the following
two theorems.
√
Theorem 1 (Global Convergence, Informal). For ∀δ > 0, suppose the dimension d = Ω(log(n/δ)),
d, n−1, ∥v∥−1).
the initialization scale 1 σ
Then with probability at least 1 − δ, gradient descent converges to a global minimum with rate
L(w(t)) ≤ poly(n, ∥v∥, η−1)t−3.
√
d = poly(n−1)∥v∥, the learning rate η = poly(σ
√
1Note that ∥wi(0)∥ scales with σ
d rather than σ.
2
Figure 1: Setting: σ = 0.1, η = 0.05, ∥v∥ = 1. Left: The loss converges much slower when
n > 1, compared to the case of n = 1. Right: log(ηT ) L(w(T )) converges to −3, with a small
C
(ηT )3 ∈ (−3 − ε, −3 + ε), then
perturbation that converges extremely slow (note if we want log(ηT )
T ≥ 1
η C 1/ε is needed.)
Theorem 2 (Convergence Rate Lower Bound, Informal). Suppose the student network is over-
parameterized, i.e., n ≥ 2. Consider gradient flow: ∂w(t)
∂w . If the requirements on
d and σ in Theorem 1 hold, then with high probability, there exist constants Γ1, Γ2 which do not
depend on time t, such that ∀t ≥ 0, L(w(t)) ≥ (Γ1t + Γ2)−3.
∂t = − ∂L(w(t))
Theorem 1 shows the global convergence of GD, while Theorem 2 provides a convergence rate
lower bound. These two bounds together imply an exact characterization of the convergence rate
for GD. We further highlight the significance of our contributions below:
• To our knowledge, Theorem 1 is the first global convergence result of gradient descent for the
square loss beyond the special exact-parameterization cases of m = n = 1 [Tian, 2017, Brutzkus
and Globerson, 2017, Yehudai and Ohad, 2020, Du et al., 2017] and m = n = 2 [Wu et al., 2018].
• While over-parameterization is well-known for its benefit in establishing global convergence in
the finite-data regime, this is the first work proving it can slow down gradient-based methods.
1.1 Related Works
The problem of learning a single neuron is actually well-understood and can be solved with min-
imal assumptions by classical single index models algorithms [Kakade et al., 2011]. For learning
a single-neuron, Brutzkus and Globerson [2017], Tian [2017], Soltanolkotabi [2017] proved con-
vergence for GD assuming Gaussian input distribution, which was later improved by Yehudai and
Ohad [2020] who proved linear convergence of GD for learning one single neuron properly. These
results are also generalized to learning a convolutional filter [Goel et al., 2018, Du et al., 2017,
2018a, Zhou et al., 2019, Liu et al., 2019]. These works only focus on the exact-parameterization
setting, while we focus on the over-parameterization setting.
Another direction focuses on the optimization landscape. Safran and Shamir [2018] showed
spurious local minima exists for large m in the exact-parameterization setting. Safran et al. [2020]
studied problem (2) with orthogonal teacher neurons. They showed that neither one-point strong
3
convexity nor Polyak-Łojasiewicz (PL) condition hold locally near the global minimum. Wu et al.
[2018] showed that problem (2) has no spurious local minima for m = n = 2. Zhong et al.
[2017], Zhang et al. [2019] studied the exact-parameterization setting and showed the local strong
convexity of loss and therefore with tensor initialization, GD can converge to a global minimum.
Arjevani and Field [2022] proved that over-parameterization annihilates certain types of spurious
local minima.
A popular line of works, known as neural tangent kernel (NTK) [Jacot et al., 2018, Chizat et al.,
2019, Du et al., 2018c, 2019, Cao and Gu, 2019, Allen-Zhu et al., 2019, Arora et al., 2019, Oymak
and Soltanolkotabi, 2020, Zou et al., 2020, Li and Liang, 2018] connects the training of ultra-
wide neural networks with kernel methods. Another line of works uses the mean-field analysis to
study the training of infinite-width neural networks [Nitanda and Suzuki, 2017, Chizat and Bach,
2018, Wei et al., 2019, Nguyen and Pham, 2020, Fang et al., 2021, Lu et al., 2020]. All of these
works considered the finite-data regime and require the neural network to be ultra-wide, sometimes
infinitely wide. Their techniques cannot explain the learnability of a single neuron, as pointed out
by Yehudai and Shamir [2019].
More related to our works are results on the dynamics of gradient descent in the teacher-student
setting. Li and Yuan [2017] studied the exact-parameterized setting and proved convergence for
SGD with initialization in a region near identity. Li et al. [2020] showed that GD can learn two-
layer networks better than any kernel methods, but their final upper bound of loss is constantly
large and no convergence is proven. Zhou et al. [2021] proved local convergence for mildly over-
parameterized two-layer networks. While our global convergence analysis uses their idea of es-
tablishing a gradient lower bound, we also propose new techniques to get rid of their architectural
modifications, and improved their gradient lower bound to yield a tight convergence rate upper
bound (see Section 2 for details). Also, Zhou et al. [2021] only provided a local convergence the-
ory, while we prove convergence globally. On the other hand, their results hold for general m ≥ 1
whereas we only study m = 1.
The first phase of our analysis is similar to the initial alignment phenomenon in Boursier et al.
[2022]. Their analysis also relies on the finite-data regime and the orthogonality of inputs, hence
does not apply to our setting.
Similar slow-down effects of over-parameterization on the convergence rate have been ob-
served in other scenarios. Richert et al. [2022] considered error function activation and empirically
observed an O(T −2) convergence rate. Going beyond neural network training, Dwivedi et al.
[2018], Wu and Zhou [2019] showed such a phenomenon for Expectation-Maximization (EM) al-
gorithm on Gaussian mixture models. Zhang et al. [2022] exhibited similar empirical behaviors of
GD on Burer–Monteiro factorization, but no rigorous proof was given.
Paper Organization. In Section 2 we describe the main technical challenges in our analysis, and
our ideas for addressing them. In section 3 we define some notations and preliminary notions. In
Section 4 we formalize the global convergence result (Theorem 1) and provide a proof sketch. In
Section 5 we formalize the convergence rate lower bound (Theorem 2) and provide a proof sketch.
2 Technical Overview
Three-Phase Convergence Analysis.
phases. We define θi as the angle between wi and v, and H := ∥v∥ − (cid:80)
Our global convergence analysis is divided into three
i⟨wi, v⟩. Intuitively,
4
√
θi represents the radial difference between teacher and students, while H represents the tangential
difference between teacher and students.
When the initialization σ
d is small enough, in phase 1, for every i ∈ [n], θi decreases to a
small value while ∥wi∥ remains small. In phase 2, ∀i ∈ [n], θi remains bounded by a small value
while H decreases with an exponential rate. Both θi and H being small at the end of phase 2
implies that GD enters a local region near a global minimum. In phase 3, we establish the local
convergence by proving two properties: a lower bound of gradient, and a regularity condition of
student neurons.
Non-Benign Optimization Landscape. Compared to the exact-parameterization setting, the opti-
mization landscape becomes significantly different and much harder to analyze when the network
is over-parameterized. Zhou et al. [2021] provided an intuitive illustration for this in their Section
4. For the general problem (2), Safran et al. [2020] showed that nice geometric properties that hold
when m = n, including one-point strong convexity and PL condition, do not hold when m < n.
In this paper, we go further and show that the difference in geometric landscape leads to totally
different convergence rates.
Non-smoothness and Implicit Regularization. The loss function is not smooth when student
neurons are close to 0, which brings a major technical challenge for a local convergence analysis.
Zhou et al. [2021] reparameterized the student neural network architecture to make the loss L
smooth. We show this artificial change is not necessary. Our observation is that GD implicitly
regularizes the student neurons and keeps them away from the non-smooth regions near 0. To
prove this, we show that wi cannot move too far in phase 3, by applying an algebraic trick to upper-
bound (cid:80)∞
t=T η∥∇wiL(w(t))∥ with L(w(T )) (Lemma 22). A similar regularization property for
GD was given in Du et al. [2018b], but it applies layer-wise rather than neuron-wise as in our paper.
Improving the Gradient Lower Bound.
In our local convergence phase, we establish a local
gradient lower bound similar to Theorem 3 in Zhou et al. [2021]. Moreover, we improve their
bound from ∥∇wL(w)∥ ≥ Ω(L(w)) to ∥∇wL(w)∥ ≥ Ω(L2/3(w)) (Theorem 7). The idea in
Zhou et al. [2021] is to pick an arbitrary global minimum {w∗
i⟨∇wiL(w), wi −
w∗
i }n
i=1 such
that ∥wi −w∗
i ∥ is small, then applying Cauchy inequality to get a tighter bound. This improvement
is crucial since it improves the final bound of convergence rate from L = O(T −1) in Zhou et al.
[2021] to L = O(T −3), which matches the lower bound in Theorem 2. This also indicates the
optimality of the improved dependency L2/3.
Non-degeneracy Condition. While the lower bound for the convergence rate is straightforward
to prove in the worst-case (i.e., from a bad initialization), the average-case (i.e., with random
initialization) lower bound is highly-nontrivial due to the existence of several counter-examples in
the benign cases (see Section 5.1). To distinguish these counter-examples from general cases, we
establish a new non-degeneracy condition and build our lower bound upon it. We define a potential
function Z(t) = (cid:80)
i<j ∥zi(t) − zj(t)∥, where zi := wi − ⟨wi, v⟩v. As long as the initialization
is non-degenerate (See Definition 11), then Z(t) = Ω(t−1) and L(w(t)) ≥ Ω(Z 3(t)n−5/∥v∥),
which imply L(w(t)) ≥ Ω(t−3). Intuitively, the slow convergence rate of L when n ≥ 2 is due to
the slow convergence of term zi − zj, (i ̸= j), and we define Z(t) to formalize this idea.
i ⟩ ≥ L(w). We improve their proof technique by carefully choosing a specific {w∗
i=1 and show (cid:80)
i }n
5
3 Preliminaries
In this paper, bold-faced letters denote vectors. We use [n] to denote {1, 2, . . . , n}.
Notations.
For any nonzero vector v ∈ Rd, the corresponding normalized vector is denoted with v := v
∥v∥.
For two nonzero vectors w, v ∈ Rd, θ(w, v) := arccos (⟨w, v⟩) denotes the angle between them.
For simplicity, we also adopt some notational conventions. Denote the gradient of the ith stu-
dent neuron with ∇i := ∂L(w)
. For any variable w that changes during the training process, w(t)
∂wi
denotes its value at the tth iteration, e.g., wi(t) indicates the value of wi at the tth iteration. Some-
times we omit the iteration index t when this causes no ambiguity. We abbreviate the expectation
taken w.r.t the standard Gaussian as Ex[*] := Ex∼N (0,I)[*].
Special Notations for Important Terms. There are several important terms in our analysis and
we give each of them a special notation. θi := θ(wi, v) denotes the angle between wi and v.
θij := θ(wi, wj) denotes the angle between wi and wj. Define
r :=
n
(cid:88)
i=1
wi − v,
and R : Rd → R, R(x) :=
n
(cid:88)
j=1
[w⊤
j x]+ − [v⊤x]+.
Then L(w) = Ex[ 1
2R2(x)]. Define the length of the projection of wi onto v as
hi = ⟨wi, v⟩.
Lastly, define
H := ∥v∥ −
(cid:88)
i∈[n]
hi = ⟨v, −r⟩.
Closed Form Expressions of Loss and Gradient. When the input distribution is standard Gaus-
sian, closed form expressions of L(w) and ∇L(w) can be obtained [Safran and Shamir, 2018]. The
complete form is deferred to Appendix A. Here we only present the closed form of gradient as it
is used extensively in our analysis: Safran and Shamir [2018] showed that when wi ̸= 0, ∀i ∈ [n],
the loss function is differentiable with gradient given by:
∇i =
1
2
(cid:32)
(cid:88)
j
(cid:33)
wj − v
+
(cid:34)(cid:32)
1
2π
(cid:88)
j̸=i
∥wj∥ sin θij − ∥v∥ sin θi
wi −
(cid:33)
(cid:35)
θijwj + θiv
.
(3)
(cid:88)
j̸=i
4 Proof Overview: Global Convergence
In this section we provide a proof sketch for Theorem 1. Full proofs for all theorems and lemmas
can be found in the Appendix. We start with the initialization.
4.1 Initialization
We need the following conditions, which hold with high probability by random initialization.
Lemma 3. Let s1 := 1
the following properties hold at the initialization:
d. When d = Ω(log(n/δ)), with probability at least 1 − δ,
d, s2 := 2σ
2σ
√
√
∀i ∈ [n], s1 ≤ ∥wi(0)∥ ≤ s2, and
π
3
≤ θi(0) ≤
2π
3
.
(4)
6
Condition (4) gives upper bound s2 and lower bound s1 for the norms of wi(0), and states θi
3 ] initially. These are standard facts in high-dimensional probability.
will fall in the interval [ π
See Appendix E.1 for proof details. The rest of our analysis will proceed deterministically.
3 , 2π
4.2 Phase 1
We present the main theorem of Phase 1, which starts at time 0 and ends at time T1.
Theorem 4 (Phase 1). Suppose the initial condition in Lemma 3 holds. For any ε1 = O(1), (ε1 >
, by
0), there exists C = O
setting T1 := C
η , the following holds for ∀1 ≤ i ≤ n, 0 ≤ t ≤ T1:
such that for any σ = O (cid:0)Cε48
1 d−1/2∥v∥(cid:1) and η = O
(cid:16) nCσ
∥v∥
(cid:16) ε2
1
n
(cid:17)
(cid:17)
√
d
s1 ≤ ∥wi(t)∥ ≤ s2 + 2η∥v∥t,
and sin2
(cid:19)
(cid:18) θi(t)
2
(cid:18)
1 +
− ε2
1 ≤
ηt
s2/∥v∥
(cid:19)−1/24 (cid:18)
sin2
(cid:19)
(cid:18) θi(0)
2
(cid:19)
.
− ε2
1
Consequently, at the end of Phase 1, we have
∀i ∈ [n], θi(T1) ≤ 4ε1,
and hi(T1) ≤ 2hj(T1), ∀i, j ∈ [n].
(5)
(6)
(7)
(8)
(5) gives upper and lower bounds for ∥wi∥. (6) is used to bound the dynamics of θi. (7) shows
that θi is small at the end of Phase 1, so the student neurons are approximately aligned with the
teacher neuron. (8) states that the student neurons' projections on the teacher neuron are balanced.
Now we briefly describe our proof ideas.
Proof of (5). Proving the upper bound of ∥wi∥ is straightforward, since triangle inequality implies
an upper bound of gradient norm ∥∇i∥ = O(∥v∥ + (cid:80)
i ∥wi∥), and the increasing rate of ∥wi∥ is
bounded by η∥∇i∥. Note that we use ∥wi∥ to upper bound ∥∇i∥, and use ∥∇i∥ to upper bound
∥wi∥, so the argument can proceed inductively.
Given with the upper bound, we know that ∥wi∥ = O(η∥v∥t) = O(ε2
1∥v∥/n) is a small term.
Then the gradient (3) can be rewritten as:
∇i = −
1
2π
(∥v∥ sin θiwi + (π − θi)v) + O(ε2
1∥v∥2).
(9)
With (9), we prove the lower bound ∥wi∥ ≥ s1 by showing that ∥wi∥ monotonically increases.
Proof of (6). The condition (6) aims to show that θi would decrease. Our intuition is clear:
Since in each GD iteration, the update of wi (the inverse of gradient (9)) is approximately a linear
combination of wi and v, the angle between wi and v is going to decrease.
However, there is a technical difficulty when converting the above intuition into a rigorous
proof, which is caused by the small perturbation term O(ε2
1∥v∥2) in (9). When θi is large, showing
θi would decrease is easy since this term is negligible. But when θi is too small, the effects of this
perturbation term on the dynamics of θi is no longer negligible. As a result, we cannot directly
show that θi decreases monotonically. Instead, we prove a weaker condition on the dynamics of
7
θi and perform an algebraic trick (See (32) (33) in Appendix B). Define χi(t) := sin2 (cid:16) θi(t)
have
2
(cid:17)
. We
χi(t) − χi(t + 1) ≥
⇒χi(t + 1) − ε2
1 ≤
(cid:18)
η∥v∥
12∥wi(t + 1)∥
(cid:0)χi(t) − ε2
1
(cid:1)
1 −
η∥v∥
12∥wi(t + 1)∥
(cid:19)
(cid:0)χi(t) − ε2
1
(cid:1) .
(10)
(cid:16)
(cid:17)
12∥wi(t′)∥
1 − η∥v∥
(χi(0) − ε2
1) (even if χi(t) − ε2
1, hence both cases of θi being large and θi
1 ≤
1 might be negative for some t). This bound,
Note that (10) holds regardless of the sign of χi(t) − ε2
being small are gracefully handled. Therefore we can apply (10) iteratively to get χi(t + 1) − ε2
Πt+1
t′=1
combined with algebraic calculations, yields (6).
Proof of (7). Applying (6) with t = T1 and some basic algebraic calculations yields (7).
Proof of (8). To prove (8), we divide Phase 1 into two intervals: [0, T1/50] and [T1/50, T1]. We
first show that θi remains small in the second interval: [T1/50, T1]. Given with θi being small,
nice properties of the gradient implies that hi monotonically increases, and its increasing rate
approximately equals η
2 H (see (35)), which is identical for all i. Therefore, the increases of hi
in the second interval: hi(T1) − hi(T1/50) are balanced. Then we show that hi(T1/50) is small
compared to hi(T1) − hi(T1/50). These two properties together shows that hi(T1) are balanced.
4.3 Phase 2
Our second phase starts at time T1 + 1 and ends at time T2. The main theorem is as follows.
Theorem 5 (Phase 2). Suppose the initial condition in Lemma 3 holds. For ∀ε2 = O(1), set
ε1 = O (cid:0)ε6
, then ∀T1 ≤ t ≤ T2,
2n−1/2(cid:1) in Theorem 4, η = O
and T2 = T1 +
(cid:16) ε2
(cid:108) 1
nη ln
1σ2d
∥v∥2
(cid:16) 1
36ε2
(cid:17)(cid:109)
(cid:17)
hi(t) ≤ 2hj(t), ∀i, j,
(11)
(cid:17)t−T1
(cid:16)
1 −
nη
2
∥v∥ + 6ε2∥v∥ ≥ H(t) ≥
∥v∥ − 6ε2∥v∥ ≥ 18ε2∥v∥,
(12)
(cid:17)t−T1
(cid:16)
2
3
1 −
nη
2
s1
2
θi(t) ≤ ε2, ∀i.
≥ hi(t) ≥
2∥v∥
n
, ∀i.
(13)
(14)
(11) is the continuation of (5), which shows that the projections hi remain balanced in Phase
2. (12) bounds the dynamics of H(t). It shows that H(t) exponentially decreases and gives upper
and lower bounds. (13) gives upper and lower bounds for hi. (14) shows that θi remains upper
bounded by a small term ε2 in Phase 2. Below we prove (11) (12) (13) (14) together inductively.
Proof of (11). Similar to (8), note that (14) guarantees that θi is small, so we still have that, for
∀i, hi monotonically increases with rate approximately η
Proof of (12). To understand why we need the bound (12), note that the gradient (3) has the
following property:
2 H. Therefore, hi will remain balanced.
∇i =
1
2
r + O((n max
i
∥wi∥ + ∥v∥) max
i
θi).
(15)
8
By (13) and (14), maxi θi ≤ ε2, and maxi ∥wi∥ = O(∥v∥/n). So the second term in (15) can be
bounded as O((n maxi ∥wi∥ + ∥v∥) maxi θi) ≤ O(ε2∥v∥). When O(ε2∥v∥) is much smaller than
the first term r/2 in (15), we have ∇i ≈ r/2. Consequently, r and H = ⟨v, −r⟩ will decrease
with an exponential rate. But this will end when r becomes no larger than O(ε2∥v∥) and the
approximation ∇i ≈ r/2 no longer holds, and that is the end of Phase 2.
So H should decrease (with exponential rate) to a small value, and it also should not be too
small to ensure that ∥r/2∥ ≫ O(ε2∥v∥) (since H = ⟨v, −r⟩). So we need to use (12) to simul-
taneously upper and lower bound H. With the above intuition, proving (12) is straightforward as:
∇i ≈ r/2 ⇒ H(t + 1) ≈ (1 − nη/2)H(t) ≈ * * * ≈ (1 − nη/2)t−T1H(T1).
It is worth noting that, we also need to handle a perturbation term when bounding the dynamics
of H(t), and we used the same trick as in proving (6).
Proof of (13). The left inequality can be derived from (11) and (12). The right inequality can be
derived from the monotonicity of hi, (14) and (5).
Proof of (14). This is the most difficult part in Theorem 5. Recall that in Phase 1 we used the
gradient approximation (9) to bound θi, but (9) relies on ∥wi∥ being a small term, which only holds
in phase 1. So this time we use a totally different method to bound θi.
First we calculate the dynamics of cos θi and get (see the proof in Appendix C for details):
cos(θi(t+1))−cos(θi(t)) = I1 +I2, where term I1 ≥ − η
∥wi(t+1)∥,
2
and term I2 is a small perturbation term. The next step is to establish the condition (11), then use
it to bound the term ∥wj (t)∥
j̸=i sin θi(t) sin(θi(t)+θj(t)) ∥wj (t)∥
∥wi(t+1)∥ in I1. Consequently, we have
(cid:80)
cos(θi(t + 1)) − cos(θi(t)) = I1 + I2 ≥ −2η
(cid:88)
j̸=i
sin θi(t)(sin θi(t) + sin θj(t)) + I2.
(16)
However, this is still not enough to prove the bound. The lower bound of the dynamics of cos θi
in (16) depends on θj where j ̸= i. Since θj might be much larger then θi, the increasing rate of θi
still cannot be upper-bounded.
To solve this problem, our key idea is to consider all θi's together. Define a potential function
V (t) := (cid:80)
i sin2 (θi(t)/2), then we can sum the bound in (16) over all i's to get an upper bound
for the increasing rate of V . Although the bound for θi depends on other θj's, the bound for V
only depends on V itself. Consequently, the dynamics of the potential function V can be upper
bounded, which yields the final upper bound (14).
4.4 Phase 3
Theorem 6 (Phase 3). Suppose the initial condition in Lemma 3 holds. If we set ε2 = O(n−14) in
Theorem 5, η = O (cid:0) 1
n2
(cid:1), then ∀T ∈ N we have
4∥v∥
n
≥ ∥wi(T + T2)∥ ≥
∥v∥
4n
and L(T + T2) ≤ O
(cid:18) n4∥v∥2
(ηT )3
(cid:19)
.
(17)
This is the desired 1/T 3 convergence rate. Our analysis consists of two steps:
1. Prove a gradient lower bound ∥∇L(w)∥ ≥ poly(n−1, ∥v∥−1)L2/3(w).
2. Prove that the loss function is smooth and Lipschitz on the gradient trajectory.
Given these two properties, the convergence can be established via the standard analysis for GD.
9
4.4.1 Step 1: Gradient Lower Bound.
Theorem 7 (Gradient Lower Bound). If for every student neuron we have 4∥v∥
and L(w) = O
, then ∥∇wL(w)∥ ≥ Ω
(cid:16) L2/3(w)
n2/3∥v∥1/3
(cid:16) ∥v∥2
n14
(cid:17)
(cid:17)
.
n ≥ ∥wi∥ ≥ ∥v∥
4n ,
As stated in Section 2, this theorem is an improved version of Theorem 3 in Zhou et al. [2021],
improving the dependency of L from ∥∇wL(w)∥ ≥ Ω(L(w)) to ∥∇wL(w)∥ ≥ Ω(L2/3(w)).
Below we introduce our idea of improving the bound.
Lemma 8 (Gradient Projection Bound). Suppose w∗
function L. Define θmax := maxi∈[n] θi, then
1, w∗
2, . . . , w∗
n is a global minimum of loss
n
(cid:88)
i=1
(cid:28) ∂
∂wi
L(w), wi − w∗
i
(cid:29)
≥ 2L(w) − O (cid:0)θ2
max∥r∥ * ∥v∥(cid:1) .
(18)
1, w∗
2, . . . , w∗
Lemma 8 uses the idea of "descent direction" from Lemma C.1 in Zhou et al. [2021]. The
idea is to pick a global minimum w∗
n and lower bound the projection of gradient on
the direction wi − w∗
i . Recall that Zhou et al. [2021] made artificial modifications of the network
architecture for technical reasons, e.g., they used the absolute value activation x → |x| instead of
ReLU. Therefore, their proof cannot be directly applied to our lemma. However, we show that
their idea still works in our setting, and modified their proof to prove Lemma 8 in Appendix D.2.
With Lemma 8 and several technical lemmas (Lemma 18, 19 in Appendix D.2), it is easy show
(cid:68) ∂
that the last term O (θ2
≥ L(w).
∂wi
Then we need to upper bound ∥wi − w∗
i ∥, and that is the step where we make the improvement.
In Zhou et al. [2021], they picked an arbitrary global minimum {w∗
i=1 and treated the term
i ∥ as constantly large. Consequently, their gradient lower bound scale with L−1, yielding
∥wi − w∗
a final convergence rate of L(w(T )) ≤ O(T −1). In contrast, our key observation is that we can
pick a specific global minimum {w∗
max∥r∥ * ∥v∥) in (18) is small, so (cid:80)n
L(w), wi − w∗
i
i=1 that depends on {wi}n
i=1. Specifically, we define
i }n
i }n
i=1
(cid:69)
∀i ∈ [n], w∗
i :=
hi
j hj
(cid:80)
v.
Then Lemma 20 shows that ∥wi − w∗
Finally, direct application of Cauchy inequality yields the improved bound Theorem 7.
i ∥ ≤ O(L1/3(w)) is a small term rather than a constant term.
4.4.2 Step 2: Smoothness and Lipschitzness
The aim of step 2 is to show the smoothness and Lipschitzness of L. However, one can see from (3)
that L is neither Lipschitz nor smooth. The problem of non-Lipschitzness is easy to address, since
(3) implies that ∥∇L∥ is upper bounded by ∥wi∥, and ∥wi∥ is upper bounded by L(w). However,
the non-smoothness property of L is hard to handle. By the closed form expression of ∇2L (see
(50)), one can see that ∥∇2L∥ scales with ∥v∥
∥wi∥. Then ∥∇2L∥ → ∞ as ∥wi∥ → 0.
As stated in Section 2, our idea of solving this problem is to show that GD implicitly regularizes
wi such that ∥wi∥ is always lower and upper bounded, namely (17) in Theorem 6. This property
ensures the smoothness of L on GD trajectory (see Lemma 21 for details).
10
t=T2
Implicit Regularization of Student Neurons. Next we describe our idea of proving the implicit
regularization condition (17). It is not hard to give ∥wi(T2)∥ lower and upper bounds (see Lemma
17). Therefore, we only need to show that the student neurons do not move very far in phase 3. In
other words, we wish to bound (cid:80)T
η∥∇L(w(t))∥ for ∀T > T2. The intuition is very clear: in
phase 3, the loss being small implies that the decrease of loss is small. Since the move of student
neurons results in the decrease of loss, the change of ∥wi∥ should also be small. However, the
following subtlety emerges when constructing a rigorous proof.
The Importance of the Improved Gradient Lower Bound. We want to emphasize that our
improved gradient lower bound (Theorem 7) is crucial for bounding the movement of student
neurons (cid:80)T
η∥∇L(w(t))∥. There is an intuitive explanation for this: The weaker bound
∥∇L(w(t))∥ ∼ L(w(t)) implies the rate L(w(T )) ∼ 1
T (i.e., the rate in Zhou et al. [2021]).
1
Then ∥∇L(w(t))∥ ∼ L(w(t)) ∼ 1
t . But the infinite sum
(cid:80)∞
η∥∇L(w(t))∥ ∼ (cid:80)T
T and (cid:80)T
1
t diverges, so we cannot derive any meaningful bound.
t=T2
On the other hand, the improved gradient lower bound ∥∇L(w(t))∥ ∼ L2/3(w(t)) implies the
T 3 ⇒ ∥∇L(w(t))∥ ∼ L2/3(w(t)) ∼ 1
η∥∇L(w(t))∥ ∼
1
t2 , which is finite. See Lemma 22 for the rigorous argument.
convergence rate L(w(T )) ∼ 1
(cid:80)T
T 2 ⇒ (cid:80)T
t=T2
t=T2
t=T2
t=T2
t=T2
4.5 Main Theorem
Now we are ready to state and prove the formal version of Theorem 1.
Theorem 9 (Global Convergence). For ∀δ > 0, if d = Ω(log(n/δ)), σ = O (cid:0)n−4226d−1/2∥v∥(cid:1) ,
(cid:16) log n
such that with probability at least 1 − δ over
η = O
nη
, then there exists T2 = O
(cid:16) σ2d
n169∥v∥2
(cid:17)
(cid:17)
the initialization, for any T ∈ N, L(w(T + T2)) ≤ O
(cid:16) n4∥v∥2
(ηT )3
(cid:17)
.
To combine three phases of our analysis together, the last step is to assign values to the parame-
ters in Theorem 4, 5, 6 (ε2, ε1, C, σ, η, T1, T2) such that the previous phase satisfies the requirements
of the next phase. For a complete list of the values, we refer the readers to Appendix E.2. With the
parameter valuations in Appendix E.2, combining the initialization condition (Lemma 3) and three
phases of our analysis (Theorem 4, 5, 6) together proves Theorem 9 immediately.
Remark 10. Careful readers might notice that, if there exists i such that wi = 0, then L is not
differentiable and gradient descent is not well-defined. However, such a corner case has been
naturally excluded in our previous analysis. (See Appendix E.3 for a detailed discussion.)
5 Proof Overview: Convergence Rate Lower Bound
In this section, we provide a general overview for the convergence rate lower bound. Full proofs
of all theorems can be found in Appendix F. We consider the gradient flow (gradient descent with
infinitesimal step size):
∂w(t)
∂t
= −
∂L(w(t))
∂w
, ∀t ≥ 0,
while keeping other settings (network architecture, initialization scheme, etc.) unchanged.
To understand why over-parameterization causes a significant change of the convergence rate,
we first investigate several toy cases.
11
5.1 Case study
Set n = 2, w1(0) = λ1(0)v + λ2(0)v⊥, w2(0) = λ1(0)v − λ2(0)v⊥, where
Toy Case 1.
λ1(0), λ2(0) > 0, v⊥ is a vector orthogonal with v such that ∥v⊥∥ = ∥v∥. Then w1(0) and
w2(0) are reflection symmetric with respect to v (See Figure 2). Consider gradient descent with
step size η initialized from (w1(0), w2(0)). It is easy to see that the symmetry of w1 and w2 is
preserved in GD update, so for t = 0, 1, 2, . . . there exists λ1(t), λ2(t) such that w1(t) = λ1(t)v +
λ2(t)v⊥, w2(t) = λ1(t)v − λ2(t)v⊥. Since θ1(t) = θ2(t), ∀t ∈ N, we denote θ := θ1 = θ2. Then
gradient (3) has the form
(cid:19)
(cid:18)
[(∥w2∥ sin(2θ) − ∥v∥ sin θ) w1 − 2θw2 + θv]
sin(2θ) −
(cid:19)
(cid:19)(cid:19)
λ1 − θ(2λ1 − 1)
v
sin θ
∇1 =
=
(cid:18)
λ1 −
λ1 −
1
2π
(cid:18)(cid:18)
v +
+
1
2π
1
2
1
2
(cid:18)
1
2π
+
(cid:18)
=
λ1 −
2θ + sin(2θ) −
(cid:19) (cid:18)
1 −
1
2
θ
π
+
∥v∥
∥w1∥
sin(2θ)
λ1
∥v∥
∥w1∥
(cid:19)
sin θ
(cid:19)
v +
λ2v⊥
(cid:18)
2θ +
1
2π
(cid:19)
sin(2θ)
λ1 − 1/2
λ1
λ1∥v∥/ cos θ sin θ = sin(2θ)
λ2v⊥,
λ1
(cid:0)λ1 − 1
2
(cid:1).
(cid:19)(cid:19)
,
(19)
θ(t)
π
+
sin(2θ(t))
λ1(t)
(cid:19)(cid:19)
where the last equality is because sin(2θ)− ∥v∥
A similar expression can be computed for ∇2.
∥w1∥ sin θ = sin(2θ)− ∥v∥
Then we can write out the dynamics of λ1 and λ2 as
(cid:18)
(cid:19) (cid:18)
(cid:18)
λ1(t + 1) −
=
λ1(t) −
1 − η
1 −
1
2
1
2
(cid:18)
(cid:18)
1 −
2θ +
η
2π
λ2(t + 1) = λ2(t)
Since θ = o(1), λ1 is a constant term, 1 − θ(t)
λ1 − 1/2
λ1
λ1(t) ≈ 1, then (19) implies 2 λ1(t +
2 exponentially fast. So
≈ λ2. Then (20) can be rewritten
2π λ2(t)(cid:1) . This indicates that λ2 converges to 0 with rate λ2(t) ∼ t−1.
Finally, we can compute the loss with (22) as L(w) = Θ ((2λ1 − 1)2 + (sin θ − θ cos θ)) ∥v∥2.
(cid:1) (1 − η). This indicates that λ1 converges to 1
sin(2θ) ≈ 2θ ≈ 2 tan θ = 2 λ2
λ1
2 ≈ (cid:0)λ1(t) − 1
1) − 1
λ1 − 1/2 = o(1) ⇒ 2θ + λ1−1/2
as λ2(t + 1) ≈ λ2(t) (cid:0)1 − η
π + sin(2θ(t))
sin(2θ)
(20)
λ1
.
2
2((cid:80)
j wj − v). One can easily see that (cid:80)
2 ∼ t−3, we know that the convergence rate is L(w(t)) ∼ t−3.
Since (sin θ − θ cos θ) ∼ θ3 ∼ λ3
Toy Case 2. Let n ≥ 2. We consider the case where all student neurons are parallel with the
teacher neuron: w1 = λ1v, . . . , wn = λnv, where λ1, . . . , λn ∈ R+. Then the gradient (3)
becomes ∇i = 1
i∈[n] λi converges exponentially fast to 0,
which means that the convergence rate in this toy case is actually linear.
Toy Case 3. Let n ≥ 2. We consider the case where all student neurons are equal: w1 = w2 =
. . . = wn. Then the gradient (3) becomes ∇i = 1
2π [−∥v∥ sin θiwi + θiv]. One
can see that the gradient in this case is just n times the gradient in the single student neuron case
where the student neuron is wi and the teacher neuron is v/n. So the training process is actually
equivalent with learning one teacher neuron ∥v∥/n with one student neuron, with the step size η
being multiplied by a factor of n. So in this toy case, the loss also have linear convergence.
2(nwi − v) + 1
2Here we use the ≈ sign to omit higher order terms.
12
θ
θ
w1
w2
v
Figure 2: Toy Case 1
5.2 Non-degeneracy
Toy case 1 above already implies that the convergence rate given by Theorem 9 is worst case
optimal. However, our ultimate goal is to prove an average case lower bound for the convergence
rate: Theorem 12. One can see that there is a huge gap between the worst case optimality and the
average case optimality. Proving the latter is much more difficult since toy case 2 and 3 exhibits
fast-converging initialization points that break the Ω(T −3) lower bound.
Therefore, we need to utilize the property of random initialization to show our lower bound of
Ω (1/T 3). Our idea is to show the lower bound holds as long as the initialization is non-degenerate.
To formalize the above idea, we first define a few important terms. For ∀i ∈ [n], define
zi := wi − ⟨wi, v⟩v as the projection of wi onto the orthogonal complement of v. Define Z(t) =
(cid:80)
1≤i<j≤n ∥zi(t) − zj(t)∥. Define Q+(t) := {i ∈ [n]|zi(t) ̸= 0} as the index set containing all i
with zi nonzero at time t. For i, j ∈ Q+, define κij := θ(zi, zj) as the angle between zi and zj.
Define κmax(t) := maxi,j∈Q+(t) κij(t) as the maximum angle between zi and zj.
Definition 11 (Non-degeneracy). When n ≥ 2, we say the initialization is non-degenerate if the
following two conditions are satisfied. (1) All zi's are nonzero: ∀i ∈ [n], zi(0) ̸= 0. (2) zi's are
not parallel: κmax(0) > 0.
Since zi's are initialized with a Gaussian distribution, the initialization is only degenerate on a
set with Lebesgue measure zero, so the probability of the initialization being non-degenerate is 1.
Now we are ready to state the formal version of Theorem 2 whose proof is in Appendix F.3.
Theorem 12 (Convergence Rate Lower Bound). Suppose the network is over-parameterized, i.e.,
n ≥ 2. Consider gradient flow: ∂w(t)
∂w . For ∀δ > 0, if the initialization is non-
degenerate, d = Ω(log(n/δ)), σ = O (cid:0)n−4226d−1/2∥v∥(cid:1), then there exists T2 = O (cid:0) log n
(cid:1) such that
with probability at least 1 − δ, for ∀t ≥ T2 we have
∂t = − ∂L(w(t))
n
L(w(t))−1/3 ≤ O
(cid:18)
n17/3
max(0)∥v∥2/3
κ2
(cid:19)
(t − T2) + γ,
where γ ∈ R+ is a constant that does not depend on t.
Remark 13. The bound in Theorem 12 depends on 1/κ−2
max(0). Such a dependence is reasonable
since we have shown that there would be counter-examples if κmax(0) = 0 (See toy case 3 in
Section 5.1).
13
5.3 Proof Sketch
Our key idea of proving Theorem 12 is to consider the potential function
Z(t) =
(cid:88)
i<j
∥zi(t) − zj(t)∥ where zi(t) := wi(t) − ⟨wi(t), v⟩v.
With Z(t), our proof consists of three steps:
1. Show that with the non-degeneracy condition, κmax(t) is lower bounded. (Lemma 28)
2. Show that when κmax is lower bounded by a positive constant, ∂
Z 2(t) (See (65) in Appendix F.3), so the convergence rate of Z(t) is at most Z(t) ∼ t−1.
3. Use Z(t) to lower bound L(w(t)): L(w(t)) ≥ Ω
. ((67) in Appendix F.3).
(cid:17)
(cid:16) Z3(t)
n5∥v∥
∂t Z(t) can be lower bounded by
Remark 14. The potential function Z(t) provides two implications.
• It explains why the convergence rate is different for n = 1 and n ≥ 2. For n ≥ 2, our analysis
implies that the slow convergence rate of Z (Z(t) ∼ t−1) induces the slow convergence rate of
L(t) ∼ t−3. When n = 1, Z is always zero, so L converges with linear rate. Intuitively, this is
because optimizing the difference between student neurons is hard, which is a phenomenon that
only exists in the over-parameterized case.
• It explains why the convergence rates in the two counter-examples (toy case 2 and 3 in Sec-
tion 5.1) are linear. In these two cases, the potential function Z degenerates to 0.
We need several technical properties of the gradient flow trajectory. The first one is the implicit
regularization condition: (17) in Theorem 6, and we use its gradient flow version (see Theorem 25
for details). We also need Corollary 26 and Lemma 27 to exclude the corner cases when wi = 0
and zi(t) = 0, where κmax is not well-defined. The proofs are deferred to Appendix F.1.
Lower bounding κmax is the most non-trivial step. We need to use the following lemma.
Lemma 15 (Automatic Separation of zi). If there exists i, j such that κij(t) = κmax(t) < π
cos κij(t) is well-defined in an open neighborhood of t, differentiable at t, and
2 , then
∂
∂t
(1 − cos κ2
cos κij(t) ≤ −
π − θij(t)
π
Lemma 15 states that, when the vectors zi are too close in direction, gradient flow will auto-
matically separate them, which immediately implies a lower bound of κmax (See Theorem 28). Its
proof idea is also interesting: we can easily compute the dynamics of cos κij, which splits into two
terms I1 and I2 (see (60) for them). I1 is a simple term that can be handled easily, but the second
term I2 is very complicated and seems intractable. Our key observation is that, although I2 is hard
to bound for general i, j, it is always non-positive if we pick the pair of i, j such that κij = κmax,
and that property implies Lemma 15 via some routine computations.
ij(t)).
(21)
Remark 16. We note that in toy case 3 in Appendix 5.1, all zi's remain parallel and will not be
separated. This is because the bound (21) in Lemma 15 implies that the initial condition κij =
0, ∀i, j is unstable. To see this, consider the ordinary differential equation ̇x = − ̃C(1 − x2)
where ̃C > 0 is a constant. The initial condition x(0) = 1 induces the solution x(t) ≡ 1, which
corresponds to toy case 3. But this initial condition is unstable since any perturbation of x(0)
results in solution x(t) = 1−exp(2 ̃Ct+c0)
, which implies an exponential increase of the perturbation,
1+exp(2 ̃Ct+c0)
hence the separation of zi.
14
Given with a lower bound of κmax(t), and the implicit regularization property in Theorem 25,
step 2 and step 3 can be proved with some geometric lemmas See Lemma 31, Lemma 29 and the
proof of Theorem 12 in Appendix F. Combining three steps together finishes our proof.
References
Z. Allen-Zhu, Y. Li, and Y. Liang. Learning and generalization in overparameterized neural net-
works, going beyond two layers, 2018. URL https://arxiv.org/abs/1811.04918.
Z. Allen-Zhu, Y. Li, and Z. Song.
A convergence theory for deep learning via over-
parameterization. In International Conference on Machine Learning, pages 242–252. PMLR,
2019.
Y. Arjevani and M. Field. Annihilation of spurious minima in two-layer relu networks. arXiv
preprint arXiv:2210.06088, 2022.
S. Arora, S. Du, W. Hu, Z. Li, and R. Wang. Fine-grained analysis of optimization and generaliza-
tion for overparameterized two-layer neural networks. In International Conference on Machine
Learning, pages 322–332. PMLR, 2019.
E. Boursier, L. Pillaud-Vivien, and N. Flammarion. Gradient flow dynamics of shallow relu net-
works for square loss and orthogonal inputs. arXiv preprint arXiv:2206.00939, 2022.
A. Brutzkus and A. Globerson. Globally optimal gradient descent for a convnet with gaussian
inputs. In International conference on machine learning, pages 605–614. PMLR, 2017.
Y. Cao and Q. Gu. Generalization bounds of stochastic gradient descent for wide and deep neural
networks. Advances in neural information processing systems, 32, 2019.
L. Chizat and F. Bach. On the global convergence of gradient descent for over-parameterized
models using optimal transport. Advances in neural information processing systems, 31, 2018.
L. Chizat, E. Oyallon, and F. Bach. On lazy training in differentiable programming. Advances in
neural information processing systems, 32, 2019.
S. Dasgupta and L. Schulman. A two-round variant of em for gaussian mixtures, 2013. URL
https://arxiv.org/abs/1301.3850.
S. Du, J. Lee, Y. Tian, A. Singh, and B. Poczos. Gradient descent learns one-hidden-layer cnn:
Don't be afraid of spurious local minima. In International Conference on Machine Learning,
pages 1339–1348. PMLR, 2018a.
S. Du, J. Lee, H. Li, L. Wang, and X. Zhai. Gradient descent finds global minima of deep neural
networks. In International conference on machine learning, pages 1675–1685. PMLR, 2019.
S. S. Du, J. D. Lee, and Y. Tian. When is a convolutional filter easy to learn? arXiv preprint
arXiv:1709.06129, 2017.
15
S. S. Du, W. Hu, and J. D. Lee. Algorithmic regularization in learning deep homogeneous models:
Layers are automatically balanced. Advances in neural information processing systems, 31,
2018b.
S. S. Du, X. Zhai, B. Poczos, and A. Singh. Gradient descent provably optimizes over-
parameterized neural networks, 2018c. URL https://arxiv.org/abs/1810.02054.
R. Dwivedi, N. Ho, K. Khamaru, M. I. Jordan, M. J. Wainwright, and B. Yu. Singularity, misspec-
ification, and the convergence rate of em, 2018. URL https://arxiv.org/abs/1810.
00828.
C. Fang, J. Lee, P. Yang, and T. Zhang. Modeling from features: a mean-field framework for
over-parameterized deep neural networks. In Conference on learning theory, pages 1887–1936.
PMLR, 2021.
S. Goel, A. Klivans, and R. Meka. Learning one convolutional layer with overlapping patches. In
International Conference on Machine Learning, pages 1783–1791. PMLR, 2018.
A. Jacot, F. Gabriel, and C. Hongler. Neural tangent kernel: Convergence and generalization in
neural networks. Advances in neural information processing systems, 31, 2018.
S. M. Kakade, V. Kanade, O. Shamir, and A. Kalai. Efficient learning of generalized linear and sin-
gle index models with isotonic regression. Advances in Neural Information Processing Systems,
24, 2011.
Y. Li and Y. Liang. Learning overparameterized neural networks via stochastic gradient descent
on structured data. Advances in neural information processing systems, 31, 2018.
Y. Li and Y. Yuan. Convergence analysis of two-layer neural networks with relu activation. Ad-
vances in neural information processing systems, 30, 2017.
Y. Li, T. Ma, and H. R. Zhang. Learning over-parametrized two-layer relu neural networks beyond
ntk. arXiv preprint arXiv:2007.04596, 2020.
T. Liu, M. Chen, M. Zhou, S. S. Du, E. Zhou, and T. Zhao. Towards understanding the impor-
tance of shortcut connections in residual networks. Advances in neural information processing
systems, 32, 2019.
Y. Lu, C. Ma, Y. Lu, J. Lu, and L. Ying. A mean field analysis of deep resnet and beyond: Towards
In International Conference on
provably optimization via overparameterization from depth.
Machine Learning, pages 6426–6436. PMLR, 2020.
Y. Nesterov et al. Lectures on convex optimization, volume 137. Springer, 2018.
P.-M. Nguyen and H. T. Pham. A rigorous framework for the mean field limit of multilayer neural
networks. arXiv preprint arXiv:2001.11443, 2020.
A. Nitanda and T. Suzuki. Stochastic particle gradient descent for infinite ensembles. arXiv
preprint arXiv:1712.05438, 2017.
16
S. Oymak and M. Soltanolkotabi. Toward moderate overparameterization: Global convergence
guarantees for training shallow neural networks. IEEE Journal on Selected Areas in Information
Theory, 1(1):84–105, 2020.
F. Richert, R. Worschech, and B. Rosenow. Soft mode in the dynamics of over-realizable online
learning for soft committee machines. Physical Review E, 105(5):L052302, 2022.
I. Safran and O. Shamir. Spurious local minima are common in two-layer ReLU neural networks.
In J. Dy and A. Krause, editors, Proceedings of the 35th International Conference on Machine
Learning, volume 80 of Proceedings of Machine Learning Research, pages 4433–4441. PMLR,
10–15 Jul 2018. URL https://proceedings.mlr.press/v80/safran18a.html.
I. Safran, G. Yehudai, and O. Shamir. The effects of mild over-parameterization on the optimization
landscape of shallow relu neural networks. CoRR, abs/2006.01005, 2020. URL https://
arxiv.org/abs/2006.01005.
M. Soltanolkotabi. Learning relus via gradient descent. Advances in neural information processing
systems, 30, 2017.
Y. Tian. An analytical formula of population gradient for two-layered relu network and its ap-
plications in convergence and critical point analysis. In International conference on machine
learning, pages 3404–3413. PMLR, 2017.
C. Wei, J. D. Lee, Q. Liu, and T. Ma. Regularization matters: Generalization and optimization of
neural nets vs their induced kernel. Advances in Neural Information Processing Systems, 32,
2019.
C. Wu, J. Luo, and J. D. Lee. No spurious local minima in a two hidden unit relu network. 2018.
Y. Wu and H. H. Zhou. Randomly initialized em algorithm for two-component gaussian mixture
achieves near optimality in O(
n) iterations. arXiv preprint arXiv:1908.10935, 2019.
√
G. Yehudai and S. Ohad. Learning a single neuron with gradient methods. In J. Abernethy and
S. Agarwal, editors, Proceedings of Thirty Third Conference on Learning Theory, volume 125
of Proceedings of Machine Learning Research, pages 3756–3786. PMLR, 09–12 Jul 2020. URL
https://proceedings.mlr.press/v125/yehudai20a.html.
G. Yehudai and O. Shamir. On the power and limitations of random features for understanding
neural networks. Advances in Neural Information Processing Systems, 32, 2019.
G. Zhang, S. Fattahi, and R. Y. Zhang. Preconditioned gradient descent for overparameterized
nonconvex burer–monteiro factorization with global optimality certification. arXiv preprint
arXiv:2206.03345, 2022.
X. Zhang, Y. Yu, L. Wang, and Q. Gu. Learning one-hidden-layer relu networks via gradient
In The 22nd international conference on artificial intelligence and statistics, pages
descent.
1524–1534. PMLR, 2019.
17
K. Zhong, Z. Song, P. Jain, P. L. Bartlett, and I. S. Dhillon. Recovery guarantees for one-hidden-
In International conference on machine learning, pages 4140–4149.
layer neural networks.
PMLR, 2017.
M. Zhou, T. Liu, Y. Li, D. Lin, E. Zhou, and T. Zhao. Toward understanding the importance of
In International Conference on Machine Learning, pages
noise in training neural networks.
7594–7602. PMLR, 2019.
M. Zhou, R. Ge, and C. Jin. A local convergence theory for mildly over-parameterized two-layer
neural network. In Conference on Learning Theory, pages 4577–4632. PMLR, 2021.
D. Zou, Y. Cao, D. Zhou, and Q. Gu. Gradient descent optimizes over-parameterized deep relu
networks. Machine learning, 109:467–492, 2020.
18
A Closed Form Expressions for L and ∇L
In this section, we present closed forms of L and ∇L, as computed in Safran and Shamir [2018].
Closed Form of L(w).
where
L(w) =
1
2
n
(cid:88)
i,j=1
Υ(wi, wj) −
n
(cid:88)
i=1
Υ(wi, v) +
1
2
Υ(v, v),
Υ(w, v) = Ex∼N (0,I))
(cid:104)(cid:2)w⊤x(cid:3)
+
(cid:2)v⊤x(cid:3)
(cid:105)
+
=
1
2π
∥w∥ ∥v∥(sin(θw,v) + (π − θw,v) cos(θw,v)).
Rearranging terms yields
L(w) =
1
4
∥
(cid:88)
i
wi−v∥2+
1
2π
(cid:34)
(cid:88)
i<j
(sin θij − θij cos θij)∥wi∥ ∥wj∥ −
(cid:88)
i
(sin θi − θi cos θi)∥wi∥ ∥v∥
.
(cid:35)
(22)
Closed Form of ∇L(w). When wi ̸= 0, ∀i ∈ [n], Safran and Shamir [2018] showed that the loss
function is differentiable and the gradient is given by
∇i = Ex∼N (0,I)
(cid:34)(cid:32) n
(cid:88)
(cid:2)w⊤
j x(cid:3)
+
(cid:33)
− (cid:2)v⊤x(cid:3)
+
(cid:35)
1 (cid:8)w⊤
i x ≥ 0(cid:9) x
j=1
(cid:33)
wj − v
+
=
1
2
(cid:32)
(cid:88)
j
(cid:34)(cid:32)
1
2π
(cid:88)
j̸=i
∥wj∥ sin θij − ∥v∥ sin θi
wi −
(cid:33)
(cid:35)
θijwj + θiv
.
(cid:88)
j̸=i
B Global Convergence: phase 1
Theorem 4. Suppose the initial condition in Lemma 3 holds. For any ε1 = O(1), (ε1 > 0), there
exists C = O
, by setting
T1 := C
η ,3 the following holds for ∀1 ≤ i ≤ n, 0 ≤ t ≤ T1:
such that for any σ = O (cid:0)Cε48
1 d−1/2∥v∥(cid:1) and η = O
(cid:16) nCσ
∥v∥
(cid:16) ε2
1
n
(cid:17)
(cid:17)
√
d
s1 ≤ ∥wi(t)∥ ≤ s2 + 2η∥v∥t,
sin2
(cid:19)
(cid:18)θi(t)
2
(cid:18)
1 +
− ε2
1 ≤
ηt
s2/∥v∥
(cid:19)−1/24 (cid:18)
sin2
(cid:19)
(cid:18) θi(0)
2
(cid:19)
.
− ε2
1
Consequently, at the end of Phase 1, we have
and
∀i ∈ [n], θi(T1) ≤ 4ε1,
hi(T1) ≤ 2hj(T1), ∀i, j ∈ [n].
3Here we set η such that T1 = C/η ∈ N.
19
(23)
(24)
(25)
(26)
Proof. By Lemma 3, (23) and (24) holds for t = 0, and we have s1 ≤ ∥wi(0)∥ ≤ s2, ∀i.
Now we show with induction that (23) and (24) holds for ∀t ≤ T1.
For t < T1, assume (23) and (24) holds for 0, 1, . . . , t, we prove the case of t + 1.
First note that (24) holds for 0, 1, . . . , t implies that ∀t′ ≤ t, sin2(θi(t′)/2) ≤ max{sin2(θi(0)/2), ε2
1} ≤
sin2(π/3) ⇒ θi(t′) ≤ 2π/3.
Proof of the right inequality of (23). Consider ∀0 ≤ t′ ≤ t, note that ∥wi(t′)∥ ≥ s1 > 0, ∀i
implies that, for any i, j, the gradient ∇i(t′) and the angles θi(t′), θij(t′) are well-defined.
√
Note that s2 = 2σ
d = O ((ηT1)ε48
1 ∥v∥) ≤ ηT1∥v∥, so ∀0 ≤ t′ ≤ t we have
∥wi(t′)∥ ≤ s2 + 2η∥v∥t′ ≤ s2 + 2η∥v∥T1 ≤ 3C∥v∥ = O (cid:0)ε2
1/n(cid:1) ∥v∥ ≤
By triangle inequality, for ∀i ∈ [n], 0 ≤ t′ ≤ t,
∥∇i(t′)∥ ≤
≤
1
2
1
2
j
(cid:18) 1
3
(cid:32)
(cid:88)
(cid:33)
∥wj(t′)∥ + ∥v∥
+
(cid:34)
(cid:88)
∥wj(t′)∥ + ∥v∥ +
1
2π
(cid:19)
+ 1
∥v∥ +
1
2π
(cid:18) 1
3
+ 1 +
(cid:19)
j̸=i
π
3
+ π
∥v∥ ≤ 2∥v∥.
∥v∥
3n
.
(27)
(cid:35)
(cid:88)
j̸=i
π∥wj(t′)∥ + π∥v∥
(28)
Then ∥wi(t + 1)∥ can be upper-bounded as
∥wi(t + 1)∥ = ∥wi(0) −
t
(cid:88)
t′=0
η∇i(t′)∥ ≤ ∥wi(0)∥ +
t
(cid:88)
t′=0
η∥∇i(t′)∥ ≤ s2 + 2η(t + 1)∥v∥.
Proof of the left inequality of (23). Next we show that ∥wi(t + 1)∥ ≥ ∥wi(t)∥ ≥ s1. Note that
∥wi(t + 1)∥2 − ∥wi(t)∥2 = ∥wi(t) − η∇i(t)∥2 − ∥wi(t)∥2 = −2η⟨wi(t), ∇i(t)⟩ + η2∥∇i(t)∥2,
so to show ∥wi(t + 1)∥ ≥ ∥wi(t)∥, we only need to prove that ⟨wi(t), ∇i(t)⟩ < 0 (note that by
the induction hypothesis we have ∥wi(t)∥ > 0, therefore wi(t) is well-defined):
⟨wi(t), ∇i(t)⟩
= −
(π − θi(t)) ⟨wi(t), v⟩ + ⟨wi(t), ∥v∥ sin θi(t)wi(t)⟩
2π
(cid:88)
+
⟨wi(t), (π − θij(t))wj(t)⟩
2π
j
(π − θi(t)) cos θi(t) + sin θi(t)
2π
+
(π − θi(t)) cos θi(t) + sin θi(t)
2π
∥v∥ + O (cid:0)ε2
(cid:1) ∥v∥
1
1/12
2π
= −
(27)
≤ −
≤ −
<0.
(cid:68)
wi(t),
(cid:16)(cid:80)
(cid:17)
j̸=i ∥wj(t)∥ sin θij(t)
(cid:69)
wi(t)
2π
∥v∥ +
(cid:88)
j
(π − θij(t)) cos θij(t) + sin θij(t)
2π
∥wj(t)∥
∥v∥ + O (cid:0)ε2
1
(cid:1) ∥v∥
20
The reason for the second to last inequality is that, it is easy to verify by taking derivatives
that the expression (π − θ) cos θ + sin θ monotonically decreases on the interval [0, π], and the
induction hypothesis implies θi(t) ≤ 2π/3, therefore (π − θi(t)) cos θi(t) + sin θi(t) ≥ (π −
2π/3) cos(2π/3) + sin(2π/3) > 1/12.
Then we have ∥wi(t + 1)∥ ≥ ∥wi(t)∥ ≥ s1.
Proof of (24). First we calculate the dynamics of cos θi.
cos(θi(t + 1)) − cos(θi(t))
= ⟨wi(t + 1), v⟩ − ⟨wi(t), v⟩
∥wi(t)∥ ⟨wi(t + 1), v⟩ − ∥wi(t + 1)∥ ⟨wi(t), v⟩
∥wi(t + 1)∥ * ∥wi(t)∥
⟨wi(t), v⟩ (∥wi(t)∥ − ∥wi(t + 1)∥) − η∥wi(t)∥ ⟨∇i(t), v⟩
∥wi(t + 1)∥ * ∥wi(t)∥
⟨wi(t), v⟩ ∥wi(t)∥2−∥wi(t)−η∇i(t)∥2
∥wi(t)∥+∥wi(t+1)∥ − η∥wi(t)∥ ⟨∇i(t), v⟩
∥wi(t + 1)∥ * ∥wi(t)∥
⟨wi(t), v⟩
2η ⟨wi(t), ∇i(t)⟩ − η2∥∇i(t)∥2
∥wi(t)∥ + ∥wi(t + 1)∥
η ⟨wi(t), v⟩ ⟨wi(t), ∇i(t)⟩ + ⟨wi(t), v⟩
(cid:21)
− η ⟨∇i(t), v⟩
(cid:18) 2η ⟨wi(t), ∇i(t)⟩
∥wi(t)∥ + ∥wi(t + 1)∥
(cid:21)
− η ⟨∇i(t), v⟩
∥∇i(t)∥2
∥wi(t)∥ + ∥wi(t + 1)∥
⟨⟨wi(t), v⟩ wi(t) − v, ∇i(t)⟩
−
2η ⟨wi(t), ∇i(t)⟩
2∥wi(t)∥
(cid:19)
(cid:123)(cid:122)
I1
(cid:20) ⟨wi(t), ∇i(t)⟩ (∥wi(t)∥ − ∥wi(t + 1)∥)
∥wi(t)∥ + ∥wi(t + 1)∥
(cid:125)
(cid:123)(cid:122)
I2
− η
∥∇i(t)∥2
∥wi(t)∥ + ∥wi(t + 1)∥
.
(cid:21)
(cid:125)
(29)
=
=
=
=
=
(cid:20)
(cid:20)
1
∥wi(t + 1)∥
1
∥wi(t + 1)∥
− η2 ⟨wi(t), v⟩
=
η
∥wi(t + 1)∥
(cid:124)
+
η ⟨wi(t), v⟩
∥wi(t + 1)∥
(cid:124)
For the first term I1, note that the vector ⟨wi(t), v⟩ wi(t) − v is orthogonal with wi, therefore,
21
I1 =
η
∥wi(t + 1)∥
(cid:42)
⟨wi(t), v⟩ wi(t) − v,
1
2π
(cid:34)
(cid:88)
j̸=i
(π − θij(t))wj(t) − (π − θi(t))v
(cid:35)(cid:43)
(cid:34)
(π − θi(t)) sin2 θi(t)∥v∥ −
(cid:88)
j̸=i
(π − θij(t)) (cos θj(t) − cos θi(t) cos θij(t)) ∥wj(t)∥
(cid:35)
=
≥
(27)
≥
≥
η
2π∥wi(t + 1)∥
η
2π∥wi(t + 1)∥
η
2π∥wi(t + 1)∥
η∥v∥
2π∥wi(t + 1)∥
(cid:2)(π − θi(t)) sin2 θi(t)∥v∥ − nπ * 2∥wj(t)∥(cid:3)
(cid:2)(π − θi(t)) sin2 θi(t)∥v∥ − nπ * 2O(C)∥v∥(cid:3)
(cid:105)
sin2 θi(t) − O (nC)
,
(cid:104) π
3
where the last inequality is because θi(t) ≤ π/3.
The second term I2 is a small perturbation term, which can be lower bounded as:
I2 ≥ −
= −
η
∥wi(t + 1)∥
η2
s1∥wi(t + 1)∥
(cid:20)∥∇i(t)∥ * ∥η∇i(t)∥
2s1
(28)
≥ −
∥∇i(t)∥2
+ η
(cid:21)
∥∇i(t)∥2
2s1
4η2
s1∥wi(t + 1)∥
∥v∥2.
(30)
(31)
Combining both terms together, we get
cos(θi(t + 1)) − cos(θi(t)) = I1 + I2 ≥
≥
where the last inequality is because η = O
η∥v∥
2π∥wi(t + 1)∥
η∥v∥
6∥wi(t + 1)∥
(cid:16) nCσ
√
∥v∥
(cid:17)
d
(cid:20)π
3
sin2 θi(t) − O (nC) − 8πη
(cid:21)
∥v∥
s1
(cid:2)sin2 θi(t) − O (nC)(cid:3) ,
⇒ 8πη ∥v∥
s1
= O (nC).
(cid:19)
sin2
Therefore, we have
(cid:18) θi(t)
2
η∥v∥
12∥wi(t + 1)∥
≥
− sin2
(cid:19)
(cid:18) θi(t + 1)
2
=
(cid:2)sin2 θi(t) − O (nC)(cid:3) ≥
cos(θi(t + 1)) − cos(θi(t))
2
η∥v∥
12∥wi(t + 1)∥
(cid:20)
sin2
(cid:19)
(cid:18)θi(t)
2
(cid:21)
,
− ε2
1
(32)
where the last inequality is because cos(θi(t)/2) ≥ cos(π/3) = 1/2 ⇒ sin θi(t) = 2 sin(θi(t)/2) cos(θi(t)/2) ≥
sin(θi(t)/2), and C = O(ε2
1/n) ⇒ O(nC) ≤ ε2
1.
Then we have
sin2
(cid:19)
(cid:18) θi(t + 1)
2
− ε2
1 ≤ sin2
(cid:18)
(cid:19)
(cid:18) θi(t)
2
−
η∥v∥
12∥wi(t + 1)∥
η∥v∥
12∥wi(t + 1)∥
(cid:19) (cid:18)
sin2
(cid:20)
sin2
(cid:19)
(cid:18) θi(t)
2
(cid:21)
− ε2
1
− ε2
1
(cid:19)
(cid:19)
− ε2
1
(cid:18) θi(t)
2
(cid:19) (cid:18)
η
12 (s2/∥v∥ + 2η(t + 1))
sin2
(cid:19)
(cid:18) θi(t)
2
(cid:19)
.
− ε2
1
=
1 −
(cid:18)
≤
1 −
22
sin2
(cid:18) θi(t′ + 1)
2
(cid:17)
sin2 (cid:16) θi(t′)
For the same reason, for any t′ ∈ {0, 1, . . . , t} we have
(cid:18)
(cid:19)
− ε2
1 ≤
1 −
η
12 (s2/∥v∥ + 2η(t′ + 1))
(cid:19) (cid:18)
sin2
(cid:19)
(cid:18) θi(t′)
2
(cid:19)
.
− ε2
1
(33)
− ε2
1 can both be positive or negative, but (33) always holds regardless of its sign.
2
η
Since 1 −
12(s2/∥v∥+2η(t′+1)) is always positive, and multiplying both sides of an inequality by a
positive number does not change the direction of the inequality, we can iteratively apply (33) and
get
sin2
(cid:19)
(cid:18) θi(t + 1)
2
t+1
(cid:89)
(cid:18)
1 −
− ε2
1 ≤
η
12 (s2/∥v∥ + 2ηu)
(cid:19) (cid:18)
sin2
(cid:19)
(cid:19)
(cid:19)
− ε2
1
(cid:18) θi(0)
2
(cid:18) θi(0)
2
(cid:18) θi(0)
2
(cid:18) θi(0)
2
sin2
sin2
− ε2
1
(cid:19)
sin2
(cid:19) (cid:18)
(cid:19)(cid:19) (cid:18)
(cid:19)
(cid:19)
− ε2
1
(cid:19)
(cid:19)
− ε2
1
u=1
t+1
(cid:89)
u=1
≤
(cid:18)
exp
−
η
12 (s2/∥v∥ + 2ηu)
(cid:19) (cid:18)
(cid:18)(cid:90) t+2
≤ exp
−
du
η
12 (s2/∥v∥ + 2ηu)
(cid:18) s2 + (t + 2)2η∥v∥
s2 + 2η∥v∥
(cid:18)
u=1
1
24
−
ln
= exp
(cid:18)
≤
1 +
η(t + 1)
s2/∥v∥
(cid:19)−1/24 (cid:18)
sin2
(cid:19)
(cid:18) θi(0)
2
(cid:19)
,
− ε2
1
where the last inequality is because 2η∥v∥ ≤ s1 ≤ s2. (Note that, by Lemma 3, sin2 (cid:16) θi(0)
is always positive.)
Proof of (25). W.L.O.G., suppose T1/50 ∈ N. By (24), for ∀t ∈ [T1/50, T1] we have that
2
(cid:17)
− ε2
1
sin2
(cid:19)
(cid:18)θi(t)
2
(cid:18)
1 +
− ε2
1 ≤
ηt
s2/∥v∥
(cid:19)−1/24 (cid:18)
sin2
(cid:19)
(cid:18)θi(0)
2
(cid:19)
≤
− ε2
1
(cid:18) ηT1/50
O ((ηT1)ε48
1 )
(cid:19)−1/24
≤ ε2
1.
(34)
Since ε1 = O(1) is a sufficiently small constant, we have
∀t ∈ [T1/50, T1], sin
(cid:19)
(cid:18) θi(t)
2
≤
√
2ε1 ⇒ ∀t ∈ [T1/50, T1], θi(t) ≤ 4ε1.
This implies (25) immediately.
Proof of (26). Consider ∀t ∈ [T1/50, T1]. The dynamics of hi is given by
hi(t + 1) − hi(t) = −η⟨∇i(t), v⟩
∥v∥ −
(cid:33)
hj(t)
(cid:88)
j
(cid:32)
=
η
2
(cid:124)
−
η
2π
(cid:124)
(cid:34)(cid:32)
(cid:123)(cid:122)
η
2 H(t)
(cid:88)
j̸=i
(cid:125)
∥wj(t)∥ sin θij(t) − ∥v∥ sin θi(t)
cos θi(t) −
(cid:33)
θij(t)hj(t) + θi(t)∥v∥
.
(cid:35)
(cid:88)
j̸=i
(cid:123)(cid:122)
Qi(t)
23
(cid:125)
(35)
The first term is just η
Qi(t).
2 H(t). Denote the second term with Qi(t). Then hi(t + 1) = hi(t) + η
2 H(t) −
H(t) can be lower bounded as
H(t) = ∥v∥ −
(cid:88)
j
hj(t) ≥ ∥v∥ −
∥wj(t)∥
(27)
≥ ∥v∥ − n *
∥v∥
3n
=
2∥v∥
3
.
(cid:88)
j
(36)
On the other hand, the second term Qi(t) is a small perturbation term, whose norm can be
upper bounded by
|Qi(t)| ≤
≤
η
2π
η
2π
(cid:20)
n *
∥v∥
3n
θij(t) + ∥v∥θi(t) + n *
θij(t) + θi(t)∥v∥
(cid:21)
∥v∥
3n
(cid:20) ∥v∥
3
8ε1 + ∥v∥4ε1 +
(cid:21)
8ε1 + 4ε1∥v∥
(37)
≤3η∥v∥ε1 ≤ 9ε1
η
2
H(t) ≤ 0.1
H(t),
∥v∥
3
η
2
where the second inequality is because θij(t) ≤ θi(t) + θj(t) ≤ 8ε1.
Therefore
0.3η∥v∥ ≤ 0.9
η
2
H(t) ≤ hi(t + 1) − hi(t) =
η
2
H(t) − Qi(t) ≤ 1.1
η
2
H(t), ∀t ∈ [T1/50, T1].
Then we have the following bound, which shows that, ∀i, hi(T1)−hi(T1/50) approximately equals
to (cid:80)T1−1
t=T1/50
η
2 H(t):
0.9
T1−1
(cid:88)
t=T1/50
η
2
H(t)
≤ hi(T1)−hi (T1/50) =
T1−1
(cid:88)
t=T1/50
(hi(t + 1) − hi(t)) ≤ 1.1
T1−1
(cid:88)
t=T1/50
η
2
H(t)
.
The next bounds shows that, ∀i, |hi(T1/50)| is small comparing to (cid:80)T1−1
t=T1/50
η
2 H(t):
(38)
|hi(T1/50)| ≤ ∥wi(T1/50)∥
(23)
≤ s2 + 2η∥v∥
T1
50
≤
1
20
η∥v∥T1
(36)
≤ 0.2
T1−1
(cid:88)
t=T1/50
η
2
H(t)
.
(39)
(38) and (39) jointly yields
0 < 0.7
T1−1
(cid:88)
t=T1/50
η
2
H(t)
≤ hi(T1) ≤ 1.3
H(t)
, ∀i,
T1−1
(cid:88)
t=T1/50
η
2
which implies (26) immediately.
24
C Global Convergence: phase 2
Theorem 5. Suppose the initial condition in Lemma 3 holds. For ∀ε2 = O(1), set ε1 = O (cid:0)ε6
(cid:108) 1
in Theorem 4, η = O
nη ln
, then ∀T1 ≤ t ≤ T2,
and T2 = T1 +
1σ2d
∥v∥2
(cid:16) 1
36ε2
(cid:16) ε2
(cid:17)(cid:109)
(cid:17)
2n−1/2(cid:1)
hi(t) ≤ 2hj(t), ∀i, j,
(40)
(cid:17)t−T1
(cid:16)
1 −
nη
2
∥v∥ + 6ε2∥v∥ ≥ H(t) ≥
∥v∥ − 6ε2∥v∥ ≥ 18ε2∥v∥,
(41)
(cid:17)t−T1
(cid:16)
2
3
1 −
nη
2
s1
2
θi(t) ≤ ε2, ∀i.
≥ hi(t) ≥
2∥v∥
n
, ∀i.
(42)
(43)
Proof. We prove (40), (41), (42) and (43) together inductively. First we show the induction base
holds.
Note that Theorem 4 directly implies (40) and (43) for t = T1. For (42), by (27) we have
n , and by (23) we have hi(T1) = ∥wi(T1)∥ cos θi(T1) ≥ ∥wi(T1)∥/2 ≥
hi(T1) ≤ ∥wi(T1)∥ ≤ 2∥v∥
s1/2. For (41), note that 0 ≤ hi(T1) ≤ ∥wi∥
(27)
≤ ∥v∥/(3n) ⇒ ∥v∥ ≥ H(T1) ≥ 2∥v∥/3.
Now suppose (40), (41) (42) and (43) holds for T1, T1 +1, . . . , t, next we show the case of t+1.
Proof of (40). First note that due to θi(t) ≤ ε2 and 2∥v∥
n ≥ hi(t) ≥ s1
2 we have
3∥v∥
n
≥
hi(t)
cos ε2
≥
hi(t)
cos θi(t)
= ∥wi(t)∥ ≥ hi ≥
s1
2
, ∀i.
As computed in (35), hi(t + 1) = hi(t) + η
Note that θij(t) ≤ θi(t) + θj(t)
2 H(t) − Qi(t), ∀i.
(43)
≤ 2ε2, ∀i, j. Similar to (37), we have
|Qi(t)| ≤
η
2π
14ε2∥v∥ ≤ 3ε2η∥v∥
(41)
≤
η
2
*
1
3
H(t),
(44)
(45)
(46)
which implies
0 <
2 H(t) − Qi(t) ≤ 2 (cid:0) η
η
H(t) ≤
2
2 H(t) − Qj(t)(cid:1) , ∀i, j.
Finally, ∀i, j we have hi(t + 1) = hi(t) + η
η
2
2
3
*
Then η
H(t) − Qi(t) ≤
η
2
*
4
3
H(t), ∀i.
2hj(t + 1).
Proof of (41). The dynamics of H(t) is given by H(t + 1) = H(t) − (cid:80)
H(t) − (cid:80)
i Qi(t) = (1 − nη/2)H(t) + (cid:80)
i Qi(t).
η
2 H(t) + (cid:80)
Note that (45) implies | (cid:80)
i
i Qi(t)| ≤ 3nε2∥v∥η, therefore
2 H(t) − Qi(t) ≤ 2hj(t) + 2 (cid:0) η
2 H(t) − Qj(t)(cid:1) =
i(hi(t + 1) − hi(t)) =
H(t + 1) − 6ε2∥v∥ ≤
(cid:16)
1 −
(cid:17)
nη
2
H(t) + 3nε2∥v∥η − 6ε2∥v∥ =
(cid:16)
1 −
(cid:17)
nη
2
(H(t) − 6ε2∥v∥) .
Iterative application of the above bound yields H(t+1)−6ε2∥v∥ ≤ (cid:0)1 − nη
For the same reason, we also have H(t + 1) + 6ε2∥v∥ ≥ (cid:0)1 − nη
2
(cid:1)t+1−T1 (H(T1) + 6ε2∥v∥).
2
(cid:1)t+1−T1 (H(T1) − 6ε2∥v∥).
25
On the other hand, ∀i, ∥v∥/(3n)
(27)
≥ ∥wi(T1)∥ ≥ hi(T1) = ∥wi(T1)∥ cos θi(T1) ≥ 0 implies
∥v∥ ≥ H(T1) ≥ 2∥v∥/3. Combining three aforementioned bounds yields the first and second
inequality in (41).
Now we prove the rightmost inequality in (41). Note that nη = o(1) ⇒ 1 − nη/2 ≥
exp(−2nη/3). Then
(cid:17)t−T1
(cid:16)
1 −
nη
2
∥v∥ − 6ε2∥v∥
exp(−2nη(T2 − T1)/3)∥v∥ − 6ε2∥v∥
(cid:18)
exp
−
2nη
3
*
3
2
1
nη
ln
(cid:18) 1
36ε2
(cid:19)(cid:19)
∥v∥ − 6ε2∥v∥
* 36ε2∥v∥ − 6ε2∥v∥
2
3
2
3
2
3
2
3
≥
≥
=
= 18ε2∥v∥,
(cid:108) 1
nη ln
(cid:16) 1
36ε2
(cid:17)(cid:109)
(cid:17)
(cid:16) 1
36ε2
where the second inequality is because T2 − T1 =
Proof of (42). Since we have already shown (40) and (41) for t + 1, H(t + 1) ≥ 18ε2∥v∥ > 0
implies
.
≤ 3
2
1
nη ln
n
2
hi(t + 1)
(cid:88)
(40)
≤
j
hj(t + 1) ≤ ∥v∥, ∀i ⇒ hi(t + 1) ≤
2
n
∥v∥, ∀i.
For the lower bound, by (35) and (46) we have
hi(t + 1) = hi(t) +
η
2
H(t) − Qi(t) ≥ hi(t) ≥
s1
2
.
(47)
Proof of (43). Recall that the dynamics of cos(θi) is given by (29) as cos(θi(t + 1)) − cos(θi(t)) =
I1 + I2. Then we have
I1 =
η
2π∥wi(t + 1)∥
(cid:34)
(π − θi(t)) sin2 θi(t)∥v∥ −
(cid:88)
(π − θij(t)) (cos θj(t) − cos θi(t) cos θij(t)) ∥wj(t)∥
(cid:35)
≥ −
≥ −
η
2
η
2
(cid:88)
j̸=i
(cid:88)
j̸=i
(cos θj(t) − cos θi(t) cos θij(t))
sin θi(t) sin(θi(t) + θj(t))
∥wj(t)∥
∥wi(t + 1)∥
,
j̸=i
∥wj(t)∥
∥wi(t + 1)∥
where the last inequality is because θij(t) ≤ θi(t)+θj(t) ≤ 2ε2 < π ⇒ cos θj(t)−cos θi(t) cos θij(t) ≤
cos θj(t) − cos θi(t) cos(θi(t) + θj(t)) = sin θi(t) sin(θi(t) + θj(t)).
Since we have already shown (42) for t + 1, ∥wi(t + 1)∥ ≥ hi(t + 1)
have ∥wj(t)∥ = hj(t)/ cos θj(t) ≤ 2hj(t). Then
(47)
≥ hi(t) holds. Also we
I1 ≥ −
η
2
(cid:88)
j̸=i
sin θi(t)(sin θi(t) + sin θj(t))
2hj(t)
hi(t)
(40)
≥ −2η
(cid:88)
j̸=i
26
sin θi(t)(sin θi(t) + sin θj(t)).
To bound I2, first note that ∥wi(t)∥ ≤ 3∥v∥/n, ∀i. Then by applying elementary triangle
inequality in a similar manner as (28), we have ∥∇i(t)∥ ≤ 5∥v∥, ∀i. Since ∥wi(t + 1)∥ ≥ hi(t +
1) ≥ s1/2, for similar reasons as (31), I2 could be lower bounded as
I2 ≥ −
η
s1/2
*
∥∇i(t)∥ * η∥∇i(t)∥ + η∥∇i(t)∥2
s1
≥ −100
η2∥v∥2
s2
1
.
So we have
cos(θi(t + 1)) − cos θi(t) ≥ −2η
(cid:88)
j̸=i
sin θi(t)(sin θi(t) + sin θj(t)) − 100
η2∥v∥2
s2
1
.
(48)
Define a potential function V (t) := (cid:80)
i sin2 (θi(t)/2), we consider the dynamics of V (t):
V (t + 1) − V (t) =
≤
1
2
1
2
(cid:88)
i
(cid:88)
(cos θi(t) − cos θi(t + 1))
(cid:32)
(cid:88)
2η
sin θi(t)(sin θi(t) + sin θj(t)) + 100
i
j̸=i
(cid:33)
η2∥v∥2
s2
1
(cid:32)
3
2
(cid:88)
≤η
i
n sin2 θi(t) +
(cid:33)
sin2 θj(t)
+ 50
nη2∥v∥2
s2
1
(cid:88)
j
≤10nη
(cid:88)
sin2
i
(cid:19)
(cid:18) θi(t)
2
+ 50
nη2∥v∥2
s2
1
,
(49)
where the last inequality is because sin2 θi(t) = 4 sin2(θi(t)/2) cos2(θi(t)/2) ≤ 4 sin2(θi(t)/2).
Then we have
V (t+1)+
5η∥v∥2
s2
1
(cid:18)
≤ (1 + 10nη)
V (t) +
(cid:19)
5η∥v∥2
s2
1
≤ * * * ≤ (1 + 10nη)t+1−T1
(cid:18)
V (T1) +
(cid:19)
.
5η∥v∥2
s2
1
Note that by (34) we have V (T1) ≤ 2nε2
1, and by setting η = O
(cid:17)
(cid:16) ε2
1σ2d
∥v∥2
= O
5η∥v∥2
s2
1
≤ nε2
1. Then V (t + 1) ≤ (1 + 10nη)t+1−T1 3nε2
1 ≤ exp(10nη(T2 − T1))3nε2
2/16.
we have
(cid:16) ε2
(cid:17)
1s2
1
∥v∥2
1 ≤ ε2
D Global Convergence: phase 3
D.1 Initial Condition of Phase 3
First we prove some initial conditions that are satisfied at time T2, i.e., the start of Phase 3.
Lemma 17. Suppose the conditions (40) (41) (42) (43) in Theorem 5 holds, then at the start of
Phase 3 we have
∀i ∈ [n], ∥v∥/(3n) ≤ ∥wi(T2)∥ ≤ 3∥v∥/n,
and
L(w(T2)) ≤ 20ε2∥v∥2.
27
Proof. Proof of the First Condition. By Theorem 5 we have θi(T2) ≤ ε2, ∀i, and H(T2) ≤
(cid:0)1 − nη
2 (T2 − T1))∥v∥ + 6ε2∥v∥ = (36ε2)1/2∥v∥ + 6ε2∥v∥ ≤
7ε1/2
(cid:1)T2−T1 ∥v∥ + 6ε2∥v∥ ≤ exp(− nη
2
2 ∥v∥.
Then for ∀i ∈ [n], 2
∥v∥/(3n).
3∥v∥ ≤ ∥v∥ − H(T2) = (cid:80)
Similarly, for ∀i ∈ [n], H(T2) ≥ 0 ⇒ ∥v∥ ≥ (cid:80)
j hj(T2) ≤ 2nhi(T2) ⇒ ∥wi(T2)∥ ≥ hi(T2) ≥
j hj(T2) ≥ nhi(T2)/2 ⇒ hi(T2) ≤ 2∥v∥/n ⇒
∥wi(T2)∥ = hi(T2)/ cos(θi(T2)) ≤ 3
Proof of the Second Condition. Since ∥v∥/(3n) ≤ hi(T2) ≤ 2∥v∥/n, ∀i, we have
2hi(T2) ≤ 3∥v∥/n.
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:88)
i
wi(T2) − v
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
≤
=
(cid:88)
i
(cid:88)
i
∥wi(T2) − hi(T2)v∥ +
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:88)
i
hi(T2)v − v
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
hi(T2) tan θi(T2) + H(T2) ≤ 8ε1/2
2 ∥v∥,
where the last inequality is because ∀i, θi(T2) ≤ ε2 = o(1) ⇒ tan θi(T2) ≤ 2ε2 ≤ o(ε1/2
2 ).
So according to (22) we have
L(w(T2)) ≤
8ε1/2
2 ∥v∥
(cid:17)2
+
(cid:16)
1
4
1
2π
(cid:32)
n2 * 2ε2 *
(cid:19)2
∥v∥
+ nε2
(cid:18) 2
n
2
n
(cid:33)
∥v∥2
≤ 20ε2∥v∥2.
D.2 Proofs for Gradient Lower Bound
Before proving Theorem 7, we need some auxiliary lemmas.
D.2.1 Auxiliary lemmas
Lemma 8. Recall the global minimum w∗
maxi∈[n] θi, then
1, w∗
2, . . . , w∗
n defined as w∗
i =
(cid:80)
hi
j∈[n] hj
v. Define θmax :=
n
(cid:88)
i=1
(cid:28) ∂
∂wi
L(w), wi − w∗
i
(cid:29)
≥ 2L(w) − O (cid:0)θ2
max∥r∥ * ∥v∥(cid:1) .
Proof. First we introduce the idea of residual decomposition in Zhou et al. [2021], which decom-
poses the residual function R(x) in two terms :
R(x) =
n
(cid:88)
j=1
(cid:2)w⊤
j x(cid:3)
+
−(cid:2)v⊤x(cid:3)
+ = r⊤x*1{v⊤x ≥ 0}+
n
(cid:88)
j=1
w⊤
j x (cid:0)1{w⊤
j x ≥ 0} − 1{v⊤x ≥ 0}(cid:1) .
Define R1(x) = r⊤x*1{v⊤x ≥ 0} and R2(x) = (cid:80)n
j=1 w⊤
j x (cid:0)1{w⊤
j x ≥ 0} − 1{v⊤x ≥ 0}(cid:1),
then R(x) = R1(x) + R2(x).
28
Back to the lemma, first we have the following algebraic calculations:
n
(cid:88)
i=1
(cid:28) ∂
∂wi
L(w), wi − w∗
i
(cid:29)
n
(cid:88)
=
Ex
i=1
(cid:34)
= Ex
R(x)
(cid:2)R(x)1 (cid:8)w⊤
i x ≥ 0(cid:9) x⊤(wi − w∗
i )(cid:3)
n
(cid:88)
(cid:16)(cid:2)w⊤
i x(cid:3)
+ − 1 (cid:8)w⊤
i x ≥ 0(cid:9) x⊤w∗
i
(cid:35)
(cid:17)
i=1
(cid:34)
= 2L(w) + Ex
R(x)
n
(cid:88)
(cid:16)
i=1
(cid:110)
1
w∗
i
(cid:111)
⊤x ≥ 0
− 1 (cid:8)w⊤
i x ≥ 0(cid:9)(cid:17)
x⊤w∗
i
(cid:35)
With the residual decomposition, the last term above can be decomposed into two terms I1, I2
as
(cid:34)
Ex
R(x)
n
(cid:88)
(cid:16)
(cid:110)
1
w∗
i
(cid:111)
⊤x ≥ 0
− 1 (cid:8)w⊤
i x ≥ 0(cid:9)(cid:17)
x⊤w∗
i
(cid:35)
(cid:34)
i=1
n
(cid:88)
R1(x)
i=1
= Ex
(cid:124)
(cid:16)
1
(cid:110)
w∗
i
(cid:111)
⊤x ≥ 0
− 1 (cid:8)w⊤
i x ≥ 0(cid:9)(cid:17)
x⊤w∗
i
(cid:34)
+ Ex
R2(x)
(cid:124)
n
(cid:88)
(cid:16)
i=1
(cid:123)(cid:122)
I1
(cid:110)
w∗
i
1
(cid:111)
⊤x ≥ 0
− 1 (cid:8)w⊤
i x ≥ 0(cid:9)(cid:17)
(cid:123)(cid:122)
I2
(cid:35)
x⊤w∗
i
.
(cid:125)
(cid:35)
(cid:125)
For the second term I2, note that
j x (cid:0)1{w⊤
∀j, w⊤
j x ≥ 0} − 1{v⊤x ≥ 0}(cid:1) ≥ 0 ⇒ R2(x) ≥ 0
and ∀w∗
i , wi,
(cid:16)
1
(cid:110)
w∗
i
(cid:111)
⊤x ≥ 0
− 1 (cid:8)w⊤
i x ≥ 0(cid:9)(cid:17)
x⊤w∗
i ≥ 0,
so I2 is always non-negative.
For the first term I1 = (cid:80)
i∈[n] Ex
(cid:2)r⊤x1(v⊤x ≥ 0) (cid:0)1 (cid:8)w∗
i
⊤x ≥ 0(cid:9) − 1 (cid:8)w⊤
i x ≥ 0(cid:9)(cid:1) x⊤w∗
i
(cid:3),
we bound each term in the summation as
(cid:110)
(cid:16)
(cid:104)
Ex
r⊤x1(v⊤x ≥ 0)
(cid:110)
(cid:104)
≥ −Ex
|r⊤x| *
(cid:12)
(cid:12)
(cid:12)1
i ∥ * E ̃x
i ∥(cid:1)
i ∥w∗
= −∥r∥θi∥w∗
≥ −O (cid:0)∥r∥θ2
1
w∗
i
⊤x ≥ 0
(cid:111)
⊤x ≥ 0
w∗
i
∥ ̃x∥2 (cid:12)
(cid:110)
(cid:104)
(cid:12)
(cid:12)1
w∗
i
(cid:105)
(cid:111)
x⊤w∗
i
− 1 (cid:8)w⊤
i x ≥ 0(cid:9)(cid:17)
i x ≥ 0(cid:9)(cid:12)
− 1 (cid:8)w⊤
(cid:12) * ∥ ̃x∥ * ∥w∗
(cid:12)
i ∥θi
i ̃x ≥ 0(cid:9)(cid:12)
(cid:111)
(cid:105)
− 1 (cid:8)w⊤
(cid:12)
(cid:12)
⊤ ̃x ≥ 0
(cid:105)
where ̃x is the projection of x onto span(w∗
Here the first inequality is because 1 (cid:8)w∗
i , wi, r) and follows a three-dimensional Gaussian.
i x ≥ 0(cid:9) ̸= 0 ⇒ θ(w∗
i , x) ∈ [π/2 −
⊤x ≥ 0(cid:9) − 1 (cid:8)w⊤
i
29
θi, π/2 + θi] ⇒ |x⊤w∗
i ∥θi, and the last inequality is because
i | ≤ ∥ ̃x∥ * ∥w∗
i | = | ̃x⊤w∗
∥ ̃x∥2 (cid:12)
(cid:111)
(cid:110)
(cid:12)
(cid:12)1
⊤ ̃x ≥ 0
w∗
i
(cid:104)
E ̃x
− 1 (cid:8)w⊤
i ̃x ≥ 0(cid:9)(cid:12)
(cid:12)
(cid:12)
(cid:105)
= O(θi).
(See Lemma C.5 in Zhou et al. [2021] for detailed calculations.)
i ∥ = ∥v∥, so we have
Note that (cid:80)
i ∥w∗
n
(cid:88)
i=1
(cid:28) ∂
∂wi
L(w), wi − w∗
i
(cid:29)
= 2L(w)+I1+I2 ≥ 2L(w)−
(cid:88)
i∈[n]
O (cid:0)∥r∥θ2
i ∥w∗
i ∥(cid:1) ≥ 2L(w)−O (cid:0)θ2
max∥r∥ * ∥v∥(cid:1) .
Lemma 18 (Bound of θi). We have that
∥wi∥2θ3
i ≤ 30πL(w), ∀i.
Proof. W.L.O.G., suppose v = (∥v∥|, 0, . . . , 0)⊤ and wi = (cos θi, sin θi, 0, . . . , 0)⊤∥wi∥.
Define Si := {x : x ∈ Rd, x⊤wi ≥ 0 ∧ x⊤v < 0}. One can see that Si = {x : θ(x, wi) ≤
+ ≥
π/2, θ(x, v) ≥ π/2}. On the other hand, ∀x ∈ Si, R(x) = (cid:80)n
(cid:2)w⊤
− (cid:2)v⊤x(cid:3)
j x(cid:3)
(cid:2)w⊤
j=1
+
i x(cid:3)
+ ≥ 0. Therefore,
L(w) = Ex∼N (0,I))
1
2
(cid:32) n
(cid:88)
i=1
(cid:2)w⊤
i x(cid:3)
+ − (cid:2)v⊤x(cid:3)
+
(cid:33)2
(∥wi∥ρ cos(ω − θi))2ρe−ρ2/2dωdρ
i x)2 e− ∥x∥2
2
(cid:90)
x∈Si
(cid:90) +∞
(w⊤
1
2
(cid:90) θi+π/2
(2π)d/2 dx
1
4π
ω=π/2
(cid:90) θi+π/2
cos2(ω − θi)dω
ω=π/2
(2θi − sin(2θi))
*
(2θi)3
30
.
≥
=
=
=
≥
ρ=0
∥wi∥2
2π
∥wi∥2
8π
∥wi∥2
8π
Rearranging terms yields the result.
Lemma 19 (Bound of ∥r∥). Given that 4∥v∥
O(n−2∥v∥2), then
n ≥ ∥wi∥ ≥ ∥v∥
4n for all i ∈ [n] and L(w) =
∥r∥ = O (cid:0)nL1/2(w)(cid:1) .
Proof. Lemma 18 and ∥wi∥ = Θ(∥v∥/n) implies θi = O
(cid:18)
i ∈ [n], by Taylor expansion we have |(sin θi − θi cos θi)| = O(θ3
(cid:17)1/3(cid:19)
n2/3 (cid:16) L(w)
i ), then |(sin θi − θi cos θi)∥wi∥ *
= o(1). For all
∥v∥2
30
∥v∥| = O(θ3
(cid:18)
n2/3 (cid:16) L(w)
Then by (22), we have
∥v∥2
O
i )∥wi∥ * ∥v∥ = O (nL(w)). Similarly, ∀i, j ∈ [n] we have θij ≤ θi + θj ≤
(cid:17)1/3(cid:19)
⇒ |(sin θij − θij cos θij)∥wi∥ * ∥wj∥| = O(θ3
ij)∥wi∥ * ∥wj∥ = O (L(w)).
∥r∥2 = 4L(w) −
2
π
(cid:34)
(cid:88)
i<j
(sin θij − θij cos θij)∥wi∥ * ∥wj∥ −
(sin θi − θi cos θi)∥wi∥ * ∥v∥
(cid:35)
(cid:88)
i
≤ 4L(w) + n2O(L(w)) + nO(nL(w)) ≤ O(n2L(w)),
which implies ∥r∥ = O (cid:0)nL1/2(w)(cid:1).
Lemma 20 (Bound of ∥wi − w∗
O(∥v∥2/n2). Then ∥wi − w∗
i ∥ ≤ O
i ∥). Suppose 4∥v∥
(cid:18)
n2/3 (cid:16) L(w)
∥v∥2
n ≥ ∥wi∥ ≥ ∥v∥
(cid:17)1/3(cid:19)
∥wi∥.
4n , ∀i ∈ [n] and L(w) =
Proof. Lemma 18 and ∥wi∥ = Θ(∥v∥/n) implies θi = O
(cid:18)
n2/3 (cid:16) L(w)
∥v∥2
(cid:17)1/3(cid:19)
. Lemma 19 implies
|H| = |⟨r, v⟩| = O(nL1/2(w)).
We first decompose ∥wi − w∗
i ∥ into two parts as ∥wi − w∗
The first part can be bounded as ∥wi − hiv∥ = ∥wi∥ sin θi ≤ O
The second part can be bounded as ∥hiv − w∗
∥v∥−H .
Note that |H| = |⟨r, v⟩| ≤ ∥r∥ = O(nL1/2(w)) ≤ O(∥v∥) ⇒ ∥v∥ − |H| ≥ ∥v∥/2. So we have
∥v∥/2O(nL1/2(w)) ≤ O
(cid:18)
n2/3 (cid:16) L(w)
i ∥ ≤ ∥wi∥ |H|
∥v∥−H ≤ ∥wi∥ *
∥v∥−H ≤ ∥wi∥ |H|
∥hiv − w∗
(cid:17)1/3(cid:19)
∥wi∥.
i ∥ =
∥v∥2
1
(cid:12)
(cid:12)
(cid:12)hi
(cid:16)
1 − ∥v∥
(cid:80)
j hj
i ∥ ≤ ∥wi − hiv∥ + ∥hiv − w∗
∥wi∥.
(cid:17)1/3(cid:19)
i ∥.
(cid:18)
n2/3 (cid:16) L(w)
(cid:17)(cid:12)
(cid:12)
(cid:12) = hi
∥v∥2
|H|
Combining two parts together yields the bound.
D.2.2 Proof of Theorem 7
Now we are ready to prove Theorem 7.
Theorem 7. If for every student neuron we have 4∥v∥
L(w) = O
then ∥∇wL(w)∥ ≥ Ω
(cid:16) L2/3(w)
n2/3∥v∥1/3
(cid:17)
.
4n , and
n ≥ ∥wi∥ ≥ ∥v∥
(cid:19)
(cid:18)∥v∥2
n14
,
Proof. Lemma 18 and ∥wi∥ = Θ(∥v∥/n) implies θi = O
(cid:18)
n2/3 (cid:16) L(w)
∥v∥2
(cid:17)1/3(cid:19)
. Lemma 19 implies
∥r∥ = O(nL1/2(w)).
Combined with lemma 8 and L(w) = O
(cid:17)
(cid:16) ∥v∥2
n14
we have
n
(cid:88)
i=1
(cid:28) ∂
∂wi
L(w), wi − w∗
i
(cid:29)
≥ 2L(w)−O (cid:0)θ2
max∥r∥ * ∥v∥(cid:1) ≥ 2L(w)−O(n7/3L7/6(w)∥v∥−1/3) ≥ L(w).
31
Then
L(w) ≤
n
(cid:88)
i=1
(cid:28) ∂
∂wi
L(w), wi − w∗
i
(cid:29)
≤
Lemma 20
≤
(cid:13)
(cid:13)
(cid:13)
(cid:13)
∂L(w)
∂w
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:32)
O
n2/3
So
(cid:13)
(cid:13)
(cid:13)
∂L(w)
∂w
(cid:13)
(cid:13)
(cid:13) ≥ Ω
(cid:16) L2/3(w)
n2/3∥v∥1/3
(cid:17)
.
∂
∂wi
n
(cid:88)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
i=1
(cid:19)1/3(cid:33)
L(w)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
* ∥wi − w∗
i ∥ ≤
(cid:13)
(cid:13)
(cid:13)
(cid:13)
∂L(w)
∂w
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:88)
i∈[n]
∥wi − w∗
i ∥
(cid:18) L(w)
∥v∥2
∥w∗
i ∥ = O
(cid:16)
n2/3L(w)1/3∥v∥1/3(cid:17) (cid:13)
(cid:13)
(cid:13)
(cid:13)
∂L(w)
∂w
(cid:13)
(cid:13)
(cid:13)
(cid:13)
.
(cid:88)
i∈[n]
D.3 Handling Non-smoothness
In this section, we establish two lemmas needed for handling the non-smoothness of L.
Define the Hessian matrix of L as Λ := ∂2L(w)
∂w2
. The next lemma ensures the smoothness of L
when the student neurons are regularized, i.e, their norms are upper and lower bounded.
Lemma 21 (Conditional Smoothness of L). If for every student neuron we have 4∥v∥
∥v∥
4n , then ∥Λ∥2 ≤ O(n2).
Proof. When wi
computed the closed form expression of Hessian Λ = ∂2L
̸= 0, ∀i, Safran et al. [2020] has shown that L(w) is twice differentiable and
n ≥ ∥wi∥ ≥
∂w2 ∈ Rnd×nd:
Λ =
Λ1,1
...
Λn,1
,
* * * Λ1,n
...
* * * Λn,n
(50)
where Λi,j ∈ Rd×d, i, j ∈ [n] are d × d matrices with the following forms:
The ith diagonal block matrix of Λ is
Λi,i =
1
2
I +
(cid:88)
j̸=i
ζ(wi, wj) − ζ(wi, v),
where
ζ(w, v) =
sin θ(w, v)∥v∥
2π∥w∥
(I − ww⊤ + nv,wn⊤
v,w),
and nv,w = v − cos θ(w, v)w.
For i ̸= j, the off-diagonal entry is
(cid:2)(π − θ(wi, wj))I + nwi,wj w⊤
j + nwj ,wiw⊤
i
(cid:3) .
Λi,j =
1
2π
n ), ∀i implies ∥wj ∥
2π∥wi∥ = O(1) and ∥ζ(wi, v)∥ ≤ O(1) ∥v∥
∥ζ(wi, v)∥ ≤ O(n).
Note that ∥wi∥ = Θ( ∥v∥
∥wj ∥
Also note that ∥Λi,j∥ ≤ 1
Then ∥Λ(w)∥ ≤ (cid:80)
2π (π + 1 + 1) ≤ 1 for all i ̸= j.
i,j ∥Λi,j∥ ≤ nO(n) + (n2 − n) ≤ O(n2).
32
∥wi∥ = O(1), ∀i, j and ∥v∥
∥wi∥ ≤ O(n), so ∥Λi,i∥ ≤ ∥ 1
∥wi∥ = O(n), ∀i. Then ∥ζ(wi, wj)∥ ≤
2I∥ + (cid:80)
j̸=i ∥ζ(wi, wj)∥ +
The following lemma shows that each student neuron wi will not move too far in the third
phase.
Lemma 22 (Bound of the Change of Neurons). If the initial loss at phase 3 is upper bounded
by L(w(T2)) ≤ Cl, and there exists constant Cs > 0 such that L(w(t + 1)) ≤ L(w(t)) −
η
2 ∥∇W (t)∥2 ≤ L(w(t)) − CsηL4/3(w(t)), ∀T + T2 − 1 ≥ t ≥ T2, then
L(T + T2) ≤
1
(L(w(T2))−1/3 + CsηT /3)3 ,
and
T −1
(cid:88)
t=0
Proof. We bound the loss as
η∥∇W (t + T2)∥ ≤ 8C −1/2
s C 1/3
l
.
1
L1/3(w(t + 1))
1
(L(w(t)) − CsηL4/3(w(t)))1/3
1
L1/3(w(t))
1
L1/3(w(t))
1
L1/3(w(t))
1
L1/3(w(t))
(cid:32)
1 +
1 +
1 − (cid:0)1 − CsηL1/3(w(t))(cid:1)1/3
(1 − CsηL1/3(w(t)))1/3
(cid:33)
(1 − CsηL1/3(w(t)))1/3 (cid:16)
CsηL1/3(w(t))
1 + (1 − CsηL1/3(w(t)))1/3 + (1 − CsηL1/3(w(t)))2/3(cid:17)
+ Csη
1
(1 − CsηL1/3(w(t)))1/3 + (1 − CsηL1/3(w(t)))2/3 + (1 − CsηL1/3(w(t)))
+
Csη
3
.
≥
=
=
=
≥
Therefore, L−1/3(w(t + T2)) ≥ L−1/3(w(T2)) + Csη
3 t, ∀T ≥ t ≥ 0. Let l1 := L−1/3(w(T2)),
then 1/l3
1 ≤ Cl and
L(w(T2 + t)) ≤
1
(l1 + Csηt/3)3 , ∀t ≤ T,
this proves the first inequality.
For the second inequality, note that
L(w(t + 1)) ≤ L(w(t)) −
η
2
∥∇W (t)∥2 ⇒ ∥∇W (t)∥2 ≤
2
η
(L(w(t)) − L(w(t + 1))) .
33
(l1 + Csηt/3)2∥∇W (T2 + t)∥2
(cid:33)
(l1 + Csηt/3)2 2
η
(L(w(T2 + t)) − L(w(T2 + t + 1)))
(cid:33)
By Cauchy inequality, ∀T > 0,
(cid:33)2
∥∇W (T2 + t)∥
1
(l1 + Csηt/3)2
1
(l1 + Csηt/3)2
(cid:33) (cid:32)T −1
(cid:88)
t=0
(cid:33) (cid:32)T −1
(cid:88)
t=0
(cid:33) (cid:32)
(cid:32)T −1
(cid:88)
t=0
(cid:32)T −1
(cid:88)
t=0
(cid:32)T −1
(cid:88)
t=0
(cid:32)T −1
(cid:88)
t=0
(cid:32)T −1
(cid:88)
t=0
(cid:32)T −1
(cid:88)
t=0
2
η
2
η
2
η
≤
≤
≤
≤
≤
1
(l1 + Csηt/3)2
1
(l1 + Csηt/3)2
1
(l1 + Csηt/3)2
l2
1L(w(T2 + T )) +
(cid:33) (cid:32)
l2
1L(w(T2 + T )) +
T −1
(cid:88)
t=1
2Csη
3
T −1
(cid:88)
t=1
(cid:33) (cid:32)
1
l1
+
2Csη
3
T −1
(cid:88)
t=1
1
(l1 + Csηt/3)2
(cid:33)
(cid:0)(l1 + Csηt/3)2 − (l1 + Csη(t − 1)/3)2(cid:1) L(w(T2 + t))
(cid:33)
(l1 + Csηt/3) L(w(T2 + t))
(cid:33)
Note that
T −1
(cid:88)
t=0
1
(l1 + Csηt/3)2 ≤
+∞
(cid:88)
t=0
1
(l1 + Csηt/3)2 ≤
3
Csη
+∞
(cid:88)
(cid:18)
t=0
1
l1 + Csη(t − 1)/3
−
1
l1 + Csηt/3
(cid:19)
≤
6
Csηl1
.
Therefore,
(cid:33)2
∥∇W (T2 + t)∥
≤
(cid:32)T −1
(cid:88)
t=0
2
η
(cid:18) 6
Csηl1
(cid:19) (cid:18) 1
l1
+
2Csη
3
6
Csηl1
(cid:19)
≤
2
η
6
Csηl1
5
l1
=
60
Csη2l2
1
.
So we get
η
T
(cid:88)
t=0
∥∇(T2 + t)∥ ≤ η
(cid:115)
60
Csη2l2
1
≤ 8C −1/2
s C 1/3
l
.
D.4 Proof of Theorem 6
Theorem 6. Suppose the initial condition in Lemma 3 holds. If we set ε2 = O(n−14) in Theorem
5, η = O (cid:0) 1
n2
(cid:1), then ∀T ∈ N we have
and
4∥v∥
n
≥ ∥wi(T + T2)∥ ≥
∥v∥
4n
,
L(T + T2) ≤ O
(cid:18) n4∥v∥2
(ηT )3
(cid:19)
.
34
(51)
(52)
Proof. Since we have set ε2 = O(n−14), by Lemma 17 we have 3∥v∥
(cid:17)
L(w(T2)) ≤ 20ε2∥v∥2 = O
.
(cid:16) ∥v∥2
n14
n ≥ ∥wi(T2)∥ ≥ ∥v∥
3n , ∀i, and
To prove the theorem, we just need to prove (51) and a stronger version of (52):
L(T + T2) ≤
(cid:16)
L(T2)−1/3 + Ω
1
(cid:16)
(cid:17)3 .
(cid:17)
ηT
1
n4/3∥v∥2/3
(53)
We prove (51) and (53) together inductively.
The induction base holds for T = 0 by Lemma 17.
Now suppose (51) (53) hold for 0, 1, . . . , T − 1, we show the case of T .
First note that (3) (51) and routine computation implies ∥∇i(t + T2)∥ = O(∥v∥), ∀0 ≤ t ≤
T − 1.
For ∀T2 ≤ t ≤ T + T2 − 1, since the induction condition together with lemma 21 guarantee the
smoothness of L, the classical analysis of gradient descent can be applied ([Nesterov et al. [2018]],
lemma 1.2.3) to bound the decrease of loss at time t as
L(w(t + 1)) =L(w(t)) + ⟨∇W (t), −η∇W (t)⟩ +
(cid:90) 1
τ =0
(1 − τ )(−η∇W (t))⊤ ∂2L
∂w2 (w(t) − τ η∇W (t))(−η∇W (t))dτ.
(54)
For ∀τ ∈ [0, 1], ∥wi(t) − τ η∇i(t)∥ ≥ ∥wi(t)∥ − η∥∇i(t)∥ ≥ ∥v∥
we have ∥wi(t)−τ η∇i(t)∥ ≤ ∥wi(t)∥+η∥∇i(t)∥ ≤ 5∥v∥
(cid:13)
(cid:13)
of L at w(t) − τ η∇W (t):
(cid:13)
bound Theorem 7 (note that L(w(t)) = O(∥v∥2/n14)), the dynamic of loss can be bounded as
4n − ηO(∥v∥) ≥ ∥v∥
5n , similarly
n . Then lemma 21 implies the smoothness
(cid:13)
∂2L
(cid:13)
(cid:13) ≤ O (n2). Combined with gradient lower
∂w2 (w(t) − τ η∇W (t))
L(w(t)) − L(w(t + 1)) ≥ η∥∇W (t)∥2 −
(cid:90) 1
τ =0
(1 − τ )O (cid:0)n2(cid:1) ∥ − η∇W (t)∥2dτ
∥∇W (t)∥2
≥
η
2
Theorem 7
≥ Ω
(cid:18)
1
n4/3∥v∥2/3
(cid:19)
ηL4/3(w(t)).
Set Cs in Lemma 22 as Cs = Ω
implies that L(w(t + 1)) ≤ L(w(t)) − η
Lemma 22 here, which immediately implies (53).
1
. For ∀T + T2 − 1 ≥ t ≥ T2, the above inequality
n4/3∥v∥2/3
2 ∥∇W (t)∥2 ≤ L(w(t)) − CsηL4/3(w(t)). So we can apply
(cid:16)
(cid:17)
For (51), Lemma 22 yields
∥wi(T + T2)∥ ≥ ∥wi(T2)∥ −
T −1
(cid:88)
t=0
(cid:32)
η∥∇W (t + T2)∥ ≥
∥v∥
3n
(cid:19)1/3(cid:33)
− 8C −1/2
s
L(w(T2))1/3
∥v∥
4n
,
≥
(cid:18) ∥v∥2
n14
=
∥v∥
3n
− O
n2/3∥v∥1/3 *
35
similarly
∥wi(T +T2)∥ ≤ ∥wi(T2)∥+
T −1
(cid:88)
η∥∇W (t+T2)∥ ≤
t=0
3∥v∥
n
(cid:32)
+O
n2/3∥v∥1/3 *
(cid:19)1/3(cid:33)
(cid:18) ∥v∥2
n14
≤
4∥v∥
n
.
E Supplementary Materials for Section 4
E.1 Proof of Lemma 3
Lemma 3. Let s1 := 1
the following properties holds:
2σ
d, s2 := 2σ
√
√
d. When d = Ω(log(n/δ)), with probability at least 1 − δ,
∀i ∈ [n], s1 ≤ ∥wi(0)∥ ≤ s2,
∀i ∈ [n],
π
3
≤ θi(0) ≤
2π
3
.
(55)
(56)
Proof. By concentration inequality of Gaussian (See Section 2 in Dasgupta and Schulman [2013]),
4σ2d(cid:3) ≤
For ∀i we have Pr
(cid:17)
(cid:1)2 d/24
− (cid:0) 3
3n . By union bound, (55) holds with probability at
exp
least 1 − δ/3.
2σ
≤ exp(−Ω(log(n/δ))) ≤ δ
≤ Pr (cid:2)|∥wi(0)∥2 − σ2d| > 3
(cid:104)
∥wi(0)∥ < 1
d ∨ ∥wi(0)∥ > 2σ
(cid:105)
d
√
√
(cid:16)
4
For (56), note that for ∀i ∈ [n],
|⟨wi(0), v⟩| ≤
√
1
4
σ
d ∧ ∥wi(0)∥ ≥
√
1
2
σ
d ⇒
|⟨wi(0), v⟩|
∥wi(0)∥
≤
1
2
⇒
π
3
≤ θi(0) ≤
2π
3
.
By concentration inequality of Gaussian, Pr
(cid:104)
δ
3n. Then Pr (cid:2)θi(0) < π
≤
2δ
3n. By union bound, (56) holds with probability at least 1 − 2δ/3. Applying union bound again
finishes the proof.
3 ∨ θi(0) > 2π
(cid:3) ≤ Pr
+ Pr
4σ
d
3
|⟨wi(0), v⟩| > 1
4σ
√
(cid:105)
d
(cid:104)
|⟨wi(0), v⟩| > 1
√
(cid:105)
d
(cid:16)
− ( 1
4 σ
≤ 2 exp
(cid:104)
∥wi(0)∥ < 1
2σ2
2σ
√
(cid:17)
d)2
√
(cid:105)
≤
E.2 Parameter Setting
In this section, we assign values to all intermediate parameters appeared in Theorem 4, Theorem 5
and Theorem 6, according to the requirements of these theorems.
• First we set ε2 = O(n−14) in Theorem 5 as required by Theorem 6.
• Set ε1 = O(ε6
2n−1/2) = O(n−84.5) in Theorem 4 as required by Theorem 5.
(cid:16) ε2
1
n
= O(n−170) in Theorem 4.
• Set C = O
(cid:17)
• Set σ = O (cid:0)Cε48
1 d−1/2∥v∥(cid:1) = O (cid:0)ε50
1 d−1/2∥v∥/n(cid:1) = O (cid:0)n−4226d−1/2∥v∥(cid:1) in Theorem 4.
36
C = ηT1
ε1
σ
ε2
η
T1
T2
Figure 3: Parameter Dependency Graph
(cid:17)
(cid:16) ε2
1σ2d
∥v∥2
(cid:16) σ2d
(cid:17)
• Set η = O
as required by Theorem 5. (Note that in Phase 1 and 3,
Theorem 4 and Theorem 6 also have requirements for η, but the bound in Theorem 5 is the
tightest one.)
n169∥v∥2
= O
• Set T1 = C
η = O
(cid:17)
(cid:16) ε2
1
nη
in Theorem 4.
• Finally, set T2 = T1+
in Theorem 5.
(cid:108) 1
nη ln
(cid:16) 1
36ε2
(cid:17)(cid:109)
= O
(cid:17)
(cid:16) ε2
1
nη
+O
(cid:16) log(1/ε2)
nη
(cid:17)
= O
(cid:16) log(1/ε2)
nη
(cid:17)
= O
(cid:17)
(cid:16) log n
nη
The dependence between these parameters is shown in Figure 3. (We use arrows to indicate
dependency, e.g., the arrow from ε1 to ε2 indicates that ε1 depends on ε2.)
E.3 Non-degeneracy of Student Neurons
There is a technical issue in the convergence analysis: if one of the student neuron wi is degenerate
and wi = 0, the loss function L(w) is not differentiable, hence gradient descent is not well-defined.
However, our proof shows that such case would not happen and the student neurons are always
non-degenerate. Note that the student neuron's norm ∥wi∥ is always lower-bounded in all three
phases of our analysis (Phase 1: (23) in Theorem 4, Phase 2: (42) in Theorem 5, Phase 3: (51) in
Theorem 6). By these bounds we have the following corollary describing the non-degeneracy of
student neurons.
Corollary 23. If the initialization conditions in Lemma 3 hold, then for ∀i ∈ [n], t ∈ N, ∥wi(t)∥ >
0.
Remark 24. Note that an assumption on the initialization condition such as the one in Corollary 23
is necessary, otherwise there would be counter-examples where all student neurons are degenerate.
For example, ∀c > 0, if we set wi(0) = −cv, ∀i and η = 2c
1+nc, then straightforward calculation
shows that ∀i, ∇i(0) = − 1+nc
2 v ⇒ ∀i, wi(1) = 0..
37
F Lower Bound of the Convergence Rate
F.1 Preliminaries
In this section, we do some technical preparations for proving Theorem 12.
Taking η → 0, we get the gradient flow version of Theorem 6.
Theorem 25. Suppose gradient flow is initialized from a point w(0) where the conditions in
(cid:1) such that ∀T ∈ R≥0
Lemma 3 hold. If σ = O (cid:0)n−4226d−1/2∥v∥(cid:1), then there exists T2 = O (cid:0) log n
we have
n
4∥v∥
n
≥ ∥wi(T + T2)∥ ≥
∥v∥
4n
,
and
L(T + T2) ≤ O
(cid:18) n4∥v∥2
T 3
(cid:19)
.
Similarly, we also have the gradient flow version of Corollary 23.
(57)
(58)
Corollary 26. Given that the initial condition in Lemma 3 holds, then for ∀i ∈ [n], t ∈ N,
∥wi(t)∥ > 0.
Lemma 27. Given that the initial condition in Lemma 3 holds, and the initialization is non-
degenerate, then ∀t, ∃i ∈ [n], s.t. zi(t) ̸= 0.
Proof. Assume for contradiction that ∃t ∈ R+ such that z1(t) = * * * = zn(t) = 0. Define
t := inf{t|z1(t) = * * * = zn(t) = 0}.
Then the continuity of zi implies z1(t) = * * * = zn(t) = 0, so t > 0. On the other hand, Corol-
lary 23 indicates that wi(t) ̸= 0, ∀i ∈ [n]. Since wi is continuous, there exists a neighborhood
of t such that for ∀i, j ∈ [n], ∥wi(t)∥/∥wj(t)∥ and ∥v∥/∥wi(t)∥ are bounded by a fixed constant
when t is in this neighborhood. Furthermore, since t > 0, ∃ε > 0 and constant C > 1 such that for
∀t ∈ [t − ε, t], ∀i ∈ [n] we have
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
π +
(cid:88)
j̸=i
∥wj(t)∥
∥wi(t)∥
sin θij(t) −
∥v∥
∥wi(t)∥
(cid:12)
(cid:12)
(cid:12)
sin θi(t)
(cid:12)
(cid:12)
≤ π +
(cid:88)
j̸=i
∥wj(t)∥
∥wi(t)∥
| +
∥v∥
∥wi(t)∥
≤ C.
38
(cid:33)
sin θi
zi −
π − θij
2π
(cid:88)
j̸=i
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
zj
≤ C∥zi∥ +
(cid:88)
j̸=i
∥zj∥,
Then in the interval [t − ε, t] we have
(cid:13)
(cid:13)
(cid:13)
(cid:13)
∂zi
∂t
(cid:13)
(cid:13)
(cid:13)
(cid:13)
=
(cid:32)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
−
1
2π
π +
(cid:88)
j̸=i
∥wj∥
∥wi∥
sin θij −
⇒
∂∥zi∥2
∂t
= 2
(cid:28) ∂zi
∂t
∥v∥
∥wi∥
(cid:29)
, zi
≥ −2C∥zi∥
(cid:88)
∥zj∥
2
j∈[n]
∥zj∥
≥ −2nC
(cid:88)
∥zj∥2
(cid:88)
⇒
∂
∂t
(cid:88)
j∈[n]
∥zj∥2 ≥ −2C
e2nCt
⇒
∂
∂t
(cid:88)
j∈[n]
∥zj∥2
= e2nCt
j∈[n]
2nC
∥zj∥2
+
(cid:88)
j∈[n]
j∈[n]
∂
∂t
(cid:88)
j∈[n]
∥zj∥2
≥ 0
⇒
(cid:88)
j∈[n]
∥zj(t)∥2 ≥ e−2nCε
∥zj(t − ε)∥2
.
(cid:88)
j∈[n]
Here the (t) indicator is omitted for simplicity. Note that we bound ∂∥zi∥2
instead of ∂∥zi∥
∂t here,
∂t
since ∥zi∥ might not be differentiable if zi = 0, while ∥zi∥2 is always differentiable.
Finally, due to the definition of t, there exists i ∈ [n] such that zi(t − ε) ̸= 0. Then
j∈[n] ∥zj(t)∥2 ≥ e−2nCε (cid:16)(cid:80)
j∈[n] ∥zj(t − ε)∥2(cid:17)
> 0, a contradiction.
(cid:80)
F.2 Proofs for Section 5
By the closed form formula of gradient (3), the dynamics of zi is given by
∂zi
∂t
= −
1
2π
(cid:32)
π +
(cid:88)
j̸=i
∥wj∥
∥wi∥
sin θij −
∥v∥
∥wi∥
(cid:33)
sin θi
zi −
(cid:88)
j̸=i
π − θij
2π
zj.
(59)
Lemma 15. If there exists i, j such that κij(t) = κmax(t) < π
open neighborhood of t, differentiable at t, and
2 , then cos κij(t) is well-defined in an
∂
∂t
cos κij(t) ≤ −
π − θij(t)
π
(1 − cos κ2
ij(t)).
Proof. First note that for ∀i ∈ Q+(t), ∥zi(t)∥ > 0 ⇒ zi(t) = zi(t)
∥zi(t)∥ is differentiable at t.
Therefore, for ∀i, j ∈ Q+(t), cos κij = ⟨zi(t), zj(t)⟩ is well-defined in an open neighborhood of t
and differentiable at t. According to the dynamics of zi (59), ∀i ∈ Q+(t) we have
∂
∂t
zi =
∥zi∥ ∂zi
∂t zi
∂t − ∂∥zi∥
∥zi∥2
=
∂t , zi⟩zi
∂t − ⟨ ∂zi
∂zi
∥zi∥
= −
(cid:88)
k̸=i
π − θik
2π
zk − ⟨zk, zi⟩zi
∥zi∥
.
39
Then
∂ cos κij
∂t
(cid:28) ∂
∂t
∂⟨zi, zj⟩
∂t
(cid:28)
=
(cid:29)
(cid:29)
zj
∂
∂t
∥zk∥
∥zi∥
=
zi, zj
+
zi,
(cid:88)
= −
π − θik
2π
(cid:18) ∥zi∥
∥zj∥
k̸=i,k∈Q+
π − θij
2π
= −
(cid:124)
−
(cid:124)
(cid:88)
k̸=i,j∧k∈Q+
(cid:19)
(1 − cos2 κij)
(cid:125)
+
∥zj∥
∥zi∥
(cid:123)(cid:122)
I1
(cid:20)π − θik
2π
∥zk∥
∥zi∥
(⟨zk, zj⟩ − ⟨zk, zi⟩⟨zi, zj⟩) −
(cid:88)
k̸=j,k∈Q+
π − θjk
2π
∥zk∥
∥zj∥
(⟨zk, zi⟩ − ⟨zk, zj⟩⟨zi, zj⟩)
(cos κkj − cos κki cos κij) +
π − θjk
2π
∥zk∥
∥zj∥
(cid:21)
(cos κik − cos κkj cos κij)
.
(cid:123)(cid:122)
I2
(cid:125)
(60)
The expression above splits into two terms I1 and I2. The most important observation is that,
by setting zi, zj to be the pair of maximally separated vectors, i.e., κij = κmax, the second term I2
is guaranteed to be nonpositive. This is because for ∀k,
κki ≤ κmax < π/2, κkj ≤ κmax = κij ⇒ cos κkj ≥ cos κij ≥ cos κki cos κij ⇒ cos κkj−cos κki cos κij ≥ 0,
similarly we have cos κik − cos κkj cos κij ≥ 0, ∀k. So I2 ≤ 0 when κij = κmax. This implies that
when κij = κmax,
∂ cos κij
∂t
≤ I1 = −
π − θij
2π
(cid:18) ∥zi∥
∥zj∥
+
∥zj∥
∥zi∥
(cid:19)
(1 − cos2 κij) ≤ −
π − θij
π
(1 − cos2 κij).
Lemma 28. Given that the initial condition in Lemma 3 holds, suppose the network is over-
parameterized, i.e., n ≥ 2, and the initialization is non-degenerate, then for ∀t ∈ R≥0, at least
one of the following two conditions must hold:
∃i ∈ [n] s.t. zi(t) = 0,
κmax(t) ≥
κmax(0)
3
.
Proof. Assume for contradiction that ∃t such that zi(t) ̸= 0, ∀i and κmax(t) < κmax(0)
can define
3
(cid:26)
t∗ = inf
t ∈ R|∀i, zi(t) ̸= 0 ∧ κmax(t) <
κmax(0)
3
(cid:27)
.
(61)
(62)
. Then we
Note that by lemma 27 we have Q+(t∗) ≥ 1. For ∀i, j ∈ Q+(t∗), if κij(t∗) > κmax(0)/3, due to
the continuity of κij, κij > κmax(0)/3 holds in an open neighborhood of t∗, which contradicts the
definition of t∗. So ∀i, j ∈ Q+(t∗) we have κij(t∗) ≤ κmax(0)/3.
40
Step 1: First we prove ∀i, zi(t∗) ̸= 0.
If ∃i such that zi(t∗) = 0, then for such i we have ∂zi(t∗)
∂t = − (cid:80)
j̸=i
π−θij (t∗)
2π
zj(t∗). Since
Q+(t∗) ̸= ∅, pick k ∈ Q+(t∗) and we have
(cid:28) ∂zi(t∗)
∂t
(cid:29)
, zk(t∗)
= −
(cid:88)
j̸=i∧j∈Q+(t∗)
π − θij(t∗)
2π
⟨zj(t∗), zk(t∗)⟩ < 0,
where the last inequality is because κjk(t∗) ≤ κmax(0)/3 < π
2 .
On the other hand, the definition of ∂zi(t∗)
∂t
zi(t∗) + (t′ − t∗) ∂zi(t∗)
(t′ − t∗) ∂zk(t∗)
∂t + o(t′ − t∗). Then
∂t + o(t′ − t∗) = (t′ − t∗) ∂zi(t∗)
implies that ∃ε > 0, ∀t′ ∈ [t∗, t∗ + ε), zi(t′) =
∂t + o(t′ − t∗). Similarly, zk(t′) = zk(t∗) +
⟨zi(t′), zk(t′)⟩ = (t′ − t∗)
(cid:28) ∂zi(t∗)
∂t
(cid:29)
, zk(t∗)
+ o(t′ − t∗).
(63)
Since
(cid:68) ∂zi(t∗)
∂t
(cid:69)
, zk(t∗)
< 0 is a negative constant, there exists ε′ > 0 such that for ∀t′ ∈ [t∗, t∗ +ε′),
(cid:16)(cid:68)
(cid:69)(cid:17)
(63) is negative, consequently κik(t′) = arccos
κmax(t′) ≥ κik(t′) > π/2 ≥ κmax(0)/3, this contradicts the definition of t∗.
Step 2: After proving zi(t∗) ̸= 0, ∀i and κij(t∗) ≤ κmax(0)/3 < κmax(0), ∀i, j ∈ [n], we aim to
derive a contradiction.
2 . So ∀t′ ∈ [t∗, t∗ + ε′),
zi(t′), zk(t′)
> π
Note that t∗ ̸= 0 due to the definition of κmax. By the continuity of zi, ∃ε1 > 0 such that for
∀t ∈ (t∗ − ε1, t∗ + ε1), i ∈ [n], zi(t) ̸= 0. Then the definition of t∗ implies that ∀t ∈ (t∗ − ε1, t∗),
κmax(t) ≥ κmax(0)/3. Since on the interval (t∗ − ε1, t∗ + ε1), κmax = maxi,j∈[n] κij is continuous
4, we have that κmax(t∗) ≥ κmax(0)/3. Then κmax(t∗) = κmax(0)/3. Pick i, j such that κij(t∗) =
κmax(t∗). Note that θij(t∗) < π, otherwise κij(t∗) = π, a contradiction. Then by lemma 15 we
have
∂
∂t
cos κij(t∗) ≤ −
(1 − cos κ2
ij(t∗)) < 0.
π − θij(t∗)
π
∂t κij(t∗) > 0 ⇒ ∃ε2 > 0 s.t. ∀t ∈ (t∗, t∗ + ε2), κmax(t) ≥ κij(t) > κij(t∗) = κmax(t∗) =
So ∂
κmax(0)/3, this contradicts the definition of t∗.
Lemma 29. Given that the initial condition in Lemma 3 holds, suppose the network is over-
parameterized, i.e., n ≥ 2, and the initialization is non-degenerate, then for ∀t ∈ R≥0 we have
Z(t) ≥ Ω(κmax(0) max
i∈[n]
∥zi(t)∥).
Proof. We show that for ∀t ∈ R≥0,
max
i,j∈[n]
∥zi(t) − zj(t)∥ ≥ Ω(κmax(0) max
i∈[n]
∥zi(t)∥).
(64)
W.L.O.G., suppose z1(t) = maxi∈[n] ∥zi(t)∥. By lemma 28, for ∀t one of the following two cases
must happen:
4Generally κmax may not be continuous since the range of taking the max (i, j ∈ Q+) might change, but it is
continuous on (t∗ − ε1, t∗ + ε1) since all zi's are nonzero on this interval.
41
• ∃k s.t. zk(t) = 0.
By lemma 27, k ̸= 1. Then maxi,j∈[n] ∥zi(t) − zj(t)∥ ≥ ∥z1(t) − zk(t)∥ = ∥z1(t)∥ ≥
O(κmax(0) maxi∈[n] ∥zi(t)∥).
• κmax(t) ≥ κmax(0)/3.
Pick a pair i, j such that κij(t) = κmax(t). Then κ1i(t) + κ1j(t) ≥ κij(t) ≥ κmax(0)/3 ⇒
max{κ1i(t), κ1j(t)} ≥ κmax(0)/6. W.L.O.G., suppose κ1i(t) ≥ κmax(0)/6. If κ1i(t) ≤ π/2,
then ∥z1(t) − zi(t)∥ ≥ ∥z1(t)∥ sin κ1i(t) ≥ Ω(κmax(0) maxi∈[n] ∥zi(t)∥). If κ1i(t) > π/2,
then ∥z1(t) − zi(t)∥ ≥ ∥z1(t)∥ ≥ Ω(κmax(0) maxi∈[n] ∥zi(t)∥). So no matter which case
happens, (64) always holds.
In conclusion, we have Z(t) ≥ maxi,j∈[n] ∥zi(t) − zj(t)∥ ≥ Ω(κmax(0) maxi∈[n] ∥zi(t)∥).
Combined with Lemma 27, Lemma 29 immediately implies the following corollary.
Corollary 30. Given that the initial condition in Lemma 3 holds, suppose zi(0) ̸= 0, ∀i ∈ [n],
κmax(0) > 0 and n ≥ 2, then for ∀t ∈ R≥0 we have Z(t) > 0.
Lemma 31. Suppose the conditions (57) (58) in Theorem 25 holds. Suppose the network is over-
parameterized, i.e., n ≥ 2, and the initialization is non-degenerate. Then ∀t ≥ T2 we have
∂
∂t
Z(t) ≥ −O(n2∥v∥θ2
max(t)).
Proof. Recall the closed form expression of gradient (3), which can be decomposed into two terms,
∂L(w)
∂wi
=
1
2
(cid:124)
j
(cid:123)(cid:122)
I1
(cid:32)
(cid:88)
(cid:33)
wj − v
+
(cid:34)(cid:32)
1
2π
(cid:88)
j̸=i
∥wj∥ sin θij − ∥v∥ sin θi
wi −
(cid:33)
(cid:125)
(cid:124)
(cid:123)(cid:122)
I2
(cid:35)
θijwj + θiv
.
(cid:88)
j̸=i
(cid:125)
The second term I2 can be rewritten as
I2 =
1
2π
(cid:34)
(cid:88)
j̸=i
∥wj∥(sin θij − θij)wi +
(cid:88)
j̸=i
∥wj∥θij(wi − wj) − ∥v∥(sin θi − θi)wi − ∥v∥θi(wi − v)
(cid:35)
By Theorem 25, for ∀t > T2, we have ∥wi(t)∥ = Θ(∥v∥/n). Note that sin θij(t) − θij(t) =
ij(t)) = O(θ3
max(t)). Combined with ∥wi − wj∥ =
max(t)), similarly sin θi(t) − θi(t) = O(θ3
O(θ3
2 sin(θij/2) = O(θmax), we get
∥I2∥ ≤
(cid:88)
j̸=i
Θ(∥v∥/n)O(θ3
max) +
(cid:88)
j̸=i
Θ(∥v∥/n)θmaxO(θmax)
+∥v∥O(θ3
max) + ∥v∥θmaxO(θmax) = O(∥v∥θ2
max).
Then ∀i, ∂wi
∂t = − ∂L(w)
= − 1
2
∂wi
is the same for all wi, so for ∀i, j ∈ [n] we have
j wj − v
(cid:16)(cid:80)
(cid:17)
max). Note that the first term − 1
+O(∥v∥θ2
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13) = O(∥v∥θ2
(cid:13) =
(cid:13)
∂t − ∂wj
∂wi−wj
∂t
(cid:13)
(cid:13)
(cid:13)
∂wi
∂t
max).
(cid:16)(cid:80)
j wj − v
(cid:17)
42
For ∀i, j ∈ [n], if zi(t) = zj(t) then ∂zi(t)
∂t = ∂zj (t)
∂t ⇒ ∂
∂t ∥zi(t) − zj(t)∥ = 0. Otherwise
zi(t) − zj(t) ̸= 0 and
∂
∂t
(∥zi(t) − zj(t)∥) =
So for both cases we have ∂
∂t Z(t) = (cid:80)
∂
Then ∂
1≤i<j≤n
≥ −
(cid:13)
(cid:13)
(cid:13)
(cid:13)
∂
∂t
(zi(t) − zj(t))
(cid:13)
(cid:13)
(cid:13)
(cid:13)
≥ −
(cid:29)
(zi(t) − zj(t)) , zi(t) − zj(t)
(cid:28) ∂
∂t
(cid:13)
(cid:13)
(cid:13)
(cid:13)
∂t (∥zi(t) − zj(t)∥) ≥ −O(∥v∥θ2
∂t (∥zi(t) − zj(t)∥) ≥ −O(n2∥v∥θ2
(wi(t) − wj(t))
∂
∂t
≥ −O(∥v∥θ2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
max(t)).
max(t)).
max(t)).
F.3 Proof of Main Theorem
Theorem 12. Suppose the network is over-parameterized, i.e., n ≥ 2. For ∀δ > 0, if the
initialization is non-degenerate, d = Ω(log(n/δ)), σ = O (cid:0)n−4226d−1/2∥v∥(cid:1), then there exists
T2 = O (cid:0) log n
(cid:1) such that with probability at least 1 − δ, for ∀t ≥ T2 we have
n
L(w(t))−1/3 ≤ O
(cid:18)
n17/3
max(0)∥v∥2/3
κ2
(cid:19)
(t − T2) + γ,
where γ ∈ R+ is a constant that does not depend on t.
Proof. For ∀t ≥ T2 we have maxi∈[n] ∥zi(t)∥ ≥ θmax(t)Θ(∥v∥/n). Then by lemma 29, for ∀t ≥
T2, Z(t) ≥ Ω(κmax(0)θmax(t)∥v∥/n) ⇒ θmax(t) = O
. Combined with lemma 31 we
have
(cid:16) nZ(t)
κmax(0)∥v∥
(cid:17)
∂
∂t
Z(t) ≥ −O(n2∥v∥θ2
max(t)) ≥ −O
.
(65)
(cid:18) n4Z 2(t)
(cid:19)
κ2
max(0)∥v∥
By Corollary 30, Z(t) is always strictly positive. We can therefore calculate the dynamics of
1/Z(t) as: ∀t ≥ T2,
∂
∂t
1
Z(t)
= −
1
Z 2(t)
∂
∂t
Z(t) ≤ O
(cid:18)
(cid:19)
n4
κ2
max(0)∥v∥
⇒
1
Z(t)
= O
(cid:18)
n4
κ2
max(0)∥v∥
(cid:19)
(t − T2)
+
.
1
Z(T2)
(66)
On the other hand, by Theorem 25 we have
(cid:88)
(cid:88)
(∥zi(t)∥ + ∥zj(t)∥) ≤
Z(t) ≤
(θi(t)∥wi(t)∥ + θj(t)∥wj(t)∥) ≤ O(n∥v∥θmax).
1≤i<j≤n
1≤i<j≤n
By lemma 18 we have
∀t ≥ T2, θmax(t) = O
(cid:32)(cid:18) L(w(t))n2
(cid:19)1/3(cid:33)
∥v∥2
⇒ L(w(t)) ≥ Ω
(cid:18) Z 3(t)
n5∥v∥
(cid:19)
.
(67)
Combined with (66), we have
L(w(t))−1/3 ≤ O
(cid:18)
n17/3
κ2
max(0)∥v∥2/3
(cid:19)
(t − T2) +
n5/3∥v∥1/3
Z(T2)
.
Finally, since Corollary 30 implies Z(T2) > 0, setting γ = n5/3∥v∥1/3
Z(T2)
finishes the proof.
43
|
|
http://arxiv.org/abs/2302.10030v1 | 2023-02-20T15:24:06 | 2023-02-20T15:24:06 | Safe Deep Reinforcement Learning by Verifying Task-Level Properties | Cost functions are commonly employed in Safe Deep Reinforcement Learning
(DRL). However, the cost is typically encoded as an indicator function due to
the difficulty of quantifying the risk of policy decisions in the state space.
Such an encoding requires the agent to visit numerous unsafe states to learn a
cost-value function to drive the learning process toward safety. Hence,
increasing the number of unsafe interactions and decreasing sample efficiency.
In this paper, we investigate an alternative approach that uses domain
knowledge to quantify the risk in the proximity of such states by defining a
violation metric. This metric is computed by verifying task-level properties,
shaped as input-output conditions, and it is used as a penalty to bias the
policy away from unsafe states without learning an additional value function.
We investigate the benefits of using the violation metric in standard Safe DRL
benchmarks and robotic mapless navigation tasks. The navigation experiments
bridge the gap between Safe DRL and robotics, introducing a framework that
allows rapid testing on real robots. Our experiments show that policies trained
with the violation penalty achieve higher performance over Safe DRL baselines
and significantly reduce the number of visited unsafe states. | [
"Enrico Marchesini",
"Luca Marzari",
"Alessandro Farinelli",
"Christopher Amato"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.10030v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.10030v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.AI",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.AI",
"cs.LG"
] | 3
2
0
2
b
e
F
0
2
]
I
A
.
s
c
[
1
v
0
3
0
0
1
.
2
0
3
2
:
v
i
X
r
a
Safe Deep Reinforcement Learning
by Verifying Task-Level Properties
Enrico Marchesini*
Northeastern University
Boston (MA), USA
[email protected]
Alessandro Farinelli
University of Verona
Verona, Italy
[email protected]
Luca Marzari*
University of Verona
Verona, Italy
[email protected]
Christopher Amato
Northeastern University
Boston (MA), USA
[email protected]
ABSTRACT
Cost functions are commonly employed in Safe Deep Reinforce-
ment Learning (DRL). However, the cost is typically encoded as an
indicator function due to the difficulty of quantifying the risk of
policy decisions in the state space. Such an encoding requires the
agent to visit numerous unsafe states to learn a cost-value function
to drive the learning process toward safety. Hence, increasing the
number of unsafe interactions and decreasing sample efficiency. In
this paper, we investigate an alternative approach that uses domain
knowledge to quantify the risk in the proximity of such states by
defining a violation metric. This metric is computed by verifying
task-level properties, shaped as input-output conditions, and it is
used as a penalty to bias the policy away from unsafe states without
learning an additional value function. We investigate the benefits
of using the violation metric in standard Safe DRL benchmarks
and robotic mapless navigation tasks. The navigation experiments
bridge the gap between Safe DRL and robotics, introducing a frame-
work that allows rapid testing on real robots. Our experiments
show that policies trained with the violation penalty achieve higher
performance over Safe DRL baselines and significantly reduce the
number of visited unsafe states.
KEYWORDS
Deep Reinforcement Learning; Safety; Robot Navigation
ACM Reference Format:
Enrico Marchesini*, Luca Marzari*, Alessandro Farinelli, and Christopher
Amato. 2023. Safe Deep Reinforcement Learning by Verifying Task-Level
Properties. In Proc. of the 22nd International Conference on Autonomous
Agents and Multiagent Systems (AAMAS 2023), London, United Kingdom,
May 29 – June 2, 2023, IFAAMAS, 10 pages.
1 INTRODUCTION
Safe Deep Reinforcement Learning (DRL) approaches typically fos-
ter safety by limiting the accumulation of costs caused by unsafe
interactions [12]. Defining informative cost functions, however, has
the same issues as designing rewards [13] due to the difficulty of
quantifying the risk around unsafe states. For this reason, recent
Proc. of the 22nd International Conference on Autonomous Agents and Multiagent Sys-
tems (AAMAS 2023), A. Ricci, W. Yeoh, N. Agmon, B. An (eds.), May 29 – June 2, 2023,
London, United Kingdom. © 2023 International Foundation for Autonomous Agents
and Multiagent Systems (www.ifaamas.org). All rights reserved.
* indicates equal contribution.
works rely on indicator functions, where a positive value deems
a state unsafe [22]. In detail, the cost refers to a state-action pair
(s, a), and it is backed up to propagate safety information and esti-
mate a cost-value function. The cost metric and its value estimation
have been used to drive the learning process towards safety using
penalties [33, 43], cumulative or instantaneous constraints [21, 41].
However, the learned value functions have poor estimates and end
up in local optima [14, 25], limiting their efficacy in fostering safety.
We argue that the cost's sparse nature is another key issue that
hinders safety and sample efficiency. A sparse definition of the cost
requires the agent to visit unsafe states to learn good estimates from
the sparse feedback. These issues are pivotal in a safety context
where we aim to minimize the number of visited unsafe states.
In this direction, we note that the indicator costs do not carry
information about areas around s where it is risky to perform the
action that led to deeming s unsafe. For example, consider a naviga-
tion scenario where a policy chooses the robot's velocity, given its
position. In this context, prior works trigger a positive cost when
colliding in a state s (Figure 1 on the left) and need to visit similar
unsafe interactions around s to learn the cost-value function that
drives the learning process toward safety [7, 21, 41]. In contrast, it
is possible to exploit high-level system specifications (e.g., robots'
size and velocity) to define an area of size ε around s where perform-
ing the action a that led to collision would result in other unsafe
interactions (Figure 1 on the right). We can then compute a safety
value based on the policy's decisions, avoiding visiting such an
unsafe area to learn a cost-value function. Hence, the idea is to
replace indicator costs and the learning of cost-value functions by
quantifying the states in the unsafe area where the policy chooses
a and use it as a penalty to discourage unsafe decisions [1, 19]. Our
hypothesis is that this procedure can significantly improve sample
efficiency and reduce the number of visited hazardous states.
To this end, we propose an approximate violation metric as a
penalty that uses system specifications to quantify how safe policy
Figure 1: Indicator cost function (left). Unsafe interactions,
caused by the same action, around the unsafe state (right).
decisions are around s. Following recent literature [20, 26, 36], we
encode whether a policy chooses specific actions (outputs) in a
subspace of the state space (inputs) as input-output conditional
statements, commonly referred to as task-level properties (or state-
action mappings). Formal Verification (FV) approaches for Deep
Neural Networks (DNNs) have been used to formally check all the
states where the policy violates such properties [45]. In particular,
[10] introduced a formal violation metric by provably quantifying
how well the policy respects the properties. Such a formal violation
naturally addresses the limitation of indicator cost functions but
has not been previously investigated to foster safety in DRL, as FV
has two main issues. (i) It is a NP-Complete problem [17] that makes
it intractable to compute the formal violation metric at training
time without a prohibitive overhead. (ii) The state-action mappings
are hard-coded, which could be unfeasible in tasks with complex
or unknown specifications. Against this background, we make the
following contributions to the state-of-the-art:
• We replace FV with a sample-based approach that approx-
imates the violation metric with forward propagations of
the agent's network on the sampled states. Such an approxi-
mation empirically shows a negligible error over the value
computed with FV in a fraction of the computation time.
• We generate an additional state-action mapping when per-
forming an unsafe interaction during the training, using a
fixed-size area around the visited unsafe state and the action
that led to such interaction.
• We show the advantages of using our approximate violation
as a penalty in existing DRL algorithms and employ FV [10]
on the trained policies to show that our approach allows
learning safer behaviors (i.e., lower violations).
Our empirical evaluation considers a set of Unity [15] robotic map-
less navigation tasks [29, 42, 51]. In contrast to Safe DRL bench-
marks (e.g., SafeMuJoCo [21]), our scenarios allow transferring
policies directly on the robot to foster the development of Safe DRL
approaches in realistic applications. We also evaluate violation-
based approaches in standard SafeMuJoCo tasks. In all scenarios,
we compare with unconstrained DRL baselines augmented with
a cost penalty [39, 47], and constrained DRL [41]. Our evaluation
shows that cost-based algorithms have higher costs and higher vio-
lations, confirming the lack of information provided by indicator
cost functions. In contrast, the approximate violation-based penalty
drastically reduces unsafe behaviors (i.e., lower cost and violation)
while preserving good returns during and after training.
2 PRELIMINARIES
A DRL problem is typically modeled as a Markov Decision Process
(MDP), described by a tuple < S, A, P, r, γ > where S is the state
space, A is the action space, P : S × A → S is the state transition
function, r : S × A → R is a reward function, and γ ∈ [0, 1) is the
discount factor. In particular, given a policy π ∈ Π := {π (a|s) :
s ∈ S, a ∈ A}, the agent aims to maximize the expected discounted
return for each trajectory τ = (s0, a0, r0, * * * ):
J π
r
:= Eτ∼π
max
π ∈Π
(cid:35)
γtr (st , at )
(cid:34) ∞
∑︁
t =0
(1)
A common approach to fostering safety is adding a penalty to
the reward to learn how to avoid unsafe interactions character-
ized by lower payoffs [12]. Otherwise, MDPs can be extended to
Constrained MDPs (CMDPs) to incorporate a set of constraints C
defined on C0,...,c : S ×A → R cost functions (where c is the number
of constraints) and their thresholds t0,...,c [3]. A Ci -return is defined
as J π
γtCi (st , at )]. Constraint-satisfying (feasible)
policies Π C, and optimal policies π ∗ are thus defined as:
Ci := Eτ∼π [(cid:205)∞
t =0
Π C := {π ∈ Π : J π
Ci
≤ ti, ∀i ∈ [0, . . . , c]},
π ∗ = max
π ∈ΠC
J π
r
(2)
Constrained DRL algorithms aim at maximizing the expected return
J π
r while maintaining costs under hard-coded thresholds t:
J π
r
max
π ∈Π
s.t.
J π
C ≤ t
(3)
Such a constrained optimization problem is usually transformed
into an equivalent unconstrained one using the Lagrangian method
[35, 38, 41], resembling a penalty-based approach. Recently, Tessler
et al. [43] also argued that constrained DRL has significant limi-
tations as it requires a parametrization of the policy (i.e., it does
not work with value-based DRL), a propagation of the constraint
violation over trajectories and works with limited types of con-
straints (e.g., cumulative, instantaneous). For these reasons, the
authors show the efficacy of integrating a penalty signal into the
reward function. This motivates our choice of using penalty-based
approaches to evaluate the benefits of incorporating the proposed
approximate violation as a penalty to foster safety.
2.1 Properties and Violation
From FV literature [20], a property P is hard-coded using task-
level knowledge as a pre-condition R and a post-condition Q (i.e.,
P := ⟨R, Q⟩). In a DRL context, R is the domain of the property (i.e.,
the area around s), and Q is the co-domain (i.e., an action). Broadly
speaking, given a DNN N with y1,...,n outputs, R is defined with an
interval εi for each input i of N , which we refer to as εεε-area, and
Q represents different desiderata on the output [4]. For example,
in a value-based setup where the policy selects the action with
the highest value, the post-condition Q of a property designed for
safety models never select the action corresponding to the output
yk ∈ y1,...,n. Formally, Q checks the following inequality:
yk < yi ∀i ∈ [1, n] − {k }
(4)
that extends to continuous actions as shown in prior work [20, 45].
Recent works introduced a violation metric to quantify the num-
ber of violations in the domain of the property using verification
techniques [10, 31]. In more detail, the violation is defined as the
ratio between the size of R′ ⊆ R where the post-condition is vio-
lated (i.e., the inequality does not hold and yk is selected) and R.
Such a provable violation carries the task-level information of the
properties and quantifies how often a property is violated. Hence,
when using properties to model safety specifications, which we
refer to as safety properties, the violation represents a locally-aware
cost function.
Algorithm 1 Computing the Approximate Violation
Given N with outputs y1,...,n, the current state s, properties
⟨R, Q⟩, and size m of states to sample.
1: N ′ ← add a layer with n outputs to N that implements (4)
2: P′ ← ⟨R, Q⟩ if s ∩ R ≠ ∅, ∀ ⟨R, Q⟩ ∈ ⟨R, Q⟩ ▷ i.e., s is unsafe
3: I ← Sample m points from p [R] ∀p ∈ P′
4: violation = Count max[N ′(I )] ≤ 0 ∀I ∈ I ▷ considering yk
from p [Q] ∀p ∈ P′
5: return violation / (m |P′|)
information in a local region around a state. Moreover, our approx-
imate violation:
• Includes safety information of areas of interest due to the
state-action mappings (i.e., properties).
• Approximates how often a property violation might occur,
having a similar role to Lagrangian multipliers but without
requiring additional gradient steps or value estimators.
• It does not require additional environment interactions, dras-
tically reducing the number of visited unsafe states.
Finally, prior verification works only rely on hard-coded proper-
ties [10, 46, 48]. Still, it is not uncommon to experience an unsafe
state not included in the pre-conditions due to design issues, i.e.,
s ∩ R = ∅ ∀ R ∈ R. Hence, we generate an additional property upon
experiencing an unsafe state s using a fixed-size area around s as
R and the performed action as Q. However, hard-coded properties
are still crucial as there could be corner cases with more than one
action to avoid.
3.1.1 Visual Example. We further detail the approximate violation
computation using a visual example. In particular, Figure 2 shows
an illustrative example of a DNN and a property Pr (following
Section 4.2 formalization). For the sake of simplicity, we show the
process assuming to use only m = 1 sample from the property
pre-condition. Following Algorithm 1, we show N ′ on the right of
Figure 2, consisting of a new output that implements yi − yk ∀i ∈
[1, n], where yk with k = 1 is the node that represents the action
we are interested in avoiding. Considering the example in Figure
1, x0,...,3 are the current position, orientation, and distance from
3 METHODS
We aim to investigate the benefits of combining a reward and a
violation-based penalty value into an MDP. Following prior penalty-
based approaches [12, 43], we maximize the following objective:
(cid:34) ∞
∑︁
(cid:35)
γtr (st , at ) − Z (*)
(5)
J π
r,C := Eτ∼π
max
π ∈Π
t =0
where Z (*) is a generic penalty function. For example, a violation-
penalty is Zπ (st ± εεε), indicating that the violation depends on the
policy decisions in a proximity εεε of the state (i.e., the εεε-area, or
R). Equation 5 has two core benefits over other Safe DRL methods
based on constraints: (i) penalty objectives potentially maintain the
same optimal policy of the underlying MDP as they do not constrain
exploration nor reduce the space of feasible policies as constrained
approaches [34].1 (ii) Constrained DRL typically estimates an ad-
vantage function to propagate cost information, hindering their
application with values that strictly depend on the current policy.
Moreover, this requires visiting unsafe states to learn effective esti-
mates for the sparse cost values. In contrast, penalty-based methods
do not require a separate advantage estimate. In addition, various
DRL algorithms, such as Proximal Policy Optimization (PPO) [39],
provide significant empirical evidence of the benefits of using penal-
ties instead of constraints [43].
3.1 Approximate Violation
A violation metric computed on a safety property quantifies the
number of unsafe policy decisions over an area of the state space
around the state s. Such a local component and the task-level
knowledge inherited by the safety properties naturally address
the indicator cost functions' lack of information. However, the NP-
Completeness of FV [17] makes the provable violation computation
intractable during the training due to the significant overhead of ver-
ification tools [18]. Hence, we address the computational demands
of FV by proposing a novel sample-based method to approximate
the violation.
Given a DNN N that parameterizes a policy, a list of properties
P = ⟨R, Q⟩, and the current state s, we aim at checking whether
yk < yi ∀i ∈ [1, n] − {k } (where y := [y1,...,n] are the outputs of
N given s as input). The general flow of our method is presented
in Algorithm 1: first, we embed the condition (4) in the network
architecture by concatenating a new output layer that implements
yi −yk ∀i ∈ [1, n] (line 1). We refer to this augmented network as N ′.
If s is contained in one or more pre-condition (i.e., it is deemed risky
according to the properties), we consider such a subset of properties
P′ ⊆ P to compute the approximate violation (line 2). Hence, we
randomly sample a set of states I from the pre-conditions R ∈ P′
(line 3). Finally, after propagating I through N ′, we enumerate
the outputs N ′(I ) ≤ 0, which are the ones that do not satisfy the
post-conditions (line 4). Finally, our approximate violation is the
ratio between the number of such outputs over the total sampled
points (line 5), which closely resembles how the formal violation is
computed in [10].
Similarly to the formal violation, our approximation can be in-
terpreted as a locally-aware cost because it is computed using the
1This is not the case for navigation tasks as safe policies avoid obstacles.
Figure 2: Example of computing the approximate violation.
(e.g., violation), enabling a straightforward application to different
penalty-based objectives (as in Equation 5) or constraints.
We introduce four training and one testing environment with
different obstacles, namely Fixed_obs_{T, NT}, Dynamic_obs_{T, NT},
and Evaluation_NT depicted in Figure 3. Such a variety of conditions
serve to provide different settings for evaluating Safe DRL algo-
rithms in robotic navigation. The environments inherit several char-
acteristics from known benchmarks such as SafetyGym [37] and dif-
fer from each other as the obstacles that can be Fixed (parallelepiped-
shaped static objects) or Dynamic (cylindrical-shaped objects that
move to random positions at a constant velocity). Moreover, obsta-
cles can be Terminal (T) if they end an episode upon collision, or
Non-Terminal (NT) if the agent can navigate through them.
4.1 Environment Descriptions
Our scenarios share a 4m × 4m size (6m × 6m for the testing one),
randomly generated obstacle-free goals, and a timeout at 500 steps.
A list of environments and their other main features follows:
• Fixed_obs_T has fixed terminal (T) obstacles. With terminal,
we intend that the episode ends upon collision.
• Fixed_obs_NT differs from the previous one for the non-
terminal (NT) obstacles. The environment returns a signal
upon each collision that can be used to model cost functions
or other penalties. Non-terminal obstacles are visible to the
lidars but non-tangible, i.e., the Turtlebot3 can pass through
them. This class of obstacles represents the main challenge
to designing safe DRL solutions, as the robot could get more
positive rewards by crossing an obstacle at the expense of a
higher number of unsafe behaviors.
• Dynamics_obs_T has cylindrical-shaped dynamic terminal
(T) obstacles. Such obstacles move toward random positions
at a constant velocity, representing a harder challenge. The
obstacles can travel on the robot's goal, so the agent must
learn a wider variety of behaviors (e.g., react to an approach-
ing obstacle, stand still to wait for the goal to clear).
• Dynamics_obs_NT : differs from the previous one for the
non-terminal (NT) obstacles.
• Evaluation_NT : we use this evaluation environment to test
the generalization abilities of trained policies to new situ-
ations. This scenario is wider and contains both fixed and
dynamic non-terminal obstacles of different shapes.
the goal for the robot. We want to avoid the action with index 0
(i.e., y1), a forward movement at velocity (cid:174)v. We sample the m = 1
point from the property pre-condition, obtaining i ∈ I that is then
forward propagated through the network N ′(I ). Such propagation
returns y1 = 3, y2 = 1, y3 = 2 in the original output layer, and
y ′
3 = −1 in the output of N ′. Finally, we enumerate
1 = 0, y ′
the states ∈ I where the maximum of N ′(I ) is less than or equal to
0, which means that y1 will be chosen, leading to a violation.
2 = −2, y ′
3.2 Limitations
The violation requires hard-coded properties, which are challeng-
ing to design when considering agents with unknown dynamics.
Our generated property does not consider scenarios where multiple
actions are unsafe for the same state, so it remains unclear how
to collect and refine properties during the training to model safe
behaviors. Hence, as in FV literature [20], we assume having access
to task-level knowledge to design the hard-coded properties. In
safety-critical contexts, this assumption typically holds. Consid-
ering different input types (e.g., images) is conceptually feasible
but would require further research and empirical evaluation. To
this end, model-based DRL would allow using the model to design
the unsafe area. Finally, it is unclear how to provide guarantees in
model-free Safe DRL approaches, including our work, constrained
DRL [2, 21, 49], and several other approaches summarized in Garcıa
and Fernández [12]. As discussed in Ilyas et al. [14], using DNNs
for approximating policies and values makes the method diverge
from the underlying theoretical framework. Nonetheless, we start
addressing such key issues by employing existing FV approaches
to check the trained policy decisions over the properties of interest.
4 EXPERIMENTS
First, we introduce a set of Turtlebot3-based safety mapless navi-
gation tasks to enable rapid testing of policies in realistic contexts.
Our environments rely on Unity [15] as it allows rapid prototyp-
ing, Gym compatibility, and interface with the Robotic Operating
System (ROS). Mapless navigation is a well-known problem in
model-free DRL [42, 51], prior Safe DRL literature [27, 37], and
multi-agent DRL [29, 30]. While standard navigation planners use
a map of the environment and exhaustive information from the
sensors, DRL setups consider more challenging conditions, such as
not having a map and relying only on sparse local sensing. We use
a similar encoding to prior work [6, 28, 32, 42, 51]: 11 sparse laser
scans with a limited range and two values for the target relative
position (i.e., distance and heading) as observations. Discrete ac-
tions encode angular and linear velocities to reduce training times
while maintaining good navigation skills [28].2 At step t, the agent
receives a reward:
(cid:40)
rt =
1
Δ(dt −1, dt ) − β
if goal reached
otherwise
(6)
The agent thus obtains a dense reward given by the distance (d)
difference (Δ) from the goal in two consecutive steps, with a per-
step −β to incentive shorter paths. Each collision returns a posi-
tive cost signal that can be used to compute the desired penalty
2Our environments also support continuous actions and different domain ran-
domization of the tasks and physical properties through the Unity editor.
Figure 3: Fixed, Dynamic, Evaluation tasks with different ob-
stacles. Terminal obstacles (T) reset the environment upon
collision. Non-terminal ones (NT) allow the robot to cross
them, experiencing more unsafe states. The evaluation en-
vironment has fixed and dynamic non-terminal obstacles.
Table 1: Average violation (%), and computation time for properties p↑,←,→ calculated using ProVe[10], and our approximation
with 100, 1.000, and 10000 samples.
ProVe
Estimation 100 Estimation 1k Estimation 10k
Property
p↑
p←
p→
Mean violation:
81.48 ± 1.2
73.9 ± 0.8
74.2 ± 0.3
76.53
Mean computation time:
≈2m37s
4.2 Properties for Mapless Navigation
Our properties shape rational, safe behaviors for mapless navigation
and are used to compute the approximate violation. Moreover, we
consider an online generated property described in Section 3.1. A
natural language description of the main hard-coded properties
follows:
• p↑: There is an obstacle close in front ⇒ Do not go forward
• p←: There is an obstacle close to the left ⇒ Do not turn left
• p→: There is an obstacle close to the right ⇒ Do not turn right
We use the maximum agent velocity to determine the size of the
area around the (unsafe) states of interest (i.e., the εεε-area). For
example, a formal definition for p↑ is:
p↑ : x0, . . . , x4 ∈ [0, 1] ∧ x5 ∈ [0, 0.05] ∧ x6, . . . , x10 ∈ [0, 1] ∧ x11,
x12 ∈ [−1, 1] =⇒ a ≠ 4
where x0, . . . , x10 are the 11 lidar values, x11, x12 is the relative
position of the goal (i.e., distance and heading), and action a = 4
corresponds to a forward movement. Crucially, each input xi po-
tentially considers a different interval to model the area of interest.
Hence, p↑ checks the policy's decisions when there is an obstacle
close to the front (i.e., x5 ∈ [0, 0.05]) under any possible target posi-
tion (x11, x12 ∈ [−1, 1]).3 The approximate violation computed over
these properties thus contains information about a specific unsafe
situation under a general goal configuration (i.e., x11, x12 ∈ [−1, 1]).
To assess how good our approximate violation is over the prov-
able one, we compare it with the violation computed by a FV frame-
work. In particular, the formal violation and our approximate one
are computed using the above properties. They are averaged over
the same ten models collected at random steps during the train-
ing. Table 1 shows the violation values for each property p↑,←,→
computed by ProVe [10], and our approximation using 100, 1000,
and 10000 samples. Our approximation shows an average 0.69%
error over the formal violation even when using only 100 samples.
Such an error further decreases to 0.47% by using 10000 samples.
By exploiting parallelism and batch computation of modern Deep
Learning Frameworks, the increase in computation time for the
approximate violation with 100 or 10000 samples is comparable.
Conversely, as discussed in Section 3.1, ProVe's average computa-
tion time is orders of magnitude higher with respect to our approach
(i.e., 0.06 over 157 seconds). However, our approximate methodol-
ogy does not formally guarantee the policy behaviors due to its
81.0 ± 0.6
73.5 ± 0.2
73.6 ± 0.1
76.00
≈0.053s
81.1 ± 0.8
73.63 ± 0.2
73.67 ± 0.1
76.13
≈ 0.056s
81.17 ± 0.5
73.65 ± 0.3
73.68 ± 0.1
76.17
≈0.060s
sample-based nature. For this reason, the next section uses stan-
dard FV frameworks on the trained policies to show the provable
violation results.
4.3 Empirical Evaluation
Our evaluation aims at showing the following:
• The benefits of integrating reward and safety specifications
into a single MDP.
• The advantages of using our violation over indicator cost
functions. To assess our claims, we plot the following values
averaged over the last 1000 steps: (i) success (i.e., the number
of goals reached), (ii) cost, (iii) and the violation at different
stages of the training.
Data are collected on an i7-9700k and consider the mean and
standard deviation of ten independent runs [9]. We consider the cost
and violation penalty objective (5) in a value-based (Dueling Double
Deep Q-Network (DuelDDQN) [47]) and policy-based (PPO [39])
baselines, referring to the resultant algorithms as DuelDDQN_{cost,
violation} and PPO_{cost, violation}. We compare with Lagrangian
PPO (LPPO) [41] as it is a widely adopted Constrained DRL baseline
and achieves state-of-the-art performance in similar SafetyGym
navigation-based tasks.4 According to the literature, the value-
based and policy-gradient baselines should achieve the highest
rewards and costs (having no penalty information) [37]. Conversely,
LPPO should show a significant trade-off between average cost and
reward or fail at maintaining the cost threshold when set to low
values [21, 27, 37]. In contrast, we expect the penalty-based methods
to achieve promising returns while significantly reducing the cost
and the number of violations during the training.
Terminal Results. Our results are shown in the Appendix. The
information carried by the violation results in a significant perfor-
mance advantage, maintaining similar or higher successes over non-
violation-based approaches. Moreover, the policy-based algorithms
show superior performance over the value-based implementations.
Non-Terminal Results. Given the higher performance of policy-
based algorithms, the following experiments omit value-based ones.
Figure 4 show the results of (NT) tasks. As in the previous eval-
uation, PPO achieves a higher number of successes and a higher
cost. In contrast, LPPO satisfies the constraint most of the time but
achieves the lowest successes and does not learn effective naviga-
tion behaviors in Dynamic_obs_NT, confirming the performance
3We measured that a minimum normalized distance of 0.05 is required for the
robot to turn at max speed and avoid obstacles in front.
4For a fair comparison, we set the cost threshold of LPPO to the average cost
obtained by PPO_cost. The Appendices detail our hyper-parameters and are accessible
at the following link: shorturl.at/crSX6
Figure 4: The two rows show average success, cost, and violation in the (NT) environments for PPO, the cost and violation
penalty versions PPO_{cost, violation}, and LPPO. * indicates penalty-based algorithms.
Table 2: Average formal violation for the models at convergence in NT environment. Our violation-based penalty algorithm
is the safest overall, as a lower violation value translates into fewer collisions.
trade-off in complex scenarios [27, 37]. Moreover, PPO_violation
achieves better or comparable successes and cost values over PPO_cost
but significantly reduces the violations during the training. At
convergence, PPO_violation shows a ≈ 2.2% and ≈ 4.6% improve-
ment over the cost counterparts, corresponding to 1320 and 2760
fewer unsafe policy decisions. In general, non-terminal tasks allow
experiencing more unsafe situations in a trajectory, making the
performance advantage in terms of the safety of violation-based
algorithms more evident.
In addition, we use FV [10] on the trained models of NT environ-
ments to provably guarantee the number of unsafe policy decisions
over our safety properties. Table 2 shows the average violations of
the main properties for the models at the convergence of each train-
ing seed, which confirms that policies trained with PPO_violation
achieve lower violations, i.e., perform fewer collisions. The Appen-
dix shows the same results for the T environments.
Evaluation Results. Table 3 reports the average success, cost,
and violation for the best model at the convergence of each training
seed in the evaluation task of Figure 3. The evaluation in a previ-
ously unseen scenario is used to test the generalization skills of the
trained policies. In our experiments, the violation-based algorithm
confirms superior navigation skills, achieving more success while
Table 3: Performance of the best-trained models in the test-
ing environment Evaluation_NT.
Mean Success Mean Cost Mean Violation
PPO
PPO_cost
PPO_violation
LPPO
10.0 ± 0.4
6.4 ± 1.8
7.7 ± 0.2
2.5 ± 0.3
52.0 ± 4.8
25.5 ± 8.3
17.9 ± 1.2
18.2 ± 2.5
63.7 ± 11.3
29.2 ± 9.5
18.8 ± 1.7
19.5 ± 0.9
being safer than LPPO and the cost counterpart.
Real-Robot Testing. The core motivation for introducing our Safe
DRL environments is the lack of benchmarks that allow testing the
policies directly on real robots. In contrast, Unity environments
enable the transfer of policies trained in simulation on ROS-enabled
platforms. We report a video with the real-world experiments of
the policies trained in our environments here: shorturl.at/ijmFV,
while Figure 5 shows our actual setup with the Turtlebot3.
4.4 Additional Experiments
We performed several additional experiments in the Fixed_obs_NT
task to highlight the impact of the different components presented
violation as a penalty in a different domain known in the litera-
ture.6 In more detail, we consider the same hyperparameters of
our navigation experiments. Moreover, given the challenges of
hand-writing properties for the drone, we rely only on the online
generated property, considering a fixed ε-area of size 0.05 where
we want to avoid a similar action that led to the unsafe state, up
to decimal precision. The following results consider the average
reward, cost, and violation collected over ten runs with different
random seeds.
Figure 7 shows the results Safe-DroneRun. These results confirm
the behavior of previous experiments (we omitted the PPO results
to maintain the plot scale for better visualization), where LPPO
struggles to keep the cost threshold set to 20 and results in lower
performance compared to the penalty-based approaches. In con-
trast, the violation-based PPO maintains the best trade-off between
reward and cost.
5 RELATED WORK
Garcıa and Fernández [12] presents an exhaustive taxonomy of the
main families of approaches for Safe DRL, analyzing the pros and
cons of each category. For example, model-based DRL approaches
have been investigated in constrained and unconstrained settings
[16, 52]. However, having access to or approximating a model is
not always possible. Similarly, using barrier functions effectively
fosters safety but requires an accurate system model [44].
In contrast, we focus on model-free learning. In this context,
shielding approaches typically synthesize a shield (i.e., an automa-
ton) to enforce safety specifications. However, this is usually un-
feasible in complex setups due to the exponential growth in the
size of the automaton. Hence, most DRL shielding approaches rely
on simple grid-world domains [5, 11]. Although providing safety
guarantees, it is unclear how to scale shielding approaches in com-
plex, realistic applications. In contrast, constrained DRL has been
used as a natural way to address Safe DRL [2, 8, 41, 49, 53]. In
detail, CPO [2] is characterized by strongly constrained satisfac-
tion at the expense of possibly infeasible updates that requires
demanding second-order recovery steps. Similarly, PCPO [49] uses
second-order derivatives and has mixed improvements over CPO
[53]. Moreover, Lyapunov-based algorithms [8] combine a projec-
tion step with action-layer interventions to address safety. However,
the cardinality of Lyapunov constraints equals the number of states,
resulting in a significant implementation effort. Despite the variety
of constrained literature, we compare with Lagrangian methods
[41] as they reduce the complexity of prior approaches and show
promising constraints satisfaction. However, constrained DRL has
several drawbacks. For example, incorrect threshold tuning leads
to algorithms being too permissive or, conversely, too restrictive
[12]. Moreover, the guarantees of such approaches rely on strong
assumptions that can not be satisfied in DRL, such as having an op-
timal policy. Constrained DRL is thus not devoid of short-term fatal
behaviors as it can fail at satisfying the constraints [27]. Moreover,
constraints naturally limit exploration, causing getting stuck in
local optima or failing to learn desired behaviors properly [13, 24].
Figure 5: Overview of real-world experiments.
in this paper using: (i) different sizes for the pre-conditions, (ii) the
online property.5 (iii) We show the results of our violation-based
penalty method in standard safe locomotion benchmarks to further
confirm the performance improvement of the proposed approach.
Different Sizes for Pre-Conditions. Figure 6 shows the results
of two PPO_violation versions: one that uses a constant εεε for the
size of the pre-conditions, and one that has different εεε values for
each input. The latter considers all the possible target positions as
in previous experiments. As detailed in Section 4.2, using wider
ranges for the inputs that shape environment configurations allows
the violation to contain details about the unsafe behavior in general
target initialization, resulting in higher performance. Crucially, the
PPO_violation with a constant εεε also returns better performance
over PPO_cost, confirming the importance of having locally-aware
information in the penalty value. This is particularly important as
it may not be possible to shape detailed pre-conditions in setups
where accurate task-level knowledge is lacking.
Online Property. As detailed in Section 3.1, we generate an
additional property upon experiencing an unsafe state s because it
is not uncommon to experience an unsafe transition not included
in the pre-conditions (due to the limitation of hard-coding prop-
erties). Figure 8 shows the size of the set P ′ during the training
for PPO_violation under two implementations. The first adds an
online-generated property, and the second uses only the hard-coded
properties. Results for the latter show an average size of P ′ < 1, con-
firming our hypothesis and the limitations of the properties' design
of Section 3.2. In contrast, the generated property implementation
ensures having at least one input-output mapping for each unsafe
state. This allows the violation to correctly shapes information
about undesired situations, which biases the policy toward safer
regions. Moreover, the growth in the size of P ′ over the training
indicates that the policy experiences unsafe states in rare corner
cases captured by the intersection of multiple properties (i.e., some
complex situations require not choosing more than one action to
avoid collisions).
Standard Safe DRL Tasks. We performed additional experi-
ments in the standard Safe-DroneRun task to consider a different
simulated robot, task, and safety specifications. Our goal is to con-
firm further our framework's results and the benefits of using the
5A regularization term can module the importance of the penalty over the training.
6We refer to the original works for more details about the environments and the
We perform additional experiments with it in the Appendix.
shaped cost functions [2], github.com/SvenGronauer/Bullet-Safety-Gym
Figure 6: Average performance of penalty-based PPO using different pre-condition shapes: (i) fixed size (i.e., with a constant εεε),
(ii) and one that considers the whole domain for the target's coordinates (i.e., different values forεεε. For example, x11,12 ∈ [−1, 1]).
Figure 7: Average reward, cost, and violation in Safe-DroneRun for PPO, PPO_{cost, violation}, LPPO. * indicates penalty-based
algorithms.
distinctive feature of our method is the use of the violation value,
which can not be directly computed by using SV.
6 DISCUSSION
We present an unconstrained DRL framework that leverages local
violations of input-output conditions to foster safety. We discussed
the limitations of using cost functions as in Safe DRL [12] present-
ing: (i) a sample-based approach to approximate a violation metric
and use it as a penalty in DRL algorithms. Such a violation intro-
duces task-level safety specifications into the optimization, address-
ing the cost's lack of information. (ii) The influence of generating
properties to cope with the limitations of hard-coded conditions.
(iii) We argued the importance of developing real-world environ-
ments for broader applications of DRL in practical scenarios. To
this end, we presented an initial suite of robotic navigation tasks
that allow rapid testing on ROS-based robots.
This work paves the way for several research directions, includ-
ing extending our task suite to create a general safe DRL benchmark.
Such extension is possible due to the rapid prototyping benefits of
Unity [15]. Moreover, studying the effects of different time horizons
would be interesting to separate the importance given to rewards
and safety values. It would also be interesting to design a shield to
avoid unsafe behaviors at deployment, leveraging the information
from FV. Finally, our insights on the violation could be used to
model desired behaviors in single and multi-agent applications to
improve performance and sample efficiency.
Figure 8: Mean size of P ′ over the training for PPO_violation
with an online generated property (red), and with only the
hard-coded properties (green).
We note that our Equation 5 falls under the category of reward
engineering, which has been proved effective by several works [1,
12, 19, 40]. For example, IPO [21] uses a penalty function based on
constraints, giving a zero penalty when constraints are satisfied and
a negative infinity upon violation. However, tuning both the barrier
parameter and the constraint threshold has sub-optimal solutions
over Lagrangian methods [27]. Finally, Statistical Verification (SV)
has been recently employed on learning systems [50] to deal with
the computational demands of FV. In these approaches, desired
specifications are defined as Signal Temporal Logic [23], which
closely resembles the properties used by FV literature. However, a
7 ACKNOWLEDGEMENTS
This work was partially funded by the Army Research Office under
award number W911NF20-1-0265.
REFERENCES
[1] David Abel, Will Dabney, Anna Harutyunyan, Mark K. Ho, Michael L. Littman,
Doina Precup, and Satinder Singh. 2021. On the Expressivity of Markov Reward.
In Conference on Neural Information Processing Systems (NeurIPS).
[2] Joshua Achiam, David Held, Aviv Tamar, and Pieter Abbeel. 2017. Constrained
Policy Optimization. In International Conference on Machine Learning (ICML).
[3] Eitan Altman. 1999. Constrained Markov Decision Processes. In CRC Press.
[4] Guy Amir, Davide Corsi, Raz Yerushalmi, Luca Marzari, David Harel, Alessandro
Farinelli, and Guy Katz. 2022. Verifying Learning-Based Robotic Navigation
Systems. arXiv (2022).
[5] Steven Carr, Nils Jansen, Sebastian Junges, and Ufuk Topcu. 2022. Safe Reinforce-
ment Learning via Shielding for POMDPs. In arXiv.
[6] Hao-Tien Lewis Chiang, Aleksandra Faust, Marek Fiser, and Anthony Francis.
2019. Learning Navigation Behaviors End to End. RA-L (2019).
[7] Yinlam Chow, Ofir Nachum, Edgar Duenez-Guzman, and Mohammad
Ghavamzadeh. 2018. A Lyapunov-based Approach to Safe Reinforcement Learn-
ing. In Conference on Neural Information Processing Systems (NeurIPS).
[8] Yinlam Chow, Ofir Nachum, Aleksandra Faust, Mohammad Ghavamzadeh, and
Edgar A. Duéñez-Guzmán. 2019. Lyapunov-based Safe Policy Optimization for
Continuous Control. In International Conference on Machine Learning (ICML).
[9] Cédric Colas, Olivier Sigaud, and Pierre-Yves Oudeyer. 2019. A Hitchhiker's Guide
to Statistical Comparisons of Reinforcement Learning Algorithms. In International
Conference on Learning Representations (ICLR) Worskhop on Reproducibility.
[10] Davide Corsi, Enrico Marchesini, and Alessandro Farinelli. 2021. Formal Ver-
ification of Neural Networks for Safety-Critical Tasks in Deep Reinforcement
Learning. In Conference on Uncertainty in Artificial Intelligence (UAI).
[11] Ingy Elsayed-Aly, Suda Bharadwaj, Christopher Amato, Rüdiger Ehlers, Ufuk
Topcu, and Lu Feng. 2021. Safe Multi-Agent Reinforcement Learning via Shielding.
In AAMAS.
[12] Javier Garcıa and Fernando Fernández. 2015. A comprehensive survey on safe
reinforcement learning. In Journal of Machine Learning Research (JMLR).
[13] Zhang-Wei Hong, Tzu-Yun Shann, Shih-Yang Su, Yi-Hsiang Chang, and Chun-
Yi Lee. 2018. Diversity-Driven Exploration Strategy for Deep Reinforcement
Learning. In Conference on Neural Information Processing Systems (NeurIPS).
[14] Andrew Ilyas, Logan Engstrom, Shibani Santurkar, Dimitris Tsipras, Firdaus
Janoos, Larry Rudolph, and Aleksander Madry. 2020. A Closer Look at Deep
Policy Gradients. In International Conference on Learning Representations (ICLR).
[15] Arthur Juliani, Vincent-Pierre Berges, Esh Vckay, Yuan Gao, Hunter Henry,
Marwan Mattar, and Danny Lange. 2018. Unity: A Platform for Intelligent
Agents. In arXiv.
[16] Parv Kapoor, Anand Balakrishnan, and Jyotirmoy V. Deshmukh. 2020. Model-
based Reinforcement Learning from Signal Temporal Logic Specifications. In
arXiv.
[17] Guy Katz, Clark Barrett, David L Dill, Kyle Julian, and Mykel J Kochenderfer.
2017. Reluplex: An efficient SMT solver for verifying deep neural networks. In
International conference on computer aided verification. Springer, 97–117.
[18] Guy Katz, Derek A Huang, Duligur Ibeling, Kyle Julian, Christopher Lazarus,
Rachel Lim, Parth Shah, Shantanu Thakoor, Haoze Wu, Aleksandar Zeljić, et al.
2019. The marabou framework for verification and analysis of deep neural
networks. In International Conference on Computer Aided Verification.
[19] Zachary C. Lipton, Jianfeng Gao, Lihong Li, Jianshu Chen, and Li Deng. 2016.
Combating Reinforcement Learning's Sisyphean Curse with Intrinsic Fear. In
arXiv.
[20] Changliu Liu, Tomer Arnon, Christopher Lazarus, Christopher Strong, Clark
Barrett, and Mykel J. Kochenderfer. 2021. Algorithms for Verifying Deep Neural
Networks. Foundations and Trends® in Optimization (2021).
[21] Yongshuai Liu, Jiaxin Ding, and Xin Liu. 2020. IPO: Interior-point Policy Opti-
mization under Constraints. In AAAI Conference on Artificial Intelligence.
[22] Yongshuai Liu, Avishai Halev, and Xin Liu. 2021. Policy Learning with Constraints
in Model-free Reinforcement Learning: A Survey. In International Joint Conference
on Artificial Intelligence (IJCAI). 4508–4515.
[23] Oded Maler and D. Niković. 2004. Monitoring Temporal Properties of Continuous
Signals. In FORMATS/FTRTFT.
[24] Enrico Marchesini and Christopher Amato. 2022. Safety-Informed Mutations for
Evolutionary Deep Reinforcement Learning. In Proceedings of the Genetic and
Evolutionary Computation Conference Companion. 1966–1970.
[25] Enrico Marchesini and Christopher Amato. 2023. Improving Deep Policy Gradi-
ents with Value Function Search. In International Conference on Learning Repre-
sentations (ICLR).
[26] Enrico Marchesini, Davide Corsi, and Alessandro Farinelli. 2021. Benchmark-
ing Safe Deep Reinforcement Learning in Aquatic Navigation. In IEEE/RSJ
International Conference on Intelligent Robots and Systems (IROS). 5590–5595.
https://doi.org/10.1109/IROS51168.2021.9635925
[27] E. Marchesini, D. Corsi, and A. Farinelli. 2022. Exploring Safer Behaviors for Deep
Reinforcement Learning. In AAAI Conference on Artificial Intelligence Conference
on Artificial Intelligence.
[28] Enrico Marchesini and Alessandro Farinelli. 2020. Discrete deep reinforcement
learning for mapless navigation. In 2020 IEEE International Conference on Robotics
and Automation (ICRA). IEEE, 10688–10694.
[29] Enrico Marchesini and Alessandro Farinelli. 2021. Centralizing State-Values in
Dueling Networks for Multi-Robot Reinforcement Learning Mapless Navigation.
In IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS).
4583–4588. https://doi.org/10.1109/IROS51168.2021.9636349
[30] Enrico Marchesini and Alessandro Farinelli. 2022. Enhancing Deep Reinforcement
Learning Approaches for Multi-Robot Navigation via Single-Robot Evolutionary
Policy Search. In International Conference on Robotics and Automation (ICRA).
5525–5531. https://doi.org/10.1109/ICRA46639.2022.9812341
[31] Luca Marzari, Davide Corsi, Ferdinando Cicalese, and Alessandro Farinelli. 2023.
The #DNN-Verification problem: Counting Unsafe Inputs for Deep Neural Net-
works. ArXiv abs/2301.07068 (2023).
[32] Luca Marzari, Davide Corsi, Enrico Marchesini, and Alessandro Farinelli. 2022.
Curriculum learning for safe mapless navigation. In Proceedings of the 37th
ACM/SIGAPP Symposium on Applied Computing. 766–769.
[33] Luca Marzari, Enrico Marchesini, and Alessandro Farinelli. 2023. Online Safety
Property Collection and Refinement for Safe Deep Reinforcement Learning in
Mapless Navigation. In International Conference on Robotics and Automation
(ICRA).
[34] Andrew Y. Ng, Daishi Harada, and Stuart Russell. 1999. Policy invariance under
reward transformations: Theory and application to reward shaping. In ICML.
[35] J. Nocedal and S. Wright. 2006. Numerical Optimization (2 ed.). Springer.
[36] Ameya Pore, Davide Corsi, Enrico Marchesini, Diego Dall'Alba, Alicia Casals,
Alessandro Farinelli, and Paolo Fiorini. 2021. Safe Reinforcement Learning
using Formal Verification for Tissue Retraction in Autonomous Robotic-Assisted
Surgery. In IEEE/RSJ International Conference on Intelligent Robots and Systems
(IROS). 4025–4031. https://doi.org/10.1109/IROS51168.2021.9636175
[37] Alex Ray, Joshua Achiam, and Dario Amodei. 2019. Benchmarking Safe Explo-
ration in Deep Reinforcement Learning. In arXiv.
[38] Julien Roy, Roger Girgis, Joshua Romoff, Pierre-Luc Bacon, and Christopher Pal.
2022. Direct Behavior Specification via Constrained Reinforcement Learning. In
AAAI Conference on Artificial Intelligence.
[39] John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov.
2017. Proximal policy optimization algorithms. arXiv (2017).
[40] David Silver, Satinder Singh, Doina Precup, and Richard S. Sutton. 2021. Reward
is enough. Artificial Intelligence 299 (2021), 103535.
[41] Adam Stooke, Joshua Achiam, and Pieter Abbeel. 2020. Responsive Safety in
Reinforcement Learning by PID Lagrangian Methods. In International Conference
on Machine Learning (ICML).
[42] L. Tai, G. Paolo, and M. Liu. 2017. Virtual-to-real deep reinforcement learn-
ing: Continuous control of mobile robots for mapless navigation. In IEEE/RSJ
International Conference on Intelligent Robots and Systems (IROS).
[43] Chen Tessler, Daniel J. Mankowitz, and Shie Mannor. 2019. Reward Constrained
Policy Optimization. In International Conference on Learning Representations
(ICLR).
[44] Cumhur Erkan Tuncali, James Kapinski, Hisahiro Ito, and Jyotirmoy V. Deshmukh.
2018. Reasoning about Safety of Learning-Enabled Components in Autonomous
Cyber-physical Systems. In Design Automation Conference (DAC).
[45] Shiqi Wang, Kexin Pei, Justin Whitehouse, Junfeng Yang, and Suman Jana. 2018.
Efficient Formal Safety Analysis of Neural Networks. In Conference on Neural
Information Processing Systems (NeurIPS).
[46] Shiqi Wang, Kexin Pei, Justin Whitehouse, Junfeng Yang, and Suman Jana.
2018. Formal security analysis of neural networks using symbolic intervals.
In U SEN IX Security Symposium.
[47] Ziyu Wang, Tom Schaul, Matteo Hessel, Hado Hasselt, Marc Lanctot, and Nando
Freitas. 2016. Dueling network architectures for deep reinforcement learning. In
International conference on machine learning (ICML). 1995–2003.
[48] Kaidi Xu, Huan Zhang, Shiqi Wang, Yihan Wang, Suman Jana, Xue Lin, and
Cho-Jui Hsieh. 2021. Fast and Complete: Enabling Complete Neural Network Ver-
ification with Rapid and Massively Parallel Incomplete Verifiers. In International
Conference on Learning Representations (ICLR).
[49] Tsung-Yen Yang, Justinian Rosca, Karthik Narasimhan, and Peter J. Ramadge. 2020.
Projection-Based Constrained Policy Optimization. In International Conference
on Learning Representations (ICLR).
[50] Mojtaba Zarei, Yu Wang, and Miroslav Pajic. 2020. Statistical Verification of
Learning-Based Cyber-Physical Systems. In International Conference on Hybrid
Systems: Computation and Control.
[51] J. Zhang, J. T. Springenberg, J. Boedecker, and W. Burgard. 2017. Deep reinforce-
ment learning with successor features for navigation across similar environments.
In IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS).
[52] Xinglong Zhang, Yaoqian Peng, Biao Luo, Wei Pan, Xin Xu, and Haibin Xie. 2021.
Model-Based Safe Reinforcement Learning with Time-Varying State and Control
Constraints: An Application to Intelligent Vehicles. In arXiv.
[53] Yiming Zhang, Quan Vuong, and Keith W. Ross. 2020. First Order Constrained
Optimization in Policy Space. In Conference on Neural Information Processing
Systems (NeurIPS).
|
|
http://arxiv.org/abs/2302.10025v1 | 2023-02-20T15:14:46 | 2023-02-20T15:14:46 | DINOISER: Diffused Conditional Sequence Learning by Manipulating Noises | While diffusion models have achieved great success in generating continuous
signals such as images and audio, it remains elusive for diffusion models in
learning discrete sequence data like natural languages. Although recent
advances circumvent this challenge of discreteness by embedding discrete tokens
as continuous surrogates, they still fall short of satisfactory generation
quality. To understand this, we first dive deep into the denoised training
protocol of diffusion-based sequence generative models and determine their
three severe problems, i.e., 1) failing to learn, 2) lack of scalability, and
3) neglecting source conditions. We argue that these problems can be boiled
down to the pitfall of the not completely eliminated discreteness in the
embedding space, and the scale of noises is decisive herein. In this paper, we
introduce DINOISER to facilitate diffusion models for sequence generation by
manipulating noises. We propose to adaptively determine the range of sampled
noise scales for counter-discreteness training; and encourage the proposed
diffused sequence learner to leverage source conditions with amplified noise
scales during inference. Experiments show that DINOISER enables consistent
improvement over the baselines of previous diffusion-based sequence generative
models on several conditional sequence modeling benchmarks thanks to both
effective training and inference strategies. Analyses further verify that
DINOISER can make better use of source conditions to govern its generative
process. | [
"Jiasheng Ye",
"Zaixiang Zheng",
"Yu Bao",
"Lihua Qian",
"Mingxuan Wang"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.10025v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.10025v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.CL",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.CL",
"cs.AI",
"cs.LG"
] | DINOISER: Diffused Conditional Sequence Learning by Manipulating Noises
Jiasheng Ye 1 2 Zaixiang Zheng 2 Yu Bao 2 Lihua Qian 2 Mingxuan Wang 2
Abstract
While diffusion models have achieved great suc-
cess in generating continuous signals such as im-
ages and audio, it remains elusive for diffusion
models in learning discrete sequence data like
natural languages. Although recent advances cir-
cumvent this challenge of discreteness by em-
bedding discrete tokens as continuous surrogates,
they still fall short of satisfactory generation qual-
ity. To understand this, we first dive deep into
the denoised training protocol of diffusion-based
sequence generative models and determine their
three severe problems, i.e., 1) failing to learn, 2)
lack of scalability, and 3) neglecting source con-
ditions. We argue that these problems can be
boiled down to the pitfall of the not completely
eliminated discreteness in the embedding space,
and the scale of noises is decisive herein. In this
paper, we introduce DINOISER to facilitate diffu-
sion models for sequence generation by manipu-
lating noises. We propose to adaptively determine
the range of sampled noise scales for counter-
discreteness training; and encourage the proposed
diffused sequence learner to leverage source con-
ditions with amplified noise scales during infer-
ence. Experiments show that DINOISER enables
consistent improvement over the baselines of pre-
vious diffusion-based sequence generative models
on several conditional sequence modeling bench-
marks thanks to both effective training and in-
ference strategies. Analyses further verify that
DINOISER can make better use of source condi-
tions to govern its generative process.
3
2
0
2
b
e
F
0
2
]
L
C
.
s
c
[
1
v
5
2
0
0
1
.
2
0
3
2
:
v
i
X
r
a
1. Introduction
Conditional sequence learning aims at generating a target se-
quence from given conditions, which is one of the important
paradigms of natural language generation (Sutskever et al.,
1Department of Computer Science, Nanjing Univer-
sity (work was done during Jiasheng's internship at ByteDance)
2ByteDance AI Lab.
Jiasheng Ye
<[email protected]>, Zaixiang Zheng <zhengzaixi-
[email protected]>.
Correspondence to:
Preprint. Code: github.com/yegcjs/DINOISER
2014; Wiseman et al., 2017; Raffel et al., 2020), including
machine translation (Bahdanau et al., 2014), summariza-
tion (Rush et al., 2015), and paraphrasing (Prakash et al.,
2016). Recent advances in generative modeling introduce
diffusion models (Sohl-Dickstein et al., 2015; Ho et al.,
2020; Song et al., 2020b), which achieve great success in
generating continuous signals, including images (Rombach
et al., 2021), video (Ho et al., 2022), and audio (Kong et al.,
2020). Diffusion models also garner growing interest for
conditional sequence learning in the research community
because of their promising characteristics, such as diversity
and controllability, demonstrated in these domains.
However, the discrete nature of sequence data, constituted
by a number of tokens in order, makes it non-trivial to apply
diffusion models for conditional sequence learning. Typical
diffusion models noise data with Gaussian permutation ker-
nels (Ho et al., 2020) and learn to recover original data from
their corrupted versions, which is not directly compatible
with discrete tokens. To remedy this, DiffusionLM (Li et al.,
2022) attempted to embed discrete tokens into continuous
space and employ diffusion models to the embedding space.
Although this kind of approach unlocks the possibility of ap-
plying diffusion models to discrete data, it still falls short of
competitive performance for various conditional sequence
generation tasks (Fig. 1A).
We argue that embedding discrete tokens into continuous
surrogates does not necessarily eliminate discreteness com-
pletely. To verify this, we conduct in-depth preliminary stud-
ies and highlight our findings along with their implications
as follows. (1) On the pitfall of discreteness. Embeddings
populate only finite clusters (up to the vocabulary size) in
the continuous space, which results in the vastness of low-
density regions especially when the models are learned with
small-scale noises. We refer to this as the pitfall of discrete-
ness, which suggests that small noises hinder conditional
sequence learning, and thus should be avoided during train-
ing. (2) On scalability. It becomes increasingly harder for
the diffusion process to eliminate discreteness when the
dimension of the embedding space gets scaled up, suggest-
ing that to ensure scalability, an adaptable noise schedule
is necessitated yet neglected. (3) On conditional learning.
Enlarging noises in inference can calibrate diffusion models
to take into account more source conditional information.
Please refer to §3 for more details.
DINOISER: Diffused Conditional Sequence Learning by Manipulating Noises
Motivated by these findings, we propose DINOISER to im-
prove diffusion models by manipulating noises for con-
ditional sequence learning. We propose a novel way of
counter-discreteness training to eliminate the chances of
training on small noise scales to avoid their negative in-
fluences, for which we introduce the noise scale clipping
strategy to adaptively manipulate the noise scales. For infer-
ence, we manipulate the model to be exposed to larger noise
scales to encourage trained diffusion models to leverage
source conditions.
We summarize our contributions and findings as follows:
• By thorough and in-depth preliminary studies, we shed
the light on the pitfall of discreteness along with the
critical role of noise scales in conditional sequence
learning with diffusion models, thereby suggesting me-
liorated counter-discreteness solutions in terms of both
training and inference by manipulating noises.
• We accordingly propose DINOISER to leverage large
noise scales in both training and inference. Experi-
ments show that DINOISER achieves strong perfor-
mance on a variety of conditional sequence learning
tasks, including several machine translation bench-
marks (both bilingual and multilingual, including the
most commonly-used WMT14 EN→DE), as well as
text simplification and paraphrasing, ranging from low-
resource to high-resource scenarios.
• Ablations show that both DINOISER's improved train-
ing and inference approaches result in considerable per-
formance gains. Further analysis verifies that our pro-
posed post-hoc inference strategy, i.e., the condition-
enhanced denoiser, can help make better use of source
conditions for accurate predictions.
Conditional
2. Background
Conditional Sequence Learning.
se-
quence learning aims to yield target sequence y =
[y1, y2, . . . , yn] ∈ {0, 1}n×|V| within the vocabulary space
V, given source conditions x, which can be another se-
quence x = [x1, x2, . . . , xm]. The conventional model-
ing paradigm (Sutskever et al., 2014; Vaswani et al., 2017)
generates target tokens in an autoregressive decomposition
p(y|x) = (cid:81)n
i=1 p(yi|y<i, x). Gu et al. (2018) proposed an
alternative way in a fully non-autoregressive (NAR) manner,
where all the tokens are predicted in parallel by assum-
ing conditional independence between the target tokens,
i.e., p(y|x) = (cid:81)n
i=1 p(yi|x). Later works alleviate this
strong assumption by iterative refinement (Lee et al., 2018;
Ghazvininejad et al., 2019; Gu et al., 2019), resulting in
improved generation quality. These iterative refinement ap-
proaches generate target sequences with several cycles, in
each of which the models generate sequence depending on
both the source sequence and the intermediate prediction of
the previous one, i.e., p(y|x) = (cid:81)T
t=1 p(y(t)|y(t−1), x).
Diffusion Probabilistic Models. Given a random variable
z0 from an underlying data distribution q(z0), diffusion
models (Sohl-Dickstein et al., 2015; Ho et al., 2020) de-
fine a forward diffusion process {zt}t∈[0,1] perturbed with a
Gaussian perturbation kernel, starting with z0 and converg-
ing to its corresponding stationary distribution, such that for
any t ∈ [0, 1], the distribution of zt given z0 satisfies
q(zt|z0) = N (zt; α(t)z0, σ2(t)I),
where σ(t) is a monotonically increasing function, usu-
ally referred to as the noise schedule, satisfying σ(0) = 0
and σ(1) ≈ 1; and α(t) = (cid:112)1 − σ2(t). The noise
schedule σ(t) controls the degree of corruption at differ-
ent timestep t. As t gets larger, the noise scale σ(t) gets
larger whereas α(t) gets smaller, hence the more corrupted
data zt from the original z0. At t = 1, with α(1) ≈ 0 and
σ(1) ≈ 1, zt become pure noises as reaching the stationary
distribution of a standard Gaussian.
Song et al. (2020b) proves that such a Gaussian diffusion
process has the same transition distribution q(zt|z0) as the
following stochastic differential equation (SDE):
dz = −
1
2
β(t)zdt + (cid:112)β(t)dω,
(1)
where β(t) = −2 d log α(t)
; ω denotes the standard Wiener
process (a.k.a., Brownian motion), and dω can be viewed
as infinitesimal white noise.
dt
As such, the corresponding generative process, as shown
in Song et al. (2020b), can be achieved as the time reversal
of the stochastic process in Eqn. 1 by solving the following
ordinary differential equation (diffusion ODE):
dz =
−
1
2
β(t)z −
1
2
dt.
(2)
β(t) ∇z log qt(z)
(cid:125)
(cid:123)(cid:122)
score function
(cid:124)
Here, the score function is usually parameterized as the
function of z0 as follows:
∇z log qt(z)
(cid:12)
(cid:12)
(cid:12)
(cid:12)z=zt
∗= −
(cid:15)t
σ(t)
∗∗= −
zt − α(t)z0
σ2(t)
,
(3)
where ∗∗= holds as (cid:15)t is the sampled noise in Gaussian repa-
rameterization of zt (Kingma & Welling, 2013; Ho et al.,
2020), i.e.,
zt = α(t)z0 + σ(t)(cid:15)t, (cid:15)t ∼ N (0, I),
(4)
and ∗= holds because of Tweedie's Law (Efron, 2011)
(cid:15)t = −σ(t)∇zt log qt(zt).
With this reparameterization, Eqn. 2 can be rewritten into
(cid:20)
dz =
−
1
2
β(t)z +
β(t)
2σ2(t)
(cid:21)
(z − α(t)z0)
dt.
(5)
DINOISER: Diffused Conditional Sequence Learning by Manipulating Noises
In practice, we can then use a learned model zθ(zt, t) to
estimate z0 and plug into Eqn. 5. The model parameters θ
are learned by minimizing the discrepancy between training
data and model estimation (Ho et al., 2020; Song et al.,
2020b; Ramesh et al., 2022):
Ldiffusion(z0) =
E
t∼U (0,1),(cid:15)t∼N (0,I)
(cid:104)
(cid:107)zθ(zt, t) − z0(cid:107)2
2
(cid:105)
.
(6)
Given Eqn. 5 with a trained model zθ(zt, t), we can use
arbitrary ODE solvers to solve this diffusion ODE from
t = 1 to t = 0 for sampling data. An effective and efficient
solver to this end is the DDIM solver (Song et al., 2020a; Lu
et al., 2022) and is widely adopted. It discretizes the ODE
into M + 1 timesteps {ti}M
i=0 decreasing from t0 = 1 to
tM ≈ 0. Then, it samples zt0 from the standard Gaussian
distribution and computes {zti}M
i=1 with M iterations, in
each of which zti is predicted from zti−1 according to
zti = α(ti)zθ(zti−1 , ti−1) + σ(ti)(cid:15)θ(zti−1, ti−1),
(7)
where (cid:15)θ(zti−1, ti−1) is the predicted noise, which can be
directly induced according to Eqn. 4,
(cid:15)θ(zti−1, ti−1) =
zti−1 − α(ti−1)zθ(zti−1 , ti−1)
σ(ti−1)
.
(8)
After iterations, the last prediction ztM is taken as the final
generated result ˆz0 of the sampling.
Diffusion Models for Conditional Sequence Learning.
The denoising process of diffusion models matches an it-
erative refinement process (Gong et al., 2022). However,
diffusion models are not directly applicable to sequence
learning tasks since the original diffusion models operate in
continuous space rather than sequences of discrete tokens.
Li et al. (2022) tackles this by embedding the discrete to-
kens into continuous latent space and applying diffusion
models therein. We can then train the models as variational
autoencoders (Kingma & Welling, 2013), where a diffu-
sion model serves as the prior, from a latent-variable model
perspective, and derive the corresponding variational lower
bound (Wehenkel & Louppe, 2021; Vahdat et al., 2021):
L(y) =
E
z0∼qφ(EMB(y))
(cid:104)
− log pθ(y|z0)
(cid:123)(cid:122)
(cid:125)
(cid:124)
Lreconstruction
+Ldiffusion(z0)
(cid:105)
,
(9)
where y is the original sequence with z0 as its embeddings1:
z0 = EMB(y) = [EMB(y1), EMB(y2), ..., EMB(yn)]
(10)
Ldiffusion denotes the diffusion loss (Eqn. 6) which now oper-
ates on the embedding space, and Lreconstruction is the newly
added reconstruction term.
1DiffusionLM (Li et al., 2022) adds tiny noise to the embed-
dings to form z0 (i.e. z0 ∼ N (EMB(y), σ0I)). We empirically
find this unnecessary and letting z0 follow a Dirac distribution
makes training more efficient.
To further adapt the model for conditional sequence genera-
tion, a vanilla approach is to replace the unconditional model
zθ(zt, t) with a conditional model zθ(zt, x, t), where x
is the source condition. Similar to the previous practice
of using diffusion models for conditional generation in vi-
sion (Rombach et al., 2021), the diffusion process can be
kept unchanged, the same as Eqn. 4. And the length of
the target sequences is decided by predicting the length
difference between the source and the target.
3. Pitfall of Discreteness: Noise Scale Matters
In this section, we dive deep into the current weaknesses of
diffusion models for conditional sequence learning and find
that the noise scale matters, which accordingly motivates
our proposal for improved training and inference.
Settings. We begin with the vanilla conditional diffusion
model modified from DiffusionLM (Li et al., 2022) as de-
scribed in §2. We follow the original paper of DiffusionLM
to apply the sqrt schedule (i.e., σ(t) = t0.25) to arrange
noise scales for training and sampling. We use IWSLT14
DE→EN (Cettolo et al., 2012) machine translation bench-
mark for evaluation. We also include CMLM (Ghazvinine-
jad et al., 2019) as a baseline for comparison, which is a
strong conditional sequence generative model that generates
sequence by iterative refinement similar to diffusion models
but in discrete tokens space.
Observations. We summarize our findings as follows:
O1. DiffusionLM still falls short of conditional sequence
learning. Fig. 1(A) shows the validation performance
of the two models at different training steps, in which
the performance of DiffusionLM still lags behind
CMLM by a large margin, even taking many more steps
before convergence. This shows that the performance
and training efficiency of the vanilla diffusion-based
sequence learner remain unsatisfactory.
O2. Diffusion losses at small noise scales are unexpect-
edly small. DiffusionLM uniformly samples timesteps
hence the corresponding noise scales during training.
As shown in Fig. 1(B), we find that the magnitudes of
diffusion losses approach almost zero for small noise
scales, indicating that it is quite trivial to recover the
corrupted embeddings under such circumstances. We
conjecture that, combined with the illustrated example
in Fig. 1(D), this is because there remain highly dis-
crete modes for the embedding density such that any
corrupted embedding is very likely to lie in a region
with a small radius around the original token embed-
ding. As a consequence, the more the modes of embed-
dings separate from each other the smaller the diffusion
loss, which adheres to the following observation.
O3. It becomes increasingly harder for the diffusion pro-
cess to eliminate discreteness while the dimension of
DINOISER: Diffused Conditional Sequence Learning by Manipulating Noises
Figure 1. Prelimilary study. (A) The validation BLEU of different models on IWSLT14 DE→EN at different training steps. (B) Diffusion
loss of DiffusionLM on the validation set of IWSLT14 DE→EN at different noise scales and the distribution of noise scale sampled during
training. The loss reaches almost 0 when σ < 0.5 but significantly rockets when σ continuously gets larger beyond 0.5. Besides, the
model can achieve extremely small loss for small noise scales, despite being less likely sampled during the training, even at the early
stage of training (i.e., 45k steps), suggesting that recovering data corrupted by small noise is frustratingly easy. (C) The accuracy of
predicting z0 from zt by finding the nearest neighbor for zt with different noise scales, vocabulary sizes, and dimensions. On the legend,
|V| means the vocabulary size and D means the embedding dimension. For each embedding dimension, we randomly sample |V| points
from the standard Gaussian distribution as the embeddings. Then, for each noise scale, we randomly sample 50, 000 zt-s. Each zt is
corrupted from a z0 uniformly picked among the N embeddings. (D) An illustrative example of the distributions of zt of three data
points corrupted with different noise scales as in Eqn. 4, where for small noise scales, a large proportion of the embedding space between
modes (associated with tokens) remains vacant. (E) The tendency of whether the model prediction is more influenced by the source or
target side information when fed with indicators of different noise scales. In addition to the source condition x, we feed the model with
t = zt(y(cid:48), t) that is corrupted with a timestep-dependent noise σ(t) from a negative y(cid:48), which is different from the original (positive
z(cid:48)
sample of) target sequence y. We compare the similarity between the model prediction zθ(z(cid:48)
t, x, τ ) to the embedding of ground-truth
z0(y), and study to what degree the model prediction is governed by the source condition x (via the embedding of the ground-truth z0(y)
as the proxy), or the target information y(cid:48) (via z(cid:48)
t) otherwise.
the embedding space scales up. Fig. 1(C) shows a
surprisingly high accuracy of recovering corrupted em-
beddings that can be easily achieved by simply seeking
the nearest neighbor when embedding dimensions en-
large, even at considerably large noise scales. This
reveals that scaling embedding space leads to more
severe discreteness, namely a curse of dimensionality.
O4. On condition learning: larger noise scales calibrate
diffusion models in taking into account more source
conditional information during inference. We have
seen that recovering embeddings corrupted with small
noise scales is easy (O2), and if modes distribute sep-
arately, even finding the nearest neighbor is enough
(O3). In Fig. 1(C), as the noise scale decreases, the
prediction accuracy by finding the nearest neighbor
increases and achieves almost 100% under a threshold,
which can be learned trivially even with little to no
source conditions. This results in the hallucination as
shown in Tab. 1, which is an unexpected consequence
for conditional sequence generative models to yield
output loyal to the input condition. To mitigate this,
Table 1. Illustration of hallucinations of vanilla DiffusionLM on
IWSLT14 DE→EN translation task, along with DINOISER's pre-
dictions, where the vanilla DiffusionLM generates inexplicable
expressions that are irrelevant to the source condition whose mean-
ing dramatically differs from the groud-truth target.
Source
Reference
Mit welchen worten w ̈urden sie ban beschreiben?
What are the words you would use to describe ban?
DiffusionLM In which words would you save ban?
DINOISER
In which words would you describe ban?
we quantitatively study the influence of noise scales
on conditional reliance. As shown in Fig 1(E), we find
that as the noise scales are larger, the model can predict
more faithfully to source conditions.
Concluding remarks. We summarize conclusions from
the aforementioned observations along with suggestions for
more plausible diffused conditional sequence learning:
C1. We should not train on too small noise scales to cir-
cumvent the pitfall of discreteness. Both O2 and O4
show the negative influences of small noise scales on
training that it leads to a not smooth embedding space
DINOISER: Diffused Conditional Sequence Learning by Manipulating Noises
with vast regions of low density between modes asso-
ciated with tokens (O2). These regions can inevitably
be sampled during inference as the result of maximum
likelihood estimation2, thereby giving rise to error ac-
cumulation. Besides, it also impedes conditional learn-
ing (O4). To remedy this for the counter-discreteness
purpose, a probably simple way is to eliminate the
chance of training with small noise scales.
C2. We need to determine the noise schedule according
to the dimensionality of the embedding space. Fitting
more complex datasets usually requires larger embed-
ding dimensions. O3 indicates the criterion to dis-
tinguish large and small noise scales depends on the
embeddings hence the complexity of the datasets. How-
ever, existing methods employ a fixed noise schedule
for all embedding dimensions, which lacks scalability.
This, therefore, demands a task-specific noise schedule
to accommodate diverse datasets.
C3. We could manipulate the model to be exposed to
larger noise scales so as to potentially better lever-
age source conditions. O4 suggests that the more
corrupted the embeddings, the more difficult for the
model to recover, thereby necessitating more reliance
on source conditions. As a result, we could probably
encourage trained diffusion models to care more about
source conditions for free by post-hoc manipulating
the noise to large ones.
4. DINOISER
Provided the observations and postulates we discussed in §3,
we accordingly propose DINOISER, a simple yet effective
method that improves diffusion models by manipulating
noises for conditional sequence learning.
In a nutshell,
we propose to eliminate the chance of training diffused se-
quence learners with small-scale noises so as to circumvent
the aforementioned pitfall of discreteness in embedding
space. As for sampling, we propose a new effective sampler
to amplify the impact of source conditions on the model
prediction, where indicators of large noise scales are always
fed into the model. We now dive deep into the details of the
proposed DINOISER.
Figure 2. (A) Illustration of the proposed noise scale clipping,
where we showcase the Gaussian distributions zt/α(t) =
N (EMB(yi), ̃σ2(t)I), of three corrupted embeddings perturbed
with σ(t) at timestep t for a token yi and its two (spatially) nearest
neighbors yj and yk in the embedding space, respectively. To
remedy the pitfall of discreteness, we propose to ensure a suffi-
ciently large minimum "overlap" between corrupted embeddings.
As shown in this example, such a goal of counter-discreteness is
achieved by bounding the standard deviation ̃σ(t) of EMB(yi) by
δij the "distance" to its nearest neighbor (i.e., yj). (B) Comparison
between sqrt noise schedule and our noise schedule σ(t) = t
manipulated with the proposed noise scale clipping. The adaptive
clipping threshold σmin at several training steps is presented as it
varies during training. The clipping threshold σmin starts with a
large number at around 0.7 and stays steady later maintaining at
around 0.5. The sqrt noise schedule, on the other hand, increases
rapidly at small timesteps, exceeding our clipping threshold at the
start of training (i.e., σ(t ≈ 0.2)) and later stage of training steps
(i.e., σ(t ≈ 0.1)), respectively.
continuous space, and also undermine conditional learning.
A simple yet effective way to mitigate this is to encourage
training diffusion models with sufficiently large noise scales.
As such, we propose noise scale clipping, where we bound
the minimum noise scale σmin for training such that only
timesteps satisfying σ(t) ≥ σmin could be sampled, which
is decided adaptively as the model learn progresses.
To start with, we can eliminate the scaling effect of α(t)
in the forward diffusion process for the embedding of each
token yi by rewriting Eqn. 10 into3:
4.1. Noise Scale Clipping: Counter-Discreteness
Training with Manipulated Noises
Recall that C1 and C2 in §3 demonstrate that small noises
can barely help "discrete" embeddings populate the entire
zt
α(t)
= z0 +
⇒
(cid:15)t ⇒
zt
α(t)
(cid:18)
σ(t)
α(t)
zt
α(t)
∼ N
EMB(yi), ̃σ2(t)I
(cid:18)
∼ N
z0,
σ2(t)
1 − σ2(t)
(cid:19)
(cid:19)
I
(11)
2Consider that a token α is translated into token A or a with
50% each. Without extra information, the optimal prediction for
translating α is the center of the embedding of A and a. This is
because minimizing its training objective (i.e., 1
2 +
2) results in zθ = zA(0)+za(0)
2 (cid:107)zθ − za(0)(cid:107)2
1
. The prediction
exactly falls in the blank area that lies between embeddings.
2 (cid:107)zθ − zA(0)(cid:107)2
2
As illustrated in Fig. 2(A), there, intuitively, should exist a
sufficiently large number δ measuring the minimum "over-
lap" between the distributions of two corrupted embeddings
under the Gaussian perturbation kernel with a standard de-
3Here we let zt and z0 denote zt(yi) and z0(yi) for brevity.
DINOISER: Diffused Conditional Sequence Learning by Manipulating Noises
viation of ̃σ(t) =
σ(t)√
1−σ2(t)
. To this end, we let δ2 be the
minimum amount of variation of added noise, defined as
the average squared L2-distances between the embeddings
and their nearest neighbor, normalized by the dimension of
embeddings (according to C2 in §3):
δ2 =
1
|V| * D
=
1
|V| * D
|V|
(cid:88)
i=1
|V|
(cid:88)
i=1
min
1≤j(cid:54)=i≤|V|
δ2
ij
min
1≤j(cid:54)=i≤|V|
(cid:107)EMB(yi) − EMB(yj)(cid:107)2
2.
(12)
We now define the noise scale clipping as follows:
Definition 4.1 (The noise scale clipping). Let V be the
target vocabulary with corresponding embeddings in D-
dimensional space ∀yi ∈ V : EMB(yi) ∈ RD, the noise
scale ciipping is performed if the noise scale σ(t) at timestep
t satisfies the following condition:
̃σ2(t) =
σ2(t)
1 − σ2(t)
≥ δ2 ⇒
σ2
min
1 − σ2
min
= δ2,
(13)
the clipping threshold σmin is whereby derived when the
equality in Eqn. 13 holds, such that
(cid:32)
σmin =
(cid:80)|V|
i=1 min
1≤j(cid:54)=i≤|V|
|V| * D
(cid:107)EMB(yi) − EMB(yj)(cid:107)2
2
(cid:33)− 1
2
,
+ 1
(14)
obtained by substituting Eqn. 12 into the R.H.S of Eqn. 13.
As illustrated in Fig. 2(B), the clipping threshold σmin is
estimated dynamically during training, depending on how
properly the model learns the embeddings up to the min-
imum pair-wise distances within the vocabulary. In each
training step, we first estimate the clipping threshold σmin
with Eqn. 14, then sample timesteps among t that satisfies
σ(t) > σmin. In practice, one can first estimate the noise
scale threshold σmin and then turn it into the timestep thresh-
old tmin = σ−1(σmin) in general. In this work, we select
σ(t) = t as the noise scheduler to simplify this procedure4.
As a result, the updated diffusion loss with an enlarged
minimum timestep threshold (thus an increased minimum
noise scale) in the final training objective (modified from
Eqn. 9) now becomes:
L(cid:48)
diffusion(y) =
E
t∼U (tmin,1),(cid:15)t∼N (0,I)
(cid:104)
(cid:107)zθ(zt, x, t) − z0(cid:107)2
2
(cid:105)
.
We provide pseudocodes regarding how to manipulate
noises in training as such in Alg. 1.
4This can be done since the effects of different noise schedules
are theoretically interchangeable up to different weight factors
under the simplified training objective (Ho et al., 2020) we adopted
(see Appendix A). We also provide empirical comparisons between
different schedules in Tab. 4. This allows us to more conveniently
manipulate noise scales.
Algorithm 1 Training with noise scale clipping
Input Training dataset D = {(x, y)}.
Output Optimized parameters θ.
1: repeat
2:
3:
4:
5:
Sample x, y from the dataset D and embed y into z0
t ∼ U(σ−1(σmin), 1), where σmin is from Eqn. 14
Sample zt with Gaussian reparameterization (Eqn. 4)
Take gradient descent step on
(cid:2)− log pθ(y|z0) + (cid:107)zθ(zt, x, t) − z0(cid:107)2
(cid:3)
2
∇θ
6: until converged
Figure 3. A synthesis experiment similar to Fig. 1(E), where the
model is asked to predict with current timestep τ = t and an alter-
native larger timestep τ = 0.995, respectively. We compare the
MSE between the model prediction zθ(z(cid:48)
t, x, τ ) to the embedding
of ground-truth z0(y) (top) and negative sample z0(y(cid:48)) (bottom)
respectively, and study to which target the model prediction assim-
ilates, the original y or the negative one y(cid:48), hence should most
likely be governed by the source or the target information.
4.2. CEDI: Sampling with Manipulated Noises for
Enhanced Condition Awareness
Based on C3 in §3, we suppose the model relies more on
the source conditions when indicated by large noise scales.
This implies that we may make the model more faithful
to source conditions by feeding indicators of large noise
scales to the model. Fig. 3 shows a synthesis experiment
similar to Fig. 1(E), wherein the predictions using a large
timestep 0.995 (namely, a larger noise scale) are closer to
the embedding of the original target y, while more distant
to that of the misleading y(cid:48), reiterating that the model relies
more on the source condition x when exposed to large noise
indicator due to manipulation in inference.
Inspired by the aforementioned observations, we propose a
condition-enhanced denoiser (CEDI) for sampling. CEDI
always feeds a large t to the model zθ to encourage the
model to make use of the source condition. In practice,
we largely follow the framework of DDIM solver (Song
et al., 2020a) but pick two sets of timesteps. In the first
set {ti}M
i=0, timesteps decrease uniformly from t0 = 1 to
tM ≈ 0 as normal. As for the other set {τi}M
i=0, τis decrease
DINOISER: Diffused Conditional Sequence Learning by Manipulating Noises
Algorithm 2 Sampling with CEDI for enhanced condition
awareness
Input Source condition x; number of steps M ; model pa-
rameters θ.
Output Predicted target ˆy.
1: Uniformly discretize [T, 1] into M + 1 steps {ti}M
i=0 in
descend order (T ≈ 0)
2: Uniformly discretize [T , 1] into M + 1 steps {τi}M
i=0
in descend order (T (cid:29) 0)
3: Sample ˆzt0 ∼ N (0, I)
4: for i = 1 to M do
5:
ˆz0 ← zθ( ˆzti−1, x, τi−1)
ˆzti−1 −α(τi−1) ˆz0
ˆ(cid:15) ←
σ(τi−1)
ˆzti ← α(ti) ˆz0 + σ(ti)ˆ(cid:15)
6:
7:
8: end for
9: Map ˆztM to ˆy with the embeddings
uniformly from τ0 = 1 to a large time τM (cid:29) 05. When
making predictions, we assign timesteps from the second
set to the model. By replacing corresponding timesteps in
the framework of DDIM (Eqn. 7 and Eqn. 8) with τis, we
generate our predictions by iteratively computing
ˆzti = α(ti)zθ( ˆzti−1 , x, τi−1) + σ(ti)(cid:15)θ( ˆzti−1, x, τi−1),
where the predicted noise is also updated as
(cid:15)θ( ˆzti−1, x, τi−1) =
ˆzti−1 − α(τi−1)zθ( ˆzti−1 , x, τi−1)
σ(τi−1)
.
We also demonstrate how CEDI works in Alg. 2.
5. Experiment
We conduct experiments to verify the effectiveness of our
proposed method and study its characteristics.
5.1. Experimental Setup
Tasks and Datasets. We mainly experiment on ma-
chine translation, a well-established benchmark task for
conditional sequence learning. We consider IWSLT14
DE↔EN (160K pairs), WMT14 EN↔DE (4.0M pairs),
and WMT14 EN↔RO (610K pairs), six machine transla-
tion tasks with variant sizes of training data. Additionally,
we experiment on two of the datasets introduced by Dif-
fuSeq (Gong et al., 2022), including Wiki (Jiang et al., 2020)
for text simplification and QQP6 for paraphrasing.
5Empirically, we find that τM satisfying σ(τM ) = 0.99 (i.e.,
τM = 0.99 for σ(t) = t and τM = 0.9606 for Li et al. (2022)'s
sqrt schedule σ(t) = t0.25) generally works well.
6https://www.kaggle.com/c/
quora-question-pairs
Baselines. We include three groups of baselines for machine
translation: (1) The autoregressive Transformer (Vaswani
et al., 2017); (2) The CMLM (Ghazvininejad et al., 2019),
an iterative-based non-autoregressive model for conditional
sequence learning. (3) Previous diffusion-based sequence
generative models, including the vanilla design that simply
extends the original DiffusionLM (Li et al., 2022) with an
additinal condition encoder, and the other recently proposed
improved methods CDCD (continuous diffusion for cate-
gorical data, Dieleman et al., 2022), DiffuSeq (Gong et al.,
2022), SeqDiffuSeq (Yuan et al., 2022) and Difformer (Gao
et al., 2022). For text simplification and paraphrasing, we
compare our method with DiffuSeq (Gong et al., 2022).
Metrics. We primarily report SacreBLEU7 (Post, 2018)
for machine translation,
following CDCD (Dieleman
et al., 2022). We also report tokenized BLEU (Pap-
ineni et al., 2002) in Appendix B for reference. For
text simplification and paraphrasing, we follow DiffuSeq
to employ sentence-level BLEU under the tokenizer of
BERT-BASE-UNCASED as the evaluation metric.
Implementation Details. All implementations are based on
Transforme-base (Vaswani et al., 2017) for all datasets
except IWSLT14. For IWSLT14, we use a smaller architec-
ture that has 4 attention heads and 1024-dimensional feed-
forward layers. The embedding dimension for the diffusion
model is 16 on IWSLT14 and 64 on the others. In the im-
plementation of our method, we follow recent advances and
apply self-conditioning techniques (Dieleman et al., 2022;
Chen et al., 2022; Strudel et al., 2022). Besides, following
previous practice in non-autoregressive machine translation,
we train our model both with and without knowledge distil-
lation (KD, Kim & Rush, 2016; Zhou et al., 2020).
During inference, for machine translation, we apply beam
search in the autoregressive Transformer with beam size 5.
Correspondingly, we use length beam 5 in the non-
autoregressive models, except for CDCD and DiffuSeq since
they vary the target lengths by predicting paddings instead
of length predictions. For text simplification and paraphras-
ing, we report results with various length beams as length
prediction on these tasks is more challenging and less stud-
ied. For all the diffusion-based methods, we follow pre-
vious work (Li et al., 2022; Gong et al., 2022; Dieleman
et al., 2022) and apply Minimum Bayes-Risk (MBR) decod-
ing (Kumar & Byrne, 2004). For both DiffusionLM and our
model, we perform sampling with 20 steps.
We implement DiffusionLM and DINOISER upon
fairseq (Ott et al., 2019), and also train Transformer and
CMLM baselines using fairseq. For data preprocess-
7The
signature
is nrefs:1|case:mixed|eff:no|
tok:intl|smooth:exp|version:2.3.1 if
the target
language is German, and nrefs:1|case:mixed|eff:no|
tok:13a|smooth:exp|version:2.3.1 for others.
DINOISER: Diffused Conditional Sequence Learning by Manipulating Noises
Table 2. Comparison in SacreBLEU on machine translation tasks. "LB": the size of the length beam search. "MBR": the number of
candidates for each length beam to apply Minimum Bayes-Risk decoding. "KD": results are obtained with knowledge distillation (KD,
Kim & Rush, 2016; Zhou et al., 2020). Provided that KD is common and effective practice in non-autoregressive (NAR) machine
translation, though not the focus of this study, we also provide further experiments with KD in Appendix B for reference. The best NAR
results without KD are in bold and the second best ones are underlined. The results of CDCD are quoted from Dieleman et al. (2022), and
the results of Difformer, DiffuSeq, and SeqDiffuSeq are from Gao et al. (2022).
†: how CMLM originally selects candidates with different lengths differs from the MBR decoding we used for diffusion models, and we
thus include its results with MBR decoding for fair comparisons. ‡: results are presented in tokenized BLEU as reported in Gao et al.
(2022), and we encourage readers to check the original papers for more details.
Methods
Transformer (Vaswani et al., 2017) (AR, beam = 5)
CMLM (Ghazvininejad et al., 2019) (NAR, LB = 5)
CMLM (Ghazvininejad et al., 2019) (NAR, LB = 5, MBR=1†)
DiffusionLM (Li et al., 2022) (LB = 5, MBR = 1)
DiffusionLM (Li et al., 2022) (LB = 5, MBR = 10)
CDCD (Dieleman et al., 2022) (MBR = 10)
CDCD (Dieleman et al., 2022) (MBR = 100)
Difformer (Gao et al., 2022)
DiffuSeq‡ (Gong et al., 2022)
(KD, LB×MBR = 10)
SeqDiffuSeq‡ (Yuan et al., 2022) (KD, LB×MBR = 10)
(LB×MBR = 20)
DINOISER (LB = 5, MBR = 1)
DINOISER (LB = 5, MBR = 10)
DINOISER (LB = 10, MBR = 5)
DINOISER (KD, LB = 10, MBR = 5)
IWSLT14
WMT14
WMT16
DE→EN EN→DE DE→EN EN→DE RO→EN EN→RO
33.61
29.41
29.32
26.61
29.11
-
-
-
-
-
31.29
31.61
31.44
-
28.30
24.33
24.34
20.29
22.91
-
-
-
-
-
25.55
25.70
26.14
-
30.55
28.71
28.43
17.31
19.69
25.40
26.00
-
-
-
28.83
29.05
29.01
30.30
26.85
23.22
23.09
15.33
17.41
19.70
20.00
23.80
15.37
17.14
24.25
24.26
24.62
25.88
33.08
31.13
31.07
28.61
30.17
-
-
-
-
-
31.14
31.22
31.24
33.13
32.86
31.26
30.92
27.01
29.39
-
-
-
25.45
26.17
30.93
31.08
31.03
32.84
ing, we follow the instruction in fairseq for IWSLT148
and use the preprocessed data by Gu & Kong (2021) for
WMT14 and WMT169. For Wiki and QQP, we use pre-
processed data provided by DiffuSeq10 and tokenized them
with byte-pair encoding (BPE, Sennrich et al., 2016). The
training batch size is 128K for WMT14/WMT16, and 32K
for the others. We empirically find checkpoint averaging
unnecessary for our method and have not applied it in all
our implementations.
5.2. Main Results
The results of machine translation and the other two tasks
are in Tab. 2 and Tab. 3, respectively.
Overall performance. Our DINOISER demonstrates effec-
tiveness on all selected conditional sequence learning tasks,
which we summarize into the following three aspects:
• DINOISER achieves state-of-the-art results among
diffusion-based models on one of the representa-
tive conditional sequence generation tasks, i.e., ma-
chine translation, where DINOISER outperforms the
vanilla design of DiffusionLM, as well as the previous
8https://github.com/facebookresearch/
fairseq/tree/main/examples/translation
9https://github.com/shawnkx/Fully-NAT
10https://github.com/Shark-NLP/DiffuSeq
strongest approaches such as CDCD (Dieleman et al.,
2022) and Difformer (Gao et al., 2022) by a large mar-
gin (Tab. 2). For DiffuSeq and SeqDiffuSeq, although
their reported tokenized BLEUs are not strictly compa-
rable to our SacreBLEU results due to the difference in
tokenizers, our performance is far above them by over
4 BLEU score and even more if we involve knowledge
distillation, which supports our superiority over them.
• DINOISER demonstrates strong competitiveness in
conditional sequence learning.
It even surpasses
CMLM (Ghazvininejad et al., 2019) on almost all the
experimented machine translation datasets (Tab. 2).
Provided that CMLM is one of the leading approaches
among NAR sequence learners, the performance DI-
NOISER achieves can be considered quite competitive.
• DINOISER is generic to various conditional sequence
learning tasks. Results on Tab. 3 shows that DINOISER
also works well in tasks other than machine translation,
surpassing previously proposed DiffuSeq.
In addition to the overall performance, DINOISER also
demonstrates several nice properties over the baselines. We
elaborate on them as follows:
Scalability. As shown in Tab. 2, DiffusionLM seems more
challenging to accommodate larger datasets like WMT14
than smaller ones (e.g., IWSLT14). This verifies the curse of
scalability problem discussed in §3. In contrast, DINOISER
DINOISER: Diffused Conditional Sequence Learning by Manipulating Noises
Table 3. Sentence-level BLEU of our method and DiffuSeq on
Wiki (text simplification) and QQP (paraphrasing). "NFE": num-
ber of function evaluations, measuring the total number of forward
passes to the model for each prediction. The results of DiffuSeq
are quoted from Gong et al. (2022).
Steps LB MBR
NFE Wiki QQP
Methods
DiffuSeq
2000
DINOISER
DINOISER
DINOISER
20
20
20
-
10
20
20
10 20000 36.22 24.13
1
1
5
200 35.36 26.07
400 36.94 25.42
2000 36.88 25.57
surpasses CMLM on almost all large- and small-scale sce-
narios, which indicates that DINOISER indeed greatly im-
proves the scalability of diffusion-based sequence learners.
This advantage of DINOISER could help facilitate further re-
search and open up the possibilities of large-scale real-world
applications of diffused sequence generative models.
Sampling efficiency. Given the sizes of length beam search
(LB) and MBR decoding shown in Tab. 2, DINOISER sur-
passes or closely approaches CMLM even when MBR=1,
while the vanilla DiffusionLM heavily relies on a large
number of candidates used for MBR decoding. Besides,
DINOISER necessitates much fewer NFEs to achieve strong
performance, e.g., only 20 steps, resulting in only 1% to
10% computational consumption and latency compared to
previous works (Gong et al., 2022; Li et al., 2022; Diele-
man et al., 2022). This manifests that DINOISER is more
accurate yet efficient compared to previous diffusion-based
sequence learning models.
5.3. Effect of Sizes of Length Beam and MBR
DINOISER can leverage both length beam search and MBR
decoding to produce diverse candidates for selection. The
results on all of the evaluated datasets (Tab. 2 and Tab. 3)
demonstrate that the method can gain its performance by
properly adjusting the two hyperparameters for sampling.
In particular, we search on various combinations of length
beams and MBRs and evaluate the corresponding perfor-
mance of DINOISER on the validation set of WMT14
EN→DE, shown in Fig. 4. The model performance rises
first and then drops down as the length beam increases. And
for each length beam, we can further boost the performance
of DINOISER with MBR > 1, suggesting that the effects of
the two factors are complementary.
Using both length beam search and MBR decoding also
brings benefits to DINOISER over those only involving one
of them. Compared to CMLM which decodes determin-
istically, DINOISER is able to sample multiple sentences
for each length beam, providing more diverse candidates.
Compared to CDCD, which predicts paddings to generate
sentences of various lengths and whose sampling efficiency
is restricted by maximum target length, DINOISER's use
Figure 4. SacreBLEU on the validation set of WMT14 EN→DE
with different length beams and MBR sizes.
of length beams allows more fine-grained control of the
computational budget.
5.4. Effect of Noise Scale Clipping for Training
We compare models trained with different settings in Tab. 4
to study the effect of our training strategy. We find that the
proposed noise scale clipping consistently helps improve
the model performance. Replacing the noise schedule in
DINOISER (i.e., σ(t) = t) with the sqrt schedule pro-
posed by Li et al. (2022) has negligible influence on the
final performance. This is expected since we only set the
noise schedule as σ(t) = t for convenience. The differ-
ence is that the improvement by noise clipping is relatively
smaller when using the sqrt schedule. This is because the
noise scale of the sqrt schedule increases quickly in small
timesteps (Fig. 2B). When t = 0.2, σsqrt(t) ≈ 0.67, which
is close to our initial clipping threshold. This suggests the
previous success of the sqrt schedule may also be partly
explained as training more on large-scale noises.
5.5. Effect of Condition Enhancement for Sampling
We compare the performance between different denoisers,
i.e., DDIM and the proposed CEDI, in Tab. 4. In a nut-
shell, CEDI impressively outperforms DDIM, especially for
small MBR candidate sizes. We also notice that DDIM per-
forms particularly unsatisfactorily when the model is trained
without noise scale clipping. However, for these models,
CEDI can still produce a relatively good performance (over
20.50 for MBR=1) that even surpasses well-designed CDCD
(20.00 for MBR=100). What's more, we highlight two criti-
cal characteristics of CEDI as follows:
CEDI indeed better leverage source conditions for infer-
ence. Recall that we propose the CEDI with the purpose
of encouraging the model to make better use of source con-
ditions for prediction (§4.2). To investigate whether the
denoiser achieves this, we apply Layer-wise Relevant Propa-
gation (LRP, Bach et al., 2015; Voita et al., 2021) to measure
the relative contribution of the source condition to the model
prediction. As shown in Fig. 5(B), we compare the source
contribution of our CEDI and the DDIM solver along the
sampling iterations. CEDI maintains a high source contribu-
DINOISER: Diffused Conditional Sequence Learning by Manipulating Noises
Table 4. Ablation Study on WMT14 EN→DE. All the results are in SacreBLEU scores and the length beam sizes are 5.
Training Settings
DDIM (MBR = 1) CEDI (MBR = 1) DDIM (MBR = 10) CEDI (MBR = 10)
Ours [final]
w/o self-conditioning
w/o noise scale clipping
w/o self-conditioning, w/o noise scale clipping
w/ sqrt noise schedule
w/ sqrt noise schedule, w/o noise scale clipping
19.23
20.37
7.95
11.30
20.11
16.68
24.25
23.03
21.16
20.86
24.13
23.22
22.12
22.58
11.51
14.84
22.83
20.46
24.26
23.14
21.40
21.47
24.07
23.40
Table 5. Results of multilingual machine translation ({DE,RO,PT-
BR,NL}↔EN). "BILINGUAL": integrated results of separate mod-
els of every language pair. "MULTILING.": results from a unified
multilingual model. We employ langdetect (Shuyo, 2010)
to infer the language of generated sequences for computing the
language accuracy.
Settings
Methods
SacreBLEU (Lang Acc %)
BILINGUAL MULTILING.
many-to-one
{DE,RO,PT-BR,NL}
→EN
one-to-many
EN→
{DE,RO,PT-BR,NL}
CMLM
DINOISER (DDIM, MBR=1)
DINOISER (DDIM, MBR=10)
DINOISER (MBR=1)
DINOISER (MBR=10)
CMLM
DINOISER (DDIM, MBR=1)
DINOISER (DDIM, MBR=10)
DINOISER (MBR=1)
DINOISER (MBR=10)
33.85
32.40
33.73
34.57
34.74
28.10
27.44
28.54
28.72
28.81
35.23
33.43
35.48
35.26
35.66
30.55 (72.40)
17.95 (67.58)
18.57 (67.50)
30.52 (72.81)
30.67 (72.88)
four language pairs of IWSLT14 translation benchmark,
i.e., EN↔DE, EN↔RO, EN↔NL, and EN↔PT-BR. In the
one-to-many translation, we append language tokens to
the source sequences to incorporate the target language as a
condition. We also include a baseline in which the models
are trained separately for each language pair for comparison.
As shown in Tab. 5, DINOISER works well in multilingual
settings, showing its strong capability in modeling condi-
tions, i.e. a complex multimodal condition (source sentences
of four languages in many-to-one), and multiple condi-
tions (source sentence of English as well as identity of target
languages). Particularly, CEDI shows huge advantages over
DDIM in the multilingual setting of one-to-many trans-
lation. In this case, the language accuracy of DDIM is much
lower than that of CEDI, suggesting DDIM has trouble cap-
turing the given condition, namely the language identity
in this one-to-many scenario. In contrast, DINOISER
augmented with CEDI yields satisfactory predictions with
high language accuracy, exhibiting superiority in working
with multiple conditions.
6. Related Work
6.1. Non-autoregressive Sequence Generative Models
Non-autoregressive sequence learning (NAR) was first pro-
posed by Gu et al. (2018) as an alternative to its autoregres-
sive counterpart. It generates target tokens in parallel, either
fully NAR (Gu et al., 2018) or up to a mild number of itera-
Figure 5. The difference between our CEDI and the DDIM solver
over steps. (A) The prediction accuracy at each step, measured
with SacreBLEU. (B) The proportion of source contribution to the
prediction at each step.
tion, while the source contribution of CEDI is unsatisfactory
in the first few steps, which demonstrates that sampling
with our CEDI does leverage the source condition more.
Correspondingly, as shown in Fig. 5(A), the prediction ac-
curacy of CEDI increases steadily, while the performance
of DDIM fails to improve at the beginning of the iterations,
suggesting correlations between higher source contribution
and higher performance improvement. Among all iterations,
the first few steps establish the foundation for the overall
performance. Although DDIM improves its performance
in later iterations, it still falls behind our CEDI. This sug-
gests the effectiveness of increasing the source contribution,
especially at the beginning of the sampling process.
CEDI can handle sequence generation from complex
and multiple conditions. To further show the strength
of CEDI in capturing source conditions, we explore more
complex conditional sequence learning scenarios. We sim-
ulate this under two multilingual translation settings, i.e.
many-to-one and one-to-many translation. In the
many-to-one scenario, a unified model needs to trans-
late source sentences in multiple different source languages
to English counterparts, requiring the model to handle
complicated source conditions. On the other hand, the
one-to-many setting simulates a multi-conditional sce-
nario, requiring the model to recognize the target language
as another crucial condition to capture the target distribu-
tion. To this end, we construct a dataset by combining
DINOISER: Diffused Conditional Sequence Learning by Manipulating Noises
tions (Ghazvininejad et al., 2019), liberating sequence mod-
eling from the constraint of a predefined order (Qian et al.,
2022). With recent efforts, NAR shows great potential in the
applications of various domains, including language (Qian
et al., 2021; Qi et al., 2021; Huang et al., 2022c; Qian
et al., 2022), speech (Kim et al., 2021), proteins (Zheng
et al., 2023a), and molecules (Hoogeboom et al., 2022).
Different from more commonly-used autoregressive (AR)
models (Sutskever et al., 2014), NAR models assume condi-
tional independence among the output tokens. Such an as-
sumption risks ignoring the target dependencies (Ren et al.,
2020; Huang et al., 2022b) and leads to the multi-modality
problem (Gu et al., 2018). As a result, the vanilla fully
NAR model has inferior generation quality. Some of the
later improvements alleviate the strong assumption by refor-
mulating NAR formulation under iterative refinement (Lee
et al., 2018; Gu et al., 2019; Ghazvininejad et al., 2019;
2020; Huang et al., 2022a;d; Zheng et al., 2023b), which
iteratively takes as input the previously generated sequence,
which serves as an intermediate random variable, to produce
the tokens of its refined or denoised version in parallel until
convergence or the budget of maximum iterations run out.
Some recent advances herein follow the idea of discrete dif-
fusion (Sohl-Dickstein et al., 2015; Austin et al., 2021) and
formalize iterative refinement as Markov processes (Savinov
et al., 2021; He et al., 2022; Reid et al., 2022). Although
both are named after diffusion models, these works operate
on discrete state space, whereas our focus, continuous dif-
fusion models accommodate the continuous (embedding)
space of discrete tokens.
6.2. Diffusion Models for Sequence Learning
Continuous diffusion models (Sohl-Dickstein et al., 2015;
Ho et al., 2020; Song et al., 2020b) gained first success in
generating high-quality images. Recently, Li et al. (2022)
successfully adapted them to sequence learning and pro-
posed the DiffusionLM, the first diffusion-based sequence
generative model with a special focus on controllable text
generation. Later improvements to the diffusion-based se-
quence generative models are mainly categorized threefold.
The first line includes novel components for diffusion mod-
eling, such as the partial diffusion process proposed by
Gong et al. (2022), self-conditioning techniques introduced
by Strudel et al. (2022), and the adaptive noise schedule
of Yuan et al. (2022). The second line applies diffusion
models to the latent space of specific pretrained language
models (Lovelace et al., 2022). And the third tries to in-
corporate conventional practice in discrete token prediction.
For instance, Dieleman et al. (2022); Gao et al. (2022) and
Han et al. (2022) incorporate the cross-entropy objectives in
training. For the application of diffusion-based models for
sequence learning, previous work found their advantages in
controllable generation (Yu et al., 2022; Liu et al., 2022; Li
et al., 2022), and generating diverse sequences (Gong et al.,
2022). Lin et al. (2022) demonstrates that diffusion-based
sequence generative models can benefit from large-scale
self-supervised pretraining. While almost all these works
mainly focus on the training phrase of diffusion-based se-
quence generative models, our study emphasizes both train-
ing and inference.
7. Conclusion
In this paper, we shed light on the crucial role of noise scales
in conditional sequence learning with diffusion models and
determine that small noise scales impede diffusion models
in both learning and inference. Motivated by our findings,
we propose DINOISER to leverage large noise scales in
both training and inference. DINOISER makes training
samples cover the whole sample space more efficiently and
also enables the model to better utilize source conditions
for prediction, thereby leading to considerable performance
improvements. In this work, we demonstrate the potential
diffusion models for conditional sequence learning. We
expect our study could help facilitate further research on
diffusion models to empower various applications of condi-
tional sequence learning.
References
Austin, J., Johnson, D. D., Ho, J., Tarlow, D., and van den
Berg, R. Structured denoising diffusion models in discrete
state-spaces. Advances in Neural Information Processing
Systems, 34:17981–17993, 2021.
Bach, S., Binder, A., Montavon, G., Klauschen, F., M ̈uller,
K.-R., and Samek, W. On pixel-wise explanations for
non-linear classifier decisions by layer-wise relevance
propagation. PloS one, 10(7):e0130140, 2015.
Bahdanau, D., Cho, K., and Bengio, Y. Neural machine
translation by jointly learning to align and translate. arXiv
preprint arXiv:1409.0473, 2014.
Cettolo, M., Girardi, C., and Federico, M. Wit3: Web
inventory of transcribed and translated talks. In Confer-
ence of european association for machine translation, pp.
261–268, 2012.
Chen, T., Zhang, R., and Hinton, G. Analog bits: Gen-
erating discrete data using diffusion models with self-
conditioning. arXiv preprint arXiv:2208.04202, 2022.
Dieleman, S., Sartran, L., Roshannai, A., Savinov, N.,
Ganin, Y., Richemond, P. H., Doucet, A., Strudel, R.,
Dyer, C., Durkan, C., et al. Continuous diffusion for
categorical data. arXiv preprint arXiv:2211.15089, 2022.
Efron, B. Tweedie's formula and selection bias. Journal
DINOISER: Diffused Conditional Sequence Learning by Manipulating Noises
of the American Statistical Association, 106(496):1602–
1614, 2011.
Gao, Z., Guo, J., Tan, X., Zhu, Y., Zhang, F., Bian, J.,
and Xu, L. Difformer: Empowering diffusion model
on embedding space for text generation. arXiv preprint
arXiv:2212.09412, 2022.
Ghazvininejad, M., Levy, O., Liu, Y., and Zettlemoyer, L.
Mask-predict: Parallel decoding of conditional masked
language models. In Proceedings of the 2019 Conference
on Empirical Methods in Natural Language Processing
and the 9th International Joint Conference on Natural
Language Processing (EMNLP-IJCNLP), pp. 6112–6121,
2019.
Ghazvininejad, M., Levy, O., and Zettlemoyer, L. Semi-
autoregressive training improves mask-predict decoding.
arXiv preprint arXiv:2001.08785, 2020.
Gong, S., Li, M., Feng, J., Wu, Z., and Kong, L. Diffuseq:
Sequence to sequence text generation with diffusion mod-
els. arXiv preprint arXiv:2210.08933, 2022.
Gu, J. and Kong, X. Fully non-autoregressive neural ma-
chine translation: Tricks of the trade. In Findings of the
Association for Computational Linguistics: ACL-IJCNLP
2021, pp. 120–133, 2021.
Gu, J., Bradbury, J., Xiong, C., Li, V. O., and Socher, R.
Non-autoregressive neural machine translation. In Inter-
national Conference on Learning Representations, 2018.
Gu, J., Wang, C., and Zhao, J. Levenshtein transformer.
Advances in Neural Information Processing Systems, 32,
2019.
Ho, J., Chan, W., Saharia, C., Whang, J., Gao, R., Gritsenko,
A., Kingma, D. P., Poole, B., Norouzi, M., Fleet, D. J.,
et al. Imagen video: High definition video generation
with diffusion models. arXiv preprint arXiv:2210.02303,
2022.
Hoogeboom, E., Satorras, V. G., Vignac, C., and Welling,
M. Equivariant diffusion for molecule generation in 3d.
In International Conference on Machine Learning, pp.
8867–8887. PMLR, 2022.
Huang, C., Zhou, H., Za ̈ıane, O. R., Mou, L., and Li, L. Non-
autoregressive translation with layer-wise prediction and
deep supervision. In Proceedings of the AAAI Conference
on Artificial Intelligence, volume 36, pp. 10776–10784,
2022a.
Huang, F., Tao, T., Zhou, H., Li, L., and Huang, M. On the
learning of non-autoregressive transformers. In Interna-
tional Conference on Machine Learning, pp. 9356–9376.
PMLR, 2022b.
Huang, F., Zhou, H., Liu, Y., Li, H., and Huang, M. Directed
acyclic transformer for non-autoregressive machine trans-
lation. In International Conference on Machine Learning,
pp. 9410–9428. PMLR, 2022c.
Huang, X. S., Perez, F., and Volkovs, M. Improving non-
autoregressive translation models without distillation. In
International Conference on Learning Representations,
2022d.
Jiang, C., Maddela, M., Lan, W., Zhong, Y., and Xu, W.
Neural crf model for sentence alignment in text simpli-
fication. In Proceedings of the 58th Annual Meeting of
the Association for Computational Linguistics, pp. 7943–
7960, 2020.
Han, X., Kumar, S., and Tsvetkov, Y. Ssd-lm: Semi-
autoregressive simplex-based diffusion language model
for text generation and modular control. arXiv preprint
arXiv:2210.17432, 2022.
Kim, J., Kong, J., and Son, J. Conditional variational au-
toencoder with adversarial learning for end-to-end text-to-
speech. In International Conference on Machine Learn-
ing, pp. 5530–5540. PMLR, 2021.
He, Z., Sun, T., Wang, K., Huang, X., and Qiu, X. Diffu-
sionbert: Improving generative masked language models
with diffusion models. arXiv preprint arXiv:2211.15029,
2022.
Kim, Y. and Rush, A. M. Sequence-level knowledge dis-
tillation. In Proceedings of the 2016 Conference on Em-
pirical Methods in Natural Language Processing, pp.
1317–1327, 2016.
Ho, J., Jain, A., and Abbeel, P. Denoising diffusion
In Larochelle, H., Ranzato,
probabilistic models.
M., Hadsell, R., Balcan, M., and Lin, H. (eds.),
Advances in Neural Information Processing Systems,
pp. 6840–6851. Curran Associates,
volume 33,
URL https://proceedings.
2020.
Inc.,
neurips.cc/paper/2020/file/
4c5bcfec8584af0d967f1ab10179ca4b-Paper.
pdf.
Kingma, D. P. and Welling, M. Auto-encoding variational
bayes. arXiv preprint arXiv:1312.6114, 2013.
Kong, Z., Ping, W., Huang, J., Zhao, K., and Catanzaro, B.
Diffwave: A versatile diffusion model for audio synthesis.
In International Conference on Learning Representations,
2020.
Kumar, S. and Byrne, W. Minimum bayes-risk decoding for
statistical machine translation. Technical report, JOHNS
DINOISER: Diffused Conditional Sequence Learning by Manipulating Noises
HOPKINS UNIV BALTIMORE MD CENTER FOR
LANGUAGE AND SPEECH PROCESSING (CLSP),
2004.
Lee, J., Mansimov, E., and Cho, K. Deterministic non-
autoregressive neural sequence modeling by iterative re-
In Proceedings of the 2018 Conference on
finement.
Empirical Methods in Natural Language Processing, pp.
1173–1182, 2018.
Li, X. L., Thickstun, J., Gulrajani, I., Liang, P., and
Hashimoto, T. Diffusion-lm improves controllable text
generation. ArXiv, abs/2205.14217, 2022.
Lin, Z., Gong, Y., Shen, Y., Wu, T., Fan, Z., Lin, C., Chen,
W., and Duan, N. Genie: Large scale pre-training for
text generation with diffusion model. arXiv preprint
arXiv:2212.11685, 2022.
Liu, G., Feng, Z., Gao, Y., Yang, Z., Liang, X., Bao, J., He,
X., Cui, S., Li, Z., and Hu, Z. Composable text controls in
latent space with odes. arXiv preprint arXiv:2208.00638,
2022.
Lovelace, J., Kishore, V., Wan, C., Shekhtman, E., and
Weinberger, K. Latent diffusion for language generation.
arXiv preprint arXiv:2212.09462, 2022.
Lu, C., Zhou, Y., Bao, F., Chen, J., Li, C., and Zhu, J.
Dpm-solver: A fast ode solver for diffusion probabilis-
tic model sampling in around 10 steps. arXiv preprint
arXiv:2206.00927, 2022.
Ott, M., Edunov, S., Baevski, A., Fan, A., Gross, S., Ng,
N., Grangier, D., and Auli, M.
fairseq: A fast, ex-
tensible toolkit for sequence modeling. arXiv preprint
arXiv:1904.01038, 2019.
Papineni, K., Roukos, S., Ward, T., and Zhu, W.-J. Bleu:
a method for automatic evaluation of machine transla-
tion. In Proceedings of the 40th annual meeting of the
Association for Computational Linguistics, pp. 311–318,
2002.
Post, M. A call for clarity in reporting bleu scores. In Pro-
ceedings of the Third Conference on Machine Translation:
Research Papers, pp. 186–191, 2018.
Prakash, A., Hasan, S. A., Lee, K., Datla, V. V., Qadir,
A., Liu, J., and Farri, O. Neural paraphrase gener-
ation with stacked residual LSTM networks. CoRR,
abs/1610.03098, 2016. URL http://arxiv.org/
abs/1610.03098.
Qi, W., Gong, Y., Jiao, J., Yan, Y., Chen, W., Liu, D.,
Tang, K., Li, H., Chen, J., Zhang, R., Zhou, M., and
Duan, N. Bang: Bridging autoregressive and non-
autoregressive generation with large scale pretraining. In
Meila, M. and Zhang, T. (eds.), Proceedings of the 38th
International Conference on Machine Learning, volume
139 of Proceedings of Machine Learning Research, pp.
8630–8639. PMLR, 18–24 Jul 2021. URL https://
proceedings.mlr.press/v139/qi21a.html.
Qian, L., Zhou, Y., Zheng, Z., Zhu, Y., Lin, Z., Feng, J.,
Cheng, S., Li, L., Wang, M., and Zhou, H. The volctrans
glat system: Non-autoregressive translation meets wmt21.
WMT 2021, pp. 187, 2021.
Qian, L., Wang, M., Liu, Y., and Zhou, H. Diff-glat: Dif-
fusion glancing transformer for parallel sequence to se-
quence learning. arXiv preprint arXiv:2212.10240, 2022.
Raffel, C., Shazeer, N., Roberts, A., Lee, K., Narang, S.,
Matena, M., Zhou, Y., Li, W., Liu, P. J., et al. Exploring
the limits of transfer learning with a unified text-to-text
transformer. J. Mach. Learn. Res., 21(140):1–67, 2020.
Ramesh, A., Dhariwal, P., Nichol, A., Chu, C., and Chen,
M. Hierarchical text-conditional image generation with
clip latents. arXiv preprint arXiv:2204.06125, 2022.
Reid, M., Hellendoorn, V. J., and Neubig, G. Diffuser:
Diffusion via edit-based reconstruction. In International
Conference on Learning Representations, 2022.
Ren, Y., Liu, J., Tan, X., Zhao, Z., Zhao, S., and Liu, T.-
Y. A study of non-autoregressive model for sequence
generation. In Proceedings of the 58th Annual Meeting of
the Association for Computational Linguistics, pp. 149–
159, 2020.
Rombach, R., Blattmann, A., Lorenz, D., Esser, P., and
Ommer, B. High-resolution image synthesis with latent
diffusion models, 2021.
Rush, A. M., Chopra, S., and Weston, J. A neural atten-
tion model for abstractive sentence summarization. In
Proceedings of the 2015 Conference on Empirical Meth-
ods in Natural Language Processing, pp. 379–389, Lis-
bon, Portugal, September 2015. Association for Compu-
tational Linguistics. doi: 10.18653/v1/D15-1044. URL
https://aclanthology.org/D15-1044.
Savinov, N., Chung, J., Binkowski, M., Elsen, E., and
van den Oord, A. Step-unrolled denoising autoencoders
for text generation. In International Conference on Learn-
ing Representations, 2021.
Sennrich, R., Haddow, B., and Birch, A. Neural machine
translation of rare words with subword units. In Proceed-
ings of the 54th Annual Meeting of the Association for
Computational Linguistics (Volume 1: Long Papers), pp.
1715–1725, 2016.
DINOISER: Diffused Conditional Sequence Learning by Manipulating Noises
Yu, P., Xie, S., Ma, X., Jia, B., Pang, B., Gao, R., Zhu, Y.,
Zhu, S.-C., and Wu, Y. Latent diffusion energy-based
model for interpretable text modeling. In International
Conference on Machine Learning (ICML 2022)., 2022.
Yuan, H., Yuan, Z., Tan, C., Huang, F., and Huang, S. Seqdif-
fuseq: Text diffusion with encoder-decoder transformers.
arXiv preprint arXiv:2212.10325, 2022.
Zheng, Z., Deng, Y., Xue, D., Zhou, Y., YE, F., and Gu, Q.
Structure-informed language models are protein design-
ers. arXiv preprint arXiv:2302.01649, 2023a.
Zheng, Z., Zhou, Y., and Zhou, H. Deep equilibrium non-
autoregressive sequence learning. 2023b.
Zhou, C., Neubig, G., and Gu, J. Understanding knowledge
distillation in non-autoregressive machine translation. In
International Conference on Learning Representations,
2020.
Shuyo, N.
2010.
language-detection/.
Language detection library for
java,
URL http://code.google.com/p/
Sohl-Dickstein, J., Weiss, E., Maheswaranathan, N., and
Ganguli, S. Deep unsupervised learning using nonequi-
librium thermodynamics. In Bach, F. and Blei, D. (eds.),
Proceedings of the 32nd International Conference on Ma-
chine Learning, volume 37 of Proceedings of Machine
Learning Research, pp. 2256–2265, Lille, France, 07–
09 Jul 2015. PMLR. URL https://proceedings.
mlr.press/v37/sohl-dickstein15.html.
Song, J., Meng, C., and Ermon, S. Denoising diffusion
implicit models. In International Conference on Learning
Representations, 2020a.
Song, Y., Sohl-Dickstein, J., Kingma, D. P., Kumar, A., Er-
mon, S., and Poole, B. Score-based generative modeling
through stochastic differential equations. In International
Conference on Learning Representations, 2020b.
Strudel, R., Tallec, C., Altch ́e, F., Du, Y., Ganin, Y., Men-
sch, A., Grathwohl, W., Savinov, N., Dieleman, S., Sifre,
L., et al. Self-conditioned embedding diffusion for text
generation. arXiv preprint arXiv:2211.04236, 2022.
Sutskever, I., Vinyals, O., and Le, Q. V. Sequence to se-
quence learning with neural networks. Advances in neural
information processing systems, 27, 2014.
Vahdat, A., Kreis, K., and Kautz, J. Score-based generative
modeling in latent space. Advances in Neural Information
Processing Systems, 34:11287–11302, 2021.
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones,
L., Gomez, A. N., Kaiser, Ł., and Polosukhin, I. At-
tention is all you need. Advances in neural information
processing systems, 30, 2017.
Voita, E., Sennrich, R., and Titov, I. Analyzing the source
and target contributions to predictions in neural machine
translation. In Proceedings of the 59th Annual Meeting
of the Association for Computational Linguistics and the
11th International Joint Conference on Natural Language
Processing (Volume 1: Long Papers), pp. 1126–1140,
2021.
Wehenkel, A. and Louppe, G. Diffusion priors in variational
autoencoders. In ICML Workshop on Invertible Neural
Networks, Normalizing Flows, and Explicit Likelihood
Models, 2021.
Wiseman, S., Shieber, S. M., and Rush, A. M. Challenges in
data-to-document generation. In Proceedings of the 2017
Conference on Empirical Methods in Natural Language
Processing, pp. 2253–2263, 2017.
DINOISER: Diffused Conditional Sequence Learning by Manipulating Noises
A. Relationship Between Different Noise Schedules and Time Samplers
Generally, the training objective of diffusion models can be expressed as
Et∼r(t),(cid:15)∼N (0,I)[w(t)(cid:107)zθ − z(0)(cid:107)2
2],
where zθ is the model prediction zθ((cid:112)1 − σ2(t)z(0) + σ(t)(cid:15), t) for short.
The above expectation over timesteps can be rewritten into the expectation of noise scales as follows.
Et∼r(t),(cid:15)[w(t)(cid:107)zθ − z(0)(cid:107)2
2]
(cid:90) 1
=E(cid:15)[
0
(cid:90) 1
r(t)w(t)(cid:107)zθ − z(0)(cid:107)2
2dt]
=E(cid:15)[
ˆr(σ) ˆw(σ)(cid:107)zθ − z(0)(cid:107)2
2]
dt
dσ
=Eσ∼ U (0,1),(cid:15)[w(cid:48)(σ)(cid:107)zθ − z(0)(cid:107)2
2],
0
dσ
where w(cid:48)(σ) = w(σ−1)r(σ−1) dt
interchangeable by applying different weighting functions.
dσ . Therefore, training with different noise schedules and different time samplers is
B. More Results on Machine Translation
In order to provide references for further study and comparisons, we report more results on machine translation.
Knowledge distillation (KD). A common practice to improve the performance of non-autoregressive machine translation
is knowledge distillation (Kim & Rush, 2016; Zhou et al., 2020). We report the performance of our method trained on
distilled data of WMT14 and WMT16 on Tab. 6. The result shows that the performance gap between our method and the
autoregressive transformer is small when knowledge distillation is used. This suggests that our method is able to achieve
performance that satisfies the need of applications.
Table 6. Model performances on machine translation with knowledge distillation. The results of transformer are from raw data, while
DINOISER is trained on distilled data. The performances are measured with SacreBLEU.
Methods
DE→EN
EN→DE RO→EN
EN→RO
WMT14
WMT16
Transformer
DINOISER (LB=5, MBR=1)
DINOISER (LB=5, MBR=10)
DINOISER (LB=10, MBR=5)
30.55
30.13
30.12
30.30
26.85
25.70
25.90
25.88
33.08
32.96
33.04
33.13
32.86
32.58
32.57
32.84
Evaluation with tokenized BLEU. Some of the previous studies in machine translation reported tokenized BLEU, despite
inconsistent tokenizers (other than the standard Moses tokenizer) they might use. To help conveniently compare DINOISER
to them, we also report the performance of DINOISER with tokenized BLEU in Tab. 7.
Table 7. Tokenized BLEU of our method on machine translation datasets. We use the moses tokenizer12 for all the texts. "LB": the size
of length beam. "MBR": the number of candidates for each length beam to apply Minimum Bayes-Risk decoding. +KD means the results
are obtained with knowledge distillation.
Methods
DE→EN
EN→DE DE→EN
EN→DE RO→EN
EN→RO
IWSLT14
WMT14
WMT16
DINOISER (LB=5, MBR=1)
DINOISER (LB=5, MBR=10)
DINOISER (LB=10, MBR=5)
DINOISER + KD (LB=5, MBR=1)
DINOISER + KD (LB=5, MBR=10)
DINOISER + KD (LB=10, MBR=5)
32.23
32.48
32.25
-
-
-
25.54
25.68
25.99
-
-
-
29.35
29.53
29.40
30.64
30.62
30.76
24.43
24.45
24.48
26.08
26.29
26.04
31.21
31.39
31.50
33.21
33.29
33.40
31.18
31.29
31.27
32.57
32.59
32.89
|
|
http://arxiv.org/abs/2302.10021v2 | 2023-05-25T19:53:08 | 2023-02-20T15:07:24 | Medical Face Masks and Emotion Recognition from the Body: Insights from
a Deep Learning Perspective | The COVID-19 pandemic has undoubtedly changed the standards and affected all
aspects of our lives, especially social communication. It has forced people to
extensively wear medical face masks, in order to prevent transmission. This
face occlusion can strongly irritate emotional reading from the face and urges
us to incorporate the whole body as an emotional cue. In this paper, we conduct
insightful studies about the effect of face occlusion on emotion recognition
performance, and showcase the superiority of full body input over the plain
masked face. We utilize a deep learning model based on the Temporal Segment
Network framework, and aspire to fully overcome the face mask consequences.
Although facial and bodily features can be learned from a single input, this
may lead to irrelevant information confusion. By processing those features
separately and fusing their prediction scores, we are more effectively taking
advantage of both modalities. This framework also naturally supports temporal
modeling, by mingling information among neighboring frames. In combination,
these techniques form an effective system capable of tackling emotion
recognition difficulties, caused by safety protocols applied in crucial areas. | [
"Nikolaos Kegkeroglou",
"Panagiotis P. Filntisis",
"Petros Maragos"
] | 10.1145/3594806.3594829 | [
{
"@title": "doi",
"@href": "http://dx.doi.org/10.1145/3594806.3594829",
"@rel": "related",
"@type": null
},
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.10021v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.10021v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.CV",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.CV",
"cs.LG",
"I.4; I.5"
] | 3
2
0
2
y
a
M
5
2
]
V
C
.
s
c
[
2
v
1
2
0
0
1
.
2
0
3
2
:
v
i
X
r
a
Medical Face Masks and Emotion Recognition from the Body:
Insights from a Deep Learning Perspective
Nikolaos Kegkeroglou
National Technical University of
Athens, School of ECE
15773 Athens, Greece
[email protected]
Panagiotis P. Filntisis
Athena Research Center
Institute of Robotics
15125 Maroussi, Greece
[email protected]
Petros Maragos
National Technical University of
Athens, School of ECE
15773 Athens, Greece
Athena Research Center
Institute of Robotics
15125 Maroussi, Greece
[email protected]
ABSTRACT
The COVID-19 pandemic has undoubtedly changed the standards
and affected all aspects of our lives, especially social communica-
tion. It has forced people to extensively wear medical face masks,
in order to prevent transmission. This face occlusion can strongly
irritate emotional reading from the face and urges us to incorporate
the whole body as an emotional cue. In this paper, we conduct
insightful studies about the effect of face occlusion on emotion
recognition performance, and showcase the superiority of full body
input over the plain masked face. We utilize a deep learning model
based on the Temporal Segment Network framework, and aspire
to fully overcome the face mask consequences. Although facial
and bodily features can be learned from a single input, this may
lead to irrelevant information confusion. By processing those fea-
tures separately and fusing their prediction scores, we are more
effectively taking advantage of both modalities. This framework
also naturally supports temporal modeling, by mingling informa-
tion among neighboring frames. In combination, these techniques
form an effective system capable of tackling emotion recognition
difficulties, caused by safety protocols applied in crucial areas.
1 INTRODUCTION
The possible applications of an interface capable of assessing hu-
man emotional states are numerous. Humans generally treat com-
puter agents as they might treat other people [32]. Robots and
systems that are able to recognize, interpret and process human
affect [5], are arguably well suited to this, making the interaction
more effective and pleasant. They find fertile ground in the area of
computer-assisted education, as learning is the quintessential emo-
tional experience. A learning episode might begin with curiosity
and fascination. But as its difficulty increases, one may experience
confusion, frustration or anxiety, and thus, may abandon learn-
ing [29]. A tutoring agent, who is able to estimate the learner's
affective state, can respond appropriately and give encouraging
suggestions. Existing work has shown that robot tutors enhance
learning, by personalizing their motivational strategies to the stu-
dent's emotional behavior [13] [20]. Another crucial area is health
care, as mental health disorders, like depression and psychosis, are
on the rise across the world. Emotion recognition systems can be
an effective strategy for preventing and monitoring such disorders
[38].
While works based on facial expressions abound in the area,
recognizing affect from the body remains a less explored topic. A
study in neurobiology has shown that body movement and posture
contain useful features for recognizing human affect [8]. In other
experiments, it was shown that facial and bodily expressions work
complementary for visual perception of emotion, and in some cases
humans perceive bodily expressed emotional information as more
diagnostic than facial [2]. Furthermore, the visibility of facial cues
is not guaranteed. Bodily expression recognition becomes crucial
when facial features are occluded. Medical face masks, which are
extensively used nowadays due to the COVID-19 pandemic [6], are
the epitome of face occlusion. Because bodies are more expressive
than faces in those situations, social information can be detected
from the body instead.
Although there has been a considerable amount of research
on automatic emotion recognition in adults, the topic regarding
children has been understudied. Children go through a critical de-
velopment process and applications involving them require special
attention [31]. They also tend to fidget and move around more than
adults, leading to more self-occlusions and non-frontal head poses
[4]. This becomes even more challenging, considering the current
health and safety protocols that demand the use of face masks.
Robots can no longer rely only on facial expressions to recognize
emotion, but also have to take into account body expressions that
can stay visible and detectable, even when the face is unobservable.
Children's behavior and natural characteristics differ from adults,
so perception systems need to be specifically trained, to be able to
tackle Child-Robot Interaction (CRI) problems.
The rest of the paper is organized as follows: Section 2 discusses
related work on emotion recognition mainly from the body. Sec-
tion 3 describes the adopted deep learning-based visual emotion
recognition model in detail, as well as the tools and methods used
for the experiments. Section 4 presents the experimental results,
and lastly Section 5 provides our conclusions.
2 RELATED WORK
In recent years, deep learning methods have been very popular due
to the massive amounts of digital data in combination with pow-
erful processing hardware. Deep extracted features have yielded
excellent results and on most cases outperformed non-deep state-of-
the-art methods for the emotion recognition task. When processing
a video with emotional expressions, an essential component is cap-
turing temporal information to complement the prediction from
still images. Two-stream Convolutional Neural Network (CNN) ar-
chitectures use multi-frame optical flow to handle complex actions
like emotional expressions [34].
The most common modality used by the research community for
identifying emotion is facial expressions [21]. Some works have pro-
posed an audiovisual approach [12], where the system takes speech
as an additional input to the face, in order to tackle occlusions and
increase robustness. In [26], they utilize 3D CNNs to extract spatio-
temporal features both from face videos and audio signals, and deep
belief nets [17] for emotion recognition. However, the COVID-19
pandemic has fostered a pervasive use of medical face masks all
around the world, making a serious impact on social communica-
tion. Several studies investigated how the presence of a face mask
affects emotion recognition accuracy and revealed that it dimin-
ishes the people's ability to accurately categorize a facial expression
[6] [14]. On top of that, the mask impairs re-identification of the
same face by people [24], which suggests a need for mask-specific
model training. In [35], they also explored how masks influence the
perceived emotional profile of facial expressions. It was shown, that
it not only led to a decrease in perceived intensity of the intended
emotions, but it also resulted in an overall increase in the perceived
intensity of non-intended emotions. In [28], even super-recognizers,
people who are highly skilled and superior in recognition tasks,
were impaired by the face occlusion caused by the face mask. This
negative effect in emotional reading is not limited to adults, as it
also concerns interaction with children [7].
Motivated by all the above, we move towards incorporating bod-
ily expressed information as a major cue in the emotion recognition
task. An early work [15] combined handcrafted face and body fea-
tures at feature and decision-level for emotion classification. In
[10], a hierarchical multi-label annotation method was proposed,
which fused body skeleton with facial expressions for automatic
recognition of emotion of children during CRI scenarios. In [23],
they experimented with two bodily expression pipelines, one of
which implemented a two-stream-based CNN. The other one relied
solely on the human skeleton and utilized a spatial-temporal Graph
Convolutional Network (GCN) [37], which constructs a graph from
the human body landmarks with their natural spatial connectivity,
as well as temporally neighboring landmarks.
Along with body, context has been an additional modality in-
volved in the task of emotion recognition. In [11], RGB and flow
body streams were accompanied with a context RGB stream and a
visual-semantic embedding loss based on word embedding repre-
sentations. In [18], they proposed a network structure composed of
a GCN processing skeleton landmarks, and two 3D CNNs for RGB
body and context input. A network ensemble, including streams
that processed the body in RGB, flow and skeleton form was pro-
posed in [30]. This variety of bodily expressed cues have also been
involved in CRI emotion recognition systems [9] [25].
Our work focuses on the effect of the face occlusion on emotion
recognition performance. We adopt a proven related work model
and process only RGB input, despite the diversity of body cues
that can be conveyed. We sense that this approach suits best to our
purpose, regarding the medical face mask effect study.
3 VISUAL EMOTION RECOGNITION MODEL
In this chapter, we present the model, that will be used to tackle
the visual emotion recognition task. We discuss its structure and
benefits and also address the occuring challenges, which are taken
into account in the model's various configurations. Furthermore,
we describe the tools utilized to conduct the upcoming experiments
and some techniques to enhance model performance.
3.1 Feature Capturing
Complex actions, like emotional expressions, comprise multiple
stages spanning over a period of time and it would be quite a loss
failing to utilize them. On the other hand, each expressed emotion
is not present throughout a whole input video. These facts, indicate
that we are in need of effective general feature capturing. While
the plain CNN architecture considers the whole input sequence, as
well as each frame in the video separately, the Temporal Segment
Network (TSN) framework [36] operates on a sequence of short
snippets sparsely sampled from the entire video. Each snippet in
this sequence will produce its own preliminary prediction of the
emotion classes and then, a consensus among the snippets will
be derived as the video-level prediction. Therefore, it allows the
network to access several parts of the video, but also tackles the
inability of the former to model long-range temporal structure, thus,
being more likely to observe the corresponding expression.
3.2 Method
The overall architecture of our model is shown in Fig. 1. Formally,
given a video V , we divide it into K non-overlapping segments
{S1, S2, ..., SK }, to access several parts of the video, and transform
them into a sequence of snippets {T1,T2, ...,TK }. Each snippet Tk
is produced, by randomly sampling 3 consecutive frames from its
corresponding segment Sk , to tackle frame redundancy. Finally, a
segmental consensus function H is applied on the snippet-level
predictions produced by the backbone, to obtain the final scores S:
S = TSN(T1,T2, ...,TK ) = H (F (T1; W), F (T2; W), ..., F (TK ; W))
Here F (Tk ; W) denotes the function representing the application of
a CNN with parameters W on the snippet Tk . The CNN is equipped
with a ResNet-50 backbone architecture [16]. The consensus func-
tion H we use is average pooling and the obtained video-level
scores S are fed to a loss function L to perform the training step.
This framework offers several benefits to emotion recognition. Com-
pared to processing the entire video, the sampling process ignores
redundant information in consecutive video frames, helping avoid
overfitting, and offers a type of data augmentation, valuable for
children emotion databases of small size.
3.3 Database
We perform our experiments on the EmoReact dataset [27], which
contains 1102 videos of 63 children, aged between 4 and 14, express-
ing emotions while discussing different topics, collected from the
YouTube channel React. Each video is annotated with one or more
emotions, from a total of 8 emotion labels: Curiosity, Uncertainty,
Excitement, Happiness, Surprise, Disgust, Fear, and Frustration.
Therefore, we are dealing with a CRI binary multi-label classifi-
cation problem. In Fig. 2, we show the imbalance of EmoReact's
Figure 1: TSN-Based Model Architecture
Figure 2: EmoReact Training Set Imbalance
training set, which means it includes an unequal number of videos
for each emotion label, and is something that we must address
in our upcoming model configuration choices. We can also argue
that some emotions (Fear, Frustration, Disgust) are expressed in a
relatively low number of samples, which results in possible lack of
diversity and less ease to generalize well across unseen individuals,
introducing an extra degree of difficulty to our problem.
3.4 Medical Face Mask Effect Study
The COVID-19 pandemic has forced people to extensively wear
medical face masks, in order to prevent transmission. Motivated
by this fact, we want to conduct an experimental study about the
effect of medical face masks on emotion recognition, by applying a
relevant mask on the EmoReact children's faces, as an attempt to
simulate the face occlusion consequence.
3.4.1 Mask Application. To apply the mask, we detect the facial
surface geometry using Google's MediaPipe Face Mesh [19], an
end-to-end CNN-based model for inferring an approximate 3D
mesh representation of a human face from a single image. It uses a
(a) Original Image
(b) Mesh Tracking
(c) Mask Polygon
Figure 3: Mask Application Steps
dense mesh model of 468 vertices and is well-suited for face-based
augmented reality effects. We track the 2D coordinates of the right
and left jawline vertices, starting from just below the eyes until the
chin, and one extra vertex for the nose, in order to form a polygon
that is finally filled to represent the mask (Fig. 3). The jawlines
for the mask are created by tracking the edge x-axis vertices and
accordingly selecting among several jawline candidates, that we
manually created for this particular face mesh model 1. In Fig. 4,
we display several samples of EmoReact after the application of the
mask and showcase our tool's robustness to face orientation.
3.4.2 Body Detection. In order to incorporate bodily expressions,
we need a way to detect the human body. Google's MediaPipe also
provides human body and hand skeleton tracking tools [3] [39]. We
combine keypoints tracked by both tools and create a bounding box
with the edge points, expanded by a factor of 10% at each respective
dimension, which is then cropped as the input image. This process
is demonstrated in Fig. 5, where most background noise is removed
and full body information dominates the cropped image.
1The
application tool
the mask
https://github.com/nkegke/medical-face-mask-applier
code
for
is
publicly
available
at:
Figure 4: EmoReact Masked Samples
Figure 5: Body Detection
3.5 Modality Fusion
We are looking to take advantage of the face and body information
separately, by fusing the individual modality prediction scores with
a late fusion scheme. The full body crop includes the masked face,
and processing it as a single RGB input image can lead to irrelevant
information confusion. The proposed method is to separate the
face and body features, in order to avoid the aforementioned issue.
The core model remains as is, but now processes the face crop,
and the plain body crop with the corresponding face area blacked
out, in two separate forward passes (Fig. 6). After producing the
scores Sf and Sb from face and plain body respectively, we use a
late fusion scheme to obtain the final scores S. Finally, the overall
loss L is simply the summation of the individual modality losses:
L = Lf + Lb .
3.6 Temporal Modeling
The current TSN-based model processes only one of the N con-
secutive frames of each snippet, being heavily based on spatial
structure. This architecture naturally supports temporal modeling,
by mingling information among neighboring snippet frames with
the Temporal Shift Module (TSM) [22]. TSM can be inserted into
CNNs, to exploit temporality at zero computation and parameters.
It shifts part of the channels of the input frames and the latent
representations of each snippet along the temporal dimension, both
forward and backward, thus facilitate information exchange among
neighboring frames. Because information contained in the channels
is no longer accessible for the current frame, the spatial modeling
ability of the backbone can be harmed. To address this problem,
the module is placed inside the residual branches of the ResNet,
so the information in the original activation is still accessible after
temporal shift, through the identity mappings.
3.7 Model & Training Configurations
The model is pretrained on AffectNet, the largest facial expression
dataset. We obtain the weights of the network as provided by the
PyTorch framework, achieving 59.47% accuracy on the validation
set. Before feeding the input to the network, we rescale sampled
RGB images from full resolution to 224 × 224. We train our models
for 60 epochs, with stochastic gradient descent with momentum
0.9 and a batch size of 8, L2 regularization with weight decay 5e-4,
and start with a learning rate of 1e-2, which is then reduced by
a factor of 10 at 20 and 40 epoch milestones2. Since our task is
binary multi-label classification, our predictions are fed to a binary
cross-entropy (BCE) loss function, after suppressing the scores S to
[0,1] with a sigmoid function. BCE depends on the the label-specific
error, thus it penalizes label predictions independently. Following
prior work, the only evaluation metric that has been shown to
be robust to imbalanced datasets is the Area Under the Curve of
Receiver Operating Characteristic (ROC AUC). The scores S, of size
8 per sample, are averaged to obtain a single overall performance
metric. Instead of giving equal weight to each class, which will
over-emphasize on the typically low performance on an infrequent
class, we compute the unbalanced average, so every sample-class
pair contributes equally to the overall metric. For evaluation, we
select the epoch with the best validation ROC AUC and apply the
corresponding network on the test set, to finally report the best
overall performance achieved.
4 EXPERIMENTAL RESULTS
In this section, we present our experimental procedure and re-
sults. First, an ablation study on the number of TSN segments is
performed to explore possible trade-offs. Then, we study the medi-
cal face mask effect by comparing emotion recognition results of
masked input to when the faces are visible. We examine the case of
when the mask is applied to the image of the full body, as well as
only the face, to compare performance between input modalities.
Furthermore, visual explanation techniques are utilized to display
expressive features for different modalities and emotion categories.
Lastly, we report results given with the enhancement techniques,
both when individually utilized and when combined.
4.1 Performance vs Speed Trade-off
In Table 1, we perform an ablation study on the number of segments
and consequently the number of snippets, which are used during
the TSN training, by considering 4 different values: 1, 3, 5 and 10.
By increasing the number of segments, we significantly increase
computational load, and therefore inference and training time. On
the other hand, when we provide the model with multiple parts of
the video, it might help achieve better performance. The numbers
2The code for
the model and the experiments
https://github.com/nkegke/deep-affective-bodily-expression-recognition
is publicly available at:
Figure 6: Modality Score Late Fusion Scheme
Table 1: TSN Training Computational Load
Table 2: Mask Effect Results on Face Input
Segments
1
3
5
10
Time per Epoch (sec.)
Validation
Training
4
6
10
14
16
23
23
32
reported stand for training with a single RTX 2080 GPU, but one
could use multiple ones and increase batch size proportionally for
faster training.
4.2 Mask Effect Results
We compare emotion recognition results between default and masked
input, for face and full body crops. For face cropping, we extract
the visual face features using OpenFace [1], an open source facial
behavior analysis toolkit.
4.2.1 Mask Effect on Face Input. In Table 2, we report results on
face input. At first sight, performance drops considerably (≈ 3-4%).
This is a result we expected, as the mask covers the majority of the
face, including one of the most expressive facial features, the mouth.
Intuitively, if one would try to predict the emotions expressed
in the two images of Table 2, we sense that they would have a
better chance without the presence of the mask. Regarding the
number of segments used, performance peaks at 10, but increasing
it above 3 does not result in significant performance difference. This
means that the model does not necessarily create stronger temporal
structure when provided with more than 3 parts of the video.
4.2.2 Mask Effect on Full Body Input. Looking at Table 3, which
shows results on full body input, the first and most important
observation we make, is that performance decrease is very little
to none (0-0.4%). These results suggest that the model can exploit
body information in such a way, that even with the application
of a face mask, and consequently face information loss, it only
suffers minimal performance drop. We also note the same pattern
of performance with the masked face input results, which is better
performance as complexity goes up. However, performance increase
from 3 to 10 segments is minimal (0.1%), which again suggests
working towards the speed side of the trade-off.
4.2.3 Masked Face vs Masked Full Body Results. Lastly, in Table 4
we compare model performance with masked face versus masked
full body crop, and show that incorporating the whole body in the
Segments
1
3
5
10
ROC AUC
Default Mask
0.728
0.755
0.733
0.769
0.732
0.767
0.741
0.770
Performance
−2.7%
−3.6%
−3.5%
−2.9%
Table 3: Mask Effect Results on Full Body Input
Segments
1
3
5
10
ROC AUC
Default Mask
0.752
0.752
0.758
0.759
0.754
0.758
0.759
0.761
Performance
-
−0.1%
−0.4%
−0.2%
input gives superior results over face crop. With black we highlight
the best overall result, whereas with blue we highlight the result of
the suggested optimal model, regarding the performance vs speed
trade-off discussed earlier. The obvious conclusion is that moving
towards bodily expression recognition is our best option, when the
face is occluded. However, this is only a baseline result, which we
could build on and pursue improvements by enhancing our model.
4.3 Per Emotion Performance
In Fig. 7, we report per emotion ROC AUC and compare masked
face versus masked full body input performance. Full body outper-
forms face in all emotions, except for Excitement and Frustration.
This could be translated as these two emotions being expressed
more by facial than bodily features from the children involved and
Table 4: Masked Input Result Comparison
Segments
ROC AUC
Masked Face Masked Full Body
Performance
1
3
5
10
0.728
0.733
0.732
0.741
0.752
0.758
0.754
0.759
+2.4%
+2.5%
+2.2%
+1.8%
Happiness
Excitement
Curiosity
Frustration
Figure 8: Face Decision Regions
Happiness
Excitement
Curiosity
Frustration
Figure 9: Body Decision Regions
Figure 7: Masked Input Modality per Emotion Performance
incorporating the body in this case misleads the network. For Fear,
performance is a lot higher with full body compared to face, which
intuitively makes sense as children tend to utilize their body more
to express fear [10]. Happiness is not conventionally an emotion
with intense expressions, as most people think of just a simple
smile, which is obstructed by the mask, but the model manages to
recognize it at a decent level. Another conclusion we could come
up to is that for some emotion pairs, like Curiosity-Uncertainty
or Excitement-Surprise, which intuitively are quite similar to each
other, performance might be lower for each emotion individually,
because it is harder for the model to distinguish one from the other.
4.4 Visual Explanation
To have a better understanding of the mask effect on performance,
we utilize a technique for producing visual explanations for pre-
dictions. We wish to explore where our model focuses in the input
image and how its behaviour varies for the different emotion cate-
gory targets. The method we choose is Grad-CAM [33], which uses
the gradients of an emotion target flowing into the final convolu-
tional layer, to produce a coarse localization map that highlights the
important regions in the image for predicting that particular emo-
tion. We provide some example frames of the activation mapping,
where model focus increases from blue to red.
Starting from the face examples (Fig. 8), we can see that the
model focuses on the upper part of the face. The facial features
Happiness
Excitement
Curiosity
Frustration
Figure 10: Mixed Decision Regions
that could be utilized are the eyes (half-closed for Curiosity, wide
open for Excitement), the eyebrows (raised for Excitement), and
the forehead (frowning for Frustration).
Regarding the body examples (Fig. 9), the arms become visible
and provide information that is utilized by the model. The bodily
features that could be utilized are the hands (calm for Happiness,
aroused for Excitement, investigating for Curiosity, fist for Frus-
tration), the arms (wide open for Excitement), and the shoulders
(shrugged for Curiosity).
In Fig. 10, we present several examples where the model focuses
not only the body, but also on the face, fusing different modality
information to make predictions. This suggests that it is able to
learn both facial and bodily features in a single RGB stream.
Overall, the model has learned to ignore noisy features, like the
mask and the background. It is crucial to note, that the background
is considered noise in this dataset, as the videos were recorded in a
directed setup and it can be the same for different reaction topics.
There is also large variability introduced by differences in the chil-
dren's appearance due to clothing, body shape, size and hairstyles.
These examples specify that the model is able to overcome these
difficulties and focus on the expressive features.
4.5 Enhancement Results
We enhance the TSN-based model with the modality fusion and
temporal modeling techniques and aspire to fully overcome the
consequences of the face mask, by achieving performance as high
as with the unmasked input.
Table 5: TSN Fusion Scheme Performance Comparison
Table 7: Method Combination Performance Results
Input - 3 Segments Aggregation ROC AUC
Masked Face
Plain Body
Fusion
-
-
Maximum
Average
0.733
0.736
0.724
0.764
Table 6: TSN vs TSM Model Performance Comparison
Model
TSN
TSN
Input - 3 Segments
Masked Face
Masked Full Body
TSM
Masked Full Body
Shift ROC AUC
-
-
1/8
1/4
0.733
0.758
0.762
0.763
4.5.1 Modality Fusion. In Table 5, we report fusion results after
experimenting with two different aggregation functions: maximum
and average. We also present an extra row of the plain body input,
the performance of which is expected to be on the same scale with
the masked face. A first observation we can make is, that using max-
imum as the aggregation function gives poor results, as it is actually
outperformed by the plain body crop method. That might happen,
because we are utilizing different modality information with a sin-
gle input and wrong positive predictions (false positives) from one
modality are possibly canceling out correct negative predictions
(true negatives) from the other. On the other hand, averaging seems
a choice that blends well, as it clearly improves performance. In-
tuitively, it makes sense to have a balanced consensus between
modalities, as emotional expression cues can vary.
4.5.2 Temporal Modeling. We experiment with the originally pro-
posed channel shift fractions: 1/8 and 1/4. In Table 6, we observe
that inserting TSM improves performance slightly. Either by shift-
ing 1/4 or 1/8 of the channels, the difference is minimal. We come to
the conclusion, that spatial feature learning plays a more important
role for an emotional expression, while temporal structure is rather
complementary.
4.5.3 Method Combination. In Table 7, we report results when
combining the TSM and fusion techniques. It seems that when
utilizing both, the same conclusions as earlier apply. That means,
TSM seems to give slight temporal modeling ability to the model and
the fusion method results suggest that it effectively takes advantage
of the face and body information separately, and possibly avoids
irrelevant information confusion. The best overall performance is
0.768 ROC AUC and is achieved by the averaging fusion method,
when using TSM with 1/4 partial shift. Compared to 0.769, which
is the best face result achieved with no mask applied, reported
in Table 2, we almost fully overcome face information loss and
achieve similar performance. For reference, the last row reports
the balanced ROC AUC average result from [27], where features
extracted from [1] are used with an SVM, which our TSM Fusion
method clearly outperforms.
Model
Input - 3 Seg.
Shift Aggr.
Masked Face
TSN
TSN Masked Full Body
TSM
Fusion
TSN
[27]
Unmasked Face
-
-
1/8
1/4
-
-
-
-
Max.
Avg.
Max.
Avg.
-
-
ROC AUC
Bal.
Unb.
-
0.733
-
0.758
-
0.729
-
0.767
-
0.731
0.696
0.768
0.698
0.769
0.620
-
5 CONCLUSION
In this work, we studied the effect of face occlusion on a CRI vi-
sual emotion recognition problem. In the presence of a face mask,
performance from just the face drops considerably and urges us to
incorporate the body modality. By providing the full body image
as input, the model can sustain its performance and outperform
the masked face case. Spatial information can be instrumental and
yield great results, while temporal structure complements fittingly,
as the consensus of several video segments provides additional
emotional expression information. When enhancing the baseline
model with temporal modeling and more importantly modality
fusion, we almost fully overcome face information loss and achieve
performance similar to the unmasked input case. Our visualizations
provided insights suggesting a single RGB stream can ignore noise
and learn both from facial, as well as bodily expressive features. An
emotion recognition system with these capabilities can effectively
tackle face occlusion forced by health and safety protocols, and be
a core part of various applications in crucial areas like education
and health care, for both adults and children.
ACKNOWLEDGMENTS
This work has received funding from the European Union's Horizon
Europe research and innovation programme under grant agreement
no. 101070381 (project: PILLAR-Robots).
REFERENCES
[1] Brandon Amos, Bartosz Ludwiczuk, and Mahadev Satyanarayanan. 2016. Open-
Face: A general-purpose face recognition library with mobile applications. Technical
Report. CMU-CS-16-118, CMU School of Computer Science.
[2] Hillel Aviezer, Yaacov Trope, and Alexander Todorov. 2012. Body Cues, Not Facial
Expressions, Discriminate Between Intense Positive and Negative Emotions.
Science 338, 6111 (Nov. 2012), 1225–1229. https://doi.org/10.1126/science.1224313
[3] Valentin Bazarevsky, Ivan Grishchenko, Karthik Raveendran, Tyler Zhu, Fan
Zhang, and Matthias Grundmann. 2020. BlazePose: On-device Real-time Body
Pose tracking. https://doi.org/10.48550/ARXIV.2006.10204
[4] Tony Belpaeme, Paul Baxter, Joachim de Greeff, James Kennedy, Robin Read,
Rosemarijn Looije, Mark Neerincx, Ilaria Baroni, and Mattia Coti Zelati. 2013.
Child-Robot Interaction: Perspectives and Challenges. In Social Robotics. Springer
International Publishing, 452–459. https://doi.org/10.1007/978-3-319-02675-6_45
[5] Cynthia Breazeal. 2003. Emotion and sociable humanoid robots. International
Journal of Human-Computer Studies 59, 1-2 (July 2003), 119–155. https://doi.org/
10.1016/s1071-5819(03)00018-1
[6] Claus-Christian Carbon. 2020. Wearing Face Masks Strongly Confuses Coun-
terparts in Reading Emotions. Frontiers in Psychology 11 (Sept. 2020). https:
//doi.org/10.3389/fpsyg.2020.566886
[7] Claus-Christian Carbon and Martin Serrano. 2021.
The Impact of Face
Masks on the Emotional Reading Abilities of Children-A Lesson From a Joint
Computing Machinery, New York, NY, USA, 137–144. https://doi.org/10.1145/
2993148.2993168
[28] Eilidh Noyes, Josh P. Davis, Nikolay Petrov, Katie L. H. Gray, and Kay L. Ritchie.
2021. The effect of face masks and sunglasses on identity and expression recog-
nition with super-recognizers and typical observers. Royal Society Open Science
8, 3 (March 2021). https://doi.org/10.1098/rsos.201169
[29] Reinhard Pekrun, Thomas Goetz, Wolfram Titz, and Raymond P. Perry. 2002.
Academic Emotions in Students' Self-Regulated Learning and Achievement: A
Program of Qualitative and Quantitative Research. Educational Psychologist 37, 2
(Jan. 2002), 91–105. https://doi.org/10.1207/s15326985ep3702_4
[30] Ioannis Pikoulis, Panagiotis P. Filntisis, and Petros Maragos. 2021. Leveraging
Semantic Scene Characteristics and Multi-Stream Convolutional Architectures
in a Contextual Approach for Video-Based Visual Emotion Recognition in the
Wild. (2021). https://doi.org/10.48550/ARXIV.2105.07484
[31] J.C. Read and P. Markopoulos. 2013. Child-computer interaction. International
Journal of Child-Computer Interaction 1, 1 (Jan. 2013), 2–6. https://doi.org/10.
1016/j.ijcci.2012.09.001
[32] Byron Reeves and Clifford Nass. 1996. The Media Equation: How People Treat
Computers, Television, and New Media Like Real People and Pla. Bibliovault OAI
Repository, the University of Chicago Press (01 1996).
[33] Ramprasaath R. Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedan-
tam, Devi Parikh, and Dhruv Batra. 2016. Grad-CAM: Visual Explanations from
Deep Networks via Gradient-based Localization. (2016). https://doi.org/10.48550/
ARXIV.1610.02391
[34] Karen Simonyan and Andrew Zisserman. 2014. Two-Stream Convolutional
Networks for Action Recognition in Videos. In Proceedings of the 27th Interna-
tional Conference on Neural Information Processing Systems - Volume 1 (Montreal,
Canada) (NIPS'14). MIT Press, Cambridge, MA, USA, 568–576.
[35] Maria Tsantani, Vita Podgajecka, Katie L. H. Gray, and Richard Cook. 2022. How
does the presence of a surgical face mask impair the perceived intensity of facial
emotions? PLOS ONE 17, 1 (Jan. 2022), e0262344. https://doi.org/10.1371/journal.
pone.0262344
[36] Limin Wang, Yuanjun Xiong, Zhe Wang, Yu Qiao, Dahua Lin, Xiaoou Tang, and
Luc Van Gool. 2016. Temporal Segment Networks: Towards Good Practices for
Deep Action Recognition. In Computer Vision – ECCV 2016, Bastian Leibe, Jiri
Matas, Nicu Sebe, and Max Welling (Eds.). Springer International Publishing,
Cham, 20–36.
[37] Sijie Yan, Yuanjun Xiong, and Dahua Lin. 2018. Spatial Temporal Graph Convo-
lutional Networks for Skeleton-Based Action Recognition. https://doi.org/10.
48550/ARXIV.1801.07455
[38] Zhengyuan Yang, Amanda Kay, Yuncheng Li, Wendi Cross, and Jiebo Luo. 2020.
Pose-based Body Language Recognition for Emotion and Psychiatric Symptom
Interpretation. CoRR abs/2011.00043 (2020). arXiv:2011.00043 https://arxiv.org/
abs/2011.00043
[39] Fan Zhang, Valentin Bazarevsky, Andrey Vakunov, Andrei Tkachenka, George
Sung, Chuo-Ling Chang, and Matthias Grundmann. 2020. MediaPipe Hands:
On-device Real-time Hand Tracking. https://doi.org/10.48550/ARXIV.2006.10214
School–University Project.
https://doi.org/10.1177/20416695211038265
i-Perception 12, 4 (July 2021), 204166952110382.
[8] Beatrice de Gelder. 2009. Why bodies? Twelve reasons for including bodily
expressions in affective neuroscience. Philosophical Transactions of the Royal
Society B: Biological Sciences 364, 1535 (Dec. 2009), 3475–3484. https://doi.org/10.
1098/rstb.2009.0190
[9] Niki Efthymiou, Panagiotis P. Filntisis, Gerasimos Potamianos, and Petros Mara-
gos. 2021. A Robotic Edutainment Framework for Designing Child-Robot Interac-
tion Scenarios. In The 14th PErvasive Technologies Related to Assistive Environments
Conference (Corfu, Greece) (PETRA 2021). Association for Computing Machinery,
New York, NY, USA, 160–166. https://doi.org/10.1145/3453892.3458048
[10] Panagiotis P. Filntisis, Niki Efthymiou, Petros Koutras, Gerasimos Potamianos,
and Petros Maragos. 2019. Fusing Body Posture With Facial Expressions for Joint
Recognition of Affect in Child–Robot Interaction. IEEE Robotics and Automation
Letters 4, 4 (Oct. 2019), 4011–4018. https://doi.org/10.1109/lra.2019.2930434
[11] Panagiotis P. Filntisis, Niki Efthymiou, Gerasimos Potamianos, and Petros Mara-
gos. 2020. Emotion Understanding in Videos Through Body, Context, and Visual-
Semantic Embedding Loss. In Computer Vision – ECCV 2020 Workshops, Adrien
Bartoli and Andrea Fusiello (Eds.). Springer International Publishing, Cham,
747–755.
[12] Panagiotis P. Filntisis, Niki Efthymiou, Gerasimos Potamianos, and Petros Mara-
gos. 2021. An Audiovisual Child Emotion Recognition System for Child-Robot
Interaction Applications. In 2021 29th European Signal Processing Conference
(EUSIPCO). 791–795. https://doi.org/10.23919/EUSIPCO54536.2021.9616106
[13] Goren Gordon, Samuel Spaulding, Jacqueline Kory Westlund, Jin Joo Lee, Luke
Plummer, Marayna Martinez, Madhurima Das, and Cynthia Breazeal. 2016. Af-
fective Personalization of a Social Robot Tutor for Children's Second Language
Skills. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence
(Phoenix, Arizona) (AAAI'16). AAAI Press, 3951–3957.
[14] Felix Grundmann, Kai Epstude, and Susanne Scheibe. 2021. Face masks reduce
emotion-recognition accuracy and perceived closeness. PLOS ONE 16, 4 (April
2021), e0249792. https://doi.org/10.1371/journal.pone.0249792
[15] Hatice Gunes and Massimo Piccardi. 2007. Bi-modal emotion recognition from
expressive face and body gestures. Journal of Network and Computer Applications
30, 4 (Nov. 2007), 1334–1345. https://doi.org/10.1016/j.jnca.2006.09.007
[16] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2016. Deep Residual
Learning for Image Recognition. In 2016 IEEE Conference on Computer Vision and
Pattern Recognition (CVPR). IEEE. https://doi.org/10.1109/cvpr.2016.90
[17] Geoffrey E. Hinton, Simon Osindero, and Yee-Whye Teh. 2006. A Fast Learning
Algorithm for Deep Belief Nets. Neural Comput. 18, 7 (jul 2006), 1527–1554.
https://doi.org/10.1162/neco.2006.18.7.1527
[18] Yibo Huang, Hongqian Wen, Linbo Qing, Rulong Jin, and Leiming Xiao. 2021.
Emotion Recognition Based on Body and Context Fusion in the Wild. In 2021
IEEE/CVF International Conference on Computer Vision Workshops (ICCVW). IEEE.
https://doi.org/10.1109/iccvw54120.2021.00403
[19] Yury Kartynnik, Artsiom Ablavatski, Ivan Grishchenko, and Matthias Grund-
mann. 2019. Real-time Facial Surface Geometry from Monocular Video on Mobile
GPUs. https://doi.org/10.48550/ARXIV.1907.06724
[20] Iolanda Leite, Ginevra Castellano, André Pereira, Carlos Martinho, and Ana
Paiva. 2012. Modelling Empathic Behaviour in a Robotic Game Companion for
Children: An Ethnographic Study in Real-World Settings. In Proceedings of the
Seventh Annual ACM/IEEE International Conference on Human-Robot Interaction
(Boston, Massachusetts, USA) (HRI '12). Association for Computing Machinery,
New York, NY, USA, 367–374. https://doi.org/10.1145/2157689.2157811
[21] Shan Li and Weihong Deng. 2022. Deep Facial Expression Recognition: A Survey.
IEEE Transactions on Affective Computing 13, 3 (July 2022), 1195–1215. https:
//doi.org/10.1109/taffc.2020.2981446
[22] Ji Lin, Chuang Gan, and Song Han. 2018. TSM: Temporal Shift Module for
Efficient Video Understanding. https://doi.org/10.48550/ARXIV.1811.08383
[23] Yu Luo, Jianbo Ye, Reginald B. Adams, Jia Li, Michelle G. Newman, and James Z.
Wang. 2018. ARBEE: Towards Automated Recognition of Bodily Expression of
Emotion In the Wild. (2018). https://doi.org/10.48550/ARXIV.1808.09568
[24] Marco Marini, Alessandro Ansani, Fabio Paglieri, Fausto Caruana, and Marco
Viola. 2021. The impact of facemasks on emotion recognition, trust attribution
and re-identification. Scientific Reports 11, 1 (March 2021). https://doi.org/10.
1038/s41598-021-84806-5
[25] Elisabeta Marinoiu, Mihai Zanfir, Vlad Olaru, and Cristian Sminchisescu. 2018.
3D Human Sensing, Action and Emotion Recognition in Robot Assisted Therapy
of Children with Autism. In 2018 IEEE/CVF Conference on Computer Vision and
Pattern Recognition. IEEE. https://doi.org/10.1109/cvpr.2018.00230
[26] Dung Nguyen, Kien Nguyen, Sridha Sridharan, Afsane Ghasemi, David Dean, and
Clinton Fookes. 2017. Deep Spatio-Temporal Features for Multimodal Emotion
Recognition. In 2017 IEEE Winter Conference on Applications of Computer Vision
(WACV). 1215–1223. https://doi.org/10.1109/WACV.2017.140
[27] Behnaz Nojavanasghari, Tadas Baltrušaitis, Charles E. Hughes, and Louis-Philippe
Morency. 2016. EmoReact: A Multimodal Approach and Dataset for Recognizing
Emotional Responses in Children. In Proceedings of the 18th ACM International
Conference on Multimodal Interaction (Tokyo, Japan) (ICMI '16). Association for
|
http://arxiv.org/abs/2302.10016v1 | 2023-02-20T14:46:54 | 2023-02-20T14:46:54 | Boosting classification reliability of NLP transformer models in the
long run | Transformer-based machine learning models have become an essential tool for
many natural language processing (NLP) tasks since the introduction of the
method. A common objective of these projects is to classify text data.
Classification models are often extended to a different topic and/or time
period. In these situations, deciding how long a classification is suitable for
and when it is worth re-training our model is difficult. This paper compares
different approaches to fine-tune a BERT model for a long-running
classification task. We use data from different periods to fine-tune our
original BERT model, and we also measure how a second round of annotation could
boost the classification quality. Our corpus contains over 8 million comments
on COVID-19 vaccination in Hungary posted between September 2020 and December
2021. Our results show that the best solution is using all available unlabeled
comments to fine-tune a model. It is not advisable to focus only on comments
containing words that our model has not encountered before; a more efficient
solution is randomly sample comments from the new period. Fine-tuning does not
prevent the model from losing performance but merely slows it down. In a
rapidly changing linguistic environment, it is not possible to maintain model
performance without regularly annotating new text. | [
"Zoltán Kmetty",
"Bence Kollányi",
"Krisztián Boros"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.10016v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.10016v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.CL",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.CL",
"cs.LG"
] | Boosting classification reliability of NLP transformer models in the long
run
Zoltán Kmetty*12, Bence Kollányi1, Krisztián Boros1
1Centre for Social Sciences, CSS-RECENS Research Group, Budapest
2Eötvös Loránd University, Faculty of Social Sciences, Sociology Department, Budapest
*Corresponding author
Zoltán Kmetty, [email protected]. Centre for Social Sciences, CSS-RECENS Research Group, 1097
Budapest, Tóth Kálmán u. 4., Hungary
Introduction
A key goal of machine learning projects is some form of classification of the input data. This
classification is typically done so that both the training and the data to be classified come from
the same period and data set. In practice, however, it may often be the case that a particular
classification is extended to a different set of data and/or to a different period. The need and
the possibility to extend classification over time is strongly supported by increasing digitization
as updated datasets are more frequently available for industrial and scientific research purposes.
But how long is a classification suitable for, and when is it worth re-training our model? Since
the much-quoted Google Flu case, every researcher using machine learning knows that models
should not be blindly trusted and that it is crucial to revise them in time (Lazer et al., 2014).
The need for retraining may be particularly relevant in cases where the domain under study
changes rapidly over time. In the various natural language processing (NLP) projects, this
problem is common, as language and language use can change within a short period of time on
a given topic (Kulkarni et al., 2015). Furthermore, neural network-based black-box models
complicate the problem, as they offer little insight into how a particular classification model
works, making it harder to identify what changes in content or context might cause the model
to break down. This black-box feature is a problem with the transformer-based NLP models
currently used for classification tasks in data-mining projects.
Transformer-based machine learning models have become an important tool for many natural
language processing (NLP) tasks since the introduction of the method (Vaswani et al., 2017).
Connecting the encoder and decoder through an attention mechanism (which can capture the
meaning of an input sequence, e.g., a sentence) and effective parallelization of the training
process led to robust generalized language models. Transformer models are usually pre-trained
on a generic language corpus and can later be tuned to domain-specific tasks. These models
can be used for a wide array of general NLP tasks, from classification problems to document
summarization, sentiment analysis, and named entity recognition.
When a model is trained and fine-tuned on a range of training materials, it is often difficult to
apply it to another field (Ramponi and Plank, 2020). A growing body of literature suggests that
domain shifts affect the performance of general models. Performance can significantly drop
when a model is applied to a dataset different from the data used for pre-training, often referred
to as an out-of-distribution (OOD) dataset (Koh et al., 2021; Larson et al., 2021; Ma et al.,
2019; Wang et al., 2022).
Language models trained on general texts are often insufficient for tasks related to special
domains, such as medical texts or legal documents. The performance of Bidirectional Encoder
Representations from Transformers (BERT) can also degrade when the general model is
applied to a specific domain, so further fine-tuning is often required for specific NLP tasks.
BERT, one of the most popular transformer-based models, was originally pre-trained on the
complete Wikipedia corpus and books digitized by the Google Books project (Devlin et al.,
2018). After BERT was released as open source in 2019, researchers focusing on specific
domains created their own specialized versions of BERT by extending the base model and pre-
training their models on domain-specific text. For example, BioBERT was trained on
biomedical corpora (PubMed abstracts and full-text articles) to learn the biomedical language
(Lee et al., 2019), SciBERT was pre-trained on a random sample of 1.14 million scientific
(mainly computer science and biomedical) articles (Beltagy et al., 2019), while FinBERT was
pre-trained on a large financial corpus consisting of more than 46,000 news articles with 29
million words (Araci, 2019). These domain-specific models can be fine-tuned to downstream
NLP tasks with great success and significantly improve the performance of BERT on these
domain-specific tasks. Using a large domain-specific corpus and pre-training the model with it
is often difficult and expensive. Another approach is to pre-train the model using the training
classification dataset, which is often a much smaller corpus (Araci, 2019).
In addition to the difficulties of applying a language model to an OOD dataset (a domain
distinct from the materials used to train the model), the performance of trained language models
may also degrade over time. Measuring the robustness of such a model over time has recently
attracted considerable research attention. Measuring the performance of transfer models is
challenging because transformer models tend to overestimate their performance when the
training and evaluation periods overlap (Lazaridou et al., 2021). The literature suggests
temporal misalignment degrades performance when the testing period is temporally distant
from the training period (Luu et al., 2022; Röttger and Pierrehumbert, 2021).
Previous work also examined the changes in the language itself over time. The pace of language
change has become increasingly rapid in the context of social media (Goel et al., 2016).
Linguistic shifts can also affect the performance of classification tasks based on machine
learning. Both changes in word usage and altering the context of the same words can lead to
performance degradation (Huang and Paul, 2019). Temporal shifts have been studied in the
context of several NLP tasks, including domain classification (Huang and Paul, 2018; Agarwal
& Nenkova, 2022), named entity recognition (NER) (Rijhwani and Preotiuc-Pietro, 2020; Chen
et al., 2021), and sentiment analysis (Lukes and Søgaard, 2018).
Florio et al. (2020) evaluated the temporal robustness of an Italian version of the model BERT
and found that the model's efficiency is highly time-dependent. Although the Italian BERT
model was trained on social media data and it was fine-tuned on a labeled dataset on hate
speech, the content of the texts used for testing changed rapidly. When the temporal distance
between the training set and the test set increased, the model's precision and F1 values
decreased significantly. The authors concluded that the language of hateful content is closely
linked to current events in the news that trigger hate speech and is therefore highly sensitive to
changes over time.
Florio et al. also found that training the model repeatedly with new data significantly helps the
model to maintain its performance over time. The authors compared two different solutions to
this problem. First, they used a sliding window approach in which the model was fine-tuned
on a data set that was collected one month prior to the test data set. The other solution used an
incremental approach, meaning that the model was trained with data from all available data
before the test period so that after a longer period, data from several months were used. BERT
performed significantly better in their experiment than a Support Vector Machine (SVM)
model. It proved to be more robust and less sensitive to changes over time, even when fine-
tuned on a static dataset and not adjusted by using more recent labeled data.
We answer two research questions in this paper. On the one hand, we analyze the best
approaches to fine-tune a BERT model on a long-running classification task regarding the
temporal selection of fine-tuning data (RQ1). On the other hand, we test a particular re-
classification approach where we use comments selected by their temporal uniqueness (RQ2).
Data
This paper uses comments about COVID-19-related vaccination in Hungary collected between
September 2020 and December 2021. We used a social listening platform called SentiOne to
collect the data. SentiOne (www.sentione.com) is an international social listening software, a
content-based web analytics platform that covers and recognizes 30 languages across Europe.
It collects, indexes, and analyses online public content from social media platforms, blogs,
forums, and websites. By selecting keywords and tags used by the users, the interactive
platform returns content that is mentioned either in the text or in its metadata. We set the start
date to September 2020, as this is when the debate around Covid-19 vaccines started in
Hungary. For creating our corpus, we used keywords related to vaccination. Then, we filtered
out stop-words and used topic-modeling approaches to find the relevant content. There were
several articles that were not related to the topic in the initial corpus, for example, articles
related to animal vaccination. We retained only those articles and posts that relate to Covid-19
vaccination. The cleaned corpus consisted of about 295,152 articles and posts on social media.
In this paper, we do not use the articles themselves, just the comments under the articles and
relevant social media posts. At the comment level, we retained those comments written under
the selected articles or containing vaccination or vaccine-related keywords. The corpus
contains 8,260,808 comments from the selected period.
One of our initial project goals was to find the anti-vaccination content in the comments. To
this end, we developed a transformer-based classifier in early 2021. As the first step, the
researchers in the project coded a random sample of 1,000 comments to anti-vax and non-anti-
vax or not related to vaccination category. Based on this initial classification, we defined a set
of keywords that covered well (over 98 percent recall) the anti-vax comments (see the
supplementary for the list of keywords). In this step, we wanted to remove those comments
from the classification where we did not expect to find any anti-vax content. This method
filtered out 27.5 percent of the comments.
After filtering the comments with the keywords, we randomly selected 10,000 comments from
the pool of 1.7 million. The selected comments covered the period from September 2020 to
February 7, 2021. We double-annotated these comments to anti-vaxxer comments and pro-
vaxxer or neutral comments. In case of disagreement between annotators, a supervisor selected
the final category. The supplementary contains the details of the annotation process. The kappa
value for the inter-coder agreement was 0.73.
These manually classified 10,000 comments formed the basis for categorizing the rest of the
comment pool. For the comment categorization, we used a transformer-based NLP model
based on the Hungarian version of BERT (huBERT) (Nemeskey, 2021). The average macro-
precision of the classification was 0.79, and the recall and F1 scores were 0.78. This model was
not fine-tuned to the topic. We call this model the base model in this paper.
We continued to collect COVID-related content in the project on a daily basis and classified
the new comments using the above-described transformer model. In the last months of 2021,
we decided to run a second round of classifications to check whether our BERT classifier could
still classify the comments with high validity. In this round, we selected comments from
November 2021. To overcome the unbalanced ratio of anti-vax and non-anti-vax comments,
we increased the weighting of the anti-vax comments in this annotation round. Before
annotation, we classified the comments using our BERT classifier and selected 3,000 anti-vax
and 1,500 pro-vaxxer or neutral comments. The 4,500 comments were annotated in the same
way as in the first round of annotation. Two annotators annotated all the comments. The
annotators did not know how the BERT classifier classified the comments. If there was a
difference between the annotators, a supervisor selected the final category. The kappa value
for the inter-coder agreement was 0.63. In this paper, we use some of these annotated comments
from the second round of annotation to test the quality of the different classification approaches
(see the details in the method section).
Methods
Our primary research question (RQ1) was how we could optimize the classification of
vaccination-related comments in the long run. We use data from different periods in the first
set of tests to fine-tune the original BERT model. The classification logic was the following.
We started with the original huBERT model; then, we fine-tuned the model with non-labeled
data. After the fine-tuning, we add the labeled data from the first annotation round to the model
to learn the classification. The quality of this classification was measured on two bases. We
leave out 30 percent of the comments from the labeled training set for test purposes. These
comments cover the period from September 2020 to January 2021. The second quality check
was on the test comments selected from the second annotation round. These comments are
coming from November 2021. For the fine-tuning, we use non-labeled data from three different
periods:
● 09/2020-01/2021 – 1.3m comments
● 10/2021-11/2021 – 777k comments
● 09/2020-12/2021 – 5.5m comments
Again, we tested a different approach. We used unlabeled data from the entire period (09/2020-
12/2021) for fine-tuning, but we only allowed two epochs for the model to specify the weights;
then we used these model weights to do further fine-tuning with data from October and
November 2021. Here, we wanted to test whether it is worth combining shallow and deep
learning techniques to maximize classification quality.
In addition to testing the different fine-tuning approaches, we also measured how a second
round of annotation could boost the quality of the classification (RQ2).
We tested an optimization approach for the selection of second-round annotated comments. To
do this, we computed a weirdness statistic for all words in the comments. Weirdness is a simple
statistic on a word level, which shows the ratio of a given word between two corpora or two
time-periods (Basile, 2020). In our case, we calculated the baseline ratio of a word for the
period between September 2020 and January 2021. This is a simple division of the frequency
of the word and the total counts of all words in the selected period. We then calculated a
weirdness statistic for words on a monthly basis. We calculated the ratio of one word compared
to all words in the selected month and divided this number by the baseline ratio. This weirdness
number is one if the occurrence of a word in a month is the same as in the baseline period, and
it rises above one if the words appear more often in that month. To compute the weirdness
statistics, we used a sample of comments. We selected 40,000 comments each month and
lemmatized the texts with a Hungarian lemmatizer e-magyar (Zsibrita, 2013). We used the
lemmatized comments for the calculation.
Figure 1.A presents the weirdness value of the word "Delta" and Figure 1.B the Google
searches for this word. WHO began using the delta-variant name in June 2021. The weirdness
statistic for this word goes parallel with the number of Google searches, which started to
increase in the same month and peaked in August 2021.
Figure 1. A: Weirdness value for the word Delta. B: Google searches in Hungary for the word
Delta. C: The monthly standard deviation of the weirdness statistics
Weirdness is a perfect statistic to measure the change in our corpus compared to a previous
period. Figure 1.C shows the change in the standard deviation of the weirdness statistic. A
standard deviation of zero would mean that the word ratio in the observed month is the same
as in the baseline period. As expected, the standard deviation of the weirdness statistic was the
lowest in February 2021, the month closest to the baseline period. The standard deviation value
increased until August 2021, and then decreased. Seasonality might explain this decline in word
usage.
We calculated a comment level weirdness based on the word level weirdness statistic. It is a
simple average of the word's monthly weirdness value per comment. We use this comment
level weirdness value to select a particular sample from the second round of annotated contents
by using weirdness statistics as a weight in the sampling process. We selected 1,500 comments
based on this approach and 1,500 comments randomly from the pool of secondly annotated
comments. There was some overlap (693 comments) between the weirdness based 1,500
comments and the randomly selected 1,500 comments. Both samples were selected from the
second annotation round of annotation, covering November 2021. The 2,193 comments from
the second annotation round used for test purposes did not overlap with these samples. We used
the two samples of annotated comments to boost the classification. We added these comments
to the original training dataset and trained the models with these extended training sets. In these
tests, we used all the available unlabeled data for fine-tuning.
Results
We first present the model performance for the first period of annotation. Of the 10,000
comments annotated in the first round, we withheld 30 percent for testing and trained the
models on the remaining comments. This round of annotation covered the period between
September 2020 and January 2021. Figure 2. summarizes the results. The base huBERT model,
without any fine-tuning, achieved an F1-score of 0.65 in the anti-vaxxer category and 0.92 for
the non-anti-vaxxer and neutral comments. As expected, fine-tuning boosted the performance
of our transformer model. We obtained an F1-score of 0.73 for the anti-vaxxer comments when
we used the complete unlabeled data for fine-tuning. We obtained the same value when we
fine-tuned with data selected from the same period as the test comments, namely September
2020 to January 2021. As expected, the other models optimized for the second annotation
period achieved weaker performance in this case. The model with an extra 1,500 randomly
selected comments from the second annotation achieved almost the same low F1-score as the
base model without fine-tuning.
Figure 2. F1-score for models tested in the first period of annotation
Prior to the detailed analysis of classification performance, we examined how confident the
models in the prediction were in the case of the test dataset coming from the second annotation
period. To do this, we calculated a simple confidence value which was the absolute value of
0.5 minus the probability of anti-vaxxer classification given by the BERT model. The minimum
value of this statistic is zero, and the maximum value is 0.5. A higher value means higher model
confidence. We calculated this value for the test data and a subset of the test data with lower
and higher weirdness values (see Table 1). As expected for all the models, the confidence value
was low for comments with high weirdness and high for comments with low weirdness scores.
Our base model had the lowest confidence value. The fine-tuned model had a higher confidence
value, and the confidence value of the fine-tuned models and the models with the boosted
classification samples did not differ significantly. Without knowing the true classification
results based on model confidence, we would expect the same performance for the fine-tuned
and the extended models. As we will see in the next section, the results did not confirm this
expectation.
Base model
Fine tuned - 09/2020-01/2021
Fine tuned - 10/2021-11/2021
Fine tuned - 09/2020-12/2021
Fine tuned - 09/2020-12/2021 (2 epochs) + 10/2020-
11/2021 (deep)
Fine tuned - 09/2020-12/2021 + second annotation round
(random)
Fine tuned - 09/2020-12/2021 + second annotation round
(weirdness)
Table 1. Confidence level of models
Weird<0.9
0.39
0.44
0.42
0.43
0.44
0.41
0.44
All test data Weird>1.2
0.18
0.28
0.27
0.31
0.28
0.27
0.26
0.16
0.25
0.26
0.27
0.26
0.26
0.24
Figure 3. presents the results of the comments used to test the classification quality for
November 2021. There were 2,193 comments in the test database, none of which were used for
fine-tuning or model classification. As expected, the overall quality of classification for these
comments was much lower. The base model using annotated comments from the first period
without fine-tuning only achieved an F1-score of 0.5 for anti-vaxxers and 0.66 for the rest of
the comments. Fine-tuning without new training data did not improve the model quality for
non-anti-vaxxers and neutral comments; in some cases, it even decreased it. For the anti-vaxxer
category, fine-tuning boosted the F1 score. The model with the full unlabeled data and the
model with the combination of swallow and deep learning had the same level of performance.
The last two sets of models used classified comments from the time period of the test data. The
performance of these two models was much higher than the earlier ones, so it seems that
reclassification is inevitable for a changing corpus. The random sample from the annotated
comments performed better based on the test data, achieving higher F1-scores both for the anti-
vaxxer and the other class, so the special sampling design for the training dataset did not help
the overall classification.
Figure 3. F1-score for models tested in the second period of annotation
In the next step, we checked how the classification model worked for the comments where the
weirdness value was above 1.2 (see Figure 3.). About 10 percent of the annotated comments
were above this threshold. The test data contained 223 comments that were above the 1.2
weirdness score. As expected for most models, the classification of these comments was more
challenging than that of the "normal" comments; the model performance decreased sharply.
There was only one exception, namely the extended model with the random sample from the
second annotation. In contrast, the extended model with the sample based on weirdness
probability had a weaker F1-score for the anti-vaxxers.
Discussion
Our results confirm the general result found in the literature on fine-tuning. Domain-based fine-
tuning of transformer models can significantly improve their performance. Considering the
temporal aspect of fine-tuning, the results clearly show that the best solution is to use all
available unlabeled annotations in tuning the models (RQ1). Presumably, the more/better
principle that is generally observed in larger language models applies here.
However, fine-tuning does not protect against model performance loss, but at least slows down
the performance loss. In a rapidly changing linguistic environment, it is not possible to maintain
model performance without adding new annotations. The timing of re-annotation is not
generalizable, but indicators such as the weirdness index can help to shed light on corpus
change dynamics. An important result of our analysis is that it is not advisable to select those
comments that were less likely encountered by our model previously for new comment
annotations. A more efficient solution is to randomly select the comments from the new period.
The random sampling approach worked better than the specific weirdness-based sampling
approach, even for classifying comments with high weirdness values. In the latter case, we saw
that the model learned much worse on specific comments than on a more general training set
(RQ2).
It is also a critical result that it is difficult to say anything about the performance of the models
without repeated annotation. The confidence of the BERT models we tested was similar for
both the fine-tuned and the extended models, although the latter performed better in reality.
This model confidence can easily mislead researchers when no re-annotated data is available.
The creation of gold-standard categorizations will continue to be very important. However,
these categorizations should not only always be domain-specific, but also need to take into
account the temporal aspect. High performance of transformer models based on reinforced
learning can only be maintained if a regular reclassification phase is built into the classification
process, where the model is adapted to the new incoming data. Without this, our language
models can quickly lose their predictive power.
References
Agarwal, O., & Nenkova, A. (2022). Temporal effects on pre-trained models for language processing
tasks. Transactions of the Association for Computational Linguistics, 10, 904-921.
Araci, D. (2019). Finbert: Financial sentiment analysis with pre-trained language models. arXiv
preprint arXiv:1908.10063.
Basile, V. (2020). Domain adaptation for text classification with weird embeddings. In Proceedings of
the Seventh Italian Conference on Computational Linguistics (pp. 1-7). CEUR-ws.
Beltagy, I., Lo, K., & Cohan, A. (2019). SciBERT: A pretrained language model for scientific text. arXiv
preprint arXiv:1903.10676.
Chen, S., Neves, L., & Solorio, T. (2021). Mitigating Temporal-Drift: A Simple Approach to Keep NER
Models Crisp. arXiv preprint arXiv:2104.09742.
Devlin, J., Chang, M. W., Lee, K., & Toutanova, K. (2018). Bert: Pre-training of deep bidirectional
transformers for language understanding. arXiv preprint arXiv:1810.04805.
Florio, K., Basile, V., Polignano, M., Basile, P., & Patti, V. (2020). Time of your hate: The challenge of
time in hate speech detection on social media. Applied Sciences, 10(12), 4180.
Goel, R., Soni, S., Goyal, N., Paparrizos, J., Wallach, H., Diaz, F., & Eisenstein, J. (2016, November).
The social dynamics of language change in online networks. In International conference on social
informatics (pp. 41-57). Springer, Cham.
Huang, X., & Paul, M. (2018, July). Examining temporality in document classification. In Proceedings
of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)
(pp. 694-699).
Huang, X., & Paul, M. (2019, July). Neural temporality adaptation for document classification:
Diachronic word embeddings and domain adaptation models. In Proceedings of the 57th Annual
Meeting of the Association for Computational Linguistics (pp. 4113-4123).
Koh, P. W., Sagawa, S., Marklund, H., Xie, S. M., Zhang, M., Balsubramani, A., ... & Liang, P. (2021,
July). Wilds: A benchmark of in-the-wild distribution shifts. In International Conference on Machine
Learning (pp. 5637-5664). PMLR.
Kulkarni, V., Al-Rfou, R., Perozzi, B., & Skiena, S. (2015, May). Statistically significant detection of
linguistic change. In Proceedings of the 24th international conference on world wide web (pp. 625-
635).
Larson, S., Singh, N., Maheshwari, S., Stewart, S., & Krishnaswamy, U. (2021, September). Exploring
Out-of-Distribution Generalization in Text Classifiers Trained on Tobacco-3482 and RVL-CDIP. In
International Conference on Document Analysis and Recognition (pp. 416-423). Springer, Cham.
Lazaridou, A., Kuncoro, A., Gribovskaya, E., Agrawal, D., Liska, A., Terzi, T., ... & Blunsom, P. (2021).
Mind the gap: Assessing temporal generalization in neural language models. Advances in Neural
Information Processing Systems, 34, 29348-29363.
Lazer, D., Kennedy, R., King, G., & Vespignani, A. (2014). The parable of Google Flu: traps in big
data analysis. science, 343(6176), 1203-1205.
Lee, J., Yoon, W., Kim, S., Kim, D., Kim, S., So, C. H., & Kang, J. (2020). BioBERT: a pre-trained
biomedical language representation model for biomedical text mining. Bioinformatics, 36(4), 1234-
1240.
Lukes, J., & Søgaard, A. (2018, October). Sentiment analysis under temporal shift. In Proceedings of
the 9th workshop on computational approaches to subjectivity, sentiment and social media analysis
(pp. 65-71).
Luu, K., Khashabi, D., Gururangan, S., Mandyam, K., & Smith, N. A. (2021). Time waits for no one!
analysis and challenges of temporal misalignment. arXiv preprint arXiv:2111.07408.
Ma, X., Xu, P., Wang, Z., Nallapati, R., & Xiang, B. (2019, November). Domain adaptation with BERT-
based domain classification and data selection. In Proceedings of the 2nd Workshop on Deep
Learning Approaches for Low-Resource NLP (DeepLo 2019) (pp. 76-83).
Nemeskey, D. M. (2021). Introducing huBERT. In G. Berend, G. Gosztolya & V. Vincze (Eds.), XVII.
Magyar Számítógépes Nyelvészeti Konferencia (pp. 3-14). JATEPress.
Ramponi, A., & Plank, B. (2020). Neural unsupervised domain adaptation in NLP---a survey. arXiv
preprint arXiv:2006.00632.
Rijhwani, S., & Preoţiuc-Pietro, D. (2020, July). Temporally-informed analysis of named entity
recognition. In Proceedings of the 58th Annual Meeting of the Association for Computational
Linguistics (pp. 7605-7617).
Röttger, P., & Pierrehumbert, J. B. (2021). Temporal adaptation of BERT and performance on
downstream document classification: Insights from social media. arXiv preprint arXiv:2104.08116.
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., ... & Polosukhin, I.
(2017). Attention is all you need. Advances in neural information processing systems, 30.
Wang, J., Lan, C., Liu, C., Ouyang, Y., Qin, T., Lu, W., ... & Yu, P. (2022). Generalizing to unseen
domains: A survey on domain generalization. IEEE Transactions on Knowledge and Data
Engineering.
Zsibrita, J., Vincze, V., & Farkas, R. (2013). magyarlanc: A Toolkit for Morphological and Dependency
Parsing of Hungarian. In R. Mitkov, G. Angelova & K. Bontcheva (Eds.), Proceedings of the
International Conference Recent Advances in Natural Language Processing (RANLP 2013) (pp. 763–
771). Incoma Ltd.
Funding
The research was supported by the European Union within the framework of the RRF-2.3.1-
21-2022-00004 Artificial Intelligence National Laboratory Program.
Conflicts of Interest
The authors declare no conflict of interest.
Data availability
Raw data is not available because of copyright issues, but access can be asked from the
authors.
Ethics approval
As we did not include human subject in our research no ethical approval was needed.
Author Contributions
Conceptualization, Z.K. and B.K.; methodology, Z.K. K.B and B.K.; formal analysis, Z.K. K.B and
B.K.; data curation, K.B.; writing-original draft preparation, Z.K. and B.K.; writing-review and
editing, Z.K. and B.K; visualization, Z.K.; funding acquisition, Z.K.
Supplementary
Detailed description of the annotation
Originally in the project, the annotators coded the comments into three categories. If the comment was
clearly against vaccination by showing an intent not to get vaccinated, we have categorized it as anti-
vaxxer content. Partially anti-vaxxer contents were more challenging to grab; they are the ones who do
not reject vaccination at all but have specific concerns in different matters. Comments expressing
uncertainty toward vaccination due to the lack of transparency and necessary information regarding
vaccination were categorized as partially anti-vaxxer content. Moreover, discussions on unpredictability
regarding the efficacy or the side effects of the vaccine among different age groups or the ones
criticizing the vaccination process and the whole establishment in this context, which have an explicitly
expressed effect on vaccination attitudes, were also categorized as partially anti-vaxxer comments.
Comments expressing cherry-picking attitudes by choosing certain vaccines over other types - typically
promoting 'western' vaccines against 'eastern' products - were also put into the partial anti-vaxxer
category. The third category contains comments showing neutral and pro-vaccination attitudes.
However, seemingly non-relevant comments were added to this category since all the comments linked
to articles were collected, even if the text is not about vaccination.
The annotator agreement was relatively low for this three-category classification. In the case of the first
annotation period, the kappa value for the inter-coder agreement was 0.66. In the second annotation
period, this kappa went down to 0.53. The initial transformer model performance was also low, so we
decided to join the two anti-vaxxer categories. This paper runs all our analyses built on the two-category
classification.
Hungarian
olt
vakcina
ad
kap
orosz
kína
astra
pfizer
moderna
Szputnyik
sem
nem
%
megbízható
hatásos
veszélyes
Table S1. – Keywords for filtering anti-vax comments
English
vaccinate
vaccine
give
get
russian
chinese
astra
pfizer
moderna
sputnik
nor
not
%
trusted
effective
dangerous
Model
Base model
Fine tuned - 09/2020-01/2021
Fine tuned - 10/2021-11/2021
Fine tuned - 09/2020-12/2021
Class
Anti-vaxxer
Non anti-vaxxer,
neutral
Anti-vaxxer
Non anti-vaxxer,
neutral
Anti-vaxxer
Non anti-vaxxer,
neutral
Anti-vaxxer
Non anti-vaxxer,
neutral
Anti-vaxxer
Accura
cy
f1-
score
0,65
Precisi
on
0,66
Reca
ll
0,64
0,87
0,9
0,89
0,9
0,89
0,92
0,73
0,94
0,71
0,93
0,73
0,94
0,71
0,92
0,71
0,94
0,78
0,91
0,72
0,94
0,69
0,92
0,74
0,93
0,65
0,95
0,74
0,94
0,73
Fine tuned - 09/2020-12/2021 (2 epochs) + 10/2020-
11/2021 (deep)
Fine tuned - 09/2020-12/2021 + second annotation
round (random)
Fine tuned - 09/2020-12/2021 + second annotation
round (weirdness)
Non anti-vaxxer,
neutral
Anti-vaxxer
Non anti-vaxxer,
neutral
Anti-vaxxer
Non anti-vaxxer,
neutral
0,93
0,66
0,92
0,7
0,94
0,62
0,93
0,66
0,93
0,71
0,9
0,74
0,865
0,89
0,93
0,92
0,93
Table S2. Model performances for the first annotation round (09/2020-01/2021)
Model
Base model
Fine tuned - 09/2020-01/2021
Fine tuned - 10/2021-11/2021
Fine tuned - 09/2020-12/2021
Fine tuned - 09/2020-12/2021 (2 epochs) + 10/2020-
11/2021 (deep)
Fine tuned - 09/2020-12/2021 + second annotation
round (random)
Fine tuned - 09/2020-12/2021 + second annotation
round (weirdness)
Class
Anti-vaxxer
Non anti-vaxxer,
neutral
Anti-vaxxer
Non anti-vaxxer,
neutral
Anti-vaxxer
Non anti-vaxxer,
neutral
Anti-vaxxer
Non anti-vaxxer,
neutral
Anti-vaxxer
Non anti-vaxxer,
neutral
Anti-vaxxer
Non anti-vaxxer,
neutral
Anti-vaxxer
Non anti-vaxxer,
neutral
Accura
cy
f1-
score
0.50
Precisi
on
0.59
Reca
ll
0.44
0.60
0.61
0.57
0.61
0.61
0.78
0.66
0.53
0.66
0.57
0.58
0.57
0.64
0.56
0.65
0.70
0.83
0.62
0.60
0.64
0.59
0.80
0.45
0.73
0.54
0.69
0.57
0.73
0.81
0.69
0.73
0.46
0.75
0.44
0.80
0.46
0.79
0.46
0.77
0.68
0.85
0.55
0.70
0.75
0.70
0.8
Table S3. Model performances for the second annotation round – test data
Model
Base model
Fine tuned - 09/2020-01/2021
Fine tuned - 10/2021-11/2021
Fine tuned - 09/2020-12/2021
Fine tuned - 09/2020-12/2021 (2 epochs) + 10/2020-
11/2021 (deep)
Fine tuned - 09/2020-12/2021 + second annotation
round (random)
Fine tuned - 09/2020-12/2021 + second annotation
round (weirdness)
Class
Anti-vaxxer
Non anti-vaxxer,
neutral
Anti-vaxxer
Non anti-vaxxer,
neutral
Anti-vaxxer
Non anti-vaxxer,
neutral
Anti-vaxxer
Non anti-vaxxer,
neutral
Anti-vaxxer
Non anti-vaxxer,
neutral
Anti-vaxxer
Non anti-vaxxer,
neutral
Anti-vaxxer
Non anti-vaxxer,
neutral
Accura
cy
f1-
score
0.39
Precisi
on
0.57
Reca
ll
0.30
0.45
0.49
0.44
0.50
0.55
0.81
0.50
0.37
0.57
0.43
0.44
0.45
0.55
0.42
0.63
0.70
0.86
0.54
0.40
0.49
0.49
0.70
0.32
0.65
0.44
0.54
0.55
0.71
0.86
0.61
0.67
0.30
0.68
0.32
0.70
0.34
0.74
0.35
0.73
0.69
0.87
0.48
0.68
0.75
0.71
0.80
Table S4. Model performances for the second annotation round – test data, weirdness value
greater than 1.2
|
|
http://arxiv.org/abs/2302.09977v1 | 2023-02-20T13:45:55 | 2023-02-20T13:45:55 | Dynamic Graph Neural Network with Adaptive Edge Attributes for Air
Quality Predictions | Air quality prediction is a typical spatio-temporal modeling problem, which
always uses different components to handle spatial and temporal dependencies in
complex systems separately. Previous models based on time series analysis and
Recurrent Neural Network (RNN) methods have only modeled time series while
ignoring spatial information. Previous GCNs-based methods usually require
providing spatial correlation graph structure of observation sites in advance.
The correlations among these sites and their strengths are usually calculated
using prior information. However, due to the limitations of human cognition,
limited prior information cannot reflect the real station-related structure or
bring more effective information for accurate prediction. To this end, we
propose a novel Dynamic Graph Neural Network with Adaptive Edge Attributes
(DGN-AEA) on the message passing network, which generates the adaptive
bidirected dynamic graph by learning the edge attributes as model parameters.
Unlike prior information to establish edges, our method can obtain adaptive
edge information through end-to-end training without any prior information.
Thus reduced the complexity of the problem. Besides, the hidden structural
information between the stations can be obtained as model by-products, which
can help make some subsequent decision-making analyses. Experimental results
show that our model received state-of-the-art performance than other baselines. | [
"Jing Xu",
"Shuo Wang",
"Na Ying",
"Xiao Xiao",
"Jiang Zhang",
"Yun Cheng",
"Zhiling Jin",
"Gangfeng Zhang"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09977v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09977v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.AI"
] | Dynamic Graph Neural Network with Adaptive Edge Attributes for Air Quality Prediction
Jing Xua, Shuo Wanga,e, Na Yingb, Xiao Xiaoc, Jiang Zhanga,e, Yun Chengd, Zhiling Jinc, Gangfeng Zhanga,f,∗
aSchool of Systems Science, Beijing Normal University, Beijing, 100875, China
bChinese Research Academy of Environmental Sciences, Beijing, 100085, China
cSchool of Telecommunications Engineering, Xidian University, Xi'an, 710071, Shaanxi, China
dInformation Technology and Electrical Engineering, ETH Zurich, Zurich, 8092, Switzerland
eSwarma Research, Beijing, China
fState Key Laboratory of Earth Surface Processes and Resource Ecology, Beijing Normal University, Beijing, 100875, China
3
2
0
2
b
e
F
0
2
]
G
L
.
s
c
[
1
v
7
7
9
9
0
.
2
0
3
2
:
v
i
X
r
a
Abstract
Air quality prediction is a typical Spatio-temporal modeling problem, which always uses different components to handle spatial
and temporal dependencies in complex systems separately. Previous models based on time series analysis and Recurrent Neural
Network (RNN) methods have only modeled time series while ignoring spatial information. Previous GCNs-based methods usu-
ally require providing spatial correlation graph structure of observation sites in advance. The correlations among these sites and
their strengths are usually calculated using prior information. However, due to the limitations of human cognition, limited prior
information cannot reflect the real station-related structure or bring more effective information for accurate prediction. To this end,
we propose a novel Dynamic Graph Neural Network with Adaptive Edge Attributes (DGN-AEA) on the message passing network,
which generates the adaptive bidirected dynamic graph by learning the edge attributes as model parameters. Unlike prior informa-
tion to establish edges, our method can obtain adaptive edge information through end-to-end training without any prior information.
Thus reduced the complexity of the problem. Besides, the hidden structural information between the stations can be obtained as
model by-products, which can help make some subsequent decision-making analyses. Experimental results show that our model
received state-of-the-art performance than other baselines.
Keywords:
Air quality prediction, Adaptive graph learning, Dynamic Graph, Message Passing Neural Networks
1. Introduction
Air quality has a significant impact on our daily lives. Peo-
ple who breathe clean air sleep better and are less likely to die
prematurely from diseases such as cardiovascular and respira-
tory disorders, as well as lung cancer [1, 2]. One of the key
factors that decreases air quality is PM2.5 (atmospheric partic-
ulate matter (PM) having a diameter of 2.5 μm or less), which
can easily be inhaled and cause damage to the human body.
Thus, monitoring and forecasting the PM2.5 concentrations are
critical for improving air quality. With the rapid development
of industry, a significant amount of energy is consumed, re-
sulting in massive PM2.5 emissions [3]. According to [4], in
2016, 38 days were heavily polluted due to PM2.5 emissions in
Beijing. High PM2.5 concentrations may cause serious adverse
health impacts and diseases [5], such as cardiac and pulmonary
disease [6], detrimental effects on birth outcomes [7], and in-
fant mortality [8]. Fortunately, to monitor and record air qual-
ity data, a large number of low-cost air quality sensors have
been deployed, which makes it possible for researchers to per-
form accurate air quality prediction tasks. Accurate air quality
predictions are useful, for example, individual activity arrange-
ments and government pollution restrictions can benefit from
∗corresponding author.
Email address: [email protected] (Gangfeng Zhang)
that [9]. When the predicted PM2.5 concentrations are too high,
people can avoid going out and politicians can modify policies
accordingly.
Conventional air quality prediction approaches can be gen-
erally divided into two categories:
the knowledge-driven ap-
proach and the data-driven approach. In the past two decades,
the knowledge-driven approach has been widely adopted for
air quality prediction. The representations of this approach
include the community multiscale air quality (CMAQ) [10],
comprehensive air quality model with extensions (CAMx) [11],
weather research, and forecasting/chemistry (WRF-Chem) [12]
modeling systems. This knowledge-driven approach does not
necessitate a large number of historical observations, and its
prediction performance is determined by how well the model
fits the actual conditions. However, in the real world, air qual-
ity data change dramatically, which makes it not easy to make
this model fit the conditions. In addition, the air quality is af-
fected by various features, such as the weather, altitude, and the
wind field. Under these circumstances, the knowledge-driven
approaches often do not yield good predictions.
Recently, data-driven approaches have shown great perfor-
mance for air quality prediction. As a conventional data-driven
approach, statistical methods have been widely adopted for their
simple structure. Yi et al. [9] applied the autoregressive inte-
grated moving average (ARIMA) model to capture the trend of
air quality time series in New Delhi. Naveen et al. [13] then
adopted the seasonal autoregressive integrated moving average
(SARIMA), which can capture the seasonal feature of time se-
ries, to predict the air quality in Kerala. However, due to the
complexity and uncertainty of air quality prediction tasks, it is
difficult for the statistical methods to perform well for long-
term predictions. Different from the statistical methods, ma-
chine learning methods are non-parametric methods that can
automatically learn new patterns, and thus can handle the com-
plex non-linearity of temporal data. In recent years, machine
learning methods have been widely employed for air quality
prediction, including the support vector regression (SVR) [14],
the extreme gradient boosting (XGBoost) [15] algorithm, and
the random forest approach [16], etc. However, these methods
do not take into account the Spatio-temporal correlations and
thus limiting their prediction performance.
To extract the Spatio-temporal correlations, deep learning
methods have been applied for air quality forecasting. Wen et
al.
[17] proposed a spatiotemporal convolutional long short-
term memory (LSTM) neural network to capture the temporal
and spatial dependencies. The temporal patterns were captured
through the LSTM networks and the spatial dependencies were
extracted by the convolutional neural networks (CNNs). Zhang
et al. [18] then modeled the Spatio-temporal correlations with
the CNN model and the gated recurrent units (GRUs). The
above methods can provide satisfactory prediction results, nev-
ertheless, the CNN model is not suitable to model the non-
Euclidean structure data and thus the spatial relationships be-
tween air sensors cannot be effectively modeled.
Most recently, graph-based deep learning methods have gai-
ned popularity since they can process the non-Euclidean struc-
ture data by modeling it to a graph for training. Wang et al. [19]
and Zhang et al. [18] separately employed graph convolutional
networks (GCNs) to model the contextual relationships among
air quality stations and further predict the air quality in the fu-
ture. In a relatively short period, this modeling approach was
very successful.
Models based on GCN need to construct the graph structure
in advance. Traditional methods for constructing graph struc-
tures are usually based on prior knowledge, which can be di-
vided into three categories: methods based on geographic dis-
tance, time-series similarity [19], and wind field information
[20]. However, we cannot exhaustively enumerate all factors
previously. Besides, parallel learning of too many graphs may
result in too many parameters and high computational costs. In
conclusion, inaccurate prior information may lead us to incor-
rectly connect two unrelated stations or lose links between two
related stations. Moreover, the contextual relationships are con-
stantly changing due to the impacts of the wind fields and other
factors. Therefore, the dynamic graph is more suitable to model
the relationships among stations in the real world. To overcome
these limitations, we develop a new method that learns the dy-
namic links between two stations automatically.
In this paper, we propose to construct a Dynamic Graph
Neural Network with Adaptive Edge Attributes (DGN-AEA).
Firstly, to address the shortcomings of prior information, we
propose a method that uses self-use dynamic graph learning.
However, the dynamic adjacency matrix represents the connec-
tion relationships between nodes will change with time, which
will bring instability and difficulty to the training of the model.
So, we divide the adjacency matrix into two parts, the connec-
tion relation (topology) matrix, and the weight matrix, and pro-
pose to use an adaptive edge attributes (weights) matrix. Exper-
iments show that the adaptive edge attributes can improve the
prediction result. Secondly, in order to solve the physical con-
sistency problem of many existing deep learning models, we
designed a dynamic edge connection construction method using
wind field information and combined it with adaptive edge con-
nection through the method of multi-graph stitching. Through
this way, these learnable edges can be used as a correction of
prior information, which can help the model to get rid of the
one-sidedness of prior knowledge. Thirdly, we also calculate
the outbound and inbound directions respectively when aggre-
gating the neighbor node's information. Through this way, the
inflow and outflow processes during the diffusion of pollutants
are simulated. In summary, the contributions of this paper are
listed as follows.
• We introduce the adaptive dynamic graph learning unit
to learn the dual-path weighted edges automatically, to
solve the problem of correlation graph modeling in non-
Euclidean space.
• The wind field data can be integrated into our model as
a type of directed dynamic connection by a Multi-Graph
Process Block (MGP). The physical consistency of the
model is improved in this way.
• For each node, we calculate its in-degree and out-degree
separately to model convolution calculations on weighted
directed graphs, which is more suitable for complex sys-
tems in the real world.
• The proposed DGN-AEA model improves the prediction
capabilities and achieves state-of-the-art prediction accu-
racy.
The remainder of this paper is organized as follows.
In
Section 2, we introduce the method to construct the adaptive
dynamic graph, and our proposed DGN-AEA model. In Sec-
tion 3, we describe the data used in our research and how we
design experiments to verify the performance of DGN-AEA on
the real-world air quality dataset. In Section 4, we show results
of experiments and try to discuss what makes DGN-AEA per-
forms better. Finally, we conclude and discuss the future works
in Section 5.
2. Method used
In this section, we firstly give the mathematical definition
of the air quality prediction. Next, we describe how we con-
struct the two kinds of dynamic graphs. Then, as illustrated
in Figure 2, we introduce the DGN-AEA model which is de-
signed to solve the adaptive graph learning problem. We show
the details of how we leverage the framework of GCNs on the
2
spatial domain to handle message passing on directed edges.
We also use the spatial block Dynamic Multi-Graph Process
Block(MGP) to combine the adapted edge-attributes and the
wind graph with MLPs, and the temporal block GRU. Finally,
we form the stacked GCNs, which need spatial and temporal
blocks working together to capture the spatio-temporal depen-
dencies among cities.
Figure 1: The distribution of the observation station of the pollutant studied in
our work. Each point represents one city-level observation station.
2.1. Problem definition
Air quality prediction can be seen as a typical spatial-temporal
prediction problem. Let Xt ∈ RN denote the observed PM2.5
concentrations at time step t. The method based on GCNs
usually models the changing spatial correlations among differ-
ent cities by the dynamic directed graph G = (V, E, t), where
V is the set of nodes and it is always the number of N. Et
is the set of weighted edges representing the potential inter-
actions among cities where its weight may change over time.
Let S t ∈ RN×s denote the nodes' attribute and Zt ∈ RN×z de-
note the edges' attribute at time step t, where s and z represent
the variable dimensions of node features and edge features, re-
spectively. The problem aims to predict the next T steps of
PM2.5 concentrations [Xt+1, ..., Xt+T ]. based on the nodes' at-
tribute [S t+1, ..., S t+T ] and the edges' attributes [Zt+1, ..., Zt+T ].
The mapping among the input and output can be shown as fol-
lows:
(cid:104)
Xt; S t+1, * * * , S t+T ; Zt+1, * * * , Zt+T (cid:105) f (*)
−→
ˆXt+1, * * * , ˆXt+T (cid:105)
(1)
where ˆXt represents the predicted vector, and f (*) is the pre-
(cid:104)
diction function based on the DGN-AEA framework.
3
2.2. Dynamic graph construction
In the air quality forecasting problem, we need to predict
the future steps of all the cities. So the number of nodes will
not change with time, which is different from some evolving
dynamic graph problems [21, 22, 23].
We dfine the weighted adjacency matrix A, which it can be
divided into two parts: the topology matrix (P) of 0 or 1 indi-
cating whether two nodes are connected, and the weight matrix
(represents the edge attributes Z) indicating the strength of mu-
tual influence between nodes. When using a neural network for
training, if the adjacency matrix changes with time, it will bring
great instability during training. Therefore, we use the adaptive
edge attribute to represent this changing node interaction since
it does not change the connection relationship between nodes
but changes the strength of these connections, which means that
the topology matrix will be static but the adjacency matrix will
be dynamic. Thus, we suppose that all the correlations among
cites are decided by the Euclidean distance (Equation 4) like
many previous graph-based air quality prediction approaches.
2.2.1. Topology and adjacency matrix
As we all know, the pollutant (such as PM2.5, PM10) con-
centrations in one place are strongly affected by other adjacents.
Considering that relationships like that in real world is usually
sparse and different, to model these two spatial correlation fea-
tures explicitly, we define the adjacency matrix A of Graph G
as:
A = P (cid:12) Z,
(2)
where (cid:12) represents the Hadamard product, Z represents the
edge attributes matrix. The formulation of Z will show in the
following sections.
As to the topology metrix P, we introduce the effect of dis-
tance on site relevance for the impact of the site is inversely
proportional to the distance. And when the altitude between the
two stations is too high, the connections will also be blocked
out. To consider the above two factors, we use a Heaviside step
function to filter out the edges that do not meet the rules as fol-
lows:
Pi j = H (d − ξd) * H (a − ξa) ,
where H(*) is the Heaviside step function:
H (x) =
1, x>0
0, otherwise
,
(3)
(4)
where a represents the altitude of each node. d is the Eu-
clidean distance calculated by the relative positions between
two stations:
(cid:113)
(x1 − x2)2 + (y1 − y2)2.
d =
(5)
Here the Euclidean distance and altitude threshold ξd and ξa
equals 300km and 1.2km respectively. Here we get the topol-
ogy matrix P.
Figure 2: Model structure of proposed model DGN-AEA.
2.2.2. Node attributes
The node attributes S t are mainly meteorological data. Which
includes 17 types of variables same as [20]. We chose 8 of them
as the final node attributes: Temperature, Planetary Boundary
Layer height, K index, Relative humidity, Surface pressure, To-
tal precipitation and the u and v component of wind. The time
interval is consistent of these node attributes with the PM2.5
concentration data as 3h.
2.2.3. Edge attributes
In our work, there are two kinds of edge attributes: One is
from the wind field and another is from the adaptive neural net-
work parameter. We use the advection coefficient as attributes
from wind data and calculate it as follows:
Zt
w
= relu
(cid:12)(cid:12)(cid:12)(cid:126)vt(cid:12)(cid:12)(cid:12)
d
* cos (α − β)
,
(6)
where (cid:126)vt represents the wind speed at time t, d is the dis-
tance between stations, and α and β are angles of cities and
wind directions. relu(*) is the ReLU activation function.
a ∈ R1×l the adaptive neural network parameters, where
Zt
l represents the number of edges, i.e., the number of 1 in the
topology matrix P. We set it as one important parameter which
can be seen as another kind of useful edge attribute in addi-
tion to wind effects in the air quality prediction problem. This
parameter can be obtained by continuous iterative optimization
through the training stage.
By setting adaptive dynamic edge weights as learnable pa-
rameters, such dynamic correlations can be directly learned dur-
ing the end-to-end training process. Even in practical scenarios
where some prior information is missing, the correlation net-
work between sites can still be adaptively learned for spatio-
temporal prediction. When using wind field information, we
can consider this learnable parameter as a supplement to wind
field information. The prediction accuracy can be further im-
proved in this way. The details will be presented in Section ??.
2.3. Dynamic Graph Neural Network with Adaptive Edge At-
tributes
2.3.1. Graph convolution block
Many dynamic graph neural networks methods are based
on the spectral domain. The convolution operation on the graph
4
h!GRUCellG!"#$G%"#$Z!"#$Z%"#$X$"#$S"#$h"=X!GCN EdgeMLPNodeMLPMessageAggregateGRUCellG!"G%"Z!"Z%"S"⋯⋯⋯h!#$GCN EdgeMLPNodeMLPMessageAggregateGRUCellG!"&'#$G%"&'#$Z!"&'#$Z%"&'#$X$"#$,X$"#(,⋯,X$"#'h!#%&$MGPOut!"Out%"GraphMLPGCN EdgeMLPNodeMLPMessageAggregatecatMGPOut!"#$Out%"#$GraphMLPcatMGPOut!"&)#$Out%"&)#$GraphMLPcatS"#)is equivalent to the product in the spectral domain after the
Fourier transform. The corresponding Fourier transform ba-
sis is the eigenvector of the Laplace matrix. And the model
Chebnet [24] uses Chebyshev polynomial to approximate the
spectral convolution. However, these methods cannot handle
the directed graph since the Laplacian matrices are used for
undirected graphs [25, 26]. They are not suitable for complex
system modeling because many relations in complex systems
are directed. Besides, the prediction accuracy is limited by the
order of the Chebyshev polynomial fit, and in many cases does
not perform as well as spatial GCNs [27]. To solve these prob-
lems, we take the spatial domain GCN i.e., the Message Passing
Neural Network (MPNN) in use.
MPNN framework can be divided into two stages: message
passing stage and readout stage [28]. Compared with spectral-
domain GCN which can only model node attributes, MPNN
directly aggregates messages from neighbor nodes and can also
model edges, which makes it more flexible and intuitive. For
node i at time t, our GCN block with MPNN framework will
work as the following equations:
= (cid:104)
εt
i
ˆXt−1
i
, S t
i
(cid:105)
,
mt
i j
= φ
(cid:16)(cid:104)
i, εt
εt
j, Zt
i j
(cid:105)(cid:17)
,
et
i
= ω
(cid:88)
(cid:16)
j∈N(i)
mt
i j − mt
ji
(cid:17)
,
(7)
(8)
(9)
where [*, *] represent the concat operator that concats two
1-D vector to a single vector. Equation 7 represents the splicing
operation of neighbor information and edge connection weights.
εt
i in Equation 7 represents the result after the concatenation op-
eration of the input matrix. φ(*) in Equation 8 represents one
layer of MLP. N(i) represents the neighbours of node i. The
whole Equation 8 represents the process of aggregating neigh-
bor information according to the edge weights. mi j and m ji re-
spectively represent the in-degree and out-degree information
of the node. In Equation 9, ω (*) is another layer of MLP. After
Equation 9, we can calculate the increase and decrease after the
node's message passing process.
In our proposed method, we use two kinds of edge attributes.
For each different edge attribute, Z may represent Zw or Za, then
we can get ew and ea following Equation 9. Next, we concat the
two graph-level embeddings through the transfer layer:
(cid:16)
(cid:17)
[et
ζt = ψ
w, et
a]
It should be noted that Za is a learnable parameter in our
model, thus it will be updated through the model training stage.
After that, we can get an adaptive edge attribute ZAEA.
(10)
.
Since the PM2.5 transport graph network is a directed graph,
in order to realize the material conservation of source and sink
nodes, we calculate the message aggregation process of each
node's incoming and outgoing edges respectively. This is con-
sistent with the physical process of pollutant diffusion. It can
improve the prediction accuracy of the model. The specific cal-
culation process is shown in the following Figure 3.
Figure 3: Illustration for our used MPNN to process incoming and outgoing
edge processing separately (use node a as example). Different colors of areows
represents the import and export process separately.
2.3.2. Temporal processing block
Our model DGN-AEA in Figure 2 can be seen as the stacked
structure: it is processed by MPNN, which is good at process-
ing information on graphs, and then input the aggregated re-
sults to the GRU, which is good at iterative prediction of time
series. Such a structure can more clearly extract effective infor-
mation in the temporal and spatial domains, respectively. Here
we will introduce the temporal processing block GRU. The in-
put of GRU includes the historical PM2.5 concentrations of the
nodes and future meteorological data, which is embedded in the
node embedding εt
i. We also input the information gathered on
the graph to the GRU. The prediction process for node i at time
t is shown as follows:
(cid:105)
= (cid:104)
ζt
i , εt
i
This concatenates the input variables (results after graph
convolution and the meteorological variables) to prepare for
subsequent matrix operations:
(11)
ct
i
.
qt
i
= σ
(cid:16)
Wq *
(cid:104)
ht−1
i
, ct
i
(cid:105)(cid:17)
,
(12)
(cid:16)
Wr *
(cid:104)
ht−1
i
(cid:105)(cid:17)
,
rt
i
= σ
(13)
where qt
i and rt
, ct
i
i in Equation 12 represent the results after
operations of update gate and forget gate in GRU respectively.
σ(*) represents the sigmoid activate function. ht−1
is the hidden
i
state of the previous time step, ct
i represents the aggregated in-
put features after Equation 11. The update gate is used to con-
trol the degree to which the state information of the previous
moment is brought into the current state. The state information
brought in at the previous moment is somewhat positively re-
lated to the value of the update gate. The reset gate controls
how much information from the previous state is written to the
current candidate set (cid:101)ht
i. The smaller the reset gate, the less in-
formation from the previous state is written. (cid:101)ht
i is calculated
by:
(cid:101)ht
i
= tanh
(cid:16)
(cid:101)W *
(cid:104)
i ∗ ht−1
rt
i
, ct
i
(cid:105)(cid:17)
,
(14)
where Wq, Wr, (cid:101)W in Equation 12 to Equation 14 are learn-
able parameters. After the gate control signal is obtained, we
5
febadc+bceε!ε"ε#bceε!ε"ε#importexporta+a-a'Aaggregate&readoutMassagePassingAfter the whole operation, we finally get the prediction re-
6:
first use the reset gate to obtain the data after "reset". After the
Hadamard product operation of the reset gate rt
i and the hidden
layer information of the previous step ht−1
, then spliced the in-
put signal ct
i of the current step. Then we multiply the result of
the above operation by a learnable matrix, and then let the result
pass a tanh activation function to scale the result to the range of
[-1, 1]. As shown in Equation 14. The input information is
added to the current hidden state in a targeted manner, which is
equivalent to memorizing the state at the current moment.
i
Finally, Equation 15 performs the memory and updates op-
erations at the same time, and obtains the updated hidden layer
state:
= (cid:16)
ht
i
1 − qt
i
(cid:17)
∗ ht−1
i
+ qt
i ∗ (cid:101)ht
i,
(15)
sult of PM2.5 concentration by:
= Ω (cid:16)
(cid:17)
,
ht
i
ˆXt
i
(16)
where Ω (*) is a MLP layer.
2.3.3. Proposed learning algorithm
We use the stacked spatiotemporal prediction structure. As
shown in Figure 2, we first use MPNN to perform a convolu-
tion operation on the PM2.5 concentration of each site on the
graph according to the edge weight. Two MPNN are used to
process the wind field information map and adaptive dynamic
map respectively. Then the two graph processing results are
aggregated through a layer of MLP (as shown in Equation 7
to Equation 10). Then, the output of the entire graph convolu-
tion part and the historical meteorological data are input into
the GRU for time series iterative processing as Equation 11
to Equation 15. Finally, we get the future forecast result as
Equation 15. The whole process of the proposed DGN-AEA is
shown in Algorithm 1.
Algorithm 1 PM2.5 Prediction Algorithm
Input: Historical PM2.5 concentrations X0;
Node's attributes S = [S 1, * * * , S T ];
Edge's attributes(by wind) Zw = [Z1
Randomly initialized adaptive edge's attributes Za =
[Z1
w, * * * , ZT
w ];
a , * * * , ZT
Output: Future PM2.5 concentrations ˆX = [ ˆX1, ..., ˆX1+T ];
AEA, ..., Z1+T
Learned adaptive edge attributes ZAEA = [Z1
Evaluation metric MAE and RMSE.
ˆX0 = X0
AEA];
a ];
1:
2: h0 = 0
3: for each time step t ∈ [1, T ] do
4:
5:
for all vi ∈ V do
= ψ
= GRU(εt
ζt
i
ˆXt
i
ˆX = [ ˆX, ˆXt
MPNN1
i, ζt
ˆX0
i , S t
i, Zt
w
i , ht−1
);
(cid:16)
(cid:16)
i
i ].
(cid:17)
, MPNN2
(cid:16)
ˆX0
i , S t
i, Zt
a
(cid:17)(cid:17)
;
end for
7:
8:
9: end for
10: Calculate MAE and RMSE follow the Equation 18 and
Equation 19;
11: return ˆX, ZAEA, MAE, RMSE
where T is the length of the prediction time step, and N repre-
ˆX and X represent the predicted
sents the number of samples.
value and the ground truth of PM2.5 concentrations respectively.
To evaluate the prediction accuracy between models, we
adopt two evaluation metrics: Mean Absolute Error (MAE) and
Root Mean Square Error (RMSE).
MAE = 1
N
(cid:118)(cid:117)(cid:116)
RMS E =
×
N(cid:88)
i=1
|ˆyi − yi| ,
1
N
×
N(cid:88)
i=1
(ˆyi − yi)2,
(18)
(19)
3. Data and experiment design
In this section, we will show the details of our selected
dataset and experiment settings.
3.1. Experiment settings
Our experiments are conducted on Linux system with CPU:
Intel(R) Xeon(R) Gold 5218 CPU @ 2.30GHz and GPU: NVIDIA
Corporation Device 2204 (rev a1) The batch size of model train-
ing, validation, and test data are all 32. All models are trained
up to 50 epochs by early stop rules with 10 steps and use RM-
SProp optimizer. The learning rate is 5e-4 and weight decay is
also set to 5e-4. All the prediction results are the average result
after 10 repetitions. In the training stage, we aim to minimize
the Mean Square Error (MSE) Loss function as the following
equation:
where y is ground truth and ˆy represents the prediction re-
sults given by models. These two are commonly used indicators
to evaluate the accuracy of time series forecasting.
3.2. Data used
To examine the ability of the model to solve real problems,
we conduct experiments on the real-world datasets from the
previous work[9]. This dataset is collected from MEE1 and
EAR52. It contains three types of data: Sites' geographic infor-
mation, meteorological data, and pollutant concentration (PM2.5)
data. The last two types of variables are time series data ranging
from 2015-1-1 00:00:00 to 2018-12-31 23:59:59, with 3 hours
for each time step. The dataset includes 184 city-level observa-
tion stations as shown in previous Figure 1.
To test the predictive ability of the model under different cir-
cumstances. We divide the dataset into three parts by time. The
MS E Loss = 1
T
1
N
T(cid:88)
t=1
N(cid:88)
(cid:16)
i=1
ˆXt
i − Xt
i
(cid:17)2
,
(17)
6
1https://english.mee.gov.cn/
2https://climate.copernicus.eu/climate-reanalysis
training set of the first dataset is the data for two years in 2015
and 2016, and the test set and validation set are the data for the
whole year of 2017 and 2018, respectively. The training, vali-
dation, and testing of data set 2 were sequentially intercepted in
the winter of 2015 - 2018 for three consecutive years (Novem-
ber 1st - February 28th of the following year). This is because
winter is usually the season of high PM2.5 pollution in China,
and the average value of the data is higher. Dataset 3 uses the
2016 autumn and winter 4 months (September 1st - Decem-
ber 31st) for training, uses the winter data of the following two
months for verification (December 1st to December 31st) and
test (January 1st to January 31st of the following year). The
period of 2016 was chosen because that winter saw almost the
worst pollution in Chinese history.
3.3. Baselines
In our work, we consider baselines to examine the model
effect. Baselines include classical statistical models, classi-
cal spatio-temporal prediction models, and state-of-the-art deep
learning models with adaptive graph components.
• HA: The Historical Average (HA) model is a typical time
series analysis model, which main idea is to use the aver-
age of all the values at the corresponding time in history
(known data) as the predicted value for future. Therefore,
there is no concept of prediction time step. Here we refer
to the construction method in the article [29] to calculate
the test set, and intercept all the moments of one week to
predict the corresponding time points.
• LSTM: The long short-term memory (LSTM) [30] model
is an improvement of the RNN model, which uses three
types of gates to extract more useful related historical
data.
• GC-LSTM: GC-LSTM [31] is a model which uses two
spectral-based GCNs embedded into the long-short term
memory model to extract spatio-temporal features from
data.
• PM2.5-GNN: PM2.5-GNN [20] is a state-of-the-art pre-
diction model for PM2.5 concentrations prediction. It also
uses the stacked spatio-temporal structure based on GCNs
and RNNs.
• Graph WaveNet (w/o weather): The Graph WaveNet
[32] develops a novel adaptive dependency matrix, which
can automatically capture the spatial dependency from
It uses Temporal Convolutional Network (TCN)
data.
as the temporal block.
It has achieved state-of-the-art
results in many real-world datasets, especially in traf-
fic flow forecasts. Since the original model uses one-
dimensional convolution to operate on only one variable,
we do not use multi-dimensional meteorological infor-
mation when reproduce the model. Results will shown in
Section 2.
3.4. Ablation Study
In order to further illustrate the role of the adaptive dynamic
edge attribute, we compare the results with models with some
parts removed, which are:
• Static: To demonstrate the role of dynamic graphs, we
conduct experiments using only static graph structures
based on distance and altitude calculations.
• Only AEA: As described before, DGN-AEA integrates
wind edge information. Here the wind information is re-
moved and only adaptive edge attributes are used. This
can illustrate the important role of wind in modeling PM2.5
forecasting.
• Only Wind: Contrary to Only AEA, here we only use
the wind field information and remove the adaptive edge
attributes. Similar to the control variables approach, this
can illustrate the importance of using adaptive edge at-
tributes.
• W/O weather: Here we also compare the effect of not
inputting the future weather GRU module as known in-
formation to illustrate the effect of using future weather.
• AEA+Wind(ours): As shown in Figure 2, we will use
the multi-graph information of adaptive edge attributes
and wind at the same time.
4. Results and discussion
4.1. Performance comparisions with baselines
We compare the prediction results with the evaluation met-
ric between our DGN-AEA and baselines in all three datasets.
In addition, we set different prediction horizon time steps with
3 (9h), 6 (18h), 12 (36h), and 24 (72h) so that we can compare
the predictive ability of various models under different time pre-
diction lengths. The best results are highlighted in bold-face in
Table 1.
We divided the data into three datasets. By designing the
number of samples and seasons of the training set dataset, it can
be considered that the training difficulty on the three datasets is
increasing. The training set of data set 3 has the least data and
the corresponding value is large, since winter is the high season
of haze in China, the value of PM2.5 is generally higher.
It can be seen that our model always performs the best and
the traditional statistical model HA is not always the worst.
GC-LSTM performs a little better than LSTM, nevertheless,
it does not perform well on our dataset overall. In dataset 3,
our model DGN-AEA improves the RMSE of GC-LSTM by
6.81%, 6.11%, 5.04%, and 6.7%, respectively. PM2.5-GNN per-
forms better than other baselines, but our model is more accu-
rate. On the RMSE of dataset3, DGN-AEA is 2.98%, 2.94%,
2.46%, 6.3% more accurate than PM2.5-GNN.
Compared with another adaptive graph model, Graph WaveNet
requires a large number of parameters and has a high com-
putational resource overhead, so the training is slow.
Its ef-
fect is also not good. Compared with Graph WaveNet, our
7
Table 1: Prediction accuracy compared with baselines.
Dataset
Methods
Metric
HA
LSTM
GC-LSTM PM2.5-GNN DGN-AEA
1
t
e
s
a
t
a
D
2
t
e
s
a
t
a
D
3
t
e
s
a
t
a
D
RMSE
MAE
RMSE
MAE
RMSE
MAE
3
6
12
24
3
6
12
24
3
6
12
24
3
6
12
24
3
6
12
24
3
6
12
24
25.81
37.26
52.21
35.84
42.33
29.31
12.17±0.10
15.61±0.11
18.56±0.11
20.87±0.16
9.43±0.09
12.44±0.12
14.88±0.14
16.48±0.15
18.01±0.17
23.55±0.22
28.60±0.23
32.82±0.27
14.01±0.15
18.90±0.19
23.14±0.21
26.61±0.32
26.43±0.36
33.87±0.41
40.98±0.55
45.08±1.02
20.52±0.28
27.14±0.40
33.16±0.59
36.89±1.01
12.03±0.07
15.40±0.07
18.38±0.09
20.81±0.09
9.31±0.06
12.25±0.06
14.69±0.10
16.45±0.08
18.30±0.11
23.65±0.19
28.547±0.17
33.03±0.33
14.21±0.08
18.95±0.19
22.96±0.16
26.37±0.36
26.56±0.20
34.06±0.27
40.84±0.66
44.86±0.70
20.63±0.18
27.23±0.23
32.92±0.58
36.62±0.73
11.55±0.11
14.76±0.10
17.70±0.15
20.18±0.17
8.93±0.05
11.70±0.10
14.11±0.17
15.90±0.19
17.61±0.17
22.94±0.24
27.52±0.30
31.70±0.29
13.70±0.15
18.38±0.23
25.26±0.41
25.26±0.41
25.51±0.32
32.95±0.33
39.76±0.71
45.04±0.88
19.84±0.27
26.37±0.32
32.14±0.74
36.23±0.99
11.34±0.07
14.53±0.09
17.06±0.11
19.20±0.15
8.75±0.05
11.50±0.08
13.56±0.11
15.06±0.14
17.15±0.07
22.29±0.09
26.85±0.11
30.79±0.20
13.33±0.06
17.83±0.09
21.60±0.10
24.45±0.22
24.75±0.17
31.98±0.36
38.78±0.27
42.18±0.84
19.22±0.14
25.53±0.34
31.19±0.24
34.08±0.78
Figure 4: Future PM2.5 concentrations predicted by DGN-AEA.
proposed model DGN-AEA improves the RMSE of dataset 3
by 47.46%, 45.32%, 44.56%, 43.98%, and 38.08%, 36.05%,
37.61%, 36.99% on MAE. We speculate that it may be due
to the construction of the adjacency matrix that changes from
time to time brings great difficulty to training on PM2.5 datasets,
making it difficult for the model to grasp the exact topology of
8
(a) ground truth
(b) predict result
Figure 5: Visualization of forecast results in the Yangtze River Delta region. The data is derived from dataset 3 with 24 prediction horizon time steps. (The unit is
μg/m3)
(c) error between the two
the stations.
The prediction fit curves of Linan are also plotted in Fig-
ure 4.
The above results are the average of the whole map and fit
curves for individual cities. In order to examine the prediction
ability of the model at the local regional scale, we select the
ground truths and predicted results of the Yangtze River Delta
region for a continuous period of time to visualize. The result
is shown in the figure 5.
4.2. The function of dynamic graph
To explain why we choose to retain two types of graph
edges, we conduct ablation studies to explore the predictive ef-
fects of using different edges. We find that our proposed model
is the best in most cases, regardless of the dataset or prediction
at any time scale (Table 2).
We can see that the models where we do not use dynamic
information perform worse than the dynamic graph method in
the vast majority of cases.
In addition, the prediction accuracy of Only Wind and Only
AEA are similar, and in most cases Only AEA has even better
MAE and RMSE metrics. Especially in Dataset 3, our proposed
DGN-AEA has an average of 4.3%,4.7%, 3.4%, 7.8% MAE
metric decrease than the other two dynamic edge attribute.
4.3. The function of future weather
Our model uses future weather data as known for future air
quality prediction. We compare DGN-AEA and DGN-AEA
(w/o weather) models respectively. As shown in Figure 6, by
using future meteorological data, the prediction accuracy can be
improved by 8.87%, 11.76%, 13.65%, 15.15% on RMSE and
9.13%, 12.30%, 15.54%, 17.76% on MAE. This shows that it
is very useful to use future weather data.
We compared our results with another another adaptive graph
model without future weather, Graph WaveNet. Graph WaveNet
requires a large number of parameters and has a high com-
9
Dataset
Methods
Metric
Only Wind
Only AEA
Static
W/O weather AEA+Wind
Table 2: Result of ablation study.
1
t
e
s
a
t
a
D
2
t
e
s
a
t
a
D
3
t
e
s
a
t
a
D
RMSE
MAE
RMSE
MAE
RMSE
MAE
3
6
12
24
3
6
12
24
3
6
12
24
3
6
12
24
3
9
12
24
3
6
12
24
11.55±0.05
14.76±0.10
17.70±0.15
20.18±0.17
8.93±0.05
11.70±0.10
14.11±0.17
15.90±0.19
17.61±0.17
22.99±0.21
27.60±0.30
31.70±0.29
13.70±0.15
18.41±0.20
22.26±0.32
25.26±0.41
25.51±0.32
32.95±0.33
39.10±0.63
43.44±0.42
19.84±0.27
26.37±0.32
31.54±0.64
35.72±0.45
11.38±0.04
14.55±0.06
17.36±0.07
19.78±0.09
8.78±0.04
11.51±0.06
13.79±0.08
15.55±0.09
17.60±0.14
23.02±0.20
27.71±0.25
31.50±0.33
13.69±0.13
18.45±0.20
22.37±0.23
25.06±0.31
25.32±0.23
32.74±0.46
39.26±0.26
42.83±0.52
19.68±0.20
26.17±0.45
31.51±0.28
35.08±0.53
11.58±0.08
14.72±0.09
17.51±0.13
19.80±0.19
8.95±0.06
11.68±0.08
13.97±0.13
15.60±0.19
17.35±0.16
22.34±0.08
27.15±0.13
31.49±0.34
13.69±0.13
18.67±0.08
22.35±0.14
24.81±0.33
24.80±0.28
32.13±0.22
39.31±0.41
42.32±0.77
19.26±0.24
25.63±0.22
31.72±0.42
34.58±0.79
13.03±0.06
17.08±0.07
20.78±0.10
24.41±0.08
10.14±0.05
13.73±0.06
16.90±0.11
18.84±0.09
19.62±0.04
26.17±0.03
32.87±0.07
38.89±0.08
15.31±0.04
21.12±0.03
26.99±0.08
31.94±0.11
27.16±0.05
36.12±0.14
44.91±0.13
49.71±0.11
21.15±0.05
29.11±0.14
36.93±0.16
41.44±0.13
11.34±0.06
14.53±0.09
17.06±0.11
19.20±0.15
8.75±0.05
11.50±0.08
13.56±0.11
15.06±0.14
17.15±0.07
22.29±0.09
26.85±0.11
30.79±0.20
13.33±0.06
17.83±0.09
21.60±0.10
24.45±0.22
24.75±0.17
31.98±0.36
38.78±0.27
42.18±0.84
19.22±0.14
25.53±0.34
31.19±0.24
34.08±0.78
putational resource overhead, so the training is slow. Whats
more, because the TCN model used by the time series module
of Graph WaveNet can only perform convolution operations on
one-dimensional variables, it cannot input future weather data.
Compared with Graph WaveNet, our proposed model DGN-
AEA(w/o weather) improves the RMSE of dataset 3 by 42.35%,
38.25%, 35.80%, 33.98%, and 31.86%, 27.10%, 26.13%, 23.39%
on MAE. We speculate that it may be due to the construction
of the adjacency matrix that changes from time to time brings
great difficulty to training on PM2.5 datasets, making it difficult
for the model to grasp the exact topology of the stations.
4.4. Comparison of two attributes
Following the above steps, we can get two kinds of graph
edge attributes: one can be calculated by wind field data, and
another can be learned after training. To get through the differ-
ence and explain why the adaptive edge attribute is useful, we
visualize both of them at the same time step shown in Figure 7.
some analytical methods and indicators in the field of complex
networks. We listed in the supplementary information.
We separately count the sum of the weights on the incoming
and outgoing edges of different nodes and calculate the total
weight of the connected edges minus the total weight of the
incoming and outgoing edges. The positive or negative value of
this difference indicates that the node belongs to the type that is
more affected by the surroundings or has a greater influence on
the surrounding (Figure Appendix E). At the same time, we can
also compare the relationship between edge weights and degree
(Equation E.1), and the relationship between edge weights and
the degree centrality (Equation E.2) of the complex network.
Shown in Figure E.9 and Figure E.10. We see a clear positive
correlation between node weight and degree value. However,
there is no obvious correlation between node degree centrality
and degree value.
5. Conclusions
4.5. Complex network analysis on the learned adaptive edges
With DGN-AEA, an adaptive correlation network structure
can be obtained after the training phase. The properties of the
obtained correlation network can be discussed with the help of
In this paper, we propose a flexible Dynamic Graph Neural
Networks with Adaptive Edge Attributes (DGN-AEA) based
on the spatial domain. This method retains edges by the wind
to follow the basic prior physical knowledge of air pollution
transmission. At the same time, we calculate the transmission
10
(a) MAE on Dataset 1
(b) MAE on Dataset 2
(c) MAE on Dataset 3
(d) RMSE on Dataset 1
(e) RMSE on Dataset 2
(f) RMSE on Dataset 3
Figure 6: Comparison among DGN-AEA, DGN-AEA (w/o weather) and Graph WaveNet(w/o weather) models. The results are the average of ten training sessions.
(a) adaptive edge attributes
(b) edge attribute by wind
(c) The transpose of the upper triangle matrix of the
adaptive edge attributes matrix minus the value of the
lower triangle.
Figure 7: Difference between the two matrices use in our model.
volume on the outgoing edge and incoming edge respectively
when doing message transmission and aggregation to the nodes,
which simulates the law of conservation of matter in the trans-
port and diffusion of pollutants to some extent. Besides, we fuse
adaptive edge attributes by means of the multi-graph structure.
Experiment results show that our model achieves a better level
of prediction effect on the real world PM2.5 dataset.
In this way, we can adaptively learn the correlation between
real sites and obtain better time series prediction results. How-
ever, how much of the network relationship in the real world
can be restored in real data sets by this way of adaptively con-
structing learnable parameters is also worth exploring. There
are still some ideas of network reconstruction methods that may
be worth learning from.
Acknowledgment
This work was supported by the National Natural Science
Foundation of China (NO.42101027). We thank the support
from the Save 2050 Program jointly sponsored by Swarma Club
and X-Order.
Appendix A. Related Work about Air Quality Prediction
Air quality prediction issues have been studied for years.
These issues were first studied by some conventional statis-
11
9h18h36h72hPrediction Time Steps0510152025MAEDGN-AEADGN-AEA(w/o weather)Graph WaveNet(w/o weather)9h18h36h72hPrediction Time Steps010203040MAEDGN-AEADGN-AEA(w/o weather)Graph WaveNet(w/o weather)9h18h36h72hPrediction Time Steps01020304050MAEDGN-AEADGN-AEA(w/o weather)Graph WaveNet(w/o weather)9h18h36h72hPrediction Time Steps05101520253035RMSEDGN-AEADGN-AEA(w/o weather)Graph WaveNet(w/o weather)9h18h36h72hPrediction Time Steps0102030405060RMSEDGN-AEADGN-AEA(w/o weather)Graph WaveNet(w/o weather)9h18h36h72hPrediction Time Steps010203040506070RMSEDGN-AEADGN-AEA(w/o weather)Graph WaveNet(w/o weather)015304560759010512013515016518001530456075901051201351501651800.10.00.10.20.30.40.50.60.7015304560759010512013515016518001530456075901051201351501651800.10.00.10.20.30.40.50.60.7015304560759010512013515016518001530456075901051201351501651800.60.40.20.00.20.40.6tical methods, e.g., autoregressive integrated moving average
(ARIMA) [9, 33]. However, there are too much uncertainty
and non-linearity in air quality prediction, which is not suitable
for these statistical models to achieve high prediction accuracy
for long-term prediction.
Machine learning methods make use of historical obser-
vations to perform accurate predictions. Liu et al. [14] pro-
posed a multi-dimensional collaborative support vector regres-
sion (SVR) model for air quality index (AQI) forecasting in the
Jingjinji region while considering the weather conditions. Dun
et al. [34] adopted the linear regression (LR) and SVR method
for short-term air quality prediction. Liu et al. [35] fused the
principal component regression (PCR), SVR, and autoregres-
sive moving average (ARMA) models to predict the air quality
with six different kinds of pollutants. However, these machine
learning methods did not capture the spatio-temporal correla-
tions and thus limiting the prediction performance.
In recent years, deep learning methods are widely employed
in air quality prediction issues due to their high prediction ac-
curacy. Ma et al. [36] propose a transfer learning-based stacked
bidirectional long short-term memory (LSTM) model which
combined deep learning and transfer learning strategies to pre-
dict the air quality of some stations based on the data observed
by other stations. Wen et al.
[17] proposed a spatiotempo-
ral convolutional long short-term memory neural network to
capture the temporal and spatial dependencies with LSTM and
convolutional neural networks (CNNs), respectively. Zhang et
al. [18] proposed a hybrid model (MTD-CNN-GRU) for PM2.5
concentration prediction. In the MTD-CNN-GRU model, the
CNNs were employed to extract the spatial relationships and the
gated recurrent units (GRUs) were applied to capture temporal
features.
In this way, they could capture the spatio-temporal
correlations to achieve higher prediction accuracy.
Appendix B. Related Work about Graph-based Prediction
Methods
Conventional deep learning methods are not suitable for
data processing in non-Euclidean space, which can not model
the spatial correlations very well. To solve the problem, graph-
based deep learning methods are proposed and have been widely
applied to air quality forecasting these years. Wang et al. [19]
proposed an Attentive Temporal Graph Convolutional Network
(ATGCN) for air quality prediction. The ATGCN encoded three
types of relationships among air quality stations including spa-
tial adjacency, functional similarity, and temporal pattern sim-
ilarity into graphs and aggregated features using gated recur-
rent units (GRUs). Finally, a decoder was designed to con-
duct multi-step predictions. Qi et al.
[31] then proposed a
GC-LSTM model which combined the graph convolutional net-
works (GCNs) and LSTM to capture spatial terms and tempo-
ral attributes and predict the future PM2.5 concentrations. Wang
et al. [20] proposed a PM2.5-GNN model, which incorporated
the domain knowledge into graph-structure data to model long-
term spatio-temporal dependencies, for PM2.5 concentrations
prediction. Since multiple features were considered, this model
could achieve excellent prediction performance, especially for
long-term predictions.
Appendix C. Related Work about Dynamic Graph Models
Recently, to better model contextual information, dynamic
graph models have been employed by some researchers. Zhou
et al.
[37] modeled a dynamic directed graph based on the
wind field among the air quality stations. They then used the
GCNs to capture the dynamic relationships among the stations
and applied a temporal convolutional network (TCN) to pre-
dict the PM2.5 concentrations. Diao et al. [38] employed a dy-
namic Laplacian matrix estimator to model the dynamic graph,
which can better model the spatial dependencies. Based on the
dynamic estimator, they proposed a dynamic spatio-temporal
graph convolutional neural network for traffic forecasting and
outperformed the baselines. Peng et al. [39] employed the rein-
forcement learning to generate dynamic graphs and combined
the graphs with the LSTM model for long-term traffic flow pre-
diction. They further proved that dynamic graphs reduced the
effects of data defects with extensive experiments.
Appendix D. Related Work about Adaptive Graph Learn-
ing Models
To overcome the limitations of prior information, Wu et al.
[32] developed an adaptive dependency matrix through node
embedding to capture the hidden spatial dependency in the data.
And the model Multivariate Time Series Forecasting with Graph
Neural Networks (MTGNN) [40] also used this method to ex-
tract the uni-directed relations among variables. However, this
method of changing the adjacency matrix with the time of the
event will bring a lot of interference information to the training
of the model, thereby affecting the accuracy of the prediction.
Therefore, Graph WaveNet does not perform well on real air
quality prediction datasets.
Appendix E. Figures and Equations
Figure E.8: Cities sorted by the multiply of sum(in-weight) and sum(out-
weight). The left red colored cities means they are attend to inflect their neigh-
bors, and the right blue ones are just the opposite.
12
-15-10-50510JiangyinWuhuTangshanXingtaiXuanchengFuyangChangzhouJiaozuoZhangzhiZhangshaWuhaiNantongRizhaoEnshizhouShizuishanTianjinLiyangJiujiangHezeBaotouMeishanYibinGuyuanDeyangLaixiXianLuoyangXiangfanYunchengSuqianYueyangPingduYananEzhouChangdeHebiTonglingShangluoJimoAnkangLiuanSuiningXuchangZhoukouLianyungangYixingcitiesmultiplyofsum(inweight)andsum(outweight)role of urbanization in aggravating the health burden, Science of the Total
Environment 652 (2019) 683–695.
[6] B. Leclercq, J. Kluza, S. Antherieu, J. Sotty, L. Alleman, E. Perdrix,
A. Loyens, P. Coddeville, J.-M. L. Guidice, P. Marchetti, et al., Air
pollution-derived PM2.5 impairs mitochondrial function in healthy and
chronic obstructive pulmonary diseased human bronchial epithelial cells,
Environmental pollution 243 (2018) 1434–1449.
[7] X. Sun, C. Liu, Z. Wang, F. Yang, H. Liang, M. Miao, W. Yuan, H. Kan,
Prenatal exposure to residential PM2.5 and anogenital distance in infants
at birth: A birth cohort study from shanghai, china, Environmental Pollu-
tion 264 (2020) 114684.
[8] G. Li, L. Li, D. Liu, J. Qin, H. Zhu, Effect of PM2.5 pollution on perinatal
mortality in china, Scientific Reports 11 (1) (2021) 1–12.
[9] X. Yi, J. Zhang, Z. Wang, T. Li, Y. Zheng, Deep distributed fusion
network for air quality prediction, in: Proceedings of the 24th ACM
SIGKDD international conference on knowledge discovery & data min-
ing, 2018, pp. 965–973.
[10] B. N. Murphy, C. G. Nolte, F. Sidi, J. O. Bash, K. W. Appel, C. Jang,
D. Kang, J. Kelly, R. Mathur, S. Napelenok, et al., The detailed emissions
scaling, isolation, and diagnostic (desid) module in the community multi-
scale air quality (cmaq) modeling system version 5.3, Geosci. Model Dev.
Discuss 2020 (2020) 1–28.
[11] M. Ibrahim, Air quality analyses for photochemical smog associated with
atmospheric aerosol particles and ozone precursors using cmaq and camx
modeling systems, International Journal of Scientific Research in Science
and Technology (2019) 224–235.
[12] J. Hong, F. Mao, Q. Min, Z. Pan, W. Wang, T. Zhang, W. Gong, Improved
PM2.5 predictions of wrf-chem via the integration of himawari-8 satel-
lite data and ground observations, Environmental Pollution 263 (2020)
114451.
[13] V. Naveen, N. Anu, Time series analysis to forecast air quality indices in
thiruvananthapuram district, kerala, india, International Journal of Engi-
neering Research and Application 7 (6) (2017) 66–84.
[14] B.-C. Liu, A. Binaykia, P.-C. Chang, M. K. Tiwari, C.-C. Tsao, Urban
air quality forecasting based on multi-dimensional collaborative support
vector regression (svr): A case study of beijing-tianjin-shijiazhuang, PloS
one 12 (7) (2017) e0179763.
[15] B. Pan, Application of xgboost algorithm in hourly pm2. 5 concentration
prediction, in: IOP conference series: Earth and environmental science,
Vol. 113, IOP publishing, 2018, p. 012127.
[16] R. Yu, Y. Yang, L. Yang, G. Han, O. A. Move, Raq–a random forest ap-
proach for predicting air quality in urban sensing systems, Sensors 16 (1)
(2016) 86.
[17] C. Wen, S. Liu, X. Yao, L. Peng, X. Li, Y. Hu, T. Chi, A novel spatiotem-
poral convolutional long short-term neural network for air pollution pre-
diction, Science of the total environment 654 (2019) 1091–1099.
[18] Q. Zhang, S. Wu, X. Wang, B. Sun, H. Liu, A PM2.5 concentration pre-
diction model based on multi-task deep learning for intensive air quality
monitoring stations, Journal of Cleaner Production 275 (2020) 122722.
[19] C. Wang, Y. Zhu, T. Zang, H. Liu, J. Yu, Modeling inter-station relation-
ships with attentive temporal graph convolutional network for air quality
prediction, in: Proceedings of the 14th ACM International Conference on
Web Search and Data Mining, 2021, pp. 616–634.
[20] S. Wang, Y. Li, J. Zhang, Q. Meng, L. Meng, F. Gao, PM2.5-gnn: A do-
main knowledge enhanced graph neural network for PM2.5 forecasting,
in: Proceedings of the 28th International Conference on Advances in Ge-
ographic Information Systems, 2020, pp. 163–166.
[21] A.-L. Barab ́asi, R. Albert, Emergence of scaling in random networks, sci-
ence 286 (5439) (1999) 509–512.
[22] J. Leskovec, J. Kleinberg, C. Faloutsos, Graphs over time: densification
laws, shrinking diameters and possible explanations, in: Proceedings of
the eleventh ACM SIGKDD international conference on Knowledge dis-
covery in data mining, 2005, pp. 177–187.
[23] J. You, R. Ying, X. Ren, W. Hamilton, J. Leskovec, Graphrnn: Gener-
ating realistic graphs with deep auto-regressive models, in: International
conference on machine learning, PMLR, 2018, pp. 5708–5717.
[24] M. Defferrard, X. Bresson, P. Vandergheynst, Convolutional neural net-
works on graphs with fast localized spectral filtering, Advances in neural
information processing systems 29 (2016).
[25] Z. Tong, Y. Liang, C. Sun, D. S. Rosenblum, A. Lim, Directed graph
convolutional network, arXiv preprint arXiv:2004.13970 (2020).
Figure E.9: Relationships between degree centrality and connection weights.
Figure E.10: Relationships between degree and connection weights.
CD (Ni) =
g(cid:88)
J=1
xi j (i (cid:44) j)
C(cid:48)D (Ni) = CD (Ni)
g − 1
(E.1)
(E.2)
References
[1] P. Strøm-Tejsen, D. Zukowska, P. Wargocki, D. P. Wyon, The effects of
bedroom air quality on sleep and next-day performance, Indoor air 26 (5)
(2016) 679–686.
[2] T. Vandyck, K. Keramidas, A. Kitous, J. V. Spadaro, R. Van Dingenen,
M. Holland, B. Saveyn, Air quality co-benefits for human health and
agriculture counterbalance costs to meet paris agreement pledges, Nature
communications 9 (1) (2018) 1–11.
[3] H. Zhang, S. Wang, J. Hao, X. Wang, S. Wang, F. Chai, M. Li, Air pol-
lution and control action in beijing, Journal of Cleaner Production 112
(2016) 1519–1527.
[4] L. Li, Y. Lei, S. Wu, Z. Huang, J. Luo, Y. Wang, J. Chen, D. Yan, Evalu-
ation of future energy consumption on PM2.5 emissions and public health
economic loss in beijing, Journal of Cleaner Production 187 (2018) 1115–
1128.
[5] X. Lu, C. Lin, W. Li, Y. Chen, Y. Huang, J. C. Fung, A. K. Lau, Analysis
of the adverse health effects of pm2. 5 from 2001 to 2017 in china and the
13
0.050.100.150.20indegree_centrality02468101214in_weightout_weight510152025303540in_degree02468101214in_weightout_weight[26] Y. Ma, J. Hao, Y. Yang, H. Li, J. Jin, G. Chen, Spectral-based graph con-
volutional network for directed graphs, arXiv preprint arXiv:1907.08990
(2019).
[27] J. Skarding, B. Gabrys, K. Musial, Foundations and modeling of dynamic
networks using dynamic graph neural networks: A survey, IEEE Access
9 (2021) 79143–79168.
[28] J. Gilmer, S. S. Schoenholz, P. F. Riley, O. Vinyals, G. E. Dahl, Neural
message passing for quantum chemistry, in: International conference on
machine learning, PMLR, 2017, pp. 1263–1272.
[29] Y. Li, R. Yu, C. Shahabi, Y. Liu, Diffusion convolutional recur-
rent neural network: Data-driven traffic forecasting, arXiv preprint
arXiv:1707.01926 (2017).
[30] S. Du, T. Li, Y. Yang, S.-J. Horng, Deep air quality forecasting using
hybrid deep learning framework, IEEE Transactions on Knowledge and
Data Engineering 33 (6) (2019) 2412–2424.
[31] Y. Qi, Q. Li, H. Karimian, D. Liu, A hybrid model for spatiotemporal
forecasting of PM2.5 based on graph convolutional neural network and
long short-term memory, Science of the Total Environment 664 (2019)
1–10.
[32] Z. Wu, S. Pan, G. Long, J. Jiang, C. Zhang, Graph wavenet for
deep spatial-temporal graph modeling, arXiv preprint arXiv:1906.00121
(2019).
[33] J. K. Rekhi, P. Nagrath, R. Jain, et al., Forecasting air quality of delhi
using arima model, in: Advances in Data Sciences, Security and Applica-
tions, Springer, 2020, pp. 315–325.
[34] M. Dun, Z. Xu, Y. Chen, L. Wu, Short-term air quality prediction based
on fractional grey linear regression and support vector machine, Mathe-
matical Problems in Engineering 2020 (2020).
[35] B. Liu, Y. Jin, C. Li, Analysis and prediction of air quality in nanjing
from autumn 2018 to summer 2019 using pcr–svr–arma combined model,
Scientific Reports 11 (1) (2021) 1–14.
[36] J. Ma, Z. Li, J. C. Cheng, Y. Ding, C. Lin, Z. Xu, Air quality prediction
at new stations using spatially transferred bi-directional long short-term
memory network, Science of The Total Environment 705 (2020) 135771.
[37] H. Zhou, F. Zhang, Z. Du, R. Liu, Forecasting PM2.5 using hybrid graph
convolution-based model considering dynamic wind-field to offer the
benefit of spatial interpretability, Environmental Pollution 273 (2021)
116473.
[38] Z. Diao, X. Wang, D. Zhang, Y. Liu, K. Xie, S. He, Dynamic spatial-
temporal graph convolutional neural networks for traffic forecasting, in:
Proceedings of the AAAI conference on artificial intelligence, Vol. 33,
2019, pp. 890–897.
[39] H. Peng, B. Du, M. Liu, M. Liu, S. Ji, S. Wang, X. Zhang, L. He, Dynamic
graph convolutional network for long-term traffic flow prediction with
reinforcement learning, Information Sciences 578 (2021) 401–416.
[40] Z. Wu, S. Pan, G. Long, J. Jiang, X. Chang, C. Zhang, Connecting the
dots: Multivariate time series forecasting with graph neural networks,
in: Proceedings of the 26th ACM SIGKDD International Conference on
Knowledge Discovery & Data Mining, 2020, pp. 753–763.
14
|
|
http://arxiv.org/abs/2302.09976v2 | 2023-09-28T12:32:22 | 2023-02-20T13:44:47 | Discouraging posterior collapse in hierarchical Variational Autoencoders
using context | Hierarchical Variational Autoencoders (VAEs) are among the most popular
likelihood-based generative models. There is a consensus that the top-down
hierarchical VAEs allow effective learning of deep latent structures and avoid
problems like posterior collapse. Here, we show that this is not necessarily
the case, and the problem of collapsing posteriors remains. To discourage this
issue, we propose a deep hierarchical VAE with a context on top. Specifically,
we use a Discrete Cosine Transform to obtain the last latent variable. In a
series of experiments, we observe that the proposed modification allows us to
achieve better utilization of the latent space and does not harm the model's
generative abilities. | [
"Anna Kuzina",
"Jakub M. Tomczak"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09976v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09976v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.CV"
] | 3
2
0
2
p
e
S
8
2
]
G
L
.
s
c
[
2
v
6
7
9
9
0
.
2
0
3
2
:
v
i
X
r
a
DISCOURAGING POSTERIOR COLLAPSE IN HIERARCHI-
CAL VARIATIONAL AUTOENCODERS USING CONTEXT
Anna Kuzina
Vrije Universiteit Amsterdam
Jakub M. Tomczak
Eindhoven University of Technology
ABSTRACT
Hierarchical Variational Autoencoders (VAEs) are among the most popular
likelihood-based generative models. There is a consensus that the top-down hi-
erarchical VAEs allow effective learning of deep latent structures and avoid prob-
lems like posterior collapse. Here, we show that this is not necessarily the case,
and the problem of collapsing posteriors remains. To discourage this issue, we
propose a deep hierarchical VAE with a context on top. Specifically, we use a
Discrete Cosine Transform to obtain the last latent variable. In a series of ex-
periments, we observe that the proposed modification allows us to achieve better
utilization of the latent space and does not harm the model's generative abilities.
1
INTRODUCTION
Latent variable models (LVMs) parameterized with neural networks constitute a large group in
deep generative modeling (Tomczak, 2022). One class of LVMs, Variational Autoencoders (VAEs)
(Kingma & Welling, 2014; Rezende et al., 2014), utilize amortized variational inference to efficiently
learn distributions over various data modalities, e.g., images (Kingma & Welling, 2014), audio (Van
Den Oord et al., 2017) or molecules (G ́omez-Bombarelli et al., 2018). One of the problems hin-
dering the performance of VAEs is the posterior collapse (Wang et al., 2021) when the variational
posterior (partially) matches the prior distribution (e.g., the standard Gaussian distribution). The
expressive power of VAEs could be improved by introducing a hierarchy of latent variables. The
resulting hierarchical VAEs like ResNET VAEs (Kingma et al., 2016), BIVA (Maaløe et al., 2019),
very deep VAE (VDVAE) (Child, 2021) or NVAE (Vahdat & Kautz, 2020) achieve state-of-the-art
performance on images in terms of the negative log-likelihood (NLL). Despite their successes, hier-
archical VAEs could still suffer from the posterior collapse effect. As a result, the modeling capacity
is lower, and some latent variables carry very little to no information about observed data.
In this paper, we take a closer look into the posterior collapse in the context of hierarchical VAEs.
It was claimed that introducing a specific top-down architecture of variational posteriors (Sønderby
et al., 2016; Maaløe et al., 2019; Child, 2021; Vahdat & Kautz, 2020) solves the problem and allows
learning powerful VAEs. However, we can still notice at least partial posterior collapse, where
some of the latent variables are completely ignored by the model. Here, we fill a few missing
gaps in comprehending this behavior. We analyze the connection between posterior collapse and
latent variable non-identifiability. By understanding the issue that lies in the optimization nature
of the Kullback-Leibler terms, we propose to utilize a non-trainable, discrete, and deterministic
transformation (e.g., Discrete Cosine Transform) to obtain informative top-level latent variables.
Making the top latent variables highly dependent on data, we alter the optimization process. The
resulting hierarchical VAE starts utilizing the latent variables differently. In the experiments, we
show that our proposition achieves a different landscape of latent space.
The contributions of the paper are the following:
• We provide empirical evidence that the posterior collapse is present in top-down hierarchical
VAEs (Section 3.2).
• We extend the analysis of the posterior collapse phenomenon presented by (Wang et al., 2021)
to hierarchical VAEs (Section 3.3).
• We propose a way to discourage posterior collapse by introducing Discrete Cosine Transform
(DCT) as a part of the variational posterior (Section 4).
1
• In the experiments, we show that the proposed approach leads to better latent space utilization
(Section 5.2), more informative latent variables (Section 5.3) and does not harm the generative
performance (Section 5.1).
2 BACKGROUND
2.1 VARIATIONAL AUTOENCODERS
∈
X
∈ X
D (e.g.,
= R). We observe N x's sampled from the em-
Consider random variables x
pirical distribution q(x). We assume that each x has L corresponding latent variables z1:L =
RMl , where Ml is the dimensionality of each variable. We aim to find a la-
(z1, . . . , zL), zl
tent variable generative model with unknown parameters θ, pθ(x, z1:L) = pθ(x
z1:L)pθ(z1:L). In
|
general, optimizing latent-variable models with non-linear stochastic dependencies is troublesome.
A possible solution is an approximate inference in the form of variational inference (Jordan et al.,
1999) with a family of variational posteriors over the latent variables
φ. This idea is
exploited in Variational Auto-Encoders (VAEs) (Kingma & Welling, 2014; Rezende et al., 2014),
in which variational posteriors are referred to as encoders. As a result, we optimize a tractable ob-
jective function, i.e., the Evidence Lower BOund (ELBO), over the parameters of the variational
posterior, φ, and a generative part, θ:
qφ(z1:L
{
x)
}
|
Eq(x) [ln pθ(x)]
≥
(cid:20)
Eqφ(z1:L|x) ln pθ(x
Eq(x)
z1:L)
|
−
DKL [qφ(z1:L
(cid:21)
,
pθ(z1:L)]
∥
x)
|
(1)
where q(x) is an empirical data distribution. Further, we use qtest(x) for the hold-out data.
2.2 TOP-DOWN HIERARCHICAL VAES
l=1 pθ(zl
We propose to factorize the distribution over the latent variables in an autoregressive manner:
pθ(z1, . . . , zL) = pθ(zL) (cid:81)L−1
zl+1:L), similarly to (Child, 2021; Maaløe et al., 2019; Vah-
|
dat & Kautz, 2020). Next, we follow the proposition of (Sønderby et al., 2016) with the top-down
x) (cid:81)L−1
inference model: qφ(z1, . . . , zL
zl+1:L, x). This factorization was used
|
previously by successful VAEs, among others, NVAE (Vahdat & Kautz, 2020) and Very Deep VAE
(VDVAE) (Child, 2021). It was shown empirically that such a formulation allows for achieving
state-of-the-art performance on several image datasets.
x) = qφ(zL
|
l=1 qφ(zl
|
3 AN ANALYSIS OF THE posterior collapse IN HIERARCHICAL VAES
The posterior collapse effect is a known problem of shallow VAEs when certain latent variables do
not carry any information about the observed data. There are various methods to deal with this issue
for VAEs, such as changing the parameterization (Dieng et al., 2019; He et al., 2019), changing the
optimization or the objective (Alemi et al., 2018; Bowman et al., 2016; Fu et al., 2019; Havrylov
& Titov, 2020; Razavi et al., 2019), or using hierarchical models (Child, 2021; Maaløe et al., 2017;
2019; Tomczak & Welling, 2018; Vahdat & Kautz, 2020). Here, we focus entirely on the hierarchical
VAEs since the posterior collapse problem is not fully analyzed in their context.
In practice, hierarchical VAEs usually require huge latent space with multiple latent layers to achieve
good performance (Sønderby et al., 2016; Maaløe et al., 2019; Child, 2021; Vahdat & Kautz, 2020).
However, as we show in our analysis, the actual number of used latent units in these models is
relatively small. Therefore, it is still an open question about how to reduce the gap between the total
size of the latent space and the actual number of latents used by these models.
Following definition 1 in Wang et al. (2021), we consider the posterior collapse as a situation where
the true posterior is equal to the prior for a given set of parameters θ. We can formulate this definition
for a single stochastic layer of top-down hierarchical VAE as follows:
pθ(zl
zl+1:L, x) = pθ(zl
zl+1:L).
(2)
|
In practice, we deal with the variational posterior qφ(zl
zl+1:L, x), which approximates the true
posterior. Furthermore, it is common to identify the posterior collapse based on this approxi-
mate distribution (Burda et al., 2015; Lucas et al., 2019; Sønderby et al., 2016; Van Den Oord
|
|
2
Table 1: Posterior collapse metrics and NLL for
the top-down hierarchical VAEs with various LATENT
SPACE sizes and with fixed model SIZE (the total num-
ber of parameters).
SIZE
L
LATENT
SPACE
AU
KL
NLL↓
676K 4
624K 6
657K 8
651K 10
490
735
980
1225
38.3% 0.047
37.9% 0.031
33.5% 0.022
33.6% 0.018
79.6
78.8
78.3
77.9
Figure 1: The cumulative distribution
function of the KL-divergence in VAEs
with varying latent space sizes.
|
x)
pθ(zL
x)
∥
x)] + (cid:80)L−1
l=1
et al., 2017). Both definitions are connected, yet not identical. We learn the posterior approxi-
mation by variational inference, and the ELBO (Eq. 1) is maximized when the approximate pos-
x)] = 0. Furthermore, the
terior matches the true posterior, namely, DKL [qφ(z1:L
|
x)] =
KL-divergence can be further decomposed into the following sum: DKL[qφ(z1:L
|
DKL [qφ(zL
pθ(z1:L
∥
Eqφ(zl+1:L,x)DKL [qφ(zl
Therefore, a collapsed true posterior distribution for the latent variable at the stochastic layer l results
in a collapsed variational posterior for this latent variable at the optimum. However, the collapse of
the variational posterior distribution does not guarantee the collapse of the true posterior as it can
be caused by a poor choice of the family of the variational distributions. See Appendix A for an in-
depth discussion. To this end, we assume that the family of variational posterior distribution is rich
enough and use the variational posterior collapse as an indicator of true posterior collapse. Next, we
discuss the metrics of the posterior collapse in more detail.
pθ(zl
zl+1:L, x)
∥
x)
||
|
zl+1:L, x)] .
pθ(z1:L
|
|
|
|
3.1 MEASURING THE POSTERIOR COLLAPSE
We consider two metrics for assessing the posterior collapse in hierarchical VAEs. First, we compute
the KL-divergence for the i-th latent variable of the stochastic layer l:
kli
l = Eqtest(x)Eqφ(zl+1:L|x)DKL
(cid:2)qφ(zi
zl+1:L, x)
l|
∥
zl+1:L)(cid:3) .
pθ(zi
l|
(3)
This quantity can be approximately computed using Monte Carlo sampling and gives us an estimate
of the posterior collapse issue for each latent variable. Note that the KL-divergence term used in the
ELBO 1 equals the sum of these values over all latent variables i and stochastic layers l.
Second, we use active units. This is a metric introduced in (Burda et al., 2015), and it can be
calculated for a given stochastic layer and a threshold δ:
Al = Varqtest(x)Eqφ(zl+1:L|x)Eqφ(zl|zl+1:L,x) [zl] ,
(cid:80)L
l=1
AU =
(cid:80)Ml
i=1 [Al,i > δ]
l=1 Ml
,
(cid:80)L
(4)
(5)
where Ml is the dimensionality of the stochastic layer l, [P ] is Iverson bracket, which equals to 1 if
P is true and to 0 otherwise. Following (Burda et al., 2015), we use the threshold δ = 0.01. The
higher the share of active units, the more efficient the model is in using its latent space.
3.2 EMPIRICAL EVIDENCE OF POSTERIOR COLLAPSE
In the following, we carry out an experiment to observe the posterior collapse in hierarchical VAE.
We train four top-down hierarchical VAE models with different latent space sizes on the MNIST
dataset. At the same time, we make sure that all the models have a similar number of parameters
and try to keep the number of ResNet blocks the same. We vary the number of stochastic layers L
from 4 to 10. Note that the data space has a dimensionality of 784. We report the test NLL, Active
Unit, and KL-divergence per latent variable for this experiment in Table 1. We also plot an empirical
CDF of the latent variable's KLs in Figure 1.
3
0.00.10.20.30.40.5{klil}l,i0.60.70.80.91.0Prop.oflatentunits490Latents735Latents980Latents1225LatentsThe total number of latent units increases from 490 to 1225 in this experiment. However, all the
models have no more than 40% of active units. We also observe that AU and KL metrics decrease
with the number of stochastic layers increasing. The cumulative histogram of KL-divergence (Eq. 3)
depicted in Figure 1 shows that the models have close to 60% of the latent variable with almost zero
KL-divergence. This indicates that the deep hierarchical VAEs do not use the majority of the latent
units. As a result, the common claim that the top-down hierarchical VAEs alleviate the problem of
the posterior collapse (Maaløe et al., 2019) is not necessarily true as indicated by this experiment.
It is true, though, that increasing the number of latents improves the performance (NLL). However,
this is not an efficient way of utilizing the model since it disregards over 60% of its latents.
3.3 LATENT VARIABLES NON-IDENTIFIABILITY AND THE POSTERIOR COLLAPSE IN
HIERARCHICAL VAES
Wang et al. (2021) prove that collapse of the true posterior in a one-level VAE takes place if and
only if latent variables are non-identifiable. A latent variable z is called non-identifiable (Raue
et al., 2009) if for a given set of parameter values θ∗, the conditional likelihood does not depend
on this latent variable. Namely, pθ∗ (x
z) = pθ∗ (x). Similarly, we say that latent variable zl in
|
hierarchical VAE is non-identifiable when pθ∗ (x
z1:L) = pθ∗ (x
|
|
We now establish the connection between posterior collapse (Eq. 2) and non-identifiability in the
following propositions. See Appendix B for the proofs.
z−l).
Proposition 1 Consider a top-down hierarchical VAE introduced in Section 2.2. Then, for a given
set of parameter values θ∗, the posterior of the latent variable zl collapses if and only if x and zl
are conditionally independent given (zl+1, . . . , zL).
Proposition 2 Consider a top-down hierarchical VAE introduced in Section 2.2. If x and zl are
conditionally independent given (zl+1, . . . , zL), then the latent variable zl is non-identifiable. How-
ever, if zl is non-identifiable, it does not imply that it is conditionally independent with x given
(zl+1, . . . , zL).
To simplify the notation, let us split the latent variables of hierarchical VAEs into three groups:
z1, . . . , zl−1
, zl, zl+1, . . . , zL
(cid:124)
(cid:125)
(cid:125)
(cid:123)(cid:122)
zA
(cid:123)(cid:122)
zC
(cid:124)
.
(6)
We can do this for each l
1, . . . , L, assuming that in the corner case of l = 1, zA is an empty set,
and in the case of l = L, zC is an empty set. Then, the content of the propositions 1 and 2 can be
summarized in the following diagram:
pθ∗ (x
pθ∗ (zl
|
(cid:124)
(cid:124)
zA, zC)
(cid:125)
pθ∗ (x
(cid:124)
zC)
|
(cid:125)
zC)
(cid:125)
⇔
⇒
∈
zl, zC) = pθ∗ (x
(cid:123)(cid:122)
Conditional Independence
zA, z,zC) = pθ∗ (x
|
|
(cid:123)(cid:122)
Non-identifiability
zC, x) = pθ∗ (zl
|
(cid:123)(cid:122)
Posterior Collapse
|
.
That being said, as opposed to the one-level VAE considered by (Wang et al., 2021), the non-
identifiability of the latent variables in hierarchical VAEs does not necessarily cause the true pos-
terior to collapse. Therefore, the solution, in which we define the likelihood function in a way that
guarantees the latent variable identifiability might be too restrictive. One possible solution would be
to utilize the method from (Wang et al., 2021) to ensure that zl and x are not conditionally indepen-
zl, zl+1:L),
dent given (zl+1, . . . , zL). However, one would need access to the distribution pθ∗ (x
|
which is intractable in the top-down hierarchical VAEs.
As a result, we employ an orthogonal approach by adding one more non-trainable latent variable
to a hierarchical VAE, which we call a context. We show in Section 4.3 that this method can break
the link between conditional independence and posterior collapse without any restriction on the
likelihood function.
4 HIERARCHICAL VAES WITH NON-TRAINABLE CONTEXT
4.1 HIERARCHICAL VAES WITH CONTEXT
In this work, we introduce a modified hierarchical VAE model, which is meant to increase the
number of latent variables used by a deep hierarchical VAE while not harming performance. As
4
we discuss in Sec. 3.3, posterior collapse happens if and only if there is a conditional independence
between zl and x given z>l. If this is the case, then the posterior distribution is proportional to the
prior, namely, pθ(zl
zl+1:L). As a result, the latent variable zl does not contain
|
any information about the input x. Note also that prior distribution is an object we can control since
this is the distribution we parametrize directly by the neural network. This motivates us to introduce
the context. We think of the context as a top-level latent variable that can be obtained from the input
via a fixed, non-trainable transformation.
zl+1:L, x)
|
pθ(zl
∝
Let us consider the top latent variable zL to be given by a non-
learnable transformation of the input x, namely, zL = f (x).
We require context zL to be a much simpler object than the ini-
RML
tial object x. That is, we want the dimensionality of zL
∈
D, ML
to be smaller than the dimensionality of x
D.
At the same time, we want the context to be a reasonable rep-
resentation of x. We can think of the context as a compressed
representation of the input data, e.g., in the simplest case, it
could be a downsampled version of an image (see Appendix F
for details). We discuss another way of constructing the con-
text in Section 4.4.
∈ X
≪
z3
z2
z1
d2
d1
x
z3
z2
z1
x
The graphical model of the VAE with the context is de-
picted in Figure 2. We use the top-down VDVAE architec-
ture (Child, 2021) and extend this model with a deterministic,
non-trainable function to create latent variable zL (the con-
text). Context zL is produced from the observation x and fur-
ther used to condition all other latent variables in both infer-
ence and generative models. We provide a mode details on the
architecture in Appendix E.1 (Figure 8)
Figure 2: Graphical model of the
top-down hierarchical VAE with
two latent variables and the context
z3. The inference model (left) and
the generative model (right) share
the top-down path (blue). The grey
arrow represents a non-trainable
transformation.
4.2 TRAINING VAE WITH THE CONTEXT
We assume that both x and zL are discrete random variables. Furthermore, we assume that the
f (x)). As we
variational posterior of the context is Kronecker's delta function q(zL
depict in Figure 2, the generative model is conditioned on the context latent variable zL at each
step. To sample unconditionally, we define a context prior distribution pγ(zL), which is trained
simultaneously with the whole VAE model via the ELBO objective. Following (Vahdat et al., 2021;
Wehenkel & Louppe, 2021), we propose to use a diffusion-based generative model (Ho et al., 2020)
as the prior. Since the context is a less complex object, we assume that it is enough to use a model
much smaller compared to the VAE itself. We provide details on diffusion models in Appendix
C. The diffusion-based model provides a lower bound on the log density of the prior distribution
x) = δ(zL
|
−
(γ, zL)
L
≤
ln pγ(zL), which together with VAE objective 1 results in the following objective:
Eqφ(z1:L|x) [ln pθ(x|z1:L)] + Eq(zL|x)L(γ, zL) −
L−1
(cid:88)
l=1
Eqφ(zl+1:L|x)DKL [qφ(zl|zl+1:L, x)∥pθ(zl|zl+1:L)] .
4.3 THE POSTERIOR COLLAPSE FOR VAES WITH THE CONTEXT
x δ(zL
We claim that the introduction of the context changes the prior distributions, which results in the
posterior collapse having less effect on the model. First, since zL = f (x), we guarantee that the top
latent variable will not collapse. We now need to fit the prior to the aggregated posterior q(zL) =
(cid:80)
f (x))q(x), not the other way around. As a result, this prior contains information about
the data points x by definition. Second, let us assume that zl and x are conditionally independent
for given parameter values θ∗: pθ(x
zl+1:L). Then, from the Proposition 1 the
|
zl+1:L). However, since f (x) =
posterior is proportional to the prior: pθ(zl
|
∝
zL
zl+1:L, we still have information about x preserved in the posterior:
zl, zl+1:L) = pθ(x
|
zl+1:L, x)
pθ(zl
−
|
∈
This way, the presence of posterior collapse does not necessarily lead to uninformative latent codes.
pθ(zl
zl+1:L, x)
|
∝
pθ(zl
zl+1:L−1, f (x)).
|
(7)
5
4.4 A DCT-BASED CONTEXT
We suggest to think of the context as of compressed representation of the input data (Sec. 4.1). We
expect it to be lower-dimensional compared to the data itself while preserving crucial information.
In other words, we may say that context does not contain any high-frequency details of the signal
of interest while preserving a more general pattern. To this end, we propose to use the Discrete
Cosine Transform1 (DCT) to create the context. DCT(Ahmed et al., 1974) is widely used in signal
processing for image, video, and audio data, i.e., it is a part of the JPEG standard (Pennebaker
& Mitchell, 1992). DCT is a linear transformation that decomposes a discrete signal on a basis
consisting of cosine functions of different frequencies.
2
D
∈ X
(cid:113) 2
(cid:0)n + 1
Let us consider a signal as a 3D tensor x
as follows: zDCT,i = CxiC⊤, where for all pairs (k = 0, n): Ck,n =
D cos (cid:0) π
Ch×D×D. Then DCT for a single channel, xi, is defined
(cid:113) 1
D , and for all pairs (k, n)
(cid:1) k(cid:1). A helpful property of the DCT is that it is an
such that k > 0: Ck,n =
invertible transformation. Therefore, it contains all the information about the input. However, for
our approach, we want the context to be lower-dimensional compared to the input dimensionality.
Therefore, we propose to remove high-frequency components from the signal. Assume that each
d
channel of x is D
bottom rows and right-most columns for each channel in the frequency domain. Finally, we perform
normalization using matrix S, which contains the maximal absolute value of each frequency. We
DCT(x)
calculate this matrix using all the training data: S = maxx∈Dtrain |
. As a result, we get latent
|
1, 1]. In the last step, we round all values to a given precision such
variables whose values are in [
−
that after multiplying the latents by S we get integers, thus, we get discrete variables. We call this
the quantization step. Algorithm 1 describes context computation from the given input x.
D. We select the desired size of the context d < D and remove (crop) D
−
×
Algorithm 1 Create a DCT-based context
Input: x, S, d
zDCT = DCT(x)
zDCT = Crop(zDCT, d)
zDCT = zDCT
S
zDCT = quantize(zDCT)
Return: zDCT
Algorithm 2 Decode the DCT-based context.
Input: zDCT, S, D
zDCT = zDCT
S
*
zDCT = zero pad(zDCT, D
̃xcontext = iDCT(zDCT)
d)
−
Return: ̃xcontext
Due to cropping and quantization operations, the context computation is not invertible anymore.
However, we can still go back from the frequency to the local domain. First, we start by multiplying
by the normalization matrix S. Afterwards, we pad each channel with zeros, so that the size increases
from d
D. Lastly, we apply the inverse of the Discrete Cosine Transform (iDCT). We
describe this procedure in Algorithm 2. We refer to our top-down hierarchical VAE with a DCT-
based context as DCT-VAE.
d to D
×
×
5 EXPERIMENTS
We evaluate DCT-VAE on several commonly used image datasets, namely, MNIST, OMNIGLOT,
and CIFAR10. We provide the full set of hyperparameters in Appendix E.2. We designed the
experiments to validate the following hypotheses:
1) Adding the DCT-based context into hierarchical VAE does not harm the performance (as mea-
sured by negative loglikelihood) (sec. 5.1).
2) DCT-VAE have more active units / higher KL values (sec. 5.2).
3) Latent variables of very deep DCT-VAE carry more information about the input data (sec. 5.3).
In all the experiments, we implement two models: A baseline Very Deep VAE model without any
context (denoted by VDVAE) (Child, 2021), and our approach (DCT-VAE) that is a VDVAE with a
DCT-based context on top. We keep both architectures almost identical, keeping the same number of
channels, resnet blocks, and latent space sizes. In other words, the only difference in the architecture
is the presence of the context in DCT-VAE.
1In this work, we consider the most widely used type-II DCT.
6
Table 2: The test performance (NLL) on MNIST and OM-
NIGLOT datasets and the number of stochastic layers (L).
MODEL
DCT-VAE (ours)
Donwsample-VAE (ours)
Small VDVAE
(our implementation)
Attentive VAE
(Apostolopoulou et al., 2022)
CR-NVAE
(Sinha & Dieng, 2021)
OU-VAE
(Pervez & Gavves, 2021)
NVAE
(Vahdat & Kautz, 2020)
BIVA(Maaløe et al., 2019)
LVAE
(Sønderby et al., 2016)
IAF-VAE
(Kingma et al., 2016)
L
8
8
8
15
15
5
15
6
5
MNIST OMNIGLOT
log p(x)
−
76.62
77.52
≤ ↓
86.11
87.69
78.27
77.63
76.93
81.10
78.01
78.41
81.74
88.14
89.50
-
96.08
-
91.34
102.11
- 79.10
-
(a) MNIST
(b) OMNIGLOT
Figure 3: NLL results for MNIST
and OMIGLOT for different con-
text types and sizes.
5.1
IMAGE GENERATION BENCHMARKS
Binary images We start with the experiments on binary images: MNIST and OMNIGLOT, for
which we use dynamic binarization. In Figure 3, we report the results of an ablation study where
we test various context sizes and two contexts: downsampling and DCT. We observe that DCT-
VAE (green) outperforms the VDVAE in all the experiments (the orange horizontal line). However,
if we choose downsampling as a context instead of the DCT, the performance of the model drops
significantly for larger context sizes (blue bars). The reason for that comes from the fact that it
becomes harder to fit the prior to the aggregated posterior. Interestingly, it seems there is a sweet
spot for the context size of the DCT-VAE at around 5%. Since DCT always performs better than
downsampling, we use it in all the experiments from now on. Comparing DCT-VAE to various
best-performing VAEs, it turns out that our approach not only does not harm performance but also
achieves state-of-the-art performance on both datasets, see Table 5. Importantly, the introduction of
the context gives a significant improvement over the same architecture of the VDVAE.
Natural Images We perform ex-
periments on natural images to test
the method's performance on a more
challenging task. We use the CI-
FAR10 dataset, which is a common
benchmark in VAE literature.
We note that
the best-performing
VAEs (e.g., VDVAE, NVAE) on this
dataset are very large and require sub-
stantial computational resources to
train which we do not have access
to. Instead, we train a small-size VD-
VAE and provide results of other gen-
erative models of comparable sizes in
Table 5. We report the complete com-
parison (including large models) in
Appendix D.
Table 3: The test performance (BPD) on the CIFAR10
dataset, the total number of trainable parameters (Size), the
number of stochastic layers (L).
MODEL
SIZE
L
BITS/DIM ≤ ↓
DCT-VAE (ours)
Small VDVAE
(our implementation)
OU-VAE
(Pervez & Gavves, 2021)
Residual flows
(Perugachi-Diaz et al., 2021)
i-DenseNet flows
(Perugachi-Diaz et al., 2021)
22M 29
21M 29
10M 3
25M 1
25M 1
3.26
3.28
3.39
3.28
3.25
7
2.0%3.2%4.6%6.2%8.2%Contextsize/Inputsize7678808284TestNLLVDVAEDCT-VAEDownsample-VAE2.0%3.2%4.6%6.2%8.2%Contextsize/Inputsize858890929598100TestNLLVDVAEDCT-VAEDownsample-VAETable 4: The absolute and the relative number of active units for VAEs and DCT-VAEs evaluated on
the test datasets of MNIST, OMNIGLOT, and Cifar10.
LATENT
SPACE
CONTEXT
SIZE
AU↑
(Absolute)
AU↑
(% of latents)
KL↑
(per latent unit)
×10e − 3
VDVAE
DCT-VAE
VDVAE
DCT-VAE
980
967
980
980
0
36
0
49
VDVAE
DCT-VAE
105K
105K
0
108
7.5K
11.3K
MNIST
336
405
34.4%
41.9%
22.9 (1.4)
25.9 (0.8)
OMNIGLOT
494
593
CIFAR10
50.4%
60.5%
7.1%
10.8%
35.1 (0.8)
36.5 (0.8)
47.6 (2.1)
51.6 (2.0)
We observe that our approach works on par with the generative models that have comparable sizes
(OU-VAE, Residual Flows, GLOW), and, most importantly, it has a similar (in fact, slightly better)
BPD to our implementation of the VDVAE of a similar size.
5.2 POSTERIOR COLLAPSE
In this section, we analyze the latent space of the DCT-VAE and VDVAE trained on different datasets
from the posterior collapse point of view. We report the number of active units and KL-divergence
on the test dataset in Table 4. We also show the total latent space size and context size.
We observe that the number of active units increases significantly when the context is introduced to
the model. Furthermore, this increase is much higher than the size of the context itself, meaning that
it helps to increase the latent space utilization in general. However, there are still a lot of unused
latent variables. For example, on the CIFAR10 dataset, the proportion of active units increases from
7% to 11%. It means that even though deeper models obtain better NLL, there is still a significant
waste of the model's capacity. Similarly to the AU metric, the higher KL-divergence of the DCT-
VAE compared to the VDVAE with no context indicates that the DCT-based context helps to push
more information to other layers. In conclusion, we observe the improved utilization of latent space
in terms of both metrics.
5.3 DATA INFORMATION IN LATENT VARIABLES
Many of the state-of-the-art models have a lot of stochastic layers (e.g., 45 for CIFAR10 (Child,
2021)). Therefore, it is likely that the information about the x could be completely disregarded by
the latent variables further away from the input. In this section, we explore how much information
about the corresponding data points the top latent codes contain. For this purpose, we consider
the reconstruction performance and compression. We examine VDVAE and DCT-VAE with 29
stochastic layers trained and tested on the CIFAR10 dataset in both experiments.
5.3.1 RECONSTRUCTION CAPABILITIES OF DCT-VAE
We compute Multi-Scale Structural Similarity Index Measure (MSSSIM) (Wang et al., 2003) for the
test data and its reconstruction obtained using only part of the latent variables from the variational
we obtain a reconstruction ̃xm using m latent variables
posterior. That is, for each m
m latent variables from the prior, namely:
from the variational posterior and by sampling the rest L
1, . . . , L
∈ {
}
−
̃xm
∼
pθ(
z1:L)
*|
L−m
(cid:89)
l=1
pθ(zl
zl+1:L)
|
L
(cid:89)
l=L−m+1
qφ(zl
zl+1:L, x).
|
(8)
8
Figure 4: The reconstruction measured
by the MSSSIM (
) on the CIFAR10
↑
test set for a varying number of latent
variables sampled from the encoder.
Figure 5: Compression result on KODAK dataset. We use
discrete context only to compress images with DCT-VAE.
We report the BPP of JPEG and VDVAE that corresponds
to the same reconstruction quality.
(a) VDVAE
(b) DCT-VAE
Figure 6: Examples of the decompressed images. We use (a) 2 top latent variables of VDVAE to
reconstruct the image, (b) only the context of DCT-VAE, and (c) we choose JPEG compression to
have a similar PSNR value to DCT-VAE.
(c) JPEG
We present the results of this experiment in Figure 4. We observe that in VDVAE the top latent
layers carry very little to no information about the real data point x, which continues up to the 5th
layer from the top. Then, the reconstructions become reasonable (between the 5th and the 10th layer
values of MSSSIM increases from 0.6 to 0.8). In the case of DCT-VAE, using only one layer (i.e.,
context) gives already reasonable reconstructions (MSSSIM above 0.8).
5.3.2
IMAGE COMPRESSION WITH DCT-VAE
To find out how much information about the data is preserved in the top latent variable, we conduct
an experiment in which we use the baseline VDVAE and the DCT-VAE pretrained on CIFAR10 for
compression. We use the KODAK dataset, which is a standard compression benchmark containing
24 images with resolution 512
32, we independently encode
768. Since CIFAR10 images are 32
patches of KODAK images. We then reconstruct each patch using only the context latent variable,
while the rest of the latent variables are sampled from the prior. We combine these patches to obtain
final reconstructions and measure reconstruction error (PSNR). We use JPEG as a baseline.
×
×
Results are provided in Figure 5. We select the compression rates that result in comparable PSNR
values. We report KL-divergence converted to bits-per-pixel as a theoretical compression rate. All
the latent variables (except for the context in DCT-VAE) are continuous. We provide an example
of the KODAK image after compression in Figure 6. We also plot examples of the reconstructed
images in the Appendix Figure 9. Interestingly, DCT-VAE is capable of obtaining much better BPP
than two other baselines while keeping the same PSNR. This indicates the usefulness of context.
6 CONCLUSION
In this paper, we discuss the issue of posterior collapse in top-down hierarchical VAEs. We show
theoretically and empirically that this problem exists. As a solution, we propose to introduce deter-
ministic, discrete and non-trainable transformations to calculate the top latent variables, e.g., DCT.
The resulting model, DCT-VAE, seems to give more robust latent variables that carry more informa-
tion about data (e.g., the compression experiment).
9
1510152025StohasticLayer0.20.40.60.81.0MSSSIMVDVAEDCT-VAEJPEGDCT-VAEVDVAE*20222426PSNRJPEGDCT-VAEVDVAE*0.20.30.4BPPPSNR=15.2,MSSSIM=0.38,BPP*=0.05PSNR=25.1,MSSSIM=0.84,BPP=0.19PSNR=26.6,MSSSIM=0.84,BPP=0.32REFERENCES
Nasir Ahmed, T Natarajan, and Kamisetty R Rao. Discrete cosine transform. IEEE Transactions on
Computers, 100(1):90–93, 1974.
Alexander Alemi, Ben Poole, Ian Fischer, Joshua Dillon, Rif A Saurous, and Kevin Murphy. Fixing
a broken elbo. In ICML, 2018.
Ifigeneia Apostolopoulou, Ian Char, Elan Rosenfeld, and Artur Dubrawski. Deep attentive varia-
tional inference. In ICLR, 2022.
Samuel Bowman, Luke Vilnis, Oriol Vinyals, Andrew Dai, Rafal Jozefowicz, and Samy Bengio.
Generating sentences from a continuous space. In SIGNLL, 2016.
Yuri Burda, Roger Grosse, and Ruslan Salakhutdinov. Importance weighted autoencoders. arXiv,
2015.
Rewon Child. Very deep vaes generalize autoregressive models and can outperform them on images.
In ICLR, 2021.
Prafulla Dhariwal and Alexander Nichol. Diffusion models beat gans on image synthesis. NeurIPS,
2021.
Adji B Dieng, Yoon Kim, Alexander M Rush, and David M Blei. Avoiding latent variable collapse
with generative skip models. In AISTATS, 2019.
Hao Fu, Chunyuan Li, Xiaodong Liu, Jianfeng Gao, Asli Celikyilmaz, and Lawrence Carin. Cyclical
annealing schedule: A simple approach to mitigating kl vanishing. arXiv, 2019.
Rafael G ́omez-Bombarelli, Jennifer N Wei, David Duvenaud, Jos ́e Miguel Hern ́andez-Lobato,
Benjam ́ın S ́anchez-Lengeling, Dennis Sheberla, Jorge Aguilera-Iparraguirre, Timothy D Hirzel,
Ryan P Adams, and Al ́an Aspuru-Guzik. Automatic chemical design using a data-driven contin-
uous representation of molecules. ACS central science, 2018.
Serhii Havrylov and Ivan Titov. Preventing posterior collapse with levenshtein variational autoen-
coder. arXiv, 2020.
Junxian He, Daniel Spokoyny, Graham Neubig, and Taylor Berg-Kirkpatrick. Lagging inference
networks and posterior collapse in variational autoencoders. In ICLR, 2019.
Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. NeurIPS,
2020.
Chin-Wei Huang, Jae Hyun Lim, and Aaron C Courville. A variational perspective on diffusion-
based generative models and score matching. NeurIPS, 2021.
Michael I Jordan, Zoubin Ghahramani, Tommi S Jaakkola, and Lawrence K Saul. An introduction
to variational methods for graphical models. Machine learning, 37(2):183–233, 1999.
Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. In ICLR, 2014.
Diederik P Kingma, Tim Salimans, Ben Poole, and Jonathan Ho. Variational diffusion models. In
NeurIPS, 2021.
Durk P Kingma, Tim Salimans, Rafal Jozefowicz, Xi Chen, Ilya Sutskever, and Max Welling. Im-
proved variational inference with inverse autoregressive flow. NeurIPS, 2016.
Anna Kuzina, Max Welling, and Jakub Mikolaj Tomczak. Alleviating adversarial attacks on varia-
tional autoencoders with mcmc. In NeurIPS, 2022.
James Lucas, George Tucker, Roger Grosse, and Mohammad Norouzi. Understanding posterior
collapse in generative latent variable models. Deep Generative Models for Highly Structured
DataICLR, 2019.
Lars Maaløe, Marco Fraccaro, and Ole Winther. Semi-supervised generation with cluster-aware
generative models. arXiv, 2017.
10
Lars Maaløe, Marco Fraccaro, Valentin Li ́evin, and Ole Winther. Biva: A very deep hierarchy of
latent variables for generative modeling. NeurIPS, 2019.
Eric Nalisnick, Akihiro Matsukawa, Yee Whye Teh, Dilan Gorur, and Balaji Lakshminarayanan. Do
deep generative models know what they don't know? In ICLR, 2019.
William B Pennebaker and Joan L Mitchell. JPEG: Still image data compression standard. Springer
Science & Business Media, 1992.
Yura Perugachi-Diaz, Jakub Tomczak, and Sandjai Bhulai. Invertible densenets with concatenated
lipswish. NeurIPS, 2021.
Adeel Pervez and Efstratios Gavves. Spectral smoothing unveils phase transitions in hierarchical
variational autoencoders. ICML, 2021.
Andreas Raue, Clemens Kreutz, Thomas Maiwald, Julie Bachmann, Marcel Schilling, Ursula
Klingm ̈uller, and Jens Timmer. Structural and practical identifiability analysis of partially ob-
served dynamical models by exploiting the profile likelihood. Bioinformatics, 25(15):1923–1929,
2009.
Ali Razavi, Aaron van den Oord, Ben Poole, and Oriol Vinyals. Preventing posterior collapse with
delta-vaes. In ICLR, 2019.
Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and
approximate inference in deep generative models. In ICML, 2014.
Samarth Sinha and Adji Bousso Dieng. Consistency regularization for variational auto-encoders.
NeurIPS, 2021.
Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised
learning using nonequilibrium thermodynamics. In ICML, 2015.
Casper Kaae Sønderby, Tapani Raiko, Lars Maaløe, Søren Kaae Sønderby, and Ole Winther. Ladder
variational autoencoders. NeurIPS, 2016.
Jakub Tomczak and Max Welling. Vae with a vampprior. In AISTATS, 2018.
Jakub M. Tomczak. Deep Generative Modeling. Springer Cham, 2022.
Belinda Tzen and Maxim Raginsky. Neural stochastic differential equations: Deep latent gaussian
models in the diffusion limit. arXiv, 2019.
Arash Vahdat and Jan Kautz. Nvae: A deep hierarchical variational autoencoder. NeurIPS, 2020.
Arash Vahdat, Karsten Kreis, and Jan Kautz. Score-based generative modeling in latent space.
NeurIPS, 2021.
Aaron Van Den Oord, Oriol Vinyals, et al. Neural discrete representation learning. NeurIPS, 2017.
Yixin Wang, David Blei, and John P Cunningham. Posterior collapse and latent variable non-
identifiability. NeurIPS, 2021.
Zhou Wang, Eero P Simoncelli, and Alan C Bovik. Multiscale structural similarity for image quality
assessment. In IEEE Conf. on Signals, Systems & Computers, 2003.
Antoine Wehenkel and Gilles Louppe. Diffusion priors in variational autoencoders. In INNFICML,
2021.
11
A POSTERIOR COLLAPSE AND VARIATIONAL DISTRIBUTION
Here, we present a discussion on the variational posterior collapse. To keep the notation unclut-
tered, we use z instead of z1:L. First, let us look into the Kullback-Leibler divergence between the
variational posterior and the real posterior:
DKL[qφ(z
x)
|
pθ(z
||
x)] =
|
=
=
=
=
(cid:90)
(cid:90)
−
−
−
qφ(z
x) ln
|
qφ(z
pθ(z
dz
x)
|
x)
|
x)dz
(cid:90)
qφ(z
x) ln qφ(z
|
H[qφ(z
H[qφ(z
H[qφ(z
x)]
|
x)]
|
x)]
|
−
−
qφ(z
x) ln pθ(z
|
|
−
Eqφ(z|x)[ln pθ(z
x)]
|
(cid:20)
pθ(x
|
pθ(x)
z)]
|
Eqφ(z|x) [ln pθ(x
Eqφ(z|x)
z)pθ(z)
ln
−
(cid:21)
−
(φ, θ; x).
= ln p(x)
− L
x)dz
|
Eqφ(z|x) [ln pθ(z)] + Eqφ(z|x) [ln pθ(x)]
In other words, the the Kullback-Leibler divergence between the variational posterior and the real
posterior calculated is equal to the difference between the true marginal likelihood and the ELBO.
Now, if we assume the variational posterior collapses, i.e., q(z
x) = p(z), then we get:
|
DKL[qφ(z
pθ(z
x)
|
||
|
pθ(z
x)]
|
x)] =DKL[p(z)
||
H[p(z)]
H[p(z)]
−
=
=
= ln pθ(x)
−
−
−
Ep(z) [ln pθ(x
z)]
|
z)] + H[p(z)] + ln pθ(x)
Ep(z) [ln pθ(x
|
z)]
−
Ep(z) [ln pθ(x
−
Ep(z) [ln pθ(z)] + Ep(z) [ln pθ(x)]
|
As a result, the gap between the collapsed variational posterior (qφ(z
posterior is equal to the difference between the marginal likelihood and Ep(z) [ln pθ(x
We can consider two cases, that is:
x) = pθ(z)) and the true
|
z)].
|
1. If the real posterior collapses, pθ(z
x) = pθ(z), then naturally the variational pos-
|
terior collapses. The reason is straightforward: We optimize the following objective:
DKL[qφ(z
pθ(z)].
2. If the variational posterior collapses, then depending on the expressive power of the con-
ditional likelihood pθ(x
z), the true posterior can also collapse. This follows from the fact
|
that if Ep(z) [ln pθ(x
z)]
|
ln p(x), then DKL[p(z)
x)] = 0, thus, pθ(z
p(z).
pθ(z
x)
≈
≈
||
|
|
x)
|
||
In the second point, it is still possible that the variational posterior can collapse and still the real
posterior is not collapsed (or it is "partially" collapsed, meaning that it gets closer to pθ(z)).
12
B POSTERIOR COLLAPSE AND LATENT VARIABLES NON-IDENTIFIABILITY
Proposition 1. Consider a top-down hierarchical VAE introduced in Section 2.2. Then, for a given
set of parameter values θ∗, the posterior of the latent variable zl collapses if and only if x and zl
are conditionally independent given (zl+1, . . . , zL).
Proof. To simplify the notation, let us split the latent variables of hierarchical VAEs into three
groups:
, zl
z1, . . . , zl−1
(cid:124)(cid:123)(cid:122)(cid:125)
(cid:125)
(cid:123)(cid:122)
(cid:124)
zB
zA
, zl+1, . . . , zL
(cid:124)
(cid:123)(cid:122)
(cid:125)
zC
.
(9)
We can do this for each l
and in the case of l = L, zC is an empty set. Then, the posterior collapse implies pθ∗ (zB
pθ∗ (zB
pθ∗ (x
additionally conditioned on zC.
1, . . . , L, assuming that in the corner case of l = 1, zA is an empty set,
zC, x) =
|
zB, zC) =
|
|
zC). The proof follows directly from Theorem 1 in (Wang et al., 2021), where everything is
|
■
zC), and the conditional independence is exactly the following equality: pθ∗ (x
∈
Note, however, that the conditional independence in Proposition 1 is not the same as the latent
variable non-identifiability which is defined as follows:
where z−l = (z1, . . . , zl−1, zl+1, . . . , zL). To see how latent variable non-identifiability is con-
nected to posterior collapse (Eq. 2) in hierarchical VAE, we start with the following proposition.
pθ∗ (x
|
z1:L) = pθ∗ (x
z−l),
|
(10)
Proposition 2. Consider a top-down hierarchical VAE introduced in Section 2.2. If x and zl are
conditionally independent given (zl+1, . . . , zL), then the latent variable zl is non-identifiable. How-
ever, if zl is non-identifiable, it does not imply that it is conditionally independent with x given
(zl+1, . . . , zL).
zC).
zB, zC) = pθ∗ (x
|
zA, zB, zC) = pθ∗ (x
|
Proof. Let us utilize the same notation as in Proposition 1. Consider conditional independence,
namely pθ∗ (x
In other words, if we consider a corresponding graphi-
|
cal model, all the paths from zB to x should go through zC. Then, for any zA it holds that
pθ∗ (x
zA, zC). This can be proved by contradiction. If this is not true, then
|
there exists a path from zB to x, which does not go through zA or zC. Therefore, there exists a path
from zB to x, which does not go through zC. This contradicts the initial assumption. In summary,
we have shown that if zl and x are conditionally independent given (zl+1, . . . zL), then they are
also conditionally independent given (zl, . . . zl−1, zl+1, . . . zL), which is the definition of the latent
variable non-identifiability.
To see that the opposite is false, consider the
counter example in Figure 7. In this graphical
model, zB and x are conditionally independent
given zA, zC. Namely, all the paths from zB
to x go through either zA or zC. However, if
we are given only zC, there is still a path from
zB to x (going through zA). Therefore, zB
and x are not conditionally independent given
zC. This implies that the latent variable non-
identifiability does not imply conditional inde-
■
pendence.
zC
zB
zA
x
Figure 7: Example of a graphical model where zB
and x are conditionally independent given zA, zC
(non-idetifiability). However, they are not condi-
tionally independent given only zC, since there is
an additional path from zB to x through zA.
13
C BACKGROUND OF DIFFUSION PROBABILISTIC MODELS
Diffusion Probabilistic Models or Diffusion-based Deep Generative Models (Ho et al., 2020; Sohl-
Dickstein et al., 2015) constitute a class of generative models that can be viewed as a special case of
the Hierarchical VAEs (Huang et al., 2021; Kingma et al., 2021; Tomczak, 2022; Tzen & Raginsky,
2019).
Denoting the last latent (context) zL
y0 and auxiliary latent variables yt, t = 1, . . . , T , we
define a generative model, also referred to as the backward (or reverse) process, as a Markov
0, I), that is: pγ(y0, . . . , yT ) =
chain with Gaussian transitions starting with p(yT ) =
|
p(yT ) (cid:81)T
(yt−1; μγ(yt, t), Σγ(yt, t)).
yt) =
(yT
N
≡
t=0 pγ(yt−1
yt), where pγ(yt−1
|
|
N
Let us further define αt = 1
can be seen as Gaussian linear models, we can analytically calculate the following distributions:
i=0 αi. Since the conditionals in the forward diffusion
−
βt and αt = (cid:81)t
q(yt−1
q(yt
y0) =
|
yt, x0) =
|
√
N
αt(1−αt−1)
1−αt
N
(yt; √αty0, (1
αt)I),
(yt−1; ̃μ(yt, y0), ̃βtI),
−
(11)
(12)
yt, and ̃βt = 1−αt−1
1−αt
βt. We can use (11) and (12) to
√αt−1βt
1−αt
where ̃μ(yt, y0) =
define the variational lower bound as follows:
Lvlb = Eq(y1|y0)[ln pγ(y0
y0 +
(cid:124)
(cid:123)(cid:122)
−L0
y1)]
|
(cid:125)
−
DKL [q(yT
(cid:124)
y0)
|
(cid:123)(cid:122)
LT
p(yT )]
∥
(cid:125)
(13)
T
(cid:88)
t=2
−
Eq(yt|y0)DKL [q(yt−1
|
(cid:124)
(cid:123)(cid:122)
Lt−1
yt, y0)
∥
pγ(yt−1
.
yt)]
|
(cid:125)
Parameters γ of the diffusion model and parameters θ, φ of the hierarchical VAE are optimized
simultaneously with the joint objective Eq. 7, where we use the lower bound (Eq. 13) instead of the
ln pγ(f (x)) term.
The conditional distribution over the context We assume that the context is a discrete random
variable. Therefore, it is important to choose an appropriate family of conditional distributions
pγ(y0
1, 1], and use the discretized
(binned) Gaussian distribution:
y1). Following Ho et al. (2020), we scale y0 linearly to [
|
−
pγ (y0
y1) =
|
D
(cid:89)
i=1
(cid:90) δ+(xi
0)
δ−(xi
0) N
(cid:0)x; μi
γ (x1, 1) , σ2
1
(cid:1) dx,
where D is the dimensionality of y0, and i denotes one coordinate of y0, and:
(cid:26)
δ+(x) =
∞
x + 1
b
if x = 1
if x < 1
δ−(x) =
(cid:26)
−∞
x
−
1
b
if x =
if x >
,
1
1
−
−
where b is the bin width determined based on training data.
(14)
(15)
14
D CIFAR10 EXPERIMENTS
In addition to the binary datasets, we perform experiments on natural images. We used the CIFAR10
dataset, which is a common benchmark in VAE literature. We report the results in n Table 5. We
observe that our approach works on par with the generative models which have comparable sizes
(OU-VAE, Residual Flows, GLOW). However, there are models with much larger sizes (e.g. VD-
VAE, NVAE), which perform better. Unfortunately, we do not have the computational resources to
train a comparable-size model. Instead, we compare the DCT-VAE with our implementation of the
smaller-size VDVAE.
Table 5: The test performance on CIFAR10 dataset. We compare the total number of trainable
parameters (Size), the number of stochastic layers (L), and NLL.
† Results with data augmentation.
MODEL
SIZE
L
BITS/DIM ≤ ↓
DCT-VAE (ours)
Small VDVAE
(our implementation)
Attentive VAE
(Apostolopoulou et al., 2022)
VDVAE (Child, 2021)
Residual flows
(Perugachi-Diaz et al., 2021)
i-DenseNet flows
(Perugachi-Diaz et al., 2021)
OU-VAE
(Pervez & Gavves, 2021)
CR-NVAE
(Sinha & Dieng, 2021)
NVAE
(Vahdat & Kautz, 2020)
BIVA (Maaløe et al., 2019)
GLOW
(Nalisnick et al., 2019)
IAF-VAE
(Kingma et al., 2016)
22M 29
21M 29
119M 16
39M 45
25M 1
25M 1
10M 3
131M 30
- 30
103M 15
- 1
- 12
3.26
3.28
2.79
2.87
3.28
3.25
3.39
2.51†
2.91
3.08
3.46
3.11
15
Figure 8: A diagram of the top-down hierarchical VAE with the context. The decoder consists of
TopDown blocks (blue), which take as input features from the block above hDec
l+1 and the features
from the encoder hEnc
l+1 (only during training). Dotted lines denote that zl is a sample from the prior
(in the generative mode) or from the variational posterior (in the reconstruction mode). The context
(in red) is added to the features of the decoder at the beginning of each scale. The encoder consists
of ResNet blocks (green) We use the same ResNet blocks in the TopDown blocks.
E MODEL DETAILS
E.1 ARCHITECTURE
We schematically depict the proposed deep hierarchical VAE in Figure 8. We extend the architecture
presented in (Child, 2021) by using a deterministic, non-trainable function to create latent variable
zL (the context). It is then used to train the prior pθ(zL), and to obtain ̃xcontext that is eventually
passed to every level (scale) of the top-down decoder.
16
TopDown Block lhEncl+1hDecl+1hDeclqφ(zl|zl+1:L,x)pθ(zl|zl+1:L) ̃zlContext Block ̃xcontexthDecihDeciResNet Blockhi+1hiav.poolingconv1×1conv3×3conv3×3conv1×1conv1×1conv1×1TopDown 1Av. PoolingAv. PoolingUpsamplezLlnpθ(zL) ̃xcontextL−1...Upsample2...L−2Table 6: Full list of hyperparameters.
MNIST
OMNIGLOT
CIFAR10
VAE
DCT-VAE
VAE
DCT-VAE
VAE
DCT-VAE
AdamW
Cosine
1e-3
1e-5
1e-2
600
1
100
0
1
128
AdamW
Cosine
1e-3
1e-5
1e-2
600
1
100
0
1
128
142,
72.
4
×
4
×
8
1
142,
72.
4
×
3
×
142,
72.
4
×
4
×
142,
72.
4
×
3
×
8
1
6
6
×
-
×
1
32
40
FALSE
SiLU
Bernoulli
7
7
×
×
1
32
40
FALSE
SiLU
Bernoulli
AdamW
Cosine
4e-4
5e-5
1e-2
8000
0.2
100
0
4
96
29
10
322,
10
3
×
×
×
162, 5
42, 1
82,
×
12.
×
-
10
2
8
×
×
3
10
322,
×
162, 5
42, 1
82,
×
12.
×
6
6
×
×
384
96
TRUE
SiLU
Discretized Logisitc Mixture
7
1
3
32
linear
-
-
-
-
-
7
1
3
32
linear
-
-
-
-
-
40
2
3
64
linear
-
-
-
-
-
-
n
o
i
t
a
z
i
m
i
t
p
O
e
r
u
t
c
e
t
i
h
c
r
A
Optimizer
Scheduler
Starting Learning rate
End Learning rate
Weight Decay
# Epochs
Grad. Clipping
Grad. Skipping Threshold
EMA rate
# GPUs
Batch Size (per GPU)
L
Latent Sizes
Latent Width
Context Size
# Channels (input)
# Channels (hidden)
Weight Norm
Activation
Likelihood
r # Diffusion Steps
o
i
r
# Scales in UNet
P
# ResBlocks per Scale
# Channels
β schedule
t
x
e
t
n
o
C
E.2 HYPERPARAMETERS
In Table 6, we report all the hyperparameter values that were used to train the baseline VAE and
DCT-VAE.
The context Prior We use the diffusion generative model as a prior over the context. As a back-
bone, we use UNet implementation from (Dhariwal & Nichol, 2021) which is available on GitHub2
with the hyperparameters provided in Table 6.
2https://github.com/openai/guided-diffusion
17
F DOWNSAMPLING-BASED CONTEXT
In this work, we propose a DCT-based context. However, downsampling can also be used to create
a lower-dimensional representation of the input. Therefore, we conducted an ablation study where
we used downsampled-based context. Results of this experiment can be found in Section 5.1.
To create a downsampling-based context we use average pooling, as shown in Algorithm 3. Then,
we can decode it back by simply using nearest-neighbours upsampling (Algorithm 4).
Algorithm 3 Create context: downsampling
Input: x, v
zDownsample = Av. Pooling(x, v)
zDownsample = quantize(zDownsample)
Return: zDownsample
Algorithm 4 Decode context: downsampling
Input: zDownsample, D
▷ Apply nearest neighbour upsampling
̃xcontext = Upsampling(zDownsample, D)
Return: ̃xcontext
18
G COMPRESSION
To find out how much information about the data is preserved in the top latent variable, we conduct
an experiment where we use the baseline VDVAE and the DCT-VAE pretrained on CIFAR10 for
compression. We use the KODAK dataset, which is a standard compression benchmark containing
24 images with resolution 512
32, we independently encode
768. Since CIFAR10 images are 32
patches of KODAK images. We then reconstruct each patch using only a part of the latent variables
and combine these patches to obtain final reconstructions.
×
×
In Figure 9, we present non-cherry-picked reconstructions from the compression experiment. We
use a single latent variable (only context) for DCT-VAE and two top latent variables for the baseline
model. We sample the rest of the latent variables from the prior distribution with a temperature
equal to 0.1. We also show images compressed with JPEG for comparison. We use PSNR and
MSSSIM to measure the reconstruction error. We report KL-divergence converted to bits-per-pixel
as a compression rate. All latent variables (except for the context in DCT-VAE) are continuous.
19
(a) VAE
(b) DCT-VAE
(c) JPEG
Figure 9: Examples of the compressed images. We use 2 top latent variables of VDVAE to recon-
struct the image in col. (a) and only context of DCT-VAE in col. (b). We choose JPEG compression
to have a similar PSNR value to DCT-VAE (col. c).
20
PSNR=18.0,MSSSIM=0.36,BPP*=0.05PSNR=23.8,MSSSIM=0.80,BPP=0.17PSNR=23.9,MSSSIM=0.78,BPP=0.31PSNR=17.7,MSSSIM=0.35,BPP*=0.06PSNR=25.7,MSSSIM=0.79,BPP=0.17PSNR=27.7,MSSSIM=0.83,BPP=0.29PSNR=15.6,MSSSIM=0.27,BPP*=0.05PSNR=19.8,MSSSIM=0.75,BPP=0.19PSNR=18.7,MSSSIM=0.59,BPP=0.30PSNR=15.7,MSSSIM=0.29,BPP*=0.05PSNR=23.3,MSSSIM=0.83,BPP=0.20PSNR=22.9,MSSSIM=0.79,BPP=0.33PSNR=15.2,MSSSIM=0.35,BPP*=0.05PSNR=26.0,MSSSIM=0.79,BPP=0.15PSNR=26.3,MSSSIM=0.81,BPP=0.31PSNR=15.2,MSSSIM=0.38,BPP*=0.05PSNR=25.1,MSSSIM=0.84,BPP=0.19PSNR=26.6,MSSSIM=0.84,BPP=0.32H ROBUSTNESS TO ADVERSARIAL ATTACKS
In (Kuzina et al., 2022) it was shown that the top latent of deep hierarchical VAEs can be easily
"fooled" by the most straightforward methods of attack construction, and thus, it could serve as a
diagnostic tool to assess the robustness of the latent space. Here, we follow this line of thought to
assess the robustness of the DCT-VAE. For each dataset, we use 50 test points (5 different random
initializations) to construct latent space attacks on the VDVAE and the DCT-VAE. In Figure 10,
we present the average similarity between the real reconstruction and the attacked reconstruction
measured by MSSSIM depending on the latent layers under attack. In all cases, we see a clear
advantage in using the DCT-based context. For MNIST and CIFAR10, the DCT-VAE provides
much better robustness for the two latent layers under attack. In general, the DCT-VAE seems to be
less affected by adversarial attacks than the VDVAE.
(a) MNIST
(b) OMNIGLOT
(c) CIFAR10
Figure 10: The adversarial robustness measured by MSSSIM.
21
2468LatentLayersUnderAttack0.50.60.70.80.9MSSSIMVDVAEDCT-VAE2468LatentLayersUnderAttack0.70.80.9MSSSIMVDVAEDCT-VAE246810LatentLayersUnderAttack0.10.20.30.40.50.6MSSSIMVDVAEDCT-VAE |
|
http://arxiv.org/abs/2302.09967v1 | 2023-02-20T13:25:23 | 2023-02-20T13:25:23 | Stability-based Generalization Analysis for Mixtures of Pointwise and
Pairwise Learning | Recently, some mixture algorithms of pointwise and pairwise learning (PPL)
have been formulated by employing the hybrid error metric of "pointwise loss +
pairwise loss" and have shown empirical effectiveness on feature selection,
ranking and recommendation tasks. However, to the best of our knowledge, the
learning theory foundation of PPL has not been touched in the existing works.
In this paper, we try to fill this theoretical gap by investigating the
generalization properties of PPL. After extending the definitions of
algorithmic stability to the PPL setting, we establish the high-probability
generalization bounds for uniformly stable PPL algorithms. Moreover, explicit
convergence rates of stochastic gradient descent (SGD) and regularized risk
minimization (RRM) for PPL are stated by developing the stability analysis
technique of pairwise learning. In addition, the refined generalization bounds
of PPL are obtained by replacing uniform stability with on-average stability. | [
"Jiahuan Wang",
"Jun Chen",
"Hong Chen",
"Bin Gu",
"Weifu Li",
"Xin Tang"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09967v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09967v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.AI"
] | 3
2
0
2
b
e
F
0
2
]
G
L
.
s
c
[
1
v
7
6
9
9
0
.
2
0
3
2
:
v
i
X
r
a
Stability-based Generalization Analysis for Mixtures of Pointwise and Pairwise
Learning
Jiahuan Wang1, Jun Chen2, Hong Chen1, 3, 4,*, Bin Gu5, Weifu Li1, 3, 4, Xin Tang6
1College of Science, Huazhong Agricultural University, Wuhan 430070, China
2College of Informatics, Huazhong Agricultural University, Wuhan 430070, China
3Engineering Research Center of Intelligent Technology for Agriculture, Ministry of Education, Wuhan 430070, China
4Key Laboratory of Smart Farming for Agricultural Animals, Wuhan 430070, China
5Mohamed bin Zayed University of Artificial Intelligence, Abu Dhabi, UAE
6Ping An Property & Casualty Insurance Company, Shenzhen, China
[email protected]
Abstract
Recently, some mixture algorithms of pointwise and pair-
wise learning (PPL) have been formulated by employing
the hybrid error metric of "pointwise loss + pairwise loss"
and have shown empirical effectiveness on feature selection,
ranking and recommendation tasks. However, to the best of
our knowledge, the learning theory foundation of PPL has not
been touched in the existing works. In this paper, we try to fill
this theoretical gap by investigating the generalization prop-
erties of PPL. After extending the definitions of algorithmic
stability to the PPL setting, we establish the high-probability
generalization bounds for uniformly stable PPL algorithms.
Moreover, explicit convergence rates of stochastic gradient
descent (SGD) and regularized risk minimization (RRM) for
PPL are stated by developing the stability analysis technique
of pairwise learning. In addition, the refined generalization
bounds of PPL are obtained by replacing uniform stability
with on-average stability.
Introduction
There are mainly two paradigms to formulate machine learn-
ing systems including pointwise learning and pairwise learn-
ing. Usually, the former aims to train models under the error
metric associated with single sample, while the latter con-
cerns the relative relationships between objects measured by
the loss related to the pair of samples. Besides wide appli-
cations, the theoretical foundations of the above paradigms
have been well established from the viewpoint of statistical
learning theory, e.g., pointwise stability analysis (Bousquet
and Elisseeff 2002; London, Huang, and Getoor 2016; Sun,
Li, and Wang 2021), pairwise stability analysis (Agarwal
and Niyogi 2009; Lei, Ledent, and Kloft 2020; Lei, Liu, and
Ying 2021), and uniform convergence analysis (Cl ́emenc ̧on,
Lugosi, and Vayatis 2008; Rejchel 2012; Cao, Guo, and
Ying 2016; Ying, Wen, and Lyu 2016; Ying and Zhou 2016).
It is well known that pointwise (or pairwise) learning en-
joys certain advantages and limitations for real-world data
analysis. For the same number of samples, pointwise learn-
ing has computation feasibility due to its low model com-
*Corresponding author.
Copyright © 2023, Association for the Advancement of Artificial
Intelligence (www.aaai.org). All rights reserved.
plexity, while pairwise learning can mine valuable informa-
tion in terms of the intrinsic relationship among samples. As
illustrated by Wang et al. (2016), the degraded performance
may occur for the pointwise learning with the ambiguity of
some labels and for the pairwise learning as samples in dif-
ferent categories have similar features. Therefore, it is natu-
ral to consider the middle modality of the above paradigms
to alleviate their drawbacks. Along this line, some learning
algorithms have been proposed under the pointwise and pair-
wise learning (PPL) framework, where the pointwise loss
and the pairwise loss are employed jointly (Liu and Zhang
2015; Wang et al. 2016; Lei et al. 2017; Zhuo et al. 2022;
Wang et al. 2022a). In PPL, its pointwise part concerns the
fitting ability to empirical observations and its pairwise part
addresses the stability or robustness of learning models (Liu
and Zhang 2015). While the studies on algorithmic design
and applications are increasing, there are far fewer results to
investigate the generalization ability of PPL in theory.
As one of the main routines of learning theory analy-
sis, the algorithmic stability tools have advantages in some
aspects, such as dimensional independence and adaptivity
for broad learning paradigms (Bousquet and Elisseeff 2002;
Shalev-Shwartz et al. 2010; Hardt, Recht, and Singer 2016;
Feldman and Vondrak 2018, 2019). Specially, the stability
and generalization have been well understood recently for
stochastic gradient descent (SGD) and regularized risk min-
imization (RRM) under both the pointwise learning (Hardt,
Recht, and Singer 2016; Lei and Ying 2020) and the pairwise
learning setting (Lei, Ledent, and Kloft 2020; Lei, Liu, and
Ying 2021). Inspired by the recent progress, in this paper,
we try to fill this theoretical gap of PPL by establishing its
generalization bounds in terms of the algorithmic stability
technique. To the best of our knowledge, this is the first the-
oretical understanding of generalization properties for PPL.
The main work of this paper is two-fold: One is to es-
tablish a relationship between uniform stability and estima-
tion error for the mixture setting, which can be considered as
natural extension of the related results in (Lei, Ledent, and
Kloft 2020; Lei, Liu, and Ying 2021). The other is to char-
acterize the stability-based generalization bounds for some
PPL algorithms (i.e. SGD and RRM) under mild conditions.
Objective function
Reference
Optimization
Application
Generalization analysis
Pointwise loss +Pairwise loss
+Regularization
Liu and Zhang (2015)
ACG
Feature Selection
Wang et al. (2016)
ADMM
Image Classification
Lei et al. (2017)
Wang et al. (2022a)
SGD
SGD
Ranking
Recommendation
No
No
No
No
Table 1: Summary of pointwise and pairwise learning (ACG: Accelerated Proximal Gradient; ADMM: Alternating Direction
Method of Multipliers).
Related Work
To better evaluate our theoretical results, we review the re-
lated works on PPL and generalization analysis.
Pointwise and pairwise learning (PPL). In recent years,
some algorithms of PPL have been designed for learning
tasks such as feature selection, image classification, ranking,
and recommendation systems. Liu and Zhang (2015) pro-
posed a pairwise constraint-guided sparse learning method
for feature selection, where the pairwise constraint is used
for improving robustness. For image classification tasks,
Wang et al. (2016) designed a novel joint framework, called
pointwise and pairwise image label prediction, to predict
both pointwise and pairwise labels and achieved superior
performance. For emphasis selection tasks, Huang et al.
(2020) employed a pointwise regression loss and a pairwise
ranking loss simultaneously to fit models. Recently, Lei et al.
(2017) proposed an alternating pointwise-pairwise ranking
to improve decision performance. Zhuo et al. (2022) and
Wang et al. (2022a) formulated hybrid learning models for
the recommendation systems. Although the empirical effec-
tiveness has been validated for the above PPL algorithms,
their theoretical foundations (e.g., generalization guarantee)
have not been investigated before. To further highlight the
gap in generalization analysis, we summarize the basic prop-
erties of PPL models in Table 1.
Generalization analysis. From the viewpoint of statisti-
cal learning theory, generalization analysis is crucial since
it provides the statistical theory support for the empirical
performance of trained models. Usually, model training is a
process of calculating loss based on data and then seeking an
optimal function in the predetermined hypothetical function
space through an optimization algorithm. Naturally, the gen-
eralization performance of learning systems can be investi-
gated from the perspectives of hypothetical function space
(Smale and Zhou 2007; Yin, Kannan, and Bartlett 2019; Lei
and Tang 2021; Wang et al. 2020) and data (Bousquet and
Elisseeff 2002; Elisseeff et al. 2005; Shalev-Shwartz et al.
2010), respectively. The former is often called uniform con-
vergence analysis and the latter is realized by stability anal-
ysis. In essential, the uniform convergence analysis consid-
ers the capacity of hypothesis space (e.g., via VC-dimension
(Vapnik, Levin, and Le Cun 1994), covering numbers (Zhou
2002; Chen et al. 2017, 2021), Rademacher complexity
(Yin, Kannan, and Bartlett 2019)), while the stability analy-
sis concerns the change of model parameters caused by the
change of training data (Bousquet and Elisseeff 2002; Lei,
Liu, and Ying 2021). Algorithmic stability has shown re-
markable effectiveness in deriving dimension-independent
generalization bounds for wide learning frameworks. A clas-
sic framework for stability analysis is developed by Bous-
quet and Elisseeff (2002), in which the uniform stability
and hypothesis stability are introduced. Subsequently, the
uniform stability measure was extended to study stochastic
algorithms (Elisseeff et al. 2005; Hardt, Recht, and Singer
2016) and inspired several other stability concepts including
uniform argument stability (Liu et al. 2017), locally elastic
stability (Deng, He, and Su 2021), on-average loss stability
(Lei, Ledent, and Kloft 2020; Lei and Ying 2020; Lei, Liu,
and Ying 2021) and on-average argument stability (Shalev-
Shwartz et al. 2010; Lei, Liu, and Ying 2021).
From the lens of learning paradigms, generalization guar-
antees have been established for various pointwise learning
algorithms (Bousquet and Elisseeff 2002; London, Huang,
and Getoor 2016; Hardt, Recht, and Singer 2016; Lei and
Ying 2020; Sun, Li, and Wang 2021; Klochkov and Zhivo-
tovskiy 2021) and pairwise learning models (Agarwal and
Niyogi 2009; Lei, Ledent, and Kloft 2020; Lei, Liu, and
Ying 2021; Yang et al. 2021). Therefore, it is natural to ex-
plore the generalization properties of PPL by the means of
the stability analysis technique.
Preliminaries
This section introduces the problem formulation of PPL and
the definitions of algorithmic stability.
Pointwise and Pairwise Learning
Consider a training dataset S := {zi}n
i=1, where each zi is
independently drawn from a probability measure ρ defined
over a sample space Z = X × Y. Here, X ⊂ Rd is an input
space of dimension d and Y ⊂ R is an output space. Let
W be a given parameter space of learning models. The goal
of pointwise learning is to find a parameter w based model
such that the population risk (or expected risk), defined as
Rpoint(w) = Ez[f (w; z)],
is as small as possible, where f : W × Z → [0, ∞) is a
pointwise loss and Ez denotes the expectation with respect
to z ∼ ρ. For brevity, we also use w to denote the parameter
w based model in the sequel.
However, we can't get the minimizer of Rpoint(w) di-
rectly since the intrinsic distribution ρ is unknown. As a nat-
ural surrogate, for algorithmic design, we often consider the
corresponding empirical risk defined as
Rpoint
S
(w) =
n
(cid:88)
f (w; zi) .
1
n
i=1
Unlike the pointwise learning,
the pairwise learning
model w is measured by
Rpair(w) = Ez, ̃z[g(w; z, ̃z)],
where g : W × Z × Z → [0, ∞) is a pairwise loss function
and Ez, ̃z denotes the expectation with respect to z, ̃z ∼ ρ. In
pairwise learning models, Rpair(w) is approximately char-
acterized by the empirical risk
Rpair
S
(w) =
1
n(n − 1)
(cid:88)
g (w; zi, zj) ,
i,j∈[n]:i(cid:54)=j
where zi, zj ∼ ρ and [n] := {1, . . . , n}.
In this paper, we consider a mixture paradigm of point-
wise learning and pairwise learning, called pointwise and
pairwise learning (PPL). The population risk of w in PPL is
R(w) = τ Rpoint(w) + (1 − τ )Rpair(w),
where τ ∈ [0, 1] is a tuning parameter. Given training set
S, the corresponding empirical version of R(w) is
S
S
(w).
RS(w) = τ Rpoint
(w) + (1 − τ )Rpair
(1)
For brevity, A(S) denotes the derived model by apply-
ing algorithm A (e.g., SGD and RRM) on S. In the process
of training and adjustment of parameters, the output model
A(S) can be a small empirical risk since we often can fit
training examples perfectly. However, the empirical effec-
tiveness of A(S) can not assure the small population risk. In
statistical learning theory, the difference between the popu-
lation risk and empirical risk
R(w) − RS(w)
(2)
is called the generalization error of learning model w. It is
key concern of this paper to bound this gap in theory.
Algorithmic stability
Algorithmic stability is an important concept in statistical
learning, which measures the sensitivity of an algorithm to
the perturbation of training sets. This paper focuses on the
analysis techniques associated with the algorithmic uniform
stability (Bousquet and Elisseeff 2002; Elisseeff et al. 2005;
Agarwal and Niyogi 2009; Hardt, Recht, and Singer 2016),
on-average loss stability (Lei, Ledent, and Kloft 2020; Lei
and Ying 2020; Lei, Liu, and Ying 2021), and on-average
argument stability (Shalev-Shwartz et al. 2010; Lei, Liu, and
Ying 2021). To match the generalization analysis of PPL
algorithms, we firstly extend the definitions of algorithmic
stability (e.g., the pointwise uniform stability (Bousquet and
Elisseeff 2002) and pairwise uniform stability (Lei, Ledent,
and Kloft 2020)) to the PPL setting.
Let S = {z1, . . . , zn} and S(cid:48) = {z(cid:48)
1, . . . , z(cid:48)
n} be indepen-
dently drawn from ρ. For any i < j, i, j ∈ [n], denote
Si = {z1, . . . , zi−1, z(cid:48)
i, zi+1, . . . , zn}
(3)
and
Si,j = (cid:8)z1, . . . , zi−1, z(cid:48)
i, zi+1, . . . , zj−1, z(cid:48)
j, zj+1, . . . , zn
(cid:9) .
(4)
Definition 1. (PPL Uniform Stability). Assume that f (*; z)
is a pointwise loss function and g(*; z, ̃z) is a pairwise loss
function. We say A : Z n (cid:55)→ W is PPL γ-uniformly stable, if
for any training datasets S, Si ∈ Z n
max {Upoint, Upair} ≤ γ, ∀i ∈ [n],
where Upoint = supz∈Z |f (A(S); z) − f (A (Si) ; z)| and
Upair = supz, ̃z∈Z |g(A(S); z, ̃z) − g (A (Si) ; z, ̃z)|.
Remark 1. Denote
(cid:96)(A(Si); z, ̃z) := τ f (A(Si); z) + (1 − τ )g(A(Si); z, ̃z)
for simplicity, and call it as the PPL loss function. Then,
we can define the weaker stability measure by replacing the
maximum in Definition 1 with
sup
z, ̃z∈Z
|(cid:96)(A(S); z, ̃z) − (cid:96) (A (Si) ; z, ̃z)| ≤ γ.
Following the mixture stability associated with τ , we can
also get the similar generalization results as Theorems 1 and
2 in the next section.
We then introduce the definitions of PPL on-average loss
stability and PPL on-average argument stability described as
follows.
Definition 2. (PPL On-average Loss Stability). Let f (*; z)
be a pointwise loss function and let g(*; z, ̃z) be a pairwise
loss function. We say A : Z n (cid:55)→ W is PPL γ-on-average
loss stable if, for any training datasets S, Si, Si,j ∈ Z n,
max {Vpoint, Vpair} ≤ γ, ∀i < j ∈ [n],
where
Vpoint =
1
n
(cid:88)
i∈[n]
ES,S(cid:48) [f (A (Si) ; zi) − f (A(S); zi)]
and
Vpair =
(cid:80)
i,j∈[n]
ES,S(cid:48) [g (A (Si,j) ; zi, zj) − g (A(S); zi, zj)]
n(n − 1)
.
Remark 2. Definition 2 is built by combining the on-
average loss stability for pointwise learning (Shalev-
Shwartz et al. 2010; Lei and Ying 2020) with the one for
pairwise learning (Lei, Ledent, and Kloft 2020; Lei, Liu, and
Ying 2021). The requirement of PPL on-average loss stabil-
ity is milder than the PPL uniform stability, where the sta-
bilization is not measured by the changes of all samples but
the mean of training sets.
Definition 3. (PPL On-average Argument Stability). We say
A : Z n (cid:55)→ W is PPL (cid:96)1 γ-on-average argument stable if,
for any training datasets S, Si ∈ Z n,
max {ES,S(cid:48),A[Hpoint], ES,S(cid:48),A[Hpair]} ≤ γ,
(5)
where Hpoint = 1
n
(cid:80)
(cid:80)n
i=1 (cid:107)A(S) − A(Si)(cid:107)2 and Hpair =
i,j∈[n]:i(cid:54)=j (cid:107)A(S) − A(Si,j)(cid:107)2.
1
n(n−1)
We say A is PPL (cid:96)2 γ-on-average argument stable if, for any
training datasets S, Si ∈ Z n,
ES,S(cid:48),A
(cid:104) 1
n
n
(cid:88)
i=1
(cid:107)A(S) − A(Si)(cid:107)2
2
(cid:105)
≤ γ2.
Remark 3. The (cid:96)2 on-average argument stability of PPL is
similar with that of pointwise learning (Lei and Ying 2020)
and pairwise learning (Lei, Liu, and Ying 2021). Differently
from Definition 1, which relied on the drift of loss functions,
Definition 2, 3 measures the stability in terms of the changes
of the model A(S).
Main Results
In this section, we present our main results on the general-
ization bounds of PPL algorithms based on uniform stability
and on-average stability.
Uniform stability-based generalization
This subsection establishes the relationship between the gen-
eralization ability and the uniform stability for PPL. In the
sequel, e represents the base of the natural logarithm, (cid:100)a(cid:101)
means the smallest integer which is no less than a. Supple-
mentary Material B.1 provides the detailed proof of the fol-
lowing theorem.
Theorem 1. Let A : Z n (cid:55)→ W be PPL γ-uniformly stable.
Assume that
max
z, ̃z∈Z
{|ES[f (A(S); z)]| , |ES[g(A(S); z, ̃z)]|} ≤ M
for some positive constant M . Then, for all τ ∈ [0, 1] and
δ ∈ (0, 1/e), we have, with probability 1 − δ,
|RS(A(S)) − R(A(S))|
≤(4 − 2τ )γ + e
√
(cid:16)
4M (4 − 3τ )n− 1
2 (cid:112)log(e/δ)
(cid:17)
+ 24
2(2 − τ )γ (cid:100)log2(n)(cid:101) log(e/δ)
.
Remark 4. Theorem 1 is a high-probability generalization
bound for uniformly stable PPL algorithms, motivated by
the recent analyses in the pointwise learning (Hardt, Recht,
and Singer 2016) and the pairwise learning (Lei, Ledent,
and Kloft 2020; Lei, Liu, and Ying 2021). Similar to Lei,
Ledent, and Kloft (2020), the error estimations of the point-
wise part and the pairwise part of PPL are obtained by ap-
plying and developing the concentration inequality (Bous-
quet, Klochkov, and Zhivotovskiy 2020). Ignoring the con-
stants (e.g. M , τ , log(e/δ)), we can get the convergence or-
der O(n− 1
2 + γ log2 n) from Theorem 1. Due the generality
and flexibility of PPL induced by τ ∈ [0, 1], the derived con-
nection, between uniform stability and generalization, con-
tains the previous results for pairwise learning (Lei, Ledent,
and Kloft 2020) as special example.
Remark 5. To better understand the stability-based gener-
alization bound, we summarize the main results about the
relationships between generalization and various definitions
of algorithmic stability in Table 2. In this table, for feasibil-
ity, we denote the generalization error as
Gen := R(A(S)) − RS(A(S))
and denote the expected generalization error as
EGen := ES,A[R(A(S)) − RS(A(S))].
Table 2 demonstrates our characterized relations are com-
parable with the existing results.
Generalization bounds of SGD for PPL
As a popular computing strategy, SGD has been employed
for PPL as shown in Table 1. The SGD for PPL can be re-
garded as an elastic net version of pointwise SGD and pair-
wise SGD, which involves the gradients of the pointwise loss
function f and the pairwise loss function g. At the t-th iter-
ation, (it, jt) is taken from the uniform distribution over [n]
randomly, which requires it (cid:54)= jt. The SGD for the PPL
model is updated by
wt+1 = wt−ηt (τ ∇f (wt; zit) + (1 − τ )∇g (wt; zit, zjt)) ,
(6)
where {ηt}t is a step size sequence, and ∇f (wt; zit) and
∇g (wt; zit, zjt) denote the subgradients of f (*; zit) and
g (*; zit, zjt) at wt, respectively.
To bound the gradient update process of SGD, it is neces-
sary to presume some properties of the loss functions. For
brevity, we just recall some conditions for pointwise loss
function (Hardt, Recht, and Singer 2016; Lei and Ying 2020)
since the definitions of pairwise setting are analogous.
Definition 4. A loss function f : W × Z → [0, ∞) is σ-
strongly convex if
f (u) ≥ f (v) + (cid:104)∇f (v), u − v(cid:105) +
Specially, f is convex if σ = 0.
σ
2
(cid:107)u − v(cid:107)2
2, ∀u, v ∈ W.
Clearly, a strongly convex loss function must be convex,
but the contrary may not be true. It is well known that con-
vexity is crucial for some optimization analyses of learn-
ing algorithms (Hardt, Recht, and Singer 2016; Harvey et al.
2019).
Definition 5. A loss function f : W × Z → [0, ∞) is L-
Lipschitz if
|f (u) − f (v)| ≤ L(cid:107)u − v(cid:107)2, ∀u, v ∈ W.
The above inequality is equivalent to the gradient bound-
edness of f , i.e. (cid:107)∇f (x)(cid:107)2 ≤ L. Thus, the L-Lipschitz con-
tinuity assures the boundedness of the gradient update.
Definition 6. A loss function f : W × Z → [0, ∞) is β-
smooth if
(cid:107)∇f (u) − ∇f (v)(cid:107)2 ≤ β(cid:107)u − v(cid:107)2, ∀u, v ∈ W.
Following the steps in (Hardt, Recht, and Singer 2016;
Lei, Ledent, and Kloft 2020), we can verify that the gradient
update is non-expansive when f is convex and β-smooth.
Now we present the generalization bounds of SGD for
PPL. The proof is given in Supplementary Material B.2.
Theorem 2. Suppose for any z, ̃z ∈ Z, f (w; z) and
g (w; z, ̃z) are convex, β-smooth and L-Lipschitz with re-
spect to w ∈ W. Without loss of generality, let S and S(cid:48) be
different only in the last example. If ηt ≤ 2/β, then SGD for
PPL with t iterations is PPL γ-uniformly stable with
γ ≤ 2L2
t
(cid:88)
k=1
ηkI [ik = n] + 2L2(1 − τ )
t
(cid:88)
k=1
ηkI [jk = n] ,
(7)
Type
Reference
Algorithmic stability (γ)
Bousquet and Elisseeff (2002)
Uniform Stability
Bousquet and Elisseeff (2002)
Hypothesis Stability
Shalev-Shwartz et al. (2010)
On-average Stability
Hardt, Recht, and Singer (2016)
Uniform Stability
Feldman and Vondrak (2018)
Feldman and Vondrak (2019)
Uniform Stability
Uniform Stability
Relationship
EGen ≤ γ.
√
Gen = O(
γ).
EGen ≤ γ.
EGen ≤ γ.
√
Gen = O(
γ + n− 1
γ(log2 n)2 + n− 1
2 ).
2
(cid:16)
(cid:17)
.
Gen = O
Lei and Ying (2020)
On-average Stability
EGen ≤ Lγ.
Lei, Ledent, and Kloft (2020)
Uniform Stability
Lei, Liu, and Ying (2021)
(cid:96)1 On-average Argument Stability
Lei, Liu, and Ying (2021)
(cid:96)2 On-average Argument Stability
Ours (Theorem 1)
Uniform Stability
Ours (Theorem 4)
On-average Loss Stability
Ours (Corollary 2)
(cid:96)1 On-average Argument Stability
Ours (Theorem 5)
(cid:96)2 On-average Argument Stability
Gen = 4γ + O(n− 1
2 + γ log2 n).
EGen = O(γ2 + γ/n).
EGen = O(γ2 + γ/
n).
√
Gen = (4 − 2τ )γ + O((4 − 3τ )n− 1
2
+(2 − τ )γ log2 n).
EGen ≤ γ.
EGen ≤ Lγ.
EGen = O( 1
γ + (2 − 3
2 τ )γ).
Pointwise
Learning
Pairwise
Learning
PPL
Table 2: Summary of stability-based generalization bounds (γ-stability parameter; Gen-generalization error; EGen-expected
generalization error).
where I[*] is the indicator function. Let {wt}, {w(cid:48)
t} be gen-
erated by SGD on S and S(cid:48) with ηt = η. Then, for all
δ ∈ (0, 1/e), the following inequality holds with probability
1 − δ
(cid:13)
(cid:13)wt+1 − w(cid:48)
≤2Lη(2 − τ )
t+1
(cid:16) t
n
(cid:13)
(cid:13)2
(cid:17)
+ log(1/δ) + (cid:112)2n−1t log(1/δ)
.
Theorem 2 characterizes the impact of the change of train-
ing set on the training loss and the model parameter, which
extends the previous related results of pointwise (or pair-
wise) SGD to the general PPL setting.
We now apply Theorem 1 with A(S) = wT where T
is the index of the last iteration and the uniform stability
bounds in (7) to derive the following result.
Corollary 1. Suppose that f (w; z) and g (w; z, ̃z) are con-
vex, β-smooth and L-Lipschitz with respect to w, and
{|ES[f (wT ; z)]| , |ES[g(wT ; z, ̃z)]|} ≤ M
max
z, ̃z∈Z
for some positive constant M , where wT is produced by
SGD (6) at T -th iteration with ηt ≡ c/
T ≤ 2/β. Then,
for any δ ∈ (0, 1/e), the following inequality holds with
probability 1 − δ
√
|RS(wT ) − R(wT )| = O
(cid:115)
(cid:16)
√
T
n
+
log2 n log(
(cid:16)
+O
T − 1
2 log2 n log2(
) + n− 1
2 log2 n log
3
2 (
log( 1
δ )
n
1
δ
Remark 6. Let
w∗
R = arg min
w∈W
R(w).
(8)
−RS(w∗
The excess risk of SGD for PPL is defined as
R(wT ) − R(w∗
R) = [R(wT ) − RS(wT )] + [RS(wT )
R) − R(w∗
R)] + [RS(w∗
R)] ,
where the first term and the second term of right side are
called estimation error (or generalization error) and opti-
mization error, respectively. Theorem 3 provides the upper
bound of the first term and the results of (Harvey et al. 2019)
imply the bound O(T − 1
2 log2 T ) for the optimization error.
R) − R(w∗
For the third term RS(w∗
R), we can bound it by
Bernstein's inequality. When T = O(n), with probability
1 − δ we have
R(wT ) − R(w∗
R) = O(n− 1
2 log2 n),
which is comparable with the convergence analysis of SGD
for pairwise learning (Lei, Ledent, and Kloft 2020).
Generalization bounds of RRM for PPL
Let r : W → [0, ∞) be a regularization term for achieving
sparsity or preventing over-fitting of learning algorithms as-
sociated with RS(w) defined in (1). The RRM for PPL aims
to search the mininizer of
(cid:17)
)
FS(w) := RS(w) + r(w)
over w ∈ W. Let
.
w∗ = arg min
w∈W
[R(w) + r(w)]
(cid:17)
)
1
δ
1
δ
(9)
(10)
and
Remark 7. Note that the excess risk
A(S) = arg min
w∈W
FS(w).
(11)
R(A(S)) − R(w∗
R)
We can verify the uniform stability of PPL with a strongly
convex loss function, which is proved in Supplementary Ma-
terial B.3.
Lemma 1. Assume that A is defined by (11). Suppose FS
is σ-strongly convex and the pointwise loss function f (*; z)
and pairwise loss function g (*; z, ̃z) are both L-Lipschitz.
Then, A is 4L2
nσ (2 − τ )-uniformly stable.
The following lemma shows the distance between the em-
pirical optimal solution (the best algorithm learned in the
training set) and the theoretically optimal solution in expec-
tation.
Lemma 2. Assume that FS is σ-strongly convex. If the al-
gorithm A defined in (11) is PPL γ-uniformly stable, then
ES (cid:107)A(S) − w∗(cid:107)2
2 ≤ 4γ(2 − τ )/σ.
A mixed version of Bernstein's inequality from (Hoeffd-
ing 1963; Pitcan 2017; Lei, Ledent, and Kloft 2020) is also
introduced here, which is used in our error analysis.
Lemma 3. Assume that
{f (w∗; z), g(w∗; z, ̃z)} ≥ 0,
min
z, ̃z∈Z
max
z, ̃z∈Z
for some constants b, θ > 0, and
{f (w∗; z), g(w∗; z, ̃z)} ≤ b
max{V ar[f (w∗; Z)], V ar[g(w∗; Z, ̃Z)]} ≤ θ,
where V ar(a) denotes the variance of a and w∗ is defined
by (10). Then, for any δ ∈ (0, 1), with probability at least
1 − δ we have
(cid:12)R(w∗) − RS(w∗)(cid:12)
(cid:12)
2(1 − τ )b log(1/δ)
3(cid:98)n/2(cid:99)
2τ b log(1/δ)
3(cid:98)n(cid:99)
(cid:12) ≤
+
+(1 − τ )
(cid:115)
2θ log(1/δ)
(cid:98)n/2(cid:99)
+ τ
(cid:115)
2θ log(1/δ)
(cid:98)n(cid:99)
,
where (cid:98)a(cid:99) is the biggest integer no more than a.
Next, we firstly derive the upper bounds of the pointwise
loss function and the pairwise loss function, and then apply
Theorem 1 to get the generalization bounds for PPL with
strongly convex objective functions.
Theorem 3. Assume that FS(w) is σ-strongly convex,
f (*; z) and g (*; z, ̃z) are both L-Lipschitz. Under the as-
sumptions of Lemma 3, for the RRM algorithm A defined by
(11) and any δ ∈ (0, 1/e), with probability 1 − δ we have
|RS(A(S)) − R(A(S))|
≤
2b log(1/δ)
3(cid:98)n(cid:99)
(cid:18) 16L2
nσ
+ e
√
96
2L2
+
nσ
(cid:115)
+
2θ log(1/δ)
(cid:98)n(cid:99)
+
8L2
nσ
(2 − τ )2
(2 − τ )(4 − 3τ )(cid:112)log(e/δ)
(2 − τ )2 (cid:100)log2(n)(cid:101) log(e/δ)
.
(cid:33)
= [R(A(S)) − RS(A(S))] + [RS(A(S) − RS(w∗
R)]
R) − R(w∗
= [R(A(S)) − RS(A(S))] + [RS(w∗
+ [RS(w∗
R)]
R)]
+ [FS(A(S) − FS(w∗
R)] + r(w∗
≤ [R(A(S)) − RS(A(S))] + [RS(w∗
R) − R(w∗
R) − r(A(S))
R) − R(w∗
R)]
+ r(w∗
R) − r(A(S)),
where w∗
strategy of Theorem 4, we derive
R is defined by (8). Following the similar proof
RS(w∗
R) − R(w∗
R) = O
(cid:32)
log(1/δ)
√
n
+
(cid:33)
(cid:114)
θ log(1/δ)
n
with probability 1 − δ. When r(w∗
O(n− 1
2 ), and
R) = O(σ(cid:107)w∗
R(cid:107)2
2), σ =
max{sup
z
(f (w∗
R; z)) , sup
z, ̃z
(g(w∗
R; z, ̃z))} = O(
√
n),
we have
R(A(S)) − R(w∗
R) = O
(cid:16)
n− 1
2 log2 n log(1/δ)
(cid:17)
with probability 1 − δ based on Theorem 3 and the above
decomposition of excess risk.
Remark 8. We now apply Theorem 3 to the pairwise
constraint-guided sparse model (Liu and Zhang 2015),
which is inspired from the (cid:96)1-penalty and (cid:96)2,1-penalty used
in Lasso (Tibshirani 2011) and its variants (Zou 2006; Yuan
and Lin 2006; Simon et al. 2013; Friedman, Hastie, and Tib-
shirani 2010). The optimization objective of (Liu and Zhang
2015) can be formulated as
1
n
(cid:88)
i∈[n]
f (w; zi)+
λ1
n(n − 1)
(cid:88)
i,j∈[n]:i(cid:54)=j
g (w; zi, zj)+λ2(cid:107)w(cid:107)1,
where f (w; zi) is the general least square loss and the pair-
wise part is measured by
(cid:88)
(wT xi −wT xj)2 −λ3
(cid:88)
(wT xi −wT xj)2.
(xi,xj )∈M
(xi,xj )∈C
Here, M and C denote the must-link set and the cannot-link
set respectively, and λ1, λ2, λ3 are tuneable parameters. It
is straightforward to verify that the above objective func-
tion is strongly-convex and Lipschitz. Therefore, our theoret-
ical analysis provides the generalization bounds of the PPL
model (Liu and Zhang 2015).
Optimistic generalization bounds
This subsection further investigates the refined generaliza-
tion bounds with the help of on-average loss stability in Def-
inition 2 and on-average argument stability in Definition 3.
The related proofs can be found in Supplementary Material
B.4.
Theorem 4. If A is PPL γ-on-average loss stable, then
ES[R(A(S)) − RS(A(S))] ≤ γ.
(cid:105)(cid:17)
(A(S))
we get the fast convergence rate
ES[R(A(S))] − R(w∗
R) = O
(cid:18) (cid:107)w∗
R(cid:107)2
2
n
(cid:19)
.
As illustrated in Table 2, this quantitative relation is con-
sistent with the previous results for pointwise learning (Lei
and Ying 2020) and pairwise learning (Lei, Liu, and Ying
2021). A similar result for (cid:96)1 on-average argument stability
is stated as follows.
Corollary 2. Assume that A is PPL (cid:96)1 γ-on-average ar-
gument stable. If the pointwise loss function f (w; z) and
the pairwise loss function g(w; z, ̃z) are L-Lipschitz with
respect to w, then
ES,A[R(A(S)) − RS(A(S))] ≤ Lγ.
For completeness, we introduce the following result of (cid:96)2
on-average argument stability, which is a natural extension
of Theorem 2 part (b) (Lei and Ying 2020) and Theorem 1
(Lei, Liu, and Ying 2021), and removes the requirement on
the L-Lipschitz condition of loss functions for PPL.
Theorem 5. (Lei and Ying 2020; Lei, Liu, and Ying 2021)
Let A be PPL (cid:96)2 γ-on-average argument stable and (cid:15) > 0. If
f (w; z) and g(w; z, ̃z) are nonnegative and β-smooth with
respect to w, then
ES,A[R(A(S)) − RS(A(S))]
β
γ
(cid:16)
ES,A
(cid:104)
τ Rpoint
S
(cid:18)
≤
+ (β + (cid:15))γ
2 −
(cid:19)
.
3
2
τ
(A(S)) + (1 − τ )Rpair
S
In the expectation viewpoint, the generalization error can
be bounded by the empirical risk and the drift of model pa-
rameters induced by the changes of training data, which is
illustrated in the following lemma.
Lemma 4. Assume that the pointwise loss function f (w; z)
and the pairwise loss function g(w; z, ̃z) are β-smooth with
respect to w. Let (cid:15) > 0 and τ ∈ [0, 1]. Then,
E [R(A(S)) − RS(A(S))]
βτ E
(A(S))
Rpoint
S
(cid:104)
(cid:105)
β(1 − τ )E
≤
(cid:15)
((cid:15) + β)
n
+
(cid:18)
2 −
3
2
τ
+
(cid:19) n
(cid:88)
(cid:104)
E
i=1
(cid:104)
Rpair
S
(cid:105)
(A(S))
(cid:15)
(cid:107)A (Si) − A(S)(cid:107)2
2
(cid:105)
.
the pointwise loss function
Theorem 6. Assume that
f (w; z) and the pairwise loss function g(w; z, ̃z) are β-
smooth with respect to the first argument. Suppose A is de-
fined by (11) and w∗ is defined by (10). If FS is σ-strongly
convex and β ≤ σn/4(2 − τ ), then
ES[F (A(S))] − F (w∗)
≤ES[R(A(S)) − RS(A(S))]
βτ E
(cid:104)
Rpoint
S
(cid:105)
(A(S))
β(1 − τ )E
(cid:104)
Rpair
S
(cid:105)
(A(S))
(cid:15)
384τ 2((cid:15) + β)β
σ2n2
+
(cid:18)
2 −
τ
3
2
(cid:18)
≤
+
+
(cid:19)
(cid:104)
E
(cid:15)
Rpoint
S
(A(S))
(cid:105)
768(1 − τ )2((cid:15) + β)β
σ2n2
2 −
(cid:19)
3
2
τ
E
(cid:104)
Rpair
S
(cid:105)
(A(S))
.
Remark 9. If r(w) = O (cid:0)σ(cid:107)w(cid:107)2
2
(cid:1), we can get
ES[R(A(S))] − R(w∗
R)
R) + Rpair(w∗
R)
(cid:18) Rpoint(w∗
=O
nσ
(cid:19)
+ O (cid:0)(n−1 + σ)(cid:107)w∗
R(cid:107)2
2
(cid:1) ,
where w∗
R is defined by (8). Furthermore, taking
σ = max
(cid:115)
(cid:40)
12β
n
,
Rpoint(w∗
R) + Rpair(w∗
R)
R(cid:107)2
n(cid:107)w∗
2
(cid:41)
,
we can conclude that
ES[R(A(S))] − R(w∗
R)
=O
(cid:18) (cid:107)w∗
R(cid:107)2√
n
(cid:20)(cid:113)
Moreover, when
Rpoint(w∗
R) + Rpair(w∗
R)
(cid:21)
+
(cid:107)w∗
R(cid:107)2
2
n
(cid:19)
.
max{Rpoint(w∗
R), Rpair(w∗
R)} = O
(cid:18) (cid:107)w∗
R(cid:107)2
2
n
(cid:19)
,
The derived rate O(n−1) often is considered as tightness
enough in statistical learning theory (Shalev-Shwartz et al.
2010; Hardt, Recht, and Singer 2016).
Remark 10. It should be noticed that the current result is
consistent with the pointwise setting (Lei and Ying 2020)
as τ = 1, with the pairiwise setting (Lei, Ledent, and
Kloft 2020) as τ = 0. Our convergence analysis of PPL
setting covers more complicated learning algorithms (e.g.,
algorithms described in Table 1) due to the flexibility of
τ ∈ [0, 1].
Conclusion
This paper focuses on establishing the generalization bounds
of PPL by means of algorithmic stability analysis. After
characterizing the quantitative relationship between gener-
alization error and algorithmic stability, we establish the up-
per bounds of excess risk of SGD and RRM for PPL. Our
stability-based analysis fills the gap of statistical learning
theory in part for the related PPL algorithms. In the future,
it is interesting to further investigate the stability-based gen-
eralization of SGD for PPL under non-i.i.d sampling, e.g.,
Markov chain sampling (Sun, Sun, and Yin 2018; Wang
et al. 2022b).
Acknowledgments
This work was supported in part by National Natural Science
Foundation of China under Grant No. 12071166 and by the
Fundamental Research Funds for the Central Universities of
China under Grant 2662020LXQD002. We are grateful to
the anonymous AAAI reviewers for their constructive com-
ments.
References
Agarwal, S.; and Niyogi, P. 2009. Generalization bounds
for ranking algorithms via algorithmic stability. Journal of
Machine Learning Research, 10: 441–474.
Boucheron, S.; Lugosi, G.; and Massart, P. 2013. Concentra-
tion inequalities: A nonasymptotic theory of independence.
Oxford University Press.
Bousquet, O.; and Elisseeff, A. 2002. Stability and general-
ization. Journal of Machine Learning Research, 2: 499–526.
Bousquet, O.; Klochkov, Y.; and Zhivotovskiy, N. 2020.
In Con-
Sharper bounds for uniformly stable algorithms.
ference on Learning Theory (COLT), 610–626.
Cao, Q.; Guo, Z.-C.; and Ying, Y. 2016. Generalization
bounds for metric and similarity learning. Machine Learn-
ing, 102: 115–132.
Chen, H.; Wang, X.; Deng, C.; and Huang, H. 2017. Group
sparse additive machine. In Advances in Neural Information
Processing Systems (NeurIPS), 198–208.
Chen, H.; Wang, Y.; Zheng, F.; Deng, C.; and Huang, H.
2021. Sparse modal additive model. IEEE Transactions on
Neural Networks and Learning Systems, 32(6): 2373–2387.
Cl ́emenc ̧on, S.; Lugosi, G.; and Vayatis, N. 2008. Ranking
and empirical minimization of U-statistics. The Annals of
Statistics, 36: 844–874.
Deng, Z.; He, H.; and Su, W. 2021. Toward better general-
ization bounds with locally elastic stability. In International
Conference on Machine Learning (ICML), 2590–2600.
Elisseeff, A.; Evgeniou, T.; Pontil, M.; and Kaelbing, L. P.
2005. Stability of randomized learning algorithms. Journal
of Machine Learning Research, 6: 55–79.
Feldman, V.; and Vondrak, J. 2018. Generalization bounds
for uniformly stable algorithms. In Advances in Neural In-
formation Processing Systems (NeurIPS), 9770–9780.
Feldman, V.; and Vondrak, J. 2019. High probability gener-
alization bounds for uniformly stable algorithms with nearly
In Conference on Learning Theory (COLT),
optimal rate.
1270–1279.
Friedman, J. H.; Hastie, T.; and Tibshirani, R. 2010.
A note on the group lasso and a sparse group lasso.
arXiv:1001.0736.
Hardt, M.; Recht, B.; and Singer, Y. 2016. Train faster,
generalize better: Stability of stochastic gradient descent.
In International Conference on Machine Learning (ICML),
1225–1234.
Harvey, N. J.; Liaw, C.; Plan, Y.; and Randhawa, S. 2019.
Tight analyses for non-smooth stochastic gradient descent.
In Conference on Learning Theory (COLT), 1579–1613.
Hoeffding, W. 1963. Probability inequalities for sums of
bounded random variables. Journal of the American Statis-
tical Association, 58: 13–30.
Huang, Z.; Feng, S.; Su, W.; Chen, X.; Wang, S.; Liu, J.;
Ouyang, X.; and Sun, Y. 2020. ERNIE at SemEval-2020
Task 10: Learning word emphasis selection by pre-trained
language model. In International Committee on Computa-
tional Linguistics (ICCL), 1456–1461.
Klochkov, Y.; and Zhivotovskiy, N. 2021. Stability and de-
viation optimal risk bounds with convergence rate O(1/n).
In Advances in Neural Information Processing Systems
(NeurIPS), 5065–5076.
Lei, Y.; Ledent, A.; and Kloft, M. 2020. Sharper general-
ization bounds for pairwise learning. In Advances in Neural
Information Processing Systems (NeurIPS), 21236–21246.
Lei, Y.; Li, W.; Lu, Z.; and Zhao, M. 2017. Alternating
pointwise-pairwise learning for personalized item ranking.
In Conference on Information and Knowledge Management,
2155–2158.
Lei, Y.; Liu, M.; and Ying, Y. 2021. Generalization guar-
antee of SGD for pairwise learning. In Advances in Neural
Information Processing Systems (NeurIPS), 21216–21228.
Lei, Y.; and Tang, K. 2021. Learning rates for stochastic
IEEE Trans-
gradient descent with nonconvex objectives.
actions on Pattern Analysis and Machine Intelligence, 43:
4505–4511.
Lei, Y.; and Ying, Y. 2020. Fine-grained analysis of stability
and generalization for stochastic gradient descent. In Inter-
national Conference on Machine Learning (ICML), 5809–
5819.
Liu, M.; and Zhang, D. 2015. Pairwise constraint-guided
sparse learning for feature selection. IEEE Transactions on
Cybernetics, 46: 298–310.
Liu, T.; Lugosi, G.; Neu, G.; and Tao, D. 2017. Algorithmic
stability and hypothesis complexity. In International Con-
ference on Machine Learning (ICML), 2159–2167.
London, B.; Huang, B.; and Getoor, L. 2016. Stability and
generalization in structured prediction. Journal of Machine
Learning Research, 17: 7808–7859.
Pitcan, Y. 2017. A note on concentration inequalities for
U-statistics. arXiv:1712.06160.
Rejchel, W. 2012. On ranking and generalization bounds.
Journal of Machine Learning Research, 13: 1373–1392.
Shalev-Shwartz, S.; and Ben-David, S. 2014. Understanding
machine learning: From theory to algorithms. Cambridge
University Press.
Shalev-Shwartz, S.; Shamir, O.; Srebro, N.; and Sridharan,
K. 2010. Learnability, stability and uniform convergence.
Journal of Machine Learning Research, 11: 2635–2670.
Simon, N.; Friedman, J.; Hastie, T.; and Tibshirani, R. 2013.
A sparse-group lasso. Journal of Computational and Graph-
ical Statistics, 22: 231–245.
Smale, S.; and Zhou, D.-X. 2007. Learning theory estimates
via integral operators and their approximations. Construc-
tive Approximation, 26: 153–172.
Srebro, N.; Sridharan, K.; and Tewari, A. 2010. Smoothness,
low noise and fast rates. In Advances in neural information
processing systems (NeurIPS), 2199–2207.
Sun, T.; Li, D.; and Wang, B. 2021. Stability and general-
ization of decentralized stochastic gradient descent. In AAAI
Conference on Artificial Intelligence, 9756–9764.
Sun, T.; Sun, Y.; and Yin, W. 2018. On Markov chain gradi-
ent descent. In Advances in Neural Information Processing
Systems (NeurIPS).
Tibshirani, R. 2011. Regression shrinkage and selection via
the lasso: A retrospective. Journal of the Royal Statistical
Society: Series B (Statistical Methodology), 73: 273–282.
Vapnik, V.; Levin, E.; and Le Cun, Y. 1994. Measuring the
VC-dimension of a learning machine. Neural Computation,
6: 851–876.
Wang, M.; Guo, Y.; Zhao, Z.; Hu, G.; Shen, Y.; Gong, M.;
and Torr, P. 2022a. MP2: A momentum contrast approach
for recommendation with pointwise and pairwise learning.
arXiv:2204.08326.
Wang, P.; Lei, Y.; Ying, Y.; and Zhou, D.-X. 2022b. Sta-
bility and generalization for Markov chain stochastic gradi-
ent methods. In Advances in Neural Information Processing
Systems (NeurIPS).
Wang, Y.; Chen, H.; Zheng, F.; Xu, C.; Gong, T.; and Chen,
Y. 2020. Multi-task additive models for robust estimation
In Advances in Neural
and automatic structure discovery.
Information Processing Systems (NeurIPS).
Wang, Y.; Wang, S.; Tang, J.; Liu, H.; and Li, B. 2016.
PPP: Joint pointwise and pairwise image label prediction.
In Conference on Computer Vision and Pattern Recognition
(CVPR), 6005–6013.
Yang, Z.; Lei, Y.; Wang, P.; Yang, T.; and Ying, Y. 2021.
Simple Stochastic and Online Gradient Descent Algorithms
for Pairwise Learning. In Advances in Neural Information
Processing Systems (NeurIPS), 20160–20171.
Yin, D.; Kannan, R.; and Bartlett, P. 2019. Rademacher
complexity for adversarially robust generalization. In Inter-
national Conference on Machine Learning (ICML), 7085–
7094.
Ying, Y.; Wen, L.; and Lyu, S. 2016. Stochastic online AUC
maximization. In Advances in Neural Information Process-
ing Systems (NIPS).
Ying, Y.; and Zhou, D.-X. 2016. Online pairwise learning
algorithms. Neural Computation, 28: 743–777.
Yuan, M.; and Lin, Y. 2006. Model selection and estimation
in regression with grouped variables. Journal of the Royal
Statistical Society: Series B (Statistical Methodology), 68:
49–67.
Zhou, D.-X. 2002. The covering number in learning theory.
Journal of Complexity, 18: 739–767.
Zhuo, J.; Zhu, Q.; Yue, Y.; and Zhao, Y. 2022. Learning
explicit user interest boundary for recommendation. In ACM
Web Conference, 193–202.
Zou, H. 2006. The adaptive lasso and its oracle properties.
Journal of the American Statistical Association, 101: 1418–
1429.
The main notations of this paper are summarized in Table 3.
A. Notations
Z
zi
W
f (w; z)
(cid:96)(w; z, ̃z)
ERM
A
Rpoint
Rpair
R(w)
FS(w)
Gen
w∗
γ
β
Upoint
Vpoint
Hpoint
n
T
∇
(cid:107)Y (cid:107)p
Sample space
i-th training example
Model parameter space
Pointwise loss function
PPL loss function
Empirical risk minimization
Given algorithm
Pointwise expected risk
Pairwise expected risk
τ Rpoint(w) + (1 − τ )Rpair(w)
RS(w) + r(w)
R(A(S)) − RS(A(S))
arg minw∈W [R(w) + r(w)]
Stability parameter
Smoothness parameter
Pointwise uniform stability
Pointwise on-average loss stability
1
i=1 (cid:107)A(S) − A(Si)(cid:107)2
n
Sample size
Iteration number
the gradient of loss function
(E|Y |p)
(cid:80)n
1
p
S
ρ
w
g(w; z, ̃z)
SGD
RRM
A(S)
Rpoint
S
Rpair
S
RS(w)
τ
EGen
w∗
R
L
σ
Upair
Vpair
Hpair
d
ηt
ES[*]
[n]
Training dataset {z1, . . . , zn}
Probability measure
Model parameter
Pairwise loss function
Stochastic gradient descent
Regularized risk minimization
Output model
Pointwise empirical risk
Pairwise empirical risk
τ Rpoint
S
PPL tuning parameter
ES,A[R(A(S)) − RS(A(S))]
arg minw∈W [R(w)]
Lipschitz parameter
Strong convexity parameter
Pairwise uniform stability
Pairwise on-average loss stability
(cid:80)
(w) + (1 − τ )Rpair
(w)
S
i,j∈[n]:i(cid:54)=j (cid:107)A(S)−A(Si,j )(cid:107)2
n(n−1)
the dimension of X
Step size
Conditional expectation about S
{1, . . . , n}
Table 3: Table of Notations.
To improve the readability of theoretical analysis, we state the outlines for the proofs of Theorems 1-6 in Fig 1
B. Proofs of main theoretical results
B.1 Proof of Theorem 1
To prove Theorem 1, we need to introduce some lemmas as follows.
Lemma 5. (Bousquet, Klochkov, and Zhivotovskiy 2020) Let S = {z1, . . . , zn} be a set of independent random variables each
taking values in Z and let d1, . . . , dn be some functions di : Z n (cid:55)→ R such that the following holds for any i ∈ [n]
(cid:12)ES\{zi} [di(S)](cid:12)
• (cid:12)
(cid:12) ≤ M almost surely (a.s.), where S\ {zi} = {z1, . . . , zi−1, zi+1, . . . , zn},
• Ezi [di(S)] = 0 a.s.,
• gi has a bounded difference α with respect to all variables except the i-th variable
(cid:12)
(cid:12)di(z1, . . . , zn) − di
(cid:0)z1, . . . , zj−1, z(cid:48)(cid:48)
j , zj+1, . . . , zn
(cid:1)(cid:12)
(cid:12) ≤ α,
where j ∈ [n] with j (cid:54)= i, and z(cid:48)(cid:48)
j ∈ Z.
Then, for any p ≥ 2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
n
(cid:88)
i=1
di(S)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)p
√
≤ 12
2pnα (cid:100)log2 n(cid:101) + 4M
√
pn.
Lemma 6. (Bousquet, Klochkov, and Zhivotovskiy 2020) Let a, b ≥ 0 and let Y be a random variable with (cid:107)Y (cid:107)p ≤
for any p ≥ 2. Then for any δ ∈ (0, 1) with probability at least 1 − δ
(cid:18)
(cid:114)
|Y | ≤ e
a
log
(cid:17)
(cid:16) e
δ
+ b log
(cid:17)(cid:19)
.
(cid:16) e
δ
√
pa + pb
Figure 1: Box of theoretical results for Pointwise and Pairwise Learning.
Proof of Theorem 1 From (2), we know the generalization error
R(A(S)) − RS(A(S))
=τ Rpoint(A(S)) + (1 − τ )Rpair(A(S)) − τ Rpoint
S
(cid:88)
=τ Ez[f (w; z)] + (1 − τ )Ez, ̃z[g(w; z, ̃z)] −
(A(S)) − (1 − τ )Rpair
τ
n
i∈[n]
f (w; zi) −
S
(1 − τ )
n(n − 1)
(A(S))
(cid:88)
g (w; zi, zj) .
i,j∈[n]:i(cid:54)=j
It is easy to see that the above generalization gap can be divided into two parts associated with pointwise loss and pairwise loss,
respectively. To bound the pointwise part, we consider
nEZ[f (A(S); Z)] −
n
(cid:88)
i=1
f (A(S); zi)
=
n
(cid:88)
i=1
EZ
(cid:2)f (A(S); Z) − Ez(cid:48)
i
[f (A (Si) ; Z)](cid:3) +
n
(cid:88)
i=1
Ez(cid:48)
i
+
n
(cid:88)
i=1
Ez(cid:48)
i
[f (A (Si) ; zi) − f (A(S); zi)] ,
[EZ [f (A (Si) ; Z)] − f (A (Si) ; zi)]
where Si is defined by (3). According to the definition of PPL uniform stability in Definition 1, we know
[f (A (Si) ; Z)](cid:12)
|f (A (Si) ; zi) − f (A(S); zi)| ≤ γ.
(cid:12)
(cid:12)f (A(S); Z) − Ez(cid:48)
(cid:12) ≤ γ,
i
Therefore,
where
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
nEZ[f (A(S); Z)] −
(cid:12)
(cid:12)
(cid:12)
f (A(S); zi)
(cid:12)
(cid:12)
(cid:88)
i=1
≤ 2nγ +
(cid:12)
n
(cid:12)
(cid:88)
(cid:12)
(cid:12)
(cid:12)
i=1
di(S)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
,
(12)
di(S) = Ez(cid:48)
i
[EZ [f (A (Si) ; Z)]] − Ez(cid:48)
i
[f (A (Si) ; zi)] = d(1)
i
(Si) − d(2)
i
(Si),
∀i ∈ [n].
Due to the boundedness assumption of loss function, we know
(cid:12)ES\{zi} [di(S)](cid:12)
(cid:12)
(cid:12) ≤ 2M,
∀i ∈ [n].
Theorem 3Lemma 1Lemma 2Lemma 3Lemma 13Theorem 1Theorem 2Lemma 7Lemma 8Lemma 11Lemma 12Lemma 9Lemma 10Corollary 1Theorem 6Theorem 4Lemma 4Corollary 2Lemma 5Lemma 6Since zi is independent of Si, there holds
Ezi [EZ [f (A (Si) ; Z)] − [f (A (Si) ; zi)]] = 0,
which means Ezi [di] = 0.
By using the PPL uniform stability, we derive that
(cid:12)
(cid:12)d(1)
(cid:12)
i
(Si) − d(1)
i
(S(m)
i
(cid:12)
(cid:12)
(cid:12) =
)
(cid:12)
(cid:12)
(cid:12)
Ez(cid:48)
i
EZ [f (A (Si) ; Z)] − Ez(cid:48)
i
(cid:16)
(cid:104)
f
A
(cid:16)
EZ
S(m)
i
(cid:17)
; Z
(cid:17)(cid:105)(cid:12)
(cid:12)
(cid:12) ≤ γ,
where S(m)
i
is the set Si replacing the m-th element with z(cid:48)
(cid:12)
(cid:12)d(2)
(cid:12)
Therefore, applying Lemma 5 with α = 2γ, we have
(Si) − d(2)
(cid:12)
(cid:12)
(cid:12) =
)
(S(m)
i
(cid:12)
Ez(cid:48)
(cid:12)
(cid:12)
i
i
i
m. Similarly, we can also conduct
(cid:17)
(cid:16)
(cid:16)
(cid:104)
[f (A (Si) ; zi)] − Ez(cid:48)
i
f
A
S(m)
i
; zi
(cid:17)(cid:105)(cid:12)
(cid:12)
(cid:12) ≤ γ.
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
n
(cid:88)
i=1
√
≤ 24
di
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)p
2pnγ (cid:100)log2 n(cid:101) + 4M
√
pn.
According to Lemma 6, we derive that
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
n
(cid:88)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
di
i=1
√
(cid:16)
4M
≤ e
n(cid:112)log(e/δ) + 24
√
2nγ (cid:100)log2 n(cid:101) log(e/δ)
(cid:17)
with probability at least 1 − δ. Furthermore, we plug the above inequality back into (12) to derive
(cid:12)
(cid:12)
(cid:12) ≤ 2γ + e
(A(S)) − Rpoint(A(S))
2 (cid:112)log(e/δ) + 24
(cid:12)
(cid:12)Rpoint
(cid:12)
4M n− 1
√
(cid:16)
S
2γ (cid:100)log2(n)(cid:101) log(e/δ)
(cid:17)
with probability at least 1 − δ.
Theorem 1 of Lei, Ledent, and Kloft (2020) assures that the pairwise part satisfies
(cid:12)
(cid:12)Rpair
(cid:12)
S
(A(S)) − Rpair(A(S))
(cid:12)
(cid:12)
(cid:12) ≤ 4γ + e
(cid:16)
16M (n − 1)− 1
2 (cid:112)log(e/δ) + 48
√
2γ (cid:100)log2(n − 1)(cid:101) log(e/δ)
(cid:17)
with probability at least 1 − δ. The desired result follows by combining the two estimations for pointwise and pairwise parts.
B.2 Proof of Theorem 2
To prove Theorem 2, we introduce the PPL non-expansiveness operator which is motivated by Hardt, Recht, and Singer (2016)
and extended in Lei, Ledent, and Kloft (2020). We also need to introduce some properties of the PPL loss function when the
pointwise loss function part and the pairwise loss function part change.
Lemma 7. (Hardt, Recht, and Singer 2016) Assume the pointwise loss function f (w; z) is convex and β-smooth with respect
to w for all z ∈ Z. Then for all η ≤ 2/β there holds
(cid:107)w − ηf (cid:48) (w; z) − w(cid:48) + ηf (cid:48) (w(cid:48); z)(cid:107)2 ≤ (cid:107)w − w(cid:48)(cid:107)2 .
Correspondingly, the non-expansiveness operators of the pairwise and the pointwise are the same except for the functional
forms.
Lemma 8. Assume the pairwise loss function g (w; z, ̃z) is convex and β-smooth with respect to w for all z, ̃z ∈ Z. Then for
all η ≤ 2/β there holds
(cid:107)w − ηg(cid:48) (w; z, ̃z) − w(cid:48) + ηg(cid:48) (w(cid:48); z, ̃z)(cid:107)2 ≤ (cid:107)w − w(cid:48)(cid:107)2 .
Lemma 9. If the pointwise loss function f (w; z) and the pairwise loss function g (w; z, ̃z) are convex with respect to w for
z, ̃z ∈ Z, then the PPL loss function (cid:96) (w; z, ̃z) is convex with respect to w.
Proof of Lemma 9 According to the definition of convex function, we can easily get the above conclusion, and the proof
process is omitted here.
Lemma 10. If the pointwise loss function f (w; z) and the pairwise loss function g (w; z, ̃z) are β-smooth with respect to w
for z, ̃z ∈ Z, then the PPL loss function (cid:96) (w; z, ̃z) is β-smooth with respect to w. Similarly, if the pointwise loss function and
the pairwise loss function are L-Lipschitz with respect to w for z, ̃z ∈ Z, then the PPL loss function is L-Lipschitz with respect
to w.
Proof of Lemma 10 Based on the definitions of smoothness, the following inequalities hold for f and g:
τ (cid:107)∇f (u) − ∇f (v)(cid:107)2 ≤ τ β(cid:107)u − v(cid:107)2,
(1 − τ )(cid:107)∇g(u) − ∇g(v)(cid:107)2 ≤ (1 − τ )β(cid:107)u − v(cid:107)2,
τ (cid:107)∇f (u) − ∇f (v)(cid:107)2 + (1 − τ )(cid:107)∇g(u) − ∇g(v)(cid:107)2 ≤ β(cid:107)u − v(cid:107)2.
From the sub-additivity of (cid:107) * (cid:107)2, we know
(cid:107)τ ∇f (u) + (1 − τ )∇g(u) − τ ∇f (v) − (1 − τ )∇g(v)(cid:107)2 ≤ β(cid:107)u − v(cid:107)2,
i.e.,
The proof of the Lipschitz continuity is similar to the above process, thus we omit it here.
The proof is completed.
(cid:107)∇(cid:96)(u) − ∇(cid:96)(v)(cid:107)2 ≤ β(cid:107)u − v(cid:107)2.
Since the PPL loss function is convex and β-smooth, We can also get the non-expansiveness of the PPL as follows.
Lemma 11. Assume for all z, ̃z ∈ Z, the functions w (cid:55)→ f (w; z) and w (cid:55)→ g (w; z, ̃z) are both convex and β-smooth. Then
for all η ≤ 2/β there holds
(cid:107)w − η(cid:96)(cid:48) (w; z, ̃z) − w(cid:48) + η(cid:96)(cid:48) (w(cid:48); z, ̃z)(cid:107)2 ≤ (cid:107)w − w(cid:48)(cid:107)2 .
In addition, we also need to introduce a concentration inequality (Boucheron, Lugosi, and Massart 2013; Shalev-Shwartz and
Ben-David 2014) which is useful for developing high-probability bounds in the following part.
Lemma 12. (Chernoff's Bound).Let X = (cid:80)T
{0, 1} and μ = E[X]. Then for any δ1, we have X ≤ (1 + δ1)μ with probability at least 1 − exp(−μδ2
for any δ ∈ (0, 1), we have
t=1 Xt where X1, . . . , XT is independent random variables taking values in
1/(3 + δ1)). Moreover,
X ≤ μ + log(1/δ) + (cid:112)2μ log(1/δ)
with probability at least 1 − δ.
Proof of Lemma 12 We now establish the uniform stability of PPL SGD.
Proof of Theorem 2 Let {wt} , {w(cid:48)
t} be produced by PPL SGD on S and S(cid:48), then
wt+1 = wt − ηt (τ f (cid:48) (wt; zit) + (1 − τ )g(cid:48) (wt; zit, zjt))
and
w(cid:48)
t+1 = w(cid:48)
t − ηt
(cid:0)τ f (cid:48) (cid:0)w(cid:48)
t; z(cid:48)
it
(cid:1) + (1 − τ )g(cid:48) (cid:0)w(cid:48)
t; z(cid:48)
it
, z(cid:48)
jt
(cid:1)(cid:1) .
In the sequel, let us consider three cases. Firstly, if it ∈ [n − 1] and jt ∈ [n − 1], it (cid:54)= jt, then
wt+1 − w(cid:48)
t+1
=wt − ηt (τ f (cid:48) (wt; zit) + (1 − τ )g(cid:48) (wt; zit, zjt)) − w(cid:48)
=wt − ηt (τ f (cid:48) (wt; zit) + (1 − τ )g(cid:48) (wt; zit, zjt)) − w(cid:48)
(cid:0)τ f (cid:48) (cid:0)w(cid:48)
t + ηt
t + ηt (τ f (cid:48) (w(cid:48)
(cid:1) + (1 − τ )g(cid:48) (cid:0)w(cid:48)
t; z(cid:48)
it
t; zit) + (1 − τ )g(cid:48) (w(cid:48)
t; z(cid:48)
, z(cid:48)
jt
it
t; zit, zjt)) .
(cid:1)(cid:1)
It then follows from Lemma 11 that
Secondly, if it = n and jt ∈ [n − 1], then
(cid:13)
(cid:13)wt+1 − w(cid:48)
t+1
(cid:13)
(cid:13)2 ≤ (cid:107)wt − w(cid:48)
t(cid:107)2 .
t+1
(cid:13)
(cid:13)2
(cid:13)
(cid:13)wt+1 − w(cid:48)
= (cid:13)
(cid:13)wt − ηt (τ f (cid:48) (wt; zit ) + (1 − τ )g(cid:48) (wt; zit, zjt)) − w(cid:48)
≤ (cid:107)wt − w(cid:48)
t; z(cid:48)
it
≤ (cid:107)wt − w(cid:48)
= (cid:107)wt − w(cid:48)
t(cid:107)2 + τ (cid:13)
(cid:13)ηtf (cid:48) (cid:0)w(cid:48)
t(cid:107)2 + 2τ ηtL + 2(1 − τ )ηtL
t(cid:107)2 + 2ηtL,
(cid:1) − ηtf (cid:48) (wt; zit)(cid:13)
t + ηt
(cid:13)2 + (1 − τ ) (cid:13)
(cid:0)τ f (cid:48) (cid:0)w(cid:48)
t; z(cid:48)
it
(cid:13)ηtg(cid:48) (cid:0)w(cid:48)
t; z(cid:48)
it
(cid:1) + (1 − τ )g(cid:48) (cid:0)w(cid:48)
, z(cid:48)
jt
(cid:1)(cid:1)(cid:13)
(cid:13)2
(cid:1) − ηtg(cid:48) (wt; zit, zjt)(cid:13)
(cid:13)2
t; z(cid:48)
it
, z(cid:48)
jt
where the last inequality is due to the L-Lipschitz continuity of the loss functions f and g.
Finally, if it ∈ [n − 1] and jt = n, then
t+1
(cid:13)
(cid:13)2
(cid:13)
(cid:13)wt+1 − w(cid:48)
= (cid:13)
(cid:13)wt − ηt (τ f (cid:48) (wt; zit) + (1 − τ )g(cid:48) (wt; zit, zjt)) − w(cid:48)
≤ (cid:107)wt − ηtτ f (cid:48) (wt; zit) − w(cid:48)
≤ (cid:107)wt − w(cid:48)
t(cid:107)2 + 2ηtL(1 − τ ).
t + ηt
t; zit)(cid:107)2 + (1 − τ ) (cid:13)
t + ηtτ f (cid:48) (w(cid:48)
(cid:0)τ f (cid:48) (cid:0)w(cid:48)
(cid:13)ηtg(cid:48) (cid:0)w(cid:48)
t; z(cid:48)
it
t; z(cid:48)
it
, z(cid:48)
jt
(cid:1) + (1 − τ )g(cid:48) (cid:0)w(cid:48)
, z(cid:48)
jt
(cid:1) − ηtg(cid:48) (wt; zit, zjt)(cid:13)
(cid:13)2
t; z(cid:48)
it
(cid:1)(cid:1)(cid:13)
(cid:13)2
Combining the above three cases, we derive
(cid:13)
(cid:13)wt+1 − w(cid:48)
t+1
(cid:13)
(cid:13)2 ≤ (cid:107)wt − w(cid:48)
t(cid:107)2 + 2ηtLI [it = n] + 2ηtL(1 − τ )I [jt = n] ,
where I[*] is the indicator function. Iterating over the above formula (w1 = w(cid:48)
1), there holds
(cid:13)
(cid:13)wt+1 − w(cid:48)
t+1
(cid:13)
(cid:13)2 ≤ 2L
t
(cid:88)
k=1
ηkI [ik = n] + 2L(1 − τ )
t
(cid:88)
k=1
ηkI [jk = n] .
(13)
With the Lipschitz continuity, for all z, ̃z ∈ Z, we know
(cid:12)
(cid:12)(cid:96) (wt+1; z, ̃z) − (cid:96) (cid:0)w(cid:48)
t+1; z, ̃z(cid:1)(cid:12)
(cid:12) ≤ L (cid:13)
(cid:13)wt+1 − w(cid:48)
t+1
(cid:13)
(cid:13)2 ,
hence
(cid:12)
(cid:12)(cid:96) (wt+1; z, ̃z) − (cid:96) (cid:0)w(cid:48)
t+1; z, ̃z(cid:1)(cid:12)
(cid:12) ≤ 2L2
t
(cid:88)
k=1
ηkI [ik = n] + 2L2(1 − τ )
t
(cid:88)
k=1
ηkI [jk = n] .
We assume Xk = I[ik = n], it is easy to know that
1
n
Applying Lemma 12 with Xk = I [ik = n], we obtain with probability 1 − δ,
E[Xk] = P r{ik = n} =
.
Xk ≤ μ + log(1/δ) + (cid:112)2μ log(1/δ),
t
(cid:88)
k=1
where μ = (cid:80)t
k=1
E [Xt] ≤ t/n. It then follows with probability 1 − δ that
t
(cid:88)
k=1
Xk ≤
t
n
+ log(1/δ) + (cid:112)2n−1t log(1/δ).
We can also derive the same results for Yk = I [jk = n]
t
(cid:88)
k=1
Yk ≤
t
n
+ log(1/δ) + (cid:112)2n−1t log(1/δ).
Combining the above two inequalities with (13), we derive the following inequality with probability 1 − δ
(cid:13)
(cid:13)wt+1 − w(cid:48)
t+1
(cid:13)
(cid:13)2 ≤ 2Lη(2 − τ )
(cid:19)
+ log(1/δ) + (cid:112)2n−1t log(1/δ)
.
(cid:18) t
n
The proof is completed with ηt = η.
B.3 Proof of Theorem 3
Next, we prove some important lemmas,
Lemma 13. For any S ∈ Z n, define A as A(S) = arg minw∈W FS(w). For any k ∈ [n], let Sk be defined by (3). Then
FS (A (Sk)) − FS(A(S))
τ
n
(f (A (Sk) ; zk) − f (A (Sk) ; z(cid:48)
k) + f (A (S) ; z(cid:48)
k) − f (A (S) ; zk))
≤
+
1 − τ
n(n − 1)
(cid:88)
i∈[n]:i(cid:54)=k
[((g(A(Sk); zi, zk) − g(A(S); zi, zk)) + (g (A (Sk) ; zk, zi) − g (A(S); zk, zi))
+ (g (A(S); zi, z(cid:48)
k) − g (A (Sk) ; zi, z(cid:48)
k)) + (g (A(S); z(cid:48)
k, zi) − g (A (Sk) ; z(cid:48)
k, zi))] .
Proof of Lemma 13 Without loss of generality, we can assume k = n. Due to A (Sn) is the minimizer of FSn , we know
FS (A (Sn)) − FS(A(S))
=FS (A (Sn)) − FSn (A (Sn)) + FSn (A (Sn)) − FSn(A(S)) + FSn (A(S)) − FS(A(S))
≤FS (A (Sn)) − FSn (A (Sn)) + FSn (A(S)) − FS(A(S)).
(14)
By the definitions of FS and FSn, we obtain
FS (A (Sn)) − FSn (A (Sn))
n−1
(cid:88)
(cid:32) n
(cid:88)
f (cid:48) (A (Sn) ; zi) −
i=1
i=1
=
τ
n
f (cid:48) (A (Sn) ; zi) − f (cid:48) (A (Sn) ; z(cid:48)
n)
+
(cid:33)
1 − τ
n(n − 1)
(cid:88)
i,j∈[n]:i(cid:54)=j
g (A (Sn) ; zi, zj)
−
1 − τ
n(n − 1)
(cid:88)
i,j∈[n−1]:i(cid:54)=j
g (A (Sn) ; zi, zj) +
(cid:88)
i∈[n−1]
g (A (Sn) ; zi, z(cid:48)
n) +
g (A (Sn) ; z(cid:48)
n, zi)
(cid:88)
i∈[n−1]
=
τ
n
(f (cid:48) (A (Sn) ; zn) − f (cid:48) (A (Sn) ; z(cid:48)
n))
+
(1 − τ )
n(n − 1)
(cid:88)
i∈[n−1]
Similarly, we know
(g (A (Sn) ; zi, zn) + g (A (Sn) ; zn, zi) − g (A (Sn) ; zi, z(cid:48)
n) − g (A (Sn) ; z(cid:48)
n, zi)) .
FSn (A (S)) − FS (A (S)) =
τ
n
(f (cid:48) (A (S) ; z(cid:48)
n) − f (cid:48) (A (S) ; zn)) +
(1 − τ )
n(n − 1)
(cid:88)
i∈[n−1]
(g (A(S); zi, z(cid:48)
n)
+ g (A(S); z(cid:48)
n, zi) − g (A(S); zi, zn) − g (A(S); zn, zi)) .
We can combine (15) and (16) to derive
(FS (A (Sn)) − FSn (A (Sn)) + FSn (A (S)) − FS (A (S)))
τ
n
(f (cid:48) (A (Sn) ; zn) − f (cid:48) (A (Sn) ; z(cid:48)
n) + f (cid:48) (A (S) ; z(cid:48)
n) − f (cid:48) (A (S) ; zn))
=
+
(1 − τ )
n(n − 1)
(cid:88)
i∈[n−1]
((g (A (Sn) ; zi, zn) − g (A(S); zi, zn)) + (g (A (Sn) ; zn, zi) − g (A(S); zn, zi))
(15)
(16)
+ (g (A(S); zi, z(cid:48)
n) − g (A (Sn) ; zi, z(cid:48)
n)) + (g (A(S); z(cid:48)
n, zi) − g (A (Sn) ; z(cid:48)
n, zi))) .
The proof is completed.
Proof of Lemma 1 Let wS = A(S) and wS(cid:48) = A (S(cid:48)). Without loss of generality, we can assume S(cid:48) = Sn =
{z1, . . . , zn−1, z(cid:48)
n}. Due to wS is the minimizer of FSn and FS is σ-strongly convex, we know
FS (wS(cid:48)) − FS (wS) ≥
σ
2
(cid:107)wS(cid:48) − wS(cid:107)2
2 .
(17)
According to
and Lemma 13, we obtain
|f (w; z) − f (w(cid:48); z)| ≤ L (cid:107)w − w(cid:48)(cid:107)2 ,
|g(w; z, ̃z) − g (w(cid:48); z, ̃z)| ≤ L (cid:107)w − w(cid:48)(cid:107)2 ,
∀z ∈ Z, w, w(cid:48) ∈ W,
∀z, ̃z ∈ Z, w, w(cid:48) ∈ W,
FS (wS(cid:48)) − FS (wS) ≤
2Lτ (cid:107)wS(cid:48) − wS(cid:107)2
n
+
4(n − 1)L(1 − τ ) (cid:107)wS(cid:48) − wS(cid:107)2
n(n − 1)
=
2L
n
(2 − τ ) (cid:107)wS(cid:48) − wS(cid:107)2 .
By combining the above inequality with (17), we have
With Lemma 10, it is easy to get the 4L2
nσ (2 − τ )-uniform stability of A.
(cid:107)wS − wS(cid:48)(cid:107)2 ≤
4L
nσ
(2 − τ ).
Proof of Lemma 2 With the reason that A(S) is the minimizer of FS, we know that F (cid:48)
the definition of strong convexity, there holds
S(A(S)) = 0. Then, further based on
RS (w∗) + r (w∗) − RS(A(S)) − r(A(S)) ≥
σ
2
(cid:107)A(S) − w∗(cid:107)2
2 .
(18)
From (12), we know
(cid:16)
Rpoint(A(S)) − Rpoint
S
n
(cid:17)
(A(S))
≤ 2nγ +
(cid:88)
i=1
di.
Similarly, from Lei, Ledent, and Kloft (2020), we know
(cid:16)
n(n − 1)
Rpair(A(S)) − Rpair
S
(A(S))
(cid:17)
≤ 4n(n − 1)γ +
(cid:88)
di,j,
i,j∈[n]:i(cid:54)=j
where E [di,j] = 0. Besides, the proof of Theorem 1 shows that E [di] = 0. It then follows that
E[R(A(S)) − Rs(A(S))] ≤ 2γ(2 − τ ).
We can put the above inequality back into (18) to derive
(cid:107)A(S) − w∗(cid:107)2(cid:105)
(cid:104)
E
σ
2
≤ E [RS (w∗) + r (w∗) − RS(A(S)) − r(A(S))]
≤ E [RS (w∗) + r (w∗) − R(A(S)) − r(A(S))] + 2γ(2 − τ )
= E [R (w∗) + r (w∗) − R(A(S)) − r(A(S))] + 2γ(2 − τ ) ≤ 2γ(2 − τ ).
Proof of Lemma 3 Because the PPL involves a pointwise part and a pairwise part, some related works of Lei, Ledent, and
Kloft (2020) and Pitcan (2017) can be combined here, i.e.,
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
τ
n
(cid:88)
i∈[n]
≤τ
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
1
n
(cid:88)
i∈[n]
f (w; zi) +
1 − τ
n(n − 1)
(cid:88)
i,j∈[n]:i(cid:54)=j
(cid:12)
(cid:12)
f (w; zi) − Ez[f (w; z)]
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
+ (1 − τ )
(cid:12)
(cid:12)
(cid:12)
(cid:12)
g (w; zi, zj) − τ Ez[f (w; z)] − (1 − τ )Ez, ̄z[g(w; z, ̃z)]
(cid:12)
(cid:12)
(cid:12)
1
n(n − 1)
(cid:88)
i,j∈[n]:i(cid:54)=j
(cid:12)
(cid:12)
g (w; zi, zj) − Ez, ̄z[g(w; z, ̃z)]
(cid:12)
(cid:12)
(cid:12)
(cid:115)
≤
2τ blog(1/δ)
3(cid:98)n(cid:99)
+ τ
2θlog(1/δ)
(cid:98)n(cid:99)
+
2(1 − τ )blog(1/δ)
3(cid:98)n/2(cid:99)
(cid:115)
+ (1 − τ )
2θlog(1/δ)
(cid:98)n/2(cid:99)
.
Proof of Theorem 3 According to Lemma 1 and Lemma 2, we deduce ES
obtain that
(cid:104)
(cid:107)w∗ − A(S)(cid:107)2
2
(cid:105)
≤ 16L2(2−τ )2
nσ2
. We can further
ES [(cid:107)w∗ − A(S)(cid:107)2] ≤
(cid:104)
(cid:16)
ES
(cid:107)w∗ − A(S)(cid:107)2
2
(cid:105)(cid:17) 1
2
≤
4L(2 − τ )
nσ
√
.
(19)
For any w ∈ W and z, ̃z, we define
̃f (w; z) = f (w; z) − f (w∗; z)
and
̃g(w; z, ̃z) = g(w; z, ̃z) − g (w∗; z, ̃z) .
With Lemma 10 and (19), for all z, ̃z ∈ Z, we can obtain the following inequalities:
(cid:12)
(cid:12)
(cid:12)
(cid:12)
ES[ ̃f (A(S); z)]
(cid:12) = |ES [f (A(S); z) − f (w∗; z)]| ≤ LES [(cid:107)w∗ − A(S)(cid:107)2] ≤
(cid:12)
4L2(2 − τ )
nσ
√
and
|ES[ ̃g(A(S); z, ̄z)]| = |ES [g(A(S); z, ̃z) − g (w∗; z, ̃z)]| ≤ LES [(cid:107)w∗ − A(S)(cid:107)2] ≤
4L2(2 − τ )
nσ
√
.
We now apply Theorem 1 with γ = 4L2
nσ (2 − τ ) and M = 4L2(2−τ )
√
nσ
to show the following inequality
τ
n
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
8L2
nσ
≤
(cid:88)
i=1
̃f (A(S); zi) − τ Ez[ ̃f (A(S); z)] +
(1 − τ )
n(n − 1)
(cid:88)
i(cid:54)=j
(cid:12)
(cid:12)
(cid:12)
̃g (A(S); zi, zj) − (1 − τ )Ez, ̃z[ ̃g(A(S); z, ̃z)]
(cid:12)
(cid:12)
(cid:12)
(2 − τ )2 + e
(cid:32)
16L2
nσ
(2 − τ )(4 − 3τ )(cid:112)log(e/δ) +
96
√
2L2
nσ
(2 − τ )2 (cid:100)log2(n)(cid:101) log(e/δ)
(cid:33)
with probability 1 − δ. Therefore,
|RS(A(S)) − R(A(S))|
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:88)
τ
n
i=1
f (w∗; zi) − τ Ez [f (w∗; z)] +
≤
(1 − τ )
n(n − 1)
(cid:88)
i(cid:54)=j
+
8L2
nσ
(2 − τ )2 + e
(cid:32)
16L2
nσ
(2 − τ )(4 − 3τ )(cid:112)log(e/δ) +
96
As stated in Lemma 3, with probability at least 1 − δ we have
√
2L2
nσ
(cid:12)
(cid:12)
(cid:12)
g (w∗; zi, zj) − (1 − τ )Ez, ̃z [g (w∗; z, ̃z)]
(cid:12)
(cid:12)
(cid:12)
(2 − τ )2 (cid:100)log2(n)(cid:101) log(e/δ)
.
(20)
(cid:33)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
τ
n
(cid:88)
i∈[n]
f (w∗; zi) +
(1 − τ )
n(n − 1)
(cid:88)
i,j∈[n]:i(cid:54)=j
(cid:12)
(cid:12)
g (w∗; zi, zj) − τ Ez[f (w∗; z)] − Ez, ̃z[g(w∗; z, ̃z)]
(cid:12)
(cid:12)
(cid:12)
(cid:115)
≤
2τ b log(1/δ)
3(cid:98)n(cid:99)
+ τ
2θ log(1/δ)
(cid:98)n(cid:99)
+
2(1 − τ )blog(1/δ)
3(cid:98)n/2(cid:99)
+ (1 − τ )
(cid:115)
2θlog(1/δ)
(cid:98)n/2(cid:99)
.
(21)
Combine (20) with (21), we deduce that with probability 1 − δ
|RS(A(S)) − R(A(S))|
(cid:115)
≤
2τ b log(1/δ)
3(cid:98)n(cid:99)
+ τ
2θ log(1/δ)
(cid:98)n(cid:99)
+
2(1 − τ )blog(1/δ)
3(cid:98)n/2(cid:99)
(cid:115)
+ (1 − τ )
2θlog(1/δ)
(cid:98)n/2(cid:99)
+
8L2
nσ
(2 − τ )2 + e
(cid:32)
16L2
nσ
(2 − τ )(4 − 3τ )(cid:112)log(e/δ) +
√
96
2L2
nσ
(2 − τ )2 (cid:100)log2(n)(cid:101) log(e/δ)
.
(cid:33)
The proof is complete.
B.4 Proof of Theorem 6
Proof of Theorem 4 Note that Si and Si,j is defined in (3) and (4). It is easily known that E (cid:2)Rpoint(A(S))(cid:3) =
E (cid:2)Rpoint(A(Si))(cid:3) and E (cid:2)Rpair(A(S))(cid:3) = E (cid:2)Rpair(A(Si,j))(cid:3) for all i, j ∈ [n] with i (cid:54)= j. Thus,
E [R(A(S)) − RS(A(S))]
=E
(cid:16)
(cid:104)
τ
Rpoint(A(S)) − Rpoint
S
(A(S))
(cid:17)
(cid:16)
+ (1 − τ )
Rpair(A(S)) − Rpair
S
(A(S))
(cid:17)(cid:105)
=
=
τ
n
τ
n
i=1
n
(cid:88)
i=1
n
(cid:88)
(cid:104)
E
Rpoint (A (Si)) − Rpoint
S
(cid:105)
(A(S))
+
(1 − τ )
n(n − 1)
(cid:88)
E
(cid:104)
Rpair (A (Si,j)) − Rpair
S
(cid:105)
(A(S))
i,j∈[n]:i(cid:54)=j
E [f (A (Si) ; zi) − f (A(S); zi)] +
(1 − τ )
n(n − 1)
(cid:88)
i,j∈[n]:i(cid:54)=j
E [g (A (Si,j) ; zi, zj) − g (A(S); zi, zj)] ≤ γ.
The proof is complete.
Proof of Lemma 4 According to the Lemma 2.1 of Srebro, Sridharan, and Tewari (2010), we know that the self-bounding
property for non-negative and smooth functions, i.e.,
(cid:107)f (cid:48)(w)(cid:107)2
2 ≤ 2βf (w),
∀w ∈ W,
and the following inequalities are also satisfied
(cid:107)g(cid:48)(w)(cid:107)2
2 ≤ 2βg(w),
∀w ∈ W,
f (w) ≤ f (w(cid:48)) + (cid:104)f (cid:48) (w(cid:48)) , w − w(cid:48)(cid:105) +
g(w) ≤ g (w(cid:48)) + (cid:104)g(cid:48) (w(cid:48)) , w − w(cid:48)(cid:105) +
β (cid:107)w − w(cid:48)(cid:107)2
2
2
β (cid:107)w − w(cid:48)(cid:107)2
2
2
,
,
∀w, w(cid:48) ∈ W,
∀w, w(cid:48) ∈ W.
Based on the above conditions and the Cauchy-Schwartz inequality, we deduce that
f (A (Si) ; zi) − f (A(S); zi)
≤ (cid:104)f (cid:48) (A(S); zi) , A (Si) − A(S)(cid:105) +
β
2
(cid:107)A (Si) − A(S)(cid:107)2
2
≤ (cid:107)f (cid:48) (A(S); zi)(cid:107)2 (cid:107)A (Si) − A(S)(cid:107)2 +
β
2
(cid:107)A (Si) − A(S)(cid:107)2
2
≤
(cid:107)f (cid:48) (A(S); zi)(cid:107)2
2
2(cid:15)
+
(cid:15) + β
2
(cid:107)A (Si) − A(S)(cid:107)2
2 ≤
βf (A(S); zi)
(cid:15)
+
(cid:15) + β
2
(cid:107)A (Si) − A(S)(cid:107)2
2 .
Then, we apply the above inequality to Theorem 5 to obtain
(cid:104)
E
Rpoint(A(S)) − Rpoint
S
(A(S))
(cid:105)
n
(cid:88)
E [f (A(S); zi)] +
(cid:15) + β
2n
n
(cid:88)
(cid:104)
E
i=1
(cid:107)A (Si) − A(S)(cid:107)2
2
(cid:105)
≤
β
(cid:15)n
βE
=
i=1
(cid:104)
Rpoint
S
(cid:105)
(A(S))
(cid:15)
+
(cid:15) + β
2n
n
(cid:88)
(cid:104)
E
i=1
(cid:107)A (Si) − A(S)(cid:107)2
2
(cid:105)
.
From the Lemma D.1 of Lei, Ledent, and Kloft (2020), we know
(cid:104)
E
Rpair(A(S)) − Rpair
S
(A(S))
(cid:105)
≤
βE
(cid:104)
Rpair
S
(cid:105)
(A(S))
(cid:15)
+
2((cid:15) + β)
n
n
(cid:88)
i=1
E
(cid:104)
(cid:107)A (Si) − A(S)(cid:107)2
2
(cid:105)
.
Combining (22) and (23), we have
E [R(A(S)) − RS(A(S))]
βτ E
(A(S))
Rpoint
S
(cid:105)
(cid:104)
≤
(cid:15)
β(1 − τ )E
+
(cid:104)
Rpair
S
(cid:105)
(A(S))
(cid:15)
+
((cid:15) + β)
n
(2 −
3
2
τ )
n
(cid:88)
(cid:104)
E
i=1
(cid:107)A (Si) − A(S)(cid:107)2
2
(cid:105)
.
The proof is completed.
Proof of Theorem 6 Due to Lemma 13 and the β-smoothness of f and g, we deduce that, for any k ∈ [n],
FS (A (Sk)) − FS(A(S)) ≤
τ
n
+
(cid:16)
(cid:104)f (cid:48) (A(S); zk) − f (cid:48) (A (Sk) ; z(cid:48)
k) , A (Sk) − A(S)(cid:105) + β (cid:107)A (Sk) − A(S)(cid:107)2
2
(cid:17)
(1 − τ )
n(n − 1)
(cid:88)
i∈[n]:i(cid:54)=k
((cid:104)g(cid:48) (A(S); zi, zk) + g(cid:48) (A(S); zk, zi) − g(cid:48) (A (Sk) ; zi, z(cid:48)
k)
Using the Cauchy-Schwartz inequality, we obtain
−g(cid:48) (A (Sk) ; z(cid:48)
k, zi) , A (Sk) − A(S)(cid:105) +
4β (cid:107)A (Sk) − A(S)(cid:107)2
2
2
).
FS (A (Sk)) − FS(A(S)) ≤
τ
n
+
(cid:16)
((cid:107)f (cid:48) (A(S); zk)(cid:107)2 + (cid:107)f (cid:48) (A (Sk) ; z(cid:48)
(1 − τ )
n(n − 1)
(cid:88)
(
i∈[n]:i(cid:54)=k
k)(cid:107)2) (cid:107)A (Sk) − A(S)(cid:107)2 + β (cid:107)A (Sk) − A(S)(cid:107)2
2
((cid:107)g(cid:48) (A(S); zi, zk)(cid:107)2 + (cid:107)g(cid:48) (A(S); zk, zi)(cid:107)2 + (cid:107)g(cid:48) (A (Sk) ; zi, z(cid:48)
k)(cid:107)2
+ (cid:107)g(cid:48) (A (Sk) ; z(cid:48)
k, zi)(cid:107)2) (cid:107)A (Sk) − A(S)(cid:107)2 + 2β(n − 1) (cid:107)A (Sk) − A(S)(cid:107)2
2).
(22)
(23)
(cid:17)
Based on the self-bounding property and strong-convexity property, we verify that
σ (cid:107)A (Sk) − A(S)(cid:107)2
2
2
≤
τ
n
(cid:18)
(cid:112)2β
(cid:18)
(cid:112)f (A(S); zk) +
(cid:18)
(cid:88)
((cid:112)2β
(cid:113)
f (A (Sk) ; z(cid:48)
k)
(cid:19)
(cid:107)A (Sk) − A(S)(cid:107)2 + β (cid:107)A (Sk) − A(S)(cid:107)2
2
(cid:19)
(cid:112)(cid:96) (A(S); zi, zk) + (cid:112)(cid:96) (A(S); zk, zi) +
(cid:113)
(cid:96) (A (Sk) ; zi, z(cid:48)
k)
(1 − τ )
n(n − 1)
+
+
(cid:113)
i∈[n]:i(cid:54)=k
(cid:19)
(cid:96) (A (Sk) ; z(cid:48)
k, zi)
(cid:107)A (Sk) − A(S)(cid:107)2 + 2β(n − 1) (cid:107)A (Sk) − A(S)(cid:107)2
2)
and
σ (cid:107)A (Sk) − A(S)(cid:107)2
2
≤
τ
n
(cid:18)
(cid:112)2β
(cid:18)
(cid:112)f (A(S); zk) +
(cid:113)
f (A (Sk) ; z(cid:48)
k)
(cid:19)
+ β (cid:107)A (Sk) − A(S)(cid:107)2
(cid:19)
+
(1 − τ )
n(n − 1)
((cid:112)2β
(cid:88)
(cid:16)(cid:112)g (A(S); zi, zk) + (cid:112)g (A(S); zk, zi)
g (A (Sk) ; zi, z(cid:48)
k) +
g (A (Sk) ; z(cid:48)
k, zi)
(cid:19)
+ 2β(n − 1) (cid:107)A (Sk) − A(S)(cid:107)2).
i∈[n]:i(cid:54)=k
(cid:113)
(cid:113)
+
When β ≤ σn/4(2 − τ ),
≤
σ (cid:107)A (Sk) − A(S)(cid:107)2
4
(cid:18)
(cid:112)f (A(S); zk) +
(cid:18)
(cid:18)
(cid:112)2β
τ
n
+
(1 − τ )
n(n − 1)
(cid:112)2β
(cid:88)
i∈[n]:i(cid:54)=k
(cid:113)
(cid:19)(cid:19)
f (A (Sk) ; z(cid:48)
k)
(cid:112)g (A(S); zi, zk) + (cid:112)g (A(S); zk, zi) +
(cid:113)
g (A (Sk) ; zi, z(cid:48)
k) +
(cid:113)
g (A (Sk) ; z(cid:48)
k, zi)
(cid:19)
We multiply both sides of the above inequality by n(n − 1) to derive
σn(n − 1) (cid:107)A (Sk) − A(S)(cid:107)2
4
(cid:112)2β
(cid:18)
(cid:18)
≤τ (n − 1)
(cid:112)f (A(S); zk) +
(cid:18)
(cid:88)
(cid:113)
f (A (Sk) ; z(cid:48)
k)
(cid:19)(cid:19)
+ (1 − τ )(cid:112)2β
(cid:112)g (A(S); zi, zk) + (cid:112)g (A(S); zk, zi) +
(cid:113)
g (A (Sk) ; zi, z(cid:48)
k) +
(cid:113)
g (A (Sk) ; z(cid:48)
k, zi)
(cid:19)
i∈[n]:i(cid:54)=k
and further square, that is,
σ2n2(n − 1)2 (cid:107)A (Sk) − A(S)(cid:107)2
2
16
≤2β(n − 1)
(cid:88)
i∈[n]:i(cid:54)=k
(cid:16)
(1 − τ )
(cid:16)(cid:112)g (A(S); zi, zk) + (cid:112)g (A(S); zk, zi)
(cid:113)
g (A (Sk) ; zi, z(cid:48)
k) +
+
(cid:113)
g (A (Sk) ; z(cid:48)
k, zi)
+ τ
(cid:19)
(cid:18)
(cid:112)f (A(S); zk) +
(cid:113)
f (A (Sk) ; z(cid:48)
k)
(cid:19)(cid:19)2
.
Then we use Cauchy-Schwartz inequality to derive
σ2n2(n − 1) (cid:107)A (Sk) − A(S)(cid:107)2
2
≤192β
(cid:88)
(cid:0)(1 − τ )2 (g (A(S); zi, zk) + g (A(S); zk, zi) + g (A (Sk) ; zi, z(cid:48)
k) + g (A (Sk) ; z(cid:48)
k, zi))
i∈[n]:i(cid:54)=k
+ τ 2 (f (A(S); zk) + f (A (Sk) ; z(cid:48)
k))(cid:1) .
.
,
We take a summation from k = 1 to n to obtain
σ2n2(n − 1)
n
(cid:88)
k=1
(cid:107)A (Sk) − A(S)(cid:107)2
2
≤192β
(cid:88)
i,k∈[n]:i(cid:54)=k
[(1 − τ )2 (g (A(S); zi, zk) + g (A(S); zk, zi) + g (A (Sk) ; zi, z(cid:48)
k) + g (A (Sk) ; z(cid:48)
k, zi))
+ τ 2 (f (A(S); zk) + f (A (Sk) ; z(cid:48)
k))].
Due to the symmetry, it is easily known that
σ2n
n
(cid:88)
k=1
(cid:107)A (Sk) − A(S)(cid:107)2
2 ≤ 384τ 2βE
(cid:104)
Rpoint
S
(A(S))
(cid:105)
+ 768(1 − τ )2βE
(cid:104)
Rpair
S
(A(S))
(cid:105)
.
With Lemma 4, we derive the following inequality for all (cid:15) > 0
E [R(A(S)) − RS(A(S))]
βτ E
(A(S))
Rpoint
S
(cid:105)
(cid:104)
≤
≤
(cid:15)
(cid:104)
βτ E
Rpoint
S
(cid:105)
(A(S))
(cid:15)
β(1 − τ )E
+
(cid:104)
Rpair
S
(cid:105)
(A(S))
(cid:15)
+
((cid:15) + β)
n
(cid:18)
2 −
+
384τ 2((cid:15) + β)β
σ2n2
(cid:18)
2 −
(cid:19)
3
2
τ
E
(cid:104)
Rpoint
S
(A(S))
E
(cid:104)
(cid:107)A (Si) − A(S)(cid:107)2
2
(cid:105)
(cid:19) n
(cid:88)
i=1
3
2
τ
(cid:105)
β(1 − τ )E
(cid:104)
Rpair
S
(cid:105)
(A(S))
(cid:15)
+
+
768(1 − τ )2((cid:15) + β)β
σ2n2
(cid:18)
2 −
(cid:19)
(cid:104)
E
3
2
τ
Rpair
S
(A(S))
(cid:105)
.
In addition, from the definition of A(S), we get
E[F (A(S))] − F (w∗) = E [F (A(S)) − FS(A(S))] + E [FS(A(S)) − FS (w∗)]
≤ E [F (A(S)) − FS(A(S))] = E [R(A(S)) − RS(A(S))] .
Thus,
E[F (A(S))] − F (w∗)
(cid:105)
(cid:104)
βτ E
Rpoint
S
(A(S))
≤
+
+
384τ 2((cid:15) + β)β
σ2n2
(cid:18)
2 −
(cid:19)
(cid:104)
E
3
2
τ
Rpoint
S
(A(S))
(cid:105)
(cid:15)
β(1 − τ )E
(cid:104)
Rpair
S
(cid:105)
(A(S))
(cid:15)
+
768(1 − τ )2((cid:15) + β)β
σ2n2
(cid:18)
2 −
(cid:19)
3
2
τ
E
(cid:104)
Rpair
S
(cid:105)
(A(S))
.
The desired result is proved.
|
|
http://arxiv.org/abs/2302.09956v2 | 2023-02-28T18:30:37 | 2023-02-20T12:57:31 | Because Every Sensor Is Unique, so Is Every Pair: Handling Dynamicity in
Traffic Forecasting | Traffic forecasting is a critical task to extract values from cyber-physical
infrastructures, which is the backbone of smart transportation. However owing
to external contexts, the dynamics at each sensor are unique. For example, the
afternoon peaks at sensors near schools are more likely to occur earlier than
those near residential areas. In this paper, we first analyze real-world
traffic data to show that each sensor has a unique dynamic. Further analysis
also shows that each pair of sensors also has a unique dynamic. Then, we
explore how node embedding learns the unique dynamics at every sensor location.
Next, we propose a novel module called Spatial Graph Transformers (SGT) where
we use node embedding to leverage the self-attention mechanism to ensure that
the information flow between two sensors is adaptive with respect to the unique
dynamic of each pair. Finally, we present Graph Self-attention WaveNet (G-SWaN)
to address the complex, non-linear spatiotemporal traffic dynamics. Through
empirical experiments on four real-world, open datasets, we show that the
proposed method achieves superior performance on both traffic speed and flow
forecasting. Code is available at: https://github.com/aprbw/G-SWaN | [
"Arian Prabowo",
"Wei Shao",
"Hao Xue",
"Piotr Koniusz",
"Flora D. Salim"
] | 10.1145/3576842.3582362 | [
{
"@title": "doi",
"@href": "http://dx.doi.org/10.1145/3576842.3582362",
"@rel": "related",
"@type": null
},
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09956v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09956v2",
"@rel": "related",
"@type": "application/pdf"
}
] | [
"IoTDI 2023"
] | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.CV",
"cs.DB"
] | 3
2
0
2
b
e
F
8
2
]
G
L
.
s
c
[
2
v
6
5
9
9
0
.
2
0
3
2
:
v
i
X
r
a
Because Every Sensor Is Unique, so Is Every Pair: Handling Dynamicity in
Traffic Forecasting
ARIAN PRABOWO, RMIT University, Australia and Data61/CSIRO, Australia
WEI SHAO, UC Davis, USA
HAO XUE, UNSW, Australia
PIOTR KONIUSZ, Data61/CSIRO, Australia and ANU, Australia
FLORA D. SALIM, UNSW, Australia
(a) Locations of the sensors on the Californian highway network sur-
rounding the bay area. Installing a network of sensors on a road infras-
tructure enables traffic forecasting and smarter cities.
(b) At each sensor, traffic forecasting uses the recent sensor
readings (solid blue line) to predict the future traffic (red line).
This forecast is made by our proposed architecture Graph Self-
attention WaveNet (G-SWaN). Our forecasts accurately predict
the future traffic (dotted blue line).
Fig. 1. Visual abstract of the traffic forecasting task.
Traffic forecasting is a critical task to extract values from cyber-physical infrastructures, which is the backbone of smart transportation.
However owing to external contexts, the dynamics at each sensor are unique. For example, the afternoon peaks at sensors near schools
are more likely to occur earlier than those near residential areas. In this paper, we first analyze real-world traffic data to show that
each sensor has a unique dynamic. Further analysis also shows that each pair of sensors also has a unique dynamic. Then, we explore
how node embedding learns the unique dynamics at every sensor location. Next, we propose a novel module called Spatial Graph
Transformers (SGT) where we use node embedding to leverage the self-attention mechanism to ensure that the information flow
Publication rights licensed to ACM. ACM acknowledges that this contribution was authored or co-authored by an employee, contractor or affiliate of a
national government. As such, the Government retains a nonexclusive, royalty-free right to publish or reproduce this article, or to allow others to do so,
for Government purposes only.
© 2023 Copyright held by the owner/author(s). Publication rights licensed to ACM.
Manuscript submitted to ACM
1
IoTDI '23, May 9–12, 2023, San Antonio, TX, USA
Arian Prabowo, Wei Shao, Hao Xue, Piotr Koniusz, and Flora D. Salim
between two sensors is adaptive with respect to the unique dynamic of each pair. Finally, we present Graph Self-attention WaveNet
(G-SWaN) to address the complex, non-linear spatiotemporal traffic dynamics. Through empirical experiments on four real-world,
open datasets, we show that the proposed method achieves superior performance on both traffic speed and flow forecasting. Code is
available at: https://github.com/aprbw/G-SWaN
CCS Concepts: • Applied computing → Transportation; • Information systems → Sensor networks; • Computing methodolo-
gies → Neural networks.
Additional Key Words and Phrases: cyber-physical systems, intelligent transport systems, spatio-temporal, sensor networks
ACM Reference Format:
Arian Prabowo, Wei Shao, Hao Xue, Piotr Koniusz, and Flora D. Salim. 2023. Because Every Sensor Is Unique, so Is Every Pair: Handling
Dynamicity in Traffic Forecasting. In International Conference on Internet-of-Things Design and Implementation (IoTDI '23), May 9–12,
2023, San Antonio, TX, USA. ACM, New York, NY, USA, 20 pages. https://doi.org/10.1145/3576842.3582362
1 INTRODUCTION
The recent proliferation of networked physical sensors have allowed exponential growth of machine generated data in
many applications, including road traffic. This has led to the emergence of intelligent transportation systems, which
have the potential to revolutionize the way we live.
Previous works have discussed and explored the challenges of traffic forecasting (Figure 1) relating to the complexity
of temporal and spatial dynamics. Temporal dynamics is the relationships between past and future traffic. Although
many simplified mathematical model exists [5], none are capable to capture the complexity of real world traffic. This
resulted in many research towards data-driven methods [11, 18, 22, 46, 54, 58, 59]. Meanwhile, spatial dynamics is the
relationships traffic at different locations. The complexity in spatial dynamics is caused by the non-euclidean topology
of the road network [4, 18, 32, 46, 54, 58].
(a) Idealized fundamental diagram. Figure is copied
from [5].
(b) Fundamental diagram of a sensor in
PeMS-D4 dataset.
(c) Fundamental diagrams of 12 selected sensors in
PeMS-D4 dataset showing great diversity.
Fig. 2. Fundamental diagrams showing the dynamics between flow (density) in the x-axis and speed (velocity) in the y-axis. Figure
2(a) and 2(b) compare the idealized fundamental diagram against the real-world data, while Figure 2(c) shows that every sensor has a
unique fundamental diagram, suggesting a unique underlying dynamics. The PeMS-D4 dataset is detailed in section 4.1.
However, one novel observation presented in this paper is that every sensor has a unique dynamics. We show this
by plotting flow (density) versus speed (velocity), also known as fundamental diagrams [5]. Figure 2(a) shows the
idealized fundamental diagram based on a mathematical model of traffic [6]. According to this model, all sensors have
2
Because Every Sensor Is Unique, so Is Every Pair: Handling Dynamicity in Traffic Forecasting
IoTDI '23, May 9–12, 2023, San Antonio, TX, USA
the same general shape: The speed stays constant during a free flow of traffic and decreases during a congested flow.
The real-world data, however, reveals a different dynamic. Figure 2(b) shows the fundamental diagram of a sensor in the
PeMS-D4 dataset. Although both the theory and the data agree that there is an inverse relationship between flow and
speed, the sharp threshold between free flow and congested flow is not found in this particular sensor data. At every
density, moreover, there is a huge variance of speed. Finally, Figure 2(c) shows that there is a great diversity between
fundamental diagrams of various sensors, strongly suggesting that every sensor has a unique dynamic. This suggests
the need of a mechanism to capture individual sensor dynamics.
(a) Association plots of 8 random sensor pairs.
(b) Association plots of a sensor pair over three weeks.
Blue lines are weekdays, red lines are weekends.
Fig. 3. Association plots of different pairs of sensor readings in PeMS-D4. The x-value of a point is the flow at one sensor, while the
y-value is the flow at the other sensor. Consecutive data points are connected by a line. The PeMS-D4 dataset is detailed in section
4.1.
Furthermore, given that all individual sensor dynamics are unique, the impact traffic at a sensor location has on its
neighbors also involves complex relationships that are unique to that pair. The data confirms this behavior. In Figure
3(a), we plot the flow correlation of several pairs of sensors. The plot shows great diversity in the dynamics of sensor
pairs. Moreover, Figure 3(b) shows that even within a single sensor, the dynamic changed periodically over time. The
weekday pair dynamic (blue) is distinct from the weekend pair dynamic (red).
There are many other ways to formulate this task besides as a multivariate timeseries forecasting, one example
being as conditional spatiotemporal generation [16]. Another is a mathematical model of traffic, which can explain the
cause of unique sensor and sensor pair dynamics. The macroscopic or continuum model of traffic is based on partial
differential equations (PDEs) [48]. In this model, traffic is treated as a continuous fluid, with aggregate values used such
as average speed and flow. Similar to fluid dynamics, traffic is modelled using a set of PDEs and boundary conditions.
While initial conditions are often discussed in the context of PDEs, they have less relevance in this context and will be
ignored.
The PDEs that describe the evolution of traffic flow have spatial shifts or translation symmetry, meaning that they
are the same everywhere. This is the dynamics that is being captured by most existing models that does not take sensor
and sensor pairs unique dynamics into account. However, different places may have different boundary conditions,
breaking the spatial symmetry and resulting in unique dynamics for every sensor. For example, entry and exit ramps can
3
IoTDI '23, May 9–12, 2023, San Antonio, TX, USA
Arian Prabowo, Wei Shao, Hao Xue, Piotr Koniusz, and Flora D. Salim
be modelled as inlet/source and outlet/sink boundary conditions, respectively; lane or road closures can be considered
changes to the geometry of the boundaries. This is why traffic flow may differ significantly between neighbouring
sensors, even if they are connected by a road.
To address these challenges, we present Graph Self-attention WaveNet (G-SWaN). It contains a novel spatial module
called Spatial Graph Transformers (SGT) that extends a self-attention mechanism [49] to traffic networks with unique
sensor dynamics. Moreover, being a graph neural network, SGT are well suited to deal with the non-euclidean spatial
dynamics of a traffic network [7]. The node embedding in SGT injects sensor identity information into the self-attention
mechanisms, enabling them to adapt to the unique dynamics of each pair.
To show the generalizability of our architecture in traffic forecasting tasks, we evaluate our model by two traffic
metrics: Speed and flow. We use four public, real-world datasets for reproducibility. Briefly, our main contributions are
as follows:
(1) To adapt to the behavior dynamics of individual sensors and pairs of sensors, as shown in Figure 2 and 3, we
propose the Spatial Graph Transformers (SGT) module, which encodes individual sensor dynamics through node
embedding.
(2) We introduce a novel traffic forecasting architecture, Graph Self-attention WaveNet (G-SWaN), which uses SGT
to capture the unique dynamics.
(3) Through extensive experiments on four open real-world datasets, we empirically show that the proposed
architecture achieves state-of-the-art results.
2 RELATED WORK
This section discusses existing works on traffic forecasting, starting from classical statistical techniques to the latest
deep learning methods, including attention-based models.
One of the first works in this area [2] featured the Box-Jenkins technique. A large number of these earlier works
also fall into the data-driven and statistical approaches to machine learning. These include Autoregressive Integrated
Moving Average (ARIMA) [19] and ARIMA-like approaches, such as KARIMA [47], subset ARIMA [29], ARIMAX [52],
VARMA [25], and SARIMA [53], as well as classical machine learning methods like SVR [9, 24, 33].
Based on early successes in various other tasks, deep learning was applied to traffic forecasting and [36] used
stacked autoencoder as a generic latent feature learning. This was followed by a number of works that used varieties of
Recurrent Neural Networks (RNN), such as Gated Recurrent Units (GRU) [15] and Long Short-Term Memory (LSTM)
[42][12], to better capture the temporal dynamics.
In contrast to the temporal focus used in the aforementioned studies, other works captured spatial information from
traffic data to infer road maps [41] and predict flight delays [43, 44]. Diffusion Convolution Recurrent Neural Network
(DCRNN) [32] attempted to capture both spatial and temporal dynamics by alternating between spatial and temporal
modules. It established the architecture for many subsequent works, including the present one.
DCRNN also extended convolution from undirected to directed graphs, arguing that traffic flow is directed in a
network. In addition, Spatio-Temporal Hashing Multi-Graph Convolutional Network (ST-HMGCN) extended convolution
to a multi-graph in order to forecast in a bus transit system, arguing that there are many different types of dependencies
beyond the spatiotemporal ones, such as the semantics of different stations [35].
Following this general approach, Spatio-Temporal Graph Convolution Network (STGCN) [58] replaces the GRU in
DCRNN with 1D convolution layers in order to increase efficiency. This pattern of replacing a specific module with
4
Because Every Sensor Is Unique, so Is Every Pair: Handling Dynamicity in Traffic Forecasting
IoTDI '23, May 9–12, 2023, San Antonio, TX, USA
Table 1. Notations
Notation Description
α
A
Aadp
Ar
attention matrices
adjacency matrices
adaptive adjacency matrices
adjacency matrices based on
physical road network connectivity
tensor shape:
B: batch size,
D: embedding dimension size,
N: number of sensors,
L: number of timesteps in an observation window
final representation dimension size
node embeddings
forecasting horizon in timesteps
Fully Connected layer
Graph Convolutional Networks
number of attention heads
model output, prediction on the future traffic
Mean Absolute Error
Mean Percentage Error
query and key matrices as a part of
self-attention mechanisms
Radial Basis Functions
Root Mean Square Error
sigmoid activation function
hyperbolic tan
time-of-day
number of G-SWaN layers
feature data point
ground truth label
[B,D,N,L]
Dr
e1, e2
F
FC
GCN
H
h
MAE
MAPE
query (Q)
key (K)
RBF
RMSE
σ
tanh
tod
W
x
y
inspiration from other tasks continues with Graph WaveNet [45, 54]. By replacing temporal 1D convolution with
WaveNet, the study [38], showed success in capturing temporal dynamics for audio. They also replaced the spectral
GCN [26, 65, 66] with spatial GCN [20]. The limitation of the adjacency matrix is that it only reflects the physical
connectivity between sensors to capture the latent spatio-temporal correlations [13]. This line of reasoning motivates
the development of adaptive graph generation [4, 51, 54].
Some later methods took inspiration from the successes of attention mechanisms [3] applied to spatial GCN [50],
combined with the self-attention paradigm of transformer [8, 10, 49, 51, 59], and introduced their own variants of GAT
such as [27, 34, 40, 63]. This contrasts with the existing attention-based works on traffic forecasting, such as Attention
Based Spatial-Temporal Graph Convolutional Network (ASTGCN) [18] and Reinforced Spatiotemporal Attentive Graph
5
IoTDI '23, May 9–12, 2023, San Antonio, TX, USA
Arian Prabowo, Wei Shao, Hao Xue, Piotr Koniusz, and Flora D. Salim
Neural Networks (RSTAG) [64], which only focus on past data instead of the road network structure. Attentive Spatial-
Temporal Convolutional Network (ASTCN) has also used an attention mechanism to forecast traffic flow on a grid
instead of on a graph [17].
Attention mechanisms have retained their popularity over recent years [56, 57]. One approach [30] used GAT to
forecast traffic metrics of the edge attributes rather than the sensor attributes, while another [14] used an attention-based
method on GPS traces to get a fine-grained representation. More closely related to our present work, other works [1, 60]
used attention to capture temporal dynamics. Nevertheless, none of these works took into account the node and edges
unique dynamics, nor provided a method to effectively capture these dynamics.
3 METHOD
3.1 Problem Statement
The dataset X ∈ RDinput ×N ×K
is a tensor where d ∈ Dinput includes the traffic measurements and other contextual
information, such that d = 0 is the traffic measurement and d = 1 is the kth the time-of-day, N is the number of
recording stations, and K is the number of timesteps. Each data point xk = XDinput ,N ,k:k+L is a tensor, where L is the
number of timesteps in the data point.
Road networks are abstracted to a directed graph with weighted edges. This graph is represented through a sparse
adjacency matrix Ar . The adjacency matrix is normalized between zero and one. An edge with higher weight means
that the sensors are closer together, while lower weight means that the sensors are further apart.
The traffic forecasting task is a multi-step forecasting problem formalized as follows: h(xk ) = xk+L+F where F is the
forecasting horizon. A description of the notation used is presented in Table 1.
3.2 Graph Self-attention WaveNet (G-SWaN)
Fig. 4. System architecture of Graph Self-attention WaveNet (G-SWaN). Spatial Graph Transformers (SGT) is the novel module
proposed that uses the node embeddings e1 and e2 to capture the unique sensor dynamics in the self-attention mechanisms. The
notations are described in Table 1.
6
Because Every Sensor Is Unique, so Is Every Pair: Handling Dynamicity in Traffic Forecasting
IoTDI '23, May 9–12, 2023, San Antonio, TX, USA
The general structure of the proposed Graph Self-attention WaveNet (G-SWaN) is shown in Figure 4. While we use
Graph WaveNet [54] as our backbone, we also make a number of minor improvements. The main contribution in this
paper is the SGT module.
The major components of G-SWaN are augmentations, initial embedding, G-SWaN layers, and the final fully connected
(FC) layers. The initial embedding module, which functions as the encoder for the input x, consists of two parallel
FC layers. The output is then passed through W G-SWaN layers, each consisting of a WaveNet module to learn the
temporal dynamics and a SGT module to learn the spatial dynamics.
The SGT uses adjacency matrices A and node embeddings e1 and e2. These node embeddings learn the node and edge
unique dynamics end-to-end. The adjacency matrices A are composed of an adjacency matrix based on the physical
connectivity of the road network Ar and a learned adaptive one Aadp . Ar is constructed by passing the Euclidean
distance of physically connected sensors through a Radial Basis Function (RBF). Meanwhile, Aadp is constructed as
a batched dot product of the node embeddings. Most importantly, SGT uses a self-attention mechanism to make the
adjacency matrices A adaptive to the current input. Finally, the output of the G-SWaN layers is passed through FC
layers to produce the forecasted future traffic h.
The loss function is Mean Absolute Error (MAE). In the tensor shapes, B is the batch size, D is the embedding
dimension, N is the number of sensors, and L is the number of timesteps.
Many minor elements such as augmentation [62], activation functions [61], batch normalization, tensor reshape, and
batch operations are not shown. The major components introduced in this section will be described in the order above.
3.2.1 Augmentation. We use three different augmentations:
• Soft spatial occlusion. For each data point, every station has a 5% probability to be partially occluded through
a 0.05 scaling.
• Temporal permutation. For each data point, every timestep has a 5% probability to have the stations be
permuted.
• Uniform noise. A uniform noise with a scale of 5% of the standard deviation is added to each entry of a data
point.
Initial Embedding. The initial embedding consists of two parallel FC layers. Functioning as an encoder, both
3.2.2
project the input to the latent space with an embedding size of D. The first layer (FC metric) projects the historical
traffic data, while the second layer (FC tod) projects the time-of-day (tod) information. Because both projections have
the same dimensions, they can be aggregated via summation.
3.2.3 G-SWaN Layer. A G-SWaN layer is a spatio-temporal layer made up of three main components: WaveNet [38]
as the temporal module, SGT as the spatial module, and an FC layer. The WaveNet module takes the outputs of the
previous layer as the input and outputs to the SGT module. The SGT module outputs to the next G-SWaN layer. In the
earlier layers, SGT is building simpler spatial latent features as it only has a small temporal receptive field. However, in
the later layers, SGT is building a richer spatiotemporal latent feature as the receptive field covers the entire observation
window.
To deal with diminishing gradients, the outputs of both the temporal and spatial module are also connected to the
final FC layer in the G-SWaN layer to form residual connections [21]. This FC layer has Dr neurons. The outputs of
each FC layer is then aggregated via summation. This is detailed in Figure 5. The final FC are the ones below the gray
area. The WaveNet and SGT modules are described in the following two sections.
7
IoTDI '23, May 9–12, 2023, San Antonio, TX, USA
Arian Prabowo, Wei Shao, Hao Xue, Piotr Koniusz, and Flora D. Salim
3.2.4 WaveNet. WaveNet [38] is a convolutional alternative to RNN that deals with sequential data. By using dilation,
it gives exponential increases of receptive field width with respect to the number of layers, as opposed to traditional
CNN.
Following the original Graph WaveNet [54], two WaveNet are used per layer in parallel. One is activated with tanh
and acts as a convolutional filter, while the other is activated with sigmoid and acts as a gating mechanism on each
latent channel. The outputs of the WaveNet module are passed on to the SGT. Additionally, a residual connection is
passed to the final FC layer of the corresponding G-SWaN layer.
Fig. 5. A layer of G-SWaN contains a WaveNet temporal block (blue) and a Spatial Graph Transformer (SGT) block (red). SGT uses
node embedding (e1 and e2) to apply multi-headed a query and key self-attention mechanism on the adjacency matrix A. This way,
the self-attention mechanism is sensitive to the unique dynamics of every pair of sensors. There are H attention heads and W layers.
Some details such as activation functions and batch normalization are also not shown.
3.2.5
Spatial Graph Transformer (SGT). When modelling the spatial dynamics, it is important to factor in that spatial
dynamics change periodically through time, as shown in Figure 3(b). However, many current works do not take this
into account. Here are three examples from STGCN [58], AGCRN [4], and Graph WaveNet [54], respectively:
x′ = W(AL)x,
x′ = WE WW xAL,
x′ =
K
∑︁
k
k
k
adp,
p + W2,k xA
W1,k xA
(1)
(2)
(3)
where x and x′ are the input and output from and to the previous and subsequent layers, respectively, W, WE , WW ,
W1,k , and W1,k are all learnable parameters, AL is the Laplacian of the adjacency matrix [26], Ap is the power normalized
adjacency matrix [32], Aadp is the adaptive adjacency matrix, and K is the number hops in the spatial diffusion.
In all three cases, the adjacency matrices A are not a function of the input signal x, rendering them incapable to
adapt to the changes in the spatial dynamics. To address this issue, we propose a novel module called SGT to make the
8
Because Every Sensor Is Unique, so Is Every Pair: Handling Dynamicity in Traffic Forecasting
IoTDI '23, May 9–12, 2023, San Antonio, TX, USA
GCN adaptive to the unique and changing dynamics of each pair of sensors. This has some similarity with the attention
mechanism in GAT [50]. SGT uses a transformer-like query, key, and value formulation of self-attention [49].
We propose the following graph convolution layer:
x′(x|e1, e2) =
K,H
∑︁
k,h
W1,k xα (Ar |x, e1, e2)k + W2,k xα (Aadp |x, e1, e2)k
(4)
where e1 and e2 are the source and target node embeddings, H is the number of attention heads, Ar is the adjacency
matrix based on the physical road connectivity, and finally the α (A|X, e1, e2) function is the attention mechanism that
is adaptive to the input signal x, which is going to be described in more detail in the following paragraph. The (cid:205)
operation could be generalized to any aggregating function. In our case, (cid:205) is implemented as two FC layers, shown in
Figure 5 to the right of the red area and at the bottom right of the grey area.
Aadp is a learned adjacency matrix to capture complex spatial relations that is not captured through the former
adjacency matrix (Ar ). This is shown in the bottom row of Figure 4. The adaptive adjacency matrix is calculated as
follows:
Finally, α (*) is a self-attention mechanism that dynamically determines the attention given to each edge, based on
the current input and node embeddings. It is defined as follows:
Aadp = So f tMax (ReLU (e1e2
T )).
(5)
α (A|x, e1, e2) = So f tMax
(cid:16)
σ (A ∗ Q (x, e1)K (x, e2)T ), τ
(cid:17)
(6)
where ∗ is an element-wise matrix multiplication, σ is an activation function, and τ is the softmax temperature. In
equation (6), the query Q and key K matrices are given through two FC layers:
K (x, e1) = FCK (x + e1),
Q (x, e2) = FCQ (x + e2).
(7)
(8)
The query Q (x, e2) and key K (x, e2) matrices are functions of both the input x and node embeddings e1 and e2. This
formulation enables the SGT module to be adaptive to the unique and changing dynamics of each pair of sensors.
3.2.6
Final FC and Loss. The final FC layers take the aggregated output of the G-SWaN layers and act as a decoder. In
this sense, the G-SWaN layers act as a spatio-temporal encoder that produce compact representations of the input in
contrast to multi-way tensor representations [28]. It outputs the forecast h for the next F timesteps at all N sensors.
3.2.7 Loss and Optimizer. Following previous works, we use Mean Absolute Error (MAE) as the loss function and
Adam with weight decay as the optimizer.
3.2.8 Minor Improvements. Additionally, there are a number of minor modifications. First, we adopt changes suggested
by [45]: (1) Adding a time-of-day feature and separate FC layer for embedding. (2) Increasing the number of hidden
channels from 32 to 40. (3) Introducing a learning rate decay with a factor of 0.97 per epoch. (4) Reducing the gradient
clipping from 5 to 3 as additional residual connections are introduced around the GCN. (5) Replacing missing data with
the average of training data, instead of zero.
As well as the changes discussed above, a series of minor changes are introduced: (1) Using Mish [37] as activation
function. (2) contrary to the finding in [45], batch normalization is found to be useful and is implemented accordingly.
9
IoTDI '23, May 9–12, 2023, San Antonio, TX, USA
Arian Prabowo, Wei Shao, Hao Xue, Piotr Koniusz, and Flora D. Salim
4 EXPERIMENT
4.1 Dataset
Table 2. Dataset description.
Dataset
Spatial
Temporal
Value
Size
Sensors
Edges
Timesteps
Range (duration in days) Metric
Mean ± Std
Entry
Compressed (MB)
METR-LA
PeMS-BAY
PeMS-D4
PeMS-D8
207
325
307
170
1,515
2,694
340
277
34,272
52,116
16,969
17,833
1 Mar 12 - 30 Jun 12 (121)
1 Jan 17 - 30 Jun 17 (180)
1 Jan 18 - 28 Feb 18 (58)
1 Jul 16 - 31 Aug 16 (61)
speed
speed
flow
flow
53.72± 20.26
62.61± 9.59
211.70± 158.07
230.68± 146.22
7,094,304
16,937,700
5,209,483
3,031,610
54
130
31
18
We use four open, real-world, datasets that have been previously been used by other works as benchmarks [4, 18,
32, 46, 54, 58, 59]. The important statistics of these datasets are available in Table 2. All datasets record the relevant
traffic metric every five minutes (one timestep) at various recording stations (sensors) in a road network. The traffic
metric recorded by METR-LA and PeMS-BAY is the average speed, while PeMS-D4 and PeMS-D8 is the flow (number of
vehicles, also known as traffic volume). They are all also accompanied with time-of-day information. As can be seen in
Figure 6, the speed datasets have negative skews while the flow datasets have positive skews. This is because most of
the time, the road networks are not congested and vehicles are traveling at the speed limit. This is also shown through
the slight negative correlation in the fundamental diagrams in Figure 2(c). We selected these datasets because they are
publicly available, and because they vary in important ways, as described below:
• METR-LA [23]. This dataset is collected from loop detectors in LA, USA county highway. This is the most
popular dataset for traffic forecasting.
• PeMS-BAY [32]. This dataset is collected by California Transportation Agencies (CalTrans) Performance Mea-
surement System (PeMS), also from loop detectors. This is the second most popular dataset for traffic forecasting.
This is the largest dataset in terms of sensors, edges, timesteps, and entries among the four we are using.
• PeMS-D4. This dataset is also from CalTrans PeMS. This, together with PeMS-D8, is the most popular dataset for
traffic flow forecasting. To the best of our knowledge, three works have also used both of these datasets [4, 18, 46].
It contains sensor data from freeways of district 4 in California, USA. Temporally, this is the shortest dataset.
• PeMS-D8. This dataset is also from CalTrans PeMS. All three works that used the PeMS-D4 dataset also used
this dataset. However, it is coming from district 8. This is the smallest dataset in terms of sensors, edges, and
number of entries.
All datasets are accompanied with an adjacency matrix based on the network distance between sensors. To maintain
consistency with previous works, we construct the adjacency matrix by passing the network distance between connected
sensors through a Gaussian RBF:
(cid:32)
Ai,j = exp
−
(cid:19)2(cid:33)
(cid:18) d (ni, n j )
σd
(9)
where Ai,j is the i-th row and j-th entry of adjacency matrix A, d (ni, n j ) is the network distance between sensor ni and
sensor n j , and σd is the standard deviation of all the network distance between all immediately connected sensors.
10
Because Every Sensor Is Unique, so Is Every Pair: Handling Dynamicity in Traffic Forecasting
IoTDI '23, May 9–12, 2023, San Antonio, TX, USA
Fig. 6. Visualization of the temporal dynamics and distribution of the datasets.
4.2 Experimental Setup
We use the common experimental setup as typical in previous works. One timestep consists of a 5-minute average
speed for every sensor in the road network. One datapoint of an input is made up of 12 consecutive timesteps (1 hour),
and the output is the next 12 timesteps.
11
IoTDI '23, May 9–12, 2023, San Antonio, TX, USA
Arian Prabowo, Wei Shao, Hao Xue, Piotr Koniusz, and Flora D. Salim
4.2.1 Training, Validation, and Test Split. In order to match the setting of previous works, the split ratio differs depending
on the traffic metric. For the datasets with the speed metric, we use 7:1:2 temporal split, following [54]. For the datasets
with the flow metric, we use 6:2:2 temporal split, following [4].
4.2.2
Feature Scaling. We scale the speed channel of our input to achieve standard distribution as follows:
x ′ =
x − μx
σx
(10)
where x is the raw input, x ′ is the input after scaling, μx is the average of the raw input, σx is the standard deviation of
the raw input. This way, our input has zero mean and a standard deviation of one. The time-of-day feature is scaled
using MinMax scaler.
4.2.3 Computing Infrastructure. All of the models are implemented in Python 3.7.4 with PyTorch 1.5.1 (cuDNN 7.6.5
and CUDA 10.1). They are executed in a computing sensor with one NVIDIA Tesla V100 GPU card and Intel(R) Xeon(R)
Platinum 8268 CPU @ 2.90GHz.
4.2.4 Metrics. To evaluate the prediction performance of the proposed methods, three widely used metrics are selected,
namely Mean Average Error (MAE), Mean Average Percentage Error (MAPE), and Root Mean Square Error (RMSE).
They are defined as follows:
MAE =
1
N
N
∑︁
n=1
|yn − hn|,
MAPE =
100%
N
N
∑︁
n=1
(cid:12)
(cid:12)
(cid:12)
(cid:12)
yn − hn
yn
(cid:12)
(cid:12)
(cid:12)
(cid:12)
,
RMSE =
(cid:118)(cid:117)(cid:116)
1
N
N
∑︁
n=1
(yn − hn)2,
(11)
(12)
(13)
where y is the actual label, h is the predicted value, and N is the number of datapoints.
All three metrics are useful to compare the error profile of different models. MAE is the most interpretable since it is
simply the average absolute error. RMSE is more sensitive to larger errors, thus when RMSE is significantly larger than
MAE, it indicates that models make fewer mistakes, but those mistakes are larger in magnitude. This information is
important for users of the traffic models. Finally, MAPE is unitless, making it useful for comparison between datasets.
Following the previous work, we report the performance at three forecasting horizons (15, 30, and 60 minutes) for
the speed datasets (METR-LA and PeMS-BAY) [32, 54]; whereas the average MAE, MAPE, and RMSE across the next 12
timesteps (corresponding to one hour) are reported for the flow datasets (PeMS-D4 and PeMS-D8) [18, 46, 46].
4.3 Baselines
We compare G-SWaN with the performances of the following models: (1) HA [4] Historical Average assumes daily
periodicity and takes the average of the same time slot from the previous period; (2) ARIMA [19] Auto-Regressive
Integrated Moving Average; (3) VAR [67] Vector Auto Regressive; (4) SVR [31] Support Vector Regression; (5) FNN [31]
Feed-forward Neural Network; (6) FC-LSTM [32] Fully Connected, Long Short-Term Memory network; (7) GRU-ED
[11] Gated Recurrent Unit Encoder Decoder; (8) DSANet [22] Dual Self-Attention Network uses self-attention to
capture spatial correlation; (9) DCRNN [32] Diffusion Convolution Recurrent Neural Network with graph convolution
12
Because Every Sensor Is Unique, so Is Every Pair: Handling Dynamicity in Traffic Forecasting
IoTDI '23, May 9–12, 2023, San Antonio, TX, USA
in the spatial block and GRU in the temporal block; (10) STGCN [58] Spatio-Temporal Graph Convolutional Network,
using spectral GCN; (11) Graph WaveNet [54] uses spatial GCN [20] in the spatial block and WaveNet [38] in their
temporal block; (12) ST-MetaNet [39] Spatio-temporal Meta-learning Network; (13) ASTGCN [18] Attention-based
Spatio-Temporal Graph Convolution Network uses both spatial and temporal attention; (14) STSGCN [46] Spatio-
Temporal Synchronous Graph Convolution Network captures spatio-temporal dynamics by adding temporal edges to
their graph convolution; (15) AGCRN [4] Adaptive Graph Convolutional Recurrent Network generates an adaptive
spatial graph to complement the physical road network adjacency matrix; (16) GMAN [63] Graph Multi-Attention
Network uses spatio-temporal and transform attention; (17) MTGNN [55] Multivariate Time-series Graph Neural
Network uses meta-learning to learn the weights of the spatial and temporal module.
Besides for G-SWaN, the results in Table 3 are based on the benchmark performed by [31], while for Table 4, it was
performed by [4]. The exception is for Graph WaveNet in Table 4, which was reproduced by us.
5 RESULTS
5.1 Performance Comparison
Table 3. Performance comparison on speed metric using METR-LA and PeMS-BAY datasets. Since all the metrics are error metrics,
lower means better. Prediction horizon = 15 / 30 / 60 minutes. Bold means the best performance within the metric. Underline means
the second best performance.
(Metric: speed)
Model
HA
ARIMA
VAR
SVR
FNN
FC-LSTM
DCRNN
STGCN
Graph WaveNet
ST-MetaNet
ASTGCN
STSGCN
AGCRN
GMAN
MTGNN
G-SWaN (ours)
MAE
4.16
3.99/5.15/6.90
4.42/5.41/6.52
3.99/5.05/6.72
3.99/4.23/4.49
3.44/3.77/4.37
2.77/3.15/3.60
2.88/3.47/4.59
2.69/3.07/3.53
2.69/3.10/3.69
4.86/5.43/6.51
3.31/4.13/5.06
2.87/3.23/3.62
2.80/3.12/3.44
2.69/3.05/3.49
2.65/3.02/3.47
METR-LA
RMSE
7.80
8.21/10.45/13.23
7.89/9.13/10.11
8.45/19.87/13.76
7.94/8.17/8.69
6.30/7.23/8.69
5.38/6.45/7.60
5.74/7.24/9.40
5.15/6.22/7.37
5.17/6.28/7.52
9.27/10.61/12.52
7.62/9.77/11.66
5.58/6.58/7.51
5.55/6.49/7.35
5.18/6.17/7.23
5.05/6.12/7.27
MAPE (%)
MAE
13.00
9.60/12.70/17.40
10.20/12.70/15.80
9.30/12.10/16.7
9.90/12.90/14.00
9.60/10.90/13.20
7.30/8.80/10.50
7.62/9.57/12.70
6.90/8.37/10.01
6.91/8.57/10.63
9.21/10.13/11.64
8.06/10.29/12.91
7.70/9.00/10.38
7.41/8.73/10.07
6.86/8.19/9.87
6.72/8.13/9.86
2.88
1.62/2.33/3.38
1.74/2.32/2.93
1.85/2.48/3.28
2.20/2.30/2.46
2.05/2.20/2.37
1.38/1.74/2.07
1.36/1.81/2.49
1.30/1.63/1.95
1.36/1.76/2.20
1.52/2.01/2.61
1.44/1.83/2.26
1.37/1.69/1.96
1.34/1.63/1.86
1.32/1.65/1.94
1.30/1.61/1.91
PeMS-BAY
RMSE
5.59
3.30/4.76/6.50
3.16/4.25/5.44
3.59/5.18/7.08
4.42/4.63/4.98
4.19/4.55/4.96
2.95/3.97/4.74
2.96/4.27/5.69
2.74/3.70/4.52
2.90/4.02/5.06
3.13/4.27/5.42
3.01/4.18/5.21
2.87/3.85/4.54
2.91/3.76/4.32
2.79/3.74/4.49
2.72/3.64/4.37
MAPE (%)
6.80
3.50/5.40/8.30
3.60/5.00/6.50
3.80/5.50/8.00
5.19/5.43/5.89
3.80/5.20/5.70
2.90/3.90/4.90
2.90/4.17/5.79
2.73/3.67/4.63
2.82/4.00/5.45
3.22/4.48/6.00
3.04/4.17/5.40
2.94/3.87/4.64
2.86/3.68/4.37
2.77/3.69/4.53
2.69/3.62/4.49
Table 3 and 4 present the results of our G-SWaN and other methods. For each column, the best result is given in bold.
Note that HA makes the same prediction regardless of the forecasting horizon, so we only have one value for each
metric.
When the forecasting horizon is increasing, the prediction performance of each method becomes worse, which is
as expected. As can be seen from Table 3 and 4, the proposed G-SWaN achieves the best performances in all datasets,
across all metrics, with few exceptions. In those exceptions, G-SWaN always comes in the second place. Overall, these
results demonstrate the superior performance of our G-SWaN.
13
IoTDI '23, May 9–12, 2023, San Antonio, TX, USA
Arian Prabowo, Wei Shao, Hao Xue, Piotr Koniusz, and Flora D. Salim
Table 4. Performance comparison on flow metric using PeMS-D4 and PeMS-D8 datasets. Since all the metrics are error metrics, lower
means better. Bold means the best performance within the metric. Underline means the second best performance.
(Metric: flow)
PeMS-D4
PeMS-D8
Model
MAE RMSE MAPE MAE RMSE MAPE
52.04
59.24
38.03
HA
VAR
29.81
38.61
24.54
36.23
39.27
23.68
GRU-ED
DSANet
26.96
35.77
22.79
26.36
33.44
21.22
DCRNN
STGCN
27.09
34.89
21.16
30.04
42.08
Graph WaveNet 28.98
ASTGCN
28.06
35.22
22.93
26.86
33.65
21.19
STSGCN
AGCRN
25.22
32.26
19.83
G-SWaN (ours) 18.48 30.51 12.59 14.05 23.00
27.88
17.24
16.44
16.03
14.17
13.83
30.80
16.56
13.90
12.97
34.86
19.19
22.00
17.14
16.82
17.50
20.52
18.25
17.13
15.95
24.07
13.10
13.33
11.32
10.92
11.29
16.20
11.64
10.96
10.09
9.08
Since MAPE is unitless, it provides a useful metric to compare different datasets. The results show that some datasets
are easier than others (i.e. achieving lower error), because the datasets have different variability in the first place.
Broadly speaking, the speed datasets seem to be easier than the flow datasets. PeMS-BAY is the easiest dataset, where
all models seem to have low MAPE, including the non-learning baselines HA and ARIMA. Since there is no learning
with HA and ARIMA, the reason cannot be that PeMS-BAY has more datapoints to learn from, but rather that it has low
variability, as shown with low standard deviation in Table 2, even as a proportion to the mean value 15.32%. Using
this ratio between standard deviation to mean, we could rank the difficulty of the datasets. From easiest to hardest,
the subsequent ranking is, METR-LA (37.7%), PeMS-D8 (63.39%), and finally PeMS-D4 (74.67%) as the most difficult.
Moreover, the difference between the spread of different datasets can also be observed visually in Figure 6. The speed
datasets usually hover around the speed limit, while the value of the flow datasets cycles more drastically throughout
the day, resulting in a wider distribution, as seen from the violin plots.
This method of ranking is mostly correct when comparing the MAPE across the datasets, except that PeMS-D8 is
more difficult than PeMS-D4, despite the lower standard deviation, both in absolute value and proportion. Again, this
could be explained, not by the lack of training data but by the lack of periodic behavior. This can be shown by the
disparity of the MAPE error for the non-learning model HA, which is simply the average value from the day before.
G-SWaN performance gain seems to be relative to the difficulty of the dataset. For example, at PeMS-BAY, since it is
an easier datasets [31] and all the other models are already performing relatively well, our improvements are marginal.
At 15 minutes forecasting horizon, G-SWaN only achieves the same MAE with Graph WaveNet, while at 60 minutes
horizon, G-SWaN was outperformed by GMAN.
With the relative difficulty of the datasets discussed, we can compare the models across datasets. There are nine
models that are implemented across all datasets: HA, VAR, DCRNN, STGCN, Graph WaveNet, ASTGCN, STSGCN,
AGCRN, and G-SWaN. As expected, deep learning models outperformed their classical counterparts. Simply adding an
attention mechanism does not guarantee improvement, however as shown through the performance of ASTGCN, as
opposed to GMAN and G-SWaN.
14
Because Every Sensor Is Unique, so Is Every Pair: Handling Dynamicity in Traffic Forecasting
IoTDI '23, May 9–12, 2023, San Antonio, TX, USA
Both G-SWaN and AGCRN employ a data adaptive adjacency matrix. AGCRN used matrix factorization to achieve
this, while G-SWaN used a self-attention mechanism. The superior performance of G-SWaN corroborates the literature
regarding the importance of self-attention mechanisms when introducing data adaptive components.
Table 5. Ablation study on PeMS-D8. Bold means the worst performance, showing the importance of the missing component.
Underline means the second worst.
Model
G-SWaN
w/o spatial occlusion
w/o temporal permutation
w/o uniform noise
w/o node embeddings
Single head attention
GCN w/o SGT
MAE MAPE (%) RMSE
14.05
14.12
14.21
14.11
14.29
14.21
14.62
9.08
9.14
9.18
9.22
9.22
9.14
9.52
23.00
23.10
23.15
23.15
23.11
23.05
23.34
5.2 Ablation
We performed ablation analysis on the PeMS-D8 dataset, as shown in Table 5. We used the same experimental setup for
the PeMS-D8 dataset. We named G-SWaN without different components as follows:
(1) w/o spatial occlusion: G-SWaN without the spatial occlusion augmentation as described in section 3.2.1;
(2) w/o temporal permutation: G-SWaN without the temporal permutation augmentation as described in section
3.2.1;
(3) w/o uniform noise: G-SWaN without the uniform noise augmentation as described in section 3.2.1;
(4) w/o node embeddings: G-SWaN without having the node embeddings fused with the keys and queries matrices
in SGT. See Equation 7;
(5) Single head attention: G-SWaN where the SGT only had one attention head (H = 1);
(6) GCN w/o SGT: G-SWaN where we replaced the SGT with the GCN described in [54].
The ablation analysis results show that each of the components of G-SWaN is effective. In particular, the results
show that the worst is the variant without SGT (in bold), the main contribution of this paper. Moreover, removing the
node embeddings from the SGT module also degrades the MAE and MAPE performances significantly, resulting in the
second worse version (underlined). This agrees with our hypothesis that SGT and integrating node embeddings in the
self-attention mechanism improved the performances by capturing the individual sensor dynamics, the pair dynamics,
and the evolution of the dynamics through time.
5.3 Node Embedding Analysis
To further investigate the node embeddings, we wanted to see if the node embeddings managed to learn spatial
information that was not part of the training data. For this purpose, we tried to find any linear and trigonometric
relationships between the node embeddings and the spatial coordinates of each sensor (longitude and latitude). We used
Coefficient of determination (R2) as a metric. This was implemented in the dataset with the most sensors, PeMS-BAY.
First, we performed linear regression on each sensor, using a concatenation of source e1 and target e2 node embeddings
as the feature vector, and the longitude and latitude as the labels. We obtained R2 = 0.401, showing a non-trivial
15
IoTDI '23, May 9–12, 2023, San Antonio, TX, USA
Arian Prabowo, Wei Shao, Hao Xue, Piotr Koniusz, and Flora D. Salim
Fig. 7. Recovering sensor coordinates from node embeddings using a linear probe with trigonometric kernels.
correlation between the node embeddings with the coordinates of the sensors. This confirms that the node embeddings
do contain spatial information.
Since the node embeddings were learned as a part of a non-linear deep learning method, there was no guarantee
that linear probing was the best tool to analyze the learned features. To address this, we used three trigonometric
functions as kernels for the node embeddings: sin(*), cos (*), and tan(*). Using linear regression with the kernels, we
obtained R2 = 0.996. To visually evaluate this, we plotted the coordinates' value based on the linear probing of the node
embeddings with trigonometric kernels as shown in Figure 7. The figure shows that all the orange crosses are located
close to the ground truth (blue circles). This again confirms that node embeddings learned spatial information from the
data.
5.4 Adaptive Adjacency Matrix Analysis
Adaptive adjacency matrix Aadp is a learned adjacency matrix described in section 3.2.5. It is also constructed based on
node embeddings.
Its purpose is to capture interesting connections between sensors that are not due to physical connections in the
road network. Intuitively, therefore, it should have minimal overlap with the adjacency matrix from the physical road
network. This can be qualitatively shown in Figure 8. The figure shows that the physical edges (black lines) connect
nearby sensors, while the adaptive adjacency (red lines) connects the sensors that are physically far away. To further
test this empirically, we flattened the adjacency matrices and calculated the cosine similarity between the physical and
adaptive ones. The similarity is 0.0226, which shows that they are widely different.
16
Because Every Sensor Is Unique, so Is Every Pair: Handling Dynamicity in Traffic Forecasting
IoTDI '23, May 9–12, 2023, San Antonio, TX, USA
Fig. 8. Qualitative comparison between physical and adaptive adjacency matrix in METR-LA dataset. The line transparency is
proportional to the edge weight.
6 CONCLUSION
In this paper, we show that each sensor in a road network has a unique traffic dynamic. Moreover, each pair of sensors
also has a unique dynamic that displays periodic behaviors. To capture these phenomena, we present G-SWaN, a novel
traffic forecasting architecture. This behavior can be handled by SGT, which is proposed to replace GCN, a widely
used model for traffic forecasting, since SGT is more general and able to mask the adjacency matrix adaptively to the
data. In order to make the SGT adaptive to the sensor location as well, it incorporates node embeddings that adapt the
self-attention mechanism with spatial information and sensor-unique dynamics for every source-target sensor pair.
Our experiments on four open, real-world datasets show that G-SWaN achieved state-of-the-art performance. Finally,
through recovering the co-ordinates, we show that the node embeddings learned meaningful spatial information. These
findings should inform future traffic models regarding the importance of capturing sensors and sensor pairs unique
dynamics.
REFERENCES
[1] Amr Abdelraouf, Mohamed Abdel-Aty, and Jinghui Yuan. 2021. Utilizing Attention-Based Multi-Encoder-Decoder Neural Networks for Freeway
Traffic Speed Prediction. IEEE Transactions on Intelligent Transportation Systems (2021).
17
IoTDI '23, May 9–12, 2023, San Antonio, TX, USA
Arian Prabowo, Wei Shao, Hao Xue, Piotr Koniusz, and Flora D. Salim
[2] Mohammed S Ahmed and Allen R Cook. 1979. Analysis of freeway traffic time-series data by using Box-Jenkins techniques. Vol. 722. Transportation
Research Record.
[3] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2015. Neural machine translation by jointly learning to align and translate. In International
Conference on Learning Representations.
[4] Lei Bai, Lina Yao, Can Li, Xianzhi Wang, and Can Wang. 2020. Adaptive Graph Convolutional Recurrent Network for Traffic Forecasting. In Advances
in neural information processing systems.
[5] Nicola Bellomo and Christian Dogbe. 2011. On the modeling of traffic and crowds: A survey of models, speculations, and perspectives. SIAM review
53, 3 (2011), 409–463.
[6] Florent Berthelin, Pierre Degond, Marcello Delitala, and Michel Rascle. 2008. A model for the formation and evolution of traffic jams. Archive for
Rational Mechanics and Analysis 187, 2 (2008), 185–220.
[7] Michael M Bronstein, Joan Bruna, Taco Cohen, and Petar Veličković. 2021. Geometric deep learning: Grids, groups, graphs, geodesics, and gauges.
arXiv preprint arXiv:2104.13478 (2021).
[8] Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry,
Amanda Askell, et al. 2020. Language models are few-shot learners. In Advances in Neural Information Processing Systems.
[9] Chenyi Chen, Yin Wang, Li Li, Jianming Hu, and Zuo Zhang. 2012. The retrieval of intra-day trend and its influence on traffic prediction.
Transportation research part C: emerging technologies 22 (2012), 103–118.
[10] Mark Chen, Alec Radford, Rewon Child, Jeff Wu, Heewoo Jun, Prafulla Dhariwal, David Luan, and Ilya Sutskever. 2020. Generative Pretraining from
Pixels. In Proceedings of the 37th International Conference on Machine Learning.
[11] Kyunghyun Cho, Bart van Merrienboer, Çaglar Gülçehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. 2014. Learning
Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation. In EMNLP.
[12] Zhiyong Cui, Longfei Lin, Ziyuan Pu, and Yinhai Wang. 2020. Graph Markov network for traffic forecasting with missing data. Transportation
Research Part C: Emerging Technologies 117 (2020), 102671.
[13] Rodrigo de Medrano and José L Aznarte. 2020. On the Inclusion of Spatial Information for Spatio-Temporal Neural Networks. arXiv preprint
arXiv:2007.07559 (2020).
[14] Mengyuan Fang, Luliang Tang, Xue Yang, Yang Chen, Chaokui Li, and Qingquan Li. 2021. FTPG: A Fine-Grained Traffic Prediction Method With
Graph Attention Network Using Big Trace Data. IEEE Transactions on Intelligent Transportation Systems (2021).
[15] Rui Fu, Zuo Zhang, and Li Li. 2016. Using LSTM and GRU neural network methods for traffic flow prediction. In 2016 31st Youth Academic Annual
Conference of Chinese Association of Automation (YAC). IEEE, 324–328.
[16] Nan Gao, Hao Xue, Wei Shao, Sichen Zhao, Kyle Kai Qin, Arian Prabowo, Mohammad Saiedur Rahaman, and Flora D Salim. 2020. Generative
Adversarial Networks for Spatio-temporal Data: A Survey. arXiv preprint arXiv:2008.08903 (2020).
[17] Haizhou Guo, Dian Zhang, Landu Jiang, Kin-Wang Poon, and Kezhong Lu. 2021. ASTCN: An Attentive Spatial Temporal Convolutional Network for
Flow Prediction. IEEE Internet of Things Journal (2021).
[18] Shengnan Guo, Youfang Lin, Ning Feng, Chao Song, and Huaiyu Wan. 2019. Attention based spatial-temporal graph convolutional networks for
traffic flow forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 33. 922–929.
[19] Mohammad M Hamed, Hashem R Al-Masaeid, and Zahi M Bani Said. 1995. Short-term prediction of traffic volume in urban arterials. Journal of
Transportation Engineering 121, 3 (1995), 249–254.
[20] Will Hamilton, Zhitao Ying, and Jure Leskovec. 2017. Inductive representation learning on large graphs. In Advances in neural information processing
systems. 1024–1034.
[21] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2016. Deep residual learning for image recognition. In Proceedings of the IEEE conference
on computer vision and pattern recognition. 770–778.
[22] Siteng Huang, Donglin Wang, Xuehan Wu, and Ao Tang. 2019. DSANet: Dual Self-Attention Network for Multivariate Time Series Forecasting. In
The 28th ACM International Conference on Information and Knowledge Management (CIKM 2019). Beijing, China.
[23] Hosagrahar V Jagadish, Johannes Gehrke, Alexandros Labrinidis, Yannis Papakonstantinou, Jignesh M Patel, Raghu Ramakrishnan, and Cyrus
Shahabi. 2014. Big data and its technical challenges. Commun. ACM 57, 7 (2014), 86–94.
[24] Young-Seon Jeong, Young-Ji Byon, Manoel Mendonca Castro-Neto, and Said M Easa. 2013. Supervised weighting-online learning algorithm for
short-term traffic flow prediction. IEEE Transactions on Intelligent Transportation Systems 14, 4 (2013), 1700–1707.
[25] Yiannis Kamarianakis and Poulicos Prastacos. 2003. Forecasting traffic flow conditions in an urban network: Comparison of multivariate and
univariate approaches. Transportation Research Record 1857, 1 (2003), 74–84.
[26] Thomas N Kipf and Max Welling. 2017. Semi-supervised classification with graph convolutional networks. In International Conference on Learning
Representations.
[27] Xiangyuan Kong, Weiwei Xing, Xiang Wei, Peng Bao, Jian Zhang, and Wei Lu. 2020. STGAT: Spatial-Temporal Graph Attention Networks for
Traffic Flow Forecasting. IEEE Access 8 (2020), 134363–134372.
[28] Piotr Koniusz, Lei Wang, and Anoop Cherian. 2021. Tensor representations for action recognition. IEEE Transactions on Pattern Analysis and Machine
Intelligence 44, 2 (2021), 648–665.
[29] Sangsoo Lee and Daniel B Fambro. 1999. Application of subset autoregressive integrated moving average model for short-term freeway traffic
volume forecasting. Transportation Research Record 1678, 1 (1999), 179–188.
18
Because Every Sensor Is Unique, so Is Every Pair: Handling Dynamicity in Traffic Forecasting
IoTDI '23, May 9–12, 2023, San Antonio, TX, USA
[30] Duo Li and Joan Lasenby. 2021. Spatiotemporal Attention-Based Graph Convolution Network for Segment-Level Traffic Prediction. IEEE Transactions
on Intelligent Transportation Systems (2021).
[31] Fuxian Li, Jie Feng, Huan Yan, Guangyin Jin, Depeng Jin, and Yong Li. 2021. Dynamic Graph Convolutional Recurrent Network for Traffic Prediction:
Benchmark and Solution. arXiv preprint arXiv:2104.14917 (2021).
[32] Yaguang Li, Rose Yu, Cyrus Shahabi, and Yan Liu. 2018. Diffusion Convolutional Recurrent Neural Network: Data-Driven Traffic Forecasting. In
International Conference on Learning Representations.
[33] Marco Lippi, Matteo Bertini, and Paolo Frasconi. 2013. Short-term traffic flow forecasting: An experimental comparison of time-series analysis and
supervised learning. IEEE Transactions on Intelligent Transportation Systems 14, 2 (2013), 871–882.
[34] Bin Lu, Xiaoying Gan, Haiming Jin, Luoyi Fu, and Haisong Zhang. 2020. Spatiotemporal Adaptive Gated Graph Convolution Network for Urban
Traffic Flow Forecasting. In Proceedings of the 29th ACM International Conference on Information & Knowledge Management. 1025–1034.
[35] Dan Luo, Dong Zhao, Qixue Ke, Xiaoyong You, Liang Liu, and Huadong Ma. 2021. Spatio-Temporal Hashing Multi-Graph Convolutional Network
for Service-level Passenger Flow Forecasting in Bus Transit Systems. IEEE Internet of Things Journal (2021).
[36] Yisheng Lv, Yanjie Duan, Wenwen Kang, Zhengxi Li, and Fei-Yue Wang. 2014. Traffic flow prediction with big data: a deep learning approach. IEEE
Transactions on Intelligent Transportation Systems 16, 2 (2014), 865–873.
[37] Diganta Misra. 2019. Mish: A self regularized non-monotonic neural activation function. arXiv preprint arXiv:1908.08681 (2019).
[38] Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, and Koray
Kavukcuoglu. 2016. Wavenet: A generative model for raw audio. arXiv preprint arXiv:1609.03499 (2016).
[39] Zheyi Pan, Yuxuan Liang, Weifeng Wang, Yong Yu, Yu Zheng, and Junbo Zhang. 2019. Urban traffic prediction from spatio-temporal data using deep
meta learning. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining. 1720–1730.
[40] Cheonbok Park, Chunggi Lee, Hyojin Bahng, Kihwan Kim, Seungmin Jin, Sungahn Ko, Jaegul Choo, et al. 2019. Stgrat: A spatio-temporal graph
attention network for traffic forecasting. arXiv preprint arXiv:1911.13181 (2019).
[41] Arian Prabowo, Piotr Koniusz, Wei Shao, and Flora D Salim. 2019. COLTRANE: ConvolutiOnaL TRAjectory NEtwork for Deep Map Inference. In
Proceedings of the 6th ACM International Conference on Systems for Energy-Efficient Buildings, Cities, and Transportation. 21–30.
[42] Hongxin Shao. 2020. Deep learning approaches for traffic prediction. Ph. D. Dissertation. Nanyang Technological University.
[43] Wei Shao, Arian Prabowo, Sichen Zhao, Piotr Koniusz, and Flora D Salim. 2022. Predicting flight delay with spatio-temporal trajectory convolutional
network and airport situational awareness map. Neurocomputing 472 (2022), 280–293.
[44] Wei Shao, Arian Prabowo, Sichen Zhao, Siyu Tan, Piotr Koniusz, Jeffrey Chan, Xinhong Hei, Bradley Feest, and Flora D Salim. 2019. Flight Delay
Prediction using Airport Situational Awareness Map. In Proceedings of the 27th ACM SIGSPATIAL International Conference on Advances in Geographic
Information Systems. 432–435.
[45] Sam Shleifer, Clara McCreery, and Vamsi Chitters. 2019. Incrementally Improving Graph WaveNet Performance on Traffic Prediction. arXiv preprint
arXiv:1912.07390 (2019).
[46] Chao Song, Youfang Lin, Shengnan Guo, and Huaiyu Wan. 2020. Spatial-Temporal Synchronous Graph Convolutional Networks: A New Framework
for Spatial-Temporal Network Data Forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 34. 914–921.
[47] Mascha Van Der Voort, Mark Dougherty, and Susan Watson. 1996. Combining Kohonen maps with ARIMA time series models to forecast traffic
flow. Transportation Research Part C: Emerging Technologies 4, 5 (1996), 307–318.
[48] Femke van Wageningen-Kessels, Hans Van Lint, Kees Vuik, and Serge Hoogendoorn. 2015. Genealogy of traffic flow models. EURO Journal on
Transportation and Logistics 4, 4 (2015), 445–473.
[49] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is
all you need. In Advances in neural information processing systems. 5998–6008.
[50] Petar Veličković, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Liò, and Yoshua Bengio. 2018. Graph Attention Networks. International
Conference on Learning Representations (2018). https://openreview.net/forum?id=rJXMpikCZ accepted as poster.
[51] Xiaoyang Wang, Yao Ma, Yiqi Wang, Wei Jin, Xin Wang, Jiliang Tang, Caiyan Jia, and Jian Yu. 2020. Traffic Flow Prediction via Spatial Temporal
Graph Neural Network. In Proceedings of The Web Conference 2020. 1082–1092.
[52] Billy M Williams. 2001. Multivariate vehicular traffic flow prediction: Evaluation of ARIMAX modeling. Transportation Research Record 1776, 1
(2001), 194–200.
[53] Billy M Williams and Lester A Hoel. 2003. Modeling and forecasting vehicular traffic flow as a seasonal ARIMA process: Theoretical basis and
empirical results. Journal of transportation engineering 129, 6 (2003), 664–672.
[54] Qiong Wu, Qin Fu, and Mingxin Nie. 2020. Graph Wavelet Long Short-Term Memory Neural Network: A Novel Spatial-Temporal Network for
Traffic Prediction. In Journal of Physics: Conference Series, Vol. 1549. IOP Publishing, 042070.
[55] Zonghan Wu, Shirui Pan, Guodong Long, Jing Jiang, Xiaojun Chang, and Chengqi Zhang. 2020. Connecting the Dots: Multivariate Time Series
Forecasting with Graph Neural Networks. In KDD '20: The 26th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Virtual Event, CA,
USA, August 23-27, 2020, Rajesh Gupta, Yan Liu, Jiliang Tang, and B. Aditya Prakash (Eds.). ACM, 753–763. https://doi.org/10.1145/3394486.3403118
[56] Hao Xue, Flora Salim, Yongli Ren, and Nuria Oliver. 2021. MobTCast: Leveraging auxiliary trajectory forecasting for human mobility prediction.
Advances in Neural Information Processing Systems 34 (2021), 30380–30391.
[57] Hao Xue and Flora D Salim. 2021. TERMCast: Temporal relation modeling for effective urban flow forecasting. In Advances in Knowledge Discovery
and Data Mining: 25th Pacific-Asia Conference, PAKDD 2021, Virtual Event, May 11–14, 2021, Proceedings, Part I. Springer, 741–753.
19
IoTDI '23, May 9–12, 2023, San Antonio, TX, USA
Arian Prabowo, Wei Shao, Hao Xue, Piotr Koniusz, and Flora D. Salim
[58] Bing Yu, Haoteng Yin, and Zhanxing Zhu. 2018. Spatio-temporal Graph Convolutional Networks: A Deep Learning Framework for Traffic Forecasting.
In Proceedings of the 27th International Joint Conference on Artificial Intelligence (IJCAI).
[59] Jiani Zhang, Xingjian Shi, Junyuan Xie, Hao Ma, Irwin King, and Dit Yan Yeung. 2018. GaAN: Gated Attention Networks for Learning on Large and
Spatiotemporal Graphs. In 34th Conference on Uncertainty in Artificial Intelligence 2018, UAI 2018.
[60] Shaokun Zhang, Yao Guo, Peize Zhao, Chuanpan Zheng, and Xiangqun Chen. 2021. A Graph-Based Temporal Attention Framework for Multi-Sensor
Traffic Flow Forecasting. IEEE Transactions on Intelligent Transportation Systems (2021).
[61] Yifei Zhang, Hao Zhu, Ziqiao Meng, Piotr Koniusz, and Irwin King. 2022. Graph-adaptive rectified linear unit for graph neural networks. In
Proceedings of the ACM Web Conference 2022. 1331–1339.
[62] Yifei Zhang, Hao Zhu, Zixing Song, Piotr Koniusz, and Irwin King. 2019. Spectral Feature Augmentation for Graph Contrastive Learning and
Beyond. In 2023 AAAI Conference on Artificial Intelligence (AAAI'23).
[63] Chuanpan Zheng, Xiaoliang Fan, Cheng Wang, and Jianzhong Qi. 2020. Gman: A graph multi-attention network for traffic prediction. In Proceedings
of the AAAI Conference on Artificial Intelligence, Vol. 34. 1234–1241.
[64] Fan Zhou, Qing Yang, Kunpeng Zhang, Goce Trajcevski, Ting Zhong, and Ashfaq Khokhar. 2020. Reinforced spatiotemporal attentive graph neural
networks for traffic forecasting. IEEE Internet of Things Journal 7, 7 (2020), 6414–6428.
[65] Hao Zhu and Piotr Koniusz. 2022. Generalized Laplacian Eigenmaps. In Advances in Neural Information Processing Systems, Alice H. Oh, Alekh
Agarwal, Danielle Belgrave, and Kyunghyun Cho (Eds.). https://openreview.net/forum?id=HjicdpP-Nth
[66] Hao Zhu, Ke Sun, and Peter Koniusz. 2021. Contrastive laplacian eigenmaps. Advances in Neural Information Processing Systems 34 (2021), 5682–5695.
[67] Eric Zivot and Jiahui Wang. 2006. Vector autoregressive models for multivariate time series. Modeling financial time series with S-PLUS® (2006),
385–429.
ACKNOWLEDGMENTS
This research is supported by Australian Research Council (ARC) Discovery Project DP190101485. We would like to
also acknowledge the support of the Investigative Analytics team (Data61/CSIRO). We would also like to acknowledge
the support of Cisco's National Industry Innovation Network (NIIN) Research Chair Program.
20
|
http://arxiv.org/abs/2302.09952v1 | 2023-02-20T12:40:54 | 2023-02-20T12:40:54 | Why is the prediction wrong? Towards underfitting case explanation via
meta-classification | In this paper we present a heuristic method to provide individual
explanations for those elements in a dataset (data points) which are wrongly
predicted by a given classifier. Since the general case is too difficult, in
the present work we focus on faulty data from an underfitted model. First, we
project the faulty data into a hand-crafted, and thus human readable,
intermediate representation (meta-representation, profile vectors), with the
aim of separating the two main causes of miss-classification: the classifier is
not strong enough, or the data point belongs to an area of the input space
where classes are not separable. Second, in the space of these profile vectors,
we present a method to fit a meta-classifier (decision tree) and express its
output as a set of interpretable (human readable) explanation rules, which
leads to several target diagnosis labels: data point is either correctly
classified, or faulty due to a too weak model, or faulty due to mixed
(overlapped) classes in the input space. Experimental results on several real
datasets show more than 80% diagnosis label accuracy and confirm that the
proposed intermediate representation allows to achieve a high degree of
invariance with respect to the classifier used in the input space and to the
dataset being classified, i.e. we can learn the metaclassifier on a dataset
with a given classifier and successfully predict diagnosis labels for a
different dataset or classifier (or both). | [
"Sheng Zhou",
"Pierre Blanchart",
"Michel Crucianu",
"Marin Ferecatu"
] | 10.1109/DSAA54385.2022.10032332 | [
{
"@title": "doi",
"@href": "http://dx.doi.org/10.1109/DSAA54385.2022.10032332",
"@rel": "related",
"@type": null
},
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09952v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09952v1",
"@rel": "related",
"@type": "application/pdf"
}
] | [
"2022 IEEE 9th International Conference on Data Science and\n Advanced Analytics (DSAA), Oct 2022, Shenzhen, China. pp.1-9"
] | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG"
] | Why is the prediction wrong? Towards underfitting
case explanation via meta-classification
Sheng ZHOU∗†, Pierre BLANCHART∗, Michel CRUCIANU† and Marin FERECATU†
∗ Universit ́e Paris-Saclay, CEA, List, F-91120, Palaiseau, France
† Conservatoire National des Arts et M ́etiers (CNAM), CEDRIC, 75003, Paris, France
Email: [email protected], [email protected], [email protected], [email protected]
3
2
0
2
b
e
F
0
2
]
G
L
.
s
c
[
1
v
2
5
9
9
0
.
2
0
3
2
:
v
i
X
r
a
Abstract-In this paper we present a heuristic method to pro-
vide individual explanations for those elements in a dataset (data
points) which are wrongly predicted by a given classifier. Since
the general case is too difficult, in the present work we focus on
faulty data from an underfitted model. First, we project the faulty
data into a hand-crafted, and thus human readable, intermediate
representation (meta-representation, profile vectors), with the
aim of separating the two main causes of miss-classification:
the classifier is not strong enough, or the data point belongs
to an area of the input space where classes are not separable.
Second, in the space of these profile vectors, we present a method
to fit a meta-classifier (decision tree) and express its output
as a set of interpretable (human readable) explanation rules,
which leads to several target diagnosis labels: data point is
either correctly classified, or faulty due to a too weak model,
or faulty due to mixed (overlapped) classes in the input space.
Experimental results on several real datasets show more than
80% diagnosis label accuracy and confirm that the proposed
intermediate representation allows to achieve a high degree of
invariance with respect to the classifier used in the input space
and to the dataset being classified, i.e. we can learn the meta-
classifier on a dataset with a given classifier and successfully
predict diagnosis labels for a different dataset or classifier (or
both).
Index Terms-machine learning, interpretability, explainabil-
ity, XGBoost, MLP, model validation, debugging, kNN.
I. INTRODUCTION
Recent machine learning models for prediction have attained
excellent performance in many data classification tasks, and
are widely applied in various scenarios where prediction is
needed (e.g. medical diagnostics or financial analysis). How-
ever, as applications begin to concern every aspect of our
daily life, there is an increased need for transparency and
interpretability of the model decision process, in order to earn
user's trust and reveal the reasoning behind model decision in
terms comprehensible by humans [1].
Indeed, interpretability of machine learning algorithms has
grown to become an important topic in recent years, especially
due to the black box nature of many ML algorithms [2],
aspect which is even more important when they fail: users
need to understand the causes of failures such as to avoid
them in the future. The concept of interpretability for machine
learning aims at presenting model predictions in a human-
understandable way, or providing information to interpret the
predictions or the failures [3].
Modern ML models (such as XGBoost [4] or artificial
neural networks [5]) are powerful enough to fit
the most
complex patterns in data distributions with rather contained
computation costs but, unfortunately for most of them, the
decision-making process is not transparent to users (black-
box behavior). In such a case it is important to have tools to
investigate their behavior, especially when they fail, such as
to be able to detect general patterns of model's behavior on
its faulty predicting data, if they exist [6].
In this direction, we propose in this work an analysis
and diagnostic pipeline to interpret the behavior of an ML
model in the input space, around data points where it fails
to give the expected prediction. More precisely, the task is to
analyse and diagnose faulty individual points, where the label
predicted by the model differs from the ground truth. More
specifically, because it is difficult to approach the problem
with full generality, we restrict ourselves to the more amenable
situation when the model is underfitted. Recall that underfitting
is a global property of a model which summarizes the fact that
the accuracy, as a classification performance measure, fails to
achieve high values on both training and test sets; furthermore,
there is no big gap in accuracy between the train and test sets.
In this situation, given a faulty data point (wrongly classified),
our aim is to reach one of the two following diagnostics :
• The model
is too weak:
the model fits poorly the
true data distribution, because its capacity as well as
complexity is not high enough so it fails to get sufficient
information on the true decision boundary (model under-
fitting). An example of this case is trying to fit a linear
classifier on a dataset that is separable, e.g., by a parabola.
In this case, the solution is to use a more complex (and
possibly more expensive) classifier, able to fit the data.
• Data classes are mixed-up: the data point belongs, in
the input space, to an area where several class labels mix
up beyond statistical resolution, meaning that different
training samples would give very different separating
boundaries. In this case it is impossible to generalize from
one sample to the other (e.g. from training to test), even
using a very strong classifier, implying that the data in this
area cannot be separated properly in terms of their labels.
To do better in this case, the user needs to devise more
powerful features for the data, to resolve the ambiguity.
To achieve this, we project original feature space X into a
hand-crafted intermediate representation space Z (x → z),
where the representation z of a point x encodes the local
behavior of the classifier C(x) in the X space around the point
x, compared to what its output should be (the ground-truth).
We hand-craft the variables defining the Z space, instead
of learning them from data, because we want them to be
meaningful to a human user, thus easy to interpret. In the
second stage we fit a decision tree in the Z space, to obtain
a meta-classifier M (z(x)) capable of assigning a diagnostic
label to any data point x ∈ X: "data point is well classified"
(no classification error), "model is too weak", or "point is in
a mixed-up data region".
To summarize, the main contributions of our proposal are
as follows :
• We propose an intermediate representation of the input
data which is model agnostic and data agnostic, that is
it does not use specific information about the type of
classifier or data being employed.
• The proposed approach is end-to-end interpretable: it uses
a human readable representation (hand-crafted features)
and an interpretable meta-model (decision tree) to help
the user understand the behavior of a black-box classifier
around the data points where it fails to function properly.
By employing our method the user will know if she needs
to put more effort into improving the classifier or into the
data harvesting activity, and also have a clear view on why
this is the case. We test our framework on several large real
datasets. The results show systematically more than 80% accu-
racy for the meta-classifier (in the Z space), confirming that
the proposed intermediate representation permits to achieve
a reasonably high degree of invariance with respect to the
classifier used in the input space and also to the dataset
being classified. That
is, we can learn the meta-classifier
on an initial collection of classification problems (couples
dataset/classifier) and successfully predict diagnosis labels
for a different couple dataset/classifier. The workflow of our
method is shown in Fig. 1.
The paper is organized as follows: in Sec II we present
related work and position our proposal with respect to these,
in Sec. III we present our framework followed by the experi-
mental validation on several real world datasets in Sec. IV and
we conclude in Sec. V with a synthesis of our achievements
and a discussion of future work.
II. RELATED WORK
In this section we present a brief synthesis of the existing
state of the art on the topic of diagnosis and interpretability of
faulty cases from validation/test data, and position our work
with respect to these.
A. Model validation and debugging
Several existing works focus on machine learning model
validation, data analysis and debugging, which serve a similar
objective as ours:
SecureMLdebugger [7] presents a model debugger by ac-
cessing metadata such as model's hyper-parameters, training
epochs, evaluation measures and network layouts, without
using specific user data to ensure privacy during the analysis.
The idea of exploiting model's metadata for debugging and
investigation is quite pervasive in the field; we also make use
of it but in a different way, i.e. to form a set of meta-features
characterizing the model, and develop interpretability based
on them.
Slice Finder [8] is a tool for slicing datasets to obtain
certain data subgroups which are identified as problematic
to the model. The goal is to provide a more granular view
and analysis of model behavior: investigating such kind of
problematic data helps explain model poor performance. A
slice is defined as a conjunction of feature-value (rule) pairs, in
which the number of rule pairs should be few enough to ensure
human readability, each acquired slice should have significant
impact to affect model performance, and also large enough
coverage on validation data.
MLCube [9] proposes a tool allowing the user to define
instance subsets in form of feature-condition conjunctions, and
explore the aggregate statistics (like accuracy) or evaluation
metrics over these subsets. [10] also investigate data subgroups
via similar feature-value conjunctions: they identify trouble
data subgroups by measuring a divergence metric defined on
false positive or false negative rates using Shapley values.
The fore-mentioned methods share a common pathway,
that is they assess certain data subgroups via feature-value
conjunction structures, which actually match the basic split
rules used in decision trees - they suit thus well the logic of
tree-based models. Their drawback comes from their nature:
the interpretability power of these methods depends on the
simplicity of the slice, meaning the granularity of investigation
and interpretation is limited by the complexity of the acquired
rule set. Unlike them, our method is based on training in-
stances, thus it does not face the issue of rule set complexity
but rather draws inferences from data-local population.
Another drawback when using these methods to solve the
model validation and debugging problem is that none of them
integrates prior knowledge of model diagnosis categories: their
aim is partially the identification of faulty/problematic data,
without further analyzing the reason behind the faulty cases. In
contrast, our method relies on a clarification of the relationship
between the data distribution and the model prediction pairs,
and ends up providing interpretations on the reason why
certain cases lead the model to make wrong predictions.
B. Data Complexity recognition
As we already discussed, the mismatch between data dis-
tribution in terms of classes and model prediction labels does
not always come from model fitting error only, but also from
the complexity of the classification problem with respect to
the intrinsic distribution of the data.
In this sense, surveys like [11], [12] list several measures
of data distribution complexity in terms of decision boundary
dividing different classes. This geometrical point of view leads
to three grand classes of measures: linear classifier based (such
as minimized error, error rate by Linear Programming); nearest
Fig. 1: Main pipeline of our proposal: a black-box model is trained with the train set {xi, yi}train, the goal being to predict
whether the sample is miss-classified and achieve, for each miss-classified sample x (for which y (cid:54)= ˆy), an understanding of
the cause of miss-classification: "the model is too weak" or "data classes are mixed-up". To achieve this, each data point x
is projected by the Meta-Features Extraction module into a profile vector z consisting of several statistical indicators; then
the collection of all acquired profile vectors is used by the Feature Aggregation module to train a decision tree on the three
classes mentioned above. This will help the user obtain a diagnosis result, understand the reason behind the faulty case, and
thus arrive at a practical solution for post-hoc treatment.
neighbor based (fraction of points on boundary by Minimum
Spanning Tree method, ratio of average intra/inner class near-
est neighbour (NN) distance, error rate and nonlinearity of
1NN classifier); geometry or topology based (maximal Fisher
discriminant ratio, overlap region volume, maximal feature
efficiency, fraction of points with adherence subsets retained,
average number of samples per dimension) [12]. Some of these
measures focus on data separability or mixture identification,
some on individual feature value overlapping, others examine
the geometrical properties of the decision boundary such as
space covering and non-linearity. While we are not using these
results directly, we are taking inspiration from them in devising
our meta-features (see next section).
III. METHOD PROPOSAL
A. Problem Formulation
In this study we only consider binary classification prob-
lems. A classifier C is classifying a point x ∈ X (usually
Rd) in one of two classes, 0 or 1, i.e. C(x) = y ∈ {0, 1}.
Our purpose is to explain why a classifier fails to classify
a test point in the right class in the special case when the
model is known to be underfitted. We refer to these points as
"faulty" and to the other points as "normal". For each faulty
point, we further diagnose the cause of classification error by
considering two main types of behavior:
• The model is too simple, i.e. there exists a larger capacity
model (i.e. with more parameters) of the same type that
can correctly classify the faulty data considered, while
achieving a superior cross-validation performance.
• The faulty data belongs to a region of space where
classes 0 and 1 overlap,
i.e. we cannot find a more
complex model that correctly classifies the faulty data
while achieving superior cross-validation performance.
This can happen for instance if the features x are too
weak, i.e. not providing enough discriminant information
regarding the classification problem at hand. We refer to
this case as "mixed-up" data in the following.
Our goal is to train a meta-classifier F which maps the test
data to three output classes: a normal data is assigned to the
class Good Prediction, a faulty data is assigned either to the
class Weak Model or to the class Data Mixed-Up. The meta-
classifier takes as input a set of meta-features related to the
faulty input point x. Meta-features are computed using both
x, and training points belonging to a neighborhood of x along
with their labels.
B. Meta-features extraction
Simple meta-features characterizing local configurations are
extracted around a point of interest using K-nearest neighbors
(KNN). A value for K, found by trial and error, of 0.05 ×
(dataset size) provided good results in our case. Training data
is then used to compute label-based indicators inside these
neighborhoods. In particular, in a neighborhood we extract:
• The local model prediction accuracy.
• The two-class confusion matrix.
• A confidence in the prediction: if the model prediction ˆyi
is the probability of class 0, let
Conf(xi) =
|ˆyi − 0.5|
0.5
∈ [0, 1]
then the higher this value, the more confident the model
is considered to be in its prediction.
• The average confidence in the neighborhood, which re-
flects the local model confidence around the point of
interest.
• The average distance to "allies", i.e. the points from the
neighborhood with the same label as xi:
Dally(xi) =
1
|Ai|
(cid:88)
xj ∈Ai
d (xi, xj)
where Ai = {xj ∈ KNN (xi) |yj = yi}
• The average distance to "opponents", i.e. the points from
the neighborhood with a different label than that of xi:
1
|Oi|
Dopp(xi) =
d (xi, xj)
(cid:88)
xj ∈Oi
where Oi = {xj ∈ KNN (xi) |yj (cid:54)= yi}.
Two other meta-features not using KNN neighborhoods but
still characterizing data configurations at a local scale are also
extracted:
• A Minimum Spanning Tree (MST) based feature de-
scribed in [11]. This feature requires to compute the
MST of the training dataset using a distance criterion
to keep only connections between close points. This
feature characterizes class separability at a local scale. It
is computed as the number of opponents of xi connected
to xi over the total number of points connected to xi. As
such, it is valued between 0 and 1. A value close to zero
corresponds to a configuration where the point lies in an
homogeneous region of ally points. A value close to 0.5
corresponds to a configuration where the point lies in a
non-homogeneous region made both of ally and opponent
points (mixed-up data).
• A tree-based meta-feature that can only be added when
the binary classifier is a tree ensemble model (other meta-
features are model agnostic). This feature is inspired
from [13] where it is referred to as Tree space prototype
measure. Given a query point xi and a point xj in which
to compute the measure, it is obtained as the number of
leaves of the tree ensemble model that contain both xi and
xj. This feature is dependent on model complexity, i.e.
the bigger the number of trees in the ensemble model,
the higher it tends to be on average. When averaged
over the K nearest neighbors, it quantifies to what extent
the K nearest neighbors fall in the same leaves as the
query point. As such, it is an indirect measure of model
complexity in the considered neighborhood.
C. Training the meta-classifier
The previously described meta-features are aggregated to
form profile vectors zi ∈ Z associated with each test data. A
three-class meta-classifier under the form of a decision tree
is trained on these meta-features/profile vectors. The output
classes are the ones described in Sec. III-B. The choice of a
decision tree is justified here by the aim to keep the meta-
classifier decisions interpretable. In particular, decision rules
can be extracted by following the path between the root and a
leaf of the tree. The decision tree selects in a greedy way
the most discriminative characteristics for the classification
problem at hand and provides an importance score for each of
these characteristics. The extracted rules give a more detailed
explanation of the meta-classifier decision, all the more since
the meta-features are themselves interpretable.
Once the meta-classifier is trained, it can be employed to
understand the behavior of other classifiers around the points
where they fail to predict the correct label, that is to decide
if they need a more powerful classifier or more discriminant
features. For this, the user should first extract the meta-features
for the dataset on which the investigated classifier was trained.
IV. EXPERIMENTAL EVALUATION
In this section, we present experimental validation of our
method on several binary classification problems (datasets).
To do this we start by pre-processing each dataset in order to
generate the ground-truth labels needed for the meta-classifier
(Sec. IV-A). By employing this ground truth we train the meta-
classifier and use prediction accuracy, precision and recall as
a measures of success (Sec. IV-B). We also show examples
of output interpretations, and we discuss the strengths and
weaknesses of our approach.
A. Meta-classifier ground truth generation
Suppose we are given a dataset D associated to a binary
classification problem. Each data point is seen as a vector x
in the input feature space X. Suppose also that we trained a
classifier C on some part of D (the training set) and we test
on the rest of the dataset (the test set).
Each input point x ∈ X has a meta-feature vector z ∈ Z
associated with it, computed by the procedure described in
Sec. III-B. To be able to train the meta-classifier F in the Z
space we need to attach to each element in the input space
x ∈ X one diagnosis label (with respect to the classifier
C): "Good Prediction", "Weak Model", "Data Mixed-Up".
This is obvious for correctly classified data points, but for
the miss-classified ones we need to ensure the cause of miss-
classification is guaranteed to be the one associated with the
label. We describe below the procedure we use to generate
these labels.
We start by choosing a strong classifier, for example an
XGBoost model with a very large number of trees and large
depth. We then iterate several times the following procedure:
1) Randomly split
the initial dataset D into two equal
disjoint parts, D1 and D2.
2) Train the classifier with D1 as training set to obtain model
C1. Similarly, train the classifier with D2 as training set
to obtain model C2.
4) Consider D = D(cid:48)
3) Remove from D1 the elements miss-classified by C2,
1, and remove from D2 the elements
obtaining the set D(cid:48)
miss-classified by C1, obtaining the set D(cid:48)
2.
1 ∪ D(cid:48)
2 and repeat the whole procedure
until there are no more miss-classified elements by C1
and C2 (or very few, e.g. an accuracy of 99.9% for both).
In practice, we found that two-three iterations are enough
in the procedure above to obtain classifiers with very high
accuracy (99.9%) on the remaining data. The procedure cleans
up the dataset, so we are sure that the remaining data can be
correctly classified by a model of very high capacity (thus,
classes are not mixed-up in the regions covered by this data).
From here we use two procedures to generate diagnosis
labels for miss-classified data:
1) Lower the capacity of the model. For example, for an
XGBoost model decrease the number of trees and their
depth. For an MLP reduce the number of hidden layers
and neurons, or simply add noise to the weights. When
training a lower capacity model on the cleaned-up data,
some of the test sample will be miss-classified, and we
can assign them the label "Weak Model".
2) In the input space X, drop some of the components of the
features, which is equivalent to projecting the data to a
lower dimensional vector space. This entails information
loss, and classes that were well separated in the input
space X may overlap (mix up) in the projection space
X (cid:48). Then train a strong classifier in the X (cid:48) space, without
overfitting it. This classifier, because some classes are
mixed-up in the reduced feature space, cannot achieve
perfect accuracy, so there are some miss-classified data
points on the test set. For this reason, these miss-classified
data points can be labeled as "Data Mixed-up". Because
strong classifiers are still very good even after throwing
away a lot of features, at
least on the datasets we
are using, we actually perform a principal component
analysis in the input space X and then eliminate the most
important components (to quickly remove components of
high variance). In order to achieve the desired effect, it
is important to train the best model on the projected data
without overfitting, since because the trained classifier is
strong, overfitting is indeed a risk. Fig. 2 illustrates a
situation when both MLP and XGBoost classifiers overfit
depending on the dataset. If a classifier overfits when
dropping data components, that indicates that a weaker
version of it should be used to avoid this phenomenon.
classification vector set. After the usual train/test dataset split
we use a decision tree as our meta-classifier, because this type
of model can be used to generate interpretable decision rules
easily. A decision tree can also easily deal with large training
sets, which is an important factor in our case, because we
employ several large datasets to build the ground-truth for
the meta-classifier. Meta-feature extraction time grows linearly
with the input dataset size, but this process is only performed
once.
The meta-classifier is evaluated using the accuracy, pre-
cision and recall scores. Our meta-classifier is capable of
suggesting a diagnosis label for a new data point, miss-
classified by a different classifier on a different dataset and,
if desired, decision rules extracted from the meta-classifier.
These should help understanding if the data point has been
wrongly classified because the classifier was too weak or the
classification classes are mixed up in the feature space, and
the decision rule gives insight into what happens locally in the
feature space around the miss-classified point.
C. Evaluation results
To test our proposal we use eight datasets set up for binary
classification: MNIST 3-8 [14] (classes 3 and 8, number of
features reduced to 87 by PCA), Fashion MNIST 0-6 [15]
(classes 0 and 6, number of features reduced to 100 by PCA),
Weather Australia1, Spotify2, Human Resource Analytics3,
Water Potability4, Indian Diabetes5, Banknote authentication6.
On each dataset we train two types of classifiers: an
XGBoost and a Multi Layer Perceptron (MLP). Each of
them provides three models: the base model (obtained on the
cleaned-up dataset (also called "easy dataset" in the follow-
ing), as explained in Sec. IV-A), the weak model (obtained by
weakening the base model either by reducing the number of
trees and their depth, for XGBoost, or by reducing the size of
the hidden layer, for the MLP), and the truncated feature space
model (obtained after cutting off a number of components
from the feature space).
In the Table I we present the details of the involved datasets
and configurations during the diagnosis label generation pro-
cess: the dataset size including number of label 0 and label 1
points, the number of features, the number of extracted meta-
vectors (corresponding to miss-classified samples), the param-
eters of baseline models on the easy (cleaned up) dataset,
parameters of the weak model (for "Weak Model" label
generation) and the number of cut-off data feature components
(for "Data Mixed-up" label generation). For the "MLP cut" we
also give the variance of the cut-off components (percentage in
brackets). Notice that the first five datasets each provide 2000
meta-vectors, while the last three datasets, which are much
smaller, give roughly ten times less meta-vectors.
B. Meta-classifier: training and prediction
Each dataset is processed by the proposed method to extract
meta-feature profile vectors for each element, together with
the associated diagnosis labels, the result being a three class
1http://www.bom.gov.au/climate/dwo
2https://github.com/rfordatascience/tidytuesday/tree/master/data/2020
3https://www.kaggle.com/datasets/rohandx1996/human-resource-analytics
4https://www.kaggle.com/datasets/adityakadiwal/water-potability
5https://www.kaggle.com/datasets/uciml/pima-indians-diabetes-database
6https://archive.ics.uci.edu/ml/datasets/banknote+authentication
(a) Spotify, XGB model
(b) Spotify, MLP model
(c) Fashion MNIST, XGB model (170 trees, depth 6)
(d) Fashion MNIST, MLP model (hidden layer size = 50)
(e) Fashion MNIST, weaker XGB model (50 trees, depth 3)
(f) Fashion MNIST, weaker MLP model (hidden layer size = 10)
Fig. 2: Accuracy curves demonstrating the underfitting checking process: each graph shows the training accuracy and testing
accuracy along with the percentage of data variance being removedUpper two graphs a) and b) correspond to the underfitting
scenarios we aim at, since training accuracy drops together with the testing accuracy. The middle two graphs c) and d) show
an overfitting situation, where testing accuracy drops quickly while training accuracy remains close to 100%, and the gap
between the two becomes larger and larger. This case should be avoided by choosing a weaker base model in the input feature
space X. Graphs e) and f) then show that a weaker base model on the same dataset as c) and d) leads to underfitting when
compared to the overfitting base model.
Table II presents results for four main configurations on
extracted meta-vectors to train the meta-classifier decision tree
and test its performance:
• Row 1: train on 4 datasets randomly sampled from #1 to
#5 and test on datasets #6 to #8.
• Row 2: train on 4 randomly selected datasets and test on
the rest.
• Row 3: train on XGBoost generated meta-vectors, test on
MLP generated meta-vectors and vice-versa.
• Row 4: train/test on the union of all datasets: split 75%
train / 25% test.
These configurations aim to test the ability of the meta-
classifier to generalize across different datasets (train on a
collection of datasets and predict on a different dataset: rows 1
and 2) and also to generalize across different classifiers (train
on a classifier and predict on another classifier: row 3). The
last configuration (row 4) represents the case where training
and testing are done on the union of all the datasets and, as
expected, provides slightly better results compared to the other
configurations because the training dataset is much larger.
The decision tree structure, including tree depth, number of
leaves, training set and testing set size, most important meta-
features from the tree, and particularly the most impacting
decision rules extracted from the tree, are also shown in
Table II. Performance of the meta-classifiers is provided by
predicting precision and recall scores on the test set (each
contains three elements corresponding to each of the three
diagnosis classes), where the precision/recall values are col-
lected statistically from several rounds of training, giving the
mean and standard derivation.
Looking at Table II, for all experimental configurations,
after proper label re-balancing on training vectors, the ob-
tained decision trees have similar structure: the number of
features with a high score according to the decision tree
feature importance score is quite low (usually less than 5
or 6), although the specific features may vary depending
on the configuration. Some of the meta-features are always
present and provide significant discriminative power on three-
diagnosis-labels classification task (e.g. rTN/rFN – rate of
True Negative/False Negative data, rate dist gt/pred – rate of
average distance to ally neighbors against opponent neighbors
in terms of ground truth labels/model predicted labels, KNN
pred conf – KNN average predicted probability confidence
measure; see Sec. III-B for a detailed description of these
features). They are thus good candidates to form a small meta-
feature set in terms of which to present the decision rules.
Most meta-classifiers have precision and recall values
around 80%–90% on all three diagnosis labels, showing that
our method provides a high degree of invariance over the
dataset and classifier type. This means that we can learn the
meta-classifier on a collection of datasets and predict diagnosis
labels for different datasets and classifiers.
In a few cases a wee see a higher uncertainty level (accuracy
drop under 80%). To explain this performance drop, one reason
might be the lack of enough training meta-vectors (see, for
example, Table II row 2) causing decision tree to overfit on
Fig. 3: Linked Bar plots of meta feature ablation experiment,
showing that prediction accuracy score decays with important
important ones to more
meta-feature removed (from least
important ones).
the training data, or the different geometrical nature of decision
boundaries from different types of model (see Table II row 3).
This indicates that in order to improve the meta-classifier with
respect to the pipeline performance, more datasets of diverse
types and complexity are needed.
Based on previous findings we performed an ablation test
(see Fig. 3). We remove meta-features in the order of their
increasing importance score (starting with the smallest but
non-zero value): as more and more meta-features are removed
(actually being made zero thus muted during training), we
see the evolution of precision and recall value, on the three
diagnosis classes. The curves are stable up until dropping
the last 5 or 6 meta-features, indicating that indeed, these
most
important meta-features contain the majority of the
discriminating power in terms of the three diagnosis classes,
while the rest of the meta-features hold for the ability to gain
higher predictive accuracy on more granular patterns in meta-
feature space.
Concerning the computing resources, to perform the evalu-
ations presented here, we used a standard personal computer
with a 2.5GHz Intel Core i5-12600HX CPU (12 cores 16
threads) and 16GB of RAM. The most expensive part is the
generation of the meta-features, which for the largest dataset
used here (Spotify Pop) took around 20 min to obtain a total
of 4000 meta-vectors. This time grows linearly with the size
and the number of features of the dataset but can be reduced
by using a more sophisticated KNN retrieval algorithm like the
one in [16]. Training the meta-classifier took a few minutes
Dataset
1) MNIST 3-8
2) Fashion MNIST 0-6
3) Weather AUS
4) Spotify Pop
5) Human Resource
6) Water Potability
7) Diabetes
8) Banknote
# of data points
#label0, #label1
11982
6131, 5851
12000
6000, 6000
20000
15669, 4331
32833
18871, 13962
14999
11428, 3571
3276
1998, 1278
767
500, 267
1371
761, 610
# of
# of
features meta-vectors
87
100
17
12
5
9
8
4
xgb 2000
mlp 2000
xgb 2000
mlp 2000
xgb 2000
mlp 2000
xgb 2000
mlp 2000
xgb 2000
mlp 2000
xgb 200
mlp 500
xgb 194
mlp 200
xgb 500
mlp 500
XGB base
easyset size
50 trees, depth 3
10343
50 trees, depth 3
9214
100 trees, depth 3
16114
120 trees, depth 4
18551
100 trees, depth 4
14512
20 trees, depth 4
1994
25 trees, depth 3
534
50 trees, depth 3
1354
XGB weak
XGB cut
40 trees, depth 1
40 comp (90%)
10 trees, depth 1
30 comp (80%)
10 trees, depth 2
3 comp (60%)
50 trees, depth 2
6 comp (60%)
10 trees, depth 1
3 comp (60%)
10 trees, depth 1
5 comp (60%)
10 tree3, depth 1
3 comp (60%)
10 trees, depth 2
2 comp (60%)
MLP base
easyset size
100 iter, (200,)hl
11153
100 iter (500,)hl
8699
500 iter (30,)hl
16062
500 iter (100,)hl
14762
1000 iter (100,)hl
14441
1000 iter (50,)hl
1769
200 iter (50,)hl
568
1000 iter (40,)hl
1366
MLP weak
MLP cut
5 iter (10,)hl
70 comp (98%)
7 iter (4,)hl
12 comp (50%)
7 iter (4,)hl
6 comp (80%)
7 iter (10,)hl
4 comp (50%)
20 iter (5,)hl
3 comp (60%)
50 iter (10,)hl
5 comp (60%)
100 iter (5,)hl
3 comp (60%)
60 iter (5,)hl
2 comp (60%)
TABLE I: Information about the used datasets and the parameters of base models, weak models and cut-off models. All MLP
models have one hidden layer (its size is given by the HL parameter). For the XGBoost model, we give the number of trees
and their depth. See Sec. IV-C for a detailed description of each column.
# of
train vectors
11075
Dtree
depth
16
Dtree
leafs
188
12450
16
153
11050
18
163
11300
15
181
Data
Configuration
train
4 datasets
from 1)-5);
test 6)-8)
train random
4 datasets;
test rest
4 datasets
train all
XGB vec;
test all
MLP vec.
and vice
versa
train all
random split
75%;
test rest
25%
Important
meta features
rTN 0.31,
rate dist gt 0.27,
rate dist pred 0.14
proximity 0.07
knn pred conf 0.05
rTN 0.39,
rate dist gt 0.24,
rate dist pred 0.10,
knn pred conf 0.06,
MST frac gt 0.05
rFN 0.42,
rate dist gt 0.22,
rate dist pred 0.14,
proximity 0.06,
rTN 0.04
rFN 0.31,
rate dist gt 0.26,
rate dist pred 0.13
proximity 0.06
knn pred conf 0.05
Extracted
Decision Rules
WM: (rFN>0.17)&(rate dist gt<=0.435)
# of
test vectors
1659
C: (rTN<=0.03)&(rate dist pred<=0.493)
MD: (rFN>0.03)&(knn pred conf>0.097)
&(rate dist gt>0.501)&(rate dist pred<=0.381)
WM: (rTN>0.63)&(rate dist gt<=0.533)
&(MST frac gt>0.02)&(rate dist pred<=0.509)
C: (rTN<=0.01)&(rate dist pred<=0.501)
MD: (rTN>0.01)&(rate dist gt>0.56)
&(rate dist pred<=0.39)&(knn pred conf>0.09)
WM: (rFN>0.13)&(rate dist gt<=0.437)
&(MST frac gt>0.112)&(local set cardinality pred>0.078)
C: (rFN<=0.03)&(rate dist pred<=0.498)
&(rTN<=0.68)
MD: (rFN>0.03)&(rate dist gt>0.467)
&(rate dist pred<=0.297)&(proximity<=0.997)
WM: (rFN>0.15)&(rate dist gt<=0.413)
&(MST frac gt>0.112)
C: (rFN<=0.03)&(rate dist pred<=0.49)
&(rTN<=0.19)
MD: (rFN>0.03)&(rate dist gt>0.501)
&(rate dist pred<=0.37)&(knn pred conf>0.096)
&(MST frac gt<=0.459)
16560
12200
3885
Prediction
Precision / Recall
Prec: [0.83±0.0465
0.978±0.0144
0.828±0.0431]
Rec: [0.854±0.0688
0.932±0.011
0.838±0.0648]
Prec: [0.766 ±0.0736
0.964 ±0.02
0.774 ±0.0886 ]
Rec: [0.804 ±0.0952
0.904 ±0.0548
0.778 ±0.0835 ]
Prec: [0.7575 ±0.0538
0.9425 ±0.0471
0.7675 ±0.0316 ]
Rec: [0.8075 ±0.0983
0.9 ±0.0763
0.7475 ±0.0792 ]
Prec: [0.9±0.00931
0.972±0.011
0.882 ±0.0144]
Rec: [0.908 ±0.011
0.92 ±0.0246
0.898 ±0.0172]
TABLE II: Learned meta classifier (decision trees), their properties and predicting performance scores.
using a standard Scikit-learn7 decision tree implementation.
V. CONCLUSION
In this work we propose a framework to help the user gain
information about why a classifier failed to give a correct result
for a given data point (given individual query). We introduce
several quantities describing what happens around the faulty
point in the feature space and, with the aid of these, we
extract profile vectors as intermediate representations capable
of unifying faulty data from different datasets and different
classifiers. These profile vectors are aggregated by a decision
tree meta-classifier to match three diagnosis cases. The final
interpretation rules provided by the decision tree could be
useful to help the user distinguish and understand the reason
of faulty data.
7https://scikit-learn.org
Users may employ the proposed set of interpretability tools
to debug an ML model: decide whether they should add
more data or more features, prune the model, or fine-tune
other hyper-parameters inside the model, in order to achieve
higher prediction accuracy and better generalisation, or else
just correct certain parts of the dataset to remove ambiguity.
One obvious direction in which to develop the presented
method is to extend the framework to include the overfitting
case. The difficulty comes from the fact that in a region where
several classes overlap, a weak classifier will underfit, while a
strong one will overfit, both leading to poor generalisation. We
may need in this case a finer graduation of diagnosis scenarios,
which might not be feasible in all situations.
An important development direction of our proposal would
be to extend it to work in the case of multi-class classifiers.
Indeed, in the present work we tested our framework in the
[13] Sarah Tan, Matvey Soloviev, Giles Hooker, and Martin T Wells. Tree
space prototypes: Another look at making tree ensembles interpretable.
In Proceedings of the 2020 ACM-IMS on Foundations of Data Science
Conference, pages 23–34, 2020.
[14] Li Deng. The MNIST database of handwritten digit images for machine
IEEE Signal Processing Magazine, 29(6):141–142,
learning research.
2012.
[15] Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-MNIST: a novel
image dataset for benchmarking machine learning algorithms. CoRR,
abs/1708.07747, 2017.
[16] Jeff Johnson, Matthijs Douze, and Herv ́e J ́egou. Billion-scale similarity
search with GPUs. IEEE Transactions on Big Data, 7(3):535–547, 2019.
case of binary classifiers, but there is nothing that limits it
to this: the definition of a miss-classified sample remains the
same (a sample that that is attributed by the classifier a wrong
label) and the construction of the ground-truth for the meta-
classifier can be done by the procedure described in Sec. IV-A
in a one-vs-rest manner. The meta-features list should probably
be updated to include a measure of the degree of local non-
separability of different pairs of classes in the neighbourhood
of the test point. We also expect a linear increase in the scale of
certain meta-features calculation, such as the confusion matrix,
since there should be an element for each class.
Another direction worthy of investigation is to develop the
meta-features automatically, for example by using a neural
network to project the input space into an intermediate rep-
resentation that maximizes separability between the clusters
associated with each diagnosis label. This might indeed lead
to better meta-classifiers but would likely require a much larger
training set and, in addition, would lose the interpretability of
the meta-features.
REFERENCES
[1] Yu Zhang, Peter Tiˇno, Aleˇs Leonardis, and Ke Tang. A survey on
neural network interpretability. IEEE Transactions on Emerging Topics
in Computational Intelligence, 5(5):726–742, 2021.
[2] Riccardo Guidotti, Anna Monreale, Salvatore Ruggieri, Franco Turini,
Fosca Giannotti, and Dino Pedreschi. A survey of methods for explain-
ing black box models. ACM computing surveys (CSUR), 51(5):1–42,
2018.
[3] Finale Doshi-Velez and Been Kim. Towards a rigorous science of
interpretable machine learning. arXiv preprint arXiv:1702.08608, 2017.
[4] Tianqi Chen and Carlos Guestrin. Xgboost: A scalable tree boosting
system. In Proceedings of the 22nd acm sigkdd international conference
on knowledge discovery and data mining, pages 785–794, 2016.
[5] Trevor Hastie, Robert Tibshirani, Jerome H Friedman, and Jerome H
Friedman. The elements of statistical learning: data mining, inference,
and prediction, volume 2. Springer, 2009.
[6] Alejandro Barredo Arrieta, Natalia D ́ıaz-Rodr ́ıguez, Javier Del Ser,
Adrien Bennetot, Siham Tabik, Alberto Barbado, Salvador Garcia,
Sergio Gil-Lopez, Daniel Molina, Richard Benjamins, Raja Chatila, and
Francisco Herrera. Explainable artificial intelligence (xai): Concepts,
taxonomies, opportunities and challenges toward responsible ai. Infor-
mation Fusion, 58:82–115, 2020.
[7] Peiyi Han, Chaozheng Wang, Chuanyi Liu, Shaoming Duan, Hezhong
Securemldebugger: A privacy-preserving
Pan, and Pengshuai Luo.
In 2020 IEEE Fifth International
machine learning debugging tool.
Conference on Data Science in Cyberspace (DSC), pages 127–134.
IEEE, 2020.
[8] Yeounoh Chung, Tim Kraska, Neoklis Polyzotis, Ki Hyun Tae, and
Steven Euijong Whang. Slice finder: Automated data slicing for model
In 2019 IEEE 35th International Conference on Data
validation.
Engineering (ICDE), pages 1550–1553. IEEE, 2019.
[9] Minsuk Kahng, Dezhi Fang, and Duen Horng Chau. Visual exploration
of machine learning results using data cube analysis. In Proceedings of
the Workshop on Human-In-the-Loop Data Analytics, pages 1–6, 2016.
[10] Eliana Pastor, Luca de Alfaro, and Elena Baralis. Looking for trouble:
In Proceedings
Analyzing classifier behavior via pattern divergence.
of the 2021 International Conference on Management of Data, pages
1400–1412, 2021.
[11] Tin Kam Ho and Mitra Basu. Complexity measures of supervised
IEEE transactions on pattern analysis and
classification problems.
machine intelligence, 24(3):289–300, 2002.
[12] Ana C Lorena, Lu ́ıs PF Garcia, Jens Lehmann, Marcilio CP Souto, and
Tin Kam Ho. How complex is your classification problem? a survey on
measuring classification complexity. ACM Computing Surveys (CSUR),
52(5):1–34, 2019.
|
http://arxiv.org/abs/2302.09949v1 | 2023-02-20T12:36:54 | 2023-02-20T12:36:54 | SpecXAI -- Spectral interpretability of Deep Learning Models | Deep learning is becoming increasingly adopted in business and industry due
to its ability to transform large quantities of data into high-performing
models. These models, however, are generally regarded as black boxes, which, in
spite of their performance, could prevent their use. In this context, the field
of eXplainable AI attempts to develop techniques that temper the impenetrable
nature of the models and promote a level of understanding of their behavior.
Here we present our contribution to XAI methods in the form of a framework that
we term SpecXAI, which is based on the spectral characterization of the entire
network. We show how this framework can be used to not only understand the
network but also manipulate it into a linear interpretable symbolic
representation. | [
"Stefan Druc",
"Peter Wooldridge",
"Adarsh Krishnamurthy",
"Soumik Sarkar",
"Aditya Balu"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09949v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09949v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.CV"
] | 3
2
0
2
b
e
F
0
2
]
G
L
.
s
c
[
1
v
9
4
9
9
0
.
2
0
3
2
:
v
i
X
r
a
SPECXAI - SPECTRAL INTERPRETABILITY OF DEEP LEARNING MODELS
Stefan Druc1, Peter Wooldridge1, Adarsh Krishnamurthy2, Soumik Sarkar2, Aditya Balu2
1Monolith AI LTD., London, England
2Iowa State University, Ames, IA, USA
Abstract
Deep learning is becoming increasingly adopted in business and industry due to its ability
to transform large quantities of data into high-performing models. These models, however,
are generally regarded as black boxes, which, in spite of their performance, could prevent their
use. In this context, the field of eXplainable AI attempts to develop techniques that temper
the impenetrable nature of the models and promote a level of understanding of their behavior.
Here we present our contribution to XAI methods in the form of a framework that we term
SpecXAI, which is based on the spectral characterization of the entire network. We show how
this framework can be used to not only understand the network but also manipulate it into a
linear interpretable symbolic representation.
1 Introduction
Deep learning has become a ubiquitous, versatile, and powerful technique that has a wide range
of applications across many different fields such as image and speech recognition, natural lan-
guage processing, and self-driving cars. The most popular application of deep learning is in the
area of computer vision, where deep learning models are used for vision tasks such as image
classification, object detection, and segmentation.
While effective and powerful, one of the challenges that is plaguing deep learning models is ex-
plainability [1–4]. Unlike traditional machine learning models, which can be understood through
the use of simple mathematical equations, deep learning models are highly complex and difficult
to interpret. This makes it difficult to understand how the model arrived at a particular decision,
which can be a problem in areas such as healthcare [5], or finance [6, 7] where transparency is im-
portant. Explainability is also equally important for building trust, especially in several engineer-
ing applications that require Verification and Validation such as designing automotive vehicles
and aircraft etc. [8–11].
Over the past decade, researchers have been working to develop methods to increase the explain-
ability of deep learning models, such as through the use of visualization tools and interpretable
representations of the model's internal workings [1–4]. Despite these challenges, deep learning
models have proven to be highly effective in a wide range of applications and they will continue
to play a critical role in the field of artificial intelligence.
There are several explainability algorithms that have been proposed to help understand the decision-
making process of deep learning models. A common approach is to try to linearize the model
locally near the sample space to provide explanations.
One popular algorithm that uses this approach is LIME (Local Interpretable Model-Agnostic Ex-
planations) [12]. LIME approximates the complex deep learning model with a simpler, inter-
pretable model that is only valid in the neighborhood of a specific sample. This allows us to un-
derstand the decision-making process of the deep learning model for that specific sample. LIME
does this by perturbing the input data and measuring the change in the model's predictions. This
information is then used to generate a linear model that approximates the complex model locally.
1
Another algorithm that uses this approach is SHAP (SHapley Additive exPlanations) [13–16].
SHAP is based on the concept of Shapley values from cooperative game theory, it provides an
explanation for a specific sample by computing the contribution of each feature to the model's
prediction. SHAP assigns a weight to each feature, which represents the importance of that fea-
ture in the final prediction. The weights are computed based on the feature's interactions with
other features and the sample's proximity to the training data.
These algorithms are not the only ones that are available and other approaches like Anchors [17],
Counterfactuals [18], and Attention [19–21] mechanisms can also be used to explain DL models.
The main idea behind these algorithms is to linearize the model locally around the sample space
to provide an explanation, which can be more interpretable and understandable than the complex
deep learning model itself.
In contrast to these methods, several works have made use of the fact that neural networks can
be represented as Point-wise Affine (PWA) Maps around the input to explore the learned linear
regions [22–25]. In other words, it has been shown that these complex models are in fact already
locally linear and can be used directly rather than building linear surrogate models to explain
the local behavior. [26, 27] create explanations of the model that can be attempted by analyzing
the spectral decomposition of these linear representations across the dataset. In addition, spectral
methods have been extensively applied to the weights of individual layers, most notably for com-
pression and performance characterization. However, to our knowledge, until now there has been
no attempt in the literature to analyze the spectral properties of the whole network via their PWA
representation.
In this paper, we view the network as an input-dependent operator and our explanations are gen-
erated by applying the SVD to decompose its action into more interpretable components. This
operator view is also adopted in several works that attempt to learn orthogonal modes for fluid
dynamics [28]. These investigations, including our own, were in turn inspired by established
dimensionality reduction techniques for dynamical systems such as the Proper Orthogonal De-
composition (POD) [29] and the Dynamic Mode Decomposition (DMD) [30, 31].
The main contributions of our work are:
1. We make use of the Singular Value Decomposition (SVD) to understand the local represen-
tation of the network.
2. We obtain linear symbolic expressions of the network output
3. We use the singular vectors (SV) from multiple examples across the dataset to understand
the global properties of the network.
2 Results
In this section, we present results by applying the above methodology to various models orga-
nized by dataset and task.
2.1
ILSVRC 2012 (ImageNet) Classification
ImageNet [32] is a classification dataset consisting of roughly 1000 images for each of the 1000
possible classes (total of 1.2 million images). As one of the first large and well-curated image data
sets, it has served as a standard benchmark to evaluate the state-of-the-art vision models. Here
we examine two models trained on ImageNet. The first is the AlexNet [33] CNN model which is
credited to have started the deep learning boom in computer vision. The second is VGG11 [34]
2
with batch normalization. We use the pre-trained version of the models available through PyTorch
and for both models we choose to explain the last layer before the output, i.e. 'classifier.5' layer.
We present the feature-wise dot product for the top three SV's of a few examples for both models
in Figure 1. We can note that for both models the SV's are mostly focused on the central object,
however, the background becomes more prominent as the singular value decreases. In addition,
VGG seems somewhat less focused on the background at this layer.
(a)
(b)
Figure 1: Comparison of top 3 SV's (in descending order) and spectra for (a) AlexNet and (b) VGG11 from 'classifier.5' layer
It is important to note however that the order of singular vectors is not necessarily reflective of
their contribution to the output. In Figure 2, we display the top contributing SV's to the output (the
predicted class) after canceling coefficients to leave only positive contributions, i.e. ˆaj
from (21).
ls
Both models use noisier SV's from further down the spectrum, however, the reduced spectrum
of AlexNet seems to be broader than VGG at this layer. Next, we proceed to explore the singular
vectors generated from the last convolutional layer before global average pooling, specifically
'features.12' and 'features.28' for AlexNet and VGG respectively.
(a)
(b)
Figure 2: Comparison of top 3 SV's contributing to output (in descending order) for (a) AlexNet and (b) VGG11 from 'classifier.5'
layer
The most noticeable change is that for both models the SV's seem to be more spatially localized
on significant features, e.g. the wattle and the distinctive plumage of the fowl. In addition, the
reduced spectra are generally sparser, e.g. the hermit crab only has a single SV contributing for
AlexNet. The notable exception here is the eagle image for VGG11 which has a very broad re-
duced spectrum with no dominating SV's. All in all, this might suggest that the last convolutional
layer is a better choice than the penultimate 'classifier.5' layer since it produces more intuitive and
localized SV's, although not universally.
3
(a)
(b)
Figure 3: Comparison of top 3 SV's contributing to output (in descending order) and the full and reduced spectra for (a) AlexNet
and (b) VGG11 from the last convolutional layer
2.2
3D Data
In this section, we outline some results obtained for two 3D data sets comprising of car models and
wind turbines. These are used to train a simple autoencoder whose latent space is then used to
train a separate downstream model to predict a quantity of interest. We train models to predict the
drag coefficient for the cars and the peak stress for the wind turbines. The model is well-trained
and provides good accuracy in prediction. In Figure 4, we see the top three SV's influencing the
drag coefficient of the car from the first layer of the network (in contrast with the treatment of
the ImageNet models). Unlike for AlexNet and VGG the singular vectors seem more spatially
coherent and seem to highlight geometrically significant parts of the car such as the front, sides,
and roof.
Figure 4: Top 3 singular vectors influencing drag coefficient for car model
Further, we note an apparent similarity between the singular vectors for different car shapes,
suggesting that the network is making use of some generalized features, e.g. the first two SV's
in the first two rows and the last SV and the first in the first and last row respectively. In order
to explore this similarity we plot the inner product between SV's across the dataset in Figure 5.
This effectively amounts to a cosine similarity metric since the SV's are unit normalized. The
first singular vector seems to be quite common across the dataset with the next two decreasing in
generality but still maintaining significant subgroups.
4
Figure 5: Similarity of SV's across the car dataset
We compare the evolution of singular vectors across the network by visualizing the top SV and
the corresponding spectrum from the first, middle, and penultimate layers in Figure 6. Two trends
appear, the first being that the spectrum narrows as the depth of the layer increases with shifting
contributions until the penultimate layer uses the first SV almost exclusively.
Figure 6: Evolution of the top SV from the first layer on the left to the penultimate layer on the right
The second trend is that the top SV seems to evolve with depth, evidenced by how certain regions
of the singular vector shift the sign of their contributions and their spatial coherence increases.
It is difficult to say whether this is supportive of the widely held view that models learn more
abstract features with increasing depth. On the one hand, the increasing sparsity of the spectrum
does suggest that features are being consolidated, yet, on the other hand, the similarity of the SV's
from each layer contradicts the idea of progressive abstraction.
A remarkable feature of the SV's for the car data set is how they respect the symmetry of the de-
sign. It may be tempting to assume that this is always the case with symmetric designs. However,
our next dataset and model were trained to reconstruct wind turbines and predict their maximum
stress. In Figure 7, we see that the top SV does not concentrate on the geometric features in a sym-
metric way. Instead, the model chose to source different contributions from each blade separately
but within the same singular vector. Beyond this difference, there is a similar evolution with the
depth of the SV's and the increasing sparsity of the spectra as was observed for the car dataset.
5
Figure 7: Evolution of the top SV from the first layer on the left to the penultimate layer of the model trained on the turbine data
set
2.3 Auto Encoded Rotated Squares
We end our results section by presenting our method applied to a toy dataset of randomly rotated
squares of size 32 × 32 on a black background of size 64 × 64. We then train an auto-encoder
network using fully connected layers without bias, with ReLU activations and a bottleneck layer
of size 8.
After training, we compare the learned singular vectors vs. the vectors obtained via SVD of the
data matrix (i.e. the matrix whose rows are the flattened images). On the model side, the singular
vectors are obtained by selecting random images from the test data set and calculating the SVD
decomposition of the full affine operator for that instance (i.e. ls = L).
The singular value spectrum of the data matrix SVD is shown in Figure 8a along with the first four
singular vectors in Figure 8c. The corresponding spectrum from the SVD decomposition of the
linear operator decays much faster, suggesting that the learned linear operator is more specialized
to the instance given. This view is reinforced by the visualization of the top four singular vectors.
In contrast to the data-derived singular vectors that are clearly circular the network vectors are
much more reminiscent of the square, although, circular aspects are also present. It is curious that
the fullest square is not the top SV as the disc is for the data. Or that the other SV's are required
at all since the second SV seems sufficient to reconstruct the square. However, if we consider the
coefficients in (18) we see that c0
L = 25 with all other contributions ci>1 (cid:28) 1. This
effectively renders φ1
L as can be determined by
the corresponding SVs of the UL. We note that the singular vectors of the UL and VL matrices are
complementary but have significant differences.
L the top contributor with edge corrections from φ0
L = 5 and c1
3 Discussion
3.1 Bias term contribution
So far we have concentrated on understanding the ui operator through its singular vectors and
spectrum. However, it is not the only input-dependent term contributing to the output and here
we aim to highlight that the bias term has a significant role to play.
6
(a)
(b)
(c)
Figure 8: Comparison of singular spectra of data matrix and network linear operator. (a) Spectrum of data matrix. (b) Spectrum
of network operator. (c) (1st row) First four singular vectors of the data matrix, (2nd row) Right SV's of the entire Network, (3rd
row) Feature wise contractions of the SV's, (4th row) Left SV's of the entire network
For the toy problem, we trained a network without any bias terms in order to make the com-
parison with data SVD. We train a new network with bias terms and explore their contributions.
Remarkably, the SV's of the new network only correct the edges of the bulk that is generated by
the bias terms as shown in Figure 9. This is quite different from the solution found by the no-bias
network and is, somewhat, counter-intuitive though the bias term from the last decoder layer does
align nicely with the top SV from the data matrix.
We can apply a similar analysis for the 3D data since we trained an autoencoder to reproduce the
input shape before the downstream model. In Figure 10 we show the bias contributions of the last
few layers of the autoencoder.
Similar to the toy data the bias terms of the last two layers are responsible for the bulk of the
7
(a)
(b)
Figure 9: Comparison of contributions coming from the SV's of the u ̃x term and those coming from the bias terms. (a) (top) Top 4
singular vectors, (bottom) bias term contributions from the decoder layers. (b) (top) u ̃x * ̃x, (bottom) b ̃x as calculated from the RHS
of (9)
(a)
(b)
Figure 10: Bias contributions of (a) the last three layers and (b) the total bias term
reconstructed shape. An intriguing difference is how the bias contributions look like noisy point
clouds but their sum results in a highly structured shape.
It seems that the bias terms can also be responsible for the representative power of deep models
and have been quite overlooked in the XAI literature. A possible reason for this behavior and
the increased performance over the no-bias network might be due to the ease of training the bias
terms through their shallower gradient paths. This would be in line with the motivations and
performance of ResNet [35] architectures.
3.2 Feature wise contraction
Throughout the results section we have made use of the feature-wise contraction to generate the
heatmaps displayed. However, it may not be clear why this is more interpretable than using the
SV's directly, especially since for the toy dataset the SV's don't look too far from their contracted
versions. We display some examples from the image and 3d data sets in Figure 11 where the fea-
ture channels are averaged over instead of contracted with the input. The most distinct difference
between the two treatments for the images is how much more diffuse and present on the back-
ground the averaged SV's are. For the 3D models, the SV's are not as diffuse but they do give a
false impression of the contribution each point brings to the output. This is also the case for the
8
Figure 11: Feature wise averaged top contributing SV's for AlexNet, VGG11, cars and wind turbines
images where the averaged SV's may lead us to over-attribute the importance of the background,
when in fact it gets canceled pixel-wise. This pixel/point-wise cancellation without taking the
corresponding weights to zero is a remarkable feature of the learned operators. It reinforces the
view that learning to ignore features is just as important part of learning as paying attention to the
main signal.
3.3 Comparison with other XAI methods
For comparison, we present here explanations produced by a prominent subset of the many XAI
methods available in the literature. Since most of these methods were developed with 2D com-
puter vision in mind we restrict our comparison to the ImageNet models. In Figures 12 and 13 we
see attribution heatmaps for the three ImageNet examples used throughout our results.
Gradient based [36–38] and LRP [39] explanations seem in good agreement with each other. No-
tably integrated gradients (IG) [38] have the least amount of noise in their heatmaps while grad
exhibits the most. This of course can be attributed to the feature-wise dot-product and averaging
effect of the integral in IG.
There is a lot of similarity between these explanations and the singular vectors produced by the
penultimate layer. This can be expected since the right operator in (16) is most of the network.
However, with the existing XAI methods, there is no opportunity to decompose the effect of the
network into potentially less noisy pieces. The most striking difference is that we can naturally
inspect the operators and representation at an intermediate layer and compare SV's in an equiva-
lent way. In doing so, the advantage of our method becomes most apparent and we can see how
the operator coming from the last convolutional layer has SV's that are spatially separated.
GradCam [40] also attempts to understand the network in terms of the output of the last con-
Figure 12: Comparison explanations for AlexNet
9
volutional layer. However, due to the averaging operations and the necessary interpolation, the
produced explanations are very coarse. In contrast, our method is fine-grained, and the SV's high-
light how the filters decompose the input.
Figure 13: Comparison explanations for VGG 11
LIME [12] builds a linear surrogate of the model around perturbations of the input applied to
superpixels obtained by Felzenszwalb segmentation [41]. Despite the fact, the models considered
are already linear around the input the produced explanations are quite different than the SV's and
other gradient-based methods. The biggest disagreement is the over-importance LIME assigns to
the background super pixel. This may be explained by either the fact that Lime produces out-
of-distribution perturbations or because the background gets removed via the feature-wise dot
product in the other methods including our own.
4 Method
In this section, we outline the mathematical preliminaries underpinning our method.
4.1 Deep networks
A deep neural network, in the most general sense, is a map fθ : RM → RN between an input
signal x ∈ RM to the space of desired output signals y ∈ RN, where θ denotes all parameters of
the map. It is important to note that regardless of the actual input and output signal type (e.g.
binary or categorical) deep learning usually assumes the underlying algebraic field is continuous.
The term deep refers to the fact that the map fθ is a composition of multiple maps, that are loosely
termed layers, each with their own set of parameters
fθ(x) = ( f L
θL
◦ f L−1
θL−1
◦ * * * ◦ f 1
θ1
)(x)
θi ⊂ θ
(1)
where L ∈ N > 2 specifies the number of layers. The prototypical layer consists of an affine map
followed by an element-wise non-linear activation function σ.
zl+1 = σ(Wlzl + bl)
(2)
Where z0 = x, zL = y and the intermediate cases zl for 1 < l < L are termed hidden or latent repre-
sentations. The non-linearity σ is usually chosen from a popular set of functions such as Sigmoid,
10
Tanh or ReLU := max(*, 0) and their variants. These non-linear activations are responsible for the
ability of neural networks to approximate arbitrary functions and are the source of the observed
representational power of deep learning. Indeed, without the non-linearity the composition of
multiple linear maps fW,b(x) = Wx + b would collapse into a single linear transformation.
fW2,b2 ( fW1,b1(x)) = fW2W1,W2b1+b2
(3)
Due to the combination of a large number of layers, a large number of parameters, and the use of
non-linear activation functions, deep learning models have come to be perceived as black boxes.
4.2 Local Linearity
Despite the global non-linear nature of deep neural networks, it was noticed in Mont ́ufar et al. [22]
that certain architectures containing piece-wise linear activation functions are completely defined
by the separate linear pieces that it's composed of. More specifically, if we restrict ourselves to a
linear region of the input domain Rˆı ⊂ RM then for any input in that region the network output
is given by:
yˆı = uˆı * xˆı + bˆı,
xˆı ∈ Rˆı
(4)
This is known as the input-dependent point-wise affine map (PWA) form of the network. The
above equation shows that in a linear region, the network is reduced to a matched filter output
plus a bias term or, put another way, a dot product between the input and a learned vector. For
the case when the network is composed of linear transformations and ReLU activation functions
we can explicitly write the vector as
(uˆı)j = (WL)j: * diag(IzL−1>0) * WL−1 * . . . * diag(Iz1>0) * W1
(5)
Where the operator diag(Izl >0) is represented by a diagonal matrix of element-wise indicator func-
tions. By noticing that the indicator operator is in fact the derivative of the ReLU activation func-
tion we can write the following:
∂
∂z
ReLU( fW,b(z)) =
∂ReLU(z)
∂z
(cid:12)
(cid:12)
(cid:12) fW,b(z)
*
∂
∂z
( fW,b(z)) = diag(I fW,b(z)>0) * W
(6)
As previously noted deep networks are compositions of differentiable functions and we can ex-
ploit the chain rule to efficiently calculate the ui vector.
(uˆı)j =
(cid:19)
(cid:18) ∂zL
∂zL−1
*
∂zL−1
∂zL−2
j:
* . . . *
∂z1
∂z0
=
(cid:19)
(cid:18) ∂y
∂x
j:
(7)
In practice, we do not know apriori, what the linear regions are. Fortunately, we can still obtain
the corresponding linear transformation by differentiating the network w.r.t. a specific example of
interest ̃x in the input space.
fθ( ̃x) =
∂ fθ(x)
∂x
(cid:12)
(cid:12)
(cid:12) ̃x
* ̃x + b ̃x = u ̃x * ̃x + b ̃x
(8)
11
The bias term can be obtained in two ways:
b ̃x = fθ( ̃x) −
∂ fθ(x)
∂x
(cid:12)
(cid:12)
(cid:12) ̃x
* ̃x =
L
∑
l=1
∂ fθ(x)
∂bl
(cid:12)
(cid:12)
(cid:12) ̃x
* bl =
L
∑
l=1
βl
(9)
Now we can obtain the linear regions by perturbing ̃x and testing for change in the operator. For
this particular architecture, the input dependence is only manifest through the indicator functions
since the other terms correspond to the layer weights. This means that two inputs with the same
activation signs will result in the same affine map and will belong to the same linear region Ri.
We can view the model as an ensemble of linear models with restricted support to the linear
regions. Since linear models are considered inherently interpretable, then a neural network with
piecewise activation functions can be said to be effectively interpretable when considering its form
for a specific input.
4.3 The class of locally linear models
So far we have shown local linearity for networks consisting of affine maps followed by ReLU
activation functions. However, the class of locally linear models is substantially broader as we
show in the following.
Convolutional layers are a popular choice for vision-related tasks and signal processing. The
inputs to these layers are usually organized as tensors with spatiotemporal dimensions and chan-
nel (features) dimensions e.g. for video zt h w c ∈ RT ⊗ RH ⊗ RW ⊗ RC. These inputs are then
convoluted with the layer filters Wt h w c c(cid:48) ∈ RTk ⊗ RHk ⊗ RWk ⊗ RC ⊗ RC(cid:48)
̃zt(cid:48) h(cid:48) w(cid:48) c(cid:48)
=
Tk−1
∑
τ=0
Hk−1
∑
η=0
Wk−1
∑
ω=0
Ck−1
∑
κ=0
Wτ η ω κ c(cid:48)
zτ+t(cid:48) η+h(cid:48) ω+w(cid:48) κ + bc(cid:48)
(10)
Despite the above succinct representation the most efficient way to implement convolutions is
to flatten the input into a vector and matrecize the weights into a Toeplitz matrix. Ultimately,
convolutions are affine maps with a constrained weight matrix ̃W ∈ RT(cid:48) H(cid:48)W(cid:48)C(cid:48)×TW HC
̃z = ̃W * z + ̃b
̃z, ̃b ∈ RT(cid:48) H(cid:48)W(cid:48)C(cid:48)
; z ∈ RTHWC
(11)
The output dimensions are a function of the convolution kernel size, dilation, stride, and padding.
Pooling layers are a type of convolution operation aimed at reducing the size of the spatiotempo-
ral dimensions while leaving the channel dimension the same. The weights of these layers can be
fixed as in the case of average pooling or can be input dependent like max pooling, however, since
they are convolution layers they too are effectively affine maps.
Residual layers a.k.a. skip connections, are an effective way to combat the vanishing gradient
problem by introducing an additive operation and allowing paths of a lower depth.
y = (W + f ) * x + b
(12)
12
Where f is a locally linear deep network and W is a map, not necessarily trainable, used to match
the input to the same dimension as the image of f . Residual layers are pointwise affine as long as
f is pointwise affine.
Concatenation layers are a method of combining inputs from different branches into a single
representation. Taking z1 = f1 * x and z2 = f2 * x to be the outputs of two locally linear branches
of the network, a concatenated layer can be expressed as
z = W * [z1 z2] + b = [W1 W2] * [z1 z2] + b = W1 * z1 + W2 * z1 + b = (W1 f1 + W2 f2) * x + b
(13)
Which is equivalent in form to a residual layer and hence pointwise affine.
Activation functions have already been identified as element-wise non-linear operations critical
to model performance. However, despite their non-linearity they too admit an input dependent
point wise affine representation
σ(z) = fΛ(z),b(z) = diag
(cid:19)
(cid:18) σ(z) − b
z
* z + b
(14)
Note that this representation is not unique, and we have the freedom to choose any constant b
including 0 or σ(0). For the special case, when the activation is piecewise linear, the canonical
representation is given by the gradient of the activation function as was shown for the ReLU case
above.
Λ(z) = diag
(cid:19)
(cid:18) ∂σ(z)
∂z
(15)
This representation is also valid for the near linear regions of Sigmoid and Tanh activations and is
favored in this work due to its ease of computation using auto differentiation packages.
We define the class of locally linear models as functions formed by composing successive point-
wise affine maps. Their local linearity can be proven by noticing that these maps map points to
points and that their composition is again pointwise affine. As demonstrated above, many pop-
ular components of deep learning models fall into this category and the class of locally linear
models is quite broad.
4.4 Spectral surgery
Having shown that a large class of deep learning models can be reduced to locally linear models
we now turn to the analysis of these models for the purposes of explainability. The natural ques-
tion is how do we analyze the overall effect of composing multiple pointwise affine maps. One
method is to focus on the final output and analyze the effective linear transformation ui in (4).
Indeed, this strategy is used for saliency maps where the gradient of the output with respect to
the input gives ui as shown in (7).
However, despite it being an exact representation of the network action, it is an aggregated view
that gives limited insight into the various components that make up the final prediction. The
main contribution of this work is to decompose the output of the model into a linear combination
of spectral components that are ranked by their contribution.
13
The first step is to pick an intermediate layer and separate the chain of pointwise affine maps (7)
into a left and right piece.
(u ̃x)j =
(cid:32) L
∏
l=ls
Wl
(cid:33)
(cid:32) ls∏
l=1
j:
(cid:33)
Wl
* ̃x = (Lls )j:Rls * ̃x
(16)
Where we have used Wl for the representation of all pointwise affine maps involved. Next, we
obtain the SVD of the right operator
Lls Rls * ̃x = LlsUls
Σ
ls V T
ls
* ̃x = ˆLls * cls
(17)
Where ˆLls = LlsUls is a spectral left operator and cls = Σ
* ̃x are spectral coefficients obtained
by projecting the input onto the singular orthonormal vectors φi which are the columns of Vls and
scaling by the corresponding singular values λi
ls V T
ls
ci
ls
= λi
ls φi
ls
* ̃x
φi
ls
* φj
ls
= δij
(18)
Where δij is the Kronecker delta function. The singular values are defined to be positive and
ordered in descending order λ0 > λ1 > . . . λr−1 where r is the rank of Lls. This decomposition of
the input into the singular vectors (SV) of the operator is in contrast with the usual PCA methods
used in statistics and data science but in line with the spectral methods common in physics and the
analysis of differential equations. Specifically, given a linear differential operator L and problems
of the form
Lu = f
(19)
The solutions are obtained by expanding both u and f in terms of the eigenvectors of L and solving
the resulting algebraic system. We interpret the singular vectors as a set {φi}r−1
i=0 of learned high
dimensional filters which can be visualized for the purposes of explainability. In addition, we can
obtain a linear decomposition of the network output in terms of the excitation of these filters.
y ̃x =
r−1
∑
k=0
αk
ls
+ b ̃x =
r−1
∑
k=0
ls λk
ψk
ls φk
ls
* x ̃x + b ̃x
(20)
Where the ψk
are the r components of the row of the spectral left operator responsible for the
ls
output ( ˆLls )j:.
It is important to note that the sign of the αk may not be positive nor does the
magnitude preserve the order established by the singular values. However, what we do have for
certain is an additive representation of the network output in terms of likely far fewer components
than the input dimension r << M.
We can further reduce the number of components by imposing a threshold either on the absolute
values or the quantiles of the αk. Here we consider an alternative approach in which we reduce the
components to purely positive or negative depending on the overall sign of the sum. To do so we
separate the components into two complementary ordered lists α+ = {αk
j > 0} and α−, where
j |αk
14
j denotes the order index and k is the spectral index. Then we add the two sequences order-wise
to obtain a new set of coefficients
ˆα = (cid:0)α+
k + α−
k
(cid:1)min(|α+|,|α−|)−1
j=0
(cid:91) (α+
j )|α+|
j=min(|α+|,|α−|)
(cid:91) (α−
j )|α−|
j=min(|α+|,|α−|)
(21)
If the new sequence still has mixed signs then we can repeat the process with the resulting se-
quence. Once all terms have the same sign, they can be normalized to give the proportional
contribution of each singular vector
̃αk =
ˆαk
∑| ˆα|
j=0 ˆαj
ˆαk, ˆαj ∈ ˆα
(22)
The justification for this procedure comes from the observation that weights in deep learning are
initialized randomly with both positive and negative values while the common classification task
requires either a positive or negative final output. Therefore, in the absence of a least energy
constraint, solutions of many excitations that average out to a sufficiently positive or negative
outcome are just as valid as ones of a single excitation. Note that we picked the layer ls to split the
operator arbitrarily and each choice presents a new basis. However, each basis results in the same
operator but expressed in terms of spaces with differing ranks.
The spectral surgery referred to in the title of this subsection is the combination of exploring the
basis of singular vectors at each layer and collapsing or pruning contributions to obtain an inter-
pretable representation of the model.
4.5 Feature wise contraction
The singular vectors have the same dimensions as the input and their action on the input is that of
a dot product. However, when the data has a more natural tensor representation, such as an image,
then we find that it proves insightful to perform the dot product along a particular dimension.
hw = ∑
ck
c
(cid:17)
(cid:16)
φk
ls
xhwc
hwc
(23)
This has a couple of advantages beginning with the fact that it is a more natural way to treat multi-
dimensional attributions for each point in the input than averaging or taking absolute values. In
this way, we consider the attributions as a contribution each point brings to the output, which can
be zero. This is the second advantage of the contraction in that it allows us to determine which
points don't affect the prediction and may emphasize the contributing points better.
We note the similarity with the gradient times input XAI method [37]. However, we offer a more
principled prescription to aggregate the contributions at each point compared to the usual mask-
ing of negative values. This does not permit the cancellation of features and may present an
inaccurate view of the network.
4.6 Symbolic representation
At this point we have all the necessary ingredients to produce a symbolic representation of the
network. This is usually done in spectral decomposition methods as a change of basis.
15
̃x = ∑
k
(cid:16)
φk
ls
* ̃x
(cid:17)
φk
ls
(24)
In practice we find that the projections of the input onto the SV's to be of similar magnitude
across the entire spectrum and thus unsuitable for our XAI purposes. This representation does not
directly take into consideration how the input influences the network output. The combination of
the singular values λk
and the left operator Lls typically induce a natural ranking among the SV's.
ls
Therefore, we symbolically decompose the output of the network as:
(y ̃x)hw =
r−1
∑
k=0
αk
ls ˆck
hw + (b ̃x)hw ⇒ y ̃x = ∑
(y ̃x)hw
hw
Where
ˆck
hw =
ck
hw
∑hw ck
hw
,
(b ̃x)hw =
b ̃x
|h||w|
(25)
(26)
This decomposition takes account of the ranking induced by the output and incorporates the fea-
ture wise contraction. In addition we can make use of the reduction strategy to replace the αk
ls
by ̃αk
from (22) and obtain coefficients of homogenous sign. We emphasise that although the in-
ls
dices reflect an image classification use case the decomposition can be easily extended to arbitrary
tensor outputs.
5 Conclusion
In this work, we have presented a novel explainability technique that leverages the locally linear
structure of complex neural networks to decompose the action of deep learning models into inter-
pretable components. We have shown that the network does indeed focus on salient features if the
corresponding singular vectors are combined with the input in the correct way. Furthermore, the
technique can be used to dissect the network in a consistent way so that we may inspect the repre-
sentations at each layer and elucidate how the operator evolves across the depth of the model. A
notable example of this can be seen in the output of the convolutional layers in the vision models,
which decompose the input image into spatially separated salient segments. In our view, this ad-
dresses a shortcoming in many existing explainability methods that tend to produce explanations
that are a mix of all salient features. The methods that do consider intermediate representations
tend to rely on interpolation and/or analysis of a subset of units. Our approach, however, out-
puts fine-grained explanations that consider all activated units. Next, we have shown how our
method produces a natural additive symbolic representation that is equivalent across all layers,
and we have outlined a method to reduce the number of contributing terms through cancellations
of opposing coefficients. Finally, the main advantage of our method, we believe lies in the fact
that it does not rely on axiomatic or heuristic motivations but is a principled application of es-
tablished linear algebra techniques to give an accurate, interpretable characterization of complex
deep learning models.
6 Acknowledgements
This work was done in the scope of the Innovate UK grant on "Explainable AI system to rational-
ize accelerated decision making on automotive component performance and manufacturability"
[Project 10009522].
16
References
[1] Feiyu Xu, Hans Uszkoreit, Yangzhou Du, Wei Fan, Dongyan Zhao, and Jun Zhu. Explain-
able ai: A brief survey on history, research areas, approaches and challenges.
In Natural
Language Processing and Chinese Computing: 8th CCF International Conference, NLPCC
2019, Dunhuang, China, October 9–14, 2019, Proceedings, Part II 8, pages 563–574. Springer,
2019.
[2] Filip Karlo Doˇsilovi ́c, Mario Brˇci ́c, and Nikica Hlupi ́c. Explainable artificial intelligence: A
survey. In 2018 41st International convention on information and communication technology,
electronics and microelectronics (MIPRO), pages 0210–0215. IEEE, 2018.
[3] Amina Adadi and Mohammed Berrada. Peeking inside the black-box: a survey on explain-
able artificial intelligence (xai). IEEE access, 6:52138–52160, 2018.
[4] Andreas Holzinger, Anna Saranti, Christoph Molnar, Przemyslaw Biecek, and Wojciech
Samek.
In xxAI-Beyond Explainable AI:
International Workshop, Held in Conjunction with ICML 2020, July 18, 2020, Vienna, Austria,
Revised and Extended Papers, pages 13–38. Springer, 2022.
Explainable ai methods-a brief overview.
[5] Hui Wen Loh, Chui Ping Ooi, Silvia Seoni, Prabal Datta Barua, Filippo Molinari, and U Ra-
jendra Acharya. Application of explainable artificial intelligence for healthcare: A systematic
review of the last decade (2011–2022). Computer Methods and Programs in Biomedicine,
page 107161, 2022.
[6] Jurgita ˇCerneviˇcien ̇e and Audrius Kabaˇsinskas. Review of multi-criteria decision-making
methods in finance using explainable artificial intelligence. Frontiers in artificial intelligence,
5:35, 2022.
[7] Branka Hadji Misheva, Joerg Osterrieder, Ali Hirsa, Onkar Kulkarni, and Stephen Fung Lin.
Explainable ai in credit risk management. arXiv preprint arXiv:2103.00949, 2021.
[8] Bibhudhendu Shukla, Ip-Shing Fan, and Ian Jennions. Opportunities for explainable artificial
In PHM Society European Conference,
intelligence in aerospace predictive maintenance.
volume 5, pages 11–11, 2020.
[9] Vikram Krishnamurthy, Kusha Nezafati, Erik Stayton, and Vikrant Singh. Explainable ai
framework for imaging-based predictive maintenance for automotive applications and be-
yond. Data-Enabled Discovery and Applications, 4:1–15, 2020.
[10] Srikanth Kaniyanoor Srinivasan, V Krishna, and Harsha Vardhan Sahoo. A methodology to
use ai for automotive safety using model explainability. Technical report, EasyChair, 2021.
[11] Iulian Ogrezeanu, Anamaria Vizitiu, Costin Cius, del, Andrei Puiu, Simona Coman, Cristian
Boldis, or, Alina Itu, Robert Demeter, Florin Moldoveanu, Constantin Suciu, et al. Privacy-
preserving and explainable ai in industrial applications. Applied Sciences, 12:6395, 2022.
[12] Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. "why should i trust you?": Explain-
ing the predictions of any classifier, 2016. URL https://arxiv.org/abs/1602.04938.
[13] Javier Castro, Daniel G ́omez, and Juan Tejada. Polynomial calculation of the shapley value
based on sampling. Computers I& Operations Research, 36(5):1726–1730, 2009. ISSN 0305-
0548. doi: https://doi.org/10.1016/j.cor.2008.04.004. URL https://www.sciencedirect.
17
com/science/article/pii/S0305054808000804. Selected papers presented at the Tenth In-
ternational Symposium on Locational Decisions (ISOLDE X).
[14] Erik ˇStrumbelj and Igor Kononenko. An efficient explanation of individual classifications
using game theory. J. Mach. Learn. Res., 11:1–18, 2010.
[15] Scott Lundberg and Su-In Lee. A unified approach to interpreting model predictions, 2017.
URL https://arxiv.org/abs/1705.07874.
[16] Paolo Giudici and Emanuela Raffinetti. Shapley-lorenz explainable artificial intelligence.
Expert systems with applications, 167:114104, 2021.
[17] Yasmeen Alufaisan, Laura R Marusich, Jonathan Z Bakdash, Yan Zhou, and Murat Kantar-
In
cioglu. Does explainable artificial intelligence improve human decision-making?
Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 6618–6626,
2021.
[18] Mark T Keane and Barry Smyth. Good counterfactuals and where to find them: A case-based
technique for generating counterfactuals for explainable ai (xai). In Case-Based Reasoning
Research and Development: 28th International Conference, ICCBR 2020, Salamanca, Spain,
June 8–12, 2020, Proceedings 28, pages 163–178. Springer, 2020.
[19] Yibing Liu, Haoliang Li, Yangyang Guo, Chenqi Kong, Jing Li, and Shiqi Wang. Re-
thinking attention-model explainability through faithfulness violation test. In International
Conference on Machine Learning, pages 13807–13824. PMLR, 2022.
[20] Sarah Wiegreffe and Yuval Pinter. Attention is not not explanation.
arXiv preprint
arXiv:1908.04626, 2019.
[21] Kunpeng Zhang and Li Li. Explainable multimodal trajectory prediction using attention
models. Transportation Research Part C: Emerging Technologies, 143:103829, 2022.
[22] Guido Mont ́ufar, Razvan Pascanu, Kyunghyun Cho, and Yoshua Bengio. On the number of
linear regions of deep neural networks, 2014.
[23] Randall Balestriero and Richard G. Baraniuk. Mad max: Affine spline insights into deep
learning. Proceedings of the IEEE, 109(5):704–727, May 2021. ISSN 1558-2256. doi: 10.1109/
jproc.2020.3042100. URL http://dx.doi.org/10.1109/JPROC.2020.3042100.
[24] Guang-He Lee, David Alvarez-Melis, and Tommi S. Jaakkola. Towards robust, locally linear
deep networks, 2019.
[25] Xiao Zhang and Dongrui Wu. Empirical studies on the properties of linear regions in deep
neural networks, 2020.
[26] Shengjie Wang, Abdel-Rahman Mohamed, Rich Caruana, Jeff Bilmes, Matthai Plilipose,
Matthew Richardson, Krzysztof Geras, Gregor Urban, and Ozlem Aslan. Analysis of
deep neural networks with the extended data jacobian matrix. In Proceedings of the 33rd
International Conference on International Conference on Machine Learning - Volume 48,
ICML'16, page 718–727. JMLR.org, 2016.
[27] Sebastian Lapuschkin, Stephan W ̈aldchen, Alexander Binder, Gr ́egoire Montavon, Woj-
ciech Samek, and Klaus-Robert M ̈uller. Unmasking clever hans predictors and assessing
what machines really learn. Nature Communications, 10(1), mar 2019. doi: 10.1038/
s41467-019-08987-4. URL https://doi.org/10.1038/s41467-019-08987-4.
18
[28] Hamidreza Eivazi, Soledad Le Clainche, Sergio Hoyas, and Ricardo Vinuesa. Towards ex-
traction of orthogonal and parsimonious non-linear modes from turbulent flows. Expert
Systems with Applications, 202:117038, 2022.
ISSN 0957-4174. doi: https://doi.org/10.
1016/j.eswa.2022.117038. URL https://www.sciencedirect.com/science/article/pii/
S0957417422004535.
[29] Kari Karhunen. Zur spektraltheorie stochastischer prozesse. Ann. Acad. Sci. Fennicae, AI,
34, 1946.
[30] Clarence W. Rowley, Igor Mezic, Shervin Bagheri, Philipp Schlatter, and Dan S. Henningson.
Journal of Fluid Mechanics, 641:115–127, 2009. doi:
Spectral analysis of nonlinear flows.
10.1017/S0022112009992059.
[31] Peter Schmid and J ̈orn Sesterhenn. Dynamic mode decomposition of numerical and experi-
mental data. Journal of Fluid Mechanics, 656, 11 2008. doi: 10.1017/S0022112010001217.
[32] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng
Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-
Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer
Vision (IJCV), 115(3):211–252, 2015. doi: 10.1007/s11263-015-0816-y.
[33] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep
convolutional neural networks. Communications of the ACM, 60(6):84–90, 2017.
[34] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale
image recognition. arXiv preprint arXiv:1409.1556, 2014.
[35] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for im-
In Proceedings of the IEEE conference on computer vision and pattern
age recognition.
recognition, pages 770–778, 2016.
[36] Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. Deep inside convolutional
networks: Visualising image classification models and saliency maps, 2013. URL https:
//arxiv.org/abs/1312.6034.
[37] Avanti Shrikumar, Peyton Greenside, Anna Shcherbina, and Anshul Kundaje. Not just a
black box: Learning important features through propagating activation differences, 2016.
[38] Mukund Sundararajan, Ankur Taly, and Qiqi Yan. Axiomatic attribution for deep networks,
2017.
[39] Alexander Binder, Gr ́egoire Montavon, Sebastian Lapuschkin, Klaus-Robert M ̈uller, and Wo-
jciech Samek. Layer-wise relevance propagation for neural networks with local renormaliza-
tion layers. In International Conference on Artificial Neural Networks, pages 63–71. Springer,
2016.
[40] Ramprasaath R. Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi
Parikh, and Dhruv Batra. Grad-CAM: Visual explanations from deep networks via gradient-
based localization. International Journal of Computer Vision, 128(2):336–359, oct 2019. doi:
10.1007/s11263-019-01228-7. URL https://doi.org/10.1007%2Fs11263-019-01228-7.
[41] Pedro F Felzenszwalb and Daniel P Huttenlocher. Efficient graph-based image segmentation.
International journal of computer vision, 59:167–181, 2004.
19
|
|
http://arxiv.org/abs/2302.09938v1 | 2023-02-20T12:07:57 | 2023-02-20T12:07:57 | SkillRec: A Data-Driven Approach to Job Skill Recommendation for Career
Insights | Understanding the skill sets and knowledge required for any career is of
utmost importance, but it is increasingly challenging in today's dynamic world
with rapid changes in terms of the tools and techniques used. Thus, it is
especially important to be able to accurately identify the required skill sets
for any job for better career insights and development. In this paper, we
propose and develop the Skill Recommendation (SkillRec) system for recommending
the relevant job skills required for a given job based on the job title.
SkillRec collects and identify the skill set required for a job based on the
job descriptions published by companies hiring for these roles. In addition to
the data collection and pre-processing capabilities, SkillRec also utilises
word/sentence embedding techniques for job title representation, alongside a
feed-forward neural network for job skill recommendation based on the job title
representation. Based on our preliminary experiments on a dataset of 6,000 job
titles and descriptions, SkillRec shows a promising performance in terms of
accuracy and F1-score. | [
"Xiang Qian Ong",
"Kwan Hui Lim"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09938v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09938v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.AI",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.AI",
"cs.LG",
"cs.SI"
] | SkillRec: A Data-Driven Approach to Job Skill
Recommendation for Career Insights
Xiang Qian Ong
Information Systems Technology and Design Pillar
Singapore University of Technology and Design
Singapore
xiangqian [email protected]
Kwan Hui Lim
Information Systems Technology and Design Pillar
Singapore University of Technology and Design
Singapore
kwanhui [email protected]
3
2
0
2
b
e
F
0
2
]
I
A
.
s
c
[
1
v
8
3
9
9
0
.
2
0
3
2
:
v
i
X
r
a
Abstract-Understanding the skill sets and knowledge required
for any career is of utmost importance, but it is increasingly
challenging in today's dynamic world with rapid changes in terms
of the tools and techniques used. Thus, it is especially important
to be able to accurately identify the required skill sets for any
job for better career insights and development. In this paper,
we propose and develop the Skill Recommendation (SkillRec)
system for recommending the relevant job skills required for a
given job based on the job title. SkillRec collects and identify
the skill set required for a job based on the job descriptions
published by companies hiring for these roles. In addition
to the data collection and pre-processing capabilities, SkillRec
also utilises word/sentence embedding techniques for job title
representation, alongside a feed-forward neural network for job
skill recommendation based on the job title representation. Based
on our preliminary experiments on a dataset of 6,000 job titles
and descriptions, SkillRec shows a promising performance in
terms of accuracy and F1-score.
Index Terms-Recommendation Systems, Skill Recommen-
dation, Occupational Analysis, Natural Language Processing,
Neural Networks
I. INTRODUCTION
Technological advancements and industrial changes are con-
stantly evolving at a rapid pace [1]. With this rapid change,
new job scopes are constantly being generated at companies
along with a dynamic list of skill sets to meet these ever-
growing changes. As such, individuals that are looking to
change their career or seeking a new job often face the problem
of skill mismatch due to those constant changes. This problem
is further highlighted by the recent COVID-19 pandemic
which has caused drastic changes in many industries, such as
aviation and tourism. During this period, there was a spike in
the number of retrenched workers seeking to find employment
in other fields [2] and potentially facing skill mismatch.
On top of that, jobs are tightly coupled with skill sets, which
are essential for fulfilling the job requirements. Individuals
who are transiting into a new career and industry would need
to conduct extensive research or seek advice on the latest job
requirements and the relevant skills. This process is commonly
performed to improve the chances of applicants securing a new
job, especially in a new industry. This is necessary due to the
huge barrier of entry for individuals transiting over to new
jobs or new industries, given their existing skill sets. Different
industry fields and even roles within the same industry require
different sets of skills to carry out tasks associated with the
job. Likewise, hiring managers also look out for those skill sets
when assessing suitable candidates for an open role. As such,
identifying the skill sets required for a given job is especially
important for potential job seekers, even for those staying in
the same industry.
A. Related Work
In terms of academic research, this problem and research
area have also garnered keen interest in recent years due to
these various developments [1], [3]–[7]. For example, there are
various streams of research that investigate diverse but related
topics such as: (i) recommending job candidates to companies
based on their suitability [8]–[10]; (ii) recommending jobs
to candidates based on the candidates skill sets and career
history [11], [12]; (iii) modelling the career trajectories of in-
dividuals [13], [14]; (iv) predicting the future career transitions
and movements of workers [15], [16].
Among these works, the most closely related works to our
research are those on job skill recommendations [17]–[19] and
those using various embedding techniques [4], [20]–[22] for
occupational analysis and mining. For example, Dave et al.
proposed a representation learning model using job transitions,
job-skills and skill co-occurence networks for recommending
both jobs and skills [17]. Others have used reinforcement
learning in the form of a Deep-Q Network for skill recom-
mendation and better interpretation [19]. Liu et al. developed
a bi-directional language model for contextualised job tile em-
beddings that was demonstrated on a downstream occupational
named entity recognition task [4]. Skills2Graph [21] used
FastText embeddings to better maintain semantic similarity
between taxonomic components of job postings. Also closely
related to our research are various works that have developed
systems and implemented approaches for related occupational
analysis and mining tasks [20], [23], [24].
B. Motivation and Problem Statement
The fundamental problem is that identifying the relevant
skill sets required for a particular job title is both time-
consuming and a complex process. However, this process is
essential to job seekers looking to enter new jobs and yet very
challenging as they are new to both the field and industry.
The problem can be broken down into two sub-problems: the
lack of knowledge to learn the relevant skills and the lack
of proficiency in the relevant skills, which will be elaborated
next.
1) Lack of knowledge to learn the relevant skills: To learn
the relevant skills required for the particular job, there is a
need to understand the current job workflow, the tools that
are used on the job and knowledge in that field of interest.
The root of the problem is the lack of domain expertise in the
new industry to truly understand the skill sets required for the
job [25].
There are various different ways in which the problem can
be mitigated. The first is to seek advice from experts who have
worked in the field for a long time. They understand the job
requirements and the necessary skill sets needed, from their ex-
tensive years of experience. Alternatively, governments' skills
recommendations serve as a good indicator of possible general
relevant skill sets that are required in the industry for the
near future [26], [27]. Lastly, individuals could perform online
research on the industry, given that there is an abundance of
articles and forums that share insights and recommendations.
This step is crucial as it serves as the basis for the next step.
Only after knowing the skills that need to be learned, then the
individual can embark on the next step.
2) Lack of proficiency in the relevant skills: After identi-
fying the required skill sets to transit to a new industry or
role, it is crucial for individuals to have access to resources
to learn those skills. Proficiency in these relevant skills is an
essential requirement that leads to successful employment and
subsequent progression. The resources could come in many
different forms, both physical and digital, which we discuss
next.
A classroom setting is a common structure whereby individ-
uals will attend classes and undergo a structured curriculum
to gain knowledge and experience from the instructors. At
the end of such courses, there are formal certificates that
act as proof of completion of the course. Classroom formats
could also be virtual, ranging from online courses such as
Udemy and Coursera. Similarly, these classes provide both the
content and practical lessons, with the added bonus of online
certificates upon completion. Openly available resources are
unstructured curricula that could comprise different resources
from both online and offline. This gives the individual the
flexibility of time and learning opportunity but typically do
not result in a formal certification upon completion.
C. Problem Definition
In this paper, our main focus is on the first sub-problem,
which is the lack of knowledge to learn the relevant skills
required for a job role. This problem is significantly more
crucial than the second sub-problem, as the former's outcome
will determine the skill sets that an individual is required to
learn. Failing at this step will render useless any future efforts
at both a industry transition or career progression. In addition,
there are multiple open-source and affordable resources online
to address the problem of a lack of proficiency, thus this second
sub-problem is thus not as crucial as compared to the first sub-
problem that we focus on. More formally, we investigate the
problem of identifying and recommending the required job
skill sets required for a role given the job title.
D. Main Contributions
The current ways to address the problems are mainly
human-driven insights, such as seeking the advice of current
practitioners in the new industry or through self-reading of
openly available resources. However, we could tap into data-
driven insights that perform the analysis and recommend the
right skill sets to pick up for the industry or role we are
interested in. This could reduce the time taken or the cost
incurred in the process.
In this paper, we make the following contributions:
1) We investigate the problem of job skill recommendation,
which is to recommend a list of required skill sets given
role in the form of a job title.
2) To address the above problem, we propose and develop
the Skill Recommendation (SkillRec) system. SkillRec
comprises the capability to collect openly available job
listing information, process these data to extract job title
and required skill sets, and subsequently recommend
skill sets given a job title.
3) As part of SkillRec, we also develop two approaches
to skill recommendation, utilising word/sentence em-
bedding techniques (using BERT and FastText) for job
title representation, before inputing this job title repre-
sentation to a simple but effective feed-forward neural
network for job skill recommendation.
4) Using a dataset of 6,000 job listings, we perform pre-
liminary experiments to evaluate the performance of our
proposed SkillRec system. Our preliminary results show
promising performance of SkillRec in terms of accuracy
and F1-score.
II. PROPOSED SKILL RECOMMENDATION SYSTEM
Our proposed Skill Recommendation (SkillRec) system
comprises four main components, including a web collection
component, data pre-processing component, job title represen-
tation component and job skill recommendation component.
Figure 1 shows an overview of our proposed system. Next,
we provide a brief summary of each component, followed by
a more detail description in the later sections.
1) Web Collection Component. This component retrieves
job listings from various web sources, such as online
job posting platforms.
2) Data Pre-processing Component. This component per-
forms the necessary data pre-processing and cleaning to
extract relevant information from the job descriptions,
such as the job title, job description, required skills,
company name, etc.
3) Job Title Representation Component. This component
utilises word/sentence embedding techniques, such as
BERT and FastText, to model job titles in term of its
vector representations.
Fig. 1: System Architecture of Our Proposed Skill Recommendation (SkillRec) System
4) Job Skill Recommendation Component. The job title
representation from the previous step is then fed into
this component, which comprises a feed-forward neural
network that outputs a set of recommended skills given
this job title.
A. Web Collection Component
The web collection component retrieves various types of
web-based information such as job descriptions from popular
online job posting platforms, as well as skill sets from massive
open online courses platforms.
B. Data Pre-processing Component
the relevant
The data pre-processing component works on the job title
and job description data collected by the web collection
component. This component first parses the collected webpage
to extract
the job title and
information,
job description. Thereafter, the standard text pre-processing
steps, such as conversion to lowercase, removal of non-textual
symbols, tokenisation, are performed on these two fields. The
skill sets for a job listing is derived from its corresponding
job description based on an exact match of a mentioned skill
with our earlier list of 589 unique skill sets.
i.e.,
C. Job Title Representation Component
The job description data was retrieved over a period of six
months at a weekly interval to ensure that the dataset is kept
up-to-date. A total of 6,000 job descriptions were retrieved
from three popular online job posting platform.
As our main task is to determine the required skill sets for a
given job title, we proceed to model the job titles using various
embedding techniques. In this study, we experiment with two
popular word/sentence representation techniques:
Massive open online courses platforms provide a good
source of information on popular educational courses and
the skill sets they aim to impart. Using two popular massive
open online courses platforms, we collected and identified 589
unique skill sets that are relevant for this work.
• BERT Embedding [28]. The Bidirectional Encoder Rep-
resentation of Transformer (BERT) is a transformer-based
language model comprising multiple layers of bidirec-
tional Transformer encoders, along with self-attention
mechanism. BERT is then pre-trained with the Masked
Language Model task of predicting hidden tokens using
other non-hidden tokens, and/or Next Sentence Predic-
tion task of predicting the next sentence given an input
sentence.
• BERT+NN. Similar to the earlier FastText+NN model,
this model uses the BERT embedding for job title repre-
sentation (Section II-C), followed by the same neural net-
work (NN) for job skill recommendation (Section II-D).
• FastText Embedding [29], [30]. FastText builds upon
the skip-gram approach that is popularly used by the
Word2Vec model [31], [32]. Using FastText, each word
is represented by a bag-of-character n-grams, and in turn
each character n-grams is represented by a vector. The
vector representation of each word is then derived from
the sum of these character n-grams vector representations.
BERT was chosen due to its strong performance in various
language modelling tasks, such as text classification, ques-
tion answering, among others. In addition, BERT has been
frequently used in a variety of other recommendation and
prediction tasks, such as location prediction [33], [34] and
tourism recommendation [35], [36].
After extracting the job title in the previous step, either
BERT or FastText
is then used to obtain the vector rep-
resentation of the job title. This job title representation is
subsequently used as input to our neural network for job skill
recommendation, which we describe next.
D. Job Skill Recommendation Component
Using the vector representation of the job title from the
previous step, this job title representation is then fed into
a feed-forward neural network for job skill recommendation
based on the job title. We utilise a feed-forward neural
network with two fully-connected hidden layer, with the first
hidden layer comprising 1280 nodes, the second hidden layer
comprising 640 nodes and a final output layer of 589 nodes
corresponding to the 589 unique skill sets. We employ Sigmoid
as our activation function, AdamW as our optimizer and a
dropout of 0.5 to reduce overfitting.
III. EXPERIMENTS AND RESULTS
Using our collected dataset, we use 80% for training our
model as described in Section II and use the remaining 20%
for evaluation. For evaluation purposes, we use the standard
metrics of accuracy and F1-score, based on the recommended
job skill against the ground truth job skill in the original job
description.
We experimented with the following algorithms and base-
lines:
• Bag-of-Words. A classical bag-of-words model that is
traditionally used for classification tasks involving text-
based data. In our application, we utilise a frequency-
the frequency of which a
based approach to model
particular skill is mentioned in relation to a specific job.
This model is used as a simple baseline to compare our
two proposed approaches.
• FastText+NN. As described earlier in our SkillRec sys-
tem, this model uses the FastText embedding for job title
representation (Section II-C), followed by a neural net-
work (NN) for job skill recommendation (Section II-D).
TABLE I: Experimental Results
Algorithm
Bag-of-Words
FastText+NN
BERT+NN
Accuracy
0.4768
0.9728
0.9870
F1-score
0.2887
0.4931
0.4973
Table I shows the average results of our experiments for the
three models in terms of accuracy and F1-score. The results
show that our proposed SkillRec system using BERT+NN
is the best performing model, with FastText+NN being a
extremely close second. BERT has been shown to perform
well for a range of natural language processing tasks, from text
classification to question answering. Similarly for this task of
occupational skill recommendation, BERT as well as FastText
perform well with the add-on of a straightforward neural
network. Unsurprisingly, Bag-of-Words performs the worst
by a large margin due to the simple job title representation
approach that is unable to capture similar job titles obtained.
TABLE II: Example Job Title and Relevant Skills
Job Title
developer
software
chef
senior director
software engineer
Related Jobs and Skills
java, python, fullstack, android, software
stack, java, python, fullstack, android
pastry, kitchen, hair, chemist, accountant
director, partner, pacific, planner, strategy
software, engineer, python, java, embedded
In addition to the experiments measuring accuracy and F1-
score of the job skill recommendations, we also performed a
qualitative check on the job title representations learnt and the
similar job titles and skill sets based on these representations.
Table II shows a sample of some job titles and the related job
titles and skill sets. This simple analysis shows the effective-
ness of our approach as occupations such as developer and
software engineer results in relevant skills like Java, Python,
fullstack, embedded, etc. Similarly, non-technical roles such
as senior director also resulted in similar roles like partner
and planner and relevant skills like strategy. For certain roles
like chef, the results are more mixed with relevant terms like
pastry and kitchen being mentioned but also non-relevant ones
like chemist and accountant. This issue highlights a limitation
due to our preliminary experiments and limited dataset, which
contains more technical roles than non-technical ones.
IV. CONCLUSION AND FUTURE WORK
In this paper, we proposed the SkillRec system to address
the problem of job skill recommendation given a job title.
SkillRec comprises four main components for web collection,
data pre-processing,
job title representation and job skill
recommendation. In particular, our preliminary experiments
show that an approach that combines job title representation
using BERT, along with job skill recommendation using a
straightforward feed-forward neural network works effectively
in terms of accuracy and F1-score.
Future enhancements to SkillRec can involve a more dy-
namic recommendation of job skills to account for new skill
sets that may emerge in future or existing skill sets that evolve
over time. Similarly, we can also include more context in
addition to the job titles, such as the industry, country, job
applicant details, etc, for making more contextualised and
personalised job skill recommendations.
V. ACKNOWLEDGMENT
This research is funded in part by the Singapore University
of Technology and Design under grant RS-MEFAI-00005-
R0201.
REFERENCES
[1] I. Khaouja, I. Kassou, and M. Ghogho, "A survey on skill identification
from online job ads," IEEE Access, vol. 9, pp. 118 134–118 153, 2021.
[2] W. E. Forum, "The future of jobs report 2020," World Economic Forum,
2020.
[3] A. Gugnani and H. Misra, "Implicit skills extraction using document
embedding and its use in job recommendation," in Proceedings of the
AAAI Conference on Artificial Intelligence, vol. 34, no. 08, 2020, pp.
13 286–13 293.
[4] J. Liu, Y. C. Ng, Z. Gui, T. Singhal, L. Blessing, K. L. Wood, and
K. H. Lim, "Title2vec: a contextual job title embedding for occupational
named entity recognition and other applications," Journal of Big Data,
vol. 9, no. 1, pp. 1–16, 2022.
[5] Z. Ao, G. Horv ́ath, C. Sheng, Y. Song, and Y. Sun, "Skill requirements in
job advertisements: A comparison of skill-categorization methods based
on wage regressions," Information Processing & Management, vol. 60,
no. 2, p. 103185, 2023.
[6] A. Barducci, S. Iannaccone, V. La Gatta, V. Moscato, G. Sperl`ı, and
S. Zavota, "An end-to-end framework for information extraction from
italian resumes," Expert Systems with Applications, vol. 210, p. 118487,
2022.
[7] J. Liu, Y. C. Ng, K. L. Wood, and K. H. Lim, "Ipod: a large-scale in-
dustrial and professional occupation dataset," in Conference Companion
Publication of the 2020 on Computer Supported Cooperative Work and
Social Computing, 2020, pp. 323–328.
[8] C. Zhu, H. Zhu, H. Xiong, C. Ma, F. Xie, P. Ding, and P. Li,
"Person-job fit: Adapting the right talent for the right job with joint
representation learning," ACM Transactions on Management Information
Systems (TMIS), vol. 9, no. 3, p. 12, 2018.
[9] D. Shen, H. Zhu, C. Zhu, T. Xu, C. Ma, and H. Xiong, "A joint learning
approach to intelligent job interview assessment." in IJCAI, 2018, pp.
3542–3548.
[10] C. Qin, H. Zhu, T. Xu, C. Zhu, L. Jiang, E. Chen, and H. Xiong,
"Enhancing person-job fit for talent recruitment: An ability-aware neural
network approach," in The 41st International ACM SIGIR Conference
on Research & Development in Information Retrieval, 2018, pp. 25–34.
[11] J. Malinowski, T. Keim, O. Wendt, and T. Weitzel, "Matching people
and jobs: A bilateral recommendation approach," in Proceedings of
the 39th Annual Hawaii International Conference on System Sciences
(HICSS'06), vol. 6, 2006, pp. 137c–137c.
[12] Y. Zhang, C. Yang, and Z. Niu, "A research of job recommendation
system based on collaborative filtering," in 2014 Seventh International
Symposium on Computational Intelligence and Design, vol. 1, 2014, pp.
533–538.
[13] Y. Liu, L. Zhang, L. Nie, Y. Yan, and D. S. Rosenblum, "Fortune teller:
predicting your career path," in Thirtieth AAAI conference on artificial
intelligence, 2016.
[14] D. Mimno and A. McCallum, "Modeling career path trajectories," 2008.
[15] C. James, L. Pappalardo, A. Sˆırbu, and F. Simini, "Prediction of next
career moves from scientific profiles," arXiv preprint arXiv:1802.04830,
2018.
[16] Y. Yang, D.-C. Zhan, and Y. Jiang, "Which one will be next? an analysis
of talent demission," Proceedings of the 1st International Workshop on
Organizational Behavior and Talent Analytics, 2018.
[17] V. S. Dave, B. Zhang, M. Al Hasan, K. AlJadda, and M. Korayem,
"A combined representation learning approach for better job and skill
recommendation," in Proceedings of the 27th ACM International Con-
ference on Information and Knowledge Management, 2018, pp. 1997–
2005.
[18] A. Maurya and R. Telang, "Bayesian multi-view models for member-
job matching and personalized skill recommendations," in 2017 IEEE
International Conference on Big Data (Big Data).
IEEE, 2017, pp.
1193–1202.
[19] Y. Sun, F. Zhuang, H. Zhu, Q. He, and H. Xiong, "Cost-effective
and interpretable job skill recommendation with deep reinforcement
learning," in Proceedings of the Web Conference 2021, 2021, pp. 3827–
3838.
[20] A. Giabelli, L. Malandri, F. Mercorio, M. Mezzanzanica, and A. Seveso,
"Skills2graph: Processing million job ads to face the job skill mismatch
problem." in Proceedings of the Thirtieth International Joint Conference
on Artificial Intelligence, 2021.
[21] --, "Skills2job: A recommender system that encodes job offer embed-
dings on graph databases," Applied Soft Computing, vol. 101, p. 107049,
2021.
[22] C. M. Jaramillo, P. Squires, H. G. Kaufman, A. M. Da Silva, and J. To-
gelius, "Word embedding for job market spatial representation: tracking
changes and predicting skills demand," in 2020 IEEE International
Conference on Big Data (Big Data).
IEEE, 2020, pp. 5713–5715.
[23] X. J. S. Ashok, E.-P. Lim, and P. K. Prasetyo, "Jobsense: A data-driven
career knowledge exploration framework and system," in 2018 IEEE
International Conference on Data Mining Workshops (ICDMW).
IEEE,
2018, pp. 1411–1416.
[24] C. Qin, H. Zhu, C. Zhu, T. Xu, F. Zhuang, C. Ma, J. Zhang, and
H. Xiong, "Duerquiz: A personalized question recommender system for
intelligent job interview," in Proceedings of the 25th ACM SIGKDD
International Conference on Knowledge Discovery & Data Mining,
2019, pp. 2165–2173.
[25] P. Restrepo, "Skill mismatch and structural unemployment," MIT Work-
ing Paper, 2015.
[26] A. Felstead, D. Gallie, F. Green, and Y. Zhou, Skills at Work in Britain,
1986 to 2006. ESRC Centre on Skills, Knowledge and Organisational
Performance, 2007.
[27] A. Felstead, D. Gallie, F. Green, and H. Inanc, "Skills at work in britain:
First findings from the skills and employment survey 2012," 2013.
[28] J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, "Bert: Pre-training
of deep bidirectional
transformers for language understanding," in
Proceedings of the 2019 Conference of the North American Chapter
of the Association for Computational Linguistics: Human Language
Technologies, Volume 1 (Long and Short Papers), 2019, pp. 4171–4186.
[29] P. Bojanowski, E. Grave, A. Joulin, and T. Mikolov, "Enriching word
vectors with subword information," Transactions of the association for
computational linguistics, vol. 5, pp. 135–146, 2017.
[30] A. Joulin, ́E. Grave, P. Bojanowski, and T. Mikolov, "Bag of tricks for
efficient text classification," in Proceedings of the 15th Conference of
the European Chapter of the Association for Computational Linguistics:
Volume 2, Short Papers, 2017, pp. 427–431.
[31] T. Mikolov, K. Chen, G. Corrado, and J. Dean, "Efficient estimation of
word representations in vector space," arXiv preprint arXiv:1301.3781,
2013.
[32] T. Mikolov, I. Sutskever, K. Chen, G. S. Corrado, and J. Dean,
"Distributed representations of words and phrases and their composi-
tionality," Advances in neural information processing systems, vol. 26,
2013.
[33] M. Li, K. H. Lim, T. Guo, and J. Liu, "A transformer-based framework
for poi-level social post geolocation," Proceedings of the 45th European
Conference on Information Retrieval, 2023.
[34] L. F. Simanjuntak, R. Mahendra, and E. Yulianti, "We know you are
living in bali: Location prediction of twitter users using bert language
model," Big Data and Cognitive Computing, vol. 6, no. 3, p. 77, 2022.
[35] J. Arreola, L. Garcia, J. Ramos-Zavaleta, and A. Rodriguez, "An
embeddings based recommendation system for mexican tourism," in
IberLEF@SEPLN, 2021, pp. 110–117.
[36] N. L. Ho and K. H. Lim, "Poibert: A transformer-based model for
the 2022 IEEE
the tour recommendation problem," Proceedings of
International Conference on Big Data, 2022.
|
|
http://arxiv.org/abs/2302.09930v2 | 2023-07-31T21:20:16 | 2023-02-20T11:51:58 | Nyström $M$-Hilbert-Schmidt Independence Criterion | Kernel techniques are among the most popular and powerful approaches of data
science. Among the key features that make kernels ubiquitous are (i) the number
of domains they have been designed for, (ii) the Hilbert structure of the
function class associated to kernels facilitating their statistical analysis,
and (iii) their ability to represent probability distributions without loss of
information. These properties give rise to the immense success of
Hilbert-Schmidt independence criterion (HSIC) which is able to capture joint
independence of random variables under mild conditions, and permits closed-form
estimators with quadratic computational complexity (w.r.t. the sample size). In
order to alleviate the quadratic computational bottleneck in large-scale
applications, multiple HSIC approximations have been proposed, however these
estimators are restricted to $M=2$ random variables, do not extend naturally to
the $M\ge 2$ case, and lack theoretical guarantees. In this work, we propose an
alternative Nystr\"om-based HSIC estimator which handles the $M\ge 2$ case,
prove its consistency, and demonstrate its applicability in multiple contexts,
including synthetic examples, dependency testing of media annotations, and
causal discovery. | [
"Florian Kalinke",
"Zoltán Szabó"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09930v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09930v2",
"@rel": "related",
"@type": "application/pdf"
}
] | [
"Proceedings of the Thirty-Ninth Conference on Uncertainty in\n Artificial Intelligence, PMLR 216:1005-1015, 2023"
] | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "stat.ML",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"stat.ML",
"cs.IT",
"cs.LG",
"math.IT",
"46E22, 94A17",
"I.2.6; H.1.1"
] | 3
2
0
2
l
u
J
1
3
]
L
M
.
t
a
t
s
[
2
v
0
3
9
9
0
.
2
0
3
2
:
v
i
X
r
a
Nyström M -Hilbert-Schmidt Independence Criterion
Florian Kalinke1
Zoltán Szabó2
1Institute for Program Structures and Data Organization, Karlsruhe Institute of Technology, Karlsruhe, Germany
2Department of Statistics, London School of Economics, London, UK
Abstract
the so-called kernel function.
Kernel techniques are among the most popular and
powerful approaches of data science. Among the
key features that make kernels ubiquitous are (i)
the number of domains they have been designed
for, (ii) the Hilbert structure of the function class
associated to kernels facilitating their statistical
analysis, and (iii) their ability to represent prob-
ability distributions without loss of information.
These properties give rise to the immense success
of Hilbert-Schmidt independence criterion (HSIC)
which is able to capture joint independence of ran-
dom variables under mild conditions, and permits
closed-form estimators with quadratic computa-
tional complexity (w.r.t. the sample size). In order
to alleviate the quadratic computational bottleneck
in large-scale applications, multiple HSIC approxi-
mations have been proposed, however these estima-
tors are restricted to M " 2 random variables, do
not extend naturally to the M ě 2 case, and lack
theoretical guarantees. In this work, we propose an
alternative Nyström-based HSIC estimator which
handles the M ě 2 case, prove its consistency, and
demonstrate its applicability in multiple contexts,
including synthetic examples, dependency testing
of media annotations, and causal discovery.
1 INTRODUCTION
Kernels methods [Aronszajn, 1950] have been on the fore-
front of data science for more than 20 years [Schölkopf and
Smola, 2002, Steinwart and Christmann, 2008], and they
underpin some of the most powerful and principled machine
learning techniques currently known. The key idea of ker-
nels is to map the data into a (possibly infinite-dimensional)
feature space in which one computes the inner product im-
plicitly by means of a symmetric, positive definite function,
Kernel functions have been designed for strings [Watkins,
1999, Lodhi et al., 2002] or more generally for sequences
[Király and Oberhauser, 2019], sets [Haussler, 1999, Gärt-
ner et al., 2002], rankings [Jiao and Vert, 2016], fuzzy do-
mains [Guevara et al., 2017] and graphs [Borgwardt et al.,
2020], which renders them broadly applicable. Their ex-
tension to the space of probability measures [Berlinet and
Thomas-Agnan, 2004, Smola et al., 2007] allows to rep-
resent distributions in a reproducing kernel Hilbert space
(RKHS) by the so-called mean embedding. Such embed-
dings form the main building block of maximum mean dis-
crepancy (MMD; Smola et al. [2007], Gretton et al. [2012]),
which quantifies the discrepancy of two distributions as the
RKHS distance of their respective mean embeddings. MMD
is (i) a semi-metric on probability measures, (ii) a metric iff.
the kernel is characteristic [Fukumizu et al., 2008, Sriperum-
budur et al., 2010], (iii) an instance of integral probability
metrics (IPM; Müller [1997], Zolotarev [1983]) when the
underlying function class in the IPM is chosen to be the unit
ball in an RKHS.
Measuring the discrepancy of a joint distribution to the
product of its marginals by MMD gives rise to the Hilbert-
Schmidt
independence criterion (HSIC; Gretton et al.
[2005]). HSIC was shown to be equivalent [Sejdinovic et al.,
2013b] to distance covariance [Székely et al., 2007, Székely
and Rizzo, 2009, Lyons, 2013]; Sheng and Sriperumbudur
[2023] have recently proved a similar result for the condi-
tional case. HSIC is known to capture the independence of
M " 2 random variables with characteristic pkmq2
m"1 ker-
nels (on the respective domains) as proved by Lyons [2013];
for more than two components (M ą 2; Quadrianto et al.
[2009], Sejdinovic et al. [2013a], Pfister et al. [2018]) univer-
sality [Steinwart, 2001, Micchelli et al., 2006] of pkmqM
m"1-s
is sufficient [Szabó and Sriperumbudur, 2018]. HSIC has
been deployed successfully in a wide range of domains in-
cluding independence testing [Gretton et al., 2008, Pfister
et al., 2018, Albert et al., 2022], feature selection [Camps-
Valls et al., 2010, Song et al., 2012, Wang et al., 2022] with
applications in biomarker detection [Climente-González
et al., 2019] and wind power prediction [Bouche et al.,
2023], clustering [Song et al., 2007, Climente-González
et al., 2019], and causal discovery [Mooij et al., 2016, Pfis-
ter et al., 2018, Chakraborty and Zhang, 2019, Schölkopf
et al., 2021].
Various estimators for HSIC and other dependence mea-
sures exist in the literature, out of which we summarize
the most closely related ones to our work in Table 1. The
classical V-statistic based HSIC estimator (V-HSIC; Gretton
et al. [2005], Quadrianto et al. [2009], Pfister et al. [2018])
is powerful but its runtime increases quadratically with the
number of samples, which limits it applicability in large-
scale settings. To tackle this severe computational bottle-
neck, approximations of HSIC (N-HSIC, RFF-HSIC) have
been proposed [Zhang et al., 2018], relying on the Nyström
[Williams and Seeger, 2001] and the random Fourier fea-
ture (RFF; Rahimi and Recht [2007]) method, respectively.
However, these estimators (i) are limited to two compo-
nents, (ii) their extension to more than two components is
not straightforward, and (iii) they lack theoretical guaran-
tees. The RFF-based approach is further restricted to finite-
dimensional Euclidean domains and to translation-invariant
kernels. The normalized finite set independence criterion
(NFSIC; Jitkrittum et al. [2017]) replaces the RKHS norm
of HSIC with an L2 one which allows the construction of
linear-time estimators. However, NFSIC is also limited to
two components, requires Rd-valued input, and analytic
kernels [Chwialkowski et al., 2015]. Novel complemen-
tary approaches are the kernel partial correlation coefficient
(KPCC; Huang et al. 2022), and tests basing on incomplete
U-statistics [Schrab et al., 2022]. One drawback of KPCC
is its cubic runtime complexity w.r.t. the sample size when
applied to kernel-enriched domains. Schrab et al. [2022]'s
approach can run in linear time, but it is limited to M " 2
components. We note that all approaches require choosing
an appropriate kernel: Here, one can optimize over various
parametric families of kernels for increasing a proxy of test
power in case of MMD [Jitkrittum et al., 2016, Liu et al.,
2020], and in case of HSIC [Jitkrittum et al., 2017]. One
can also design (almost) minimax-optimal MMD-based two-
sample tests using spectral regularization [Hagrass et al.,
2022].
The restriction of existing HSIC approximations to two
components is a severe limitation in recent applications like
causal discovery which require independence tests capable
of handling more than two components. Furthermore, the
emergence of large-scale data sets necessitates algorithms
that scale well in the sample size. To alleviate these bottle-
necks, we make the following contributions.
1. We propose Nyström M -HSIC, an efficient HSIC estima-
tor, which can handle more than two components and has
̄
, where n denotes the num-
runtime
́
M n13 ` M n1n
O
ber of samples, n1 ! n stands for the number of Nyström
points, and M is the number of random variables whose
independence is measured.
`
2. We provide theoretical guarantees for Nyström M -
HSIC: we prove that our estimator converges with rate
n, which matches the convergence
n ́1{2
for n1 „
O
of the quadratic-time estimator.
?
̆
3. We perform an extensive suite of experiments to demon-
strate the efficiency of Nyström M -HSIC. These appli-
cations include dependency testing of media annotations
and causal discovery. In the former, we achieve similar
runtime and power as existing HSIC approximations. The
latter requires testing joint independence of more than
two components, which is beyond the capabilities of ex-
isting HSIC accelerations. Here, the proposed algorithm
achieves the same performance as the quadratic-time
HSIC estimator V-HSIC with a significantly reduced run-
time.
The paper is structured as follows. Our notations are in-
troduced in Section 2. The existing Nyström-based HSIC
approximation for two components is reviewed in Section 3.
Our proposed method, which is capable of handling M ě 2
components, is presented in Section 4 together with its theo-
retical guarantees. In Section 5 we demonstrate the applica-
bility of Nyström M -HSIC. All the proofs of our results are
available in the supplementary material.
2 NOTATIONS
X
H
M
m"1
`
1 p
k, μk, MMDk, bM
m"1km, CX , A ́1, }A}op, trpAq,
This section is dedicated to definitions and to the introduc-
tion of our target quantity Hilbert-Schmidt independence
criterion (HSIC). In particular, we introduce the notations
rM s, xv, wy, }v}2, ̋mPrM sAm, trpAq, A ́1, A ́, AT,
}A}F, 1d, Id, span,
q,
m"1km,
Pm, HSICbM
bM
X pλq,
OP prnq.
For a positive integer M , rM s
:" t1, . . . , M u. The
Euclidean inner product of vectors v, w P Rd is
denoted by xv, wy;
:"
a
xv, vy. The Hadamard product of matrices Am P
Rd1ˆd2 of equal size (m P rM s) is ̋mPrM sAm :"
"ś
. Matrix multiplication takes
the Euclidean norm is }v}2
mPrM spAmqi,j
N
ı
iPrd1s,jPrd2s
ř
precendence over the Hadamard one. For a matrix A P
Rdˆd, trpAq :"
iPrds Ai,i denotes its trace, A ́1 is
its inverse (assuming that A is non-singular), and A ́
is its Moore–Penrose inverse. The transpose of a matrix
A P Rd1ˆd2 is denoted by AT. The Frobenius norm of
a matrix A P Rd1ˆd2 is }A}F :"
iPrd1s,jPrd2spAi,jq2.
The d-dimensional vector of ones is 1d. The d ˆ d-sized
identity matrix is denoted by Id. For a set S in a vector
, τX q
space, spanpSq denotes the linear hull of S. Let p
bř
X
Table 1: Comparison of kernel independence measures: n – number of samples, M – number of components, n1 – number
of Nyström samples, s – number of random Fourier features, d – data dimensionality.
Runtime Complexity M
Domain Admissible Kernels
Independence Measure
V-HSIC [Pfister et al., 2018]
NFSIC [Jitkrittum et al., 2017]
N-HSIC [Zhang et al., 2018]
RFF-HSIC [Zhang et al., 2018]
KPCC [Huang et al., 2022]
Nyström M -HSIC (N-MHSIC)
`
̆
̄
M n2
pnq
́
n13 ` nn12
`
̆
s2n
̆
`
n3
́
M n13 ` M n1n
O
O
O
O
O
O
M ě 2
any
M " 2 Rd
M " 2
any
M " 2 Rd
M " 2
any
M ě 2
any
̄
universal
analytic, characteristic
characteristic
translation-invariant, characteristic
characteristic
universal
X
X
X
H
H
X
H
M
X
,
B
k on
" hpxq for all x P
k and xh, kp ̈, xqyHk
pτX q the Borel sigma-algebra
be a topological space, and
B
induced by the topology τX . All probability measures in
the manuscript are meant with respect to the measurable
`
q. The
pτX qq, and they are denoted by
space p
1 p
X
Ñ R
associated with a kernel k :
ˆ
RKHS
X
Ñ R such that
is the Hilbert space of functions h :
kp ̈, xq P
and
k.1 Kernels are assumed to be bounded (in other
h P
words, there exists B P R such that supx,x1PX kpx, x1q ď
B) and measurable, and
k is assumed to be separable
throughout the paper.2 The function defined by φkpxq :"
kp ̈, xq is the canonical feature map; with this feature map
" xφkpxq, φkpx1qyHk for
kpx, x1q " xkp ̈, xq, kp ̈, x1qyHk
. A kernel k : Rd ˆ Rd Ñ R is called
all x, x1 P
translation-invariant if there exists a function κ : Rd Ñ R
such that kpx, x1q " κpx ́ x1q for all x, x1 P Rd. The
mean embedding μk of a probability measure P P
q
ş
X
is μk pPq :"
X φkpxqdPpxq, where the integral is meant
in Bochner's sense. The resulting (semi-)metric is called
maximum mean discrepancy (MMD):
`
1 p
M
H
X
MMDkpP, Qq :" }μkpPq ́ μkpQq}Hk
,
X
M
`
1 p
for P, Q P
q. The injectivity of the mean embedding
μk is equivalent to MMDk being a metric; in this case the
kernel k is called characteristic. Let X " pXmqM
m"1 denote
a random variable with distribution P P
`
q on the
1 p
X
" ˆM
product space
m is enriched with
m"1X
X
m Ñ R. The distribution of the m-
kernel km :
X
th marginal Xm of X is denoted by Pm P
mq; the
Pm P
product of these M marginals is bM
q. The
tensor product of the kernels pkmqM
`
1 p
X
`
1 p
X
m, where
M
M
X
m ˆ
m"1
M
X
m"1
`
bM
m"1km
pxmqM
m"1, px1
mqM
m"1
̆
:"
ź
kmpxm, x1
mq,
mPrM s
with xm, x1
m P
use the shorthand k " bM
m (m P rM s), is also a kernel; we will
m"1km. The associated RKHS
X
1kp ̈, xq stands for x1 P X ÞÑ kpx1, xq P R with x P X fixed.
2The separability of Hk can be guaranteed on a separable
topological space X by taking a continuous kernel k [Steinwart
and Christmann, 2008, Lemma 4.33].
k " bM
H
m"1H
km [Berlinet and
has a simple structure
Thomas-Agnan, 2004] with the r.h.s. denoting the tensor
kmqM
product of the RKHSs p
km ,
H
m"1hm P bM
the multi-linear operator bM
km acts as
ś
bM
mPrM s xhm, vmyHkm
m"1hmpv1, . . . , vM q "
, where
km . The space bM
hm, vm P
km is the closure of the
m"1H
linear combination of such bM
m"1hm-s:
m"1. Indeed, for hm P
m"1H
H
H
bM
m"1H
km " Ęspan
`
bM
m"1hm : hm P
̆
km, m P rM s
H
,
where the closure is meant w.r.t. to the (linear extension of
the) inner product defined as
D
@
bM
m"1am, bM
ź
m"1bm
bM
m"1Hkm
:"
"
xam, bmyHkm
,
am, bm P
mPrM s
km.
(1)
H
Specifically, (1) implies that
›
›bM
m"1am
›
›
bM
m"1Hkm
"
ź
mPrM s
}am}Hkm
.
(2)
One can define an independence measure, the so-called
Hilbert-Schmidt independence criterion based on k as
`
̆
HSICkpPq :" MMDk
where CX :" μkpPq ́ μk
covariance operator.
P, bM
`
m"1
Pm
̆
bM
m"1
Pm
" }CX }Hk
,
(3)
is the centered cross-
1
E
H
H
H
H
ř
k Ñ
k Ñ
pA ̊Aq
"1 }Ah}Hk . As
Let A :
k be a bounded linear operator. Its in-
H
verse (provided that it exists) A ́1 :
k is also
bounded linear. The operator norm of A is defined as
}A}op :" sup}h}Hk
k is separable, it has a
countable orthonormal basis pejqjPJ . A is called trace-class
A
ă 8 where p ̈q ̊ denotes the
if
jPJ xAej, ejyHk
adjoint, and in this case trpAq :"
is called the trace of A. For P P
ă 8
q, kernel k :
M
Ñ R and λ ą 0, the uncentered covariance op-
X
X kp ̈, xq b kp ̈, xqdPpxq and its reg-
erator is μkbkpPq :"
ularized variant is μkbk,λpPq :" μkbkpPq ` λI, respec-
xpλq "
tively, where I denotes the identity operator. Let
2 ej, ej
`
1 p
jPJ
ř
Hk
ˆ
X
X
ş
N
A
φkpxq, μ ́1
. The effective dimension of
E
kbk,λpPqφkpxq
:" Ex„P r
X „ P is defined as
xpλqs "
̄
kbk,λpPq
tr
. For a sequence of rn ą 0-s and
a sequence of real-valued random variables Xn, Xn "
OPprnq denotes that Xn
́
μkbkpPqμ ́1
is bounded in probability.
Hk
X pλq
N
N
rn
3 EXISTING HSIC ESTIMATORS
We recall the existing HSIC estimator V-HSIC in Sec-
tion 3.1, and its Nyström approximation for two compo-
nents in Section 3.2. We present our proposed Nyström
approximation for more than two components in Section 4.
3.1 CLASSICAL HSIC ESTIMATOR (V-HSIC)
Given an i.i.d. sample of M -tuples of size n
1 , . . . , xn
1, . . . , x1
x1
M
, . . . , pxn
ˆPn :"
␣`
̆
(
M q
Ă
(4)
X
drawn from P, the corresponding empirical estimate of the
squared HSIC, obtained by replacing the population means
with the sample means, gives rise to the V-statistic based
estimator
́
̄
ˆPn
:"
1
n2 1T
1T
nKkm 1n ́
n
0 ď HSIC2
k
ź
`
1
n2M
mPrM s
`
̆
̋mPrM s Kkm
1n
`
2
nM `1 1T
n
̋mPrM s Kkm1n
(5)
̆
1, x1
n 1n1T
(
1 , xn
2 q
n P Rnˆn,
with the centering matrix H " In ́ 1
Gram matrices Kk1 , Kk2 defined in (6), and sample ˆPn :"
␣
px1
2q, . . . , pxn
as in (4) with M " 2. The naive
`
computation of (7) costs
. However, noticing that
ř
trpATBq "
i,jPrns Ai,jBi,j, the computational complex-
. The quadratic complexity can be
ity reduces to
reduced by the Nyström approximation3 [Zhang et al., 2018]
n3
n2
O
O
̆
`
̆
́
̄
HSIC2
k,N0
ˆPn
"
p ̊q
"
̄
́
HKNys
HKNys
k2
k1
̄
T
1
n2 tr
›
́
›
1
›
HφNys
›
k1
n2
HφNys
k2
(8)
›
›
›
›
2
F
,
which we detail in the following. The Nyström approxima-
tion relies on a subsample of size n1 ď n of ˆPn, which
we denote by ̃Pn1 :"
1, ̃x1
̃x1
; the tilde
2
indicates a relabeling. The subsample allows to define three
matrices
̃xn1
1 , ̃xn1
, . . . ,
̆)
!`
̆
`
2
"
`
̆‰
m, ̃xj
̃xi
Kkm,n1n1 "
km
m
Kkm,nn " Kkm P Rnˆn,
‰
"
Kkm,n1n "
mq
kmp ̃xi
m, xj
i,jPrn1s P Rn1ˆn1
,
(9)
iPrn1s,jPrns P Rn1ˆn,
where m P r2s and Kkm is defined in (6), and let
Kkm,nn1 " KT
km pm P
r2sq as used in (8) are
. The matrices KNys
km,n1n P Rnˆn1
KNys
km :" Kkm,nn1 K ́1
" Kkm,nn1K ́ 1
looooooooomooooooooon
km,n1n1
2
km,n1n1Kkm,n1n
`
Kkm,nn1 K ́ 1
looooooooomooooooooon
km,n1n1
2
̆
T
P Rnˆn,
with Gram matrices
"
`
Kkm "
km
̆‰
m, xj
xi
m
i,jPrns P Rnˆn,
(6)
":φNys
km
PRnˆn1
φNys
km
which can be computed in Opn2M q.3 This prohibitive run-
time inspired the development of HSIC approximations
[Zhang et al., 2018] using the Nyström method and random
Fourier features. We review the Nyström-based construction
in Section 3.2 and explain why the technique is restricted
to M " 2 components, before presenting our alternative ap-
proximation scheme of HSIC in Section 4 which is capable
of handling M ě 2 components.
`
̆
provided that the inverse K ́1
km,n1n1 exists. In (8) the r.h.s.
pn13 ` nn12q,4
of p ̊q has a computational complexity of
n;
which is smaller than
this speeds up the computation. p ̊q relies on the cyclic
invariance property of the trace, and the idempotence of H
(in other words, HH " H), limiting the above derivation to
M " 2 components; the approach does not extend naturally
to the case of M ą 2.
of (7), provided that n1 ă
n2
?
O
O
3.2 NYSTRÖM METHOD
4 PROPOSED HSIC ESTIMATOR
In this section, we recall the existing Nyström approxima-
tion, which can handle M " 2 components.
We now elaborate the proposed Nyström HSIC approxima-
tion for M ě 2 components.
The expression (5) can be rewritten [Gretton et al., 2005]
for M " 2 components as
̄
́
ˆPn
HSIC2
k
"
1
n2 tr pHKk1HKk2 q ,
(7)
3HSIC2
kpˆPnq denotes the application of HSIC2
k to the empiri-
cal measure ˆPn. HSIC2
k,NpˆPnq indicate depen-
k,N0 pˆPnq and HSIC2
dence on ˆPn. Similarly, μlp ˆQnq stands for application, μlp ̃Qn1 q,
μkm p ̃Pm,n1 q and μkp ̃Pn1 q indicate dependence on the argument.
Recall that the centered cross-covariance operator takes the
form
`
̆
CX " μkpPq ́ μk
" μkpPq ́ bM
bM
Pm
m"1
m"1μkm pPmq .
(10)
4This follows from the complexity of Opn13q of inverting an
n1 ˆ n1 matrix and the complexity of multiplying both feature
representations [Zhang et al., 2018].
There are M `1 expectations in this expression; we estimate
these mean embeddings separately. This conceptually sim-
ple construction, is to the best of our knowledge, the first that
handles M ě 2 components, and it allows to leverage recent
bounds on mean estimators (Lemma 4.1). We first detail the
general Nyström method for approximating expectations
ş
Y φlpyqdQpyq associated to a kernel l :
Ñ R and
Y
probability distribution Q P
q. One can then choose
ˆ
Y
`
1 p
M
Y
, k, Pq, and
m, km, Pmq, m P rM s,
, l, Qq " p
, l, Qq " p
p
Y
p
Y
to achieve our goal.
X
X
!
̃y1, . . . , ̃yn1
)
␣
y1, . . . , yn
Let ̃Qn1 "
be a subsample (with replace-
(
i.i.d.„ Q referred to as Nyström
ment) of ˆQn "
points; the tilde again indicates relabeling. The usual esti-
mator of the mean embedding replaces the population mean
with its empirical counterpart over n samples3
ż
μlpQq "
φlpyqdQpyq «
Y
1
n
ÿ
iPrns
φlpyiq " μlp ˆQnq.
Instead, the Nyström approximation uses a weighted sum
with weights αi P R (i P rn1s): given n1 Nyström points,
the estimator takes the form3
́
̄
μlpQq «
αiφlp ̃yiq " μl
̃Qn1
P
Nys
l
,
H
ÿ
iPrn1s
`
`
̆
̆
: i P rn1s
:" span
Nys
̃yi
φl
where
l
H
l qT P Rn1
l , . . . , αn1
ficients αl " pα1
minimum norm solution of
Ă
l. The coef-
are obtained by the
H
›
›
›
›
μl
›
›
min
αlPRn1
́
̄
ˆQn
́
ÿ
̆
`
̃yi
αiφl
iPrn1s
›
›
2
›
›
›
›
Hl
.
(12)
The following lemma describes the solution of (12).
Lemma 4.1 (Nyström mean embedding, Chatalic et al.
[2022]). For a kernel l with corresponding feature map
φl, an i.i.d. sample ˆQn of distribution Q, and a subsample
̃Qn1 of ˆQn, the Nyström estimate of μlpQq is given by
ÿ
̄
́
̃Qn1
μl
"
`
̆
̃yi
,
αi
lφl
iPrn1s
1
n
αl "
pKl,n1n1q ́ Kl,n1n1n,
(13)
be
␣`
a
x1
1, . . . , x1
M
and
subsample
̆
(with replacement) of
M q
defined
1 , . . . , xn
(
, . . . , pxn
̃Pm,n1 "
!
m, . . . , ̃xn1
̃x1
m
)
ˆPn
in
"
(4),
(15)
be the corresponding subsample of the m-th marginal (m P
rM s). Using our choice (11) with Lemma 4.1, the estimators
for the embeddings of marginal distributions take the form3
(11)
̄
́
̃Pm,n1
"
μkm
ÿ
αi
km φkm
`
̆
,
̃xi
m
iPrn1s
1
n
pKkm,n1n1 q ́ Kkm,n1n1n,
αkm "
(16)
and the estimator of the mean embedding of the joint distri-
bution is3
̄
́
̃Pn1
"
μk
ÿ
k bM
αi
m"1 φkm
`
̆
,
̃xi
m
iPrn1s
1
n
pKk,n1n1q ́ pKk,n1nq 1n
αk "
p ̊q
"
1
n
hkkkkkkkkkkkkikkkkkkkkkkkkj
pcq
́
̄
̋mPrM s Kkm,n1n1
looooooooomooooooooon
́
paq
̄
́
ˆ
̋mPrM s Kkm,n1n
loooooooomoooooooon
1n,
(17)
pbq
where p ̊q holds as for the Gram matrix Kk,n1n1 associated
with the product kernel k " bmPrM skm one has
̄ı
Kk,n1n1 "
́
pxi
"
k
»
1, . . . , xi
M q, pxj
1, . . . , xj
fi
M q
i,jPrn1s
ź
–
"
mPrM s
kmpxi
m, xj
mq
fl
" ̋mPrM s Kkm,n1n1,
i,jPrn1s
and similarly Kk,n1n " ̋mPrM s Kkm,n1n, with Kkm,n1n1
and Kkm,n1n defined in (9).
Combining the M ` 1 Nyström estimators in (16) and in
(17) gives rise to the overall Nyström HSIC estimator, which
is elaborated in the following lemma.
Lemma 4.2 (Computation of Nyström M -HSIC). The Nys-
tröm estimator for HSIC can be expressed as3
`
̄
̆
" αT
k
̋mPrM s Kkm,n1n1
`
αk
(18)
̆
αT
km
Kkm,n1n1αkm ́ 2αT
k
̋mPrM s Kkm,n1n1αkm
,
́
ˆPn
HSIC2
ź
k,N
with Gram matrix Kl,n1n1 "
"
and Kl,n1n "
lp ̃xi, xjq
‰
"
‰
lp ̃xi, ̃xjq
iPrn1s,jPrns P Rn1ˆn.
i,jPrn1s P Rn1ˆn1
,
`
mPrM s
Let
! ́
̄
́
̄)
̃Pn1 "
1, . . . , ̃x1
̃x1
M
, . . . ,
1 , . . . , ̃xn1
̃xn1
M
(14)
with αkm and αk defined in (16) and (17), respectively,
Kkm,n1n1 is defined in (9), and N in the subscript of the
estimator refers to Nyström. Note that (18) depends on ˆPn
as one must solve (12).
Remark 1.
• Uniform weights, no subsampling. The estimator (18)
n 1n for all m P rM s,
gives back (5) when αk :" αkm :" 1
and when there is no subsampling applied.
̄
O
• Runtime complexity. In order to determine the compu-
tational complexity of (18) one has to find that of (17);
that of (16) follows by choosing M " 1 in (17). paq
and pbq in (17) are Hadamard products; hence their com-
́
M n12
pM nn1q. pcq
putational complexity is
in (17) is the Moore-Penrose inverse of an n1 ˆ n1 ma-
̄
́
n13
. Hence, the compu-
trix; thus its complexity is
̆
M n12 ` n13 ` M n1n
n12 ` n13 ` n1n
tation of αk costs
of pαkm qM
rM s. In (18) each term can be computed in
.
Overall the Nyström M -HSIC estimator has complexity
̆
, and that
for each m P
̄
́
M n12
̆
M n13 ` M n1n
M n12 ` M n13 ` M n1n
m"1 is
and
`
O
O
O
O
O
`
̆
`
`
.
"
O
O
• Difference compared to the estimator by Zhang et al.
[2018]. For M " 2, (18) reduces to
̄
́
ˆPn
`
" αT
k
̋iPr2sKki,n1n1
`
̆
αk
(19)
̆
αT
ki
Kki,n1n1αki ́ 2αT
k
̋iPr2sKki,n1n1αki
.
HSIC2
ź
k,N
`
iPr2s
Using the equivalence of (5) and (7) in case M " 2 gives
tr pHKk1HKk2 q "
ź
`
1
n4
iPr2s
1
n2 1T
2
n3 1T
n pKk1 ̋ Kk2 q 1n
1T
nKki 1n ́
n pKk11n ̋ Kk21nq ,
hence (8) becomes
̄
́
́
ˆPn
"
n
1
n2 1T
1n ́
nKNys
1T
ki
2
n3 1T
n
k1 ̋ KNys
k2
KNys
́
̄
1n
(20)
̄
KNys
k1
1n ̋ KNys
k2
1n
.
HSIC2
k,N0
ź
`
1
n4
iPr2s
The estimators (19) and (20) are identical if αk " αkm "
1
n 1n for all m P rM s and when there is no subsampling;
in the general case they do not coincide. In (8) the domi-
nant term in the complexity is pn1q2 n (since n1 ă n), this
reduces to n1n in our proposed estimator (18).
Key to showing the consistency of the proposed Nyström
M -HSIC estimator (18) (Proposition 4.1) is our next lemma,
which describes how the Nyström approximation error of
the mean embeddings of the components (dkm below) can
be propagated through tensor products.
Lemma 4.3 (Error propagation on tensor products). Let
X " pXmqM
m ˆ
m Ñ R bounded kernels (Dakm P p0, 8q such that
kmpxm, xmq ď akm , m P rM s), k "
X
supxmPXm
m, km :
" ˆM
m"1 P
m"1X
a
X
X
bM
m"1km,
`
1 p
k the RKHS associated to k, X „ P P
q, Pm the m-th marginal of P (m P rM s), n1 ď n,
H
X
M
and ̃Pm,n1 defined according to (15). Then
́
̃Pm,n1
ź
m"1μkm pPmq ́ bM
›
›
›bM
m"1μkm
ź
̄›
›
›
Hk
ď
ď
pakm ` dkm q ́
akm ,
where dkm "
mPrM s
›
›
›μkm pPmq ́ μkm
́
̃Pm,n1
mPrM s
̄›
›
›
Hkm
.
Our resulting Nyström M -HSIC performance guarantee is
as follows.
X
M
`
1 p
m ˆ
m"1 P
" ˆM
m, X „ P P
Proposition 4.1 (Error bound for Nyström M -HSIC). Let
X " pXmqM
q,
m"1X
X
X
mqmPrM s locally compact, second-countable topological
p
X
m Ñ R bounded kernels, i.e., Dakm P
spaces, km :
a
X
p0, 8q such that supxmPXm
kmpxm, xmq ď akm for all
M
m"1 akm , φkmpxmq "
m P rM s, k " bmPrM skm, ak "
kmp ̈, xmq for all xm P
m"1φkm, Ck "
E rφkpXq b φkpXqs, Ckm " E rφkm pXmq b φkm pXmqs,
the number of Nyström points n1 ď n, ˆPn defined according
to (4). Then, for any δ P
ˇ
ˇ
ˇHSICkpPq ́ HSICk,N
1
M `1
̄ˇ
ˇ
ˇ ď
m, φk " bM
ˆPn
ś
0,
`
`
X
́
́
̄
ck,1?
nloomoon
tk,1
ck,2
n1loomoon
tk,2
̇
12a2
k logpn1{δq
d
ˆ
a
ck,3
logpn1{δq
n1
X
loooooooooooooooooooooooooomoooooooooooooooooooooooooon
n1
N
`
̧
ff
tk,3
ckm,1?
nloomoon
`
«
ź
akm `
mPrM s
a
ckm,3
tkm,1
g
f
f
e
logpn1{δq
n1
`
ckm,2
n1loomoon
tkm,2
̃
Xm
looooooooooooooooooooooooooooomooooooooooooooooooooooooooooon
n1
N
12a2
km logpn1{δq
`
`
`
́
tkm,3
ź
mPrM s
akm
holds with probability at least 1 ́ pM ` 1qδ, provided that
n1 ě max
mPrM s
́
67, 12a2
k }Ck} ́1
op , 12a2
km }Ckm } ́1
op
̄
log
n1
δ
,
a
?
a
where ck,1 " 2ak
ck,3 " 12
?
ckm,2 " 4
for m P rM s.
2 logp6{δq, ck,2 " 4
a
3 logp12{δqak, ckm,1 " 2akm
3akm logp12{δq, ckm,3 " 12
a
3ak logp12{δq,
2 logp6{δq,
3 logp12{δqakm
As a baseline, to interpret the result (see the second bullet
point in Remark 2), one could consider the V-statistic based
HSIC estimator (5) for M ě 2, which according to our
following lemma has a convergence rate of
̄
.
́
1?
n
OP
Lemma 4.4 (Deviation bound for V-statistic based HSIC
estimator). Let HSICkpˆPnq be as in (5) on a metric space
m, and HSICk pPq ą 0. Then
ˆ
̇
X
" ˆM
m"1X
ˇ
ˇ
ˇHSICk pPq ́ HSICk
̄ˇ
ˇ
ˇ "
́
ˆPn
.
1
?
n
OP
Remark 2.
?
?
• From the terms tk,1, tk,2, tkm,1, tkm,2, m P rM s it follows
that for n1 ă
n the respective second term dominates,
thus increasing the error; for n1 ą
n the respective
first term dominates and the computational complexity
increases. The effective dimension ptk,3, tkm,3q controls
the trade off between the two terms and can be related
[Chatalic et al., 2022] to the decay of the eigenvalues of
the respective covariance operator. A convergence rate of
n ́1{2 for the sums tk,1 ` tk,2 ` tk,3 and tkm,1 ` tkm,2 `
tkm,3 can be achieved if
– maxmPrM s p
X pλq,
Xm pλqq ď cλ ́γ for some c ą
0 and γ P p0, 1s with n1 " n1{p2 ́γq logpn{δq, or
N
N
– maxmPrM s p
Xm pλqq ď logp1 ` c{λq{β
some c ą 0, β ą 0, and n1 "
X pλq,
N
ˆ
N
́
̄ ̇
for
?
n log
?
n max
mPrM s
1
δ ,
c
6a2
k
,
c
6a2
km
.
This rate of convergence propagates through the product.
̆
n2{3
• Lemma 4.4 establishes that the V-statistic based estimator
of HSIC converges with rate n ́1{2. Recalling the last line
`
of Table 1, setting n1 " o
, the proposed estima-
tor yields an asymptotic speedup over V-HSIC. Hence,
setting n1 " ̃
nq allows to obtain the same rate
O
of convergence while decreasing runtime. Assumption
HSICk pPq ą 0 in Lemma 4.4 protects one from attaining
a convergence rate of n ́1 of HSIC2
k
́
ˆPn
̄
.
?
p
5 EXPERIMENTS
In this section, we demonstrate the efficiency of the pro-
posed method (N-MHSIC) against the baselines NFSIC,
RFF-HSIC, N-HSIC and the quadratic-time V-statistic based
HSIC estimator (V-HSIC) in the context of independence
testing. Hence, the null hypothesis H0 is that the joint distri-
bution factorizes to the product of the marginals, the alter-
native H1 is that this is not the case. The experiments study
both synthetic (Section 5.1) and real-world (Section 5.2)
examples, in terms of power and runtime.5
We use the Gaussian kernel
́
kmpxm, x1
mq " exp
́γkm
̄
›
›xm ́ x1
m
›
›2
2
5The code of our experiments is available at https://
github.com/FlopsKa/nystroem-mhsic.
Figure 1: Estimation accuracy for M " 2 components; the
theoretical HSIC value is zero.
for all experiments, with γkm chosen according to the me-
dian heuristic. For a fair comparison of the test power, we
approximate the null distribution of each test statistic by the
permutation approach with 250 samples. We then perform a
one-sided test with an acceptance region of 5% (α " 0.05),
which we repeat, for all power experiments, on 100 inde-
pendent draws of the data; the runtime results include these.
We set each algorithm's parameters as recommended by the
respective authors: For NFSIC, we set the number of test lo-
cations J " 5; the number of Fourier features (RFF-HSIC)
n. The num-
and Nyström samples (N-HSIC) is set to
ber of Nyström samples of N-MHSIC is indicated within
the experiment description. The opaque area in the figures
indicates the 0.95-quantile obtained over 5 runs. All experi-
ments were performed on a PC with Ubuntu 20.04, 124GB
RAM, and 32 cores with 2GHz each.
?
5.1 SYNTHETIC DATA
We examine three toy problems in the following, illustrating
runtime and statistical power.
N
i.i.d.„
Comparison of HSIC approximations under H0. First,
for M " 2 components, we compare our proposed method
to the existing accelerated HSIC estimators (N-HSIC, RFF-
HSIC) on independent data to assess convergence w.r.t. run-
time. Specifically, we set X1, X2
p0, 1q. The theoreti-
cal value of HSIC is thus zero. Figure 1 shows the estimates
for sample sizes from 100 to 1000; the number of Nyström
samples for N-MHSIC is set to n1 " 2
n. All approaches
converge to zero, with N-MHSIC converging a bit slower
than the exisiting HSIC approximations. However, we note
that the gap is on the order of 10 ́3 so it is close to the theo-
retical value also for small sample sizes. The runtime scales
as predicted by the complexity analysis, with the proposed
approach running faster than both N-HSIC and RFF-HSIC
starting from n " 500 samples.
?
Dependent Data (H1 holds). To evaluate the statistical
power on M " 2 components, we set X1 „
p0, 1q, X2 "
p0, 1q, with n1 set as before. Figure 2
X1 ` ε, and ε „
shows that N-MHSIC achieves a power of one for n «
N
N
20040060080010000.0000.0050.010Estimate20040060080010000.000.010.020.030.04Runtime(s)Numberofsamples(n)N-MHSICN-HSICRFF-HSICFigure 2: Power on dependent data. Runtime on log scale.
Figure 3: Ratio of correctly identified DAGs with 4 nodes.
100 and that it is slightly worse than the existing HSIC
approximations for small sample sizes. V-HSIC has the
highest power but also the highest runtime. Even though
NFSIC has linear runtime complexity it is slower than all
other statistics on small sample sizes.
Causal Discovery. The experiments until now considered
M " 2 components. However, N-MHSIC allows for han-
dling M ě 2 components and thus can estimate the directed
acyclic graph (DAG) governing causality if one assumes an
additive noise model.
Specifically, we sample from the structural equations Xi "
ř
jPPAi f i,j pXjq ` εi for i P rM s, of a randomly selected
fully connected DAG with four nodes (M " 4), of which
there are 24. In the equation, PAi denotes the parents of i in
the associated DAG, and the εi are normally distributed and
jointly independent, with a variance sampled independently
from the uniform distribution
̆
2
?
1,
`
.
U
To now test whether a particular DAG fits the data, Pfister
et al. [2018] propose to use generalized additive model
regression to find the residuals when regressing each node
onto all its parents and to reject the DAG if the residuals are
not jointly independent. If these are independent, we accept
the causal structure. In this application, one is only interested
in the relative p-values when performing the procedure for
all possible DAGs with the correct number of nodes.
V-HSIC has the best performance in [Pfister et al., 2018], so
we only compare against V-HSIC; it is also the only other
approach which allows testing joint independence of more
than two components. Figure 3 shows how often N-MHSIC
and V-HSIC identify the correct DAG in 100 samples. V-
HSIC has higher power than N-MHSIC and more often
identifies the correct DAG for small sample sizes. However,
as the r.h.s. of Figure 3 shows, the proposed algorithm runs
even for n1 " 8
n and n " 1500 twice as fast as V-
HSIC while producing the same result quality. Due to their
different runtime complexities, the gap in runtime widens
further with increasing sample size.
?
5.2 REAL-WORLD DATA
This section is dedicated to benchmarks on real-world data.
Figure 4: Test power vs. runtime on the Million Song Data.
Million Song Data. The Million Song Data [Bertin-
Mahieux et al., 2011] contains approximately 500,000 songs.
Each has 90 features (X) together with its year of release,
which ranges from 1922 to 2011 (Y ). The algorithms must
detect the dependence between the features and the year
of release. To approximate the power, we draw 100 inde-
pendent samples of the whole data set. Figure 4 shows the
results, for level α " 0.01; the different ranges of n high-
light the asymptotic runtime gains. In contrast to a similar
experiment of Jitkrittum et al. [2017], we use a permutation
approach for all two-sample tests and increase the number
of Nyström samples (random Fourier features) as a function
of n, obtaining higher power throughout. The problem is
sufficiently challenging, so that we set the number of Nys-
tröm samples to 8
n for N-MHSIC. V-HSIC and NFSIC
achieve maximum power from n " 500. N-MHSIC features
similar runtime and power as the existing HSIC approxi-
mations N-HSIC and RFF-HSIC but can handle more than
two components. The runtime plot illustrates that the lower
asymptotic complexity of N-MHSIC compared to V-HSIC
also holds in practice.
?
Weather Causal Discovery. Here, we aim to infer the
correct causality DAG from real-world data, namely the data
set of Mooij et al. [2016] which contains 349 measurements
consisting of altitude, temperature and sunshine. The goal
is to infer the most plausible DAG with three nodes pd " 3q
out of the 25 possible DAGs (33 ́2 " 25; two graphs have a
cycle). We assume the structural equations discussed before.
Figure 5 shows the p-values with the estimated DAG (with
index 25) having the largest p-value. Again, we compare our
results to V-HSIC and find that both successfully identify
the most plausible DAG [Pfister et al., 2018].
02004000.000.250.500.751.00Power020040010−1100101102Runtime(s)Numberofsamples(n)N-MHSICNFSICN-HSICRFF-HSICV-HSIC5007501000125015000.20.40.60.81.0RatioofcorrectDAGs5007501000125015000100020003000Runtime(s)Numberofsamples(n)1√n2√n4√n8√nV-HSIC05001000150020000.000.250.500.751.00Power02000400060008000100101102103Runtime(s)Numberofsamples(n)N-MHSICNFSICN-HSICRFF-HSICV-HSICFigure 5: Testing for joint independence on the residuals of
DAGs with three nodes (left) and the DAG with the largest
p-value (right). The p-values agree on DAGs 1 to 24.
These experiments demonstrate the efficiency of the pro-
posed Nyström M -HSIC method.
510152025DAG10−2p-valueN-MHSICV-HSICAltitudeSunshineTemperatureA APPENDIX
Section A.1 contains two external theorems and lemmas that we use. Section A.2 is about our proofs.
A.1 EXTERNAL THEOREMS AND LEMMAS
In this section two theorems and lemmas are recalled for self-completeness, Theorem A.1 is about bounding the error
of Nyström mean embeddings [Chatalic et al., 2022, Theorem 4.1], Theorem A.2 is a well-known result [Serfling, 1980,
Section 5.6, Theorem A] for bounding the deviation of U-statistics. Lemma A.1 is about connection between U- and
V-statistics. Lemma A.2 recalls Markov's inequality.
Theorem A.1 (Bound on mean embeddings). Let
be a locally compact second-countable topological space, X a random
Ñ R,
with Borel probability measure P, and let
variable supported on
X
X
kpx, xq ď K. Let Ck "
and feature map φk. Assume that there exists a constant K P p0, 8q such that supxPX
E rφkpXq b φkpXqs. Furthermore, assume that the data points ˆPn " tx1, . . . , xnu are drawn i.i.d. from the distribution P
and that n1 ď n subsamples ̃Pn1 " t ̃x1, . . . , ̃xn1u are drawn uniformly with replacement from the dataset ˆPn. Then for any
δ P p0, 1q it holds that
k be a RKHS on
with kernel k :
a
H
ˆ
X
X
X
›
›
›μk pPq ́ μk
́
̃Pn1
̄›
›
›
Hk
ď
c1?
n
`
c2
n1 `
a
c3
logpn1{δq
d
ˆ
n1
X
N
12K 2 logpn1{δq
n1
̇
,
with probability at least 1 ́ δ provided that
n1 ě max
́
67, 12K 2 }Ck} ́1
op
̄
log
ˆ
̇
,
n1
δ
a
where c1 " 2K
2 logp6{δq, c2 " 4
?
3K logp12{δq, and c3 " 12
3 logp12{δqK.
a
Recall that a U-statistic is the average of a (symmetric) core function h " hpx1, . . . , xmq over the observations
X1, . . . , Xn „ P (n ě m) with form
`
n
m
Un " U pX1, . . . , Xmq "
̆
1`
n
m
ÿ
c
̆
hpXi1, . . . , Ximq,
(21)
combinations of m distinct elements ti1, . . . , imu from t1, . . . , nu. Un is an unbiased estimator
where c is the set of the
of θ " θpPq " EPrhpX1, . . . , Xmqs.
Theorem A.2 (Hoeffding's inequality for U-statistics). Let h " hpx1, . . . , xmq be a core function for θ " θpPq "
EP rhpX1, . . . , Xmqs with a ď hpx1, . . . , xmq ď b. Then, for any u ą 0 and n ě m,
ˆ
PpUn ́ θ ě uq ď exp
́
̇
.
2nu2
mpb ́ aq2
Similar to (21) one can consider an alternative (slightly biased) estimator of θ, which is called V-statistic:
Vn " V pX1, . . . , Xmq "
1
nm
ÿ
pi1,...,imqPTmpnq
hpXi1 , . . . , Xim q,
(22)
where Tmpnq is the m-fold Cartesian product of the set rns.
There is a close relation between U- and V-statistics, as it is made explicit by the following lemma [Serfling, 1980,
Lemma, Section 5.7.3].
i.i.d.„
Lemma A.1 (Connection between U- and V-statistics). Let P be a probability measure on a metric space
P. Let m denote any element of rns. Let h be a core function satisfying E r|hpX1, . . . , Xmq|rs ă 8 with some r P Z`. Let
Un and Vn denote the U and V-statistic associated to h as defined in (21) and (22), respectively. Then it holds that
. Let pXiqiPrns
X
E r|Un ́ Vn|rs "
O
`
̆
n ́r
.
Lemma A.2 (Markov inequality). For a real-valued random variable X with probability distribution P and a ą 0, it holds
that
A.2 PROOFS
P p|X| ě aq ď
E p|X|q
a
.
This section is dedicated to proofs. Lemma 4.2 is derived in Section A.2.1. Proposition 4.1 is proved in Section A.2.3 relying
on two lemmas shown in Section A.2.2. Lemma 4.4 is proved in Section A.2.5, with an auxiliary result in Section A.2.4.
A.2.1 Proof of Lemma 4.2
̄
́
̃Pn1
"
Let μk
ř
HSIC2
k,N
n1
i"1 αi
̄
́
ˆPn
̄
"
k bM
m"1 φkm pxi
›
́
›
̃Pn1
›μk
̄›
›
́
›
›
2
̃Pn1
›
›μk
looooooomooooooon
Hk
"
mq, and let μkm
́ bM
m"1μkm
A
́
̄
̃Pm,n1
̄›
›
2
›
Hk
́
̃Pm,n1
́
̄
̃Pn1
́2 ̈
μk
m"1μkm
loooooooooooooooooooooomoooooooooooooooooooooon
Hk
, bM
̄E
́
̃Pm,n1
́
̄›
›
›
›
2
›bM
›
loooooooooooooomoooooooooooooon
Hk
m"1μkm
̃Pm,n1
,
`
ř
"
n1
i"1 αi
km φkm pxi
mq for m P rM s. We write
":A
":C
":B
and continue term-by-term. Using the definition of the tensor product, we have for term A that
n1ÿ
̄E
n1ÿ
n1ÿ
A
̄
́
"
Hk
i"1
j"1
@
bM
kαj
αi
k
m"1φkmpxi
mq, bM
m"1φkm pxj
D
mq
"
Hk
Mź
n1ÿ
kαj
αi
k
kmpxi
m, xj
mq
i"1
j"1
m"1
A "
μk
, μk
̃Pn1
́
̃Pn1
`
" αT
k
̋M
m"1 Kkm
̆
αk.
Similarly, we obtain for term B that
A
B "
bM
m"1μkm
C
́
̄
̃Pm,n1
̄E
́
̃Pm,n1
, bM
m"1μkm
́
̄
"
bM
m"1
αipmq
km φkm
xipmq
m
, bM
m"1
n1ÿ
ipmq"1
Mź
n1ÿ
n1ÿ
p ̊q
"
m"1
ipmq"1
jpmq"1
́
km αjpmq
αipmq
km km
xipmq
m , xjpmq
m
"
Hk
n1ÿ
jpmq"1
̄
G
̄
́
xjpmq
m
αjpmq
km φkm
Hk
Mź
m"1
αT
km
Kkmαkm,
where in p ̊q we used (1), the linearity of the inner product, and the reproducing property.
Last, we express term C as
C "
C
n1ÿ
i"1
̆
̆
`
xi
m
`
xi
m
, bM
m"1
, bM
m"1
n1ÿ
jpmq"1
n1ÿ
jpmq"1
k bM
αi
m"1 φkm
C
αi
k
bM
m"1φkm
C
ź
`
̆
,
xi
m
φkm
n1ÿ
αjpmq
km φkm
αjpmq
km φkm
αjpmq
km φkm
́
xjpmq
m
́
xjpmq
m
G
̄
Hk
G
̄
Hk
G
̄
́
xjpmq
m
mPrM s
jpmq"1
ź
n1ÿ
A
φkm
̆
`
xi
m
αjpmq
km
́
̄E
, φkm
xjpmq
m
Hk
Hk
mPrM s
ź
jpmq"1
n1ÿ
́
m, xjpmq
xi
loooooooooooooooomoooooooooooooooon
jpmq"1
αjpmq
km km
̄
m
pKkm qiαkm
i"1
mPrM s
`
" αT
k
̋M
m"1 Kkmαkm
̆
,
n1ÿ
i"1
n1ÿ
i"1
n1ÿ
i"1
n1ÿ
paq
"
pbq
"
pcq
"
pdq
"
αi
k
αi
k
αi
k
where (a) follows from the linearity of the inner product, (b) holds by (1), (c) is implied by the linearity of the inner product,
(d) is valid by the reproducing property, and we refer to the i-th row of Kkm as pKkmqi.
Substituting terms A, B, and C concludes the proof.
A.2.2 Two Lemmas to the Proof of Proposition 4.1
Our main result relies on two lemmas.
`
1 p
q, and p
m"1 P
mqmPrM s locally compact, second-countable topological spaces. Let km :
Lemma A.3 (Error bound for Nyström mean embedding of tensor product kernel). Let X " pXmqM
X „ P P
be a bounded kernel, i.e. there exists akm P p0, 8q such that supxmPXm
k the RKHS associated to k, φk " bM
ak "
H
and ̃Pn1 defined according to (14). Then for any δ P p0, 1q it holds that
m,
m"1X
m Ñ R
X
kmpxm, xmq ď akm for m P rM s. Let
m"1φkm, Ck " E rφkpXq b φkpXqs, n1 ď n,
m"1 akm, k " bM
X
m ˆ
X
m"1km,
" ˆM
M
a
ś
X
X
M
›
›
›μk pPq ́ μk
́
̃Pn1
̄›
›
›
Hk
ď
ck,1?
n
`
ck,2
n1 `
a
ck,3
logpn1{δq
n1
d
ˆ
X
N
12a2
k logpn1{δq
n1
̇
,
with probability at least 1 ́ δ, provided that
́
n1 ě max
67, 12a2
k }Ck} ́1
op
ˆ
̇
,
n1
δ
̄
log
a
where ck,1 " 2ak
2 logp6{δq, ck,2 " 4
3ak logp12{δq, and ck,3 " 12
3 logp12{δqak.
a
?
Proof. With
Theorem 16.2(c), Theorem 18.6],
statement is implied by Theorem A.1.
" ˆmPrM sX
m, noticing that
k " bM
H
X
X
m"1H
is locally compact second-countable iff. p
kpx, xq "
m"1φkm, and
km , φk " bM
a
ś
X
a
mqmPrM s are so [Willard, 1970,
M
kmpxm, xmq ď ak, the
m"1
Proof of Lemma 4.3. To simplify notation, let μkm " μkm pPmq, ̃μkm " μkm
̄
́
̃Pm,n1
,
}μkm ́ ̃μkm}Hkm
satisfied, and we assume that the statement holds for M " M ́ 1, to obtain
. The proof proceeds by induction on M : For M " 1 the l.h.s. = r.h.s. =
k " bM
m"1H
›
H
›
›μk1 pP1q ́ μk1
km , and dkm "
́
̃P1,n1
̄›
›
›
Hk
is
m"1 μkm b ̃μkM ́ bM
m"1 ̃μkm
›
›
Hk
›
›
bM
m"1 ̃μkm
›
›
Hk
›
›
"
"
m"1μkm ́ bM
›
›
bM ́1
›
›bM ́1
̈
paq
ď
m"1 μkm b pμkM ́ ̃μkM q `
›
›
m"1 μkm b pμkM ́ ̃μkM q
Hk
̨
bM
`
m"1 μkm ́ bM ́1
bM ́1
m"1 μkm ́ bM ́1
›
`
›
m"1 μkm b ̃μkM ` bM ́1
›
›
m"1 ̃μkm
Hk
b ̃μkM
̆
̆
m"1 ̃μkm
b ̃μkM
›
›
Hk
`
bM ́1
m"1 μkm ́ bM ́1
›
›
m"1 μkm ́ bM ́1
m"1 ̃μkm
›
›
bM ́1
}μkm}Hkm
‚dkM `
ź
̋
pbq
"
mPrM ́1s
ź
pcq
ď dkM
pdq
ď dkM
mPrM ́1s
ź
mPrM ́1s
ź
›
›
bM ́1
m"1 μkm ́ bM ́1
m"1 ̃μkm
›
›
bM ́1
m"1 Hkm
ź
bM ́1
m"1 Hkm
} ̃μkM }HkM
pakM ` dkM q
,
.
- pakM ` dkM q
ź
pakm ` dkmq ́
akm
mPrM ́1s
ź
akm `
akm `
$
&
ź
%
ź
mPrM ́1s
" dkM
akm `
pakm ` dkm q ́
akm ́ dkM
akm
mPrM ́1s
ź
mPrM s
ź
"
pakm ` dkm q ́
akm ,
mPrM s
mPrM s
mPrM s
mPrM ́1s
where (a) holds by the triangle inequality, (b) is implied by (2) and the definition of dkM , (c) follows from
}μkm}Hkm
"
›
ż
›
›
›
Xm
kmp ̈, xmqdPmpxmq
›
›
›
›
Hkm
ż
peq
ď
Xm
}kmp ̈, xmq}Hkm
loooooooomoooooooon
?
kmpxm,xmq
pgq
ď akm
pf q
"
dPmpxmq ď akm,
(23)
} ̃μkM }HkM
" } ̃μkM ́ μkM ` μkM }HkM
phq
ď } ̃μkM ́ μkM }HkM
` }μkM }HkM
piq
ď dkM ` akM ,
(d) is valid by the induction statement holding for M ́ 1, (e) is a property of Bochner integrals, (f) is implied by the
reproducing property, (g) comes from the definition of akm , the triangle inequality implies (h), (i) follows from (23) and the
definition of dkM .
A.2.3 Proof of Proposition 4.1
m"1km, and let
k " bM
mqmPrM s are so [Willard, 1970, Theorem 16.2(c), Theorem 18.6].
Let k " bM
p
X
We decompose the error of the Nyström approximation as
km . We note that
m"1H
H
X
" ˆmPrM sX
m is locally compact second-countable as
ˇ
ˇ
ˇHSICkpPq ́ HSICk,N
́
ˆPn
̄ˇ
ˇ
ˇ "
ˇ
ˇ
ˇ
ˇ
›
›
m"1μkmpPmq
Hk
›
›μkpPq ́ bM
›
›
›μkpPq ́ bM
m"1μkm pPmq ́ μk
̄›
›
́
›
›
̃Pn1
›μkpPq ́ μk
›
looooooooooooomooooooooooooon
Hk
`
paq
ď
pbq
ď
›
›
›μk
́
́
̄
̃Pn1
́
̄
́ bM
m"1μkm
́
̃Pn1
` bM
m"1μkm
ˇ
ˇ
ˇ
ˇ
̄›
›
›
Hk
́
̃Pm,n1
̄›
›
›
Hk
̃Pm,n1
́
̃Pm,n1
̄›
›
›
›
›bM
›
loooooooooooooooooooooooooomoooooooooooooooooooooooooon
Hk
m"1μkmpPmq ́ bM
m"1μkm
,
t1
t2
where (a) holds by the reverse triangle inequality, and (b) follows from the triangle inequality.
First term (t1): One can bound the error of the first term by Lemma A.3; in other words, for any δ P p0, 1q with probability
at least p1 ́ δq it holds that
›
›
›μkpPq ́ μk
́
̃Pn1
̄›
›
›
Hk
ď
ck,1?
n
́
ck,3
ck,2
n1 `
̄
́
`
̄
a
logpn1{δq
n1
̃
g
f
f
e
N
Xm
̧
12a2
km logpn1{δq
n1
a
provided that n1 ě max
a
?
4
3ak logp12{δq, ck,3 " 12
67, 12a2
k }Ck} ́1
op
log
n1
δ
3 logp12{δqak.
, with the constants ck,1 " 2ak
2 logp6{δq, ck,2 "
Second term (t2): Applying Lemma 4.3 to the second term gives
›
›
›bM
m"1μkm pPmq ́ bM
m"1μkm
́
̃Pm,n1
̄›
›
›
Hk
ď
ˆ
ź
mPrM s
›
›
›μkm pPmq ́ μkm
́
̃Pm,n1
akm `
̇
̄›
›
›
Hkm
́
ź
mPrM s
akm.
We now bound the error of each of the M factors by Theorem A.1, i.e., for fixed m P rM s; particularly we get that for any
δ P p0, 1q with probability at least 1 ́ δ
›
›
›μkm pPmq ́ μkm
́
̃Pm,n1
›
›
›μkm pPmq ́ μkm
́
̃Pm,n1
akm `
̄›
›
›
Hkm
̄›
›
›
Hkm
ď
ckm,1?
n
`
ckm,2
n1 `
ckm,3
logpn1{δq
n1
a
g
f
f
e
N
̃
Xm
ď akm `
ckm,1?
n
`
ckm,2
n1 `
ckm,3
logpn1{δq
n1
a
̧
, hence
12a2
km logpn1{δq
n1
̃
g
f
f
e
Xm
N
12a2
km logpn1{δq
n1
̧
,
and by union bound that their product is for any δ P p0, 1
„
ź
›
›
›μkm pPmq ́ μkm
́
akm `
̃Pm,n1
ȷ
M q with probability at least 1 ́ M δ
̄›
›
›
Hkm
ď
mPrM s
«
ź
ď
akm `
mPrM s
a
ckm,1?
n
`
ckm,2
n1 `
ckm,3
logpn1{δq
n1
g
f
f
e
̃
12a2
km logpn1{δq
n1
Xm
N
̧ff
,
„
ź
mPrM s
›
›
›μkm pPmq ́ μkm
́
̃Pm,n1
akm `
«
ź
ď
akm `
mPrM s
́
ckm,1?
n
`
ckm,2
n1 `
̄
ȷ
̄›
›
›
Hkm
́
ź
mPrM s
a
ckm,3
logpn1{δq
n1
̄
́
n1
δ
akm ď
g
f
f
e
Xm
N
̃
12a2
km logpn1{δq
n1
̧ff
ź
́
akm ,
mPrM s
provided that n1 ě max
constants ckm,1 " 2akm
a
67, 12a2
km }Ckm} ́1
2 logp6{δq, ckm,2 " 4
op
log
?
for all m P rM s, with Ckm " E rφkm pXmq b φkm pXmqs and
a
3akm logp12{δq, ckm,3 " 12
3 logp12{δqakm, with m P rM s.
Combining the M ` 1 terms by union bound yields the stated result.
A.2.4 Lemma to the Proof of Lemma 4.4
Lemma A.4 (Deviation bound for U-statistics based HSIC estimator). It holds that
̇
ˆ
ˇ
ˇ
ˇHSIC2
k,u
̄
́
ˆPn
́ HSIC2
ˇ
ˇ
k pPq
ˇ "
1
?
n
,
OP
where HSIC2
k,u is the U-statistic based estimator of HSIC2
k.
Proof. We show that (3) can be expressed as a sum of U-statistics and then bound the terms individually. First, square (3) to
obtain
»
fi
»
fi
HSIC2
kpPq " E
px1,...,xM q,px1
1,...,x1
M q„P
ź
–
`
km
xm, x1
m
̆
fl
` Ex1,x1
1„P1,...,xM ,x1
M „PM
ź
–
`
km
xm, x1
m
̆
fl
loooooooooooooooooooooooooooooomoooooooooooooooooooooooooooooon
mPrM s
loooooooooooooooooooooooooooooomoooooooooooooooooooooooooooooon
mPrM s
A
»
fi
B
́ 2 E
px1,...,xM q„P,x1
,
M „PM
looooooooooooooooooooooooooooooooomooooooooooooooooooooooooooooooooon
1„P1,...,x1
mPrM s
mq
kmpxm, x1
fl
ź
–
C
where A, B, and C can be estimated by U-statistics A1
and split t as αt ` βt ` p1 ́ α ́ βqt, with α, β ą 0 and α ` β ă 1. One obtains
n, and C 1
n, B1
n, respectively. Let HSIC2
k,u
́ˇ
ˇ
ˇHSIC2
P
kpPq ́ HSIC2
k,u
́
ˆPn
̄ˇ
ˇ
ˇ ě t
̄
`ˇ
ˇA ́ A1
n
ˇ
̆
ˇ ě αt
` P
`ˇ
ˇB ́ B1
n
ˇ
̆
ˇ ě βt
`
` P
2
ˇ
ˇC ́ C 1
n
ˇ
̆
ˇ ě p1 ́ α ́ βqt
.
ď P
̄
́
ˆPn
" A1
n ` B1
n ́ 2C 1
n,
Doubling and rewriting Theorem A.2, we have that for U-statistics and any δ P p0, 1q
̈
̨
d
P
̋|Un ́ θ| ě
mpb ́ aq2 lnp 2
δ q
2n
‚ď δ.
́
̄
Now, choosing the pθ, Un, uq triplet to be pA, A1
n, βtq,
observing that a ď kpx, yq ď b as k is bounded, we obtain that |A1
in probability and so is their sum.
n, αtq, pB, B1
n, p1 ́α ́βqt
C, C 1
2
?
n, |B1
n ́ B|
n ́ A|
, respectively, setting m " 2M , and
?
n are bounded
n, and |C 1
n ́ C|
?
A.2.5 Proof of Lemma 4.4
We consider the decomposition
ˇ
ˇ
ˇHSIC2
k
́
ˆPn
̄
́ HSIC2
ˇ
ˇ
k pPq
ˇ ď
̄
̄ˇ
ˇ
ˇ
ˇ
ˇHSIC2
ˇ
k
looooooooooooooooooomooooooooooooooooooon
́ HSIC2
́
ˆPn
ˆPn
k,u
́
ˇ
ˇ
ˇ
ˇ
ˇHSIC2
k pPq
ˇ
,
loooooooooooooooooomoooooooooooooooooon
́ HSIC2
́
ˆPn
k,u
̄
`
t1
t2
by using the triangle inequality, where HSICk,u is the U-statistic based HSIC estimator.
́
̄
Second term (t2): Lemma A.4 establishes that t2 "
1?
n
.
OP
First term (t1): To bound t1, first, by Markov's inequality (Lemma A.2) observe that
́ˇ
ˇ
ˇHSIC2
k
́
ˆPn
̄
P
́ HSIC2
k,u
́
ˆPn
̄ˇ
̄
ˇ
ˇ ě a
ď
́ˇ
ˇ
ˇHSIC2
k
̄
́
ˆPn
E
́ HSIC2
k,u
,
looooooooooooooooooooooomooooooooooooooooooooooon
a
":ε
̈
̋
P
̈
̋
P
ˇ
ˇ
ˇHSIC2
k
ˇ
ˇ
ˇHSIC2
k
́
̄
́
ˆPn
́ HSIC2
k,u
ˆPn
́
̄
́
ˆPn
́ HSIC2
k,u
ˆPn
̄ˇ
ˇ
ˇ ě
̄ˇ
ˇ
ˇ ă
̄
̨
́ˇ
ˇ
ˇHSIC2
k
́
ˆPn
̄
E
́ HSIC2
k,u
ε
́ˇ
ˇ
ˇHSIC2
k
́
ˆPn
̄
E
́ HSIC2
k,u
́
ˆPn
̄ˇ
ˇ
ˇ
́
ˆPn
̄ˇ
ˇ
ˇ
‚ď ε,
̄
̨
‚ě 1 ́ ε,
(24)
́
̄
̄ˇ
ˇ
ˇ
ˆPn
ˆˇ
ˇ
ˇHSIC2
k
ˆˇ
ˇ
ˇHSIC2
k
P
P
́
́
ε
́ HSIC2
k,u
ˆPn
̄
̄
ˆPn
́ HSIC2
k,u
́
ˆPn
́
ˆPn
̄ˇ
ˇ
ˇ ă
̄ˇ
ˇ
ˇ ě
̇
̇
C
nε
C
nε
p ̊q
ě 1 ́ ε,
ď ε,
(25)
for constant C ą 0 and n large enough, where p ̊q follows from Lemma A.1 (with r " 1). (25) implies that
ˇ
ˇ
ˇHSIC2
k
́
̄
ˆPn
́ HSIC2
k,u
́
ˆPn
̄ˇ
ˇ
ˇ "
ˆ
̇
.
1
n
OP
Combining the terms (t1 ` t2): Combining the obtained results for the two terms, one gets that
̄
̄
̄
́
́
ˇ
ˇ
ˇHSIC2
k
́
ˆPn
́ HSIC2
k pPq
ˇ
ˇ
ˇ
(24)
ď
ˇ
ˇ
ˇHSIC2
k
̇
ˆ
"
OP
1
n
ˆPn
`
OP
́ HSIC2
̇
ˆ
k,u
̄ˇ
ˇ
ˇ `
ˇ
ˇ
ˇHSIC2
̇
ˆPn
ˆ
k,u
́
ˆPn
́ HSIC2
k pPq
ˇ
ˇ
ˇ
1
?
n
"
OP
1
?
n
.
(26)
Hence
ˆ
̇
1
?
n
OP
ˇ
ˇ
ˇHSIC2
k
(26)
ě
́
̄
ˆPn
́ HSIC2
ˇ
ˇ
k pPq
ˇ "
ˇ
ˇ
ˇHSICk
́
ˆPn
̄
́ HSICk pPq
ˇ
ˇ
ˇ
̄
ˇ
́
ˇ
ˆPn
ˇ HSICk
loooooomoooooon
` HSICk pPq
loooomoooon
ˇ
ˇ
ˇ
ˇ
ˇ
ˇHSICk
́
ˆPn
̄
ě
́ HSICk pPq
ˇ
ˇ
ˇ HSICk pPq ,
which by dividing with the constant HSICk pPq ą 0 implies the statement.
Acknowledgements
(5)
ě0
ě0
This work was supported by the German Research Foundation (DFG) Research Training Group GRK 2153: Energy Status
Data - Informatics Methods for its Collection, Analysis and Exploitation. The major part of this work was carried out
while Florian Kalinke was a research associate at the Department of Statistics, London School of Economics.
References
Mélisande Albert, Béatrice Laurent, Amandine Marrel, and Anouar Meynaoui. Adaptive test of independence based on
HSIC measures. The Annals of Statistics, 50(2):858–879, 2022.
Nachman Aronszajn. Theory of reproducing kernels. Transactions of the American Mathematical Society, 68:337–404,
1950.
Alain Berlinet and Christine Thomas-Agnan. Reproducing Kernel Hilbert Spaces in Probability and Statistics. Kluwer,
2004.
Thierry Bertin-Mahieux, Daniel P. W. Ellis, Brian Whitman, and Paul Lamere. The million song dataset. In International
Society for Music Information Retrieval Conference (ISMIR), pages 591–596, 2011.
Karsten Borgwardt, Elisabetta Ghisu, Felipe Llinares-López, Leslie O'Bray, and Bastian Riec. Graph kernels: State-of-the-art
and future challenges. Foundations and Trends in Machine Learning, 13(5-6):531–712, 2020.
Dimitri Bouche, Rémi Flamary, Florence d'Alché Buc, Riwal Plougonven, Marianne Clausel, Jordi Badosa, and Philippe
Drobinski. Wind power predictions from nowcasts to 4-hour forecasts: a learning approach with variable selection.
Renewable Energy, 2023.
Gustavo Camps-Valls, Joris M. Mooij, and Bernhard Schölkopf. Remote sensing feature selection by kernel dependence
measures. IEEE Geoscience and Remote Sensing Letters, 7(3):587–591, 2010.
Shubhadeep Chakraborty and Xianyang Zhang. Distance metrics for measuring joint dependence with application to causal
inference. Journal of the American Statistical Association, 114(528):1638–1650, 2019.
Antoine Chatalic, Nicolas Schreuder, Alessandro Rudi, and Lorenzo Rosasco. Nyström kernel mean embeddings. In
International Conference on Machine Learning (ICML), pages 3006–3024, 2022.
Kacper Chwialkowski, Aaditya Ramdas, Dino Sejdinovic, and Arthur Gretton. Fast two-sample testing with analytic
representations of probability measures. In Advances in Neural Information Processing Systems (NIPS), pages 1972–1980,
2015.
Héctor Climente-González, Chloé-Agathe Azencott, Samuel Kaski, and Makoto Yamada. Block HSIC Lasso: model-free
biomarker detection for ultra-high dimensional data. Bioinformatics, 35(14):i427–i435, 2019.
Kenji Fukumizu, Arthur Gretton, Xiaohai Sun, and Bernhard Schölkopf. Kernel measures of conditional dependence. In
Advances in Neural Information Processing Systems (NIPS), pages 498–496, 2008.
Thomas Gärtner, Peter Flach, Adam Kowalczyk, and Alexander Smola. Multi-instance kernels. In International Conference
on Machine Learning (ICML), pages 179–186, 2002.
Arthur Gretton, Olivier Bousquet, Alex Smola, and Bernhard Schölkopf. Measuring statistical dependence with Hilbert-
Schmidt norms. In Algorithmic Learning Theory (ALT), pages 63–78, 2005.
Arthur Gretton, Kenji Fukumizu, Choon Hui Teo, Le Song, Bernhard Schölkopf, and Alexander Smola. A kernel statistical
test of independence. In Advances in Neural Information Processing Systems (NIPS), pages 585–592, 2008.
Arthur Gretton, Karsten Borgwardt, Malte Rasch, Bernhard Schölkopf, and Alexander Smola. A kernel two-sample test.
Journal of Machine Learning Research, pages 723–773, 2012.
Jorge Guevara, Roberto Hirata, and Stéphane Canu. Cross product kernels for fuzzy set similarity.
In International
Conference on Fuzzy Systems (FUZZ-IEEE), pages 1–6, 2017.
Omar Hagrass, Bharath K Sriperumbudur, and Bing Li. Spectral regularized kernel two-sample tests. Technical report,
2022. (https://arxiv.org/abs/2212.09201).
David Haussler. Convolution kernels on discrete structures. Technical report, University of California at Santa Cruz, 1999.
(http://cbse.soe.ucsc.edu/sites/default/files/convolutions.pdf).
Zhen Huang, Nabarun Deb, and Bodhisattva Sen. Kernel partial correlation coefficient – a measure of conditional dependence.
Journal of Machine Learning Research, 23(216):1–58, 2022.
Yunlong Jiao and Jean-Philippe Vert. The Kendall and Mallows kernels for permutations. In International Conference on
Machine Learning (ICML), pages 2982–2990, 2016.
Wittawat Jitkrittum, Zoltán Szabó, Kacper Chwialkowski, and Arthur Gretton. Interpretable distribution features with
maximum testing power. In Advances in Neural Information Processing Systems (NIPS), pages 181–189, 2016.
Wittawat Jitkrittum, Zoltán Szabó, and Arthur Gretton. An adaptive test of independence with analytic kernel embeddings.
In International Conference on Machine Learning (ICML), pages 1742–1751, 2017.
Franz J. Király and Harald Oberhauser. Kernels for sequentially ordered data. Journal of Machine Learning Research, 20:
1–45, 2019.
Feng Liu, Wenkai Xu, Jie Liu, Guangquan Zhang, Arthur Gretton, and Danica J. Sutherland. Learning deep kernels for
non-parametric two-sample tests. In International Conference on Machine Learning (ICML), pages 6316–6326, 2020.
Huma Lodhi, Craig Saunders, John Shawe-Taylor, Nello Cristianini, and Chris Watkins. Text classification using string
kernels. Journal of Machine Learning Research, 2:419–444, 2002.
Russell Lyons. Distance covariance in metric spaces. The Annals of Probability, 41:3284–3305, 2013.
Charles Micchelli, Yuesheng Xu, and Haizhang Zhang. Universal kernels. Journal of Machine Learning Research, 7:
2651–2667, 2006.
Joris Mooij, Jonas Peters, Dominik Janzing, Jakob Zscheischler, and Bernhard Schölkopf. Distinguishing cause from effect
using observational data: Methods and benchmarks. Journal of Machine Learning Research, 17:1–102, 2016.
Alfred Müller. Integral probability metrics and their generating classes of functions. Advances in Applied Probability, 29:
429–443, 1997.
Niklas Pfister, Peter Bühlmann, Bernhard Schölkopf, and Jonas Peters. Kernel-based tests for joint independence. Journal
of the Royal Statistical Society: Series B (Statistical Methodology), pages 5–31, 2018.
Novi Quadrianto, Le Song, and Alex Smola. Kernelized sorting. In Advances in Neural Information Processing Systems
(NIPS), pages 1289–1296, 2009.
Ali Rahimi and Benjamin Recht. Random features for large-scale kernel machines. In Advances in Neural Information
Processing Systems (NIPS), pages 1177–1184, 2007.
Bernhard Schölkopf and Alexander Smola. Learning with Kernels: Support Vector Machines, Regularization, Optimization,
and Beyond. MIT Press, 2002.
Bernhard Schölkopf, Francesco Locatello, Stefan Bauer, Nan Rosemary Ke, Nal Kalchbrenner, Anirudh Goyal, and Yoshua
Bengio. Toward causal representation learning. Proceedings of the IEEE, 109(5):612–634, 2021.
Antonin Schrab, Ilmun Kim, Benjamin Guedj, and Arthur Gretton. Efficient aggregated kernel tests using incomplete
U-statistics. In Advances in Neural Information Processing Systems (NIPS), pages 18793–18807, 2022.
Dino Sejdinovic, Arthur Gretton, and Wicher Bergsma. A kernel test for three-variable interactions. In Advances in Neural
Information Processing Systems (NIPS), pages 1124–1132, 2013a.
Dino Sejdinovic, Bharath Sriperumbudur, Arthur Gretton, and Kenji Fukumizu. Equivalence of distance-based and
RKHS-based statistics in hypothesis testing. Annals of Statistics, 41:2263–2291, 2013b.
Robert J. Serfling. Approximation theorems of mathematical statistics. John Wiley & Sons, 1980.
Tianhong Sheng and Bharath K. Sriperumbudur. On distance and kernel measures of conditional independence. Journal of
Machine Learning Research, 24(7):1–16, 2023.
Alexander Smola, Arthur Gretton, Le Song, and Bernhard Schölkopf. A Hilbert space embedding for distributions. In
Algorithmic Learning Theory (ALT), pages 13–31, 2007.
Le Song, Alexander J. Smola, Arthur Gretton, and Karsten M. Borgwardt. A dependence maximization view of clustering.
In International Conference on Machine Learning (ICML), pages 815--822, 2007.
Le Song, Alex Smola, Arthur Gretton, Justin Bedo, and Karsten Borgwardt. Feature selection via dependence maximization.
Journal of Machine Learning Research, 13(1):1393–1434, 2012.
Bharath Sriperumbudur, Arthur Gretton, Kenji Fukumizu, Bernhard Schölkopf, and Gert Lanckriet. Hilbert space embeddings
and metrics on probability measures. Journal of Machine Learning Research, 11:1517–1561, 2010.
Ingo Steinwart. On the influence of the kernel on the consistency of support vector machines. Journal of Machine Learning
Research, 2:67–93, 2001.
Ingo Steinwart and Andreas Christmann. Support Vector Machines. Springer, 2008.
Zoltán Szabó and Bharath K. Sriperumbudur. Characteristic and universal tensor product kernels. Journal of Machine
Learning Research, 18(233):1–29, 2018.
Gábor J. Székely and Maria L. Rizzo. Brownian distance covariance. The Annals of Applied Statistics, 3:1236–1265, 2009.
Gábor J. Székely, Maria L. Rizzo, and Nail K. Bakirov. Measuring and testing dependence by correlation of distances. The
Annals of Statistics, 35:2769–2794, 2007.
Andi Wang, Juan Du, Xi Zhang, and Jianjun Shi. Ranking features to promote diversity: An approach based on sparse
distance correlation. Technometrics, 64(3):384–395, 2022.
Chris Watkins. Dynamic alignment kernels. In Advances in Neural Information Processing Systems (NIPS), pages 39–50,
1999.
Stephen Willard. General Topology. Addison-Wesley, 1970.
Christopher Williams and Matthias Seeger. Using the Nyström method to speed up kernel machines. In Advances in Neural
Information Processing Systems (NIPS), pages 682–688, 2001.
Qinyi Zhang, Sarah Filippi, Arthur Gretton, and Dino Sejdinovic. Large-scale kernel methods for independence testing.
Statistics and Computing, 28(1):1–18, 2018.
V. Zolotarev. Probability metrics. Theory of Probability and its Applications, 28:278–302, 1983.
|
|
http://arxiv.org/abs/2302.09923v1 | 2023-02-20T11:37:28 | 2023-02-20T11:37:28 | Prompt Stealing Attacks Against Text-to-Image Generation Models | Text-to-Image generation models have revolutionized the artwork design
process and enabled anyone to create high-quality images by entering text
descriptions called prompts. Creating a high-quality prompt that consists of a
subject and several modifiers can be time-consuming and costly. In consequence,
a trend of trading high-quality prompts on specialized marketplaces has
emerged. In this paper, we propose a novel attack, namely prompt stealing
attack, which aims to steal prompts from generated images by text-to-image
generation models. Successful prompt stealing attacks direct violate the
intellectual property and privacy of prompt engineers and also jeopardize the
business model of prompt trading marketplaces. We first perform a large-scale
analysis on a dataset collected by ourselves and show that a successful prompt
stealing attack should consider a prompt's subject as well as its modifiers. We
then propose the first learning-based prompt stealing attack, PromptStealer,
and demonstrate its superiority over two baseline methods quantitatively and
qualitatively. We also make some initial attempts to defend PromptStealer. In
general, our study uncovers a new attack surface in the ecosystem created by
the popular text-to-image generation models. We hope our results can help to
mitigate the threat. To facilitate research in this field, we will share our
dataset and code with the community. | [
"Xinyue Shen",
"Yiting Qu",
"Michael Backes",
"Yang Zhang"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09923v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09923v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.CR",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.CR",
"cs.LG"
] | Prompt Stealing Attacks Against Text-to-Image Generation Models
Xinyue Shen1 Yiting Qu1 Michael Backes1 Yang Zhang1
1CISPA Helmholtz Center for Information Security
3
2
0
2
b
e
F
0
2
]
R
C
.
s
c
[
1
v
3
2
9
9
0
.
2
0
3
2
:
v
i
X
r
a
Abstract
Text-to-Image generation models have revolutionized the art-
work design process and enabled anyone to create high-
quality images by entering text descriptions called prompts.
Creating a high-quality prompt that consists of a subject and
several modifiers can be time-consuming and costly. In con-
sequence, a trend of trading high-quality prompts on special-
ized marketplaces has emerged. In this paper, we propose a
novel attack, namely prompt stealing attack, which aims to
steal prompts from generated images by text-to-image gen-
eration models. Successful prompt stealing attacks direct vi-
olate the intellectual property and privacy of prompt engi-
neers and also jeopardize the business model of prompt trad-
ing marketplaces. We first perform a large-scale analysis on
a dataset collected by ourselves and show that a successful
prompt stealing attack should consider a prompt's subject as
well as its modifiers. We then propose the first learning-
based prompt stealing attack, PromptStealer, and demon-
strate its superiority over two baseline methods quantitatively
and qualitatively. We also make some initial attempts to de-
In general, our study uncovers a new
fend PromptStealer.
attack surface in the ecosystem created by the popular text-
to-image generation models. We hope our results can help to
mitigate the threat. To facilitate research in this field, we will
share our dataset and code with the community.
1 Introduction
With the advent of Stable Diffusion [40], DALL*E 2 [38],
and Midjourney [1], text-to-image generation models have
revolutionized the artwork design process and sparked a
surge of artwork creation in mainstream media. Rather
than relying on professional artists, text-to-image generation
models empower anyone to produce digital images, such as
photorealistic images and commercial drawings, by entering
text descriptions called prompts. According to [18, 27, 33], a
high-quality prompt that leads to a high-quality image should
consist of a subject and several prompt modifiers. The subject
is a natural language description of the image; the prompt
modifiers are keywords or key phrases that are related to spe-
cific elements or styles of the image. Figure 1 shows an ex-
ample of a typical prompt and the resulting generated image.
In this example, "cozy enchanted treehouse in ancient forest"
is the subject and the rest phrases, e.g., "diffuse lighting,"
"fantasy," "intricate," "elegant," etc., are prompt modifiers.
Figure 1: An image generated by Stable Diffusion [40]. The cor-
responding prompt is "cozy enchanted treehouse in ancient for-
est, diffuse lighting, fantasy, intricate, elegant, highly detailed,
lifelike, photorealistic, digital painting, artstation, illustration,
concept art, smooth, sharp focus, art by John Collier and Albert
Aublet and Krenz Cushart and Artem Demura and Alphonse
Mucha."
Although it seems that text-to-image generation models
make artwork design much easier, the process of creating
high-quality prompts is not simple but challenging and it-
erative. To create a desired and stable prompt, users need
to constantly search for prompt modifiers and check the cor-
responding resulting images. As the impact of each prompt
modifier has not been fully understood, this process can be
time-consuming and costly. As a result, a new job type,
namely prompt engineer, has emerged for people who spe-
cialize in producing high-quality prompts. Also, high-quality
prompts become new and valuable commodities and are
traded in specialized marketplaces, such as PromptBase [2],
PromptSea [3], and Visualise AI [4]. The business model
of these marketplaces is straightforward: customers browse
sample images generated by text-to-image generation mod-
els. If they like a sample image, they can purchase the cor-
responding prompt. Then, customers can freely generate
similar images or modify the prompt's subject to generate
other images in a similar style. Prompt trading marketplaces
are gaining popularity. For instance, till November 2022,
PromptBase has achieved 10K registered users and is con-
1
tinuing to grow.1
In such a context, a natural research question has emerged:
given an image generated by a text-to-image generation
model, whether an adversary is able to infer its correspond-
ing prompt? We name this novel attack as prompt stealing
attack. A successful prompt stealing attack can directly vi-
olate the intellectual property and privacy of prompt engi-
neers. Moreover, it jeopardizes the business model of prompt
trading marketplaces.
So far, few tools in the open-source community can be tai-
lored for stealing prompts [5, 24, 30]. One approach is to ap-
ply an image captioning model to a generated image and treat
the predicted caption as the image's prompt [24, 30]. How-
ever, as the important prompt modifiers are missing in the
caption, this approach cannot achieve satisfying results (see
Section 4 for more details). Other methods are optimization-
based. Take the open-source tool CLIP Interrogator [5] as an
example. Given an image, it iteratively calculates the simi-
larity between the combinations of modifiers and the image.
Once the growth of the similarity saturates, it regards the
current combination as the predicted prompt. However, this
method has low efficiency due to its design; it also involves
many manually defined hyperparameters, which might hin-
der its generalizability in the real world. All these open-
source tools have made attempts. However, it is still unclear
whether and to what extent an adversary can effectively steal
prompts from generated images. In this paper, we aim to fill
the gap.
Our Contributions. We present the first study on prompt
stealing attacks against images generated by text-to-image
generation models. In particular, we focus on Stable Diffu-
sion [40], arguably the most popular and advanced model in
this field.
We start by collecting a large-scale dataset from Lex-
ica [6], a well-known image gallery with 5M+ prompts and
generated images from Stable Diffusion. Overall, we col-
lect 250,000 pairs of prompts and images. After preprocess-
ing and de-duplication on prompts, we are left with 61,467
prompt-image pairs (see Section 3.1). We name the dataset
as Lexica-Dataset. Our quantitative and qualitative analysis
on Lexica-Dataset shows that both a prompt's subject and
its modifiers are important factors for the generated image's
quality (see Section 3.2). This suggests a successful prompt
stealing attack should consider both subjects and modifiers.
We then classify modifiers into different categories to pro-
vide a fine-grained analysis. We find that the artist modifiers
play an essential role in generated images' outlook.
Based on the findings above, we propose the first learning-
based prompt stealing attack, PromptStealer. PromptStealer
consists of two key components: an image captioning model
and a multi-label classifier. Given a target image, the im-
age captioning model generates its caption as the final stolen
prompt's subject. The multi-label classifier is used to predict
the prompt modifiers of the stolen prompt. After applying
the image captioning model and the multi-label classifier to
the target image, we concatenate the caption/subject and the
prompt modifiers together to obtain the final stolen prompt.
Experimental results on Lexica-Dataset show that Prompt-
Stealer outperforms the two baseline methods across seman-
tic, modifier, and image similarities. For instance, Prompt-
Stealer achieves 0.66, 0.43, and 0.79 in these metrics, respec-
tively, while the corresponding results for the better baseline
CLIP Interrogator [5] are 0.52, 0.01, and 0.77. Another ad-
vantage of PromptStealer lies in its efficiency. For instance,
PromptStealer takes 0.01 seconds to steal one prompt on an
NVIDIA DGX-A100 server. To compare, CLIP Interrogator
needs 7.89 seconds under the same setting. We also qualita-
tively evaluate PromptStealer and find that the images gener-
ated by stolen prompts are similar to the target images. More-
over, we show that the performance of PromptStealer can be
further boosted by involving the adversary in the loop.
We then make the first attempt to mitigate prompt steal-
ing attacks by proposing PromptShield. This method adds
an optimized noise to an image relying on the technique of
adversarial examples such that the adversary cannot infer the
image's prompt appropriately. Based on the findings from
Section 3, the perturbation targets the most important cate-
gory of prompt modifiers, i.e., artist. Experimental results
show that PromptShield works well (see Section 5); how-
ever, it requires strong assumptions for the defender, and its
performance is reduced by the adaptive attack.
Implications. Our work, for the first time, reveals the threat
of prompt stealing in the ecosystem created by the popular
text-to-image generation models. We believe our results can
provide guidance to the stakeholders to mitigate the risks.
Moreover, we hope to raise awareness of academia to work
on the safety and security issues of advanced text-to-image
generation models. We will share our dataset and code with
the research community to facilitate the research in this field.
2 Background
2.1 Text-to-Image Generation Models
Text-to-Image generation models aim to generate high-
quality digital images with natural language descriptions,
namely prompts. With the advancement of diffusion mod-
els, text-to-image generation achieves a giant leap and has
gained significant attention in recent months [38,40,42]. Im-
ages generated by these models can be used in various ar-
eas, such as art and fashion industry. In addition to diffusion
models, there are several other approaches to construct text-
to-image generation models [9, 15] relying on GANs [16].
These approaches differ in terms of their model architectures
and techniques, but all aim at capturing the relationship be-
tween text and visual content.
In this work, we focus on Stable Diffusion as it is the
state-of-the-art and arguably the most popular text-to-image
generation model. Besides, compared to other models like
DALL*E 2 and Midjounry, Stable Diffusion is open-source
and the community that promotes the usage of Stable Dif-
fusion is very active. For instance, since the release of Sta-
ble Diffusion in March 2022, more than 110K people have
joined the Reddit community to share and discuss images
generated by Stable Diffusion.2
1https://daily.tinyprojects.dev/185.
2https://www.reddit.com/r/StableDiffusion/.
2
(a)
(b)
Figure 2: Two examples from Lexica-Dataset, and the corresponding generated images without artist modifiers and without any
modifiers. The yellow highlight represents the artist modifiers. For the latter two cases, we generate four images with different random
seeds to eliminate the potential biases.
2.2 The Marketplace of Text-to-Image Gener-
ation Models
With the development of text-to-image generation models,
a new ecosystem has emerged. To generate a high-quality
image, one usually needs to constantly search for prompt
modifiers and check the corresponding resulting images. As
the impact of each prompt modifier is not clear, this pro-
cess can be time-consuming and costly. One example is the
logo of OctoSQL, an open-source CLI project for querying
databases. The designers use DALL*E 2 to create the logo
and spend around $30 interacting with the paid API.3 As a re-
sult, prompts engineers, people who specialize in producing
high-quality prompts, start to sell their prompts in specialized
marketplaces, such as PromptBase [2], PromptSea [3], and
Visualise AI [4]. In these marketplaces, a customer explores
sample images generated by different prompts. If they like a
certain image, they can purchase the corresponding prompt
through the marketplace. On PromptBase, each prompt's
cost lies in the range between $1.99 and $9.99. After getting
the prompt, the customer can freely generate similar images
or modify the prompt's subject to generate other images in a
similar style. Prompt trading marketplaces are gaining pop-
ularity. By November 2022, PromptBase has more than 10K
users registered, and the number is still increasing.
3 Data Analysis on Lexica-Dataset
In this section, we first elaborate on the data collection pro-
cess for Lexica-Dataset, then undertake a detailed analysis of
the dataset.
3.1 Data Collection
To the best of our knowledge, no large-scale prompt-image
datasets are available by the time we perform this study. To
assess prompt stealing attacks, we collect a dataset by our-
selves via Lexica [6]. There are two reasons for us to choose
Lexica. First, Lexica is a well-known image gallery of Sta-
3https://jacobmartins.com/posts/how-i-used-dalle2-to-gene
rate-the-logo-for-octosql/.
ble Diffusion; it contains 5M+ prompt-image pairs extracted
from Stable Diffusion's discord server.4 Lexica covers the
art creations of many Stable Diffusion's active users, such as
artists and prompt engineers. This allows us to better simu-
late the real-world attack scenario. Second, Lexica provides
a query API5 that given a specific prompt, returns the 50 most
similar prompts and the corresponding images. Note that
similar prompts are likely from the same user during their
prompt engineering process. Therefore, the data from Lexica
can closely reflect people's real-world usage of Stable Diffu-
sion.
As Lexica only provides a query API and does not release
its public dataset, we regard an open-source prompt dataset
on Hugging Face6 as a starting point for our data collection.
This dataset contains 80K prompts crawled from Lexica,
which are used to train a prompt generator. As this dataset
does not contain any images and other metadata, e.g., the im-
age download link, we cannot directly use it. To address this,
we randomly sample 5,000 prompts from the dataset, then
query these prompts to Lexica's query API. As mentioned
above, the API returns 50 results for each query, including
images, prompts, grid, etc.
In the end, we crawl 250,000
prompts and the corresponding generated images. We filter
out the prompts and images that could not be parsed cor-
rectly. Also, images belonging to the grid type (each of those
images contains several generated images stitched together)
are neglected as well. Finally, after the de-duplication of
prompts, we get 61,467 prompt-image pairs. We name the
dataset as Lexica-Dataset.
As mentioned before, each prompt consists of a subject
and several prompt modifiers. Thus, we further decompose
prompts in Lexica-Dataset into subjects and prompt modi-
fiers. Concretely, we split each prompt by commas. The first
part is regarded as the subject according to [27, 33], while
the rest are treated as prompt modifiers. We standardize the
format of some modifiers, e.g., "8 k" to "8k," "3 d" to "3d."
4https://discord.com/invite/stablediffusion.
5https://lexica.art/docs.
6https://huggingface.co/datasets/Gustavosta/Stable-Diffusio
n-Prompts.
3
ImagesgeneratedbypromptwithoutmodifiersLexica-DatasetimageImagesgeneratedbypromptwithoutartistsa treasure chest, black and white, fantasy art, object art, in the style of masami kurumada,illustration, epic, fantasy, intricate, hyper detailed, artstation, concept art, smooth, sharp focus, ray tracingLexica-DatasetpromptLexica-DatasetimagefullbodyportraitofabeautifulKurdishbridewearingabeautifulweddingdress,verydetailedeyes,hyperrealistic,beautifulandsymmetricalface,verydetailedpaintingby Claude Monet and Alphonse Mucha,ornate,trendingonartstation,extremelyhighdetail,incrediblyintricate,claude monetLexica-DatasetpromptImagesgeneratedbypromptwithoutmodifiersImagesgeneratedbypromptwithoutartists(a) Subject/prompt length distribution.
(b) Modifier count distribution.
(c) Modifier appearance distribution.
Figure 3: General statistics of prompts in Lexica-Dataset.
We also remove the style-evocation words, including "in the
style of," "inspired by," "art by," "in style of," and "trend-
ing on," etc. In the end, we obtain 77,616 prompt modifiers.
Figure 2 depicts some samples from the dataset. To facilitate
research in this field, we will release Lexica-Dataset as well
as our code to academia.
3.2 Data Analysis
Next, we perform some data analysis on Lexica-Dataset.
Subjects and Prompt Modifiers. Figure 3a depicts the
length distribution of subjects and prompts in Lexica-
Dataset. On average, the length of a subject is 55.97 char-
acters, while the length of a prompt is 236.86 characters.
This means a subject takes only 23.63% of a prompt, and
the rest is assembled with prompt modifiers. Figure 3b fur-
ther depicts the distribution of modifier count per prompt. On
average, each prompt contains 10.52 modifiers. This might
suggest prompt modifiers play an essential role in the image
generation process. To further investigate this, Figure 2 also
shows some generated images without prompt modifiers. As
we can see, modifiers indeed largely influence image quality
in terms of style and details. Take the treasure chest as an
example (see Figure 2a), if the modifiers are not considered,
Stable Diffusion generates a plain treasure chest. Meanwhile,
by considering various modifiers, the original image depicts
a more stylized treasure chest with many fine-grained details.
These results imply that a successful prompt stealing attack
should not only consider the target prompt's subject but also
put efforts into recovering the modifiers. In other words, us-
ing an image captioning model to get the caption (subject) of
a target image is insufficient for prompt stealing. Experiment
results in Section 4 further confirm this. On the other hand,
we emphasize that the subject also plays an essential role in
a prompt as it describes the main content of the image.
For the modifiers, we further show the distribution of their
appearance times in Figure 3c. We can observe a long-tail
distribution. Specifically, Lexica-Dataset contains 61,467
prompts and 77,616 modifiers. Among them, only 7,672
(9.88%) modifiers are used more than ten times and 1,109
(1.43%) modifiers are used more than 100 times. From
the adversary's perspective, this long-tail distribution eases
the requirements for prompt stealing attacks, as a relatively
small modifier set can already cover most modifiers used in
prompts (see Section 4).
Modifiers in Category-Level. We further attribute prompt
modifiers into different categories. The open-source tool
CLIP Interrogator [5] defines five categories for modifiers,
i.e., trending, artist, medium, movement, and flavor, and of-
fers a relatively complete modifier list for each category. In
our analysis, we adopt the same set of categories and assign
all modifiers in Lexica-Dataset to them. Concretely, a mod-
ifier in Lexica-Dataset is considered as part of a category if
it belongs to the corresponding modifier list from CLIP In-
terrogator. Table 1 shows the top 10 prompt modifiers with
respect to their appearance times in each category of Lexica-
Dataset. We find that users are less likely to use movement
modifiers. The highest one is "fantasy art" with appearance
times being only 1,567. This is probably because the us-
age of movement modifiers requires background knowledge
of art. Conversely, the top three modifiers in the flavor cat-
egory are all well-known image quality boosters [33], such
as "highly detailed," "8k," and "sharp focus." On average,
14.32%, 6.11%, 3.25%, 0.98%, and 75.33% of the modifiers
in a prompt belong to the artist, trending, medium, move-
ment, and flavor categories, respectively. Excluding the cat-
egory flavor which contains various kinds of modifiers, the
artist category occupies the largest proportion of prompts
compared to the rest. This reveals that users are more likely
to use artist modifiers to lead the generated images to cer-
tain visual styles. Figure 2 further shows some examples of
generated images without artist modifiers. In Figure 2b, the
artist modifiers "Claude Monet" and "Alphonse Mucha" in-
deed heavily influence the final outlook and fine-grained de-
tails of the original image, compared to the images without
any artist modifiers. A similar observation can be made in
the example depicted in Figure 2a.
Next, we investigate the semantic relations among mod-
ifiers of different categories. Diffusion-based text-to-image
generation models like Stable Diffusion rely on CLIP [37]
to obtain text embeddings of prompts. We thereby utilize
CLIP's text encoder to obtain modifiers' embeddings and vi-
sualize them via a T-SNE [48] plot (see Figure 4). For each
category, we consider the top 20 modifiers with respect to
their appearance times. We find that the modifiers in the artist
category are tightly grouped and distant from others. Mean-
while, the rest four categories are relatively mixed. The artist
category being different from the others again shows the im-
portance of the artist modifiers in the image generation pro-
cess. Meanwhile, it is expected that other categories are close
to each other. For instance, movement modifiers are often ac-
companied by medium modifiers. This has also been uncov-
ered in a previous qualitative study [27] and recommended
4
05001,0001,500Length Distribution01,0002,000FrequencyPromptSubject0255075Modifier Count Per Prompt02,5005,0007,500Frequency70,00075,00080,000020,00040,000Modifier Appearance Times050100CountTable 1: Top 10 prompt modifiers and their appearance times for each category.
No. Trending
# Artist
# Medium
# Movement
#
Flavor
11,552
7,273
6,237
concept art
digital art
vector art
24,095
7,483
127
1,567
fantasy art
art nouveau
1,132
hyperrealism 1,041
highly detailed
8k
sharp focus
#
26,818
22,987
22,774
1
2
3
4
5
6
7
8
9
artstation
cgsociety
deviantart
46,357
3,822
2,309
greg rutkowski
artgerm
artgerm and
rutkowski
alphonse mucha
greg
and
pixiv
1,018 wlop
pinterest
646
ilya kuvshinov
behance
instagram
zbrush central
cg society
321
127
57
52
alphonse mucha
rossdraws
craig mullins
james jean
10
polycount
51
rhads
5,989
3,918
3,716
2,802
2,341
2,133
1,976
an ultrafine de-
tailed painting
detailed
a
matte painting
poster art
an oil painting
pixel art
a
painting
a character por-
trait
detailed
83
photorealism
924
digital painting
18,211
63
street art
447
intricate
58
51
42
40
surrealism
romanticism
art deco
realism
388
384
377
292
illustration
octane render
smooth
elegant
39
rococo
290
4k
18,002
17,473
14,394
13,906
13,081
10,325
Figure 4: T-SNE visualization of modifier embeddings with re-
spect to different categories.
by DALL*E 2 prompt book [7].
Takeaways. To summarize, we have established the first
prompt-image dataset Lexica-Dataset. Our data analysis
reveals that besides its subject, a prompt's modifiers also
play an essential role in determining its generated image's
outlook. This suggests a successful prompt stealing attack
should consider both the subject and modifiers of a prompt.
Moreover, we attribute prompt modifiers into five different
categories and discover that the artist modifiers heavily in-
fluence generated images' styles and details.
4 Prompt Stealing Attack
Based on the findings in Section 3, we propose the first
learning-based prompt stealing attack PromptStealer. In this
section, we start by introducing the threat model, then present
the attack methodology. In the end, we show the experimen-
tal results.
4.1 Threat Model
Scenario. Our attack is designed for the scenario shown in
Figure 5. First, a prompt engineer or an artist performs an it-
erative exploring process to find an ideal prompt that can lead
to a high-quality generated image on a text-to-image gener-
ation model. We refer to this prompt as the target prompt.
Then, the prompt engineer can sell the prompt via market-
5
Figure 5: The scenario of prompt trading and prompt stealing.
places like PromptBase [2]. To do so, the engineer provides
an example image generated by the target prompt to the mar-
ketplace. We refer to this example image as the target image.
If a regular user is interested in the style of the target image,
the user can get the target prompt by trading with the prompt
engineer through the marketplace. After getting the target
prompt, one of the usage scenarios for the user is that they
modify the prompt's subject to generate other images with a
similar style (see Section 2).
Conversely, an adversary aims to steal the target prompt
from a target image. This behavior directly violates the
prompt engineer's intellectual property and privacy. In ad-
dition, it also jeopardizes the business model of the prompt
trading marketplace like PromptBase. We refer to the prompt
stolen by the adversary as the stolen prompt. Moreover, the
adversary can feed the stolen prompt to the text-to-image
generation model again, and the generated image here is re-
ferred to as the stolen image.
Adversary's Goal. Given a target image generated by a text-
to-image generation model, the goal of the adversary is to
steal the target prompt that leads to the target image. The
stolen prompt ideally should satisfy the following four quan-
titative goals.
• Semantic Similarity. The stolen prompt should share
high semantic similarity with the target prompt, which
is normally measured in the text embedding space. This
is important as text-to-image generation models essen-
tially condition on the text embeddings during the im-
age generation process. Here, the semantic similarity
considers both subjects and prompt modifiers.
20100102015105051015trendingartistmediummovementflavorPrompt EngineeringTarget PromptTarget ImageMarketplacePrompt EngineerUserTarget PromptTradingUsageAdversaryStolen PromptStolen Image• Modifier Similarity. The stolen prompt should contain
as many modifiers of the target prompt as possible. As
the modifiers take an essential role in guaranteeing the
quality of the generated image (see Section 3), higher
modifier similarity results in better attack performance.
• Image Similarity. By feeding the stolen prompt to the
text-to-image generation model again, the adversary ex-
pects the model to generate a similar stolen image to the
target image.
• Efficiency. Efficiency refers to the speed of stealing a
prompt; it is always desired by the adversary to mount
their attacks on a large scale efficiently.
Besides, considering the usage of the target prompt men-
tioned in Section 2, the stolen prompt should also lead to
images depicting different subjects in the style of the target
image. Therefore, we also qualitatively assess PromptStealer
from this angle.
Adversary's Capability. We assume the adversary's capa-
bilities in a real-world setting. First, the adversary can col-
lect public prompts and the corresponding images via online
services like Lexica. Second, the adversary has black-box
access to the target text-to-image generation model.
4.2 PromptStealer
There is no doubt that an adversary can try many ways to
steal the prompt from a target image. The simplest way is to
use the adversary's experience to describe the image heuris-
tically and guess the corresponding prompt. However, this
method heavily relies on the adversary's knowledge and is
difficult to be extended to a large scale. Another approach
is to directly apply an existing image captioning model to
the target image and treat the returned caption as the stolen
prompt. However, this approach cannot obtain the prompt
modifiers which play an essential role in the target prompt as
shown in Section 3.2. A more sophisticated approach is the
optimization-based method, like the open-source tool CLIP
Interrogator [5]. This method iteratively calculates the sim-
ilarity between the combinations of modifiers and the target
image. Once the similarity stops rising, it regards the current
combination as the stolen prompt. The complete process of
CLIP Interrogator can be found in Algorithm 1 in Appendix.
Due to its design, CLIP Interrogator has low efficiency (see
results in Section 4.4). Moreover, many key operations of
CLIP Interrogator are based on manually defined hyperpa-
rameters. For instance, in one step, CLIP Interrogator se-
lects 2,048 flavor modifiers out of 100,971 (Line 23 in Algo-
rithm 1). In another case, the whole process of CLIP Inter-
rogator is repeated exactly 25 times (Line 24 in Algorithm 1).
These manually defined hyperparameters might make CLIP
Interrogator sensitive to different settings, thus hindering its
generalizability in the real world.
Instead, in this work, we propose the first learning-based
approach for prompt stealing attack, namely PromptStealer.
The design principle of PromptStealer is based on our obser-
vations in Section 3, i.e., a successful prompt stealing attack
should focus on both the subject and modifiers of a target
6
prompt. PromptStealer uses different tools to steal the sub-
ject and prompt modifiers. Specifically, PromptStealer con-
sists of two key components: an image captioning model and
a multi-label classifier.
• Image Captioning Model. Given the target image, the
image captioning model is used to generate the subject
of the stolen prompt. In this work, we adopt BLIP [24],
a state-of-the-art image captioning model. Concretely,
we use the BLIP model pre-trained on the MS-COCO
dataset.7
• Multi-Label Classifier. The multi-label classifier takes
the target image as input and returns multiple labels,
which are treated as prompt modifiers.
In this work,
we rely on ML-Decoder [39] to establish the multi-label
classifier. ML-Decoder is a state-of-the-art multi-label
classifier based on residual networks [19] and can eas-
ily scale to thousands of labels due to the novel group-
decoding scheme. We reset the multi-label head layer
with Lexica-Dataset's modifier set and then fine-tune
the pre-trained ML-Decoder8 on Lexica-Dataset. In ad-
dition, we apply a Sigmoid activation layer at the end
of ML-Decoder to normalize the outputs to prediction
posteriors. The labels/modifiers whose posteriors are
higher than a predefined threshold are regarded as the
stolen prompt's modifiers.
After applying the image captioning model and the multi-
label classifier to the target image, we concatenate the subject
and the prompt modifiers together to obtain the final stolen
prompt.
4.3 Experimental Settings
Text-to-Image Generation Model. We focus on Stable Dif-
fusion as it is one of the most prevalent text-to-image genera-
tion models in the field. Besides, the open-source nature and
the active community support (e.g., Lexica) of this model
enable us to perform a large-scale evaluation. Most of our
experiments are directly performed on Lexica-Dataset.
In
certain cases, we also need to use Stable Diffusion to gener-
ate images for evaluation. To this end, we adopt the official
Stable Diffusion v1.4 model.9 For each image generation
process, we sample 50 steps with default settings [50]. The
size of the generated image is 512×512.
We also consider other representative text-to-image gen-
eration models, like DALL*E 2 and Midjounery. However,
they are not open-source and only provide non-free APIs.
This makes it financially infeasible for us to collect large-
scale datasets from them. As an alternative, we directly ap-
ply PromptStealer trained on Lexica-Dataset (based on Sta-
ble Diffusion) to them as a case study to test our approach's
generalizability (see Section 4.8).
Attack Model. For PromptStealer, we use BLIP [24] as the
image captioning model and ML-Decoder [39] as the multi-
label classifier. In total, we have 77,616 prompt modifiers
7https://github.com/salesforce/BLIP.
8https://github.com/Alibaba-MIIL/ML_Decoder.
9https://huggingface.co/CompVis/stable-diffusion-v1-4.
Figure 6: The performance of PromptStealer and the two baselines. The green dot line in the third figure marks the average image
similarity between the target images and the images generated by the corresponding target prompts.
Table 2: The average running time (efficiency) of PromptStealer
and the two baselines. The time is measured on an NVIDIA
DGX-A100 server.
Method
Time (s)
Image Captioning
CLIP Interrogator
PromptStealer
0.01
7.89
0.01
in Lexica-Dataset, which can be all treated as labels for the
multi-label classifier. However, many modifiers only appear
a few times (see Figure 3c). Therefore, in our main experi-
ments, we only consider modifiers that appear more than 10
times (7,672 modifiers) as labels. We also explore the effect
of label number on PromptStealer in Section 4.6. We choose
0.6 as the posterior threshold to decide whether a label will
appear in the modifier set of the stolen prompt. The impacts
of different thresholds are investigated in Section 4.6 as well.
PromptStealer is trained on 80% of the samples in Lexica-
Dataset, and the rest samples are used for testing.
Baseline Model. We consider two baseline attack models
in our experiments. The first baseline model is a pre-trained
image captioning model. Given an image, it produces a cap-
tion for the image, which is directly regarded as the stolen
prompt. Here, the image captioning model is the same one
used in PromptStealer [24]. The second baseline model is
CLIP Interrogator version 2 [5]. We use the complete mod-
ifier set of Lexica-Dataset, i.e., 77,616 prompt modifiers, in
CLIP Interrogator.
Evaluation Metric. As discussed in Section 4.1, the adver-
sary has four quantitative goals: semantic similarity, modifier
similarity, image similarity, and efficiency. Thus, we adopt
four quantitative metrics for these goals, respectively.
• Semantic Similarity. The semantic similarity is the
cosine similarity between the embeddings of the target
prompt and the stolen prompt. We use CLIP's text en-
coder to get the embeddings.
• Modifier Similarity. The modifier similarity is the
Jaccard similarity between the modifiers of the target
prompt and those of the stolen prompt.
• Image Similarity. The image similarity is the cosine
similarity between the embeddings of the target and
stolen images. Note that the image generation process
of Stable Diffusion involves randomness, that is, one
prompt can lead to different images given different ran-
dom seeds. Therefore, to make the image similarity
metric more stable, for each stolen prompt, we gener-
ate four stolen images from Stable Diffusion (by vary-
ing the random seed). We then calculate the similarity
between each stolen image and the target image and, in
the end, average the results. Here, to obtain an image's
embedding, we rely on CLIP's image encoder.
• Efficiency. We report the average stealing time per
prompt for this metric.
Besides we also provide qualitative evaluations to assess the
stolen prompts and stolen images.
4.4 Quantitative Evaluation
Figure 6 shows the performance of PromptStealer together
with the two baselines. We find that PromptStealer outper-
forms both baseline models across semantic, modifier, and
image similarities. Concretely, PromptStealer achieves 0.66,
0.43, and 0.79 in these metrics, respectively, while the corre-
sponding results for the better baseline CLIP Interrogator are
0.52, 0.01, and 0.77. Besides, the image captioning model
itself is not sufficient to achieve a successful prompt stealing
attack. It only achieves a 0.19 semantic similarity and a 0.65
image similarity. Note that image captioning has no result in
modifier similarity as it does not generate modifiers.
Among all the three metrics, PromptStealer outperforms
CLIP Interrogator the most in modifier similarity. Moreover,
we emphasize that CLIP Interrogator considers a much larger
set of modifiers than PromptStealer (77,616 vs. 7,673). This
further shows the advantage of PromptStealer. One possi-
ble reason for CLIP Interrogator to achieve such low perfor-
mance lies in its accumulation mechanism (Line 20 in Algo-
rithm 1). More concretely, if CLIP Interrogator selects the
wrong set of initial modifiers, the final result can be heavily
affected. On the other hand, the multi-label classifier adopted
by PromptStealer does not face this problem.
For the image similarity metric, PromptStealer performs
slightly better than CLIP Interrogator ostensibly (0.79 vs.
0.77). However, due to the randomness in the text-to-image
generation process, even feeding the target prompt directly to
the model yields an image similarity of 0.81, which is the up-
7
ImageCaptioningCLIPInterrogatorPromptStealerSemantic Similarity0.00.20.40.60.8SimilarityImageCaptioningCLIPInterrogatorPromptStealerModifier Similarity0.00.20.40.60.8ImageCaptioningCLIPInterrogatorPromptStealerImage Similarity0.00.20.40.60.8(a)
(b)
Figure 7: Two attack examples of PromptStealer and the two baselines. The text below each image is the stolen prompt. The red color
marks the correctly predicted modifiers.
(a) Target
(b) PromptStealer
(a) Target
(b) PromptStealer
Figure 8: Transferability results of the example in Figure 7a.
Figure 9: Transferability results of the example in Figure 7b.
per bound of our attack. Therefore, we conclude that Prompt-
Stealer achieves very strong performance in image similarity
as well.
Table 2 shows the efficiency of PromptStealer and the two
baselines. We observe that PromptStealer and the image cap-
tioning model, i.e., BLIP, outperform CLIP Interrogator to a
large extent. For instance, BLIP and PromptStealer take both
0.01 seconds on an NVIDIA DGX-A100 server to steal one
prompt. To compare, CLIP Interrogator needs 7.89 seconds
under the same setting. This is because CLIP Interrogator re-
lies on an iterative process to generate the stolen prompt. We
also find that PromptStealer costs the same time as the image
captioning model, even though PromptStealer contains one
more component, i.e., the multi-label classifier. This is be-
cause of the loose coupling of PromptStealer: PromptStealer
can infer the subject and the modifiers simultaneously.
4.5 Qualitative Evaluation
Figure 7 shows two attack examples of PromptStealer and
the baselines. Here, for each stolen prompt, we let Stable
Diffusion generate four images with different random seeds
to eliminate the potential biases. In both cases, we can see
that the stolen images by PromptStealer are more similar to
the target images compared to the baselines. Take Figure 7b
as an example, the stolen images by the image captioning
method are the least similar to the target image. Concretely,
the first, second, and fourth stolen images by image caption-
ing are in vintage style, while the third image has some mod-
ern features with respect to color and clothing fabric. How-
ever, none of the images share a similar style with the tar-
get image. With modifiers introduced, we observe the qual-
ities of the stolen images generated by CLIP Interrogator
improve a lot. All four images show the same vintage yel-
low tint as the target image. However, the wrong modifiers
steer the stolen images in the wrong direction, thus reducing
the efficacy of CLIP Interrogator. For example, the modi-
fier "looks like alison brie," which is not part of the target
prompt, directs the results toward the celebrity Alison Brie
(see the first, second, and fourth images). To compare, we
find that PromptStealer is able to recover a large proportion
of the modifiers of the target prompt. The large coverage
of modifiers thus promises coherence between the target and
stolen images.
As mentioned before, an important usage of the prompt
traded through the marketplace is that the user can mod-
ify its subject to generate other images with a similar style.
8
a study of cell shaded cartoon of the interior of a bioshockstyle art deco city, illustration, post grunge, concept art by josangonzalesand wlop, by jamesjean, victongai, davidrubin, mike mignola, lauriegreasley, highly detailed, sharp focus, trending on artstation, hq, deviantart, art by artgema painting of a cityat nighta painting of a cityat night, cyberpunk art, stephanmartinière, cgsociety, antonfadeevand moebius, sketchfab, retro sci -fi : : a storyboard drawing, wlop: :ImageCaptioningCLIPInterrogatora painting of a cityat night, highly detailed, sharp focus, illustration, deviantart, by jamesjean, vibrant colors, by victongai, concept, wide shot, hq, lauriegreasley, artgem, by mike mignola, by josangonzalesand wlop, davidrubinPromptStealerTargetImageA full portrait of a beautiful post apocalyptic Bedouin explorer, intricate, elegant, highly detailed, digital painting, artstation, concept art, smooth, sharp focus, illustration, art by KrenzCushartand Artem Demuraand alphonsemuchaa woman in a costume with a guna woman in a costume with a gun, a character portrait, jaimejones, cgsociety, half the painting is glitched, woman in tattered clothes revealing body, female merchant, looks like alisonbrie, barbarian girl, stylized portraita woman in a costume with a gun, artstation, highly detailed, concept art, sharp focus, digital painting, intricate, illustration, smooth, elegant, by krenzcushartand artemdemuraand alphonsemuchaImageCaptioningCLIPInterrogatorPromptStealerTargetImageObject[city][village][town][metropolis]Object[city][village][town][metropolis]Object[explorer][man][elder][kid]Object[woman][man][elder][kid]Figure 10: Impacts of label number on PromptStealer.
Figure 11: Impacts of threshold on PromptStealer.
We refer to this usage as transferability. Ideally, the stolen
prompt should have high transferability as well. Figure 8
shows some transferability examples of the target and stolen
prompts in Figure 7a. Here, we replace "city" in the subject
of the stolen prompt with "village," "town," and "metropo-
lis." We find that the new images for PromptStealer also look
quite natural, similar to the new images for the target prompt.
In Figure 9, we make the same observation for the example
in Figure 7b. This finding indicates that the stolen prompts
by PromptStealer have high transferability.
4.6 Ablation Study
We further conduct ablation studies on two key hyperparame-
ters of PromptStealer, i.e., label number and posterior thresh-
old. In the main experimental setting, we only consider mod-
ifiers appearing more than 10 times in Lexica-Dataset as the
labels (7,672) for the multi-label classifier. We are interested
in whether changing the label number affects the attack per-
formance. To this end, we consider two other variants, i.e.,
modifiers appear more than 50 times and 100 times which
lead to 1,966 labels and 1,109 labels, respectively. Fig-
ure 10 shows the results. We find that for semantic, mod-
ifier, and image similarities, PromptStealer with 1,109 la-
bels and 1,966 labels have slightly weaker performance than
PromptStealer with 7,672 labels. For instance, the seman-
tic similarities for 1,109, 1,966, and 7,672 labels are 0.64,
0.65, and 0.66, respectively. This is reasonable as a relatively
small modifier set can already cover most modifiers in target
prompts, as shown in Figure 3c.
Figure 11 shows the results regarding the impact of the
posterior threshold for the multi-label classifier. We find that
PromptStealer obtains the highest modifier similarity and im-
age similarity when the threshold is set to 0.6. For seman-
9
Figure 12: Two examples of improving PromptStealer by man-
ually modifying subjects, i.e., adversary in the loop. The red
color marks the correctly predicted modifiers.
tic similarity, the highest result (0.67) is achieved when the
threshold is 0.3, which is very close to the semantic similarity
(0.66) when the threshold is 0.6. In conclusion, 0.6 is a suit-
able threshold for the multi-label classifier of PromptStealer.
4.7 Adversary in the Loop
We acknowledge that PromptStealer is far away from being
perfect. Figure 12 shows some failed cases of PromptStealer.
We find that the main reason for these failed cases to happen
is that PromptStealer cannot accurately capture the key sub-
jects from the target images, such as celebrities and animals.
However, the adversary can easily improve this by manually
modifying the stolen prompt with their knowledge, e.g., re-
placing "woman" with "counselor deanna troi,"10 or modify-
ing the misidentified "owl" to "wolf." Examples in Figure 12
show the effects of involving the adversary in the loop. As
we can see, the attack results improve significantly. Besides
involving an adversary in the loop, more advanced machine
learning models can be used to solve the issue as well, like
adding a subject detector in the image captioning model. We
leave this as future work.
4.8 Open-World Evaluation
Other Dataset. So far, all the testing samples for Prompt-
Stealer are from Lexica-Dataset. Next, we check whether
PromptStealer can be generalized to target images from other
datasets as well. To this end, we download some testing
samples from PromptDB [8], another marketplace containing
prompt-image pairs by Stable Diffusion. In our case study,
we randomly choose three prompt-image pairs from three
different categories, i.e., backgrounds, animals, and concept
art, as Figure 13 shows. We observe PromptStealer can suc-
cessfully capture the semantic meaning in the target prompts.
10https://en.wikipedia.org/wiki/Deanna_Troi.
1,0002,0003,0004,0005,0006,0007,0008,000Label Number0.00.20.40.60.81.0SimilarityModiferSemanticImage0.20.30.40.50.60.70.80.9Threshold0.00.20.40.60.81.0SimilarityModifierSemanticImagecounselordeannatroi, intricate, elegant, highly detailed, digital painting, artstation, concept art, smooth, sharp focus, illustration, art by artgermand gregrutkowskiand alphonsemuchaand william-adolphebouguereaua painting of a woman in a blue dress, artstation, highly detailed, concept art, sharp focus, intricate, smooth, elegant, by artgermand gregrutkowskiand alphonsemucha[woman]->[counselordeannatroi]StolenImagesTargetImageStolenImages(Adversary in the Loop)blue feathered wolf with wings on a beautiful fantasy landscape, standing facing front, regal, elegant, winter, snow, moonlit, hd, illustration, epic, d & d, fantasy, intricate, elegant, highly detailed, digital painting, artstation, concept art, smooth, sharp focus, illustration, wallpaper, art by artgermand gregrutkowskiand alphonsemuchaand jinxiaodian image of an owl with wingsflying in the sky, artstation, highly detailed, concept art, sharp focus, digital painting, intricate, illustration, fantasy, d & d, epic, digital illustration, wallpaper, snow,full moon, winter, moonlit[owl]->[wolf]StolenImagesTargetImageStolenImages(Adversary in the Loop)Figure 14: Two attack examples of PromptStealer in open-
world evaluation (other model DALL*E 2). The target and
stolen images are generated by DALL*E 2. The red color marks
the correctly predicted modifiers.
Figure 13: Three attack examples of PromptStealer in open-
world evaluation (other dataset). The three target prompt-
image pairs are collected from PromptDB [8] (based on Stable
Diffusion). The red color marks the correctly predicted modi-
fiers.
For instance, for the second target image, PromptStealer can
successfully infer "monkey" in the subject and many modi-
fiers like "unreal engine," "intricate," and "cinematic."
Other Text-to-Image Generation Models. DALL*E 2 and
Midjourney are also mainstream text-to-image generation
models. However, as mentioned before, the two models are
still not open-source, so we could not conduct large-scale
quantitative experiments on them. Instead, we perform a case
study and hope it could shed light on the generalizability of
PromptStealer on these unseen models. Concretely, we first
use two target prompts from Lexica-Dataset to generate two
target images from DALL*E 2 and Midjourney. We then di-
rectly apply the trained PromptStealer to steal the prompts
from the two target images and use the corresponding text-
to-image generation models again to get the stolen images.
The results are displayed in Figure 14 and Figure 15.
We find that even though PromptStealer has never seen
images generated from DALL*E 2 and Midjourney before, it
still manages to catch some of the key prompt modifiers, such
as "octane render," "artstation," "volumetric lighting." This
indicates that PromptStealer still works on these unseen text-
to-image generation models to a certain extent. We also no-
tice that PromptStealer does not perform as well as it does on
Stable Diffusion. For example, it cannot accurately deduce
the artist modifiers. This could be caused by the different
architectures and weights of these text-to-image generation
models. One possible solution is to train PromptStealer on
multiple datasets related to different models like DALL*E 2
Figure 15: Two attack examples of PromptStealer in open-
world evaluation (other model Midjourney). The target and
stolen images are generated by Midjourney. The red color
marks the correctly predicted modifiers.
and Midjourney. However, as no dataset is available now, we
leave this as future work.
5 Defense
After demonstrating the efficacy of our prompt stealing at-
tack PromptStealer, we further propose a defense method,
namely PromptShield. We start by describing the methodol-
ogy of PromptShield, then provide quantitative and qualita-
tive evaluation results.
10
The most enchanting, mystical lighthouse in the world, photorealistic and surrounded by a violently stormy sea. Against a thunder and lightening sky, 3d render, colorful, highly detailed, insane resolution, 8k, illustration, ink, pixar, bright, photorealistica lighthouseon a small island in the middle of the ocean, highly detailed StolenImagesTargetImage3d fluffy monkey, closeup cute and adorable, cute big circular reflective eyes, long fuzzy fur, Pixar render, unreal engine cinematic smooth, intricate detail, cinematica close up of a monkeywith big eyes, unreal engine, summer vibrancy, soft shade, detective pikachu, intricate, cinematicStolenImagesStolenImagesTiny cute isometric camera, soft smooth lighting, with soft colors, 100mm lens, 3d blender render, trending on polycount, modular constructivism, blue background, physically based rendering, centereda blueand pink cameraon a graysurface, octane render, 3dTargetImageTargetImagea deloreancar driving down a road at night, concept art, 8k, octane render, 4k, cinematic, cinematic lighting, hd, dramatic lighting, unreal engine 5, 3d,hyperrealistic, hyper realistic, photorealism, calm, unreal engine render ultra realistic deloreandmc5 with pop -up headlights drifting on ancient highway wreckage in space, dark cinematic, volumetric, realistic, 3 d render, realistic render, cinematic lighting, volumetric lighting, atmospheric, cinematic, unreal engine 5, unreal engine render, octane render, hd, photorealism, hyper realistic, 8 k a painting of a woman standing in front of a castle, artstation, concept art, 8k, sharp focus, digitalart, high quality, oil painting, jama jurabaev, brush hard TargetImageStolenImagesTargetImageStolenImagesA full portrait of a beautiful post apocalyptic Bedouin explorer, intricate, elegant, highly detailed, digital painting, artstation, concept art, smooth, sharp focus, illustration, art by KrenzCushartand Artem Demuraand alphonsemuchaa car driving through a foggy field at night, 8k, octane render,smooth, cinematic lighting, cgsociety, volumetric lighting, hyper detailed, by craig mullins, by makotoshinkai, photorealismultra realistic deloreandmc5 with pop -up headlights drifting on ancient highway wreckage in space, dark cinematic, volumetric, realistic, 3 d render, realistic render, cinematic lighting, volumetric lighting, atmospheric, cinematic, unreal engine 5, unreal engine render, octane render, hd, photorealism, hyper realistic, 8 k A full portrait of a beautiful post apocalyptic Bedouin explorer, intricate, elegant, highly detailed, digital painting, artstation, concept art, smooth, sharp focus, illustration, art by KrenzCushartand Artem Demuraand alphonsemuchaa painting of a woman sitting on a rock, artstation, sharp focus, by gregrutkowski, cinematic, digitalart, by wlop, hd, 3d, by craig mullins, pascal blancheTargetImageStolenImagesTargetImageStolenImagesFigure 16: The performance of PromptShield against PromptStealer. The green dot line in the third figure marks the average image
similarity between the target images and the images generated by the corresponding target prompts.
5.1 PromptShield
The adversary relies on machine learning models to real-
ize PromptStealer. To mitigate the attack, one natural so-
lution is to reduce PromptStealer's machine learning mod-
els' performance. So far, the most effective approach in
this field is adversarial examples; thus, we adopt it to estab-
lish PromptShield. Specifically, we aim to add an optimized
noise/perturbation to a target image to obtain a shielded im-
age such that PromptStealer cannot infer the stolen prompt
from the shielded image effectively. PromptShield has two
goals, i.e., effectiveness and utility. High effectiveness indi-
cates the performance of PromptStealer drops significantly
on shielded images; high utility implies perturbations on the
shielded images are imperceptible to humans.
PromptStealer consists of two machine learning models:
an image captioning model and a multi-label classifier. Tech-
nically, PromptShield can generate shielded images against
either of the models or both. Here, we focus on the multi-
label classifier instead of the image captioning model. The
reason is that if PromptShield creates a shielded image to
mislead the image captioning model, then PromptStealer will
obtain a subject misaligned with the shielded image. By
manually checking, the adversary can easily fix the error in
the subject, as we show in Section 4.7, which reduces the ef-
fectiveness of PromptShield. Meanwhile, if the shielded im-
age is against the multi-label classifier, then PromptStealer
will infer a stolen prompt with wrong or missing modifiers.
As each prompt has multiple modifiers and the total number
of modifiers is large, it is not easy for the adversary to spot
which modifiers are missing or wrong.
To generate a shielded image against the multi-label clas-
sifier, PromptShield can choose any or all of the 7,672 la-
bels/modifiers. Here, we choose the modifiers in the artist
category. The reasons are twofold. First, as shown in
Section 3.2, artist modifiers play important roles in driving
the generated images to specific styles. Second, focusing
on artist modifiers also directly protects artists' intellectual
properties.
The concrete process of PromptShield is as follows. For
the modifier set of a target prompt, we first remove all its
artist modifiers to obtain a shielded modifier set. Then,
we optimize a noise for the target image such that the final
shielded image is classified towards the shielded modifier set.
In other words, we do not mislead the multi-label classifier
to classify the shielded image to a different set of artist mod-
ifiers. Instead, we generate the noise that can ideally remove
the artist-related information from the target image. For opti-
mization, we adopt I-FGSM [21]. We set the iterative step to
100 and ε to 0.2. We also evaluate the performance of another
representative method, namely C&W [11]. The performance
is reported in Section A.2 in Appendix. As the design prin-
ciple of PromptShield is general, we further apply it to the
optimization-based baseline attack CLIP Interrogator. The
results are listed in Section A.3 in Appendix. Note that we
assume the defender has white-box access to the multi-label
classifier of PromptStealer. We acknowledge that this is a
strong assumption and the main weakness of our defense.
5.2 Experimental Settings
We follow the same experimental settings in Section 4.3 for
the text-to-image generation model and the attack model.
Evaluation Metric. We design our evaluation metrics based
on the two goals of the defender: effectiveness and utility.
• Effectiveness. We adopt the same quantitative metrics,
i.e., semantic similarity, modifier similarity, and image
similarity, from Section 4.3 as the effectiveness metrics.
• Utility. For utility, we measure the mean squared error
(MSE) between the target image and the shielded im-
age. Lower MSE implies higher utility.
5.3 Quantitative Evaluation
Figure 16 shows the effectiveness of PromptShield. We ob-
serve that the artist modifiers exhibit the greatest reduction
in similarity (from 0.49 to 0.06) while the overall modifier
similarity increases. This is expected, as the shielded image
contains less information related to artist modifiers, the at-
tack model has a higher capacity to predict other modifiers
more accurately. On the other hand, we find that both se-
mantic and image similarities decrease. Concretely, the se-
mantic similarity decreases from 0.66 to 0.62, and the im-
age similarity decreases from 0.79 to 0.71. Considering the
previous worse baseline (the image captioning method) only
gets a 0.65 image similarity, we conclude that PromptShield
achieves strong performance in defending against Prompt-
Stealer.
Regarding utility, we find PromptShield performs well in
producing concealed noise. The average MSE between the
target and shielded images is 0.0007 for PromptStealer which
implies that the added noise is imperceptible to humans.
11
UnshieldedShieldedSemantic Similarity0.00.20.40.6SimilarityUnshieldedShieldedModifier Similarity0.00.20.40.60.8ArtistMediumFlavorMovementTrendingAllUnshieldedShieldedImage Similarity0.00.20.40.60.8on CLIP Interrogator and use the generated noise to de-
fend PromptStealer; however, the experimental results are
not promising.
In addition, our evaluation shows that the
defense performance can be reduced by the adaptive attack,
which trains the multi-label classifier with shielded images
and ground-truth modifiers (see Figure 22 in Appendix). We
emphasize that our goal is to assess whether the defense un-
der a strong assumption is effective, and we hope our re-
sults can provide guidance for developing more advanced de-
fenses in the future.
6 Related Work
6.1 Prompt Engineering
Prompt engineering in text-to-image generation models aims
to improve the quality of generated images by developing
prompt design guidelines [36]. Researchers have approached
this topic from different perspectives. Liu and Chilton [27]
qualitatively investigate what prompt components and model
parameters can produce high-quality images and provide
seven suggestions for prompt design. They emphasize that
using proper modifiers, rather than rephrasing the prompt
with the same modifier set, is a key factor in image gen-
eration quality. Oppenlaender [33] presents a taxonomy of
prompt modifiers based on an ethnographic study and high-
lights the significance of correctly using prompt modifiers.
Pavlichenko and Ustalov [36] study a human-in-the-loop ap-
proach to find the most useful combination of prompt mod-
ifiers with a genetic algorithm. To bypass the laborious hu-
man engineering, Hao et al. [18] then propose prompt adapta-
tion, a framework that automatically adjusts user input to per-
formant prompts with modifiers gathered from Lexica. Over-
all, these works suggest that modifiers, especially proper
modifiers, are crucial in generating high-quality images. In
addition to our data analysis in Section 3.2, these previous
works also inspire the design of PromptStealer.
6.2 Open-Source Prompt Stealing Methods
As text-to-image generation models only gain their popular-
ity recently, prompt stealing is still a very novel problem. So
far, only a few tools in the open-source community can be
tailored to steal prompts [5, 24, 30]. One simple approach is
relying on image captioning models [24, 30]. Mokady et al.
propose ClipCap that connects a CLIP image encoder and a
language model (GPT2) with a simple network to translate
an image into a descriptive sentence [30]. BLIP, proposed by
Li et al., adopts the multimodal mixture of encoder-decoder
architecture and an additional filter to remove the noisy cap-
tions during the caption generation process [24]. However,
these methods fail to reverse prompts satisfactorily because
they do not consider important prompt modifiers. Other
methods for prompt stealing are optimization-based. Among
them, the most famous one is the open-source tool CLIP In-
terrogator [5] that relies on CLIP to iteratively calculate the
similarity between combinations of modifiers and the target
image. However, this method is inefficient due to its iterative
design. Also, it involves many manually defined hyperpa-
rameters. Instead, PromptStealer is the first learning-based
Figure 17: Two defense examples of PromptShield against
PromptStealer. The red color marks the correctly predicted
modifiers.
We observe comparable results when C&W is adopted as
the optimization method for PromptShield (see Section A.2
in Appendix).
In addition, PromptShield also achieves
promising results on CLIP Interrogator (see Section A.3).
5.4 Qualitative Evaluation
Figure 17 shows two defense examples of PromptShield
against PromptStealer.
In both cases, we can see that the
stolen images originating from the shielded images are less
similar to the target images. Take the first target image in
Figure 17 as an example. The target prompt is "Iron Gi-
ant, Retrofuturism, Simon Stålenhag," where "Retrofutur-
ism" is a movement modifier and "Simon Stålenhag" is an
artist modifier. We find that for the unshielded target im-
age, the artist modifier can be successfully stolen by Prompt-
Stealer. However, after applying PromptShield, the attack
model cannot predict the artist modifier from the shielded
image. Moreover, even though the stolen prompt based on
the shielded image contains the correct movement modifier
"Retrofuturism," the stolen images are quite different from
the target image without the artist modifier. Besides, by com-
paring the target and shielded images, we find they are quite
similar, demonstrating the utility of PromptShield.
5.5 Limitations
As mentioned before, PromptShield is effective but it re-
quires a strong assumption for the defender, i.e., white-box
access to the attack model. We have also experimented with
the transfer defense. Concretely, we apply PromptShield
12
amanstandinginfrontofagiantspaceship,artstation,bybeeple,bysimonstalenhag,bysimonstålenhag,lowlevela man sitting on a bench in front of a spaceship, retrofuturismPromptStealeronShieldedImagesagirlinawhiteshirtstandinginaforest,artstation,bywlop,detailed,byrossdraws,bymakotoshinkai,stanleyartgermlau,colorful,detailedface,ambientlightinga girlin a white shirt standing in a forest, stanleyartgermlau, detailed face, ambient lighting, mid shot, single centeredsubjectPromptStealeronShieldedImagesIron Giant, Retrofuturism, Simon Stålenhaggreen recycle girl, single centeredsubject, mid shot, ambient lighting, detailed face, by makotoshinkai, stanleyartgermlau, wlop, rossdrawsUnshieldedShieldedUnshieldedShieldedPromptStealerPromptStealerprompt stealing attack. Based on the experimental results
in Section 4, our approach outperforms the above-mentioned
image captioning methods and optimization-based methods
to a large extent.
In recent years, researchers have uncovered various types
of attacks against machine learning models, such as adversar-
ial examples [11,12,22,23,34,35,47,49], membership infer-
ence [10,14,25,26,31,43,45,46], backdoor [13,17,20,28,29,
32, 41, 44, 52], etc. However, most of these works focus on
classification models. Meanwhile, the security and privacy
vulnerabilities of text-to-image generation models have re-
ceived little attention. To the best of our knowledge, there is
only one work [51] focusing on investigating membership in-
ference attacks against text-to-image generation models. We
hope our study can inspire more research in this field.
7 Conclusion
In this paper, we propose the first prompt stealing attack
against the popular text-to-image generation models. A suc-
cessful prompt stealing attack directly violates the intellec-
tual property and privacy of prompt engineers. Also, it
threatens the business model of prompt trading marketplaces.
In detail, we first collect a dataset Lexica-Dataset and per-
form a large-scale measurement on it to show that a success-
ful prompt stealing attack should consider a target prompt's
subject as well as its modifiers. We then propose the first
learning-based prompt stealing attack, PromptStealer. Ex-
perimental results show that PromptStealer outperforms the
two baseline methods both quantitatively and qualitatively.
We further make the first attempt to investigate the defense
method against PromptStealer.
In general, our study shed
light on the threats existing in the ecosystem created by the
popular text-to-image generation models. We hope our re-
sults can provide guidance to the stakeholders to mitigate the
risks. To facilitate research in this field, we will share our
dataset and code.
References
[1] https://midjourney.com/. 1
[2] https://promptbase.com/. 1, 3, 5
[3] https://www.promptsea.io/. 1, 3
[4] https://visualise.ai/. 1, 3
[5] https://github.com/pharmapsychotic/clip-interrog
ator. 2, 4, 6, 7, 12
[6] https://lexica.art/. 2, 3
[7] https://dallery.gallery/the-dalle-2-prompt-book
/. 5
[8] https://promptdb.ai/. 9, 10
[9] Andrew Brock, Jeff Donahue, and Karen Simonyan. Large
Scale GAN Training for High Fidelity Natural Image Synthe-
sis. In International Conference on Learning Representations
(ICLR), 2019. 2
[10] Nicholas Carlini, Steve Chien, Milad Nasr, Shuang Song, An-
dreas Terzis, and Florian Tramèr. Membership Inference At-
tacks From First Principles. In IEEE Symposium on Security
and Privacy (S&P), pages 1897–1914. IEEE, 2022. 13
[11] Nicholas Carlini and David Wagner. Towards Evaluating the
Robustness of Neural Networks. In IEEE Symposium on Se-
curity and Privacy (S&P), pages 39–57. IEEE, 2017. 11, 13
[12] Jianbo Chen, Michael I. Jordan, and Martin J. Wainwright.
HopSkipJumpAttack: A Query-Efficient Decision-Based At-
In IEEE Symposium on Security and Privacy (S&P),
tack.
pages 1277–1294. IEEE, 2020. 13
[13] Xiaoyi Chen, Ahmed Salem, Michael Backes, Shiqing Ma,
Qingni Shen, Zhonghai Wu, and Yang Zhang. BadNL: Back-
door Attacks Against NLP Models with Semantic-preserving
In Annual Computer Security Applications
Improvements.
Conference (ACSAC), pages 554–569. ACSAC, 2021. 13
[14] Christopher A. Choquette Choo, Florian Tramèr, Nicholas
Carlini, and Nicolas Papernot. Label-Only Membership Infer-
ence Attacks. In International Conference on Machine Learn-
ing (ICML), pages 1964–1974. PMLR, 2021. 13
[15] Katherine Crowson, Stella Biderman, Daniel Kornis, Dashiell
Stander, Eric Hallahan, Louis Castricato, and Edward Raff.
VQGAN-CLIP: Open Domain Image Generation and Editing
with Natural Language Guidance. In European Conference on
Computer Vision (ECCV), pages 88–105. Springer, 2022. 2
[16] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing
Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and
Yoshua Bengio. Generative Adversarial Nets. In Annual Con-
ference on Neural Information Processing Systems (NIPS),
pages 2672–2680. NIPS, 2014. 2
[17] Tianyu Gu, Brendan Dolan-Gavitt, and Siddharth Grag. Bad-
Identifying Vulnerabilities in the Machine Learning
nets:
Model Supply Chain. CoRR abs/1708.06733, 2017. 13
[18] Yaru Hao, Zewen Chi, Li Dong, and Furu Wei. Op-
CoRR
timizing Prompts for Text-to-Image Generation.
abs/2212.09611, 2022. 1, 12
[19] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun.
Deep Residual Learning for Image Recognition. In IEEE Con-
ference on Computer Vision and Pattern Recognition (CVPR),
pages 770–778. IEEE, 2016. 6
[20] Jinyuan Jia, Yupei Liu, and Neil Zhenqiang Gong. BadEn-
coder: Backdoor Attacks to Pre-trained Encoders in Self-
In IEEE Symposium on Security and
Supervised Learning.
Privacy (S&P). IEEE, 2022. 13
[21] Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adver-
sarial Examples in the Physical World. CoRR abs/1607.02533,
2016. 11
[22] Bo Li and Yevgeniy Vorobeychik. Scalable Optimization of
Randomized Operational Decisions in Adversarial Classifica-
tion Settings. In International Conference on Artificial Intelli-
gence and Statistics (AISTATS), pages 599–607. JMLR, 2015.
13
[23] Huichen Li, Xiaojun Xu, Xiaolu Zhang, Shuang Yang, and
Bo Li. QEBA: Query-Efficient Boundary-Based Blackbox At-
In IEEE Conference on Computer Vision and Pattern
tack.
Recognition (CVPR), pages 1218–1227. IEEE, 2020. 13
[24] Junnan Li, Dongxu Li, Caiming Xiong, and Steven C. H. Hoi.
BLIP: Bootstrapping Language-Image Pre-training for Uni-
fied Vision-Language Understanding and Generation. CoRR
abs/2201.12086, 2022. 2, 6, 7, 12
[25] Zheng Li, Yiyong Liu, Xinlei He, Ning Yu, Michael Backes,
and Yang Zhang. Auditing Membership Leakages of Multi-
Exit Networks. In ACM SIGSAC Conference on Computer and
Communications Security (CCS), pages 1917–1931. ACM,
2022. 13
13
[26] Zheng Li and Yang Zhang. Membership Leakage in Label-
Only Exposures. In ACM SIGSAC Conference on Computer
and Communications Security (CCS), pages 880–895. ACM,
2021. 13
[27] Vivian Liu and Lydia B. Chilton. Design Guidelines for
Prompt Engineering Text-to-Image Generative Models. In An-
nual ACM Conference on Human Factors in Computing Sys-
tems (CHI), pages 384:1–384:23. ACM, 2022. 1, 3, 4, 12
[28] Yingqi Liu, Shiqing Ma, Yousra Aafer, Wen-Chuan Lee, Juan
Zhai, Weihang Wang, and Xiangyu Zhang. Trojaning Attack
on Neural Networks. In Network and Distributed System Se-
curity Symposium (NDSS). Internet Society, 2018. 13
[29] Yunfei Liu, Xingjun Ma, James Bailey, and Feng Lu. Re-
flection Backdoor: A Natural Backdoor Attack on Deep Neu-
ral Networks. In European Conference on Computer Vision
(ECCV), pages 182–199. Springer, 2020. 13
[30] Ron Mokady, Amir Hertz, and Amit H. Bermano. ClipCap:
CLIP Prefix for Image Captioning. CoRR abs/2111.09734,
2021. 2, 12
[31] Milad Nasr, Reza Shokri, and Amir Houmansadr. Compre-
hensive Privacy Analysis of Deep Learning: Passive and Ac-
tive White-box Inference Attacks against Centralized and Fed-
erated Learning. In IEEE Symposium on Security and Privacy
(S&P), pages 1021–1035. IEEE, 2019. 13
[32] Tuan Anh Nguyen and Anh Tran.
Input-Aware Dynamic
Backdoor Attack. In Annual Conference on Neural Informa-
tion Processing Systems (NeurIPS). NeurIPS, 2020. 13
[33] Jonas Oppenlaender. A Taxonomy of Prompt Modifiers for
Text-To-Image Generation. CoRR abs/2204.13988, 2022. 1,
3, 4, 12
[34] Nicolas Papernot, Patrick D. McDaniel, Ian Goodfellow,
Somesh Jha, Z. Berkay Celik, and Ananthram Swami. Prac-
tical Black-Box Attacks Against Machine Learning. In ACM
Asia Conference on Computer and Communications Security
(ASIACCS), pages 506–519. ACM, 2017. 13
[35] Nicolas Papernot, Patrick D. McDaniel, Somesh Jha, Matt
Fredrikson, Z. Berkay Celik, and Ananthram Swami. The
Limitations of Deep Learning in Adversarial Settings. In IEEE
European Symposium on Security and Privacy (Euro S&P),
pages 372–387. IEEE, 2016. 13
[36] Nikita Pavlichenko and Dmitry Ustalov. Best Prompts for
CoRR
Text-to-Image Models and How to Find Them.
abs/2209.11711, 2022. 12
[37] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya
Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry,
Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen
Krueger, and Ilya Sutskever. Learning Transferable Visual
Models From Natural Language Supervision. In International
Conference on Machine Learning (ICML), pages 8748–8763.
PMLR, 2021. 4
[38] Aditya Ramesh, Prafulla Dhariwal, Alex Nichol, Casey Chu,
and Mark Chen. Hierarchical Text-Conditional Image Gen-
eration with CLIP Latents. CoRR abs/2204.06125, 2022. 1,
2
[39] Tal Ridnik, Gilad Sharir, Avi Ben-Cohen, Emanuel Ben
Baruch, and Asaf Noy. ML-Decoder: Scalable and Versatile
Classification Head. CoRR abs/2111.12933, 2021. 6
[40] Robin Rombach, Andreas Blattmann, Dominik Lorenz,
Patrick Esser, and Björn Ommer. High-Resolution Image Syn-
In IEEE Conference
thesis with Latent Diffusion Models.
on Computer Vision and Pattern Recognition (CVPR), pages
10684–10695. IEEE, 2022. 1, 2
[41] Aniruddha Saha, Akshayvarun Subramanya, and Hamed Pir-
In AAAI Con-
siavash. Hidden Trigger Backdoor Attacks.
ference on Artificial Intelligence (AAAI), pages 11957–11965.
AAAI, 2020. 13
[42] Chitwan Saharia, William Chan, Saurabh Saxena, Lala Li, Jay
Whang, Emily Denton, Seyed Kamyar Seyed Ghasemipour,
Burcu Karagol Ayan, S. Sara Mahdavi, Rapha Gontijo Lopes,
Tim Salimans, Jonathan Ho, David J. Fleet, and Mohammad
Norouzi. Photorealistic Text-to-Image Diffusion Models with
Deep Language Understanding. CoRR abs/2205.11487, 2022.
2
[43] Ahmed Salem, Yang Zhang, Mathias Humbert, Pascal
Berrang, Mario Fritz, and Michael Backes. ML-Leaks: Model
and Data Independent Membership Inference Attacks and De-
In Network and Dis-
fenses on Machine Learning Models.
tributed System Security Symposium (NDSS). Internet Society,
2019. 13
[44] Xinyue Shen, Xinlei He, Zheng Li, Yun Shen, Michael
Backes, and Yang Zhang. Backdoor Attacks in the Supply
Chain of Masked Image Modeling. CoRR abs/2210.01632,
2022. 13
[45] Reza Shokri, Marco Stronati, Congzheng Song, and Vitaly
Shmatikov. Membership Inference Attacks Against Machine
Learning Models. In IEEE Symposium on Security and Pri-
vacy (S&P), pages 3–18. IEEE, 2017. 13
[46] Liwei Song, Reza Shokri, and Prateek Mittal. Privacy Risks of
Securing Machine Learning Models against Adversarial Ex-
amples. In ACM SIGSAC Conference on Computer and Com-
munications Security (CCS), pages 241–257. ACM, 2019. 13
[47] Florian Tramèr, Alexey Kurakin, Nicolas Papernot, Ian Good-
fellow, Dan Boneh, and Patrick McDaniel. Ensemble Adver-
sarial Training: Attacks and Defenses. In International Con-
ference on Learning Representations (ICLR), 2017. 13
[48] Laurens van der Maaten and Geoffrey Hinton. Visualizing
Data using t-SNE. Journal of Machine Learning Research,
2008. 4
[49] Yevgeniy Vorobeychik and Bo Li. Optimal Randomized Clas-
sification in Adversarial Settings. In International Conference
on Autonomous Agents and Multi-agent Systems (AAMAS),
pages 485–492. IFAAMAS/ACM, 2014. 13
[50] Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu, Andrew Tao,
Jan Kautz, and Bryan Catanzaro. High-Resolution Image Syn-
thesis and Semantic Manipulation With Conditional GANs. In
IEEE Conference on Computer Vision and Pattern Recogni-
tion (CVPR), pages 8798–8807. IEEE, 2018. 6
[51] Yixin Wu, Ning Yu, Zheng Li, Michael Backes, and Yang
Zhang. Membership Inference Attacks Against Text-to-image
Generation Models. CoRR abs/2210.00968, 2022. 13
[52] Yuanshun Yao, Huiying Li, Haitao Zheng, and Ben Y. Zhao.
Latent Backdoor Attacks on Deep Neural Networks. In ACM
SIGSAC Conference on Computer and Communications Secu-
rity (CCS), pages 2041–2055. ACM, 2019. 13
14
Algorithm 1: Pseudocode for CLIP Interrogator
(version 2.0)
Input: Target image X, keywords List K f lavor, Kartist ,
Kmedium, Kmovement , Ktrending
Output: Predicted prompt p
1 Function FindTopK(vimage, text_list, K):
2
vt = CLIP(text_list)
sim = Sim(vimage, vt )
t = FindTopKItem(text_list, sim, K)
return t;
3
4
5
6
7 Function Sim(vimage, vt ):
8
vimage = normalize(vimage)
vt = normalize(vt )
return matrix_multiplication(vimage, vT
t )
9
10
11
12 Function Main:
// get the subject
p = BLIP(X)
// get the clip image embedding of
target image
vx = CLIP(X)
// find top1 modifiers in 4 categories
kartist = FindTopK (vx, Kartist ,1)
kmedium = FindTopK (vx, Kmedium,1)
kmovement = FindTopK (vx, Kmovement ,1)
ktrending = FindTopK (vx, Ktrending,1)
// get candidate prompt list
tpertubation = GetPertubations(p, kartist , kmedium,
kmovement , ktrending)
// find the best prompt
p = FindTopK (vx, tpertubation,1)
vp = CLIP(p)
simbest = Sim(vimage, vp)
// find top 2048 flavor modifiers
k f lavor = FindTopK (vx, K f lavor, 2048)
// loop 25 times, add the best flavor
modifier to prompt until similarity
satures
for i to 25 do
p f lavors = [ p + "," + k for k in k f lavor]
p = FindTopK (vx, p f lavors, 1)
kbest = p.split(",")[-1]
k f lavor remove kbest
Vp = CLIP(p)
sim = Sim(vimage, vp)
if sim » simbest then
simbest = sim
else
break
return p
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
A Appendix
A.1 Algorithm for CLIP Interogator
A.2 PromptShield With C&W
C&W is another representative method in generating adver-
sarial examples. Different from I-FGSM, C&W utilizes two
losses to control the attack effectiveness and utility. In our
experiments, we set the iterative step to 100, the learning rate
to 0.05, and the loss trade-off hyperparameter to 0.001.
Quantitative Evaluation. Figure 18 reports the effective-
ness of PromptShield (C&W). We observe that semantic,
modifier, and image similarities decrease from 0.66, 0.43,
and 0.79 to 0.58, 0.21, and 0.74, respectively. Similar to
the results shown in Figure 16, the artist modifiers drop the
greatest in similarity (from 0.49 to 0.13). Regarding utility,
we find C&W also produces invisible noise. The average
MSE between the target and shielded images is 0.08.
Qualitative Evaluation. Figure 19 shows two defense ex-
amples of PromptShield (C&W) against PromptStealer. In
both cases, we can see that the stolen images from the
shielded images are very different from the target images.
Besides, we find that C&W tends to lead the stolen images
to mispredict the artist modifiers. For instance, in the first
target image in Figure 19, the artist modifier in the target
prompt is "Simon Stålenhag." After adding concealed noise,
the stolen prompt contains some unexpected artist modifiers,
such as "donato giancola" and "studio ghibli," which mislead
the stolen images to a disparate style.
A.3 PromptShield Against CLIP Interrogator
As PromptShield adds perturbations to mislead the attack
model, it can be easily migrated to any other prompt stealing
attacks relying on machine learning models. In this experi-
ment, we show the generality of PromptShield via applying
it against CLIP Interrogator. Specifically, we use I-FGSM as
the optimization method as it produces smaller noise on the
target images (see Section 5.3 and Section A.2). We follow
the same experiment settings in Section 5.2.
Quantitative Evaluation.
Similar to PromptShield on
PromptStealer, we observe the semantic, modifier, and im-
age similarities decrease significantly for CLIP Interrogator
(see Figure 20). Specifically, the values of these metrics de-
crease from 0.52, 0.0108, and 0.77 to 0.33, 0.0059, and 0.51,
respectively. By examining the changes in different modifier
categories, we find that the artist modifiers have the greatest
drops in similarity (from 0.04 to 0.01). Besides, the noise
is minimal, i.e., the average MSE between the target and
shielded images is 0.0002.
Qualitative Evaluation. Figure 21 shows two defense ex-
amples of PromptShield against CLIP Interrogator. In both
examples, we find that the addition of imperceptible noise
successfully misleads the attack model, i.e., the stolen im-
ages from the shielded images are quite different from the
target images. We also observe that the shielded images lead
CLIP Interrogator to predict incorrect modifiers. Take the
first case in Figure 21 as an example. The stolen prompt
deriving from the shielded image contains modifiers like
15
Figure 18: The performance of PromptShield (C&W) against PromptStealer. The green dot line in the third figure marks the average
image similarity between the target images and the images generated by the corresponding target prompts.
Figure 19: Two defense examples of PromptShield (C&W) against PromptStealer. The red color marks the correctly predicted modi-
fiers.
"holography," "m 1 abrams tank," "incredible post - process-
ing lighting," and "brain scan." However, non of the modi-
fiers belong to the target modifier set, resulting in the dissim-
ilarity between the stolen images and the target image.
16
UnshieldedShieldedSemantic Similarity0.00.20.40.6SimilarityUnshieldedShieldedModifier Similarity0.00.20.40.60.8ArtistMediumFlavorMovementTrendingAllUnshieldedShieldedImage Similarity0.00.20.40.60.8amanstandinginfrontofagiantspaceship,artstation,bybeeple,bysimonstalenhag,bysimonstålenhag,lowlevela man sitting on a bench in a futuristic city, artstation, 8k, by donatogiancola, by studio ghibli, by victongai, by waynebarlowe, by timhildebrandt, by brucepenningtonPromptStealeronShieldedImagesagirlinawhiteshirtstandinginaforest,artstation,bywlop,detailed,byrossdraws,bymakotoshinkai,stanleyartgermlau,colorful,detailedface,ambientlightinga girlstanding in front of a tree, artstation, matte painting, by conradroset, watercolor, ink stylePromptStealeronShieldedImagesIron Giant, Retrofuturism, Simon Stålenhaggreen recycle girl, single centeredsubject, mid shot, ambient lighting, detailed face, by makotoshinkai, stanleyartgermlau, wlop, rossdrawsUnshieldedShieldedUnshieldedShieldedPromptStealerPromptStealerFigure 20: The performance of PromptShield against CLIP Interrogator. The green dot line in the third figure marks the average
image similarity between the target images and the images generated by the corresponding target prompts.
Figure 21: Two defense examples of PromptShield against CLIP Interrogator. The red color marks the correctly predicted modifiers.
Figure 22: The performance of PromptShield against PromptStealer. Shielded (Adaptive) represents the adaptive attack's perfor-
mance. The green dot line in the third figure marks the average image similarity between the target images and the images generated
by the corresponding target prompts.
17
UnshieldedShieldedSemantic Similarity0.00.20.40.6SimilarityUnshieldedShieldedModifier Similarity0.00.20.40.60.8ArtistMediumFlavorMovementTrendingAllUnshieldedShieldedImage Similarity0.00.20.40.60.8a man standing in front of a giantspaceship, cyberpunk art, simonstalenhag, procreate on behance, ship control panel close -up, low-emission-neon, wipeout2 0 4 8, futurism aesthetic, ai assisted digital painting, ( cyberpunk ) a man standing in front of a giantspaceship, holography, m 1 abramstank, incredible post -processing lighting, brain scanUnshieldedShieldedCLIPInterrogatorCLIPInterrogatoronShieldedImagesa girlin a white shirt standing in a forest, a detailedpainting, cgsociety, anime keyframe, studio ghibliepic character withd, android wlop, live 2d, 千葉雄大, ( ( ( ( jungle ) ) ) ) a girlin a white shirt standing in a forest, a photo, titian, glitches, justinbieber, (((winking))), detail ", yiosgsghdUnshieldedShieldedCLIPInterrogatorCLIPInterrogatoronShieldedImagesIron Giant, Retrofuturism, Simon Stålenhaggreen recycle girl, single centeredsubject, mid shot, ambient lighting, detailed face, by makotoshinkai, stanleyartgermlau, wlop, rossdrawsUnshieldedShieldedShielded(Adaptive)Semantic Similarity0.00.20.40.6SimilarityUnshieldedShieldedShielded(Adaptive)Modifier Similarity0.00.20.40.60.8ArtistMediumFlavorMovementTrendingAllUnshieldedShieldedShielded(Adaptive)Image Similarity0.00.20.40.60.8 |
|
http://arxiv.org/abs/2302.09921v2 | 2023-07-17T00:59:31 | 2023-02-20T11:34:16 | Free-Form Variational Inference for Gaussian Process State-Space Models | Gaussian process state-space models (GPSSMs) provide a principled and
flexible approach to modeling the dynamics of a latent state, which is observed
at discrete-time points via a likelihood model. However, inference in GPSSMs is
computationally and statistically challenging due to the large number of latent
variables in the model and the strong temporal dependencies between them. In
this paper, we propose a new method for inference in Bayesian GPSSMs, which
overcomes the drawbacks of previous approaches, namely over-simplified
assumptions, and high computational requirements. Our method is based on
free-form variational inference via stochastic gradient Hamiltonian Monte Carlo
within the inducing-variable formalism. Furthermore, by exploiting our proposed
variational distribution, we provide a collapsed extension of our method where
the inducing variables are marginalized analytically. We also showcase results
when combining our framework with particle MCMC methods. We show that, on six
real-world datasets, our approach can learn transition dynamics and latent
states more accurately than competing methods. | [
"Xuhui Fan",
"Edwin V. Bonilla",
"Terence J. O'Kane",
"Scott A. Sisson"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09921v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09921v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"stat.ML"
] | 3
2
0
2
l
u
J
7
1
]
G
L
.
s
c
[
2
v
1
2
9
9
0
.
2
0
3
2
:
v
i
X
r
a
Free-Form Variational Inference for Gaussian Process State-Space Models
Xuhui Fan 1 Edwin V. Bonilla 2 Terence J. O'Kane 3 Scott A. Sisson 4
Abstract
Gaussian process state-space models (GPSSMs)
provide a principled and flexible approach to mod-
eling the dynamics of a latent state, which is
observed at discrete-time points via a likelihood
model. However, inference in GPSSMs is compu-
tationally and statistically challenging due to the
large number of latent variables in the model and
the strong temporal dependencies between them.
In this paper, we propose a new method for in-
ference in Bayesian GPSSMs, which overcomes
the drawbacks of previous approaches, namely
over-simplified assumptions, and high computa-
tional requirements. Our method is based on free-
form variational inference via stochastic gradient
Hamiltonian Monte Carlo within the inducing-
variable formalism. Furthermore, by exploiting
our proposed variational distribution, we provide
a collapsed extension of our method where the
inducing variables are marginalized analytically.
We also showcase results when combining our
framework with particle MCMC methods. We
show that, on six real-world datasets, our ap-
proach can learn transition dynamics and latent
states more accurately than competing methods.
1. Introduction
State-space models (SSMs; Murphy, 2023, Ch. 29) charac-
terize the underlying dynamics of a latent state given a set
of observations via a transition function and an observation
model. As a modeling framework, they provide a general ap-
proach for understanding time-series data (Kitagawa, 1987)
and for data assimilation problems (Katzfuss et al., 2016).
Applications of SSMs abound and span diverse areas such
as econometrics (Tsay, 2005), control engineering (Ogata
et al., 2010) and neuroscience (Brown et al., 1998).
1University of Newcastle, Australia 2CSIRO's Data61, Aus-
tralia 3CSIRO's Environment, Australia 4University of New
South Wales, Australia.
Correspondence to: Xuhui Fan
<[email protected]>.
Proceedings of the 40 th International Conference on Machine
Learning, Honolulu, Hawaii, USA. PMLR 202, 2023. Copyright
2023 by the author(s).
1
In this paper, we focus on Bayesian SSMs, where the transi-
tion function describing the dynamics of the system is given
a prior distribution. A paradigmatic example of Bayesian
SSMs are Gaussian process state-space models (GPSSMs;
Frigola, 2015), where this prior distribution is a Gaussian
process (GP; Williams & Rasmussen, 2006). Due to their
Bayesian non-parametric nature, GPSSMs represent a prin-
cipled and flexible approach to Bayesian SSMs.
However, the flexibility of Gaussian processs (GPs) adds
significant computational and statistical challenges to the
already difficult problem of inference in Bayesian SSMs. In-
deed, even for non-Bayesian SSMs, standard problems such
as filtering, smoothing, and prediction are, in general, ana-
lytically intractable1. Having a GP prior over the transition
function in SSMs increases the number of latent variables
significantly; incorporates strong (and potentially long-term)
dependencies across states; and introduces a cubic time com-
plexity as a function of the number of observations.
Within the GP community, significant advances have been
made addressing the computational issues in GP regression
and classification problems, most notably using inducing-
variable approximations (Titsias, 2009; Hensman et al.,
2015; Rossi et al., 2021) but also random-feature expansions
(Cutajar et al., 2017; Marmin & Filippone, 2022) and, more
recent innovative approaches such as the Vecchia approxi-
mation (Sauer et al., 2022). Although these approximations
are applicable to GP-based dynamic models, the challenges
above remain prevalent within the context of GPSSMs.
Nevertheless, previous approaches have developed insight-
ful and practical algorithms for inference in GPSSMs,
mainly based on inducing-variable approximations, which is
also our main underpinning methodology for scalable GPs.
In outlining the most relevant approaches, our main object
of interest is the approximate joint posterior over state tra-
jectories x0:T and inducing variables u, q(x0:T , u), where
T + 1 is the length of the trajectory. We consider two main
aspects of this joint distribution: (i) whether the dependen-
cies between state trajectories and inducing variables are
captured and (ii) whether their corresponding distributions
are unconstrained, i.e., not restricted to a sub-optimal para-
metric form. The seminal variational Gaussian process state
1With the notable exception of the linear-Gaussian case where
the optimal solution is given by the Kalman filter (Kalman, 1960).
Free-Form Variational Inference for Gaussian Process State-Space Models
space model (VGPSSM) proposed by Frigola et al. (2014)
as well as the subsequent identifiable Gaussian process state
space model (IGPSSM) of Eleftheriadis et al. (2017) use
mean-field approaches, therefore, ignoring the posterior de-
pendencies between state trajectories and inducing variables.
The more recent methods, namely the probabilistic recur-
rent state space model (PRSSM) of Doerr et al. (2018) and
the variationally coupled dynamic trajectories (VCDT) of
Ialongo et al. (2019) introduce couplings across state trajec-
tories and inducing variables. However, their posteriors are
constrained to be Gaussians. Thus, these previous works
have either assumed independence between state trajecto-
ries and inducing variables or imposed strong parametric
constraints in their corresponding posteriors or both.
As shown by Ialongo et al. (2019), a mean-field posterior
can yield poor practical performance. Similarly, a Gaussian
assumption on the state posterior or the inducing variable
posterior is also very strong and, by definition, will not gen-
erally capture the true posterior even in the limit of infinite
computation. To address these issues, we propose a free-
form variational inference approach to posterior estimation
in GPSSMs that models the full joint distribution over states
and inducing variables, q(x0:T , u), without any mean-field
or parametric assumptions. We refer to our method as free-
form variational dynamics (FFVD) and summarize the major
differences between its posterior assumptions and those of
previous approaches in Table 1. Below we describe our
contributions in more detail.
(i) Flexible posterior: We develop FFVD, an inference
algorithm for GPSSMs based on stochastic gradient Hamil-
tonian Monte Carlo (SGHMC; Chen et al., 2014; Havasi
et al., 2018), which represents the posterior over states and
inducing variables using samples. FFVD lifts the limitations
of previous variational approaches to GPSSMs, which have
ignored couplings in this posterior or have assumed a con-
strained parametric form. More precisely, FFVD captures
the posterior correlations between states and inducing vari-
ables; does not constrain this posterior to any parametric
form, and, is scalable to a large number of observations.
(ii) Collapsed inference that accelerates convergence: we
show that (i) our formulation allows us to collapse the in-
ducing variables u, (ii) sample from the lower-dimensional
marginal q(x0:T ) and, at the end of the sampling procedure,
(iii) obtain samples from the conditional q(u | x0:T ), for
which we derive a closed-form expression. We show that
collapsing accelerates convergence significantly.
(iii) Extensions with particle Markov chain Monte Carlo
(PMCMC): we further investigate whether more elabo-
rate inference algorithms, such as PMCMC (Andrieu et al.,
2010), that account for the sequential nature of the problem
can provide more accurate posteriors.
(iv) State-of-the-art performance: we showcase the prop-
erties and benefits of our approach compared to previous
methods such as VGPSSM, PRSSM and VCDT in a syn-
thetic example and six system identification benchmarks.
Overall, our method provides state-of-the-art performance
when evaluated on these problems, while having compa-
rable computational requirements to previous approaches.
Our code and supplementary material can be found at
https://github.com/xuhuifan/FFVD.
2. Inference in Gaussian Process Models
Gaussian processs (GPs) are priors over functions where ev-
ery subset of function values follow a Gaussian distribution.
We use f (x) ∼ GP (mf (x), κf (x, x′; θ)) to denote that f
is distributed according to a GP with mean function mf (*)
and covariance function κf (*, *; θ), where θ are referred
to as the GP hyper-parameters2. By definition, a GP prior
over functions implies a finite prior over T function values
f = [f (x1), . . . , f (xT )]⊤, i.e., f ∼ N (f ; m, K), where m
and K are obtained by evaluating the mean function and
covariance function at all the inputs X := {x1, . . . , xT }.
In supervised learning settings, we are given input-output
observations {xt, yt}T
t=1 and a conditional likelihood model
p(y | f ). Inference involves estimating the posterior distribu-
tion p(f | y, X) and the hyper-parameters θ from data. Con-
sequently, we can use these to estimate the posterior predic-
tive distribution at a new point x⋆, i.e., p(f (x⋆) | X, y, x⋆).
Notoriously, these tasks have cubic time complexity as a
function of the number of training observations, i.e., O(T 3),
arising from algebraic operations involving the computa-
tion of the inverse covariance and its log determinant. This
motivates the need for sparse approximations.
2.1. Sparse GP Approximations via Inducing Variables
To deal with the cubic computational complexity of infer-
ence in GP models, we focus on inducing-variable approx-
imations based on variational inference, as originally pro-
posed by Titsias (2009) and made scalable to very large
datasets by Hensman et al. (2013). The main idea of these
approximations is to augment the space of function values
with a set of M inducing variables u := {ui} and their
corresponding inducing inputs Z := {zi}. Thus, inference
involves estimating the posterior q(u, f ) ≈ p(u, f | X, y)
and the GP hyper-parameters θ via variational inference.
Under the assumption that q(u, f ) := q(u)p(f | u) where
p(f | u) is the conditional prior, the variational objective, the
so-called evidence lower bound (ELBO), decomposes over
the observations, and inference can be carried out with time
complexity of O(M 3), providing significant advantages
when M ≪ T .
2We have simply assumed identity mean functions.
2
Free-Form Variational Inference for Gaussian Process State-Space Models
Table 1. Comparison across methods in terms of their assumptions on the variational distribution. The rows refer to whether the variational
posterior captures the dependencies between the state trajectories and the inducing variables (coupled q(x0:T , u)); the distribution over
states is unconstrained (unconstrained q(x0:T | u) or q(x0:T )), i.e., not restricted to a sub-optimal parametric form; and whether the
distribution over the inducing variables is also unconstrained (unconstrained q(u)). Our method is referred to as FFVD.
VGPSSM IGPSSM PRSSM VCDT
FFVD
Coupled q(x0:T , u)
Unconstrained q(x0:T | u) or q(x0:T )
Unconstrained q(u)
✗
✓
✓
✗
✗
✗
✓
✗
✗
✓
✗
✗
✓
✓
✓
3. Gaussian Process State-Space Models
outputs f 1:t−1 and inputs x0:t−2,
Let us assume we are given a time series of T multi-
dimensional observations y1:T and denote their correspond-
ing latent states with x0:T , where x0 is the initial state.
Here we denote the time series xt1:t2 := {xt1, . . . , xt2 },
and similarly for y1:T . In general, xt ∈ Rdx and yt ∈ Rdy .
Gaussian process state-space models (GPSSMs) formulate a
discrete-time state-space model (SSM) where the transition
dynamics is given by a GP. The full generative process is:
x0 ∼ p(x0), f (x) ∼ GP(mf (x), κf (x, x′; θ)),
f t := f (xt−1), xt | f t ∼ N (xt; f t, Q),
yt | xt ∼ p(yt | xt, φ),
(1)
(2)
(3)
where Q is the transition process covariance, and φ is
the vector of parameters of the conditional likelihood
p(yt | xt, φ). Although our framework does not make any
parametric assumptions about this conditional likelihood, in
our experiments in § 7, we adopt the same setting as in pre-
vious works (Ialongo et al., 2019; Doerr et al., 2018) and set
p(yt | xt, φ) := N (yt; Cxt + d, R), with φ = {C, d, R},
where C, d are the weights and bias of the linear transfor-
mation on xt and R is the observation covariance.
3.1. Joint Distribution
As shown by Frigola (2015), to sample f t, instead of con-
ditioning on an infinite-dimensional function, we can con-
dition only on the transitions seen up to (but not including)
time t, i.e., {(xi−1, f i)}t−1
i=1. We can then write the joint
distribution over latent variables and observations as:
p(y1:T , x0:T , f 1:T ) =
p(x0)
T
(cid:89)
t=1
p(f t | f 1:t−1, x0:t−1)p(xt | f t)p(yt | xt),
(4)
p(f t | f 1:t−1, x0:t−1) = p(f t | xt−1, f 1:t−1, x0:t−2)
= N (f t; μf , Σf ),
(5)
(6)
with conditional mean and covariance given by
μf = mt−1 + Kt−1,0:t−2K−1
Σf = Kt−1 − Kt−1,0:t−2K−1
0:t−2(f 1:t−1 − m0:T −2) (7)
0:t−2K0:t−2,t−1),
(8)
where the subscript notation indicates the mean vectors
and covariance matrices obtained from evaluating the mean
function and covariance function, respectively, at the cor-
responding ranges, mt1:t2 := mf (xt1:t2 ), mt := mt:t,
Kt1:t2,t3:t4 := κf (xt1:t2, xt3:t4 ; θ), Kt1:t2 := Kt1:t2,t1:t2
and Kt := Kt:t.
3.2. Multidimensional Latent States & Control Inputs
In the case of multidimensional latent states, i.e., dx > 1, we
assume independent GPs on each dimension, each with its
own mean function and covariance function. Because of this
independence assumption, each GP only has to condition on
its own function evaluations. Therefore, for simplicity in the
notation, we do not index the means and covariances with re-
spect to their dimension d and consider the underlying GPs,
their means, and covariance functions as multi-dimensional.
Furthermore, as we shall see in § 7, our experiments con-
sider additional control inputs (at) that affect the transitions
in a Markovian way. This is easy to incorporate in our
framework by augmenting our input space and, therefore,
indexing the GPs in the higher-dimensional space given by
the concatenation [x⊤, a⊤]⊤. However, since the control
inputs are fixed and deterministic, we do not need to include
them as part of out inference method and do not make them
explicit in our subsequent mathematical development.
3.3. Sparse GPSSM
where p(x0), p(xt | f t), p(yt | xt) are defined as above and,
for the edge case of t = 1, we have: p(f 1 | x0) =
N (f 1; mf (x0), κf (x0, x0; θ)). Furthermore, we recognize
each conditional distribution p(f t | f 1:t−1, x0:t−1) in Eq. (4)
as the GP prediction at a single point xt−1 using noiseless
In order to make the GPSSM inherently scalable, similarly
to the standard supervised regression setting with GPs de-
scribed in § 2, we augment the full GPSSM model with
M inducing variables and corresponding inducing inputs
u := {ui}M
i=1. This gives rise to the
i=1 and Z := {zi}M
3
Free-Form Variational Inference for Gaussian Process State-Space Models
sparse GPSSM model:
p(y1:T , x0:T , f 1:T , u | Z) = p(u | Z)p(x0)
T
(cid:89)
t=1
p(f t | f 1:t−1, x0:t−1, u, Z)p(xt | f t)p(yt | xt),
(9)
where the prior over the inducing variables is determined
by the GP prior, i.e., p(u | Z) = N (mZ, KZ) with mZ :=
mf (Z) and KZ := κf (Z, Z; θ). Besides having a prior
over the inducing variables u, the main difference with
our previous full-model formulation of § 3.1 is that the
conditional distributions over f t have been augmented
with inducing variables u and corresponding inducing in-
puts Z. Each conditional, p(f t | f 1:t−1, x0:t−1, u, Z) =
p(f t | xt−1, f 1:t−1, u, x0:t−2, Z), is the predictive (GP re-
gression) distribution of f t at test input xt−1 when observ-
ing (f 1:t−1, u) at their respective locations (x0:t−2, Z).
4. Free-Form Variational Inference
In this section, we develop a posterior estimation method
using variational inference (VI). We show that under a spe-
cific form of the approximate posterior, we can estimate the
joint posterior over {x0:T , u} in free-form, i.e., optimally,
without making any assumptions such as independence be-
tween state trajectories and inducing variables, typical of
mean-field approaches (Frigola et al., 2014; Eleftheriadis
et al., 2017), or constraining the form of the posterior to
sub-optimal parametric forms (Ialongo et al., 2019; Doerr
et al., 2018).
4.1. Variational Family and Evidence Lower Bound
Variational inference is underpinned by the maximization
of the evidence lower bound (ELBO), which is equivalent
to minimizing the Kullback-Leibler (KL) divergence be-
tween the approximate posterior and the true posterior. This
objective is given by
LELBO(q) := Eq(x0:T ,u,f 1:T ) [log p(y1:T , x0:T , f 1:T , u | Z)
(10)
− log q(x0:T , u, f 1:T )] ,
where p(y1:T , x0:T , f 1:T , u | Z) is the joint distribution in
Eq. (9) and q(x0:T , u, f 1:T ) is our proposed approximate
joint posterior, which we define as
q(f 1:T | x0:T , u) :=
T
(cid:89)
t=1
p(f t | f 1:t−1, x0:t−1, u, Z),
(11)
q(x0:T , u, f 1:T ) := q(x0:T , u)q(f 1:T | x0:T , u).
(12)
It is easy to show that the ELBO, as defined in Eq. (10),
is a lower bound on the log marginal likelihood, i.e.,
LELBO(q) ≤ log p(y | Z). We see that our joint variational
posterior over state trajectories x0:T , inducing variables u
and latent function values f 1:T in Eq. (12) uses the condi-
tional prior over the latent function values in Eq. (11). This
is, of course, an assumption and limits the flexibility of our
approximate posterior. However, all previous scalable varia-
tional approaches to GPSSMs, such as VGPSSM, IGPSSM,
PRSSM and VCDT, have made the very same assumption.
Indeed, these types of approximations where the conditional
prior is used to define the join variational posterior have
become customary and necessary to avoid the cubic time
complexity of inference in GP models. See § 8 for further
discussion on the limitations of our approach.
Nevertheless, our proposed joint variational distribution
in Eq. (12), will allow us to derive an optimal variational
distribution q(x0:T , u) in free-form, without imposing any
parametric constraints over it and, instead, represent it via
samples. We will describe this in the next section.
4.2. Evidence Lower Bound Maximization
Our first step is to expand the expression for the ELBO in
Eq. (10) using our joint model distribution in Eq. (9) and our
proposed variational distribution in Eqs. (11) and (12). We
first note that our definition of the variational distribution
in Eq. (12) uses the same conditional prior as in the joint
distribution in Eq. (9). Therefore, this term cancels out,
avoiding the computation of operations on fully-coupled
high-dimensional distributions over latent functions. Thus,
we have that:
(cid:90)
LELBO(q) =
(cid:40)
q(x0:T , u)
− log q(x0:T , u)
(cid:104)
+ log
p(x0)p(u | Z)
(cid:105)
p(yt | xt)
T
(cid:89)
t=1
+ Eq(f 1:T | x0:T ,u)
(cid:41)
(cid:105)
p(xt | f t)
(cid:104)
log
T
(cid:89)
t=1
dx0:T du.
(13)
Next we aim to maximize the ELBO functional above
with respect to q(x0:T −1, u) subject to the constraint
(cid:82) q(x0:T −1, u) dx0:T −1du = 1. We can do this by solving
the corresponding Euler-Lagrange equation:
(cid:40)
∂
∂q(x0:T , u)
− q(x0:T , u) log q(x0:T , u)
+ q(x0:T , u) log
(cid:104)
p(x0)p(u | Z)
+ q(x0:T , u)Eq(f 1:T | x0:T ,u)
(cid:104)
log
T
(cid:89)
t=1
(cid:105)
p(yt | xt)
T
(cid:89)
t=1
(cid:41)
(cid:105)
p(xt | f t)
= 0.
(14)
4
Free-Form Variational Inference for Gaussian Process State-Space Models
By doing the corresponding derivatives we obtain
−log q(x0:T , u)−1+log
(cid:104)
p(x0)p(u | Z)
(cid:105)
p(yt | xt)
T
(cid:89)
t=1
+ Eq(f 1:T | x0:T ,u)
(cid:104)
log
T
(cid:89)
t=1
(cid:105)
p(xt | f t)
= 0.
(15)
Now the expectation above can be solved in closed form:
Eq(f 1:T | x0:T ,u)
(cid:104)
log
T
(cid:89)
t=1
(cid:105)
p(xt | f t)
T
(cid:88)
=
Ep(f t | xt−1,u,Z) log p(xt | f t)
t=1
T
(cid:88)
(cid:20)
t=1
=
log N (xt; uxt, Q) −
(cid:21)
Tr(Q−1Bt−1)
,
(16)
1
2
where p(f t | xt−1, u, Z) is the GP predictive distribution
over the function values f t at locations xt−1 given the in-
ducing variables u at inducing inputs Z, i.e.,
p(f t | xt−1, u, Z) = N (f t; μxt, Bt−1),
μxt := mt−1 + At−1(u − mZ).
Here we have defined
At−1 := Kt−1,ZK−1
Z ,
Bt−1 := Kt−1 − Kt−1,ZK−1
Z KZ,t−1,
(17)
(18)
(19)
(20)
and the cross-covariance term Kt−1,Z := κf (xt−1, Z; θ)
and similarly for KZ,t−1. Finally, Tr(*) is the trace operator
and, as defined at the beginning of § 3, Q is the transition
noise covariance.
4.2.1. OPTIMAL VARIATIONAL POSTERIOR
With this, we obtain the form of the optimal variational
distribution q∗(u, x0:T ) up to a normalizing constant Zq as:
log q∗(u, x0:T ) = log p(u | Z) + log p(x0)
T
(cid:88)
(cid:104)
+
t=1
log p(yt | xt) + log N (xt; μxt, Q)
−
1
2
(cid:105)
Tr(Q−1Bt−1)
+ log Zq.
(21)
Here we note that the function values f 1:T have, effectively,
been marginalized variationally. The optimal joint posterior
over inducing variables and state trajectories depends on
the prior over the inducing variables p(u | Z) stemming
from the GP functional prior, the prior over the initial state
p(x0) and the conditional likelihood terms p(yt | xt). It also
depends on the resulting transitions mapping xt−1 to xt via
the densities N (xt; μxt, Q), where μxt depends on xt−1
in a nonlinear way, as specified by Eq. (19). The final trace
term, Tr(Q−1Bt−1), can be seen as a regularization term
acting on state transitions, encouraging higher transition
variances and, therefore, helping prevent overfitting.
4.2.2. ALTERNATIVE PERSPECTIVE
An alternative way to obtain the optimal joint posterior
over state trajectories and inducing variable is by bounding
the true log joint marginal log p(y1:T , x0:T , u | Z) using
Jensen's inequality. We give the details in Appendix E.
This has been used by previous work in standard regression
settings (see, e.g., Rossi et al., 2021, and references therein).
However, our setting considers the more complex case of
GPSSMs. Additionally, our development shows much more
clearly the optimal nature of the variational posterior, as we
have obtained it via calculus of variations.
4.3. Posterior Sampling
Having the form of the optimal posterior in Eq. (21), we
can then set the latent variables Ψ := {u, x0:T } and
have ̃q(Ψ) ∝ q(Ψ) ≈ p(Ψ | y1:T ). Thus, we can draw
samples from our approximate posterior using stochas-
tic gradient Hamiltonian Monte Carlo (SGHMC; Chen
et al., 2014; Havasi et al., 2018) and the energy func-
tion U (Ψ) = − log p(Ψ, y1:T ) = − log p(Ψ | y1:T ) +
log Zq ≈ − log ̃q(Ψ) + log Zq. Using this procedure, sam-
ples from the target distribution can be obtained even with
noisy gradients (e.g., with mini-batches) without requiring
the evaluation of Metropolis ratios. Importantly, other vari-
ables such as GP hyper-parameters θ and inducing locations
Z can be easily included in Ψ using suitable priors and
incorporating them in our objective in Eq. (21).
4.3.1. COMPUTATIONAL COST & PRIOR WHITENING
An interesting aspect of GPSSM models is that, despite
their apparent Markovian nature, sampling at time T re-
quires conditioning on all the previous T − 1 points. This
is due to the non-parametric coupled GP prior over the tran-
sition function, making inference in the full model O(T 3)
in time. Sparse variational inference approaches, such as
those based on inducing variable approximations, still re-
quire expectations over entire trajectories and, unlike stan-
dard supervised i.i.d settings, their time complexity is inher-
ently dependent on T . Evaluation of the stochastic gradient
Hamiltonian Monte Carlo (SGHMC) objective in Eq. (21)
for sampling in our free-form variational dynamics (FFVD)
algorithm is O(M 2T ). this is the same cost as that attained
for ELBO evaluation in variationally coupled dynamic trajec-
tories (VCDT), which like our FFVD, models dependencies
between state trajectories and inducing variables.
Here we expand on the details of the computational cost
5
Free-Form Variational Inference for Gaussian Process State-Space Models
of our approach when compared to VCDT. Our SGHMC
objective in Eq. (21) is very similar to the ELBO used in
VCDT. The ELBO in VCDT requires expectations over q(u)
and q(xt, xt−1|u). Given the factorization assumptions and
the Gaussian constraints on these distributions, these ex-
pectations are estimated straightforwardly via Monte Carlo
samples. The time complexity of evaluating Eq. (21) or the
ELBO in VCDT once (using one sample) is the same, i.e.,
O(M 3 + M 2T ).
The overall time complexity of both algorithms, FFVD and
VCDT, depends on (i) the number of samples (noting, again,
that VCDT also requires samples from the approximate
posterior to estimate the gradients of the ELBO) and (ii)
the number of iterations (either the length of the SGHMC
chain in FFVD or the number of epochs for gradient-based
optimization in VCDT). As described in Appendix I, our
experimental setting followed closely that of the original
VCDT paper, which used S = 100 samples for training
and S = 105 for predictions. Similarly, we used S = 100
samples for FFVD. Remarkably, the number of iterations in
our experiments for FFVD was 50, 000 while for VCDT was
200, 000 to achieve convergence. Furthermore, our analysis
in Appendix J shows that, in fact, our FFVD algorithm
converges in less than 10,000 iterations.
As in previous work (see, e.g., Hensman et al., 2015), we
have observed that whitening the prior over the inducing
variables improves the performance of our algorithm. See
details of our whitening procedure and the resulting unnor-
malized log posterior in Appendices D and E.1.
4.4. Smoothing and Predictive Distributions
We are interested in estimating the smoothing dis-
tribution p(x0:T | y1:T ) and the predictive distribution
p(yT +1:T ′ | y1:T ) for T ′ ≥ T . At the end of our SGHMC
procedure, we have S samples from our joint approximate
posterior q(x0:T , u) ≈ p(x0:T | y1:T ), i.e., {x(s)
s=1
and, therefore, the smoothing distribution (i.e., the marginal
posterior over x0:T ) is readily available through this Monte
Carlo approximation.
0:T , u(s)}S
We can also make one-step-ahead predictions using our
posterior samples. In particular, using Eqs. (2) and (17) we
have that:
p(xt | xt−1, u, Z) = N (xt; mt−1 + At−1(u − mZ),
Bt−1 + Q),
(22)
∀t > T . Thus, replacing the values of At−1, Bt−1 using
Eqs. (19) and (20) we can make predictions for the next
6
state using samples as
x(s)
t
t−1, u(s) ∼ N (xt; μ(s)
| x(s)
t = m(s)
μ(s)
t = K(s)
Σ(s)
t−1 + K(s)
t−1 − K(s)
t−1,ZK−1
t−1,ZK−1
, Σ(s)
t ) with
Z (u(s) − mZ),
Z K(s)
Z,t−1 + Q.
t
(23)
| x(s)
For a general likelihood model, we can sample the (noisy)
targets using y(s)
t ∼ p(yt | x(s)
, φ). In the case of a
Gaussian conditional likelihood, as described in § 3, we can
see that given samples from the latent state, the predictive
distribution is a Gaussian
t
t
y(s)
t
| x(s)
t−1, u(s) ∼ N (yt; Cμ(s)
t + d,
CΣ(s)
t C⊤ + R).
(24)
where the samples of {x(s)
running SGHMC on their joint space.
T , u(s)} are readily available after
5. Collapsing Inducing Variables
So far we have described our method to obtain samples from
the optimal variational posterior over the joint distribution of
state trajectories and inducing variables using Eq. (21) and
SGHMC. In this section we show that we can, in fact, inte-
grate out the inducing variables u from our joint variational
distribution and obtain the optimal marginal distribution
for latent states x0:T . We start by retaking Eq. (21) and
isolating the terms that depend on the inducing variables,
(cid:90)
q∗(x0:T ) =
q∗(u, x0:T )du
= p(x0)
T
(cid:89)
u
(cid:20)
p(yt | xt) exp(−
t=1
Tr(Q−1Bt−1))
(cid:21)
1
2
(cid:90)
u
p(u | Z)
T
(cid:89)
t=1
N (xt; μxt, Q)du,
(25)
where we note that μxt, as defined as in Eq. (18), depends
on the inducing variables u. With this, we can complete the
square and identify the terms in the integral as products of
Gaussian distributions, whose normalization constant is a
Gaussian. Therefore, we have
q∗(x0:T ) = p(x0)
(cid:89)
(cid:104)
p(yt|xt) exp(−
t
1
2
Tr(Q−1Bt−1))
N (xt; mt−1, Q)
(cid:105)
/N ( ̃x; 0, ̃Σx),
(26)
Free-Form Variational Inference for Gaussian Process State-Space Models
where the Gaussian in the denominator is determined by
5.2. Particle Markov chain Monte Carlo (PMCMC)
̃x =
T
(cid:88)
t=1
̃Σx = I +
̃A
⊤
t−1Q−1(xt − mt−1),
T
(cid:88)
t=1
̃A
⊤
t−1Q−1 ̃At−1,
̃At−1 = Kt−1,Z(L⊤
Z )−1,
(27)
(28)
(29)
where LZ is the Cholesky decomposition of KZ, i.e., KZ =
LZL⊤
Z . We note here that ̃x is actually a projection of the
cumulative uncorrelated inputs Q−1(xt − mt−1) via the
projection matrix L−1
Z KZ,t−1 and, therefore, ̃x ∈ RM .
Furthermore, in this collapsed version, the terms unrelated
to u are kept the same as those in the original optimal joint
distribution in Eq. (21). The individual Gaussian transitions
for the latent states are now N (xt; mt−1, Q) since u has
been integrated out and we recall that mt−1 = mf (xt−1).
The additional term, which is the inverse of a multivari-
ate Gaussian distribution, records the cumulative projected
trajectory with the corresponding projected variances. Max-
imizing q∗(x0:T ) would tend to minimize this density func-
tion, which pushes the latent states away from 0 and also
decreases the values of the Q regulated variance.
Our algorithm in this collapsed version runs SGHMC using
as energy function Ψ(x0:T ) = − log q(x0:T ) to obtain sam-
ples {x(s)
0:T } from the marginal q∗(x0:T ) and then uses the
closed-form expression for the conditional (Appendix G) to
obtain {u(s)|x(s)
0:T }.
5.1. Advantages of Collapsed Algorithm
Collapsing the inducing variables u will generally tend to
improve the convergence of our algorithm, as we are re-
quired to sample from a significantly lower number of latent
variables. The computational cost is similar to that of the
uncollapsed algorithm since despite avoiding the computa-
Z in p(u | Z), we require a similar term, L−1
tion of K−1
Z , in
the evaluation of the projected Gaussian distributions.
It is important to emphasize one particular difference in our
approach with respect to the closely related VCDT algorithm
of Ialongo et al. (2019). As described before, Ialongo et al.
(2019) also propose a coupled joint posterior between state
trajectories and inducing variables. Their factorization is
qVCDT = q(u)q(x0:T | u), and they impose additional Gaus-
sian constraints on these densities. Our implicit assumed
factorization is qFFVD = q(x0:T )q(u | x0:T ), which allows
us to obtain the optimal variational distribution without im-
posing any additional parametric constraints, integrate out
the inducing variables analytically and get a Monte Carlo
approximation to the optimal marginal q(x0:T ) via samples.
We also provide an expression for the conditional q(u | x0:T )
in closed-form. Details can be found in Appendix G.
It is clear that the latent states are constructed in a Markovian
manner when the transition function f (*) is given, as the
value of the current latent state is dependent on the previous
latent state's value. Therefore, we can use PMCMC methods
(Andrieu et al., 2010) to infer the posterior distribution of
the Markov structured latent states x0:T . This Bayesian
treatment might improve performance over SGHMC, as it
incorporates the sequential nature of the problem into the
sampling algorithm. The advantages of PMCMC over stan-
dard sequential Monte Carlo approaches have been docu-
mented previously, see. e.g., Andrieu et al. (2010). Here we
note that Frigola et al. (2013) also proposed a PMCMC treat-
ment for x0:T . However, their algorithm is very different
from ours as it is based on the fully-independent conditional
approximation (see, e.g., Quinonero-Candela & Rasmussen,
2005). More details can be found in Appendix K.
6. Related Work
We have already described the main differences between our
method and closely-related approaches throughout the pa-
per, e.g., in §§ 1, 4 and 5. We refer the reader to Appendix K
for more details. Other works have considered the GPSSM
in partially observable unstable settings (Curi et al., 2020),
combined variational inference with the Laplace approxima-
tion (Lindinger et al., 2022) or used sample-based inference
with a reduced rank approximation (Svensson et al., 2016).
With regards to scalable GPs, we note they have been the
subject of much research effort in machine learning, with
extensions to more general frameworks such as composi-
tional models (see, e.g., Wilson & Nickisch, 2015; Salim-
beni & Deisenroth, 2017; Yu et al., 2019; Cutajar et al.,
2017; Havasi et al., 2018; Rossi et al., 2021; Duncker et al.,
2019; Heinonen et al., 2018; Hegde et al., 2022; Auzina
et al., 2022; Bui, 2018). Our approach can be seen as a gen-
eralization of the fully-Bayesian supervised learning method
proposed by Rossi et al. (2021) to state-space models, where
we have included the non-trivial component of GP-transition
dynamics and have proposed a collapsed optimal variational
distribution for state trajectories.
Other models for GPs on sequential data have been pro-
posed, see, for example, Frigola (2015) for an excellent
overview. Of interest here is the state-space model view
of GPs that for time-series data with dx = 1 and Marko-
vian covariance functions can provide exact inference in
linear time O(T ) (Solin, 2016). This has been extended to
non-Gaussian likelihood models and made more efficient us-
ing several computational primitives (Nickisch et al., 2018).
More recently, there has been some work on using the sig-
nature kernel (Toth & Oberhauser, 2020; Salvi et al., 2021)
within GP models. In particular, Lemercier et al. (2021)
generalize variational orthogonal features (Burt et al., 2020;
7
Free-Form Variational Inference for Gaussian Process State-Space Models
Figure 1. Results on synthetic data. Left: Observations shown as
green dots, Ground truth as a solid black line, and FFVD's mean
fitting as a dashed red line with one standard deviation error bars.
Right: Histograms of p-values for the hypothesis test that each
marginal posterior over states {xt} (top) and inducing variables
{ui} (bottom) is generated from a Normal distribution.
Figure 2. Training (t <= 150) and test performance (t >= 150)
on the Furnace dataset. The black solid line is the underlying
ground truth signal and the dashed red line is FFVD's mean pre-
diction. The blue solid line indicates the training/test split. An
underlying dx = 4-dimensional latent stated was used.
Hensman et al., 2017) to the sequential case, constructing
inducing variables associated with the signature kernel that
yield a variational inference algorithm that does not require
any matrix inversion.
7. Experiments
We evaluate our FFVD method on synthetic data and on
six real-world system identification benchmarks (Ialongo
et al., 2019; Doerr et al., 2018), comparing it with VGPSSM
(Frigola et al., 2014), PRSSM (Doerr et al., 2018), VCDT
(Ialongo et al., 2019), and use a LSTM network (Hochreiter
& Schmidhuber, 1997) as a baseline non-GP based model.
All experiment details can be found in Appendix I.
7.1. Synthetic Data
Figure 3. Traceplot of the training log-likelihood when using
SGHMC (FFVD-M) and when collapsing the inducing variables
FFVD-C-M. Collapsing generally improved convergence.
gions containing latent states. As the number of latent states
increases, FFVD more accurately approximates the true
function. A lack of fit in regions without latent states is
to be expected. Having a good fit, we are now interested
in knowing whether the true posterior (as estimated by our
algorithm) is close to a Gaussian distribution. The right
panel in Fig. 1 indicates that more than 10% of the latent
states x0:T and more than 50% of the inducing variables
u do not provide enough support for the hypothesis that
their marginal distributions follow a Normal distribution
(see Appendix I). This brings into question the parametric
assumptions over the variational posterior made by previous
work (e.g., Ialongo et al., 2019; Doerr et al., 2018).
7.2. Real-World Data
Here we evaluate the different methods using six system
identification benchmarks with a latent state dimension
dx = 4, as used by Ialongo et al. (2019); Doerr et al. (2018).
See more details in Appendix I.
Predictive performance: The test performance is shown in
Table 2 and Table 3, where we see that FFVD attains the best
NMLL values in three out of the six benchmarks and obtains
lowest RMSE values in four out of the six benchmarks (in
bold). Furthermore, for Actuator and Dryer, FFVD-C-M
ranks second among all the algorithms (underlined). The
performance of VGPSSM and PRSSM is usually worse than
others, which is likely due to their strong mean-field and
parametric assumptions, respectively. LSTM obtains good
performance on three datasets, although its deterministic
structure is different from our random function setting. The
performance of VCDT is the closest to our FFVD methods,
as it models a coupled q(x0:T , u).
We generate data from a sparse GPSSM with a squared expo-
nential covariance function. Our goal here is to investigate
the properties of our FFVD algorithm. Therefore, we fix the
value of all parameters to their ground-truth values except
for the latent states x0:T and the inducing variables u. The
left panel of Fig. 1 illustrates that FFVD effectively learns
the intricate transition function with two modes within re-
Qualitative analysis: In addition to this quantitative eval-
uation, we can see a qualitative illustration of using our
algorithm for predicting the training and test (future) obser-
vations in Fig. 2. This is an example of good generalization,
although it is (of course) not consistent across all problems,
given the limited training data. Finally, we analyze the con-
vergence of our algorithm in Fig. 3, where we see that FFVD-
8
202x420f(x)0100.00.20.40.60.81.0p-value0510050100150200250300t21012y01000020000300004000050000Iterations05101520253035Marginal log-likelihoodFFVD-MFFVD-C-MFree-Form Variational Inference for Gaussian Process State-Space Models
Table 2. Test root mean square error (RMSE) values ± one standard deviations on the real-world system identification benchmarks. Our
method, FFVD, when using SGHMC (FFVD-M); the collapsed version (FFVD-C-M); and when using PMCMC (FFVD-P).
Methods
LSTM
VGPSSM
PRSSM
VCDT
Actuator
Ballbeam
Drive
Dryer
Flutter
Furnace
0.586 ± 0.411
0.027 ± 0.023
0.537 ± 0.108
0.115 ± 0.029
0.912 ± 0.562
1.261 ± 0.610
0.580 ± 0.274
0.497 ± 0.381
0.239 ± 0.040
0.073 ± 0.011
0.059 ± 0.013
0.011 ± 0.002
0.722 ± 0.087
0.813 ± 0.101
0.585 ± 0.017
0.241 ± 0.023
0.017 ± 0.042
0.142 ± 0.003
1.482 ± 0.218
1.371 ± 0.156
1.782 ± 0.324
1.115 ± 0.358
1.243 ± 0.407
1.166 ± 0.011
FFVD-M
0.358 ± 0.242
FFVD-C-M 0.259 ± 0.209
FFVD-P
0.388 ± 0.087
0.019 ± 0.018
0.009 ± 0.011
0.199 ± 0.045
0.673 ± 0.207
0.775 ± 1.615
0.342 ± 0.057
0.205 ± 0.313
0.065 ± 0.112
0.317 ± 0.050
0.280 ± 0.193
0.663 ± 0.189
0.562 ± 0.088
0.571 ± 0.185
0.548 ± 0.051
0.669 ± 0.174
Table 3. Test negative mean log likelihood (NMLL) values ± one standard deviation on the real-world system identification benchmarks.
Methods as in Table 2.
Methods
Ballbeam
Actuator
Furnace
Flutter
Dryer
Drive
1.09 ± 0.11
0.29 ± 0.17
VGPSSM
PRSSM
VCDT
FFVD-M −0.03 ± 0.10
0.92 ± 0.07
0.40 ± 0.09
0.09 ± 0.05
−0.60 ± 0.07
−1.14 ± 0.13
1.23 ± 0.01
1.66 ± 0.01
0.46 ± 0.09
0.52 ± 0.07
−0.02 ± 0.01
−0.08 ± 0.09
2.38 ± 0.21
0.51 ± 0.11
6.13 ± 0.48
0.48 ± 0.33 −0.43 ± 0.05
2.40 ± 0.27
3.46 ± 0.31
7.49 ± 0.07
−0.36 ± 0.02 −0.65 ± 0.01
Table 4. Mean training running times in seconds (T) and mean
RMSE (R) as a function of the number of iterations on Furnace.
Iterations
VGPSSM
PRSSM
VCDT
FFVD-M
10
0.71
1.58
17.44
1.64
26.96
1.39
3.19
1.50
100
5.84
1.49
205.91
1.60
269.71
1.44
26.33
1.44
500
27.96
1.37
1 128.02
1.41
1 613.25
1.33
121.42
0.74
1 000
53.25
1.35
2 137.59
1.40
3 374.78
1.25
238.68
0.75
T
R
T
R
T
R
T
R
C-M uses less iterations (∼ 8 000 iterations) than FFVD-M
(∼ 40 000 iterations) to achieve similar performance. This
confirms the benefits of collapsing the inducing variables
and sampling only on the lower-dimensional space of state
trajectories. We can see these analyses for all benchmarks
in Appendices J.1 and J.2.
Running times: We illustrate the advantages of our ap-
proach when considering running time as a function of the
number of iterations in Table 4. We can clearly see that our
approach is around 10 times faster than PRSSM/VCDT and
obtains the best RMSE values after 100 iterations. VGPSSM
runs fastest at the expense of higher prediction errors. These
time results were done using a Macbook Pro 2021 with
16GB in memory, M1 chip, and 8 cores. It is noted that
caution must be taken with interpreting these results, as they
9
depend on implementation specifics, computer architectures
along with other practical details.
8. Conclusions, Limitations and Future Work
We have presented FFVD, a new variational inference al-
gorithm for GPSSMs. Unlike previous approaches, FFVD
does not make any independence or parametric assumptions
on the joint variational posterior over state trajectories and
inducing variables q(x0:T , u) and, instead, represents the
posterior via samples from the "optimal" variational dis-
tribution. However, as described in § 4.1, despite having
a free-form posterior over state trajectories and inducing
variables, our approach is still an approximation in that it
assumes the conditional posterior over the latent functions
to be the same as the conditional prior. This is a customary
and necessary (albeit questionable) assumption in scalable
variational methods for general GP models.
Our method also assumes independent GPs over the state
dimensions. However, one can expect the dynamics to be
correlated across dimensions, bringing a need for the so-
called multi-output/multi-task GPs. This has been a fairly
extensive area of research and we believe a weight-space
view of such models could be suitable, where dimensions
are correlated through a weight matrix. Approximate infer-
ence algorithms in this setting can be developed in O(dx),
where dx is the state dimensionality, or even independent
of dx (see, e.g., Aglietti et al., 2019, in the context of Cox
process models). As we would like to scale up to very
high-dimensional spaces, we leave this to future work.
Free-Form Variational Inference for Gaussian Process State-Space Models
References
Aglietti, V., Damoulas, T., and Bonilla, E. V. Efficient
inference in multi-task Cox process models. In The 22nd
International Conference on Artificial Intelligence and
Statistics, pp. 537–546. PMLR, 2019.
Andrieu, C., Doucet, A., and Holenstein, R. Particle Markov
chain Monte Carlo methods. Journal of the Royal Statis-
tical Society: Series B (Statistical Methodology), 72(3):
269–342, 2010.
Auzina, I. A., Yildiz, C., and Gavves, E. Latent GP-ODEs
with informative priors. In A causal view on dynamical
systems, NeurIPS 2022 workshop, 2022.
Bauer, M., van der Wilk, M., and Rasmussen, C. E. Under-
standing probabilistic sparse Gaussian process approx-
imations. Advances in neural information processing
systems, 29, 2016.
Brown, E. N., Frank, L. M., Tang, D., Quirk, M. C., and
Wilson, M. A. A statistical paradigm for neural spike train
decoding applied to position prediction from ensemble
firing patterns of rat hippocampal place cells. Journal of
Neuroscience, 18(18):7411–7425, 1998.
Doerr, A., Daniel, C., Schiegg, M., Duy, N.-T., Schaal, S.,
Toussaint, M., and Sebastian, T. Probabilistic recurrent
state-space models. In ICML, pp. 1280–1289, 2018.
Duncker, L., Bohner, G., Boussard, J., and Sahani, M.
Learning interpretable continuous-time models of latent
In Proceedings of the
stochastic dynamical systems.
36th International Conference on Machine Learning, pp.
1726–1734, 2019.
Eleftheriadis, S., Nicholson, T., Deisenroth, M., and Hens-
man, J. Identification of Gaussian process state space
models. Advances in neural information processing sys-
tems, 30, 2017.
Frigola, R. Bayesian time series learning with Gaussian
processes. PhD thesis, University of Cambridge, 2015.
Frigola, R., Lindsten, F., Sch ̈on, T. B., and Rasmussen,
C. E. Bayesian inference and learning in Gaussian process
state-space models with particle MCMC. In NIPS, pp.
3156–3164, 2013.
Frigola, R., Chen, Y., and Rasmussen, C. E. Variational
Gaussian process state-space models. In NIPS, pp. 3680–
3688, 2014.
Bui, T. D. Efficient Deterministic Approximate Bayesian
Inference for Gaussian Process models. PhD thesis, Uni-
versity of Cambridge, 2018.
Havasi, M., Hern ́andez-Lobato, J. M., and Murillo-Fuentes,
J. J. Inference in deep Gaussian processes using stochastic
gradient Hamiltonian Monte Carlo. NeurIPS, 31, 2018.
Burt, D. R., Rasmussen, C. E., and van der Wilk,
M. Variational orthogonal features. arXiv preprint
arXiv:2006.13170, 2020.
Chen, T., Fox, E., and Guestrin, C. Stochastic gradient
In ICML, pp. 1683–1691.
Hamiltonian Monte Carlo.
PMLR, 2014.
Curi, S., Melchior, S., Berkenkamp, F., and Krause, A.
Structured variational inference in partially observable
unstable Gaussian process state space models. In Bayen,
A. M., Jadbabaie, A., Pappas, G., Parrilo, P. A., Recht,
B., Tomlin, C., and Zeilinger, M. (eds.), Proceedings
of the 2nd Conference on Learning for Dynamics and
Control, volume 120 of Proceedings of Machine Learning
Research, pp. 147–157. PMLR, 10–11 Jun 2020.
Cutajar, K., Bonilla, E. V., Michiardi, P., and Filippone, M.
Random feature expansions for deep Gaussian processes.
In Precup, D. and Teh, Y. W. (eds.), Proceedings of the
34th International Conference on Machine Learning, vol-
ume 70 of Proceedings of Machine Learning Research,
pp. 884–893. PMLR, 06–11 Aug 2017.
Hegde, P., Yıldız, c., L ̈ahdesm ̈aki, H., Kaski, S., and
Heinonen, M. Variational multiple shooting for Bayesian
ODEs with Gaussian processes. In Proceedings of the
Thirty-Eighth Conference on Uncertainty in Artificial In-
telligence, pp. 790–799, 2022.
Heinonen, M., Yildiz, C., Mannerstr ̈om, H., Intosalmi, J.,
and L ̈ahdesm ̈aki, H. Learning unknown ODE models
In Proceedings of the 35th
with Gaussian processes.
International Conference on Machine Learning, pp. 1959–
1968, 2018.
Hensman, J., Fusi, N., and Lawrence, N. D. Gaussian
processes for big data. In Uncertainty in Artificial Intelli-
gence. AUAI Press, 2013.
Hensman, J., Matthews, A. G., Filippone, M., and Ghahra-
mani, Z. MCMC for variationally sparse Gaussian pro-
cesses. In NIPS, pp. 1648–1656, 2015.
Hensman, J., Durrande, N., Solin, A., et al. Variational
Fourier features for Gaussian processes. J. Mach. Learn.
Res., 18(1):5537–5588, 2017.
D'agostino, R. and Pearson, E. S. Tests for departure from
Hochreiter, S. and Schmidhuber, J. Long short-term memory.
normality. Biometrika, 60(3):613–622, 1973.
Neural computation, 9(8):1735–1780, 1997.
10
Free-Form Variational Inference for Gaussian Process State-Space Models
Ialongo, A. D., Van Der Wilk, M., Hensman, J., and Ras-
mussen, C. E. Overcoming mean-field approximations in
recurrent Gaussian process models. In ICML, pp. 2931–
2940, 2019.
I., Luxburg, U. V., Bengio, S., Wallach, H., Fergus, R.,
Vishwanathan, S., and Garnett, R. (eds.), Advances in
Neural Information Processing Systems, volume 30. Cur-
ran Associates, Inc., 2017.
Kalman, R. E. A New Approach to Linear Filtering and
Prediction Problems. Journal of Basic Engineering, 82
(1):35–45, 1960. doi: 10.1115/1.3662552.
Katzfuss, M., Stroud, J. R., and Wikle, C. K. Understand-
ing the Ensemble Kalman Filter. The American Statisti-
cian, 70(4):350–357, 2016. doi: 10.1080/00031305.2016.
1141709.
Kitagawa, G. Non-Gaussian state-space modeling of non-
stationary time series. Journal of the American statistical
association, 82(400):1032–1041, 1987.
Lemercier, M., Salvi, C., Cass, T., Bonilla, E. V., Damoulas,
T., and Lyons, T. J. SigGPDE: Scaling sparse Gaussian
processes on sequential data. In International Conference
on Machine Learning, pp. 6233–6242. PMLR, 2021.
Lindinger, J., Rakitsch, B., and Lippert, C. Laplace ap-
proximated Gaussian process state-space models. In The
38th Conference on Uncertainty in Artificial Intelligence,
2022.
Marmin, S. and Filippone, M. Deep gaussian processes
for calibration of computer models (with discussion).
Bayesian Analysis, 17(4):1301–1350, 2022.
Murphy, K. P. Probabilistic Machine Learning: Advanced
Topics. MIT Press, 2023. URL http://probml.
github.io/book2.
Nickisch, H., Solin, A., and Grigorevskiy, A. State space
Gaussian processes with non-Gaussian likelihood. In Dy,
J. and Krause, A. (eds.), Proceedings of the 35th Inter-
national Conference on Machine Learning, volume 80
of Proceedings of Machine Learning Research, pp. 3789–
3798. PMLR, 10–15 Jul 2018.
Ogata, K. et al. Modern control engineering, volume 5.
Prentice hall Upper Saddle River, NJ, 2010.
Quinonero-Candela, J. and Rasmussen, C. E. A unify-
ing view of sparse approximate Gaussian process regres-
sion. The Journal of Machine Learning Research, 6:
1939–1959, 2005.
Rossi, S., Heinonen, M., Bonilla, E., Shen, Z., and Filip-
pone, M. Sparse Gaussian processes revisited: Bayesian
approaches to inducing-variable approximations. In AIS-
TATS, pp. 1837–1845, 2021.
Salimbeni, H. and Deisenroth, M. Doubly stochastic varia-
tional inference for deep Gaussian processes. In Guyon,
Salvi, C., Cass, T., Foster, J., Lyons, T., and Yang, W. The
signature kernel is the solution of a Goursat PDE. SIAM
Journal on Mathematics of Data Science, 3(3):873–899,
2021.
Sauer, A., Cooper, A., and Gramacy, R. B. Vecchia-
approximated deep Gaussian processes for computer ex-
periments. Journal of Computational and Graphical
Statistics, 0(0):1–14, 2022.
Solin, A. Stochastic differential equation methods for spatio-
temporal Gaussian process regression. PhD thesis, Aalto
University, 2016.
Svensson, A., Solin, A., S ̈arkk ̈a, S., and Sch ̈on, T. Compu-
tationally efficient Bayesian learning of Gaussian process
state space models. In Proceedings of the 19th Interna-
tional Conference on Artificial Intelligence and Statistics,
pp. 213–221, 2016.
Titsias, M. Variational learning of inducing variables in
sparse Gaussian processes. In AISTATS, pp. 567–574,
2009.
Toth, C. and Oberhauser, H. Bayesian learning from se-
quential data using Gaussian processes with signature
covariances. In International Conference on Machine
Learning, pp. 9548–9560. PMLR, 2020.
Tsay, R. S. Analysis of financial time series. John wiley &
sons, 2005.
Williams, C. K. and Rasmussen, C. E. Gaussian processes
for machine learning. MIT press Cambridge, MA, 2006.
Wilson, A. and Nickisch, H. Kernel interpolation for scal-
able structured Gaussian processes (KISS-GP). In Bach,
F. and Blei, D. (eds.), Proceedings of the 32nd Interna-
tional Conference on Machine Learning, volume 37 of
Proceedings of Machine Learning Research, pp. 1775–
1784, Lille, France, 07–09 Jul 2015. PMLR.
Wilson, J. T., Borovitskiy, V., Terenin, A., Mostowsky, P.,
and Deisenroth, M. P. Efficiently sampling functions from
Gaussian process posteriors. 37th International Confer-
ence on Machine Learning, ICML 2020, PartF16814:
10223–10233, 2020.
Yu, H., Chen, Y., Low, B. K. H., Jaillet, P., and Dai, Z. Im-
plicit Posterior Variational Inference for Deep Gaussian
Processes. In Wallach, H., Larochelle, H., Beygelzimer,
A., d'Alch ́e Buc, F., Fox, E., and Garnett, R. (eds.), Ad-
vances in Neural Information Processing Systems 32, pp.
14475–14486. Curran Associates, Inc., 2019.
11
Free-Form Variational Inference for Gaussian Process State-Space Models
A. Basic Results on Gaussian Distributions
A.1. Conditional Gaussian Distribution
Assuming the joint Gaussian distribution p(x) = N (x; μ, Σ) over the random vector x such that:
x =
(cid:21)
(cid:20)xa
xb
, μ =
(cid:21)
(cid:20)μa
μb
, Σ =
(cid:20)Σaa Σab
Σba Σbb,
(cid:21)
where Σba = ΣT
ab, we have that the conditional distributions are given by:
p(xb | xa) = N (xb; μb + ΣbaΣ−1
aa (xa − μa), Σbb − ΣbaΣ−1
aa Σab).
A.2. Expectation over log of Normal Distribution
With an approximate marginal posterior q(f ⋆) and a Normal distribution p(y | f ⋆) of the form:
q(f ⋆) = N (f ⋆; μ⋆, Σ⋆),
p(y | f ⋆) = N (y; f ⋆, Σy),
we can compute
Eq(f ⋆) log p(y | f ⋆) = log N (y; μ⋆, Σy) + Tr(Σ−1
y Σ⋆).
(30)
(31)
(32)
(33)
(34)
B. Posterior Marginal in Sparse GP Models
In variational sparse GP models we usually have the joint Gaussian model p(f ⋆, u) and a posterior distribution over q(u)
with
p(f ⋆) = N (m⋆, K⋆),
p(u) = N (u; mZ, KZ),
Cov(f ⋆, u) = K⋆,Z,
q(u) = N (u; μu, Σu),
q(f ⋆, u) := q(u)p(f ⋆ | u),
(cid:90)
q(f ⋆) =
q(f ⋆, u) du,
(35)
(36)
(37)
(38)
(39)
(40)
and we wish to compute:
where we have omitted conditional dependencies on x⋆ and Z for simplicity in the notation. For example this is necessary
to compute the expectations over the conditional log likelihood term during inferencce or to make predictions on a new test
point. Using Eq. (31) we obtain:
p(f ⋆ | u) = N (f ⋆; m⋆ + K⋆,ZK−1
Z (u − mZ), K⋆ − K⋆,ZK−1
Z KZ,⋆).
(41)
In order to integrate out over q(u) we know that the result is a Gaussian with mean and covariances obtained from the
following linear transformation of u:
f ⋆ = m⋆ + K⋆,ZK−1
Z (u − mZ) + ε,
ε ∼ N (0, K⋆ − K⋆,ZK−1
Z KZ,⋆).
Thus, we obtain:
q(f ⋆) = N (cid:0)f ⋆; m⋆ + K⋆,ZK−1
= N (cid:0)f ⋆; m⋆ + K⋆,ZK−1
Z (μμ − mZ), K⋆,ZK−1
Z (μμ − mZ), K⋆ + K⋆,ZK−1
Z ΣuK−1
Z KZ,⋆ + K⋆ − K⋆,ZK−1
Z KZ,⋆
(cid:1) .
Z (Σu − KZ) K−1
Z KZ,⋆
(42)
(43)
(44)
(cid:1)
C. Graphical Model
Fig. 4 illustrates GPSSM's graphical model.
12
Free-Form Variational Inference for Gaussian Process State-Space Models
Figure 4. Generative process of the GPSSM (left panel) and the sparse GPSSM (right panel).
D. Details of Prior Reparameterization: Whitening Prior over Inducing Variables
Here we show a more detailed derivation of the prior reparameterization and, consequently, the new form of the required
conditional distribution. We know that our prior over the inducing variables is p(u) = N (u; mZ, KZ) and that we use the
new whitened prior v = L−1
Z = KZ and p(v) = N (v; 0, IM ). We also have that the marginal prior
over f ⋆ is p(f ⋆) = N (f ⋆; m⋆, K⋆). It follows that p(f , v) is a Gaussian with cross-covariance:
Z (u − mZ) with LZLT
Cov(f ⋆, v) = E[(f ⋆ − m⋆)(L−1
Z (u − mZ))T ]
(L−1
Z )T
(cid:124)
= E[(f ⋆ − m⋆)(u − mZ)T ]
(cid:125)
(cid:123)(cid:122)
Cov(f ⋆,u)
Z )T .
= K⋆,Z(L−1
Hence, using Eq. (31), we have that:
p(f ⋆ | , x⋆, v, Z) = N (f ⋆; m⋆ + K⋆,Z(L−1
p(f ⋆ | , x⋆, v, Z) = N (f ⋆; m⋆ + K⋆,Z(L−1
Z )T v, K⋆ − K⋆,Z(L−1
Z )T v, K⋆ − K⋆,ZK−1
Z )T L−1
Z KZ,⋆).
Z KZ,t),
(45)
(46)
(47)
(48)
(49)
Alternatively, we can simply obtain this result by replacing u with u = mZ + LZv in the conditional distribution. Here we
note that this is consistent with the GP definition in that if we were to integrate out the variables v from the joint model
p(f ⋆, v) we would obtain the exact GP prior p(f ⋆).
D.1. Posterior Marginal
With the whitened join model p(f ⋆, v), Gaussian approximate posterior q(v) and a variationally sparse GP model we have:
p(f ⋆ | v) = N (f ⋆; m⋆ + K⋆,Z(L−1
Z )T v, K⋆ − K⋆,ZK−1
Z KZ,⋆),
q(v) = N (v; μv, Σv),
q(f ⋆, v) := q(v)p(f ⋆ | v).
It is easy to show that the posterior marginal q(f ⋆) = (cid:82) q(f ⋆, v) dv is:
qv(f ⋆) = N (f ⋆; m⋆ + K⋆,Z(L−1
Z )T μv, K⋆ + K⋆,Z(L−1
Z )T (Σv − IM )L−1
Z KZ,⋆).
(50)
(51)
(52)
(53)
E. Free-Form Posterior Estimation By Bounding the Log Marginal Likelihood Directly
Computing the log marginal:
log p(y0:T −1, x0:T −1, u | Z) = log
p(u | Z)p(x0)p(y0 | x0)
(cid:34)
(cid:35)
p(yt | xt)
+ L(x0:T −1, u, Z),
(54)
T −1
(cid:89)
t=1
13
f1f2f3x0x1x2x3y1y2y3u,zf1f2f3x0x1x2x3y1y2y3Free-Form Variational Inference for Gaussian Process State-Space Models
where
L(x0:T −1, u, Z) :=
log
(cid:34)
(cid:90)
T −1
(cid:89)
f 1:T −1
t=1
p(xt | f t)p(f t | f 1:t−1, x0:t−1, u, Z) df 1:T −1
,
(55)
(cid:35)
which we note is a log of an expectation, which we can bounded using Jensen's inequality:
L(x0:T −1, u, Z) ≥ E(cid:81)T −1
t=1 p(f t | f 1:t−1,x0:t−1,u,Z) log
T −1
(cid:89)
t=1
p(xt | f t)
=
T −1
(cid:88)
t=1
Ep(f t | xt−1,u,Z) log p(xt | f t),
(56)
(57)
where p(f t | xt−1, u, Z) is the GP predictive distribution over f t at xt−1 given the (pseudo observations) inducing variables
u at inducing inputs Z:
p(f t | xt−1, u, Z) = N (f t; At−1u, Bt−1) with
At−1 = Kt−1,ZK−1
Z
Bt−1 = Kt−1 − Kt−1,ZK−1
Z KZ,t−1.
Hence, the expectations in Eq. (57) can be computed in closed-form:
Ep(f t | xt−1,u,Z) log p(xt | f t) = log N (xt; At−1u, Q) −
1
2
Tr(Q−1Bt−1).
Thus, we have that:
log p(y0:T −1, x0:T −1, u | Z) ≥ log [p(u | Z)p(x0)p(y0 | x0)] +
(58)
(59)
(60)
(61)
T −1
(cid:88)
(cid:20)
log p(yt | xt) + log N (xt; At−1u, Q) −
t=1
(cid:21)
Tr(Q−1Bt−1)
.
(62)
1
2
Then setting the latent variables Ψ := {u, x0:T −1}, we can obtain the approximate log unnormalized posterior:
log ̃q(Ψ) := log p(u | Z) + log p(x0) + log p(y0 | x0) +
T −1
(cid:88)
(cid:20)
log p(yt | xt) + log N (xt; At−1u, Q) −
t=1
(cid:21)
Tr(Q−1Bt−1)
.
(63)
1
2
where ̃q(Ψ) ∝ q(Ψ) ≈ p(Ψ | y0:T −1). Thus, we can draw samples from our approximate posterior using SGHMC and the
energy function U (Ψ) = − log p(Ψ, y0:T −1) = − log p(Ψ | y0:T −1) + C ≈ − log ̃q(Ψ) + C.
E.1. Whitened Version
In the whitened version, v = L−1
Z (u − mZ) or u = mZ + LZv and the effective prior is
Letting ̃u = (u, Z, θ), ̃v = (v, Z, θ), the determinant of the Jacobian can be calculated as:
p(v) = N (v; 0, I).
(64)
|
∂ ̃u
∂ ̃v
| =
=
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
∂(mZ +LZ v)
∂v
∂Z
∂v
∂θ
∂v
∂(mZ +LZ v)
∂Z
∂Z
∂Z
∂θ
∂Z
LZ
0
0
∂(mZ +LZ v)
∂Z
I
0
∂(mZ +LZ v)
∂θ
0
I
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
∂(mZ +LZ v)
∂θ
∂Z
∂θ
∂θ
∂θ
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
=
LZ
0
0
14
0
I
0
0
0
I
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
= |LZ| = |KZ|
1
2
(65)
Free-Form Variational Inference for Gaussian Process State-Space Models
Thus, we can re-write the approximate log unnormalized posterior as:
log ̃q(v, x0:T −1) = log |KZ|
1
2 − log |KZ|
1
2 −
1
2
v⊤v + log p(x0) + log p(y0 | x0)+
T −1
(cid:88)
t=1
(cid:20)
log p(yt | xt) + log N (xt; Kt−1,Z(L−1
Z )T v, Q) −
(cid:21)
Tr(Q−1Bt−1)
.
1
2
= log p(v) + log p(x0) + log p(y0 | x0)+
T −1
(cid:88)
(cid:20)
log p(yt | xt) + log N (xt; Kt−1,Z(L−1
Z )T v, Q) −
t=1
F. Collapsed Method
We can integrate out u in Eq. (21) to obtain the marginal distribution of x1:T .
(cid:21)
Tr(Q−1Bt−1)
.
(66)
1
2
q∗(x1:T ) =
(cid:90)
u
q∗(u, x1:T )du =
(cid:90)
u
p(u | Z)p(x0)
T
(cid:89)
t=1
(cid:20)
p(yt | xt) exp(−
1
2
(cid:21)
Tr(Q−1Bt−1))N (xt; μxt, Q)
du
(67)
= p(x0)
T
(cid:89)
t=1
(cid:20)
p(yt | xt) exp(−
1
2
Tr(Q−1Bt−1))
(cid:21) (cid:90)
u
p(u)
T
(cid:89)
t=1
N (xt; μxt, Q)du.
(68)
In the case of using our prior re-parameterization, i.e., whitened inducing variables, v and for multidimensional states and,
therefore, multi-output GPs, we can write the integral above for dimension d as:
(cid:90)
v(d)
p(v(d))
T
(cid:89)
t=1
N (x(d)
t
; m(d)
t−1 + ̃A
(d)
t−1v(d), Qd)dv(d)
=
T
(cid:89)
t=1
N (x(d)
t
; m(d)
t−1, Qd) exp
(g(d))⊤(H(d))−1g(d)
(cid:21) (cid:16)
(cid:20) 1
2
det(H(d))
(cid:17) 1
2
where
(cid:32)
g(d) :=
I +
T
(cid:88)
t=1
( ̃A
(d)
t−1)⊤Q−1
d ( ̃A
(d)
t−1)
(cid:33)−1 (cid:32)
(cid:88)
t
(x(d)
t − m(d)
t−1)⊤Q−1
d
(cid:33)⊤
,
̃A
(d)
t−1
(cid:32)
H(d) =
I +
T
(cid:88)
( ̃A
t=1
(d)
t−1)⊤Q−1
d ( ̃A
(cid:33)−1
(d)
t−1)
(d)
t−1 = K(d)
̃A
Z = L(d)
K(d)
t−1,Z((L(d)
Z (L(d)
Z )⊤.
Z )⊤)−1,
(69)
(70)
(71)
(72)
Thus, our optimal log variational posterior marginal over state trajectories x0:T is
log q∗(x0:T ) = log p(x0) +
T
(cid:88)
t=1
[log p(yt | xt) + log N (xt; mt−1, Q)]
−
1
2
dx(cid:88)
(cid:34) T
(cid:88)
d=1
t=1
Tr(Q−1
d B(d)
(cid:35)
t−1) + log det(H(d))−1 − ( ̃x(d))⊤H(d)( ̃x(d))
,
(73)
where ̃x(d) := (cid:80)T
t=1( ̃A
(d)
t−1)⊤Q−1
d (x(d)
t − m(d)
t−1).
15
Free-Form Variational Inference for Gaussian Process State-Space Models
Algorithm 1 Particle MCMC for inferring latent states x0:T
Require: Number of particles S, observations y1:T , samples of x′
1:T in the previous iteration, likelihood parameters
t = 1 for i = 1, . . . , S.
1:T = x′
1:T
φ = {C, d, R},
Initialize state x0, weights W (i)
Fix the last particle as setting x(S)
for t = 1, . . . , T do
Generate x(i)
t
Calculate weight W i
Normalize the weights as W
if t < T then
(i)
from Eq. (22) for i = 1, . . . , S − 1.
t = pφ(yt|x(i)
t ) for i = 1, . . . , S
t = W (i)
t / (cid:80)
i W (i)
t
For i′ = 1, . . . , S − 1, re-sample the index ji′ from the categorical distribution, with the event probabilities being
(W
For i′ = 1, . . . , S − 1, let x(i′)
and set W i′
, . . . , W
(S)
t
(1)
t
).
1:t := x(ji′ )
1:t
t = 1/S
else
Re-sample the index j∗ from the categorical distribution, with the event probabilities being (W
Return x0:T :== x(j∗)
1:T
end if
end for
(1)
t
, . . . , W
(S)
t
).
G. Closed-Form Optimal Variational Conditional Distribution over Inducing Variables
Given a trajectory, the optimal variational conditional over the whitened inducing variables given a state trajectory is given
by:
q(v | x0:T ) =
dx(cid:89)
d=1
N (v(d); g(d), H(d)),
(74)
where g and H are given in Eqs. (70) and (71), respectively. A similar expression can be obtained for the original
(non-whitened) inducing variables u. Of importance here is that our formulation has allowed us to obtain an optimal
conditional variational distribution, given the state trajectories, over the inducing variables in closed form. We see then that,
in effect, our approximate posterior is qFFVD(x0:T , u) = q(x0:T )q(u | x0:T ). In order to make predictions, we run SGHMC
to obtain samples {x(s)
0:T } from the marginal p(x0:T ) and then use the closed-form expression for the conditional to obtain
{u(s) | x(s)
0:T }. Running SGHMC over the much lower-dimensional space of state trajectories (instead of the joint space of
trajectories and inducing variables) should generally converge faster. Or experiments with both versions of the algorithm
confirm this.
G.1. Optimal Closed-Form Conditional vs Assumed Parametric Factorizations
We contrast our variational distribution with that of the variational Gaussian process state space model (VGPSSM; Frigola
et al., 2014) and the variationally coupled dynamic trajectories (VCDT; Ialongo et al., 2019). While, implicitly, our variational
distribution is qFFVD(x0:T , u) := q(x0:T )q(u | x0:T ) the VGPSSM and VCDT assume qVGPSSM(x0:T , u) := q(x0:T )q(u)
and qVCDT(x0:T , u) := q(x0:T | u)q(u), respectively. Although the former (VGPSSM) obtained an "optimal" posterior
(given the factorization assumption), it is a mean-field approximation and ignores the dependencies between state trajectories
and inducing variables. The latter (VCDT), does not make a mean-field assumption but its factorization forces parametric
constraints over the individual distributions. In fact, Ialongo et al. (2019) assume Gaussian posteriors for both the marginal
q(u) and each of the time-dependent conditionals in q(x0:T | u). Our proposal is the only variational distribution that is
theoretically optimal while yielding a closed-form conditional.
H. Particle Markov chain Monte Carlo (MCMC)
We can use the sequential structure of the latent states x0:T for efficient inference. More specifically, using the transition in
Eq. (22). The details of this are given in Algorithm 1.
16
Free-Form Variational Inference for Gaussian Process State-Space Models
I. Experiment Details
Regarding the variational Gaussian process state space model (VGPSSM), probabilistic recurrent state space model (PRSSM),
and VCDT, we download the authors' implementations from their websites. For a fair comparison, we try to follow the same
treatment for hyper-parameters across all methods. We note, however, that the Matlab implementation of VGPSSM does not
provide inference for GP hyper-parameters θ, conditional likelihood parameters φ, inducing inputs Z, process variance Q or
observation variance R.
I.1. Settings for synthetic data
In generating the synthetic data, we set the kernel's signal variance σ = 2.0 and lengthscale l = 0.5 in the sparse GPSSM.
we reduce the impact of observational error and set the observation variance as small as σ2 = 0.01, i.e., each observation
would be generated as yt ∼ N (xt, 0.01). We also set the process variance Q = 0.01. The number of inducing points is set
to 20, and these 20 inducing points are evenly spread in the interval [−2, 2]. We set the length of the training trajectory as
120, the number of iterations as 50 000, and the number of posterior samples as 50.
I.1.1. TESTING THE MARGINALS FOR GAUSSIANITY
We conduct a hypothesis test for each individual trajectory state and inducing variable. Given the 50 posterior samples
for xt (or um), which we denote them as {x(s)
s=1), we use the implementation of scipy.stats.normaltest
from Python's scipy package to test whether we have sufficient evidence to reject the hypothesis that xt (or um) follows a
Gaussian distribution. scipy.stats.normaltest is based on the work of D'agostino & Pearson (1973).
s=1 (or {u(s)
t }50
m }50
I.2. Settings for Real-world Data
We adopt similar settings as in Ialongo et al. (2019) to initialize the hyper-parameters for all the models, which first uses a
factorized nonlinear model to optimize θ, x0:T , u, Z, C, d, R, Q. We use the identity function as the mean function and the
squared exponential function with automatic relevance determination (ARD) in GPSSM. When dealing with more than
1 latent dimension, which requires a multi-output GP, we use a different set of kernel hyper-parameters for each output.
We set the number of inducing points to M = 100 and the number of dimensions for latent states x0:T to dx = 4. We set
standard diagonal Gaussian priors for the initial latent state x0 and (where applicable) for likelihood parameters C, d, the
logarithm of observation standard deviation log(R)/2 and process variance log(Q).
For optimizing these hyper-parameters, we use Adam, with default settings for the optimizer parameters except for a decayed
learning rate. We run our FFVD algorithm for 50 000 iterations and VCDT for 200 000. We set the learning rate as 0.01 and
the decay parameter as 0.05 during SGHMC sampling. We used S = 105 posterior samples for VCDT (as in the results in
the original paper) and S = 100 for ours. Following the evaluation in Ialongo et al. (2019), we use the root mean square
error (RMSE) between the models' predictions and the ground truth in the future 30 time steps (not seen in training) as the
comparison criterion for all the methods.
Regarding the benchmarks, we have 1 024 observations for Actuator, 1 000 observations for Ballbeam, 500 observations
for Drive, 1 000 observations for Dryer, 1 024 for Flutter, and 296 observations for Furnace. Training lengths are:
Ttrain = 500, 500, 250, 500, 500, 150, respectively, and test lengths are the rest of the sequences. All these observations are
1-dimensional but, as in previous work, we consider dx = 4-dimensional latent states. Each benchmark also contains a
1-dimensional control input vector a ∈ RT ×1.
I.3. Details of Performance Metrics
We use the test RMSE and the negative mean log likelihood (NMLL).
Given samples from the predictive distribution {ˆy(s)
t } we can compute the RMSE as:
RMSE =
1
T
T
(cid:88)
(cid:16)
t=1
yt − E{ˆy(s)
t }
(cid:17)2
,
(75)
where E{ˆy(s)
t } is estimated as the empirical mean.
17
Free-Form Variational Inference for Gaussian Process State-Space Models
If the corresponding method gives us {x(s)
t }, then we can estimate the NMLL as:
NMLL = −
1
S
1
T
S
(cid:88)
T
(cid:88)
s=1
t=1
log N (yt; Cx(s)
t + d, R).
If the method only provides us with {ˆy(s)
t } then a reasonable estimate is:
NMLL = −
1
T
T
(cid:88)
t=1
log N (yt; E{ˆy(s)
t }, V{ˆy(s)
t }),
where E{ˆy(s)
t }, V{ˆy(s)
t } are the empirical mean and variance of the predicted samples.
For FFVD, we simply use:
NMLLFFVD = −
1
S
1
T
S
(cid:88)
T
(cid:88)
s=1
t=1
where μ(s)
t
and Σ(s)
t
are given by Eq. (23).
I.3.1. DATA NORMALIZATION
log N (yt; Cμ(s)
t + d, CΣ(s)
t C⊤ + R),
The normalization (i.e., standardization) of observations is given by the transformation:
̃yt =
yt − my
σy
,
(76)
(77)
(78)
(79)
where my and σy are the mean and standard deviation of the training data. Let us denote the (cid:94)RMSE and (cid:94)NMLL as the error
metrics in the normalized space. It is easy to show we can obtain the metrics in the original space as:
(cid:94)RMSE
RMSE = σy
NMLL = log σy + (cid:94)NMLL.
(80)
(81)
I.4. Reproducibility
As mentioned in the main paper, our code is publicly available at https://github.com/xuhuifan/FFVD.
J. Additional Results
J.1. Training and Test Performance on All Benchmarks
Fig. 5 shows the training and testing regimes and predictions for the six system identification benchmarks considered.
J.2. Traceplot of Log-Likelihood on Training data for FFVD-M and FFVD-C-M
Figure 6 shows the convergence trace plots for all benchmarks.
K. Extended Related Work
Here we give more details about the differences between our method and closely related approaches for inference in the
GPSSM. The VGPSSM of Frigola et al. (2014) is the first developing variational approaches to inference in GPSSMs, and
it uses mean-field assumptions to factorize the variational distribution of inducing variables u and latent state trajectories
x0:T as qVGPSSM(u, x0:T ) = q(u)q(x0:T ). This assumption clearly overlooks the complex dependencies between u and
x0:T . Doerr et al. (2018) model these dependencies with their PRSSM algorithm, but make the unrealistic assumption
of the posterior dynamics over the latent state trajectories being the same as the prior. Ialongo et al. (2019) show that
this assumption can have critical consequences on the posterior and predictive distributions and propose a more general
18
Free-Form Variational Inference for Gaussian Process State-Space Models
Figure 5. Training and test performance on benchmarks. Row 1 (left to right): Actuator, Ballbeam, Drive; row 2 (left to right): Dryer,
Flutter, Furnace.
Figure 6. Traceplot of log-likelihood on training data for FFVD-M and FFVD-C-M. Row 1 (left to right): Actuator, Ballbeam, Drive; row
2 (left to right): Dryer, Flutter, Furnace.
algorithm called VCDT. Although a significant improvement over previous methods, VCDT assumes posterior Gaussian
distributions. When considering our main object of interest, i.e., the posterior over the state trajectories, under the standard
and most commonly used GP setting with non-linear kernels, a Gaussian posterior assumption never holds, as the latent
states are inputs to the kernel. Hence, our approach is theoretically superior to VCDT and provides a new baseline with
broad practical applicability.
As mentioned in the main paper, Frigola et al. (2013) also proposed a PMCMC algorithm for inference over state trajectories.
However, the algorithm is based on the fully-independent conditional approximation (FIC; Quinonero-Candela & Rasmussen,
2005). As reported in Frigola et al. (2013), a na ̈ıve implementation of their algorithm has a time complexity of O(M 2T 2),
which is significantly higher than ours. A much more efficient implementation with O(M 2T ) time complexity that requires
significant tracking of intermediate data structures and factorizations is hinted at in the original paper. Unfortunately, the
corresponding code has not been made publicly available. Furthermore, model approximations such as those in FIC can
have surprising consequences, such as incorrectly estimating the noise variance to be almost zero or ignoring additional
inducing inputs, see, e.g., Bauer et al. (2016) for a thorough discussion. Consequently, we see our variational approach as
more principled.
K.1. Reduced-Rank Approaches
Here we discuss the related approach of Svensson et al. (2016), which we will refer to as reduced rank (RRANK). As with
random feature approximations, RRANK exploits the covariance function-spectral density duality via the Wiener-Khinchin
theorem to approximate the underlying GPs with a linear-in-the-parameters model, where the feature maps can be obtained
analytically for specific kernels.
19
02004006008001000t321012y02004006008001000t2024y0100200300400500t21012y02004006008001000t2101y02004006008001000t21012y050100150200250300t21012y01000020000300004000050000Iterations05101520253035Marginal log-likelihoodFFVD-MFFVD-C-M01000020000300004000050000Iterations05101520253035Marginal log-likelihoodFFVD-MFFVD-C-M01000020000300004000050000Iterations05101520253035Marginal log-likelihoodFFVD-MFFVD-C-M01000020000300004000050000Iterations05101520253035Marginal log-likelihoodFFVD-MFFVD-C-M01000020000300004000050000Iterations05101520253035Marginal log-likelihoodFFVD-MFFVD-C-M01000020000300004000050000Iterations05101520253035Marginal log-likelihoodFFVD-MFFVD-C-MFree-Form Variational Inference for Gaussian Process State-Space Models
While these types of approaches have their own weaknesses and strengths with respect to inducing variable approximations,
one crucial difference with our method is that their approximation is only applicable to stationary kernels. Therefore our
method is, by definition, much more general. Furthermore, as noted by Wilson et al. (2020), those types of approximations
to the covariance function based on finite-dimensional feature maps are known to exhibit undesirable pathologies at test time.
In particular, the feature maps used by Svensson et al. (2016) can become increasingly ill-behaved in high-data regimes.
Consequently, we believe the advantages of our approach (that avoids the stationarity assumption and its corresponding
practical deficiencies) justify its use as an additional tool for practitioners and researchers.
Nevertheless, here we briefly report some results using the Matlab code provided by Svensson et al. (2016). The RMSE
values obtained on Actuator, Ballbeam, Drive, Dryer, Flutter, and Furnace are 0.33, 0.11, 0.73, 1.35, 1.86, and 9.66,
respectively. While these results are generally competitive with our approach and other baselines, they are inferior to the
results reported with our algorithm.
20
|
|
http://arxiv.org/abs/2302.09915v1 | 2023-02-20T11:18:24 | 2023-02-20T11:18:24 | TA-MoE: Topology-Aware Large Scale Mixture-of-Expert Training | Sparsely gated Mixture-of-Expert (MoE) has demonstrated its effectiveness in
scaling up deep neural networks to an extreme scale. Despite that numerous
efforts have been made to improve the performance of MoE from the model design
or system optimization perspective, existing MoE dispatch patterns are still
not able to fully exploit the underlying heterogeneous network environments. In
this paper, we propose TA-MoE, a topology-aware routing strategy for
large-scale MoE trainging, from a model-system co-design perspective, which can
dynamically adjust the MoE dispatch pattern according to the network topology.
Based on communication modeling, we abstract the dispatch problem into an
optimization objective and obtain the approximate dispatch pattern under
different topologies. On top of that, we design a topology-aware auxiliary
loss, which can adaptively route the data to fit in the underlying topology
without sacrificing the model accuracy. Experiments show that TA-MoE can
substantially outperform its counterparts on various hardware and model
configurations, with roughly 1.01x-1.61x, 1.01x-4.77x, 1.25x-1.54x improvements
over the popular DeepSpeed-MoE, FastMoE and FasterMoE. | [
"Chang Chen",
"Min Li",
"Zhihua Wu",
"Dianhai Yu",
"Chao Yang"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09915v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09915v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.AI"
] | 3
2
0
2
b
e
F
0
2
]
G
L
.
s
c
[
1
v
5
1
9
9
0
.
2
0
3
2
:
v
i
X
r
a
TA-MoE: Topology-Aware Large Scale
Mixture-of-Expert Training
Chang Chen1∗†, Min Li2,3,5∗, Zhihua Wu4, Dianhai Yu4, Chao Yang2,3,5‡
1Center for Data Science, Peking University
2School of Mathematical Sciences, Peking University
3National Engineering Laboratory for Big Data Analysis and Applications, Peking University
4Baidu Inc.
5Institute for Computing and Digital Economy, Peking University
charlie_chen,[email protected]
[email protected]
wuzhihua02,[email protected]
Abstract
Sparsely gated Mixture-of-Expert (MoE) has demonstrated its effectiveness in
scaling up deep neural networks to an extreme scale. Despite that numerous efforts
have been made to improve the performance of MoE from the model design or
system optimization perspective, existing MoE dispatch patterns are still not able to
fully exploit the underlying heterogeneous network environments. In this paper, we
propose TA-MoE, a topology-aware routing strategy for large-scale MoE trainging,
from a model-system co-design perspective, which can dynamically adjust the
MoE dispatch pattern according to the network topology. Based on communication
modeling, we abstract the dispatch problem into an optimization objective and
obtain the approximate dispatch pattern under different topologies. On top of
that, we design a topology-aware auxiliary loss, which can adaptively route the
data to fit in the underlying topology without sacrificing the model accuracy.
Experiments show that TA-MoE can substantially outperform its counterparts
on various hardware and model configurations, with roughly 1.01x-1.61x, 1.01x-
4.77x, 1.25x-1.54x improvements over the popular DeepSpeed-MoE, FastMoE and
FasterMoE systems.
1
Introduction
The scale of model parameters in neural networks has increased from millions to trillions in recent
years, which promotes model accuracy in many domain, such as language processing [2; 3; 4] and
computer vision [27; 23]. However, the limited hardware resources, e.g., memory capability and
communication bandwidth, have constrained the model size to further scale up. To relieve this tension
and improve the model performance, Mixture of Expert (MoE) with a sparsely gated structure was
recently reintroduced [16; 26; 25]. The core structure of MoE is a group of small "expert" networks
and a gate network. Guided by the gate result, input data is dynamically routed to only a sub-group
of experts for computation. Compared with dense training methods, the sparsely activated feature
of MoE can significantly reduce the computation burden, extend the model size, and achieve higher
accuracy [5; 6; 11; 13].
∗Equal Contribution.
†Work done during internship at Baidu Inc..
‡Corresponding author.
36th Conference on Neural Information Processing Systems (NeurIPS 2022).
Since MoE plays a vital role in large-scale model training, efficient MoE parallel training has recently
received much attention. As one of the most popular MoE training approaches (Figure 1), expert
parallelism [11; 6] distributes experts to different devices, and each device is responsible for a
different batch of training samples. Correspondingly, extra global communication is necessary
for data exchanges among devices. Recent works aim to increase expert parallelism performance
from two aspects. On the one hand, the dynamic pattern of MoE results in severe computation
load-imbalance problems that a small number of experts may receive, process, and send the majority
of data. Several approaches were proposed to make full use of the available experts, such as adding
an auxiliary loss [26], controlling expert capacity [11; 6], and optimizing the assignment scheme for
a balanced load [12; 28; 22]. On the other hand, global communication is another main obstacle to
efficient MoE training. Most of the recent works reduced the communication cost from a system
perspective, such as computation and communication overlapping [9], customized communication
operation acceleration [21; 18], and adaptive routing [17].
In addition to the continuing efforts made to improve the performance of MoE, there are still two
major challenges. With the development of the complicated distributed network environments, the
existing even dispatch method may cause network contention in the slowest links, leading to poor
communication performance, especially on heterogeneous networks. Although a few early works [9]
have proposed methods to dispatch more data to slow links, these methods may make the expert load
imbalanced and could influence the model accuracy. Efficient communication demands more delicate
dispatch strategies. How to improve the training efficiency without sacrificing the model accuracy is
still worth studying. Besides, most of the existing communication optimizations for MoE [21; 17]
are studied with a specific hardware environment. How to develop methods that can adapt to a variety
of hardware environments is also of great practical value.
To tackle these challenges, we design TA-MoE, a topology-aware large scale MoE training method
that can adaptively adjust the communication volume to fit the underlying network topology. By
abstracting the dispatch problem into an optimization objective based on the communication mod-
eling, we obtain the approximate dispatch pattern under different topologies. On top of that, an
auxiliary topology loss with pattern-related coefficients is proposed, which can dynamically adjust
the communication volume without interfering with the model convergence. TA-MoE can also be
easily incorporated into the widely used MoE systems, such as DeepSpeed-MoE [21] and FastMoE
[8].
We conduct experiments on various typical network topologies and model configurations. Results
show that TA-MoE can substantially outperform DeepSpeed-MoE and FastMoE with roughly 1.01x-
1.61x speedup and 1.01x-4.77x speedup on different configurations without sacrificing the model
accuracy. Compared with the recently proposed Hir gate of FasterMoE, our method can achieve
1.25x-1.54x speedup on time to convergence. Besides, a more detailed analysis of communication
and data dispatch pattern further demonstrates the effectiveness of the proposed data dispatch strategy.
The code of TA-MoE is available at: https://github.com/Chen-Chang/TA-MoE
2 Related Work
Several frameworks have featured sophisticated designs to support efficient MoE training. GShard
[11] and DeepSpeed-MoE [21] subtly composed several einsum operators into the computation of
MoE but introduced redundant zero computation and extra memory consumption. FastMoE [8]
customized the essential computation kernels to improve resource utilization effectively. To further
enhance the performance, most of the systems adopted an auxiliary loss [26] to achieve an even
dispatch pattern and enforced the number of data processed by each expert below some uniform
capacity. Based on these popular implementations, recent works aim to improve the MoE training
performance from mainly two aspects: model structure design and communication optimization.
From the perspective of model design, BASE Layer [12] and the work of expert choice routing [28]
assigned an equal number of tokens to each expert by delicate designs of the gate. Instead of learning
the weight of the gate, Hash Layers [22] adopted an efficient hash function to guide the dispatch.
The hybrid structure of PR-MoE [21] improved the parameter efficiency by fixing one shared expert.
BaGuaLu [15] re-distributed the data chunks evenly, damaging the model accuracy. However, almost
all of these high-level algorithms are agnostic of the complicated underlying hardware effect on
training performance.
2
As for communication optimization, DeepSpeed-MoE [21] and HetuMoe [18] implemented a hierar-
chical all-to-all communication kernel to improve network utilization. Tutle [17] designed adaptive
routing techniques coupled with a specific network architecture. Despite of these delicate designs, the
improvement space of system-level optimization is significantly constrained by the dispatch patterns
of MoE. Recently, FasterMoE [9] made an initial try to take the dispatch pattern into consideration
by setting a compulsory ratio of intra-node to inter-node dispatch chunk sizes but sacrificed some
model accuracy. In this paper, we propose a topology-aware routing strategy that enables an effi-
cient communication pattern to fit into the underlying topology without sacrificing the convergence
performance.
3 Background
3.1 MoE Model Structure
Figure 1: The popular expert parallelism method of MoE.
A MoE layer consists of a gate network G and a set of N expert networks E0, . . . , EN −1. For the gate
module, the softmax activation function is widely used, reflecting each expert's normalized fitness for
dealing with an incoming sample. Usually, only the experts with the top k fit scores are selected to
process the sample. The final output y of the MoE layer is the aggregation of computed results.
Expert parallelism has been one of the most popular methods in existing MoE training systems [21; 8].
As shown in figure 1, the N experts are evenly assigned to P devices, with each device i holding
E = N/P experts Ei∗E, . . . , E(i+1)∗E−1. Besides, the input tokens are also evenly partitioned over
multiple devices with different small batches of the same size S in a traditional data-parallel way. For
each process, the shape of the dispatched data is [k ∗ S, d], where d represents the hidden size. Each
expert receives a combined batch of tokens (Global Exchange) and then carries out the computation.
During the global communication, the number of samples sent to Ee from process i is cie, and the
shape of the transferred samples is [cie, d]. Afterward, the expert sends the calculated result back
with a similar global exchange pattern.
However, the number of the tokens processed by different experts may be highly imbalanced that
a small group of experts may receive the majority of data, like Expert 2 in Figure 1. Therefore, a
load-balance auxiliary loss term laux [26] is added to the train loss as an overall loss function:
mi =
(cid:88)
x
G(x)/S,
laux =
N −1
(cid:88)
(mie ∗ (cie/S))
e=0
(1)
The auxiliary loss can dynamically adjust the value of cie into target k ∗ S/N . To further ensure
load balance, a uniform data process capacity C is set for each expert in many MoE training
systems. DeepSpeed-MoE [21] decomposes the expert capacity C evenly into the local capacity
for each process and prunes the exchange size by the local capacity directly: cie ≤ Cie = C/P .
FastMoE [8] efficiently uses the capacity with two extra all-to-all communication for exchange sizes:
(cid:80)P −1
i=0 cie ≤ C.
3.2 Network Topology
The network environments are very complicated for distributed training on modern GPU clusters. As
shown in Figure 2, there are four kinds of typical network topologies: homogeneous, ring, symmetric
tree and asymmetrical tree. Homogeneous and ring structures are frequently used topologies for the
3
Gate NetworkExpert Network 0Global ExchangeAggregate Token 0 Token 0Global ExchangeToken 1Token 2 Token 0Token 3Token 1Gate NetworkExpert Network 1Aggregate Token 1Gate NetworkExpert Network 2Aggregate Token 2 Token 2Token 3Gate NetworkExpert Network 3Aggregate Token 3Device 0Device 1Device 2Device 3(a) Homogeneous
(b) Ring
(c) Symmetric Tree
(d) Asymmetrical Tree
Figure 2: Typical network topologies on modern GPU clusters. (a) A homogeneous node connected
with NVSwitch. (b) A typical ring topology connected with NVLinks [19]. (c) A 2-layer symmetric
tree topology of [2,2]. (d) A 3-layer asymmetrical tree topology of [[2,2],[2]].
intra-node environment. For a homogeneous structure, devices are always connected by the network
with the same bandwidth, e.g., NVSwitch [20]. As for the ring topology, it is usually symmetrical.
The bandwidths between adjacent devices may differ due to different numbers of connected links.
The communication of nonadjacent devices has to hop through intermediate devices and the slowest
link may become the bottleneck. Hierarchical tree is a common topology abstraction for multi-node
distributed environments. Compared with the intra-node environment, inter-node links suffer from
limited and volatile bandwidth (4∼25GB/s) and potentially degrade the communication performance.
For convenience, we denote a tree topology as a nested list where the elements within the same
sub-list are connected by the same switch. For a symmetric tree structure, we use Li to represent the
number of the child nodes of each node in layer i. As for an asymmetrical tree structure, it is the
most common topology for distributed training, which can be very irregular.
3.3 Motivation
The existing load-balanced data distribution of Equation 1 is unable fully exploit the complicated
distributed environments. To demonstrate it, we set up an experiment on a [2, 2] symmetric tree
topology cluster, where the devices are named 0, 1 (same node) and ˆ0, ˆ1 (same node), respectively.
We dispatch 128MB 4 data with two dispatch patterns: (1) even dispatch and (2) uneven dispatch
that a greater proportion of data is exchanged with a neighbor device. Table 1 shows the detailed
dispatch proportions and the corresponding performance. Compared with even dispatch, uneven
dispatch improves the overall communication performance by roughly 30%. This is mainly because
the communication stress on inter-node links is relieved by transferring a smaller proportion of data.
With the variety of distributed network topologies and their continuous development, the existing
static even dispatch pattern is not effective enough. There is an urgent need for a routing strategy that
can dynamically adapt to the underlying network environments.
Table 1: The communication performance of [[0,1],[ˆ0, ˆ1]] network topology.
Ratio of data
Time (μs)
Dispatch Pattern
Even
Uneven
Even
Uneven
0 ↔ 0
1/4
1/4
144
144
0 ↔ 1
1/4
1/2
758
1492
0 ↔ ˆ0
1/4
1/8
5609
2835
0 ↔ ˆ1
1/4
1/8
5618
2861
All
1
1
14019
10765
4 Topology Aware Routing Strategy
In this section, we first abstract the data dispatch problem into an optimization objective based on the
communication model. Through some analysis, we obtain the target dispatch pattern under different
topologies, which can eliminate the communication bottleneck during MoE training. Guided by the
target pattern, we design a topology-aware routing loss to adaptively adjust the dispatch volume.
4.1 Communication Model
We characterize the communication cost using the well-known α-β cost model, where α and β
represent the fixed communication latency and the inverse bandwidth (i.e., transferring costs of
each word), respectively. For convenience, αij and βij are used to denote the latency and inverse
4Here, 128MB is used as a demonstration, which is the upper-bound transfer size of most of the typical MoE
training tasks.
4
NVSwitchGPUGPUGPUGPUGPUGPUGPUGPUGPUGPUGPUGPUGPUGPUGPUGPUGPUGPUCPUCPULayer 0Layer1GPUGPUGPUGPUGPUGPUCPUCPUCPULayer 0Layer 1Layer 2bandwidth between the i-th and j-th GPU. During the training of MoE, the amount of data transferred
from GPU i to Ee in GPU j is cie ∗ d ∗ b, where d ∗ b is the transferred element size. To reduce the
overheads of multiple send-receives between two GPUs, we merge the multiple small data chunks
into a larger data chunk for delivery. The total amount of data delivered from GPU i to GPU j
is (cid:80)E∗(j+1)−1
cie ∗ d ∗ b. A global data exchange consists of P ∗ P peer-to-peer data deliveries,
e=E∗j
among which the slowest delivery, as a lower-bound, constrains the final communication performance.
Most of the global exchange implementations [21; 18; 24] are designed to approach the lower-bound.
Therefore, our ultimate objective function is to minimize the slowest send-receive communication
cost:
min
c
max
i,j
(αij + βij ∗
cie ∗ d ∗ b)
(2)
E∗(j+1)−1
(cid:88)
e=E∗j
For efficient MoE training, two constraint conditions should be satisfied. First, for any process i, the
sent data size, i.e., k ∗ S, should be equal to the sum of received data size of all experts:
k ∗ S =
(cid:88)
cie, ∀i ∈ {0, ..., P − 1}.
(3)
e∈{0,...,N −1}
Second, to make full use of all the experts and pursue a better model accuracy, the data chunks
dispatched to each expert should be balanced:
k ∗ S
E
=
(cid:88)
i∈{0,...,P −1}
cie, ∀e ∈ {0, ..., N − 1}.
(4)
4.2 Model Optimization
To get the target dispatch pattern, we need to solve the optimization problem in Equation 2. Nev-
ertheless, Equation 2 contains plentiful parameters of a specific network, which complicates the
solving process. Meanwhile, in some irregular topologies, some devices may suffer from quite limited
bandwidth when communicating with other devices. According to Equation 2, the experts assigned
to these devices may receive a quite small dispatch chunk size from the other processes, which may
make the experts lack of sufficient data exchanges and lead to expert isolation phenomenon. To tackle
these problems, we simplify the optimization problem to accelerate the solving process and smooth
the values of αij, βij for an approximate result to prevent expert isolation. Since each send-receive
communication shares the same α, β in homogeneous network, the target dispatch chunk size ˆcie
is equal to the load-balanced chunk size k∗S
N . In the following part, we focus on the analysis of the
optimization problem under heterogeneous topologies.
On a n-layer symmetric tree topology, for any device i, all the devices can be split into n sub-groups
of Gi = {Gi
t is the group of devices whose shortest path from device i are across t
switches. Multiple hops in cross-switch communication will suffer from extra overheads and the
most limited bandwidth in the hops dominates the final bandwidth. Therefore, we can simplify
t|t < n}. Gi
the original αij, βij into n value: αl =
, which can
precisely characterize the underlying topology and eliminate the noise of profiling. Then we get a
hierarchical matrix ˆα, ˆβ:
, βl =
(cid:80)
((cid:81)l
I(j∈Gi
i<j
k=0 Lk)∗(Ll−1)/2
l )∗αij
(cid:80)
((cid:81)l
I(j∈Gi
i<j
k=0 Lk)∗(Ll−1)/2
l )∗βij
ˆαij =
(cid:88)
l
I(j ∈ Gi
l) ∗ αl, ˆβij =
I(j ∈ Gi
l) ∗ βl
(cid:88)
l
(5)
Take equation 3 and 4 as optimization constraint conditions, we simplify the optimization problem as
follows:
min
c
T lower
comm = min
c
max
i,j
( ˆαij + ˆβij ∗
E∗(j+1)
(cid:88)
e=E∗j
cie ∗ d ∗ b)
s.t.
k ∗ S
E
=
k ∗ S =
(cid:88)
cie ∗ d ∗ b, ∀e ∈ {0, ..., N − 1},
i∈{0,...,P −1}
(cid:88)
e∈{0,...,N −1}
cie ∗ d ∗ b, ∀i ∈ {0, ..., P − 1},
(6)
c ≥ 0
5
Then, we can get the near optimal solution after omitting the small latency term:
ˆcie =
k ∗ S
1
ˆβij
E ∗ (cid:80)
j
∗ ˆβi(cid:98) e
E (cid:99)
(7)
The optimal data distribution of the above min-max problem is only related to the bandwidth: the
volume of ˆcie is linear to the bandwidth. The rationale behind the optimal result is that higher
bandwidth links should bear more loads for an overall communication balanced workflow. The ring
topology also shows a hierarchical characteristic and the solution for ring topology has the same
pattern as symmetric trees.
Under some irregular asymmetric topology, the optimal result of Equation 2 may result in some
experts assigned to the devices of most limited bandwidth in lack of data exchanges with the rest
of the devices. Compared to the data distribution of other experts, data chunks from local devices
occupy a larger proportion of received data chunks in those isolated experts. For the fairness among
the experts, we transform the asymmetric topology into a symmetric one by merging the separate
nodes into the close symmetric sub-trees. For example, [[2,2][2]] in figure 2(d) can be merged as
symmetric structure [[2,2,2]]. After that, we can optimize the lower bound of communication as the
symmetric structure.
4.3 Routing Strategy
Once getting the target data dispatch volumes among processes, we can use it to guide the MoE
training. To not sacrifice the model accuracy, instead of setting a compulsory dispatch ratio directly,
we design a topology-aware adaptive routing loss.
pi = N orm(1/ˆci),
li
topo = N ∗ P ∗
N −1
(cid:88)
(pie ∗ mie ∗ (cie)/S) ∀i ∈ {0, ..., P − 1}
(8)
e=0
As shown in Equation 8, we set a penalty weight pi as the adjustment coefficients for the topology loss
li
topo of each process i. We set the normalized 1/ˆci as pi to make sure cie approximates the value of
ˆcie. Normalization functions that enlarge the penalty of the low-bandwidth transfer, e.g., softmax, are
also preferable. As shown in the calculation of li
topo, the data dispatched to Ee with limited bandwidth
will suffer from a larger penalty weight pie. Despite of these penalty modifications, auxiliary loss
occupies a small proportion of the final loss, and the value of the auxiliary loss decreases when
experts' number scales up. Therefore, our final topology loss is expanded N ∗ P times to keep the
magnitude of loss value.
There are a number of advantages of the proposed topology-aware strategy. On the one hand,
compared to setting a compulsory dispatch ratio, the proposed loss can adjust the communication
volume to fit in the underlying topologies in a mild way without damaging the convergence. A
compulsory dispatch ratio has a high potential to overwhelm the influence of the train loss and
sacrifice the model accuracy. With the topology loss, the train loss can still dominate in the final
loss value. As a result, the dispatch results are mainly influenced by the train loss for a better model
accuracy. Besides, the topology-aware strategy has more potential to utilize the token information for
efficient sparse training. Guided by the topology-aware loss, the tokens nearby are more likely to be
processed by the same expert. Since the correlation of adjacent tokens contains the vital information
in sparse attention [10], the experts in sparsely gated routing structure may also be more likely to
extract important information from adjacent tokens.
In addition, the topology-aware loss can be easily incorporated to existing MoE systems, such as
DeepSpeed-MoE and FastMoE. Taking FastMoE as an example, one just needs to directly replace
the popular load-balanced loss laux with the proposed topology-aware loss ltopo. Since local capacity
threshold Cie is adopted in DeepSpeed-MoE for load balance, one can modify the local capacity
sizes to be consistent with the proposed dispatch pattern by setting Cie to be proportional to the
target data chunk sizes ˆcie. Instead of padding the data chunks with extra zeros to be the same size as
DeepSpeed-MoE, one all-to-all communication is added to get the information of send-receive data
chunk sizes and dispatch data chunks according to the sizes.
6
5 Evaluation
Experiment setup To demonstrate the effectiveness of TA-MoE, we carry out a series of experi-
ments on three typical NVIDIA GPU clusters with different network topology, and some represen-
tative model configurations. Table 2 lists the cluster settings. The testbed is three typical clusters
from the PaddleCloud5 platform. For cluster A, each node consists of 8 NVIDIA Tesla 40GB A100
GPUs connected with NVSwitch, which shows high performance for both computation and network
communication. Clusters B and C are equipped with 8 NVIDIA Tesla 32GB V100 GPUs in each
node. The nodes in cluster B are connected by the same switch, while cluster C is composed of a large
number of servers and switches that are interconnected through an internal network infrastructure.
Besides, the software configurations are set as CUDA 11.0, NCCL 2.8.4 and CUDA 11.1, NCCL
2.8.3, for cluster A and cluster B, C, respectively.
Table 2: Cluster Setting.
Clusters
A
B
C
GPU
Intra-Node
Inter-Node
Symmetric Same switch
40G-A100 NVSwitch 100GB/s RoCE/4
100GB/s RoCE/8
32G-V100 NVlink
100GB/s RoCE/8
32G-V100 NVlink
x
(cid:88)
x
x
(cid:88)
x
Since the transformer architecture is the most common base structure of MoE, we focus the experi-
ments on problems related to transformer-based model, with GPT-3 Medium [2] as the base model
and multi-layer perception as the expert. In our experiments, the number of the experts are chosen
among {8, 16, 32, 48, 64} with each device deployed with one expert. Both the Switch top-1 [6] and
the GShard top-2 gates [11] are tested with the weight of auxiliary loss set as 1.0. For the consistency
of the experiment, we implement the models by a single framework Paddle [1] and train on the
open-source openwebtext2 dataset [7]. More detailed specifications of model settings can be found in
Table 3. To be more general, we also add the tests of MoE on Swin Transformer based MoE tasks in
Section A.3 of the Appendix. These results further demonstrate the effectiveness of the proposed
topology-aware routing algorithm on different model architectures.
Table 3: Detailed specifications of the GPT models.
Gate
Switch
GShard
Switch & GShard
Switch & GShard
Layers Hidden size Intermediate size Batch size Data type Capacity factor Clusters
12
12
12
12
1024
1024
1024
1024
4096
2048
2048
2048
6
6
4
4
FP16
FP16
FP32
FP32
1.0
2.0
1.2
1.2
A
A
B
C
Methodology We incorporate TA-MoE into widely used DeepSpeed-MoE [21] and FastMoE [8]
implementations. Because TA-MoE modifies the gate structure, we first compare the validation loss
w.r.t. steps to ensure that TA-MoE will not interfere with the convergence on various model scales.
On top of that, we test the overall throughput and the speedup of TA-MoE over these two classical
baselines. To be more comprehensive, we also compare with the recently proposed FasterMoE
Hir gate [9] on the metric of time to convergence performance. Besides, a detailed analysis of
communication costs, as well as the distribution of the dispatch are also given.
Accuracy and Performance Like some well-
recognized related works, e.g., BASE layer and
DeepSpeed-MoE, we have depicted the validation
performance of every fixed interval step in Figure
3 as the comparison metric. We first compare the
validation loss w.r.t steps of TA-MoE and the repre-
sentative FastMoE on cluster C. As shown in Figure
3, the loss curves of TA-MoE and FastMoE are con-
sistent to converge under different training scales of 8
experts to 48 experts. These results demonstrate that
5A Cloud Platform of Baidu Inc.
Figure 3: Validation loss w.r.t. steps.
7
020000400006000080000100000steps2.53.046Validation LossBaseline_E8TA-MoE_E8Baseline_E16TA-MoE_E16Baseline_E32TA-MoE_E32Baseline_E48TA-MoE_E48the TA-MoE can adaptively adjust the data dispatch
volume without sacrificing the model accuracy. To be more comprehensive, we also add the perplexity
(PPL) metric in Table 4 of the Appendix, which gives similar effective results.
Switch Gate
GShard Gate
A
r
e
t
s
u
l
C
B
r
e
t
s
u
l
C
C
r
e
t
s
u
l
C
Figure 4: Performance of TA-MoE over DeepSpeed-MoE and FastMoE under different hardware and
model settings.
To demonstrate the advantages of TA-MoE in terms
of training performance, we compare it with both
DeepSpeed-MoE and FastMoE on various hardware
and model configurations. The performance indica-
tors including throughout (tokens/s) and the speedups
are depicted in Figure 4. It is clear that TA-MoE
can bring significant performance improvements
over its counterparts under almost all the configu-
rations. When compared with the DeepSpee-MoE,
the achieved speedup is about 1.05x-1.61x. As for
FastMoE, the performance improvement is around
1.01x-4.77x. More speedups are achieved on Fast-
MoE than DeepSpeed-MoE. This is because TA-MoE
has a more dynamic dispatch pattern and larger ad-
justable space based on FastMoE.
8
Figure 5: Comparison with FasterMoE.
E8E16E32E48E6402468Throughput (tokens/s)1e51.54x1.47x1.18x1.15x1.61x1.13x1.11x1.05xOOMFastMoE BaselineFastMoE+TA-MoEDeepSpeed BaselineDeepSpeed+TA-MoEE8E16E32E48E6401234561e52.40x1.30x1.26x1.18x1.35x1.25x1.13x1.15xOOME8E16E32E48E640.00.20.40.60.81.01.2Throughput (tokens/s)1e51.01x1.17x1.23x1.32x1.23x1.02x1.21x1.16x1.23x1.13xE8E16E32E48E640.00.20.40.60.81.01.21e51.02x1.28x1.58x1.60x1.49x1.01x1.30x1.27x1.25x1.19xE8E16E32E48E640.00.20.40.60.81.01.2Throughput (tokens/s)1e51.01x1.16x1.36x1.29x1.22x1.02x1.24x1.31x1.22x1.13xE8E16E32E48E640.00.20.40.60.81.01.21e51.02x1.28x4.77x2.57x1.71x1.01x1.38x1.39x1.25x1.18x050010001500200025003000time(min)2.72.82.93.13.546Validation Loss1.54x1.47x1.25xFasterMoE_E32TA-MoE_E32It is also observed that more improvements are obtained on Cluster C, which can reach 4.77x for
some cases, due to the relief of its serious network contention of cross-switch communication. In
addition, the comparison of the results of Switch and GShard gate reveals that TA-MoE can behave
better in adjusting larger volume of data.
To be more comprehensive, we make further comparisons with the recently proposed FasterMoE
[9]. Because the compulsory dispatch strategy of FasterMoE affects the convergence, we take the
validation loss w.r.t time as the comparison metric. Clusters C are selected as the representative
testing clusters. As shown in Figure 5, TA-MoE can converge faster than FasterMoE. We evaluate
the time to reach the validation loss values of 3.1, 2.9, and 2.8, and TA-MoE can converge faster by
about 1.25x, 1.47x and 1.54x. The results further verify that the proposed adaptive routing loss is
more effective than the compulsive dispatch method, which sacrifices model accuracy for training
performance.
Communication Analysis To better show the effects of the dynamical dispatch strategy, we further
analyze communication and computation cost, and the distribution of data dispatch on cluster C. As
shown in Figure 6(a), thanks to the proposed TA-MoE strategy, the communication cost is reduced
rapidly, with roughly 1.16x to 6.4x speedups. It is also observed that the maximum speedup is
achieved for 32 experts on four cross-switch nodes. This is because the four nodes are deployed
under four different switches, and cross-switch links severely bottleneck the data exchange. Once
the tension is relieved, the obtained benefits can be dramatic. In addition, we visualize the dispatch
pattern of an example with 64 expert by depicting the number of the tokens of Rank 0-7 sending to
other ranks. More details of the dispatch distributions for other expert scales are attached to Section
A.2 of the Appendix. In Figure 6(b), as expected, most of the data of Rank 0-7 are dispatched to
low-overheads nearby ranks, which further verifies the effectiveness of adaptive topology-aware loss.
(a) Breakdown of communication and computation.
(b) Distribution of data dispatch of Rank 0-7.
Figure 6: Analysis of communication and computation cost and the distribution of data dispatch.
6 Conclusion
In this paper, a topology-aware routing strategy, TA-MoE, was proposed to stress the mismatch
between the data dispatch pattern and the network topology. Based on communication modeling, we
abstract the dispatch problem into an optimization objective and obtain the approximate dispatch
pattern under different topologies. On top of that, a topology-aware auxiliary loss was designed,
which can adaptively route the data to fit in the underlying topology without sacrificing the model
accuracy. Experiments show that the proposed method can substantially outperform its counterparts
on a variety of the hardware and model configurations, with roughly 1.01x-1.61x, 1.01x-4.77x,
1.25x-1.54x improvements over the popular DeepSpeed-MoE, FastMoE and FasterMoE systems. In
the future, we plan to take more delicate communication operators into consideration of dynamic
dispatch pattern and extend our work to more hardware environments.
7 Acknowledgement
This work was supported by National Key R&D Program of China (2021ZD0110501).
9
E8E16E32E48E6401234567Computation and Communication Cost (ms)1e31.16x1.92x6.40x2.42x1.51xFastMoE-CommFastMoE-CompTA-MoE-CommTA-MoE-Comp0102030405060Rank id of 64 Experts0.00.20.40.60.81.0Dispatched Token Number1e3BaselineRank-0Rank-1Rank-2Rank-3Rank-4Rank-5Rank-6Rank-7References
[1] Baidu. PaddlePaddle. https://github.com/paddlepaddle/paddle, 2022.
[2] Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal,
Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel
Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler,
Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott
Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya
Sutskever, and Dario Amodei. Language models are few-shot learners. In H. Larochelle,
M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin, editors, Advances in Neural Information
Processing Systems, volume 33, pages 1877–1901. Curran Associates, Inc., 2020.
[3] Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam
Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, et al. Palm:
Scaling language modeling with pathways. arXiv preprint arXiv:2204.02311, 2022.
[4] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: pre-training of
deep bidirectional transformers for language understanding. In Jill Burstein, Christy Doran, and
Thamar Solorio, editors, Proceedings of the 2019 Conference of the North American Chapter of
the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT
2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pages
4171–4186. Association for Computational Linguistics, 2019.
[5] Nan Du, Yanping Huang, Andrew M. Dai, Simon Tong, Dmitry Lepikhin, Yuanzhong Xu,
Maxim Krikun, Yanqi Zhou, Adams Wei Yu, Orhan Firat, Barret Zoph, Liam Fedus, Maarten
Bosma, Zongwei Zhou, Tao Wang, Yu Emma Wang, Kellie Webster, Marie Pellat, Kevin
Robinson, Kathleen S. Meier-Hellstern, Toju Duke, Lucas Dixon, Kun Zhang, Quoc V. Le,
Yonghui Wu, Z. Chen, and Claire Cui. GLaM: Efficient scaling of language models with
mixture-of-experts. ArXiv, abs/2112.06905, 2021.
[6] William Fedus, Barret Zoph, and Noam Shazeer. Switch Transformers: Scaling to trillion
parameter models with simple and efficient sparsity. CoRR, abs/2101.03961, 2021.
[7] Leo Gao, Stella Biderman, Sid Black, Laurence Golding, Travis Hoppe, Charles Foster, Jason
Phang, Horace He, Anish Thite, Noa Nabeshima, Shawn Presser, and Connor Leahy. The Pile:
An 800gb dataset of diverse text for language modeling. arXiv preprint arXiv:2101.00027,
2020.
[8] Jiaao He, Jiezhong Qiu, Aohan Zeng, Zhilin Yang, Jidong Zhai, and Jie Tang. FastMoE: A fast
mixture-of-expert training system. CoRR, abs/2103.13262, 2021.
[9] Jiaao He, Jidong Zhai, Tiago Antunes, Haojie Wang, Fuwen Luo, Shangfeng Shi, and Qin Li.
FasterMoE: modeling and optimizing training of large-scale dynamic pre-trained models. In
Proceedings of the 27th ACM SIGPLAN Symposium on Principles and Practice of Parallel
Programming, pages 120–134, 2022.
[10] Torsten Hoefler, Dan Alistarh, Tal Ben-Nun, Nikoli Dryden, and Alexandra Peste. Sparsity
in deep learning: Pruning and growth for efficient inference and training in neural networks.
Journal of Machine Learning Research, 22(241):1–124, 2021.
[11] Dmitry Lepikhin, HyoukJoong Lee, Yuanzhong Xu, Dehao Chen, Orhan Firat, Yanping Huang,
Maxim Krikun, Noam Shazeer, and Zhifeng Chen. GShard: Scaling giant models with condi-
tional computation and automatic sharding. In International Conference on Learning Represen-
tations, 2021.
[12] Mike Lewis, Shruti Bhosale, Tim Dettmers, Naman Goyal, and Luke Zettlemoyer. BASE layers:
Simplifying training of large, sparse models. CoRR, abs/2103.16716, 2021.
[13] Junyang Lin, An Yang, Jinze Bai, Chang Zhou, Le Jiang, Xianyan Jia, Ang Wang, Jie Zhang,
Yong Li, Wei Lin, Jingren Zhou, and Hongxia Yang. M6-10T: A sharing-delinking paradigm
for efficient multi-trillion parameter pretraining. CoRR, abs/2110.03888, 2021.
10
[14] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining
Guo. Swin transformer: Hierarchical vision transformer using shifted windows. CoRR,
abs/2103.14030, 2021.
[15] Zixuan Ma, Jiaao He, Jiezhong Qiu, Huanqi Cao, Yuanwei Wang, Zhenbo Sun, Liyan Zheng,
Haojie Wang, Shizhi Tang, Tianyu Zheng, et al. BaGuaLu: targeting brain scale pretrained
models with over 37 million cores. In Proceedings of the 27th ACM SIGPLAN Symposium on
Principles and Practice of Parallel Programming, pages 192–204, 2022.
[16] Saeed Masoudnia and Reza Ebrahimpour. Mixture of experts: a literature survey. Artificial
Intelligence Review, 42:275–293, 2012.
[17] Microsoft. Tutel: An efficient mixture-of-experts implementation for large dnn model training.
https://github.com/microsoft/tutel, 2021.
[18] Xiaonan Nie, Pinxue Zhao, Xupeng Miao, and Bin Cui. HetuMoE: An efficient trillion-scale
mixture-of-expert distributed training system. arXiv preprint arXiv:2203.14685, 2022.
[19] NVIDIA. NVLINK. https://www.nvidia.com/en-us/data-center/nvlink/, 2022.
[20] NVIDIA. NVSWITCH: The world's highest-bandwidth on-node switch. https://images.
nvidia.com/content/pdf/nvswitch-technical-overview.pdf, 2022.
[21] Samyam Rajbhandari, Conglong Li, Zhewei Yao, Minjia Zhang, Reza Yazdani Aminabadi,
Ammar Ahmad Awan, Jeff Rasley, and Yuxiong He. DeepSpeed-MoE: Advancing mixture-
of-experts inference and training to power next-generation AI scale. CoRR, abs/2201.05596,
2022.
[22] Stephen Roller, Sainbayar Sukhbaatar, arthur szlam, and Jason Weston. Hash layers for large
sparse models.
In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman
Vaughan, editors, Advances in Neural Information Processing Systems, volume 34, pages
17555–17566. Curran Associates, Inc., 2021.
[23] Carlos Riquelme Ruiz, Joan Puigcerver, Basil Mustafa, Maxim Neumann, Rodolphe Jenatton,
André Susano Pinto, Daniel Keysers, and Neil Houlsby. Scaling vision with sparse mixture of
experts. In A. Beygelzimer, Y. Dauphin, P. Liang, and J. Wortman Vaughan, editors, Advances
in Neural Information Processing Systems, 2021.
[24] Aashaka Shah, Vijay Chidambaram, Meghan Cowan, Saeed Maleki, Madan Musuvathi, Todd
Mytkowicz, Jacob Nelson, Olli Saarikivi, and Rachee Singh. Synthesizing collective com-
munication algorithms for heterogeneous networks with TACCL. CoRR, abs/2111.04867,
2021.
[25] Noam Shazeer, Youlong Cheng, Niki Parmar, Dustin Tran, Ashish Vaswani, Penporn Koanan-
takool, Peter Hawkins, HyoukJoong Lee, Mingsheng Hong, Cliff Young, Ryan Sepassi, and
Blake Hechtman. Mesh-TensorFlow: Deep learning for supercomputers. In Proceedings of
the 32nd International Conference on Neural Information Processing Systems, NIPS'18, page
10435–10444. Curran Associates Inc., 2018.
[26] Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc V. Le, Geoffrey E.
Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-
experts layer. CoRR, abs/1701.06538, 2017.
[27] Bichen Wu, Chenfeng Xu, Xiaoliang Dai, Alvin Wan, Peizhao Zhang, Masayoshi Tomizuka,
Kurt Keutzer, and Peter Vajda. Visual transformers: Token-based image representation and
processing for computer vision. CoRR, abs/2006.03677, 2020.
[28] Yan-Quan Zhou, Tao Lei, Han-Chu Liu, Nan Du, Yanping Huang, Vincent Zhao, Andrew M.
Dai, Zhifeng Chen, Quoc V. Le, and James Laudon. Mixture-of-experts with expert choice
routing. ArXiv, abs/2202.09368, 2022.
11
A Appendix
A.1 Perplexity Evaluation Results
Table 4: Perplexity Evaluation Result. To further validate the model convergence performance,
we list the perplexity (PPL) at 10w step (near 7 days) of GPT-Medium (12 layers, hidden size
1024, intermediate size 2048, GShard, Capacity factor 1.2) with different expert numbers on the
openwebtext2 dataset. Combined with the information in Figure 3 of the paper, we can find that
TA-MoE does not influence the convergence of the model when compared with the well-known
FastMoE baseline.
Expert Scale TA-MoE Valid PPL Baseline Valid PPL
8
16
32
48
17.97
15.18
13.37
12.55
18.12
15.39
13.53
12.49
A.2 Data Dispatch Distribution
Figure 7 further elaborates the data dispatch patterns of GPU rank 0-7 (within a node) on 8, 16,
32, 48 experts. We also list the Rank-0 dispatch information of FastMoE with even distribution
method as the baseline. On a single node topology, each rank prefers to dispatch data to the expert
within a node. The topology influence on the data dispatch preference is relatively small, because
the bandwidth variance within a node is small. Multi-node topology results show a consistent
"ladder-like" distribution trend that the ranks within a node has a high preference to dispatch the data
to intra-node rank group, instead of transferring data to inter-node ranks. These results verify the
effectiveness of the proposed adaptive topology-aware method.
Figure 7: The data dispatch distribution of rank 0 to 7 on 16, 32, 48 GPUs and experts.
12
01234567Rank id of 8 Experts0.00.51.01.52.0Dispatched Token Number1e3BaselineRank-0Rank-1Rank-2Rank-3Rank-4Rank-5Rank-6Rank-702468101214Rank id of 16 Experts0.00.20.40.60.81.01.2Dispatched Token Number1e3BaselineRank-0Rank-1Rank-2Rank-3Rank-4Rank-5Rank-6Rank-7051015202530Rank id of 32 Experts0.00.20.40.60.81.01.2Dispatched Token Number1e3BaselineRank-0Rank-1Rank-2Rank-3Rank-4Rank-5Rank-6Rank-7010203040Rank id of 48 Experts0.00.20.40.60.81.0Dispatched Token Number1e3BaselineRank-0Rank-1Rank-2Rank-3Rank-4Rank-5Rank-6Rank-7Figure 8: Speedup of TA-MoE over FastMoE on Swin Transformer Based Model.
A.3 Tests on Swin Tranformer Based MoE Tasks
To further validate the generality of TA-MoE, we also carry out an experiment of Vision Tasks on
ImageNet-1k dataset. The well-known vision transformer architecture Swin Transformer [14] is
picked as the base model. The detailed model configurations are listed in Table 5. We evaluate
the speedup on Cluster A with 16 and 32 GPUs as an illustration, where 16 GPUs configurations
represents symmetric tree topology and 32 GPUs configurations represents asymmetric tree topology.
As shown in Figure 8, we can achieve 1.18x and 1.20x speedup when compared with FastMoE on 16,
and 32 GPUs, respectively.
Table 5: Detailed specifications of the Swin-Transformer model.
Name
Layers Gate
Stage 1
Stage 2
Stage 3
Stage 4
Swin
Transformer
v1
12
GShard
concat 4x4,
96-d, LN
{win.sz. 7x7,
dim 96,
head3} x2
concat 2x2,
192-d, LN
{win.sz. 7x7,
dim 192,
head6} x2
concat 2x2,
384-d, LN
{win.sz. 7x7,
dim 384,
head12} x6
concat 2x2,
768-d, LN
{win.sz. 7x7,
dim 768,
head324} x2
Capacity
factor
1.2
13
E16E320.00.51.01.52.0Time cost/iter (s)1.18x1.20xFastMoETA-MoE |
|
http://arxiv.org/abs/2302.09913v3 | 2023-06-02T10:06:49 | 2023-02-20T11:15:18 | ByzSecAgg: A Byzantine-Resistant Secure Aggregation Scheme for Federated
Learning Based on Coded Computing and Vector Commitment | In this paper, we propose ByzSecAgg, an efficient secure aggregation scheme
for federated learning that is protected against Byzantine attacks and privacy
leakages. Processing individual updates to manage adversarial behavior, while
preserving privacy of data against colluding nodes, requires some sort of
secure secret sharing. However, the communication load for secret sharing of
long vectors of updates can be very high. ByzSecAgg solves this problem by
partitioning local updates into smaller sub-vectors and sharing them using ramp
secret sharing. However, this sharing method does not admit bi-linear
computations, such as pairwise distance calculations, needed by
outlier-detection algorithms. To overcome this issue, each user runs another
round of ramp sharing, with different embedding of data in the sharing
polynomial. This technique, motivated by ideas from coded computing, enables
secure computation of pairwise distance. In addition, to maintain the integrity
and privacy of the local update, ByzSecAgg also uses a vector commitment
method, in which the commitment size remains constant (i.e. does not increase
with the length of the local update), while simultaneously allowing
verification of the secret sharing process. In terms of communication loads,
ByzSecAgg significantly outperforms the state-of-the-art scheme, known as BREA. | [
"Tayyebeh Jahani-Nezhad",
"Mohammad Ali Maddah-Ali",
"Giuseppe Caire"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09913v3",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09913v3",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.CR",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.CR",
"cs.DC",
"cs.IT",
"cs.LG",
"math.IT"
] | ByzSecAgg: A Byzantine-Resistant Secure
Aggregation Scheme for Federated Learning Based
on Coded Computing and Vector Commitment
Tayyebeh Jahani-Nezhad, Mohammad Ali Maddah-Ali, and Giuseppe Caire
1
3
2
0
2
n
u
J
2
]
R
C
.
s
c
[
3
v
3
1
9
9
0
.
2
0
3
2
:
v
i
X
r
a
Abstract-In this paper, we propose ByzSecAgg, an efficient
secure aggregation scheme for federated learning that is protected
against Byzantine attacks and privacy leakages. Processing indi-
vidual updates to manage adversarial behavior, while preserving
privacy of data against colluding nodes, requires some sort of
secure secret sharing. However, the communication load for
secret sharing of long vectors of updates can be very high.
ByzSecAgg solves this problem by partitioning local updates
into smaller sub-vectors and sharing them using ramp secret
sharing. However, this sharing method does not admit bi-linear
computations, such as pairwise distance calculations, needed by
outlier-detection algorithms. To overcome this issue, each user
runs another round of ramp sharing, with different embedding
of data in the sharing polynomial. This technique, motivated
by ideas from coded computing, enables secure computation of
pairwise distance. In addition, to maintain the integrity and
privacy of the local update, ByzSecAgg also uses a vector
commitment method,
in which the commitment size remains
constant (i.e. does not increase with the length of the local
update), while simultaneously allowing verification of the secret
sharing process. In terms of communication loads, ByzSecAgg
significantly outperforms the state-of-the-art scheme, known as
BREA.
Index Terms-Federated
learning,
Secure
aggregation,
Byzantine-robustness, Vector Commitment.
I. INTRODUCTION
F Ederated learning (FL) is an emerging distributed learning
framework that allows a group of distributed users (e.g.,
mobile devices) to collaboratively train a global model with
their local private data, without sharing the data [1]–[3].
Specifically, in a FL system with a central server and several
users, during each training iteration,
the server sends the
current state of the global model to the users. Receiving the
global model, each user then calculates a local update with
its local data, and sends the local update to the server. By
aggregating the local updates, the server can update the global
model for the next iteration. While the local datasets are not
directly shared with the server, several studies have shown that
a curious server can launch model inversion attacks to reveal
information about the training data of the individual users
from their local updates [4], [5]. Therefore, the key challenge
to protect users' data privacy is to design secure aggregation
protocols, which allow the aggregation of the local updates to
T. Jahani-Nezhad and G. Caire are with the Electrical Engineering and
Computer Science Department, Technische Universität Berlin, 10587 Berlin,
Germany (e-mail: [email protected], [email protected])
M. A. Maddah-ali are with the Department of Electrical and Computer En-
gineering, University of Minnesota, Twin Cities (e-mail: [email protected])
be computed without revealing each individual data. Moreover,
as some users may randomly drop out of the aggregation
process (due to low batteries or unstable connections), the
server should be able to robustly recover the aggregated local
updates of the surviving users in a privacy-preserving manner.
As such motivated, a secure aggregation protocol SecAgg
is proposed in [6]. In SecAgg, the local updates are masked
before being sent to the server, using the private and shared
random vectors, such that the shared parts can be canceled out
when aggregated. One of the major challenges for SecAgg
is the communication load, which grows quadratically with
the number of users. There has been a series of works aiming
to improve the communication efficiency of SecAgg (see,
e.g., [7]–[13]). For instance, SwiftAgg+, recently proposed
in [14], significantly reduces the communication overheads
without any compromise on worst-case information-theoretic
security, and achieves optimal communication loads within
diminishing gaps for secure aggregation.
In [7]–[14], the honest-but-curious model for secure ag-
gregation is considered in which users correctly follow the
protocol but some of them may try to gather information
about other users' private information, potentially through
collusion. However, some studies have also addressed the
malicious model in which Byzantine adversaries have more
capabilities and may run poisoning attacks, i.e., manipulate
their inputs to change the outcome of the aggregation [15]–
[17]. The problem of robustness against Byzantine adversaries
in distributed and federated learning is well-researched in two
categories: distance-based methods [18]–[21] and validation
data-based methods [22], [23]. However, those defenses come
with some potential privacy issues, as they require the server
to process the local model updates.
As a Byzantine resistant secure aggregation scheme, in [24],
BREA is proposed in which users share their model updates
with others using Shamir secret sharing and then calculate
the pairwise distance between the received shares. The server
then uses this information to identify and exclude Byzantine
users from the aggregation process. BREA suffers from two
major shortcomings: (1) to verify secret sharing, in BREA
every single element of data is committed separately, (2)
The secret sharing is not designed efficiently. As a result,
the loads of commitment and sharing grow linearly with the
aggregated size of all local updates. An alternative approach is
proposed in [25], which involves grouping users anonymously
and randomly into subgroups with a hierarchical tree structure.
The aggregation method similar to SecAgg is performed
within each subgroup, and then the process repeats at the
next
level of subgroups toward the root. The anonymity
and randomness of the grouping reduce the probability of
successful Byzantine attacks, as attackers do not know which
subgroup the compromised device belongs to. However, in
that approach, smaller subgroups result in reduced privacy
for participants, while larger subgroups make it easier for the
Byzantine attacker to hide their malicious model among the
honest ones. In [26], a similar idea is proposed, which involves
repeating the random grouping multiple times to save more
updates of benign users through robust aggregation. However,
that approach increases the communication loads and also
reveals some information about the local updates. In [27],
ELSA is proposed, which utilizes a distributed trust setup
where two servers in separate trust domains work together
to emulate the role of a central coordinating server. Each
iteration begins with two servers selecting a group of users to
participate and sharing the current global model with them.
These users then use the cryptography module to securely
share their local updates with the two servers. The servers
then use an interactive protocol to combine these updates and
find the aggregation.
In this paper, we propose ByzSecAgg, a scheme for
Byzantine-robust secure aggregation in a federated learning
setting with a single server. The proposed scheme reduces
the communication loads, and is robust against user dropouts,
collusion and Byzantine adversarial attacks, and it involves the
following steps:
• Each user partitions its local update vector into smaller sub-
vectors and broadcasts constant-size commitments of them,
regardless of the size of the local update. This ensures that
the sub-vectors can be proven to be unchanged during the
scheme, while still keeping them hidden.
• Users securely share these sub-vectors with others using
ramp secret sharing, and these shares can be verified using
the commitments.
• Each user creates another polynomial function to send
additional shares of their sub-vectors to other users, allowing
for the computation of pairwise distance of shares through
coded computing.
• The server then uses these pairwise distances of shares to
recover the pairwise distances of the true local updates.
Using these distances, the server employs a distance-based
outlier detection algorithm to select a subset of users for
aggregation.
• Finally, the server obtains the aggregation of local updates
of the selected users by communicating with the users who
locally aggregate the secret shares of the model updates that
belong to the selected users.
ByzSecAgg ensures the privacy of individual local models
by performing computations using secret shares, which prevent
users from learning the true values of local updates. Addition-
ally, the server is not able to obtain any information about
the local models beyond the aggregation and the pairwise
distances. Furthermore, the commitments in ByzSecAgg are
binding and computationally hiding. This means that users
cannot obtain any information from the commitments, but they
2
are still able to verify the authenticity of the messages received
from others and validity of sharings.
Table I shows the comparison between the baseline frame-
work BREA in [24] and ByzSecAgg in terms of the communi-
cation loads. For a fair comparison, we consider three metrics:
the server communication load, the per-user communication
load and the commitments size. Server communication in-
dicates the total size of all messages which are sent or
received by the server, per-user communication denotes the
total size of all messages which are sent by each user, and the
commitments size represents the size of commitments made
by users required for message verification. Compared with
the baseline, as shown in Table I, in the system consisting of
N users, ByzSecAgg reduces server and per-user communi-
cation loads, as well as significantly decreasing commitment
size. The proposed scheme allows for K, a design parameter,
to be in the range [1 : N −D+1
− A − T ], where D, T and
A denote the maximum number of dropouts, colluding users,
and Byzantine adversaries, respectively, for which the scheme
is designed. Based on system parameters N and L, which
is the size of each local update, the optimal value of K for
minimizing communication loads can be chosen. For instance,
for large L, in extreme case we can choose K = O(N ), which
significantly decreases the server and per-user communication
loads. Note that in the special case when K = 1, the server and
per-user communication loads in ByzSecAgg are equivalent
to those in BREA. However, unlike BREA, the commitment
size remains constant in ByzSecAgg, regardless of the size
of local updates.
2
A. Notation
For n ∈ N the notation [n] represents set {1, . . . , n}. In
addition, for n1, n2 ∈ Z the notation [n1 : n2] denotes the set
{n1, . . . , n2}. Furthermore, the cardinality of set S is denoted
by |S|. In addition, we denote the difference of two sets A,
B as A\B, that means the set of elements which belong to A
but not B. In addition, E[X] and H(X) refer to the expected
value and the entropy of random value X respectively. Pr(A)
is the probability of event A.
II. PROBLEM FORMULATION
We consider the Byzantine-robust secure aggregation prob-
lem, for a federated learning system, consisting of a server
and N users. The objective of the server is to train a global
model wg ∈ RL, with dimension L ∈ N, using the data held at
users, by minimizing a global cost function L(wg). In round
t of the training phase, the server broadcasts the global model
w(t)
g ∈ RL to all users. Then each user n, n ∈ [N ] computes
a private local update wn ∈ RL based on its private local
dataset. In this paper, we focus on perfect secure aggregation
schemes, which rely on operations in a finite field to protect
the privacy of the local updates [6]–[14]. Consider that each
user employs an element-wise stochastic quantization method
that involves a rounding function Q : R → R and a mapping
function Λ : R → F, which maps the integer numbers to
elements of a finite field F. The finite field is considered
TABLE I
COMMUNICATION LOADS OF BYZANTINE-ROBUST SECURE AGGREGATION FRAMEWORKS IN FEDERATED LEARNING. HERE N IS THE TOTAL NUMBER OF
THE USERS, L IS THE LOCAL UPDATES SIZE, T IS THE NUMBER OF COLLUDING USERS, D IS THE NUMBER OF DROPOUTS, A IS THE NUMBER OF
BYZANTINE ADVERSARIES. IN BY ZSE CAG G, PARAMETER K ∈ [1 : N −D+1
− A − T ] CAN BE CHOSEN BASED ON THE NETWORK.
2
3
Approach
BREA [24]
ByzSecAgg
Server communication
(2A + T + 1)L + (T + A + 1
2 )N (N − 1)
(1 + 2A+T
K )L + (T + A + K − 1
2 )N (N − 1)
Per-user communication
N L + N (N −1)
2
N L + N (N −1)
,
K L + 3N (N −1)
2N
2
2
if K = 1
if K > 1
,
(cid:40)
Commitments size
T N L
N (2T + 1),
N (3K + 4T − 2),
if K = 1
if K > 1
(cid:40)
large enough to prevent hitting the boundary in the process
of aggregation.
User n also has a collection of local random variables Zn,
whose elements are selected uniformly at random from FL,
and independently of each other and of the local updates. It is
assumed that each user has an authenticated broadcast channel
through which messages can be sent and received by all users.
Additionally, it is assumed that each user has an error-free
point-to-point communication link to every other user and the
server. Let M(L)
n→n′ ∈ F∗ ∪ {⊥} denote the message that
user n sends to user n′ in finite field F in the algorithm.
In addition, let X(L)
n ∈ F∗ ∪ {⊥} denote the message sent
by user n to the server. The null symbol ⊥ represents the
case no message is sent. Here F∗ = ∪l∈NFl. The message
M(L)
n→n′ is a function of wn, Zn. We denote the corresponding
encoding function by φ(L)
is a function
of wn, Zn, and the messages that user n has received from
other users. We denote the corresponding encoding function
by φ(L)
n . Let Us refer to a subset of users selected by the
server, and their local updates are used for aggregation. Let
XS = {X(L)
n }n∈S represent the set of messages the server
receives from a subset of users S. The received messages
from the users are decoded by the server using the decoding
function ψ(L). Function Ω : (F∗)|S| → FL represents both the
aggregation rule and the user selection method utilized by the
server as the outlier detection method. The server updates the
global model by applying function Ω to the decoded received
messages, as
n→n′. Similarly, X(L)
n
w(t+1)
g
= w(t)
g − δtΛ−1
(cid:18)
Ω(cid:0)ψ(L)(X(L)
n , n ∈ S)(cid:1)
(cid:19)
,
where δt is the learning rate at round t and Λ−1 : F → R is
a demapping function.
In this setting, we assume that a subset of users D ⊂ [N ]
drops out, i.e., stay silent (or send ⊥ to other users and the
server) during the protocol execution. We denote the maximum
number of dropped-out users as D ∈ N. We also assume
that some of the users collude to gain information about the
local updates of the honest users. The maximum number of
colluding users is denoted by T ∈ N.
Furthermore, we also assume some of the users are Byzantine
adversaries, who engage in adversarial behaviors of two dif-
ferent types: (Type 1) The adversaries may aim to prevent the
global model to converge and choose malicious local update
parameters, i.e., poisoning attacks (Type 2) the adversaries
inconsistent with the
may send messages to other nodes,
protocol. The maximum number of Byzantine adversaries in
the system is denoted by A ∈ N. We consider that all
Byzantine adversaries are probabilistic polynomial time (PPT)
algorithms with respect to a security parameter κ ∈ N [28].
It means that the Byzantine adversaries can run an algorithm
within polynomial time and uses probabilistic methods to try
to break the security of the system with a given security
parameter κ. Note that the identities of dropouts, colluding
users, and Byzantine adversaries are not known beforehand.
In addition, to enable verification of the messages in this
adversarial system to protect against type 2 error, we use a
vector commitment scheme. A vector commitment scheme is
a cryptographic primitive that enables a user to commit to
a vector with the following desirable features. It is compu-
tationally infeasible to determine the committed vector from
the commitment value. It
is also computationally infeasi-
ble to find a different vector that maps to the same com-
mitment value. More precisely, vector commitment scheme
VC=(Setup,Commit,Witness,Verify) includes the following
components:
• Setup: 1κ → (pp, sp): this protocol is run by a trusted
or distributed authority at the beginning to take security
parameter κ and generates some public parameters (pp) and
some local secret parameters (sp).
• Commit:(pp, ν) → C: this algorithm takes vector ν as
input and outputs a commitment C.
• Witness: (pp, ν) → ω: this algorithm takes vector ν as
input and computes a witness ω.
• Verify:(pp, C, ω) → b ∈ {True,False}: this algorithm
takes a witness ω and a commitment C as input and returns
either True or False based on the validity of the witness.
A Byzantine-robust secure aggregation scheme consists of
the encoding functions φ(L)
n→n′, φ(L)
n , n, n′ ∈ [N ], the decoding
function ψ(L), the aggregation rule Ω, and the vector com-
mitment scheme VC such that the following conditions are
satisfied:
1. Correctness:
• Correctness of Commitments: For an honest user n
with quantized local update ̄wn of data and a com-
mitment Cn = Commit(pp, ̄wn),
the created wit-
ness ωn = Witness(pp, ̄w)
successfully satisfies
Verify(pp, Cn, ωn) = True.
• Correctness of the Final Result: Despite the presence of
at most D dropouts, A Byzantine adversaries, and T col-
luding users, the server maintains the capability to recover
̄w ≜
1
̄wn which must be the outcome of
n∈Us
|Us|
Ω(cid:0)ψ(L)(X(L)
n , n ∈ S)(cid:1).
(cid:80)
2. Robustness against Byzantine Adversaries:
• Commitment Binding: The algorithm Commit should create
a binding and deterministic commitment to the data. For-
mally, for adversary A who can simulate any user, it must
hold
(cid:18)
Pr
(pp, sp) ← Setup(1κ), (ν, ν′) ← A(pp, sp) :
ν ̸= ν′ ∧ Commit(ν) = Commit(ν′)
(cid:19)
≤ ε(κ),
where function ε(.) is a negligible function, which means
for all c > 0 there exists a kc such that for all k > kc
we have ε(k) < 1
kc . In short, this means that a Byzantine
adversary committer can present two distinct values of ν
with the same commitment C with vanishing probability.
• Global Model Resiliency: The aggregation rule Ω should
prioritize global model resiliency, even in the presence of
up to A Byzantine adversaries (type 1), by ensuring that
at the end of each iteration, the output of the aggregation
rule remains close to the true gradient. Formally, at each
iteration of the training process, for the true gradient vector
g ≜ ∇L(w(t)
g ), the output of the aggregation rule, i.e.,
n , n ∈ S)(cid:1) must satisfy a well-defined
gGAR ≜ Ω(cid:0)ψ(L)(X(L)
closeness criterion ξ(gGAR, g, N, A).
• Malicious Computation Results: The general scheme should
maintain robustness against any malicious computation re-
sults produced by Byzantine adversaries (type 2) that may
be sent to the server and other users during each step of the
scheme.
3. Privacy Constraint:
• Hiding Property: If a proof (pp, Cn) and a witness ωn for
quantized local update ̄wn, n ∈ [N ] are given and the
verification Verify(pp,Cn,ωn) returns True, no user can
figure out the value of ̄wn with non-negligible probability.
• Privacy of Individual Local Updates: The privacy constraint
ensures that no group of up to T colluding users can extract
any information about the local models of other honest
users. In addition, after receiving XS and colluding with
up to T colluding users, the server should not gain any
information about local updates of the honest users, beyond
the aggregation of them, and beyond what is strictly required
by the user selection (outlier detection) method.
For a Byzantine-robust secure aggregation scheme satisfy-
ing the above conditions, we define average per-user commu-
nication load and the server communication load as follows:
Definition 1 (Average per-user communication load). denoted
by Ruser, is defined as the aggregated size of all messages sent
by users, i.e.,
Ruser =
1
N
(cid:88)
n,n′∈[N ],
n′̸=n
(cid:0)H(M(L)
n→n′) + H(X(L)
n )(cid:1),
where H(X) refer to the entropy of random variable X. Here,
it represents the number of symbols (bits) required to transmit
the messages.
Definition 2 (Server communication load). denoted by Rserver,
4
is defined as the aggregated size of all messages received by
the server, i.e.,
Rserver =
(cid:88)
n∈[N ]
H(X(L)
n ).
In this paper, we propose ByzSecAgg, a novel single-
server Byzantine-robust secure aggregation scheme to meet
the aforementioned conditions. In ByzSecAgg, each user
partitions its local update vector of length L into K smaller
sub-vectors of length L
K and broadcasts constant-size commit-
ments of them. Users then use ramp sharing [29] to share
the sub-vectors with others, which can be verified using
the commitments. This method allows for a major reduction
in communication loads, however, it makes computing the
pairwise distances between the local updates and removing the
outliers challenging. To address this issue, we use techniques
inspired by coded computing [30]–[32], where each user runs
another ramp sharing, where data vectors are embedded in
the coefficients differently. These two sets of shares admit
the computation of the pairwise distances in a very efficient
way. The server then receives the pairwise distances of the
shares, which are used to recover the pairwise distances of
the local updates. These distances are used in the multi-Krum
algorithm [18], as the outlier detection method, to select m
users for aggregation. Finally, communication with the server
is required so that the server can obtain the aggregation of
local updates of the selected users. To be able to verify that
users follow the sharing protocol correctly and also not change
their data in the second round of sharing, we need to be able
to verify it against some commitment. We suggest using some
linear commitment scheme [33] that unlike many existing
solutions, the size of the commitment remains constant and
does not grow with the size of data.
III. PRELIMINARIES
it
is essential
In order to develop a secure aggregation scheme that is
resilient to Byzantine adversarial behavior, particularly of type
1,
to employ a robust aggregation method.
Specifically, in this paper, we leverage the multi-Krum al-
gorithm proposed in [18]. More in general, any alternative
aggregation methods that are robust against type 1 adversarial
attacks can also be employed in ByzSecAgg.
A. Multi-Krum Algorithm
In the distributed stochastic gradient descent (SGD) prob-
lem, and in the presence of Byzantine adversaries (type 1),
using the average of all users' gradients to update the model
parameters is not robust since a single Byzantine user can
cause an arbitrarily large error in the update. To handle this,
the server must use a gradient aggregation rule (GAR) Ω that
is resistant to malicious gradients that may be produced by up
to A Byzantine adversaries. At iteration t, assume that each
g , ζ (t)
honest user n calculates an estimate w(t)
n = G(w(t)
n )
of the gradient of the cost function L, where ζ (t)
is a
n
random variable representing the sample or mini-batch of
samples drawn from user n's dataset, and w(t)
is the global
g
model parameter received from the server. On the other hand,
Byzantine adversarial users may send some arbitrary vector to
the server (type 1 adversarial attack). One method to measure
resilience against such Byzantine users is through the concept
of (γ, A)-Byzantine resilience, as introduced and supported by
convergence theories in [18].
g , ζ (t)
i ), with E
Definition 3 ((γ, A)-Byzantine Resilience [18]). Consider N
vectors w1, . . . , wN ∈ RL which are gradient vectors received
by the server from N users. If user i is non-Byzantine,
then wi is independent identically distributed random vector,
wi ∼ G(w(t)
g ). Vector wi for
a Byzantine user can be any arbitrary vector. For any angular
value 0 ≤ γ < π/2 and any integer 0 ≤ A ≤ N denoting
the maximum number of Byzantine adversaries, a gradient
aggregation rule (GAR) Ω is called (γ, A)-Byzantine resilient
if vector wGAR ≜ Ω(w1, . . . , wN ) satisfies the following two
conditions:
G = ∇L(w(t)
ζ(t)
i
1) ⟨E[wGAR], g⟩ ≥ (1 − sin γ)∥g∥2 > 0, where g is the true
gradient g ≜ ∇L(w(t)
g ).
2) For r ∈ {2, 3, 4}, E[∥wGAR∥r]
by E[∥wGAR∥r] ≤ c (cid:80)
r1+***+rk=r
where c is a generic constant and r1, . . . , rk are non-
negative integers.
is upper bounded
E[∥G∥r1] . . . E[∥G∥rk ],
In this definition, Condition 1 ensures that the angle between
the true gradient g and the output wGAR is small enough
and on average the output is in the same direction as the
true gradient. Condition 2 ensures that the second, third, and
fourth-order moments of the output of the gradient aggregation
rule are bounded by a linear combination of the moments of a
correct estimator of the gradient. This is generally necessary
to ensure the convergence of the SGD algorithm.
Krum algorithm [18] is a gradient aggregation rule which
is resilient to the presence of A Byzantine adversaries users
in a distributed system consisting of N users as long as
N > 2A + 2. The Krum aggregation algorithm returns the
gradient computed by the user with the lowest score, which
is determined by considering the N − A − 2 closest gradients
to that user's gradient. More precisely, let w1, . . . , wN be the
gradients received by the server. Krum algorithm assigns to
each vector wi score s(i) ≜ (cid:80)
∥wi − wj∥2, where i → j
j:i→j
denotes that wj belongs to the N − A − 2 closest vector (in
terms of squared distance) to wi for any i ̸= j. The output
of Krum algorithm is KR(w1, . . . , wN ) = wi∗ , where i∗ is
the gradient with the lowest score, i.e., for all i we have
s(i∗) ≤ s(i).
(
[18]). Consider
random vectors
i.i.d.
1
Lemma
∈ RL such that wi ∼ G(wg, ζi),
w1, . . . , wN
with EG(wg, ζi) = ∇L(wg). Define Lσ2(wg) ≜
E[∥G(wg, ζi) − ∇L(wg)∥2]. Let ̃w1, . . . , ̃wA be any A
random vectors that may depend on the wi's. If N > 2A + 2
Lσ < ∥∇L(wg)∥, where η(N, A) is defined as
and η(N, A)
(cid:115)
√
η(N, A)≜
N − A +
(cid:18)
2
A(N − A − 2) + A2(N − A − 1)
N − 2A − 2
(cid:19)
then the Krum algorithm is (γ, A)-Byzantine resilience, where
5
0 ≤ γ < π
2 is defined by sin γ = η(N,A)
√
Lσ
∥∇L(wg)∥ .
The convergence analysis of the SGD using Krum algorithm
is presented in [18]. The proof relies on certain conditions
regarding the learning rates and the gradient estimator. In
addition, in that paper, a strongest variant of Krum algorithm
is proposed called multi-Krum. In multi-Krum, m ∈ [N ],
m < N − 2A − 2, gradient vectors wi∗
m are selected
that have the lowest scores and the output of the algorithm is
the average of the selected vectors, i.e., 1
m
, . . . , wi∗
k=1 wi∗
(cid:80)m
.
1
k
The main goal of ByzSecAgg is to design a scheme that
is efficient in terms of communication loads and ensures the
privacy conditions, despite the presence of Byzantine users
with adversarial behavior (type 1 and type 2), colluding users,
and dropouts.
IV. THE PROPOSED SCHEME
In this section, we explain ByzSecAgg in details. Consider
a federated learning system with one server and N users.
The scheme is designed to handle a maximum number of
T colluding users, a maximum number of D dropout users,
and a maximum number of A Byzantine users, as defined in
Section II. The adversaries are assumed to be probabilistic
polynomial time (PPT) algorithms with respect to the secu-
rity parameter κ. The set of colluding users, dropouts, and
adversaries are not known beforehand.
User n has a local update wn ∈ RL. We focus on perfect
secure aggregation schemes, which rely on operations in a
finite field to protect the privacy of the local updates [6]–[14].
We choose a finite field, GF (p) denoted by Fp, for some
prime number p which is large enough. User n samples vectors
Zn = {zn,j, j ∈ [T ]} and ̃Zn = { ̄zn,j, j ∈ [T ]} uniformly at
p , for some parameter K ∈ N. In addition,
random from F
user n samples random scalars Rn = {r(j)
n,i, i ∈ [2(K + T ) −
1]\{K}, j ∈ [N ]} uniformly at random from Fp.
Each user takes the following steps:
L
K
1) Quantization: User n converts its local update vector
wn ∈ RL in real numbers to vector ̄wn ∈ FL
p in finite field.
This conversion allows for the use of finite field operations,
which play a crucial role in protecting the privacy of the local
updates. To achieve this, each user first applies the stochastic
rounding function in [24], [34] element-wise as follows
Qq(x) =
(cid:40) ⌊qx⌋
q
⌊qx⌋+1
q
with probability 1 − (qx − ⌊qx⌋),
with probability qx − ⌊qx⌋,
(1)
where integer q ≥ 1 is the number of quantization levels and
⌊x⌋ is the largest integer that is less than or equal to x. Note
that the rounding function is unbiased, i.e., E[Qq(x)] = x.
In addition, to represent negative values in the finite field, a
mapping function is needed. The quantized version of the local
update of user n denoted by ̄wn is defined as follows
̄wn ≜ Λ
(cid:18)
(cid:19)
qQq(wn)
,
(2)
,
where Λ : R → Fp is a mapping function which is applied
element-wise and defined as
(cid:40)
Λ(x) =
x
if x ≥ 0,
x + p if x < 0.
(3)
It should be noted that in this step, any rounding function that
ensures the convergence of the model can be utilized. There
are no restrictions on selecting the rounding function in the
proposed method.
2) Partitioning the local updates: User n partitions its
quantized local update ̄wn into K ∈ Z sub-vectors, i.e.,
̄wn = [ ̄wn,1, ̄wn,2, . . . , ̄wn,K]T ,
2
K and
− A − T ]. If the value of K does not
where each part ̄wn,k, k ∈ [K] is a vector of size L
K ∈ [1 : (N −D+1)
divide L, we can zero-pad the quantized local models.
3) Broadcasting the Commitments: Since all steps are done
in the presence of adversarial behavior of type 2, some initial
hiding commitments are needed. This enables each user to
commit to certain values without revealing any information
about those values. Using the commitments, each user can
verify that the messages being received are effectively the ones
for which the commitment was created and ensure that all
users follow the protocol honestly. Inspired by the commitment
scheme in [33], we consider a scheme where each user n
produces the commitments as follows
C (n)
i =
L
(gβj−1
K(cid:81)
j=1
L
(gβj−1
K(cid:81)
j=1
L
)[ ̄wn,i]j ,
if i ∈ [K],
)[zn,i−K ]j ,
if i ∈ [K + 1 : K + T ],
(gβj−1
(gβj−1
K(cid:81)
j=1
N
(cid:81)
j=1
)[ ̃zn,i−K−T ]j , if i ∈ [K + T + 1 : K + 2T ],
)r(j)
n,i−K−2T ,
if i∈[K+2T +1:3K+4T −1]
,
i̸=2K+2T
(4)
, gβ1
where [ ̄wn,i]j is the j-th entry of ̄wn,i, and g is a generator
of cyclic group G with product operation, of prime order p ≥
22κ. In addition, β ∈ Fp is a secret parameter generated by a
trusted authority. The trusted authority then generates public
parameters (gβ0
). Recall that the size
of each commitment is equal to a single group element. These
commitments are binding, and computationally hiding under
the assumption that the discrete logarithm problem is hard in
G (see proofs in Subsection V).
4) Secret Sharing (First Round): User n forms the following
polynomial function.
, . . . , gβmax ( L
,N )−1
K
6
n sends one valuation of its created polynomial function at
α ̃n to user ̃n, for ̃n ∈ [N ]. In particular, user n sends vector
sn, ̃n ≜ Fn(α ̃n) to user ̃n, and each vector has a size of L
K .
In this step, if a user m drops out and stays silent, Fm(.) are
just presumed to be zero. Since the proposed secret sharing
is based on ramp sharing scheme, the local update is kept
private against T colluding users by adding T independent
random vectors in (5) to the message [14], [29].
5) Verification (First Round): Having received the shares
s ̃n,n from users ̃n ∈ [N ], user n can verify them. Since
each evaluation of polynomial function F ̃n(x) is a linear
combination (coded version) of its coefficients, due to the
linear homomorphism, the verification of s ̃n,n can be done
using the encoding of the commitments C ( ̃n)
as follows
i
L
K(cid:89)
j=1
(gβj−1
)[s ̃n,n]j
?=
K+T
(cid:89)
j=1
(C ( ̃n)
j
)αj−1
n .
(6)
Using this verification, user n ensures that it receives a valid
evaluation of polynomial F ̃n(.) in (5).
6) Secret Sharing (Second Round): In this step, if K ≥ 2,
user n forms the polynomial function
̃Fn(x) =
K
(cid:88)
k=1
̄wn,kxK−k +
T
(cid:88)
t=1
̃zn,txK+t−1,
(7)
and sends ̃sn, ̃n ≜ ̃Fn(α ̃n) to user ̃n for n, ̃n ∈ [N ]. In addition,
user n creates the scalar polynomial function
N (j)
n (x) =
2(K+T )−1
(cid:88)
i=1,i̸=K
r(j)
n,ixi−1, for j ∈ [N ]\{n},
(8)
and sends N (j)
≜ N (j)
n, ̃n
coefficient of xK−1 in polynomial N (j)
n (α ̃n) to user ̃n for j ∈ [N ]\{n}. The
n (x) is equal to zero.
In this step, each user communicates with other users and
sends a vector of size L
K and N − 1 scalar values. It is worth
nothing that the structure of the created polynomial function
̃Fn(x) in this step is different from the polynomial in Step 4.
Note that for K = 1, the second round of secret sharing is
not necessary, and only the first round is enough.
7) Verification (Second Round): To ensure that user n
receives a valid evaluation of polynomials ̃F ̃n(x) and N (j)
̃n (x)
from user ̃n, it can check
L
K(cid:89)
(gβj−1
)[ ̃s ̃n,n]j
?=
j=1
K
(cid:89)
(C ( ̃n)
j
)αK−j
n
K+2T
(cid:89)
j=1
i=K+T +1
(C ( ̃n)
i
)αi−T −1
n
,
N
(cid:89)
(gβj−1
)N (j)
̃n,n
?=
3K+4T −1
(cid:89)
(C ( ̃n)
i
)αi−K−2T −1
n
,
(9)
Fn(x) =
K
(cid:88)
k=1
̄wn,kxk−1 +
T
(cid:88)
t=1
zn,txK+t−1,
(5)
j=1
i=K+2T +1,
i̸=2K+2T
where the coefficient of K first terms are the partitions of
̄wn,k, for k ∈ [K]. Each user n uses its polynomial function
Fn(.) to securely share its local update with other users. Let
{αi ∈ Fp : i ∈ [N ]} be a set of N distinct non-zero values
in Fp. This set is revealed to all users, such that each user
using the available commitments. In this verification, user n
can not only confirm that it receives a valid evaluation of
polynomial ̃F ̃n(x) from user ̃n, but it can also ensure that user
̃n correctly creates polynomial ̃F ̃n(x) without any malicious
behavior. This is because the initial commitments made in
Step 3 are utilized for verification.
8) Computing Noisy Inner Products of Shares: In this step,
user n calculates the following inner product and sends the
result to the server.
i,j = ⟨Fi(αn) − Fj(αn), ̃Fi(αn) − ̃Fj(αn)⟩ + N (j)
̄d(n)
i,n + N (i)
j,n,
(10)
where i, j ∈ [N ] and i < j. Here, one can see that the inner
product of the shares, ̄d(n)
i,j , is an evaluation of a polynomial
function
̄di,j(x) ≜
2(K+T −1)
(cid:88)
l=0
al;i,jxl + N (j)
i
(x) + N (i)
j (x),
(11)
at point αn, where al,i,j is the coefficient of xl. In this
expansion, it can be shown that the coefficient of xK−1 is
K
(cid:88)
aK−1,i,j =
∥ ̄wi,k − ̄wj,k∥2.
k=1
i,j = ∥Fi(αn) − Fj(αn)∥2
For K = 1, user n computes ̄d(n)
and sends the result to the server.
9) Distance Recovery at the Server: Since ̄di,j(x) is a
polynomial function of degree 2(K +T −1), the server can use
Reed-Solomon decoding [35] to recover all the coefficients of
this polynomial using 2(K + T ) − 1 evaluations of ̄di,j(x).
Since in the setting, there are at most A adversarial users
(type 2), ̄di,j(x) can only be correctly recovered if the server
least 2(K + T + A) − 1 outcomes from the
receives at
users. In addition, ̄d(n)
i,j , for that are sent to the server from
the non-adversarial users n ∈ [N ]\D are indeed equal to
̄di,j(αn), for i < j ∈ [N ]. Therefore, the server is able
to recover ̄di,j(x). The coefficient of xK−1 in ̄di,j(x) is
equal to aK−1;i,j = ∥ ̄wi − ̄wj∥2 that the server looks for
in order to find the outliers. According to (10), the remaining
recovered coefficients of ̄di,j(x) are distorted by noise and
do not disclose any additional details about the local updates
apart from the targeted pairwise distance sought by the server.
Then the server converts the calculated distances from the
finite field to the real domain as follows.
Λ−1(aK−1;i,j)
q2
di,j =
,
(12)
where Λ−1 : Fp → R is a demapping function which is applied
element-wise and is defined as
Λ−1( ̄x) =
(cid:40)
̄x
̄x − p if p−1
if 0 ≤ ̄x < p−1
2 ,
2 ≤ ̄x < p.
(13)
Assuming a sufficiently large field size p, we can guarantee
the accurate recovery of pair-wise distances.
10) Outlier Detection at the Server: A distance-based outlier
detection method (or a closeness criterion) can be employed
to make sure that the local updates selected by the server are
consistent with each other. This will help to eliminate any
local updates that are significantly different from the others
(adversarial behavior of type 1) and may not be suitable for
inclusion in the update. In this scheme, multi-Krum algorithm
(see [18] and Subsection III-A) is utilized for this purpose.
Upon completion of the algorithm, the server selects a group
7
of m users whose local updates are close to each other and
broadcasts a list of the chosen users, denoted by Us ⊂ [N ].
the multi-Krum algorithm ensures the
As stated in [18],
resiliency of the global model, as defined in Section II, and
the convergence of the sequence of gradients (See Subsection
V).
11) Aggregation of the Shares: Each user calculates the
aggregation of shares of users belong to set Us,
i.e.,
sn = (cid:80)
F ̃n(αn), and sends it to the server. In this
step, each user sends a vector of size L
12) Recovering the Aggregation: Let us define
K to the server.
̃n∈Us
Fn(x) =
K
(cid:88)
k=1
xk−1 (cid:88)
n∈Us
̄wn,k
(14)
F(x) ≜ (cid:88)
n∈Us
T
(cid:88)
+
xK+t−1 (cid:88)
n∈Us
zn,t,
t=1
as a polynomial of degree K + T − 1. Let XS ≜ {sn}n∈S
denote the set of messages received by the server, where
S = [N ]\D. We note that sn, for non-Byzantine users, is
the evaluation of F(x) at αn. Thus, if the server receives
a minimum of K + T + 2A results from the users, it can
accurately recover the polynomial function F(x) using Reed-
Solomon decoding. In this decoding process, the first K terms
correspond to the partitions of ̄w = (cid:80)
̄wn. To ensure suc-
cessful aggregation, the field size p must be sufficiently large
to avoid encountering boundary issues during the process.
n∈Us
After recovering the aggregate of the users' local updates,
the server updates the global model for the next iteration using
the following procedure.
w(t+1)
g
= w(t)
g −
δt
q|Us|
Λ−1(cid:0) ̄w(cid:1),
(15)
where demapping function Λ−1(.) is defined in (13), and δt
is the learning rate at round t.
Algorithm 1 summarizes ByzSecAgg based on the afore-
mentioned steps.
Remark 1: The proposed scheme uses some methods to
mitigate adversarial behaviors of type 1 and type 2. To
protect against adversarial behavior of type 1, where attempts
are made to manipulate the global model at the server by
altering their local updates, ByzSecAgg employs a distance-
based outlier detection mechanism (multi-Krum algorithm).
This mechanism ensures the robustness of the global model
against such adversarial modifications. Additionally, to protect
the privacy of local updates in the outlier detection mech-
anism, ByzSecAgg proposes a privacy-preserving distance
computation method,
inspired by ramp secret sharing and
coded computing. For protection against adversarial behavior
of type 2, first a vector commitment scheme is utilized in
ByzSecAgg to ensure that users follow the protocol correctly
when creating secret shares of their local updates in two
different rounds. In addition, the ideas from error-correcting
codes are used to ensure the correctness of the calculations of
users.
Remark 2: To eliminate outliers while minimizing commu-
Algorithm 1 The proposed Byzantine-Resistant Secure Ag-
gregation Scheme: ByzSecAgg
1: for each iteration t = 0, . . . , T do
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
i
from the server
, i ∈ [3K + 4T − 1]
for each user n ∈ [N ] in parallel do
Get the global model w(t)
g
Compute the local update wn based on the local
dataset
Create the quantized update ̄wn from (2)
Partition the local update into K parts
Generate commitments C (n)
from (4) and broadcast them
Compute the first-round secret share sn, ̃n from (5)
and send to user ̃n ∈ [N ]
Verify the received shares {s ̃n,n} ̃n∈[N ] using (6)
Compute the second-round secret shares ̃sn, ̃n and
noises shares {N (j)
n, ̃n}j∈[N ] using (7) and (8) re-
spectively and send to user ̃n ∈ [N ]
Verify the received shares ̃s ̃n,n and {N (j)
by testing (9)
Compute values ̄d(n)
and send to the server
i,j , for i, j ∈ [N ], using (10)
̃n,n}j∈[N ]
end for
Server recovers pairwise distances ∥ ̄wi − ̄wj∥2, for
i < j ∈ [N ] after receiving the result using Reed-
Solomon decoding
Server converts the calculated distances from the finite
field to the real domain and recovers {di,j}i<j∈[N ]
using (12).
Server selects set Us of users by applying multi-Krum
algorithm on {di,j}i<j∈[N ]
Server broadcast set Us to all users
for user n = 1, . . . , N do
Calculate the aggregation of the first-round shares
of users belong to set Us and send the result to the
server
end for
Server recovers ̄w = (cid:80)
̄wn after receiving suffi-
n∈Us
cient results from users and employing Reed-Solomon
decoding
Server updates the global model using (15)
22:
23: end for
nication requirements, ByzSecAgg uses two different rounds
of secret sharing to securely calculate the pairwise distance
between the local updates. It is worth noting that the second
round of secret sharing is designed to only allow the server
to calculate the pairwise distance between the local updates,
rather than the pairwise distance between the partitions of
local updates.
V. ANALYSIS OF THE PROPOSED SCHEME
A. Main results
In this subsection, we present the main results, achieved by
ByzSecAgg described in Section IV.
8
t δ2
t δt = ∞ and (cid:80)
function L is
Theorem 1. We assume that (i) the cost
three times differentiable with continuous derivatives, and is
non-negative, i.e., L(x) ≥ 0; (ii) the learning rates satisfy
(cid:80)
t < ∞; (iii) the second, the third,
and the fourth moments of the quantized gradient estimator
satisfy EQ,ζ∥Qq(G(wg, ζ))∥r ≤ Ar + Br∥wg∥r for some
constant Ar and Br, where r ∈ 2, 3, 4; (iv) there exist
for all wg ∈ RL,
a constant 0 ≤ γ < π/2 such that
4q2 ≤ ∥∇L(wg)∥ sin γ; (v) the gradi-
η(N, A)
ent of the cost function L satisfies that for ∥wg∥2 ≥ R, there
exists constants ε > 0 and 0 ≤ θ < π/2 − γ such that
Lσ2(wg) + L
(cid:113)
∥∇L(wg)∥ ≥ ε > 0,
g L(wg)
∥wg∥∥∇L(wg)∥
≥ cos θ.
wT
Then, ByzSecAgg guarantees,
• Robustness against D dropouts, and A Byzantine adver-
sarial users (Type 1 and Type 2) such that the trained
model is (γ, A)-Byzantine resilient,
• The sequence of the gradients ∇L(w(t)
g ) converges al-
most surely to zero,
• Any group of up to T colluding users cannot extract
any information about the local models of other honest
users. The server cannot gain any information about local
updates of the honest users, beyond the aggregation of
them and pair-wise distances.
In addition, the communication loads in ByzSecAgg are as
follows
Rserver = (cid:0)1 +
Ruser ≤ min(
(cid:1)L + (T + A + K −
2A + T
K
, N )L + (cid:0)1 + 2I(K > 1)(cid:1) N (N − 1)
1
2
)N (N − 1),
,
2N
K
2
2
symbols from Fp, where I(.) is an indicator function, for some
K ∈ N in [1 : N −D+1
− A − T ] N ≥ 2A + D + max(2K +
2T − 1, m + 3) and m < N − 2A − D − 2. Furthermore, the
size of the commitment for each user in the achievable scheme
remains constant, equal to (K +2T )+I(K > 1)(2K +2T −2),
regardless of the size of the individual local updates, i.e., L.
Remark 3: As explained in Section IV, K and m are
designed parameters. K is the number of partitions of the local
updates. By changing K, one can change Rserver and Ruser. One
option is to choose K such that the aggregation of the per-
user communication load and the server communication load
is minimized. On the other hand, m is the number of users
whose local updates are selected by the server for aggregation,
as discussed in Subsection III-A and Section IV.
Proof. In the following, we prove that ByzSecAgg satisfies
the following conditions:
1) Correctness:
• Correctness of Commitments: The function h(x) ≜ gx, in
(4), creates a bijection mapping between the finite field Fp
and cyclic group G, where g is a generator of G. This
function also has the linear homomorphic property which
states that ∀a1, . . . , an ∈ Fp and ∀x1, . . . , xn ∈ Fp we have
(cid:19)
(cid:18) n
(cid:88)
h
n
(cid:89)
aixi
=
h(xi)ai.
i=1
i=1
If the user is honest, it will share the evaluations of the same
polynomial Fn(x) (cid:0) ̃Fn(x) and N (j)
n (x)(cid:1) in the first (sec-
ond) round of secret sharing that it had initially committed
to in Step 3. Due to the linearly homomorphic property of
the commitments in (4), the verification step in (6) (in (9))
passes for the shares of the honest user.
• Correctness of the Final Result: The received vectors by
the server at the end of Step 12 are different evaluations of
polynomial F(x) of degree K + T − 1 defined in (14). The
correctness condition of the final result of ByzSecAgg is
satisfied as the server can correctly recover (cid:80)
̄wn by
utilizing the Reed-Solomon decoding after receiving K +
T + 2A outcomes from the users with at most A adversarial
outcomes.
n∈Us
2) Robustness against Byzantine Adversaries:
• Commitment Binding: The Discrete Logarithm (DL) As-
sumption [36] states that given a prime p, a generator g of
G, and an element a ∈ Fp, no adversary with a probabilistic
polynomial-time algorithm can compute a given g and ga,
i.e., Pr[A(cid:0)g, ga(cid:1) = a] = ε(κ) (negligible) for any such
adversarial algorithm A.
In addition, consider the polynomial function qwn,i (x) de-
fined as
qwn,i (x) ≜ [ ̄wn,i]1 + x[ ̄wn,i]2 + * * * + x
L
K −1[ ̄wn,i] L
K
,
i
≜ gqwn,i (β) = gqνn,i (β).
where [ ̄wn,i]j
is the j-th entry of the i-th partition of
the quantized local update ̄wn. It can be verified that
commitments C (n)
in (4) for i ∈ [K] are equal to gqwn,i (β).
i
By contradiction, assume that
there exists an adversary
A that breaks the binding property of commitments. This
means that the adversary creates two vectors ̄wn,i and ̄νn,i,
where ̄wn,i ̸= ̄νn,i but C (n)
In this case, it can be shown that the adversary can break
the DL assumption, which means it is able to recover secret
β by having gβ. Define the polynomial function ̃q(x) as
qwn,i(x)−qνn,i(x). The corresponding commitment is equal
to ̃C (n)
≜ g ̃q(β) = gqwn,i (β)/gqνn,i (β) = 1 because the
i
commitment scheme is homomorphic. Therefore, ̃q(β) = 0,
which means that β is a root of the polynomial ̃q(x).
The adversary can easily solve the instance of the discrete
logarithm problem and find the secret parameter β by
factoring ̃q(x) [37]. This implies that breaking the biding
property would enable solving a problem that is assumed to
be computationally difficult, reinforcing the notion that the
commitment scheme must possess the biding property.
Additionally, for the evaluation binding, we can present a
similar argument. Let's assume there exists an adversar-
ial algorithm A that breaks the evaluation binding prop-
erty of commitment C and computes two different eval-
uations for Fn(x) in (5) at point α that satisfy Verify
in (6). We can construct an algorithm B that uses A
to break the DL assumption. B presents a DL instance
(g, gβ, . . . , gβ
K ). Algorithm A outputs commitments C
L
9
and two distinct values for share, i.e., Fn(α) and F′
n(α),
that satisfy (6). Specifically, we have
L
(gβj−1
K(cid:81)
j=1
)[Fn(α)]j =
L
(gβj−1
K(cid:81)
j=1
)[F′
n(α)]j =
L
K+T
(cid:81)
j=1
(C (n)
j
)αj−1
. Consequently, we
observe that
(gβj−1
)[Fn(α)]j −[F′
n(α)]j = 1. This
K(cid:81)
j=1
j=1 xj−1([Fn(α)]j − [F′
that β is a root of polynomial F ′′(x) =
implies
(cid:80) L
n(α)]j). Therefore, algorithm B
K
can compute β by factoring F ′′(x) once it receives the
results from A. Thus, the success probability of solving the
DL instance is the same as the success probability of A.
• Malicious Computation Result (Type 2 Adversarial Attack):
Here we discuss the adversarial attack of type 2 and how
ByzSecAgg resolves it:
– The transmission of invalid secret shares in Step 4 and
Step 6: this kind of attack is thwarted through the utiliza-
tion of the commitments, in which the validity of secret
shares at each round can be confirmed by verifying (6)
and (9), provided that N − D ≥ 2A + 1.
– The transmission of incorrect pairwise distance of shares
to the server in Step 8 or incorrect aggregation of the
shares of selected users in Step 11: since the values sent at
each of these two steps must represent different evaluation
points of a certain polynomial, this kind of attack will be
detected and corrected based on Reed-Solomon decoding
algorithm with at most D erasures and at most A errors,
provided that N − D ≥ 2(K + T + A) − 1 in Step 8 and
N − D ≥ K + T + 2A in Step 11.
g , ζ (t)
• Global Model Resiliency (Type 1 Adversarial Attack):
Byzantine users have the ability to modify their local up-
dates to manipulate the global model and can send arbitrary
vectors as their local updates to the server. Additionally,
in line with classical assumptions in machine learning
literature, each data sample used for computing the local
update is uniformly and independently drawn by honest
users. To detect outliers, ByzSecAgg uses the multi-Krum
algorithm introduced in Subsection III-A. Instead of the
estimator G(w(t)
n ), in the proposed scheme, the local
update of the honest user is created using the quantized
estimator Qq(G(w(t)
is demonstrated
that even when the multi-krum algorithm is applied to
the quantized vector Qq(wn) (as used in Step 1 of the
proposed scheme), it remains (α, A)-Byzantine resilient and
the sequence of the gradients converges almost surely to
zero. This is due to the fact that the quantization is unbiased
and has a bounded variance. According to Subsection III-A
if m < N − 2A − D − 2, the multi-Krum algorithm can
prevent this type of attack and ensure that the scheme is
(γ, A)-Byzantine resilient and guarantees the convergence.
Note that the first five conditions in Theorem 1, i.e., (i)-
(v), are essential in the convergence proof of multi-Krum
algorithm (see [18], [24]).
n )). In [24],
g , ζ (t)
it
3) Privacy Constraint:
• Hiding Property: For the sake of contradiction, suppose
there exists an adversarial algorithm A that can break the
hiding property of commitment C and correctly compute
vector ν ∈ Fp. We will demonstrate how to utilize A to
construct another algorithm B that can break the Discrete
Logarithm (DL) assumption.
Let (g, ga) be a DL instance that B aims to solve. B se-
p and computes (g, g ̃β, . . . , g ̃βL−1
lects a random ̃β ∈ FL
).
It then considers a vector ν = [a, ν1, ν2, . . . , νL], where
ν1, ν2, . . . , νL−1 ∈ Fp are chosen arbitrarily, and the
first entry of the vector a is the answer for the DL
instance. Since B knows ga, it can compute the vector
commitment as C = ga.g
and sends it to
A. Upon receiving the commitment, A computes and
returns vector ν. At this point, B can extract the solution
a, as it corresponds to the DL instance. Thus, the success
probability of solving the DL instance using B is equiva-
lent to the success probability of A. The aforementioned
construction illustrates that if an adversary A can break
the hiding property of commitment C, then we can utilize
it to construct another algorithm B capable of breaking
the DL assumption.
(cid:80) i=1L−1νi ̃βi
i
• Privacy of Individual Local Updates: The hiding property
of the commitments ensures that neither the server nor
any user can compute the local model ̄wn (as well as
noise vectors zn and ̃zn) from the commitments C (n)
in (4). Thus, by considering the messages exchanged
during the scheme, it is sufficient to stablish the privacy
of each local update against a group of up to T colluding
users, denoted by set T . Denote the colluding users
by ̃U1, ̃U2, . . . , ̃UT . Let us define the set of messages
received by ̃Ui as M ̃Ui
, which includes two types of
messages: sn,i, ̃sn,i and N j
n,i for n, j ∈ [N ] \ {T ∪ D},
j ̸= n. These messages correspond to the shares from
the first and second round of secret sharing in Step 4
and Step 6, respectively. According to (5) and (7), the
fact that the random vectors are chosen uniformly and
independently at random from F
p , and directly from
the privacy guarantee in ramp secret sharing [29], for
n ∈ [N ] \ T , we have
L
K
Pr(cid:0) ̄wn = ν(cid:12)
(cid:12)M ̃Ui
= Pr(cid:0) ̄wn = ν(cid:12)
= Pr(cid:0) ̄wn = ν(cid:1),
, i ∈ [T ](cid:1)
(cid:12)sn,i, ̃sn,i, i ∈ [T ](cid:1)
̃n∈Us
which means that the colluding users cannot gain any
further information about the local updates of the other
users.
Furthermore, the server is also provided with ̄d(n)
for
i,j
i < j ∈ [N ] and sn = (cid:80)
s ̃n,n from users
n ∈ [N ] \ D, from which it can reconstruct ̄d(n)
i,j (x) as
defined in (11), as well as the polynomial function F(x)
as defined in (14). Therefore, from F(x) the server can
recover the aggregation ̄w = (cid:80)
̄wn and from the
coefficient of xK−1 in ̄d(n)
i,j (x) it can recover the mutual
distance ∥ ̄wi − ̄wj∥2. It is important to note that due to
the inclusion of random noises during the computation in
Step 8 by each user, the server cannot retrieve any other
details about the local models. The only information that
n∈Us
10
can be obtained are the mutual distances between the
models, which play a vital role in outlier detection.
Communication Loads in the Proposed Scheme:
According to Step 12, the total number of vectors that are
needed to be received by the server to recover the final
aggregation is T +K +2A, each of size L
K symbols. Moreover,
in order to recover the pairwise distance di,j between ̄wi and
̄wj, the server needs 2(K + T + A) − 1 symbols of size a
single field element from the users, for i, j ∈ [N ], i ̸= j.
the server communication load in ByzSecAgg is
Thus,
(cid:1)L + (T + A + K − 1
Rserver ≤ (cid:0)1 + 2A+T
2 )N (N − 1), where
the inequality is a result of the presence of dropped-out users
in the setting.
K
In ByzSecAgg, each user participates in two rounds of
secret sharing. In the first round, they send one vector of size
L
K symbols and in the second round, they send one vector of
size L
K + N symbols to each of the other users. Additionally,
each user sends one vector of size L
K symbols to the server.
However, if K = 1, the second round of secret sharing is not
performed. In addition, each user sends at most N (N −1)
pair-
wise distances of size a single field element to the server.
Thus, the per-user communication load in ByzSecAgg is
upper-bounded as Ruser ≤ 2N
. In addition, the
commitment size for each user is only K + 2T symbols when
K = 1, and 3K + 4T − 2 symbols when K > 1, where each
symbol has the size of a single group element.
K L + 3N (N −1)
2
2
Therefore, the communication loads Rserver and Ruser in The-
orem 1 are achieved. Additionally, according to discussions in
Subsection V to meet all requirements, the inequality
N ≥ 2A + D + max(2K + 2T − 1, m + 3),
(16)
must be fulfilled. In addition, the following condition
1 ≤ K ≤
N − D + 1
2
must be satisfied for the number of partitions of the local
updates, where K ∈ Z.
− A − T,
(17)
B. Comparison with BREA [24]
The comparison results between ByzSecAgg and BREA
[24] are summarized in Table I, which highlights the dif-
ferences between the two schemes based on the defined
parameters. This subsection presents a comparison between
these two schemes in terms of communication loads in various
simulation scenarios.
Figure 1 compares the communication loads, measured in
symbols, between ByzSecAgg and BREA. The simulation
involves N = 1000 users, with T = 0.1N colluding users,
A = 0.1N Byzantine adversaries, and D = 0.2N potential
dropouts. The comparison focuses on three metrics: (a) per-
user communication load, (b) server communication load,
and (c) commitment size. Various neural networks, includ-
ing GoogleNet [38], ResNet [39], and AlexNet [40], with
different parameter numbers (L) are considered. The results
demonstrate that ByzSecAgg achieves order-wise reduction
in communication loads and commitment sizes compared to
BREA. In this comparison, for ByzSecAgg, the number of
11
(a)
(b)
(c)
Fig. 1. The comparison of communication loads, measured in symbols, between ByzSecAgg and BREA [24] with varying number of local update parameters
(L). The figure illustrates the comparison using N = 1000 users, including T = 0.1N colluding users, A = 0.1N Byzantine adversaries, and D = 0.2N
potential dropouts. Three metrics are considered: (a) per-user communication load, (b) server communication load, and (c) commitment size.
(a)
(b)
(c)
Fig. 2. The comparison of ByzSecAgg and BREA [24] in terms of communication loads while varying the number of users. The experiment considers
ResNet34 with L = 21.8M parameters. Out of the total users (N ), T = 0.1N are colluding users, A = 0.1N are Byzantine adversaries, and D = 0.2N
may drop out. The comparison evaluates three metrics: (a) per-user communication load, (b) server communication load, and (c) commitment size.
partitions (K) is selected to minimize the aggregation of per-
user communication load and server communication load. As
it is shown, the commitment size of the proposed scheme
remains constant and is not influenced by the length of local
updates. The slight variations observed in the graph are due
to changes in the selected value for K.
Figure 2 illustrates the communication loads of the two
schemes as the number of users (N ) varies. The simulation
considers L = 21.8M parameters, T = 0.1N colluding users,
A = 0.1N Byzantine adversaries, and D = 0.2N dropouts.
Similarly, in this comparison, for ByzSecAgg the number
of partitions (K) is selected to minimize the aggregation of
per-user communication load and server communication load.
Note that compared to BREA, the proposed scheme achieves
the same performance in terms of convergence and resilience
properties.
VI. CONCLUSION
In this paper, we propose ByzSecAgg, an efficient se-
cure aggregation scheme for federated learning that mitigates
Byzantine adversarial attacks while protecting the privacy of
local updates. ByzSecAgg employs techniques
individual
such as ramp secret sharing and coded computing to reduce
communication loads and enable secure computation of pair-
wise distances, which are used for distance-based outlier de-
tection algorithms. Additionally, we use a linear commitment
scheme with a constant commitment size to ensure message
integrity during the protocol and protect against adversarial
behaviors of Byzantine users. In terms of communication
loads, ByzSecAgg outperforms the state-of-the-art BREA and
offers the advantage of a constant commitment size, regardless
of local update sizes. Furthermore, it achieves the same level of
performance in terms of convergence and resilience properties.
REFERENCES
[1] B. McMahan, E. Moore, D. Ramage, S. Hampson, and B. A. y Arcas,
"Communication-efficient learning of deep networks from decentralized
data," in Artificial intelligence and statistics, pp. 1273–1282, PMLR,
2017.
[2] P. Kairouz, H. B. McMahan, B. Avent, A. Bellet, M. Bennis, A. N.
Bhagoji, K. Bonawitz, Z. Charles, G. Cormode, R. Cummings, et al.,
"Advances and open problems in federated learning," arXiv preprint
arXiv:1912.04977, 2019.
[3] T. Li, A. K. Sahu, A. Talwalkar, and V. Smith, "Federated learning:
Challenges, methods, and future directions," IEEE Signal Processing
Magazine, vol. 37, no. 3, pp. 50–60, 2020.
[4] L. Zhu and S. Han, "Deep leakage from gradients," in Federated
learning, pp. 17–31, Springer, 2020.
[5] J. Geiping, H. Bauermeister, H. Dröge, and M. Moeller, "Inverting
gradients–how easy is it to break privacy in federated learning?," arXiv
preprint arXiv:2003.14053, 2020.
02040608010012014010810910101011GoogleNetResNet18ResNet34AlexNetVGG1602040608010012014010910101011GoogleNetResNet18ResNet34AlexNetVGG1602040608010012014010210310410510610710810910101011GoogleNetResNet18ResNet34AlexNetVGG1601002003004005006007008009001000108109101001002003004005006007008009001000108109101001002003004005006007008009001000100101102103104105106107108109101012
[29] G. R. Blakley and C. Meadows, Security of ramp schemes, pp. 242–268.
1984.
[30] K. Lee, M. Lam, R. Pedarsani, D. Papailiopoulos, and K. Ramchandran,
"Speeding up distributed machine learning using codes," IEEE Trans-
actions on Information Theory, vol. 64, no. 3, pp. 1514–1529, 2017.
[31] Q. Yu, M. Maddah-Ali, and S. Avestimehr, "Polynomial codes: an opti-
mal design for high-dimensional coded matrix multiplication," Advances
in Neural Information Processing Systems, vol. 30, 2017.
[32] H. Akbari-Nodehi and M. A. Maddah-Ali, "Secure coded multi-party
computation for massive matrix operations," IEEE Transactions on
Information Theory, vol. 67, no. 4, pp. 2379–2398, 2021.
[33] K. Nazirkhanova, J. Neu, and D. Tse, "Information dispersal with
provable retrievability for rollups," arXiv preprint arXiv:2111.12323,
2021.
[34] S. Gupta, A. Agrawal, K. Gopalakrishnan, and P. Narayanan, "Deep
learning with limited numerical precision," in International conference
on machine learning, pp. 1737–1746, PMLR, 2015.
[35] S. Lin and D. J. Costello, Error control coding, vol. 2. Prentice hall
New York, 2001.
[36] A. Kate, G. M. Zaverucha, and I. Goldberg, "Constant-size commitments
to polynomials and their applications," in International conference on the
theory and application of cryptology and information security, pp. 177–
194, Springer, 2010.
[37] V. Shoup, A computational introduction to number theory and algebra.
Cambridge university press, 2009.
[38] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan,
V. Vanhoucke, and A. Rabinovich, "Going deeper with convolutions,"
in Proceedings of the IEEE conference on computer vision and pattern
recognition, pp. 1–9, 2015.
[39] K. He, X. Zhang, S. Ren, and J. Sun, "Deep residual learning for image
recognition," in Proceedings of the IEEE conference on computer vision
and pattern recognition, pp. 770–778, 2016.
[40] A. Krizhevsky, I. Sutskever, and G. E. Hinton, "Imagenet classification
with deep convolutional neural networks," Communications of the ACM,
vol. 60, no. 6, pp. 84–90, 2017.
[6] K. Bonawitz, V. Ivanov, B. Kreuter, A. Marcedone, H. B. McMahan,
S. Patel, D. Ramage, A. Segal, and K. Seth, "Practical secure aggregation
for privacy-preserving machine learning," in proceedings of the 2017
ACM SIGSAC Conference on Computer and Communications Security,
pp. 1175–1191, 2017.
[7] J. So, B. Güler, and A. S. Avestimehr, "Turbo-aggregate: Breaking the
quadratic aggregation barrier in secure federated learning," IEEE Journal
on Selected Areas in Information Theory, vol. 2, no. 1, pp. 479–489,
2021.
[8] J. H. Bell, K. A. Bonawitz, A. Gascón, T. Lepoint, and M. Raykova,
"Secure single-server aggregation with (poly) logarithmic overhead," in
Proceedings of the 2020 ACM SIGSAC Conference on Computer and
Communications Security, pp. 1253–1269, 2020.
[9] B. Choi, J.-y. Sohn, D.-J. Han, and J. Moon, "Communication-
computation efficient secure aggregation for federated learning," arXiv
preprint arXiv:2012.05433, 2020.
[10] Y. Zhao and H. Sun, "Information theoretic secure aggregation with
user dropouts," in 2021 IEEE International Symposium on Information
Theory (ISIT), pp. 1124–1129, IEEE, 2021.
[11] R. Schlegel, S. Kumar, E. Rosnes, and A. G. i Amat, "Codedpaddedfl
and codedsecagg: Straggler mitigation and secure aggregation in feder-
ated learning," IEEE Transactions on Communications, 2023.
[12] J. So, C. He, C.-S. Yang, S. Li, Q. Yu, R. E Ali, B. Guler, and
S. Avestimehr, "Lightsecagg: a lightweight and versatile design for
secure aggregation in federated learning," Proceedings of Machine
Learning and Systems, vol. 4, pp. 694–720, 2022.
[13] T. Jahani-Nezhad, M. A. Maddah-Ali, S. Li, and G. Caire, "Swiftagg:
Communication-efficient and dropout-resistant secure aggregation for
federated learning with worst-case security guarantees," in 2022 IEEE
International Symposium on Information Theory (ISIT), pp. 103–108,
2022.
[14] T. Jahani-Nezhad, M. A. Maddah-Ali, S. Li, and G. Caire, "Swiftagg+:
Achieving asymptotically optimal communication loads in secure ag-
gregation for federated learning," IEEE Journal on Selected Areas in
Communications, vol. 41, no. 4, pp. 977–989, 2023.
[15] S. Shen, S. Tople, and P. Saxena, "Auror: Defending against poisoning
attacks in collaborative deep learning systems," in Proceedings of the
32nd Annual Conference on Computer Security Applications, pp. 508–
519, 2016.
[16] E. Bagdasaryan, A. Veit, Y. Hua, D. Estrin, and V. Shmatikov, "How to
backdoor federated learning," in International Conference on Artificial
Intelligence and Statistics, pp. 2938–2948, PMLR, 2020.
[17] L. Lyu, H. Yu, X. Ma, C. Chen, L. Sun, J. Zhao, Q. Yang, and P. S. Yu,
"Privacy and robustness in federated learning: Attacks and defenses,"
IEEE Transactions on Neural Networks and Learning Systems, pp. 1–
21, 2022.
[18] P. Blanchard, E. M. El Mhamdi, R. Guerraoui, and J. Stainer, "Ma-
chine learning with adversaries: Byzantine tolerant gradient descent,"
Advances in Neural Information Processing Systems, vol. 30, 2017.
[19] R. Guerraoui, S. Rouault, et al., "The hidden vulnerability of distributed
learning in byzantium," in International Conference on Machine Learn-
ing, pp. 3521–3530, PMLR, 2018.
[20] C. Fung, C. J. Yoon, and I. Beschastnikh, "Mitigating sybils in federated
learning poisoning," arXiv preprint arXiv:1808.04866, 2018.
[21] D. Yin, Y. Chen, R. Kannan, and P. Bartlett, "Byzantine-robust dis-
tributed learning: Towards optimal statistical rates," in International
Conference on Machine Learning, pp. 5650–5659, PMLR, 2018.
[22] C. Xie, S. Koyejo, and I. Gupta, "Zeno: Distributed stochastic gradient
descent with suspicion-based fault-tolerance," in International Confer-
ence on Machine Learning, pp. 6893–6901, PMLR, 2019.
[23] C. Xie, S. Koyejo, and I. Gupta, "Zeno++: Robust fully asynchronous
sgd," in International Conference on Machine Learning, pp. 10495–
10503, PMLR, 2020.
[24] J. So, B. Güler, and A. S. Avestimehr, "Byzantine-resilient secure
federated learning," IEEE Journal on Selected Areas in Communications,
vol. 39, no. 7, pp. 2168–2181, 2020.
[25] Z. Zhang, J. Li, S. Yu, and C. Makaya, "Safelearning: Enable back-
door detectability in federated learning with secure aggregation," arXiv
preprint arXiv:2102.02402, 2021.
[26] R. K. Velicheti, D. Xia, and O. Koyejo, "Secure byzantine-robust
distributed learning via clustering," arXiv preprint arXiv:2110.02940,
2021.
[27] M. Rathee, C. Shen, S. Wagh, and R. A. Popa, "Elsa: Secure aggregation
for federated learning with malicious actors," Cryptology ePrint Archive,
2022.
[28] J. Katz and Y. Lindell, Introduction to Modern Cryptography. Chapman
and Hall/CRC, 2008.
|
|
http://arxiv.org/abs/2302.09908v2 | 2023-03-05T23:10:24 | 2023-02-20T11:09:37 | A Sidecar Separator Can Convert a Single-Talker Speech Recognition
System to a Multi-Talker One | Although automatic speech recognition (ASR) can perform well in common
non-overlapping environments, sustaining performance in multi-talker
overlapping speech recognition remains challenging. Recent research revealed
that ASR model's encoder captures different levels of information with
different layers -- the lower layers tend to have more acoustic information,
and the upper layers more linguistic. This inspires us to develop a Sidecar
separator to empower a well-trained ASR model for multi-talker scenarios by
separating the mixed speech embedding between two suitable layers. We
experimented with a wav2vec 2.0-based ASR model with a Sidecar mounted. By
freezing the parameters of the original model and training only the Sidecar
(8.7 M, 8.4% of all parameters), the proposed approach outperforms the previous
state-of-the-art by a large margin for the 2-speaker mixed LibriMix dataset,
reaching a word error rate (WER) of 10.36%; and obtains comparable results
(7.56%) for LibriSpeechMix dataset when limited training. | [
"Lingwei Meng",
"Jiawen Kang",
"Mingyu Cui",
"Yuejiao Wang",
"Xixin Wu",
"Helen Meng"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09908v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09908v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.SD",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.SD",
"cs.AI",
"cs.CL",
"cs.LG",
"eess.AS"
] | A SIDECAR SEPARATOR CAN CONVERT A SINGLE-TALKER SPEECH RECOGNITION
SYSTEM TO A MULTI-TALKER ONE
Lingwei Meng, Jiawen Kang, Mingyu Cui, Yuejiao Wang, Xixin Wu, Helen Meng
The Chinese University of Hong Kong, Hong Kong SAR, China
{lmeng, jwkang, mycui, wangy, wuxx, hmmeng}@se.cuhk.edu.hk
3
2
0
2
r
a
M
5
]
D
S
.
s
c
[
2
v
8
0
9
9
0
.
2
0
3
2
:
v
i
X
r
a
ABSTRACT
Although automatic speech recognition (ASR) can perform well
in common non-overlapping environments, sustaining performance
in multi-talker overlapping speech recognition remains challenging.
Recent research revealed that ASR model's encoder captures differ-
ent levels of information with different layers – the lower layers tend
to have more acoustic information, and the upper layers more lin-
guistic. This inspires us to develop a Sidecar separator to empower
a well-trained ASR model for multi-talker scenarios by separating
the mixed speech embedding between two suitable layers. We ex-
perimented with a wav2vec 2.0-based ASR model with a Sidecar
mounted. By freezing the parameters of the original model and train-
ing only the Sidecar (8.7 M, 8.4% of all parameters), the proposed
approach outperforms the previous state-of-the-art by a large mar-
gin for the 2-speaker mixed LibriMix dataset, reaching a word error
rate (WER) of 10.36%; and obtains comparable results (7.56%) for
LibriSpeechMix dataset when limited training.
Index Terms- multi-talker speech recognition, speech separa-
tion, end-to-end speech recognition, domain adaptation
1. INTRODUCTION
End-to-end automatic speech recognition (ASR) for common non-
overlapping environments has made significant progress recently
[1, 2]. However, multi-talker (also known as multi-speaker) speech
recognition, where overlapping may exist, still remains a challenge
[3]. There are two mainstream end-to-end paradigms that aim to
tackle the challenge: (i) cascade architectures that jointly fine-tune
speech separation and speech recognition modules [4, 5]; and (ii)
complete end-to-end models customized deliberately for multi-
talker overlapping speech scenarios [6, 7, 8, 9, 10, 11, 12]. However,
the former approach may see performance degradation in modules'
original domains, and the latter does not take full advantage of the
readily available advancements made for single-talker ASR. This
motivates us to find a low-cost and loose-coupling approach to
adapt well-trained single-talker ASR models for multi-talker scenes
without distorting the original model's parameters.
Recent research investigated the information captured in the lay-
ers within the encoders of ASR models. Shim et al. [13] found that
the transformer-based encoder extracts acoustic representations in
its lower layers, and linguistic representations in the upper layers.
Layer-wise analyses of self-supervised speech representation mod-
els, such as wav2vec 2.0 [14], proved that they encode representa-
tions following an acoustic-linguistic hierarchy from lower to upper
layers as well [15, 16], which was further discussed in the context of
neuroscience [17, 18]. Similar findings have also been reported for
CNN- / RNN-based models [19, 20].
Enlightened by the above findings, we assume that there exists a
lower suitable location between the encoder's two layers where the
Fig. 1. (a) a well-trained single-talker ASR system; (b) the proposed
strategy with a Sidecar separator mounted, taking 2 talkers as an
example. On both sides of Sidecar, we add a convolutional layer to
coordinate its input-overlapped and output-separated embeddings.
multi-speaker overlapped acoustic embedding can be well-separated
by drawing on speech separation techniques. In speech separation,
research demonstrated that predicting masks for separation is usually
superior to directly predicting separated embeddings [21, 22]. As
a representative, the TasNet architecture [23] predicts masks in the
time domain for mixed speech embeddings and achieves impressive
results. Subsequently, Luo et al. [24] proposed the well-recognized
Conv-TasNet, which predicts masks using a convolutional neural
network, which made a further leap in performance.
Inspired by the recent analyses of ASR models and methodolo-
gies in speech separation, we introduce a promising strategy to adapt
off-the-shelf well-trained ASR models to multi-talker scenarios. As
shown in Fig. 1, we mount a Sidecar separator between two suitable
layers of a well-trained ASR model. On both sides of the Sidecar,
there is a simple convolutional layer helping to coordinate the input-
overlapping and output-separated embeddings of the Sidecar. The
proposed approach has three key advantages:
• The approach is low-cost and loose-coupling for converting
a well-trained single-talker ASR model to a multi-talker one,
without complicated customization on the model structure or
on the training scheme.
• The original ASR model is well-trained and fixed, and only
Sidecar (8.7 M, 8.4% of all parameters) needs tuning, making
the training feasible within limited time and GPU resources.
LinguisticLayersSidecarSeparatorDecodertext.1text.2DecoderASREncodertextfrozentuned⊙element-wise multiplication⊙overlappedspeechAcousticLayersLinguisticLayersConvAcousticLayersConv(a)(b)maskscleanspeech
• Experiments leveraging a wav2vec 2.0-based ASR model
mounted with a Sidecar are conducted, achieving a WER
of 10.36% on 2-speaker LibriMix dataset and 7.56% on
LibriSpeechMix dataset with limited training.
Moreover, by visualizing Sidecar-predicted masks (Fig. 3), we
find that among channel dimensions different features encode differ-
ent speakers' information. And in the time domain, there exist clear
distinctions between the periods of speech for different speakers, and
the periods of overlapping speech.
2. MULTI-TALKER ASR SYSTEM WITH SIDECAR
The proposed methodology consists of three main components -
a well-trained single-talker ASR model with parameters frozen, a
Sidecar separator, and the training objective. As shown in Fig. 1,
with the cooperation of two convolutional layers, Sidecar is plugged
between two layers of ASR encoder and forms a multi-talker ASR
system. No language models or lexicons are used in this work.
With permutation invariant training (PIT) [25], the model is op-
timized using connectionist temporal classification (CTC) loss [26].
2.1. Well-trained single-talker ASR model
A typical end-to-end ASR model contains an encoder to synthesize
waveform or acoustic features into high-level representations, and a
decoder to model the representations into language tokens. It often
takes much time and effort to train an ASR model from scratch, let
alone in multi-talker environments. With many off-the-shelf single-
talker models already available, we try to reuse the single-talker
model on multi-talker overlapping speech recognition.
Wav2vec 2.0 [14] is a well-recognized pre-trained speech repre-
sentation model based on self-supervised learning (SSL), attracting
interest in the field. Many ASR models taking wav2vec 2.0 as the
encoder reported state-of-the-art performance [27].
In our experiments, we use a well-trained wav2vec 2.0 base-
based ASR model, the same as used in [14], which contains a CNN
feature extractor, a Transformer encoder, and a fully-connected layer
as the decoder. Specifically, the model takes a waveform as input and
extracts acoustic features with a 7-layer CNN feature extractor. After
a linear projection, the features are fed into the encoder consisting of
12 layers of Transformer blocks for generating high-level represen-
tations. We obey the paradigm in [14] and only use a fully-connected
layer as the decoder for letter-level prediction.
We directly use the model parameters released by fairseq [28],
denoted as W2V-CTC in the following parts.
2.2. Sidecar separator
Inspired by the findings that the ASR encoder captures more acoustic
information in its lower layers and more linguistic information in the
upper layers [13, 15, 20], we propose using a Sidecar separator to
address multi-talker speech recognition, drawing on methodologies
in speech separation.
As shown in Fig. 2, similar to Conv-TasNet [24], the Sidecar is
a temporal convolutional network consisting of stacked 1-D dilated
convolutional blocks, which allows the Sidecar to model the long-
term dependencies of the acoustic embeddings while maintaining a
small size. By ablation study, we plug the Sidecar into the most
suitable position between two "acoustic" layers of the ASR encoder.
Since the original ASR model is frozen, to alleviate the "transplant
rejection", we use a 3-kernel-size convolutional layer to filter Side-
car's input-mixed and output-separated embeddings, respectively.
Fig. 2. (a) Sidecar structure; (b) Details in ConvBlock. Referring to
Conv-TasNet [24], the Sidecar consists of stacked 1-D dilated con-
volutional blocks. d represents the dilation rate.
In the forward process, the preceding-layer-generated mixed
speech embedding is filtered by a convolutional layer, and fed into
the Sidecar to generate the speaker-dependent masks. Then, the
filtered mixed speech embedding will be element-wise multiplied
by the masks, and further adjusted by another convolutional layer
to obtain the separated embeddings. The separated embeddings of
different speakers will go in parallel through the rest of the model
and be transcribed into text. This is technically implemented by
concatenating the separated embeddings onto the batch dimension.
2.3. Training objective
We favor the use of permutation invariant training (PIT) with only
ASR loss, which is CTC loss in this work. This can already achieve
satisfactory performance.
In addition to PIT-CTC loss, we also tried two reconstruction ob-
jectives: maximize scale-invariant signal-to-noise ratio (SI-SNR) or
minimize mean squared error (MSE). Since the multi-talker dataset
is simulated from single-speaker speeches, reconstruction loss aims
to drive the predicted separated embeddings as close as possible to
corresponding clean single-speaker embeddings. The clean single-
speaker embeddings are generated by the transformer layer before
where the Sidecar is plugged in, and the permutation of speakers is
determined by PIT-CTC loss.
Although introducing a reconstruction loss can provide a minor
performance gain (Table 4), we do not recommend this. Because it
requires input not only mixed speech but also clean single-speaker
speeches, which significantly increases the computational burden.
3. A BASELINE SYSTEM FOR CONTROL
We attribute the effectiveness of this work to two aspects: the knowl-
edge of the well-trained single-talker ASR model, and the Sidecar
which can efficiently adapt the former to multi-talker scenarios by
predicting speaker-dependent masks rather than their embeddings.
The contribution of a well-trained model is intuitive, while the boost
in performance provided by Sidecar can be indistinct.
Considering this, we designed a baseline system, which also
leverages the same ASR model as our proposed approach, but
directly predicts speaker-dependent speech embeddings like [8].
Specifically, in the same position as Sidecar is in our proposed ap-
proach, the baseline model duplicates the preceding encoder layer
to predict speaker-dependent embeddings. Except for the two dupli-
cated layers, other parameters are frozen.
d=2K-1Point-ConvLayerNormConvBlockConvBlockConvBlockConvBlockConvBlockConvBlock......ConvBlockConvBlockConvBlock...d=1d=2Point-ConvReLUPoint-ConvPReLULayerNormDepth-ConvPReLULayerNormPoint-Convmasks(a)(b)...Note that, unlike our proposed approach, this Baseline does not
maintain the property of keeping the original model parameters un-
changed, because it fine-tunes the layers of the original model.
Table 1. Comparison of different systems on LibriMix. Evaluated
by WER (%). "Transf." refers to "Transformer" and "ft." refers to
"fine-tune the whole model".
4. EXPERIMENTAL SETUP
4.1. Datasets
The experiments are performed on two benchmark datasets: Lib-
riMix [29] and LibriSpeechMix [10]. Both of them are simulated
from LibriSpeech dataset but with different protocols.
LibriMix. It is simulated with the mixtures of two or three speak-
ers, in a clean or noisy environment. We focus on its 2-speaker-
clean subset Libri2Mix-clean. Libri2Mix-clean's training, develop-
ment, and test set contain 270 hours, 11 hours, and 11 hours of 2-
speaker's mixed speeches, respectively. The mixtures are made in a
left-aligned style. Therefore, the shorter source speech will be fully
overlapped by the longer one from the beginning.
LibriSpeechMix. It only has standard dev and test sets. We focus on
the 2-speaker "dev-clean-2mix" and "test-clean-2mix" for validation
and test. The 2-speaker training set is homemade from the 960-hour
LibriSpeech training dataset (LS-960) using the same protocol as
[10]. LibriSpeechMix randomly samples a delay time for a second
utterance so the mixture is partially overlapping.
Compared with LibriSpeechMix, LibriMix has larger overlap ra-
tios, which greatly challenges the model in separating overlaps.
4.2. Model settings
Well-trained single-talker ASR model.
In accordance with the
paradigm in [14], the used W2V-CTC model contains a CNN feature
extractor, a Transformer encoder, and a fully-connected layer as the
decoder. We directly reuse the parameters released by Fairseq1 [28],
which was first pre-trained on unlabeled LS-960 with contrastive
loss and diversity loss, then fine-tuned on labeled LS-960 with CTC
loss. It reached a WER of 3.4% on LibriSpeech test-clean dataset,
and 8.9% on test-other dataset.
Sidecar separator. Referring to [24], in our Sidecar separator, K
convolutional blocks with dilation rates 1, 2, 4, ..., 2K−1 are repeated
R times. We take K = 8, R = 3, which performs better. We discard
skip-connection paths of convolutional blocks, and change the final
sigmoid activation to ReLU to fit our task. The Sidecar uses 128
bottleneck-channels, and 768 input- / output- channels. Ablation
experiments (Section 5.4) have been conducted to explore the most
suitable Sidecar location. As a result, we plug the Sidecar right after
the second transformer layer and before the third, which gave the
best performance. With W2V-CTC frozen, it only has 8.7 M (8.4%
of all parameters, about half of the Baseline) for tuning.
Training settings. We optimize the proposed model and Baseline
using a 2e-4 learning rate with a three-stage schedule and Adam op-
timizer, for at most 100 k updates. It takes about 7 hours for models'
convergence with 8 NVIDIA V100 GPUs, thanks to Sidecar's small
size and the ejection start provided by the well-trained model.
In the following, we denote the proposed model as W2V-Sidecar.
5. RESULTS AND DISCUSSION
5.1. Results On LibriMix dataset
We compared different systems on the two benchmark datasets. The
corresponding results are shown in Table 1 and Table 2.
1https://github.com/facebookresearch/fairseq/tree/main/examples/wav2vec
System
(a) PIT-Transf. [5]
(b) Conditional Conformer [30]
(c) Conv-TasNet + Transf. [5]
(d) DPRNN-TasNet + Transf. [5]
(e) Baseline (proposed)
(f) W2V-Sidecar (proposed)
(g) W2V-Sidecar-ft. (proposed)
Dev
26.58
24.50
21.00
15.30
11.60
9.76
7.68
Test
26.55
24.90
21.90
14.50
12.27
10.36
8.12
Table 2. Comparisons of different systems on LibriSpeechMix.
Evaluated by WER (%). "-" refers to "not reported" and "ft." refers
to "fine-tune the whole model".
System
(a) PIT-BiLSTM [10]
(b) SOT-BiLSTM [10]
(c) SURT-non-streaming [11]
(d) SOT-transf. [31]
(e) Baseline (proposed)
(f) W2V-Sidecar (proposed)
(g) W2V-Sidecar-ft. (proposed)
†With heavier training data.
Dev
-
-
-
-
9.50
7.76
6.01
Test
11.10
11.20
7.20†
5.30†
9.41
7.56
5.69
For 2-speaker LibriMix (Table 1), the designed Baseline (e) for
control already outperforms previous methods by a large margin.
We attribute this improvement to the knowledge of the well-trained
model. Then, by comparing the proposed W2V-Sidecar (f) with
Baseline (e), we find the introduction of Sidecar further boosts the
WER with even less trainable parameters (8.7 M, 8.4% of all param-
eters, about half of Baseline). This confirms that predicting masks
is more effective than directly separating embeddings as discussed
in [22]. Besides, the Sidecar serves in a plug-and-play style with-
out distorting the original parameters. This low-coupling property
allows the model to be more flexible for multiple scenarios.
Moreover, as an option, we also train a W2V-Sidecar-ft (g),
which fine-tunes all model parameters. The training settings are the
same as (e). Since the model is initialized with well-trained parame-
ters, the W2V-Sidecar-ft's convergence is also fast. Not surprisingly,
the model achieves even more impressive results.
5.2. Results On LibriSpeechMix dataset
For the comparison on the LibriSpeechMix dataset, we only focus
on those non-streaming models with no additional auxiliary such as
speaker labels or additional training datasets.
As shown in Table 2, our Baseline (e) achieves better perfor-
mance than (a) and (b) even with fewer training efforts. As a sim-
ilar trend, the Sidecar (f) brings a further performance boost. And
as an option, the W2V-Sidecar-ft (g) reaches a better result at the
cost of losing the loose-coupling property. We also list the results of
Systems (c) and (d), which with different setups, for a comprehen-
sive comparison. They gain further improvements from their signif-
icantly heavier training efforts.
Compared with (a)-(d), the proposed systems (e)-(f) are trained
efficiently with only 7 hours using 8 GPUs. Moreover, systems (a),
(b), and (d) have larger model sizes than the proposed W2V-Sidecar
(94.4 M frozen + 8.7 M trainable).
5.3. Visualization of Sidecar predicted masks
To better understand what Sidecar has learned, we investigate its
generated masks with visualization. For a better view, we per-
form element-wise softmax on the two masks derived from a mixed
speech embedding to highlight pairwise differences. This process
produces two essentially identical matrices, and we just take one.
Then we normalize each channel (or feature) using its mean and
standard deviation along the time steps to avoid swamping those
channels which with minor differences between the two masks. Af-
terward, we reorder the channel dimension according to hierarchical
clustering based on the pairwise distances of the channels.
We randomly take three typical cases as examples: an almost
non-overlapped case, a partially overlapped case, and a case in which
the shorter speech is fully overlapped. We find interesting clues from
their masks' visualization (Fig. 3). The masks show strong tempo-
ral correlations with the input speech, and distinctly tell the mixture
boundaries. This indicates that different feature sub-spaces (or chan-
nel groups) capture different speakers' information, so the speaker
boundaries emerge when close channels are clustered.
5.4. Ablation studies
Sidecar location. We explored the optimal location for the Side-
car. We mark the locations by the transformer blocks index. E.g.,
location 0 is right before the first block; location 1 is between the
first and second blocks, etc. The results are summarized in Table 3.
Among the locations, the result of location 2 exceeds the previous
layers, and deeper locations show a dramatic decrease in results.
This trend is mutually supportive of existing layer-wise analysis
research [13, 15], and aligns with our previous hypothesis: the sepa-
ration is better performed on acoustic-related representations, which
contain sufficient low-semantics information to catch phonetic-level
differences. We argue that location 0 is too close to the raw input,
where meaningful phonetic-level representations have yet to be well-
synthesized. Meanwhile, speaker information matters, as the discus-
sion about Fig. 3. However, if the ASR encoder goes deeper, the
speaker information will be eliminated. As a result, location 2 is a
compromised scale in semantics.
Reconstruction loss. As reconstruction loss plays a dominant role
in speech separation tasks, a natural question is whether introducing
reconstruction loss can help our task. In this part, we explore in-
troducing MSE or SI-SNR loss to the Sidecar strategy. In Table 4,
our experiments show that introducing reconstruction loss can make
slight improvements. However, the computational burden is signifi-
cantly increased because it requires not only mixed speech input but
also clean single-talker recordings. We argue that adding a constraint
on low-level embeddings for such a high-semantic task may not be
very helpful because the mapping can be an ill-posed problem.
5.5. Limitations and future work
This work has several limitations. First, although we used PIT as
our training scheme, our strategy also naturally fits serialized out-
put training (SOT), which usually needs to train from scratch. We
are interested in whether Sidecar can accelerate SOT's training with
a well-trained ASR model. Second, according to Fig. 3, Sidecar
explicitly encodes speaker information. We are excited about the
prospects of its application to speech diarization, especially com-
bined with SOT. Third, we only implement Sidecar on the ASR
task. We also expect its applicability to other downstream tasks when
overlapping exists. Finally, to adopt a generally popular speech rep-
resentation model, we only use wav2vec 2.0-based model. We will
try the Sidecar on other SSL or non-SSL models in the future.
Fig. 3. Visualization of generated masks and input waveforms. We
use different colors to distinguish speakers. Purple represents over-
lapping. The horizontal of masks is time dimension, and the vertical
is channel dimension. Sidecar encodes speaker information with dif-
ferent channels and indicates clear distinctions in time domain.
Table 3. Ablation study on Sidecar location, evaluated by WER (%).
Location
LibriMix
Dev
Test
0
1
2
3
4
6
9
12
12.18 11.22 9.76 12.06 16.14 30.03 56.38 61.78
13.01 11.87 10.36 12.65 16.88 30.32 57.11 62.72
Table 4. Ablation study on using reconstruction loss, by WER (%).
LibriMix
LibriSpeechMix
Dev
9.76
9.69
9.74
Test
10.36
10.16
10.32
Dev
7.76
7.43
7.90
Test
7.56
7.20
7.34
W2V-Sidecar
w/ SISNR
w/ MSE
6. CONCLUSION
Inspired by the findings that ASR encoder captures more acoustic
representations in its lower layers and more linguistic in the upper
layers, we propose plugging a Sidecar separator into a well-trained
single-talker ASR model and converting it to a multi-talker one. The
original ASR model is frozen, and only 8.4% of all parameters need
tuning. With efficient training, the proposed method outperforms
previous state-of-the-art by a large margin on the 2-speaker mixed
LibriMix dataset, reaching a WER of 10.36% dataset; and compara-
ble results (7.56%) on the LibriSpeechMix dataset.
Visualizations of Sidecar-predicted masks indicate that in chan-
nel dimension, different features encode different speakers' infor-
mation. And in the time domain, there exist significant distinctions
between different speaker speech periods and overlapping periods.
7. ACKNOWLEDGEMENTS
This research is partially supported by the HKSARG Research
Grants Council's Theme-based Research Grant Scheme (Project No.
T45-407/19N) and by the CUHK Stanley Ho Big Data Decision
Analytics Research Centre.
(a) Almostnon-overlapped(b)Partiallyoverlapped(c) Shorter speech is fully overlapped8. REFERENCES
[1] William Chan, Navdeep Jaitly, Quoc Le, and Oriol Vinyals,
"Listen, attend and spell: A neural network for large vocab-
ulary conversational speech recognition," in IEEE ICASSP,
2016.
[2] Anmol Gulati, James Qin, Chung-Cheng Chiu, Niki Par-
mar, Yu Zhang, Jiahui Yu, Wei Han, Shibo Wang, Zheng-
dong Zhang, Yonghui Wu, and Ruoming Pang, "Conformer:
Convolution-augmented transformer for speech recognition,"
in Interspeech, 2020.
[3] Zhongxin Bai and Xiao-Lei Zhang,
"Speaker recognition
based on deep learning: An overview," Neural Networks, 2021.
[4] Shane Settle, Jonathan Le Roux, Takaaki Hori, Shinji Watan-
abe, and John R Hershey, "End-to-end multi-speaker speech
recognition," in IEEE ICASSP, 2018.
[5] Song Li, Beibei Ouyang, Fuchuan Tong, Dexin Liao, Lin Li,
and Qingyang Hong, "Real-time end-to-end monaural multi-
speaker speech recognition," in Interspeech, 2021.
[6] Hiroshi Seki, Takaaki Hori, Shinji Watanabe,
Jonathan
Le Roux, and John R. Hershey, "A purely end-to-end system
for multi-speaker speech recognition," in ACL, 2018.
[7] Wangyou Zhang, Xuankai Chang, Yanmin Qian, and Shinji
Watanabe, "Improving end-to-end single-channel multi-talker
IEEE/ACM Transactions on Audio,
speech recognition,"
Speech, and Language Processing, 2020.
[8] Xuankai Chang, Wangyou Zhang, Yanmin Qian, Jonathan
Le Roux, and Shinji Watanabe,
"End-to-end multi-speaker
speech recognition with transformer," in IEEE ICASSP, 2020.
[9] Anshuman Tripathi, Han Lu, and Hasim Sak,
end multi-talker overlapping speech recognition,"
ICASSP, 2020.
"End-to-
in IEEE
[10] Naoyuki Kanda, Yashesh Gaur, Xiaofei Wang, Zhong Meng,
and Takuya Yoshioka, "Serialized output training for end-to-
end overlapped speech recognition," in Interspeech, 2020.
[11] Liang Lu, Naoyuki Kanda, Jinyu Li, and Yifan Gong, "Stream-
ing multi-talker speech recognition with joint speaker identifi-
cation," in Interspeech, 2021.
[12] Naoyuki Kanda, Jian Wu, Yu Wu, Xiong Xiao, Zhong Meng,
Xiaofei Wang, Yashesh Gaur, Zhuo Chen, Jinyu Li, and Takuya
Yoshioka, "Streaming multi-talker ASR with token-level seri-
alized output training," in Interspeech, 2022.
[13] Kyuhong Shim, Jungwook Choi, and Wonyong Sung, "Under-
standing the role of self attention for efficient speech recogni-
tion," in Proceedings of International Conference on Machine
learning, 2021.
[14] Alexei Baevski, Yuhao Zhou, Abdelrahman Mohamed, and
Michael Auli, "wav2vec 2.0: A framework for self-supervised
learning of speech representations," 2020.
[15] Ankita Pasad, Ju-Chieh Chou, and Karen Livescu, "Layer-wise
analysis of a self-supervised speech representation model," in
IEEE ASRU, 2021.
[16] Jui Shah, Yaman Kumar Singla, Changyou Chen, and Ra-
jiv Ratn Shah, "What all do audio transformer models hear?
probing acoustic representations for language delivery and its
structure," arXiv preprint arXiv:2101.00387, 2021.
[17] Juliette Millet, Charlotte Caucheteux, Pierre Orhan, Yves
Boubenec, Alexandre Gramfort, Ewan Dunbar, Christophe
Pallier, and Jean-Remi King,
"Toward a realistic model of
speech processing in the brain with self-supervised learning,"
2022.
[18] Aditya R. Vaidya, Shailee Jain, and Alexander G. Huth, "Self-
supervised models of audio effectively explain human cortical
responses to speech," in Proceedings of International Confer-
ence on Machine Learning, 2022.
[19] Archiki Prasad and Preethi Jyothi, "How accents confound:
Probing for accent information in end-to-end speech recogni-
tion systems," in ACL, 2020.
[20] Chung-Yi Li, Pei-Chieh Yuan, and Hung-Yi Lee, "What does
a network layer hear? analyzing hidden representations of end-
to-end ASR through speech synthesis," in IEEE ICASSP, 2020.
[21] DeLiang Wang and Jitong Chen, "Supervised speech separa-
tion based on deep learning: An overview," IEEE/ACM Trans-
actions on Audio, Speech, and Language Processing, 2018.
[22] Yuxuan Wang, Arun Narayanan, and DeLiang Wang,
"On
training targets for supervised speech separation," IEEE/ACM
transactions on audio, speech, and language processing, 2014.
[23] Yi Luo and Nima Mesgarani, "TasNet:
time-domain audio
separation network for real-time, single-channel speech sepa-
ration," in IEEE ICASSP, 2018.
[24] Yi Luo and Nima Mesgarani,
"Conv-TasNet: Surpassing
ideal time-frequency magnitude masking for speech separa-
tion," IEEE/ACM transactions on audio, speech, and language
processing, 2019.
[25] Dong Yu, Morten Kolbaek, Zheng-Hua Tan, and Jesper Jensen,
"Permutation invariant training of deep models for speaker-
independent multi-talker speech separation," in IEEE ICASSP,
2017.
[26] Alex Graves, Santiago Fern ́andez, Faustino Gomez, and J ̈urgen
Schmidhuber,
"Connectionist temporal classification: La-
belling unsegmented sequence data with recurrent neural net-
works," in Proceedings of International Conference on Ma-
chine learning, 2006.
[27] Yu-An Chung, Yu Zhang, Wei Han, Chung-Cheng Chiu, James
Qin, Ruoming Pang, and Yonghui Wu, "W2v-BERT: Com-
bining contrastive learning and masked language modeling for
self-supervised speech pre-training," in IEEE ASRU, 2021.
[28] Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam
Gross, Nathan Ng, David Grangier, and Michael Auli, "fairseq:
A fast, extensible toolkit for sequence modeling," in Proceed-
ings of NAACL-HLT 2019: Demonstrations, 2019.
[29] Joris Cosentino, Manuel Pariente, Samuele Cornell, Antoine
"LibriMix: An open-
arXiv
Deleforge, and Emmanuel Vincent,
source dataset for generalizable speech separation,"
preprint arXiv:2005.11262, 2020.
[30] Pengcheng Guo, Xuankai Chang, Shinji Watanabe, and Lei
Xie, "Multi-speaker ASR combining non-autoregressive Con-
former CTC and conditional speaker chain," in Interspeech,
2021.
[31] Naoyuki Kanda, Guoli Ye, Yashesh Gaur, Xiaofei Wang,
Zhong Meng, Zhuo Chen, and Takuya Yoshioka,
"End-to-
end speaker-attributed ASR with transformer," in Interspeech,
2021.
|
|
http://arxiv.org/abs/2302.09904v2 | 2023-05-27T07:44:21 | 2023-02-20T11:02:55 | HyFL: A Hybrid Framework For Private Federated Learning | Federated learning (FL) has emerged as an efficient approach for large-scale
distributed machine learning, ensuring data privacy by keeping training data on
client devices. However, recent research has highlighted vulnerabilities in FL,
including the potential disclosure of sensitive information through individual
model updates and even the aggregated global model. While much attention has
been given to clients' data privacy, limited research has addressed the issue
of global model privacy. Furthermore, local training at the client's side has
opened avenues for malicious clients to launch powerful model poisoning
attacks. Unfortunately, no existing work has provided a comprehensive solution
that tackles all these issues. Therefore, we introduce HyFL, a hybrid framework
that enables data and global model privacy while facilitating large-scale
deployments. The foundation of HyFL is a unique combination of secure
multi-party computation (MPC) techniques with hierarchical federated learning.
One notable feature of HyFL is its capability to prevent malicious clients from
executing model poisoning attacks, confining them to less destructive data
poisoning alone. We evaluate HyFL's effectiveness using an open-source
PyTorch-based FL implementation integrated with Meta's CrypTen PPML framework.
Our performance evaluation demonstrates that HyFL is a promising solution for
trustworthy large-scale FL deployment. | [
"Felix Marx",
"Thomas Schneider",
"Ajith Suresh",
"Tobias Wehrle",
"Christian Weinert",
"Hossein Yalame"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09904v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09904v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.CR",
"cs.DC",
"cs.IT",
"math.IT"
] | HyFL: A Hybrid Framework For Private Federated Learning
Felix Marx
Technical University of Darmstadt
Thomas Schneider
Technical University of Darmstadt
Ajith Suresh
Technology Innovation Institute (TII)
Tobias Wehrle
Technical University of Darmstadt
Christian Weinert
Royal Holloway, University of London
Hossein Yalame
Technical University of Darmstadt
3
2
0
2
y
a
M
7
2
]
G
L
.
s
c
[
2
v
4
0
9
9
0
.
2
0
3
2
:
v
i
X
r
a
ABSTRACT
Federated learning (FL) has emerged as an efficient approach for
large-scale distributed machine learning, ensuring data privacy by
keeping training data on client devices. However, recent research
has highlighted vulnerabilities in FL, including the potential dis-
closure of sensitive information through individual model updates
and even the aggregated global model. While much attention has
been given to clients' data privacy, limited research has addressed
the issue of global model privacy. Furthermore, local training at
the client's side has opened avenues for malicious clients to launch
powerful model poisoning attacks. Unfortunately, no existing work
has provided a comprehensive solution that tackles all these issues.
Therefore, we introduce HyFL, a hybrid framework that enables
data and global model privacy while facilitating large-scale deploy-
ments. The foundation of HyFL is a unique combination of secure
multi-party computation (MPC) techniques with hierarchical fed-
erated learning. One notable feature of HyFL is its capability to
prevent malicious clients from executing model poisoning attacks,
confining them to less destructive data poisoning alone. We evalu-
ate HyFL's effectiveness using an open-source PyTorch-based FL
implementation integrated with Meta's CrypTen MPC framework.
Our performance evaluation demonstrates that HyFL is a promising
solution for trustworthy large-scale FL deployment.
1 INTRODUCTION
Federated learning (FL) [58] is a revolutionary approach for large-
scale distributed machine learning that emerged in the past decade
and has had a profound impact on both academia [90] and indus-
try [41, 53, 69]. FL shares some objectives with privacy-preserving
machine learning (PPML) [15, 38, 59, 79] but differs in its approach
to training a model: In PPML, training on the entire set of avail-
able data is either outsourced to a remote party or done collabora-
tively while ensuring data privacy. In contrast, FL involves multiple
rounds of training, where each round consists of selected clients lo-
cally training a model on their private data and a central party
performing aggregation of these models to update a global model.
Initially, FL appeared to indeed offer privacy since the training
data remains on the client devices, and only model updates (so-
called gradients) are transmitted. However, subsequent research has
demonstrated that these gradients still reveal a significant amount
of information, enabling the central aggregator to infer sensitive
details about the clients' private training data [36, 94]. To address
this issue, secure aggregation (SA) schemes [3, 11] were introduced,
where only the aggregated result is revealed to the central party,
effectively concealing the individual gradients.
Recent research in the field of FL and secure aggregation has
focused on addressing various related issues, such as handling
dropouts [3, 11], enhancing communication- and computation effi-
ciency for both clients and servers [4, 58], and improving resilience
against stronger corruptions [61, 68]. Additionally, to improve scal-
ability in large-scale deployments involving hundreds or even
tens of thousands of clients, hierarchical FL (HFL) has been intro-
duced [12, 83, 87], which implements multiple levels of aggregators.
However, FL furthermore poses three new challenges that re-
quire careful attention. The first pertains to the orchestration of the
entire training process by a single aggregator, which necessitates
placing complete trust in that entity. This may not be acceptable,
especially in scenarios involving multiple organizations forming a
consortium, and increases the risks of data breaches or unexpected
disruptions. Moreover, serious privacy vulnerabilities have been
identified when using secure aggregation with a single aggrega-
tor [8, 9, 33, 77, 84]: Recent studies like Mandrake [92] have demon-
strated the effectiveness of privacy attacks even when utilizing se-
cure aggregation techniques across a large number of clients, cast-
ing doubts on the credibility of such schemes [10, 64]. While some
approaches employ differential privacy (DP) [62] or costly proofs
to ensure computational correctness by the aggregator [14, 68],
these methods are impractical for large-scale deployments. Recent
works therefore suggest a distributed aggregator setup based on
secure multi-party computation (MPC) techniques to distribute ag-
gregation tasks among multiple servers, ensuring privacy despite
potential collusion among a subset of them [4, 32, 35, 68].
The second concern arises when corrupt clients intentionally
manipulate the locally trained model to reduce the system's ac-
curacy or to introduce backdoors to extract sensitive information
in future rounds [82, 86]. This method of model poisoning is more
potent than data poisoning [76], which involves manipulating the
underlying dataset (and is the only way to cause harm in PPML
schemes). Although numerous defenses have been proposed against
model poisoning attacks [16, 75], the most effective ones remain
impractical for large-scale deployment due to the significant com-
putation and communication costs they entail [61]. Additionally,
recent research has introduced even more potent model poisoning
strategies that can circumvent state-of-the-art defenses [75].
The third concern is the current lack of global model privacy.
Initially, FL focused on enhancing user participation and improving
model accuracy rather than safeguarding the model itself. However,
with the widespread adoption of FL in various industries, the need
for privacy protection becomes apparent. For example, consider a
consortium of five hospital groups aiming to collaboratively train
a model using data provided by their affiliated hospitals to find a
cure for a specific illness [69]. While the consortium may be willing
to pay the affiliated hospitals for acquiring the training data, they
would prioritize keeping the trained model confidential due to task
sensitivity, financial investments, and potential legal implications.
Furthermore, failing to maintain the privacy of the global model
could enable a corrupt participant to exploit it for their own use
or sell it to interested third parties, thereby undermining the con-
sortium's joint efforts. Although there have been a few successful
attempts in collaborative learning [34, 91, 93], only a limited num-
ber of studies have focused on preserving the privacy of the global
model in FL [54, 73]. Most of these studies have relied on homo-
morphic encryption (HE) schemes [1] or variations thereof, which
primarily address semi-honest corruptions. Moreover, several of
these works do not consider the collusion of a subset of clients with
the aggregator and thereby provide a weaker notion of security.
To summarize, we identify three pressing issues in FL when
considering a large-scale deployment:
P1: Recently, there have been significant concerns raised about
the privacy vulnerabilities associated with using secure aggregation
with only a single aggregator [8, 9, 33, 77, 84, 92].
P2: Malicious participants can perform attacks (e.g., model poi-
soning [31, 82], data poisoning [6, 81], or backdoor attacks [2, 86])
to manipulate the aggregated model.
P3: Unrestricted access to the aggregated model allows extrac-
tion of traces of original training data, necessitating global model
privacy [10, 64, 92].
Besides the aforementioned issues, a large-scale FL deployment
needs to account for participant heterogeneity in terms of band-
width, jurisdiction, trust assumptions, and computational power.
Although various works have addressed these issues individually or
in combination, a comprehensive solution remains elusive, which
is the goal of this work.
Our Contributions. In this paper, we address all of the issues
outlined above in a unified framework called HyFL that enables
private and robust distributed machine learning at scale. Our frame-
work is based on a novel abstraction that also captures existing
regular and hierarchical FL architectures in a hybrid manner.
Briefly, in our framework, FL participants use secret-sharing
techniques to securely outsource training data to distributed train-
ing clusters that are based on MPC. The participants then might
leave and only sporadically return to provide more training data
– this makes our framework robust against real-world issues such
as drop-outs, requires no interaction between clients, and relieves
resource-constraint (mobile or edge) devices from significant work-
load. The models, which are trained by the clusters with MPC-
based PPML techniques, are then aggregated across all training
clusters using one or multiple levels of distributed aggregators. For
secure distributed aggregation, we again utilize MPC. Note that after
aggregation, models are not publicly released but in secret-shared
form handed back to training clusters for the next training itera-
tion. After training is completed, known secure inference protocols
can be used to allow private queries [55] in a controlled (poten-
tially rate-limited) way. This architecture design addresses issues P1
and P3 by relying on a distributed instead of single aggregator and
notably achieves global model privacy due to a novel combination
of FL with PPML techniques.
We observe that a neat property of our framework is the strictly
limited attack surface: similar to PPML, malicious participants are
2
restricted to weaker data-poisoning attacks as there is no possi-
bility to access and manipulate the model itself. However, while
defending against data poisoning in PPML is highly non-trivial,
we show experimentally that state-of-the-art data-poisoning at-
tacks in the suggested hierarchical configuration are less effective
than in plain FL. Furthermore, we implement and evaluate different
robust aggregation schemes to further mitigate the effect of such
attacks; for this, we additionally propose new heuristics that im-
prove the efficiency for the corresponding MPC implementation.
Specifically, we propose a lightweight variant of the "Trimmed
Mean" [89] defense, for our setting with only data-poisoning at-
tacks. This addresses issue P2.
Finally, we implement all HyFL components in an open-source
PyTorch-based FL framework that utilizes Meta's CrypTen frame-
work [44] for instantiating MPC, which we also extend for our use
case with several general-purpose functionalities like optimized
oblivious sorting algorithms. We then evaluate the performance
when training neural networks for standard image classification
tasks in realistic network settings and using GPU-accelerated AWS
EC2 instances. This way, we show that the computation and com-
munication overhead induced by incorporating secure computation
techniques is feasible even for large-scale deployments. For ex-
ample, one round of training LeNet on the MNIST dataset for 5
epochs with batch size 80 takes less than 5 minutes for a cluster
with 10 participants, and global aggregation among 10 clusters
happens in less than 1 second. Moreover, we find that the impact
of MPC-induced inaccuracies is less than 0.1%, and models trained
with HyFL converge significantly faster than in plain FL.
In summary, we provide the following contributions:
C1: New scalable (hierarchical) FL framework called HyFL that
achieves complete model privacy, supports resource-limited mo-
bile or edge devices, and significantly limits the attack surface for
malicious participants to data poisoning attacks.
C2: Analysis of data-poisoning attacks in hierarchical setting
with new efficiency improvements for secure robust aggregation.
C3: Open-source implementation and evaluation of HyFL on
standard image classification tasks.
In Tab. 1, we furthermore clarify how HyFL distinguishes itself
from related works.
2 PRELIMINARIES
2.1 Privacy Enhancing Technologies (PETs)
Privacy enhancing technologies (PETs) are techniques that allow
for computations on data while maintaining the privacy of that
data. In the literature, three PETs are prominently discussed: secure
multi-party computation (MPC), homomorphic encryption (HE),
and differential privacy (DP).
Secure Multi-Party Computation (MPC). MPC [39, 88] enables a set
of mutually distrusting parties to evaluate a public function f ()
on their private data while preserving input data privacy. The cor-
ruption among the parties is often modelled via an adversary that
may try to take control of the corrupted parties and coordinate
their actions. There exists various orthogonal traits of adversar-
ial corruption like honest vs dishonest majority, semi-honest vs
Table 1: Comparison of HyFL and previous works. Notations: S – Aggregation Server(s), C – Client, GM – Global Model, LM –
Local Model, MPC – Secure Multi-party Computation, HE – Homomorphic Encryption, AHE – Additively HE, MHE-Multi-party
HE, DP – Differential Privacy. Since the body of literature is vast, comparison is made against a subset representing each
category (cf. §3 for details).
Categories
Aggregation (Plain)
Aggregation (Robust)
Secure Aggregation
(Single S)
Secure Aggregation
(Multi S)
Hierarchical FL
(HFL)
Representative
Work(s)
Method
Privacy (S)
Privacy (C)
GM LM
GM
Defense
Cross
Device
No Client
Interaction
Dropout
Handling
[58]
[7]
[89]
[16]
[11]
[67]
[54]
[32]
∗
[34]
∗
[73]
[61]
[12]
[83]
[87]
–
–
–
–
Masking
AHE
AHE
MPC
MHE
MHE
MPC
Masking
–
DP
✗
✗
✗
✗
✗
✓
✗
✓
✓
✓
✓
✗
✗
✗
✓
✗
✗
✗
✗
✓
✓
✓
✓
✓
✓
✓
✓
✗
✓
✓
✗
✗
✗
✗
✗
✗
✓
✗
✓
✓
✗
✗
✗
✗
✓
✗
✓
✓
✓
✗
✗
✗
✗
✗
✗
✓
✗
✗
✗
✓
✓
✗
✓
✓
✗
✗
✗
✓
✗
✗
✗
✓
✓
✓
✓
✓
✓
✓
✓
✗
✗
✓
✓
✗
✗
✓
✗
✓
✓
✓
✓
✓
✓
✓
✓
✗
✓
✓
✗
✗
✓
✓
✓
✓
✓
Hybrid FL (HyFL)
This work
MPC
∗ Represents collaborative learning in the N -party setting, rather than the Federated Learning (FL) setting.
malicious corruption, etc. [30, 46, 52]. When the numbers of com-
puting parties is small, MPC is practically efficient [18, 20, 47, 66]. In
our prototype implementation of HyFL, we utilize Meta's CrypTen
framework [44], which for efficiency reasons operates in a semi-
honest two-party setting while involving a trusted third "helper"
party that generates correlated randomness [23, 24, 44, 65].
Homomorphic Encryption (HE). HE schemes [37, 70] enable compu-
tation on encrypted data without the need for decryption. Additive
homomorphic encryption (AHE) is a widely used method that al-
lows for the generation of a new ciphertext representing the sum
of multiple plaintexts through operations on their corresponding
original ciphertexts [63]. In scenarios involving multiple parties,
recent multi-party homomorphic encryption (MHE) schemes have
been shown to reduce the communication complexity of their MPC
counterpart, but incur a significant computation overhead [60]. Fur-
thermore, they are only secure against semi-honest corruptions,
with the exception of [17]'s recent work. [1] presents a comprehen-
sive survey of various HE schemes.
Differential Privacy (DP). The concept of DP [29] is based on the
idea of adding noise to data in order to reduce information leakage
when sharing it, while still allowing for meaningful computations
to be carried out on the data. Though DP techniques offer some
protection against attacks in federated learning, they also reduce
the utility of the data and the resulting ML model. Additionally,
achieving robust and accurate models necessitates significant pri-
vacy budgets, leaving the actual level of privacy achieved in practice
uncertain [62]. We refer to [27] for more details.
2.2 Federated Learning (FL)
Unlike conventional PPML techniques, FL [45, 58] enables training
of a machine learning model over distributed data by allowing the
model to be trained locally on each device using its own data. The
locally trained models are then transferred to a central server and
combined to form a global model. At a high level, an FL scheme
iterates through the following steps:
(1) The global server S sends the current global model Wt to a
selected subset of n out of N clients.
(2) Each selected client Ci , i ∈ [n] utilizes its own local training
data Di for E epochs to fine-tune the global model and obtains an
updated local model wi
t +1:
wi
t +1 ← Wt − ηCi
∂L(Wt , Bi,e )
∂Wt
,
where L is a loss function, ηCi is the clients' learning rate, and Bi,e ⊆
Di is a batch drawn from Di in epoch e, where e ∈ [E]. The local
model updates wi
t +1 are then transmitted back to S.
(3) S employs an aggregation rule fagg to combine the received
t +1, resulting in a global model Wt +1, which
local model updates wi
will serve as the starting point for next iteration:
, . . . , wn
Wt +1 ← Wt − ηS * fagg (wi
where ηS is the server's learning rate.
t +1
t +1),
The above procedure is repeated until a predefined stopping
criterion is satisfied, e.g., a specified number of training iterations
or a specific level of accuracy.
Aggregation. While there exist a number of different aggregation
functions, Google suggested FedAvg [58], which aggregates the
models efficiently using a simple weighted average, given by
FedAvg(w 1
t +1
, . . . , wn
t +1) =
n
∑︁
i=1
|Di |
|D |
wi
t +1
,
where wi
notes the total number of training data samples.
t +1 is the model trained on |Di | data samples and |D | de-
3
3 RELATED WORK
This section provides a succinct overview of related work.
Secure Aggregation. Previous research had assumed that the use of
standard FL with plain aggregation would protect the privacy of
client data. However, later works have shown that it is possible to
extract private information from individual model updates [36, 94].
To address this concern, secure aggregation (SA) schemes have been
proposed [11, 56]. These schemes ensure that the aggregator S only
receives the final aggregated model, rather than individual models,
thus preserving the privacy of client data.
Single-Server SA (Single S). When utilizing a single aggrega-
tor S, several works used masking techniques [71] to hide individ-
ual updates from the aggregator [3, 11]. However, more recent stud-
ies, such as [67], have shifted their focus towards using HE-based
techniques, specifically AHE [1], to completely hide the aggregated
model from the server and make it available to the users. Similarly,
PrivFL [54] proposed a HE-based pairwise training between clients
and the aggregator, followed by an aggregation step like FL [54].
This approach protects the global model from the clients and reveals
it only to the aggregator, while preserving privacy of individual
updates. Nevertheless, these approaches do not offer complete pri-
vacy for the global model, as it is disclosed either to the aggregator
or to the client. Consequently, if the aggregator and the client col-
lude, the privacy of the underlying scheme can be compromised.
Moreover, recent research has shown that a single malicious server
can reconstruct individual training data points from users' local
models even when using secure aggregation protocols [10, 64, 92].
Multi-Server SA (Multi S). In this case, the aggregation will
be carried out by a group of servers in a private and distributed
fashion [32]. One major advantage of these schemes is that, unlike a
single aggregator case, users do not need to communicate with each
other or perform any key setup. In an orthogonal direction, works
such as Spindle [34] and Poseidon [73] adopt MHE techniques to
perform collaborative learning, but in a federated fashion. How-
ever, these works do not scale well with the number of parties and
are thus limited for a cross-device setting. Recent works like [28]
and [61] propose private and robust FL by combining techniques
from HE and MPC, but will incur significant overhead in both com-
putation and communication for a cross-device setting. In HyFL,
we employ a multi-server aggregation scheme with two servers and
a helper, and mitigate scalability issues of existing works, especially
for a heterogeneous cross-device setting.
Hierarchical Federated Learning (HFL). A modified approach to stan-
dard FL, called hierarchical FL (HFL), was introduced to address scal-
ability and heterogeneity issues in real-world systems [12, 26, 83].
In HFL, aggregation occurs at multiple levels, forming a hierar-
chical structure in which the aggregated values from one level
serve as inputs for the next higher level. This procedure eventually
leads to the top level, where the final model is aggregated [26, 83].
Previous works in the HFL setting have primarily focused on im-
proving scalability and communication. However, the recent work
of [87] introduced methods for ensuring the privacy of individual
client updates in HFL, allowing for secure aggregation. Despite
this advancement, [87] did not address global model privacy or
4
robustness against malicious users, which are crucial goals for our
proposed HyFL framework.
Poisoning & Robust Aggregation. One potential drawback of FL
over PPML techniques is that FL increases the attack surface for
malicious actors: in FL, each user trains their own model locally,
allowing them to potentially manipulate their model [2, 5, 6, 31,
81]. To counter these kind of poisoning attacks, various robust
aggregation methods have been proposed, in which local models
are analyzed and appropriate measures such as outlier removal,
norm scaling, and so on are applied [7, 16, 50, 74, 89]. See [76] for
a comprehensive overview of different robust aggregations.
4 HYFL FRAMEWORK
We now present the details of our HyFL framework, which aims to
address multiple key requirements: global model privacy, scalability,
support for resource-constraint (mobile/edge) devices, reduction of
attack surface, ability to defend against multiple remaining threats,
and high levels of user engagement. Additionally, our framework
seeks to capture various proposed architectures for FL in a single
abstraction. We illustrate our framework in Fig. 1 and detail the
underlying algorithm in Alg. 1.
4.1 HyFL Architecture
Our HyFL framework is based on a three-layer1 architecture and
extends the established hierarchical FL (HFL) paradigm [12, 83, 87].
In HFL, clients are initially organized into clusters, and their local
models are aggregated at cluster level; these cluster-level models
are then further aggregated globally, resulting in an additional layer
of aggregation. We adopt the hierarchical approach in HyFL for two
main reasons: firstly, to efficiently realize our distinct model train-
ing approach for global model privacy, and secondly, to facilitate
large-scale deployments across heterogeneous clients. However,
there is one key difference: at the cluster level, HyFL does not
perform aggregation of models but private training on collective
client data. This differs from both traditional and hierarchical FL
since the data is not kept solely on the client devices. Nevertheless,
HyFL ensures that the data remains within the trusted domain of
the client, allowing for accurate modeling of trust relationships
between clients in real-world situations, such as trust among mem-
bers of the same region or country [57]. Furthermore, this type of
hierarchy is ubiquitous in real-world scenarios such as P2P gaming,
organizations, and network infrastructures [42, 51, 78].
We provide details for each layer in HyFL next. We focus on the
sequence of operations performed by the entities in our architec-
ture (cf. Fig. 1) for a training over T iterations while considering
necessary MPC protocols and setup requirements. Since we have a
generic design, we design our framework in the FMPC-hybrid model
with the MPC protocols abstracted, and their specifics are given
in Tab. 3 in §4.1.5. The notations used in HyFL are listed in Tab. 2.
4.1.1 Layer III: Clients. This layer is composed of NM distinct
(with i ∈ [NM ]), called clusters, which are
sets of clients CU
i
formed based on specific criteria relevant to the application (e.g.,
European Union (EU) member states for the EU smart metering
scheme [21, 22]). Similar to standard FL, only a random subset
1Additional layers can be easily incorporated depending on the scale of deployment.
Layer I: Global Servers
GSi ∈ G; i ∈ [NG ]
G
Training Data
Adversary A
MPC Server (Cluster)
Private ML Training
Layer II: MPC Clusters
CS
j
i ∈ Mi ; i ∈ [NM ], j ∈ [NMi ]
M1
MNM
Cluster Models
Layer III: Clients
j
i ∈ Ci ; i ∈ [NM ], j ∈ [NCi ]
C
MPC Server (Global)
Secure Aggregation
Aggregated ML Model
Figure 1: Three-layer architecture in HyFL for federated training of a machine learning model.
C1
CNM
j
i
of clients, denoted by Ci ⊆ CU
i
algorithm in an iteration t ∈ [1,T ].
j
i ∈ Ci (with j ∈ [NCi ]) holding
During iteration t, each client C
, will be selected by the training
data DC
t uses the Share protocol to securely distribute its data
to a set of cluster servers Mi . As detailed in §4.1.2, Mi constitute
a representative group of high-performance servers that clients
have a sufficient level of trust in. HyFL allows clients to share input
and then leave at any time. They can also rejoin the system later
and provide additional data in the next iteration they get selected.
Hence, the clusters CU
i are dynamic and change with each iteration.
Our method differs from the standard concept of "data resid-
ing at the clients" in FL, but we expect it to not negatively impact
user engagement as data remains within the users' trust zone. Ad-
ditionally, the reduced computational load allows for the use of
resource-constrained devices in training complex models and elimi-
nates the need for shared-key setup among clients, making it easier
to handle dropouts.
Table 2: Notations used in our HyFL framework.
Notation Description
G Set of Global MPC Servers.
Set of MPC Servers in the i-th cluster.
Set of Clients in the i-th cluster.
Selected Clients in the i-th cluster.
Size of the set s ∈ { G, Mi, Cj }.
Mi
CU
i
Ci
Ns
NM Total number of clusters.
Wt
GSi
j
CS
i
Global model available at round t .
Layer I MPC Global Server; GSi ∈ G.
Layer II MPC Cluster Server; CS
Here, i ∈ [NM ], j ∈ [NMi ]
Layer III Client; C
Secret sharing semantics for s ∈ { G, M j }.
j
i ∈ Mi .
j
C
i
⟨*⟩s
j
i ∈ Ci , i ∈ [NM ], j ∈ [NCi ]
4.1.2 Layer II: MPC Clusters. The second layer consists of NM
sets of distributed training servers Mi (with i ∈ NM ), called MPC
clusters, with each Mi corresponding to the cluster CU
in Layer III.
i
In iteration t, Layer I servers (denoted by G) initiate ML training
by sharing the current global model Wt −1 among servers in Mi .
As will be discussed in §4.1.3, Wt −1 is also in a secret-shared form
among G, represented by ⟨Wt −1⟩ G. To account for varying avail-
ability and trustworthiness of servers across regions, MPC clusters
in HyFL may use different MPC configurations and differ, e.g., in
their corruption threshold and security model [30]. Therefore, G
uses the Reshare protocol to convert the secret shares of ⟨Wt −1⟩ G
to those of Mi , i.e., ⟨Wt −1⟩ Mi .
Given ⟨Wt −1⟩ Mi , servers in Mi use Train to employ MPC-
based PPML techniques for private ML training [43, 44] on the cu-
mulative data from all clients in the cluster Ci , denoted by ⟨Dt ⟩ Mi .
This data may include leftover data from the same cluster in the
previous iteration. Furthermore, by utilizing a larger pool of train-
ing data, we can leverage the known benefits of batching, resulting
in faster convergence [13, 40]. After completing training, servers
in Mi utilize Reshare to secret-share the updated model with
the Layer I servers, i.e., ⟨W i
t ⟩ G.
To preserve the system's integrity, the servers for each MPC
cluster must be chosen with care to ensure that clients are willing to
share their data among the servers and that not all of the servers are
colluding. One possible option is to build non-profit partnerships,
such as in the MOC alliance [95], where organizations with mutual
distrust can securely co-locate servers in the same data center with
high-speed network connections. Alternatively, trusted entities
like government organizations with limited infrastructure can host
their servers in confidential cloud computing environments [72].
If a client lacks trust in the HyFL servers in its current cluster, the
client can propose a new cluster with a partner who the system
recognizes as an entity that can provide a non-colluding server.
5
Layer I: Global Servers. The top layer consists of a set of MPC
4.1.3
servers G, named Global Servers, that securely aggregate trained
models from all the MPC clusters in Layer II, similarly to a stan-
dard FL scheme with a distributed aggregator [4, 32, 35, 68]. Given
the locally trained models W i
t for i ∈ [NM ], servers in G execute
the secure aggregation protocol Agg [56] to compute the updated
global model in secret-shared form, i.e., ⟨Wt ⟩ G. Global servers G
use the Reshare protocol to distribute the aggregated model Wt to
each of the Layer II clusters Mi to start the next iteration (t + 1).
The distributed aggregator model, as outlined in §1, circum-
vents the possibility of several privacy attacks that were recently
presented for single-server aggregators even when relying on ma-
liciously secure aggregation protocols [8, 9, 33, 77, 84, 92]; for ex-
ample, by excluding certain inputs from the computation and thus
influencing only the correctness but not security of the protocol,
a malicious single server can mount privacy attacks that allow to
infer information about particular participants and their training
data. In contrast, in our distributed aggregator setting, even when
having only semi-honest protocol security, such attacks do not go
unnoticed as long as at least one of the servers behaves honestly.
4.1.4 HyFL - The Complete Picture. Alg. 1 (FL-Train) provides
the training algorithm in HyFL. Though HyFL has a three-layer
architecture, it can easily accommodate more levels of hierarchy
depending on the size of the deployment. For this, additional layers
of MPC clusters can be added between layers I and II, with the
clusters performing secure aggregation instead of PPML training.
# M = (cid:208)i Mi , C = (cid:208)i Ci ; i ∈ NM
# W0 – initial model, D – client C's data
# WT – global model after T iterations
# in parallel
i – total clients in i-th cluster
# in parallel
Algorithm 1 FL-Train: Training in HyFL
Actors: G, M, C
Input: W0, {DC }C ∈C
Output: ⟨WT ⟩
1: initialize: ⟨W0 ⟩G ← Share(W0, G)
2: for each training iteration t ∈ [1,T ] do
3:
4:
for all i ∈ NM do
⟨Wt −1 ⟩Mi ← G.Reshare(⟨Wt −1 ⟩G, Mi )
Ci ← Mi .Sample( CU
# CU
for all j ∈ [NCi ] do
i , t )
j
i .Share(DC
t
, Mi )
j
i
5:
6:
7:
8:
9:
10:
11:
j
i
⟨DC
t
j
i
⟩Mi
← C
← (cid:208)
⟨DC
t
end for
⟨Dt ⟩Mi
⟨W i
⟨W i
end for
⟨Wt ⟩G ← G.Agg( { ⟨W i
j ∈ [NCi ]
12:
13:
14: end for
t ⟩Mi
t ⟩G ← Mi .Reshare(⟨W i
← Mi .Train(⟨Wt −1 ⟩Mi
t ⟩Mi
, ⟨Dt ⟩Mi
, G)
)
t ⟩G }i ∈ [NM ] )
⟩Mi
(cid:208) ⟨Dt −1 ⟩Mi
# D
0 = ∅
Existing schemes for global model privacy, such as [54] and [32],
only protect the model from either clients or aggregator servers,
leaving the possibility of collusion especially in a cross-device set-
ting. HyFL addresses this issue by keeping the global model in a
secret-shared fashion, ensuring that no single entity or group of col-
luding entities (up to an allowed corruption threshold) can access
the model. This provides a stronger sense of privacy and also protec-
tion against unauthorized use or misuse, such as a client disclosing
the trained model to another organization for further training or
6
commercial use. For scenarios demanding disclosure of the global
model to authorized entities, such as consortium members, the
global servers can utilize the Reveal protocol.
4.1.5 MPC Functionalities in HyFL. The MPC functionalities uti-
lized in HyFL and called in Alg. 1 as well as Alg. 2 are listed in Tab. 3
and discussed in the following. While Share and Reshare are used
for generating the secret shares as per the underlying MPC seman-
tics, Reveal is used to reconstruct the secret towards a designated
party. The Train and Predict functionalities correspond to PPML
training and inference protocols, respectively. Similarly, Agg de-
notes the secure aggregation functionality in FL (cf. §3). In HyFL,
these functionalities are realized using Meta's CrypTen framework,
in which two semi-honest MPC servers carry out the computa-
tion with the help of a trusted third party that provides correlated
randomness [24, 25, 44]. However, HyFL is not bound to any spe-
cific MPC setting and could be instantiated using any MPC protocol.
Table 3: MPC functionalities used in HyFL framework.
Algorithm
Input(s) Description
Share
Reshare
Agg
Train
Predict
Reveal
TM-List
TopK-Hitter
D , V
⟨D ⟩U , V
{ ⟨W j ⟩ }
⟨W ⟩, ⟨D ⟩
⟨W ⟩, ⟨Q ⟩
⟨D ⟩U , V
W, α
U, Γ
Generates secret shares of D as per target V 's sharing semantics (⟨D ⟩V ).
Converts secret shares of D from source U 's sharing semantics to target V .
Performs secure aggregation over j secret-shared ML models.
Performs PPML Training on ML model W using the data D .
Performs PPML Inference on ML model W using the query Q .
Reconstructs secret-shared data D towards members in target set V .
Performs Trimmed Mean algorithm and returns 2α outlier values
(top and bottom α) for each index position in elements of W
Returns list of Γ values that occur most frequently in U
4.1.6 Threat Model and Privacy Analysis. Given the hybrid nature
of our framework, we consider a mixed adversarial corruption
in HyFL and assume a centralized adversary A orchestrating the
corruption. As described in §4.1.2, HyFL considers that the nature of
the corruption can differ amongst MPC clusters including the global
servers. We model this by defining a corruption strategy Stγ for the
entities in the set γ ∈ {G, Mi, C}i ∈NM . For γ = C, A is allowed to
corrupt a subset of clients maliciously, capturing data poisoning
attacks, but is assumed to respect the standard honest-majority as-
sumption among the clients in FL. The corruption strategy for the
other two cases can vary depending on the context. For example, A
can choose to maliciously corrupt certain MPC clusters Mi (reflect-
ing an unjustified trust assumption in the cluster), while corrupting
the rest, including G, in a semi-honest manner. Additionally, A cor-
rupts either a minority or majority of the entities in a set, depending
on the number of trustworthy entities in that set (although we have
to assume at least one trustworthy entity in each set). However,
we limit HyFL to static adversaries only, meaning that the corrup-
tion strategy is determined at the beginning of the protocol and
remains unchanged throughout the execution. We refer to [30, 52]
for elaborate details on various traits of adversaries in MPC.
We model the training process in HyFL as an ideal function-
ality FHyFL, and assume that clients have securely shared their
training data with their respective MPC clusters. In each iteration t,
FHyFL receives the shares of the current modelWt −1 from the global
servers (G) and the shares of the training data from each cluster's
servers in Mi for i ∈ NM . Using these shares, FHyFL reconstructs
the current global model and the training data for each cluster.
Next, FHyFL trains the model Wt −1 using the data from each cluster,
resulting in a cluster model. These cluster models are then com-
bined using an aggregation algorithm to obtain the updated global
model Wt for this iteration. Finally, FHyFL distributes Wt to each
cluster based on its specific sharing semantics.
Theorem 4.1. Algorithm FL-Train (Alg. 1) securely realises the
FHyFL functionality in the FMPC-hybrid model, assuming the presence
of a static adversary A, who corrupts the entities in γ ∈ {G, Mi,
C}i ∈NM
using a predefined corruption strategy Stγ .
Proof Sketch. In FL-Train, a client can maliciously tamper
with its data before sharing it with an MPC cluster. However, this
behavior is allowed in the FHyFL functionality. The underlying se-
cure aggregation algorithms (Agg) handle and address such attacks,
which fall outside the scope of MPC. Nonetheless, FMPC ensures
the secure evaluation of these aggregation algorithms. Similarly,
the correctness of Share, Reshare, and Train algorithms is guar-
anteed by the FMPC functionality. Therefore, a malicious server
within a cluster or at the global level cannot introduce errors into
the system without being detected. At a high level, the underly-
ing MPC protocols employ techniques such as error correction or
replication in honest-majority settings, while dishonest-majority
□
scenarios utilize message authentication codes.
4.2 Private Inference in HyFL
In HyFL, after the defined number of training iterations T are com-
pleted, the MPC clusters begin to function as clusters for ML in-
ference. Here, we again utilize PPML techniques to enable clients
to query their clusters in a privacy-preserving way [44, 55]. Con-
sider the scenario where client C holding query Q wants to use the
inference service on a model W that is secret-shared with a clus-
ter Mk . This is accomplished by C generating ⟨Q ⟩ Mk using Share,
followed by cluster servers in Mk invoking Predict on ⟨W⟩ Mk
and ⟨Q ⟩ Mk to generate the inference result in secret-shared form.
Finally, Mk reveals the result to C using Reveal protocol.
4.3 Abstraction of Existing FL Schemes
One notable feature of our HyFL architecture (cf. Fig. 1) is its ca-
pability to encompass multiple existing FL frameworks, as shown
in Tab. 4. This abstraction not only simplifies comparisons but also
facilitates advanced hybrid designs, including the integration of
differential privacy.
Standard FL with a single aggregator (Single S) [58] is a variant
of HyFL, where each Layer III cluster Ci consists of only one client
that also serves as the MPC cluster server Mi in Layer II. Thus, it
is sufficient to conduct ML training without privacy concerns and
then send the results to a single global server G in Layer I for aggre-
gation. The case of distributed aggregators (Multi S) [32] follows
similarly, except secure aggregation being performed at Layer I with
multiple (NG > 1) global servers. Finally, existing hierarchical FL
schemes [87] share a similar three-layer architecture with HyFL,
but have a single server at both the global and cluster level (NG = 1,
NMi = 1). While HyFL employs PPML training at the cluster-server
level, hierarchical FL uses secure aggregation. Additionally, clients
in the hierarchical FL approach perform local model training, as
opposed to data sharing in HyFL.
Advanced hybrid designs in HyFL could incorporate data from
privileged clients, such as trusted consortium members, without
hiding the global model. The client can train the model locally and
Table 4: Abstraction of existing FL schemes (cf. Tab. 1) us-
ing our HyFL architecture (cf. Fig. 1). S denotes aggrega-
tion server(s), S.Agg. denotes secure aggregation, and (S.)Agg.
marks secure aggregation as optional. See Tab. 2 for other
notations.
Scheme
Aggregation
(Single S)
Aggregation
(Multi S)
Hierarchical
FL
Hybrid FL (HyFL)
This Work
Layer I
NG = 1
(S.)Agg.
NG > 1
Ns
Role
Ns
Layer II
NMi = 1
Layer III
Remark
NCi = 1
Mi = Ci
ML Training
NMi = 1
NCi = 1
Role
S.Agg.
ML Training
Ns
Role
Ns
NG = 1
(S.)Agg.
NG > 1
NMi = 1
(S.)Agg.
NMi > 1
NCi > 1
ML Training
NCi > 1
Role
S.Agg.
PPML Training Data Sharing
Mi = Ci
Mi ≠ Ci
Mi ≠ Ci
share the gradients with aggregation servers. Another hybrid could
include a collaborative training model like SafeNet [19], which re-
sists poisoning attacks to some extent. SafeNet defines the global
model as an ensemble of verified models, with the majority predic-
tion determining the final output. This setup can replace an MPC
cluster and its associated clients in HyFL. The ensemble models
can be aggregated or subjected to MPC-based clustering [61] to
obtain a single model. The remaining process follows the HyFL
architecture, replacing operations in SafeNet on the plain model
with corresponding MPC counterparts. Additionally, the training in
the MPC clusters, resilient to poisoning attacks, can be categorized
as attested training. The global servers can use a simple or mildly ro-
bust aggregation scheme to incorporate updates from these clusters,
decreasing the likelihood of error propagation to higher layers.
5 PERFORMANCE EVALUATION
We evaluate the performance of HyFL in terms of accuracy as well
as computation and communication overhead empirically.
Implementation. We implement HyFL based on the CrypTen
MPC framework developed by Meta [44]. CrypTen provides a Py-
Torch-style interface and implements MPC operations with GPU
support. Specifically, CrypTen implements semi-honest arithmetic
and Boolean two- and multi-party protocols that use a third "helper"
party to generate correlated randomness. CrypTen provides a "sim-
ulation" mode where the specified computation is performed on a
single node in plaintext yet simulates all effects that computation
in MPC would have on the results (e.g., due to limited fixed-point
precision and trunction). We leverage this mode to efficiently eval-
uate HyFL accuracy and later the impact of data-poisoning attacks;
yet we run the full MPC computation to obtain realistic run-time
and communication measurements. In all our experiments, the fixed-
point precision in CrypTen is set to 22 decimal bits (the maximum
developer-recommended number).
We use CrypTen to implement (a) private training on Layer II
and (b) distributed aggregation on Layer I. CrypTen out of the box
supports private inference between Layer II and III, which, how-
ever, is not the focus of our evaluation. We extend CrypTen with
an identity layer to enable model conversions and re-sharing. Addi-
tionally, we extend the implementation of convolutional layers to
enable full GPU-accelerated training for such model architectures.
7
Moreover, we provide the necessary code to orchestrate the vari-
ous parties and components, thereby creating a unified simulation
framework.
Setup. Plaintext FL and CrypTen-based HyFL simulations are run
on a single computing platform equipped with two Intel Xeon
Platinum 8168 CPUs, 1.5TB RAM, and 16 NVIDIA Tesla V100
GPUs. To provide realistic results for a distributed MPC deployment
with two computational and one helper party, we use three Ama-
zon AWS g3s.xlarge instances with 4 vCPUs, and 8GB GPU mem-
ory on a NVIDIA Tesla M60. These instances are located in the
same AWS availability zone (due to high costs associated with rout-
ing traffic between different zones), yet we simulate intra- and
inter-continental network connections by setting the bandwidth
and latency to 1Gbps/100Mbps and 20ms/100ms, respectively.
Tasks. Following prior work [4], we evaluate HyFL on two stan-
dard image classification tasks: recognizing (a) hand-written dig-
its using LeNet trained on MNIST [49] and (b) objects in one
of 10 classes using ResNet9 trained on CIFAR10 [48]. We simu-
late 1000 clients from which 100 are randomly selected per round.
For plain FL, we use batch size 8 and learning rate 0.005, and train
locally for 5 epochs before central aggregation. For HyFL, we sim-
ulate 10 Layer II clusters that use a correspondingly scaled batch
size of 80 and a learning rate of 0.05 [40].
Overview. We run an empirical accuracy evaluation to answer
the following questions:
Q1: What is the accuracy difference between FL [58] and HyFL
(in plaintext)?
Q2: What is the impact on accuracy for HyFL when moving
from plaintext to (simulated) MPC?
Q3: What are the run-time and communication overheads of
(MPC-based) HyFL compared to FL?
In the following, we describe how we answer the individual
questions and discuss our results.
Q1 – FL vs HyFL. In Fig. 2, we compare the validation accu-
racy of FL and HyFL for image classification tasks for 500 rounds.
Here, we note that HyFL converges significantly faster than reg-
ular FL, e.g., after 500 rounds of training ResNet9 on CIFAR10,
HyFL reaches 85.68% validation accuracy, whereas regular FL only
reaches 65.95%. We attribute this to HyFL pooling training data at
cluster level and thus being able to exploit the known benefits of
batching [13, 40]. Plots for up to 2000 epochs can be found in Fig. 6
in App. A.1.4.
Q2 – Impact of MPC. In Fig. 3, we compare the plaintext val-
idation accuracy (cf. Q1) to our CrypTen simulation to measure
the impact of MPC (i.e., fixed-point representation with 22 bit dec-
imal representation and truncation). Here, we can only provide
results for LeNet/MNIST, as ResNet9 training on GPU in CrypTen
is currently not supported due to limitations in the backward pass
implementation. While there is a slight difference in initial rounds,
both implementations quickly converge to almost the same valida-
tion accuracy, with only a small difference on the order of 0.1%.
Q3 – MPC Overhead. Finally, we study the overhead of MPC for
secure training and aggregation. For this, we measure the run-times
Figure 2: Validation accuracy for FL and HyFL for 500 itera-
tions (top: LeNet/MNIST, bottom: ResNet9/CIFAR10).
Figure 3: Validation accuracy for FL and HyFL in plaintext
and MPC (CrypTen simulation) for LeNet/MNIST training.
and communication for one iteration of LeNet/MNIST training (i.e.,
5 local epochs) in AWS for one cluster (with 1Gbps bandwidth
and 20ms latency) and one iteration of global aggregation (with
100Mbps bandwidth and 100ms latency). The training on cluster
level takes 315.17s and requires 5279.25MB inter-server communi-
cation, which is multiple orders of magnitude overhead compared
to local plaintext training in PyTorch (which only takes 0.07s). The
aggregation over 10 cluster inputs is very efficient with 0.023s
run-time and has no communication overhead since only linear
operations are required, which can be conducted locally in MPC.
Additional overhead that must be considered for clients is shar-
ing data with the training cluster servers. In our setup, clients on
expectation have to upload 3.31MB and 9.86MB in total for 500
rounds of training for MNIST and CIFAR10, respectively. Further-
more, we have to account for sharing the trained models from
training clusters to the aggregation servers. Given the number of
model parameters and CrypTen sharing semantics, each training
cluster must transfer 0.49MB and 39.19MB per server for LeNet
and ResNet9, respectively. This clearly shows that it is significantly
more efficient for participants to upload their training data in secret-
shared form compared to down- and uploading model parameters
for each training round. Note that in our evaluation setup, training
clusters and the aggregation layer use the same MPC configuration,
hence no interactive re-sharing is necessary.
8
0100200300400500Epochs0255075100Accuracy45047550095100FLHyFL0100200300400500Epochs0255075100Accuracy4504755006080FLHyFL0100200300400500Epochs020406080100Accuracy45047550097.2597.5045047550098.7599.00PlaintextCrypTenFLHyFL6 ATTACKS
Malicious FL participants can try to manipulate the global model
to either produce specific outputs for specific inputs or simply
degrade the overall accuracy. These attacks are referred to as back-
door [2, 86] and poisoning attacks [80], respectively. In terms of
poisoning attacks, the two options are to perform data poison-
ing [6, 81] or model poisoning [31, 82]. Since models in our set-
ting are not available to clients at any time, malicious participants
are inherently limited to manipulate the training data they provide.
This rules out the entire class of more powerful model-poisoning
attacks [76]. Hence, we evaluate the the effectiveness of state-
of-the-art data-poisoning attacks in the HyFL setting as well as
possible mitigations. Specifically, we consider the following data
poisoning attacks: random label flipping (RLF [85]), static label flip-
ping (SLF [31, 76]), dynamic label flipping (DLF [76]), and targeted
label flipping (TLF [81]). The attacks are detailed in App. A.1.1.
6.1 Robust Aggregation Schemes
The most common FL aggregation scheme is "FedAvg", which sim-
ply computes a (weighted) average of all inputs (cf. §2.2). In contrast,
robust aggregation schemes detect and then exclude outliers, and are
thus a suitable mitigation against data poisoning. An overview of
such schemes is given in [76] and [35]. From the surveyed schemes,
we identify "FLTrust" [16] and "Trimmed Mean" (TM) [89] as the
most MPC-efficient ones.
FLTrust assumes that the aggregator has access to a clean data set
to run training on the most recent global model; then, it measures
the cosine similarity of the own training result against the inputs
of participants and excludes the least similar ones.
Trimmed Mean, for each coordinate, computes the mean across
the provided gradient updates and excludes the values that deviate
the most in either direction of the mean. For our experiments, the
number of excluded coordinates corresponds to the maximum as-
sumed poison rate in the system (e.g., when assuming at most 20%
of clients are corrupted, we discard the top and bottom 20%). Per-
forming this aggregation obliviously in MPC requires implementing
costly sorting to determine the ranking in each coordinate.
We observe that, intuitively, data poisoning in contrast to model
poisoning does not result in specific coordinates producing extreme
outliers. Hence, we propose a heuristic "Trimmed Mean Variant"
that computes the mean and ranking only for a small randomly
sampled subset of coordinates. Then, during aggregation, it excludes
those gradient updates that occurred the most as outliers in the
sample. We detail the algorithm of our variant in Alg. 2.
Our algorithm uses two additional MPC functionalities: TM-List
and TopK-Hitter. TM-List takes as input a set of vectors, say W,
consisting of β-sized vectors of the form W i
j for i ∈ [β], j ∈ [NW ].
Moreover, the values in the vector come from a fixed source (the
Layer II MPC clusters in our case) and are thus represented as a tuple
of the form W i
j = (ui, vi ) j . Here, ui denotes the source ID (MPC
cluster in HyFL) and vi represents the corresponding value.
W.l.o.g., consider the first index position of these vectors (i = 1).
TM-List sorts the list {(u, v) j } j ∈ [NW ] using the value v as the key
and selects the IDs (u) associated with the top and bottom α val-
ues. Intuitively, the operation results in selecting the MPC clusters
whose local updates fall in either the top-α or bottom-α position
9
Algorithm 2 Our Trimmed Mean (TM) Variant in HyFL
Input: W = {W i }i ∈ [NM ] , α, β, γ
Output: ⟨WAGG ⟩
1: initialize: Z ← ∅
2: I ← sample random β indices from [1, γ ].
3: U ← TM-List(WI, α )
# γ = |W i |, α – trim threshold, β – sample size
# aggregated model after removing outliers
# WI –Truncated W with only indices in I, TM-List
performs Trimmed Mean algorithm and returns 2α outlier values (top and bottom α) for each
index in I, | U | = 2α β
# set of outliers
4: V ← TopK-Hitter( U, 2α ) # returns list of 2α indices that occur most frequently
in U
5: for all i ∈ V do
6: Z ← Z (cid:208){W i }
7: end for
8: ⟨WAGG ⟩ ← Agg(W \ Z)
among all the updates at that index. This procedure is performed
in parallel for all β indices and results in a set U of 2αβ IDs (with
duplicates). The TopK-Hitter functionality, parameterized by Γ,
takes this set U as input and returns a set of Γ values that occur
most frequently in U.
6.2 Evaluation
We now empirically evaluate the impact of data-poisoning attacks
on HyFL considering different (robust) aggregation schemes. For
this, we implement all four attacks-RLF, SLF, DLF, TLF-in our
framework and add CrypTen-based implementations of the three
robust aggregation schemes. Using the setup described in §5, we
want to answer the following questions:
Q4: What is the impact of data-poisoning attacks on the accuracy
of FL and HyFL using FedAvg and robust aggregation schemes?
Q5: What is the run-time and communication overhead for dif-
ferent robust aggregation schemes in MPC?
Q6: How does our TM variant compare to regular TM w.r.t.
accuracy and MPC performance.
In the following, we outline our approach to answering the
questions and provide a detailed analysis of our findings.
Q4 – Attack Impact. For our evaluation, we consider three poison
rates (0.01, 0.1, 0.2) and distributions of attackers: in the equally-
distributed setting, we assume that on expectation each cluster has
the same number of malicious clients; in the focused setting, we
assume that malicious clients are concentrated on as few clusters
as possible while there is still an honest majority in each cluster (a
standard assumption in FL); finally, in the cluster-focused setting,
we see what happens if we lift the honest-majority assumption
and concentrate all malicious clients in as few clusters as possi-
ble. In Fig. 4, we study the effectiveness of the most powerful DLF
data-poisoning attack on both regular FL and HyFL when train-
ing ResNet9 on CIFAR10 in the equally distributed and focused
setting. Additional experimental outcomes are given in App. A.1.5.
For the fairly aggressive 0.2 poison rate, we see in both visualized
attacker distributions a significant negative impact of the DLF attack
on FL when using FedAvg with drops below 30% accuracy. How-
ever, these can be successfully mitigated with robust aggregation
schemes. While there is also negative impact on HyFL, especially
in the focused setting, the accuracy even with FedAvg never drops
Figure 4: Validation accuracy for FL and HyFL with FedAvg, FLTrust, and trimmed mean as aggregation schemes under DLF
attack for three different poison rates (top: equally distributed, bottom: focused setting).
below that of FL. And even though robust aggregation schemes
help to slightly smoothen the curve, we conclude that applying
defenses in HyFL against data-poisoning attacks can be considered
optional but not strictly necessary.
Q5 – Robust Aggregation in MPC. We evaluate the run-time and
communication overhead of our FLTrust and TM implementation
in CrypTen in Tab. 5. The run-time overhead for both robust ag-
gregation schemes compared to FedAvg is four to five orders of
magnitude. Also, FLTrust requires 5× more run-time and communi-
cation than TM. Given that both produce fairly similar results when
applied to HyFL, the overhead for FLTrust seems not warranted.
Table 5: Communication and run-time for various aggrega-
tion schemes in CrypTen.
Figure 5: Accuracy of trimmed mean (TM) and our vari-
ant (with sample sizes 10, 100, and 1000) against focused DLF
attacks on HyFL at 0.2 poison rate for ResNet9/CIFAR10.
Parameter
FedAvg
Trimmed Mean
FLTrust
Communication (in MB)
Runtime (in s)
0
0.023
1021.59
326.57
5329.19
1713.44
compared to the original. In the studied inter-continental WAN
setting, this has severe impact but does not correspond to actual
compute time.
Q6 – Trimmed Mean Variant. In Fig. 5, we compare the effective-
ness of our TM variant to the original TM [89] for three sample
sizes (10, 100, and 1000). It turns out that our heuristic approach
barely reduces the effectiveness, even with aggressive parameters.
In fact, in the focused setting, the TM variant outperforms the
original. This is because our variant completely excludes gradient
updates of (poisoned) outliers, whereas in regular trimmed mean,
those poisoned updates might still be considered for some coordi-
nates. Results for all other settings are presented in App. A.1.6.
In Tab. 6, we also provide run-times and communication results
for our optimizations. Compared to the original with 1021.59MB of
communication, we can see an improvement by two orders of mag-
nitude with a communication of 11.90MB for the variant with 100
random samples. However, we see a higher and fairly stable run-
time across all three examined variants. This is because the algo-
rithm for determining the overall ranking of outliers across co-
ordinates increases the number of MPC communication rounds
Table 6: Communication and run-time for our TM variant
with sample sizes 10, 100, and 1000 in CrypTen.
Parameter
TM-10
TM-100
TM-1000
Communication (in MB)
Runtime (in s)
9.69
558.05
11.90
558.26
33.94
561.50
Overall, if HyFL is combined with a robust aggregation scheme,
our TM variant offers an excellent trade-off between accuracy
and MPC overhead compared to significantly more expensive FLTrust
and the original TM.
7 CONCLUSION
In this work, we presented HyFL, a novel unified abstraction and
framework for (hierarchical) federated learning that provides global
model privacy, faster convergence, smaller attack surface and better
resilience against poisoning attacks than regular FL.
10
025050075010001250150017502000Poison: 0.01020406080100DLF - Equally Distributed18001900200070801800190020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100DLF - Equally Distributed18001900200070801800190020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100DLF - Equally Distributed18001900200070801800190020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100DLF - Focused18001900200070801800190020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100DLF - Focused18001900200070801800190020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100DLF - Focused18001900200070801800190020008090FedAvgFLTrustTrimmed MeanFLHyFL0500100015002000Epochs020406080100Accuracy1800190020008090TMTM - 10TM - 100TM - 1000As part of future work, we plan to investigate potential fur-
ther performance improvements by incorporating quantization
techniques for private training [43] and secure aggregation [4].
Additionally, we envision the design of novel robust aggregation
schemes that are specifically targeted at mitigating data poisoning,
and incorporating defense mechanisms already at the PPML level
to then have "attested" inputs at the aggregation level.
ACKNOWLEDGMENTS
This project received funding from the European Research Coun-
cil (ERC) under the European Union's Horizon 2020 research and
innovation program (grant agreement No. 850990 PSOTI). It was
co-funded by the Deutsche Forschungsgemeinschaft (DFG) within
SFB 1119 CROSSING/236615297 and GRK 2050 Privacy & Trust/
251805230.
REFERENCES
[1] Abbas Acar, Hidayet Aksu, A. Selcuk Uluagac, and Mauro Conti. 2018. A Survey
on Homomorphic Encryption Schemes: Theory and Implementation. Comput.
Surveys (2018).
[2] Eugene Bagdasaryan, Andreas Veit, Yiqing Hua, Deborah Estrin, and Vitaly
Shmatikov. 2020. How To Backdoor Federated Learning. In AISTATS.
[3] James Henry Bell, Kallista A. Bonawitz, Adrià Gascón, Tancrède Lepoint, and Mar-
iana Raykova. 2020. Secure Single-Server Aggregation with (Poly)Logarithmic
Overhead. In CCS.
[4] Yaniv Ben-Itzhak, Helen Möllering, Benny Pinkas, Thomas Schneider, Ajith
Suresh, Oleksandr Tkachenko, Shay Vargaftik, Christian Weinert, Hossein Yalame,
and Avishay Yanai. 2022. ScionFL: Efficient and Robust Secure Quantized Aggre-
gation. CoRR abs/2210.07376 (2022).
[5] Arjun Nitin Bhagoji, Supriyo Chakraborty, Prateek Mittal, and Seraphin B. Calo.
2019. Analyzing Federated Learning through an Adversarial Lens. In ICML.
[6] Battista Biggio, Blaine Nelson, and Pavel Laskov. 2012. Poisoning Attacks against
Support Vector Machines. In ICML.
[7] Peva Blanchard, El Mahdi El Mhamdi, Rachid Guerraoui, and Julien Stainer. 2017.
Machine Learning with Adversaries: Byzantine Tolerant Gradient Descent. In
NeurIPS.
[8] Franziska Boenisch, Adam Dziedzic, Roei Schuster, Ali Shahin Shamsabadi, Ilia
Shumailov, and Nicolas Papernot. 2021. When the Curious Abandon Honesty:
Federated Learning Is Not Private. CoRR abs/2112.02918 (2021).
[9] Franziska Boenisch, Adam Dziedzic, Roei Schuster, Ali Shahin Shamsabadi, Ilia
Shumailov, and Nicolas Papernot. 2022. All You Need Is Matplotlib. http://www.
cleverhans.io/2022/04/17/fl-privacy.html.
[10] Franziska Boenisch, Adam Dziedzic, Roei Schuster, Ali Shahin Shamsabadi, Ilia
Shumailov, and Nicolas Papernot. 2023. Is Federated Learning a Practical PET
Yet? CoRR abs/2301.04017 (2023).
[11] Keith Bonawitz, Vladimir Ivanov, Ben Kreuter, Antonio Marcedone, H. Bren-
dan McMahan, Sarvar Patel, Daniel Ramage, Aaron Segal, and Karn Seth. 2017.
Practical Secure Aggregation for Privacy-Preserving Machine Learning. In CCS.
[12] Kallista A. Bonawitz, Hubert Eichner, Wolfgang Grieskamp, Dzmitry Huba, Alex
Ingerman, Vladimir Ivanov, Chloé Kiddon, Jakub Konečný, Stefano Mazzocchi,
Brendan McMahan, Timon Van Overveldt, David Petrou, Daniel Ramage, and
Jason Roselander. 2019. Towards Federated Learning at Scale: System Design. In
MLSys.
[13] Léon Bottou, Frank E. Curtis, and Jorge Nocedal. 2018. Optimization Methods
for Large-Scale Machine Learning. SIAM Rev. (2018).
[14] Lukas Burkhalter, Hidde Lycklama, Alexander Viand, Nicolas Küchler, and Anwar
Hithnawi. 2023. RoFL: Robustness of Secure Federated Learning. In IEEE S&P.
[15] José Cabrero-Holgueras and Sergio Pastrana. 2021. SoK: Privacy-Preserving
Computation Techniques for Deep Learning. PETS (2021).
[16] Xiaoyu Cao, Minghong Fang, Jia Liu, and Neil Zhenqiang Gong. 2021. FLTrust:
Byzantine-robust Federated Learning via Trust Bootstrapping. In NDSS.
[17] Sylvain Chatel, Christian Mouchet, Ali Utkan Sahin, Apostolos Pyrgelis, Carmela
Troncoso, and Jean-Pierre Hubaux. 2023. PELTA – Shielding Multiparty-FHE
against Malicious Adversaries. Cryptology ePrint Archive, Paper 2023/642.
[18] Harsh Chaudhari, Ashish Choudhury, Arpita Patra, and Ajith Suresh. 2019. AS-
TRA: High Throughput 3PC over Rings with Application to Secure Prediction.
In CCSW@CCS.
[19] Harsh Chaudhari, Matthew Jagielski, and Alina Oprea. 2022. SafeNet: The Un-
reasonable Effectiveness of Ensembles in Private Collaborative Learning. In IEEE
SaTML.
[20] Harsh Chaudhari, Rahul Rachuri, and Ajith Suresh. 2020. Trident: Efficient 4PC
Framework for Privacy Preserving Machine Learning. In NDSS.
[21] European Commission. 2014. Benchmarking Smart Metering Deployment in the
EU-27 with a Focus on Electricity. COM/2014/0356 final (2014).
[22] Colette Cuijpers and Bert-Jaap Koops. 2013. Smart Metering and Privacy in
Europe: Lessons from the Dutch Case. In European Data Protection: Coming of
Age.
[23] Ivan Damgård, Helene Haagh, Michael Nielsen, and Claudio Orlandi. 2019.
Commodity-Based 2PC for Arithmetic Circuits. In IMACC.
[24] Ivan Damgård, Valerio Pastro, Nigel P. Smart, and Sarah Zakarias. 2012. Multi-
party Computation from Somewhat Homomorphic Encryption. In CRYPTO.
[25] Daniel Demmler, Thomas Schneider, and Michael Zohner. 2015. ABY - A Frame-
work for Efficient Mixed-Protocol Secure Two-Party Computation. In NDSS.
[26] Yongheng Deng, Feng Lyu, Ju Ren, Yongmin Zhang, Yuezhi Zhou, Yaoxue Zhang,
and Yuanyuan Yang. 2021. SHARE: Shaping Data Distribution at Edge for
Communication-Efficient Hierarchical Federated Learning. In ICDCS.
[27] Damien Desfontaines and Balázs Pejó. 2020. SoK: Differential Privacies. PETS
(2020).
[28] Ye Dong, Xiaojun Chen, Kaiyun Li, Dakui Wang, and Shuai Zeng. 2021. FLOD:
Oblivious Defender for Private Byzantine-Robust Federated Learning with
Dishonest-Majority. In ESORICS.
[29] Cynthia Dwork and Aaron Roth. 2014. The Algorithmic Foundations of Differen-
tial Privacy. Found. Trends Theor. Comput. Sci. (2014).
[30] David Evans, Vladimir Kolesnikov, and Mike Rosulek. 2018. A Pragmatic Intro-
duction to Secure Multi-Party Computation. Foundations and Trends in Privacy
and Security (2018).
[31] Minghong Fang, Xiaoyu Cao, Jinyuan Jia, and Neil Zhenqiang Gong. 2020. Local
Model Poisoning Attacks to Byzantine-Robust Federated Learning. In USENIX
Security.
[32] Hossein Fereidooni, Samuel Marchal, Markus Miettinen, Azalia Mirhoseini, He-
len Möllering, Thien Duc Nguyen, Phillip Rieger, Ahmad-Reza Sadeghi, Thomas
Schneider, Hossein Yalame, and Shaza Zeitouni. 2021. SAFELearn: Secure Aggre-
gation for Private Federated Learning. In DLS@S&P.
[33] Liam H. Fowl, Jonas Geiping, Wojciech Czaja, Micah Goldblum, and Tom Gold-
stein. 2022. Robbing the Fed: Directly Obtaining Private Data in Federated
Learning with Modified Models. In ICLR.
[34] David Froelicher, Juan Ramón Troncoso-Pastoriza, Apostolos Pyrgelis, Sinem Sav,
Joao Sa Sousa, Jean-Philippe Bossuat, and Jean-Pierre Hubaux. 2021. Scalable
Privacy-Preserving Distributed Learning. PETS (2021).
[35] Till Gehlhar, Felix Marx, Thomas Schneider, Ajith Suresh, Tobias Wehrle, and
Hossein Yalame. 2023. SAFEFL: MPC-friendly Framework for Private and Robust
Federated Learning. In DLS@S&P.
[36] Jonas Geiping, Hartmut Bauermeister, Hannah Dröge, and Michael Moeller. 2020.
Inverting Gradients – How Easy Is It to Break Privacy in Federated Learning?. In
NeurIPS.
[37] Craig Gentry. 2009. Fully Homomorphic Encryption Using Ideal Lattices. In
STOC.
[38] Ran Gilad-Bachrach, Nathan Dowlin, Kim Laine, Kristin E. Lauter, Michael
Naehrig, and John Wernsing. 2016. CryptoNets: Applying Neural Networks
to Encrypted Data with High Throughput and Accuracy. In ICML.
[39] Oded Goldreich, Silvio Micali, and Avi Wigderson. 1987. How to Play any Mental
Game or A Completeness Theorem for Protocols with Honest Majority. In STOC.
[40] Priya Goyal, Piotr Dollár, Ross B. Girshick, Pieter Noordhuis, Lukasz Wesolowski,
Aapo Kyrola, Andrew Tulloch, Yangqing Jia, and Kaiming He. 2017. Accurate,
Large Minibatch SGD: Training ImageNet in 1 Hour. CoRR abs/1706.02677 (2017).
[41] Chaoyang He, Songze Li, Jinhyun So, Mi Zhang, Hongyi Wang, Xiaoyang Wang,
Praneeth Vepakomma, Abhishek Singh, Hang Qiu, Li Shen, Peilin Zhao, Yan
Kang, Yang Liu, Ramesh Raskar, Qiang Yang, Murali Annavaram, and Salman
Avestimehr. 2020. FedML: A Research Library and Benchmark for Federated
Machine Learning. CoRR abs/2007.13518 (2020).
[42] Cheol-Ho Hong and Blesson Varghese. 2019. Resource Management in Fog/Edge
Computing: A Survey on Architectures, Infrastructure, and Algorithms. Comput.
Surveys (2019).
[43] Marcel Keller and Ke Sun. 2022. Secure Quantized Training for Deep Learning.
In ICML.
[44] Brian Knott, Shobha Venkataraman, Awni Y. Hannun, Shubho Sengupta, Mark
Ibrahim, and Laurens van der Maaten. 2021. CrypTen: Secure Multi-Party Com-
putation Meets Machine Learning. In NeurIPS.
[45] Jakub Konečn`y, H Brendan McMahan, Felix X Yu, Peter Richtárik,
Ananda Theertha Suresh, and Dave Bacon. 2016.
Federated Learning:
Strategies for Improving Communication Efficiency. CoRR abs/1610.05492
(2016).
[46] Nishat Koti, Shravani Patil, Arpita Patra, and Ajith Suresh. 2023. MPClan: Protocol
Suite for Privacy-Conscious Computations. J. Cryptol. (2023).
[47] Nishat Koti, Arpita Patra, Rahul Rachuri, and Ajith Suresh. 2022. Tetrad: Actively
Secure 4PC for Secure Training and Inference. In NDSS.
[48] Alex Krizhevsky. 2009. Learning Multiple Layers of Features from Tiny Images.
Technical Report.
11
[49] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. 1998. Gradient-
based Learning Applied to Document Recognition. Proc. IEEE (1998).
[50] Liping Li, Wei Xu, Tianyi Chen, Georgios B Giannakis, and Qing Ling. 2019. RSA:
Byzantine-Robust Stochastic Aggregation Methods for Distributed Learning from
Heterogeneous Datasets. In AAAI.
[51] Tao Lin, Sebastian U. Stich, Kumar Kshitij Patel, and Martin Jaggi. 2020. Don't
Use Large Mini-batches, Use Local SGD. In ICLR.
[52] Yehuda Lindell. 2020. Secure Multiparty Computation. Commun. ACM (2020).
[53] Heiko Ludwig, Nathalie Baracaldo, Gegi Thomas, Yi Zhou, Ali Anwar, Shashank
Rajamoni, Yuya Ong, Jayaram Radhakrishnan, Ashish Verma, and Mathieu Sinn.
2020. IBM Federated Learning: an Enterprise Framework White Paper V0. 1.
CoRR abs/2007.10987 (2020).
[54] Kalikinkar Mandal and Guang Gong. 2019. PrivFL: Practical Privacy-preserving
Federated Regressions on High-dimensional Data over Mobile Networks. In
CCSW@CCS.
[55] Zoltán Ádám Mann, Christian Weinert, Daphnee Chabal, and Joppe W. Bos. 2022.
Towards Practical Secure Neural Network Inference: The Journey So Far and the
Road Ahead. Cryptology ePrint Archive, Paper 2022/1483.
[56] Mohamad Mansouri, Melek Önen, Wafa Ben Jaballah, and Mauro Conti. 2023. SoK:
Secure Aggregation Based on Cryptographic Schemes for Federated Learning.
PETS (2023).
[57] Sergio Marti and Hector Garcia-Molina. 2006. Taxonomy of Trust: Categorizing
P2P Reputation Systems. Computer Networks (2006).
[58] Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and
Blaise Agüera y Arcas. 2017. Communication-Efficient Learning of Deep Net-
works from Decentralized Data. In AISTATS.
[59] Payman Mohassel and Yupeng Zhang. 2017. SecureML: A System for Scalable
Privacy-Preserving Machine Learning. In IEEE S&P.
[60] Christian Mouchet, Juan Troncoso-Pastoriza, Jean-Philippe Bossuat, and Jean-
Pierre Hubaux. 2021. Multiparty Homomorphic Encryption from Ring-Learning-
With-Errors. PETS (2021).
[61] Thien Duc Nguyen, Phillip Rieger, Huili Chen, Hossein Yalame, Helen Möllering,
Hossein Fereidooni, Samuel Marchal, Markus Miettinen, Azalia Mirhoseini, Shaza
Zeitouni, Farinaz Koushanfar, Ahmad-Reza Sadeghi, and Thomas Schneider. 2022.
FLAME: Taming Backdoors in Federated Learning. In USENIX Security.
[62] Ahmed El Ouadrhiri and Ahmed Abdelhadi. 2022. Differential Privacy for Deep
and Federated Learning: A Survey. IEEE Access (2022).
[63] Pascal Paillier. 1999. Public-Key Cryptosystems based on Composite Degree
Residuosity Classes. In EUROCRYPT.
[64] Dario Pasquini, Danilo Francati, and Giuseppe Ateniese. 2022. Eluding Secure
Aggregation in Federated Learning via Model Inconsistency. In CCS.
[65] Arpita Patra, Thomas Schneider, Ajith Suresh, and Hossein Yalame. 2021. ABY2.0:
Improved Mixed-Protocol Secure Two-Party Computation. In USENIX Security.
[66] Arpita Patra and Ajith Suresh. 2020. BLAZE: Blazing Fast Privacy-Preserving
Machine Learning. In NDSS.
[67] Le Trieu Phong, Yoshinori Aono, Takuya Hayashi, Lihua Wang, and Shiho Moriai.
2018. Privacy-Preserving Deep Learning via Additively Homomorphic Encryp-
tion. IEEE Trans. Inf. Forensics Secur. (2018).
[68] Mayank Rathee, Conghao Shen, Sameer Wagh, and Raluca Ada Popa. 2023. ELSA:
Secure Aggregation for Federated Learning with Malicious Actors. In IEEE S&P.
[69] Nicola Rieke, Jonny Hancox, Wenqi Li, Fausto Milletarì, Holger R. Roth, Shadi
Albarqouni, Spyridon Bakas, Mathieu N. Galtier, Bennett A. Landman, Klaus H.
Maier-Hein, Sébastien Ourselin, Micah J. Sheller, Ronald M. Summers, Andrew
Trask, Daguang Xu, Maximilian Baust, and M. Jorge Cardoso. 2020. The future
of digital health with federated learning. npj Digit. Medicine 3 (2020).
[70] Ronald L. Rivest, Len Adleman, and Michael L. Dertouzos. 1978. On Data Banks
and Privacy Homomorphisms. Foundations of Secure Computation (1978).
[71] Frank Rubin. 1996. One-Time Pad Cryptography. Cryptologia (1996).
[72] Mark Russinovich, Manuel Costa, Cédric Fournet, David Chisnall, Antoine
Delignat-Lavaud, Sylvan Clebsch, Kapil Vaswani, and Vikas Bhatia. 2021. Toward
Confidential Cloud Computing. Commun. ACM (2021).
[73] Sinem Sav, Apostolos Pyrgelis, Juan Ramón Troncoso-Pastoriza, David Froelicher,
Jean-Philippe Bossuat, Joao Sa Sousa, and Jean-Pierre Hubaux. 2021. POSEIDON:
Privacy-Preserving Federated Neural Network Learning. In NDSS.
[74] Thomas Schneider, Ajith Suresh, and Hossein Yalame. 2023. Comments on
"Privacy-Enhanced Federated Learning Against Poisoning Adversaries". IEEE
Trans. Inf. Forensics Secur. (2023).
[75] Virat Shejwalkar and Amir Houmansadr. 2021. Manipulating the Byzantine:
Optimizing Model Poisoning Attacks and Defenses for Federated Learning. In
NDSS.
[76] Virat Shejwalkar, Amir Houmansadr, Peter Kairouz, and Daniel Ramage. 2022.
Back to the Drawing Board: A Critical Evaluation of Poisoning Attacks on Pro-
duction Federated Learning. In IEEE S&P.
[77] Jinhyun So, Ramy E. Ali, Basak Guler, Jiantao Jiao, and Salman Avestimehr.
2021. Securing Secure Aggregation: Mitigating Multi-Round Privacy Leakage in
Federated Learning. CoRR abs/2106.03328 (2021).
[78] Lakshminarayanan Subramanian, Sharad Agarwal, Jennifer Rexford, and
Randy H. Katz. 2002. Characterizing the Internet Hierarchy from Multiple Van-
tage Points. In INFOCOM.
[79] Ajith Suresh. 2021. MPCLeague: Robust MPC Platform for Privacy-Preserving
Machine Learning. CoRR abs/2112.13338 (2021).
[80] Zhiyi Tian, Lei Cui, Jie Liang, and Shui Yu. 2022. A Comprehensive Survey on
Poisoning Attacks and Countermeasures in Machine Learning. Comput. Surveys
(2022).
[81] Vale Tolpegin, Stacey Truex, Mehmet Emre Gursoy, and Ling Liu. 2020. Data
Poisoning Attacks Against Federated Learning Systems. In ESORICS.
[82] Hongyi Wang, Kartik Sreenivasan, Shashank Rajput, Harit Vishwakarma, Saurabh
Agarwal, Jy-yong Sohn, Kangwook Lee, and Dimitris S. Papailiopoulos. 2020.
Attack of the Tails: Yes, You Really Can Backdoor Federated Learning. In NeurIPS.
[83] Zhiyuan Wang, Hongli Xu, Jianchun Liu, He Huang, Chunming Qiao, and Yang-
ming Zhao. 2021. Resource-Efficient Federated Learning with Hierarchical Ag-
gregation in Edge Computing. In INFOCOM.
[84] Yuxin Wen, Jonas Geiping, Liam Fowl, Micah Goldblum, and Tom Goldstein.
2022. Fishing for User Data in Large-Batch Federated Learning via Gradient
Magnification. In ICML.
[85] Han Xiao, Huang Xiao, and Claudia Eckert. 2012. Adversarial Label Flips Attack
on Support Vector Machines. In ECAI.
[86] Chulin Xie, Keli Huang, Pin-Yu Chen, and Bo Li. 2020. DBA: Distributed Backdoor
Attacks against Federated Learning. In ICLR.
[87] He Yang. 2021. H-FL: A Hierarchical Communication Efficient and Privacy-
Protected Architecture for Federated Learning. In IJCAI.
[88] Andrew Chi-Chih Yao. 1986. How to Generate and Exchange Secrets (Extended
Abstract). In FOCS.
[89] Dong Yin, Yudong Chen, Kannan Ramchandran, and Peter L. Bartlett. 2018.
Byzantine-Robust Distributed Learning: Towards Optimal Statistical Rates. In
ICML.
[90] Xuefei Yin, Yanming Zhu, and Jiankun Hu. 2022. A Comprehensive Survey
of Privacy-preserving Federated Learning: A Taxonomy, Review, and Future
Directions. ACM Comput. Surv. (2022).
[91] Chengliang Zhang, Junzhe Xia, Baichen Yang, Huancheng Puyang, Wei Wang,
Ruichuan Chen, Istemi Ekin Akkus, Paarijaat Aditya, and Feng Yan. 2021. Citadel:
Protecting Data Privacy and Model Confidentiality for Collaborative Learning.
In ACM SoCC.
[92] Joshua C. Zhao, Atul Sharma, Ahmed Roushdy Elkordy, Yahya H. Ezzeldin,
Salman Avestimehr, and Saurabh Bagchi. 2023. Secure Aggregation in Feder-
ated Learning is not Private: Leaking User Data at Large Scale through Model
Modification. CoRR abs/2303.12233 (2023).
[93] Wenting Zheng, Ryan Deng, Weikeng Chen, Raluca Ada Popa, Aurojit Panda, and
Ion Stoica. 2021. Cerebro: A Platform for Multi-Party Cryptographic Collaborative
Learning. In USENIX Security.
[94] Ligeng Zhu, Zhijian Liu, and Song Han. 2019. Deep Leakage from Gradients. In
NeurIPS.
[95] Michael Zink, David E. Irwin, Emmanuel Cecchet, Hakan Saplakoglu, Orran
Krieger, Martin C. Herbordt, Michael Daitzman, Peter Desnoyers, Miriam Leeser,
and Suranga Handagala. 2021. The Open Cloud Testbed (OCT): A Platform for
Research into new Cloud Technologies. In IEEE CloudNet.
A ADDITIONAL DETAILS FOR HYFL
A.1.1 Data-Poisoning Attacks in HyFL. In data-poisoning attacks,
malicious clients can perform arbitrary manipulations to the train-
ing data. State-of-the-art attacks are based on label flipping, where
clients keep the legitimate training samples, yet exchange the asso-
ciated labels according to different strategies.
We implement four label-flipping attacks in HyFL, and the de-
tails are presented next. In the attack scenario, we assume a single
attacker controlling all malicious clients, coordinating their actions.
Only one attack occurs at a time, and if multiple clients have the
same data sample, their poisoned labels will be the same. The as-
sumption is that each malicious client poisons all its data samples
to maximize the attack's impact. The data is poisoned once and the
labels remain constant throughout the model's training.
A1: Random Label Flipping (RLF [85]): Each poisoned sample
is assigned a random class label, i.e., for num_classes classes in the
dataset, define new_label = randint(0, num_classes − 1).
12
A2: Static Label Flipping (SLF [31, 76]): Uses a fixed permutation
to determine the new label for each poisoned sample, given by the
equation new_label = num_classes − old_label − 1.
A3: Dynamic Label Flipping (DLF [76]): Employs a surrogate
model to flip the labels for each sample. In our implementation,
we aggregate the data from all malicious clients and utilize it to
train a model with the same architecture as the one used in HyFL
training. Once trained, this model is utilized for inference and the
labels are assigned to the least probable output determined by the
surrogate model. The term "dynamic" is used because the labels rely
on the trained model, and by altering the training configuration,
the poisoned labels will be modified accordingly. The exact training
settings of the surrogate model are given in Tab. 7.
A4: Targeted Label Flipping (TLF [81]): Simply flips all labels
from a source class to a target class. In HyFL, we always set the
source class as 0 and the target class as 1.
Table 7: Training parameters for surrogate model in DLF.
Parameter
Epochs
Batch
Size
Learning
Rate
Momentum
Weight
Decay
Values
50
128
0.05
0.9
0.0005
A.1.2 CrypTen Implementation Details. CrypTen lacks a built-in
oblivious sorting functionality, so we implement privacy-preserving
sorting for so-called CrypTensors. Sorting is necessary to compute
trimmed mean and our optimized trimmed mean variant. We mini-
mize the number of comparisons by implementing a bitonic sorting
network that generates the necessary comparisons between ele-
ments to allow for a non-stable sorting algorithm. For trimmed
mean, it is not necessary to preserve the relative order of same
valued keys as each of them would have been seen as suspicious
anyway. The comparisons are stored in plaintext, as they do not
reveal any information about the data. The comparison steps are
only computed once and then executed in parallel for each coordi-
nate. For 100 elements, we perform 1077 comparisons and for 10
elements only 31. As the result of each comparison is hidden, we
perform the swap operation for each pairs as described in Lst. 1.
1 compare_indices = list ( comparision_generator ( tensors . size (1) ))
2 for (i , j) in compare_indices :
3
b = tensors [: , i ]. gt ( tensors [: , j ])
h = b * tensors [: , i ] + (1 - b ) * tensors [: , j]
l = b * tensors [: , j ] + (1 - b ) * tensors [: , i]
tensors [: , i ] = l
tensors [: , j ] = h
4
5
6
7
Listing 1: CrypTen: Parallel Sorting
When computing the proposed trimmed mean variant, we are
only interested in the indices of the outliers and therefore only
perform the swap operations on an indices list. This is done to
minimize the compute operations and thereby reduce time and
communication. After identifying which gradients were most often
detected as outliers and then computing the set of benign indices,
lastly we compute the sum over those while preserving privacy.
The procedure is shown in Lst. 2.
13
1 def bincount ( self , indices , num_bins ):
2
indices_list = crypten . cryptensor ( torch . arange (0 , num_bins ))
counts = crypten . stack ([ indices for _ in range ( num_bins )], dim
3
4
=1) . eq ( indices_list ). sum ( dim =0)
return counts [ None , :]
5
6 def exclude_topk_indices ( self , indices , k):
7
sorted_indices = self . sort ( indices ). reshape ( -1)
n = sorted_indices . shape [0]
return sorted_indices [:n -k]
8
9
10
11 benign_indices = self . exclude_topk_indices (
12
self . bincount ( outlier_indices , num_bins =n) ,
k= self . exclude_topk )
13
14
15 all_indices = crypten . cryptensor ( torch . arange (0 , n). repeat (
benign_indices . size (0) , 1) ).t ()
16 agg_sum = gradients . matmul ( all_indices . eq ( benign_indices )) . sum ( dim
=1)
17
18 return agg_sum / (n - self . exclude_topk )
Listing 2: CrypTen: Sum of Benign Updates
A.1.3 Run configuration. In this section, we list all the hyper pa-
rameters used during training that do not change between runs.
Parameters that change between runs are explained in the appro-
priate section. Tab. 8 shows the settings that affect the training
by the clients and MPC clusters respectively. We consider 1000
clients overall from which 100 are randomly sampled during each
training iteration. In the FL setting, all sampled clients provide their
computed update directly to the aggregation server. In the HyFL
setting, each of the 10 MPC clusters has 100 associated clients from
which each samples 10 clients at random. Each client has 200 data
points assigned to it at random with duplicates allowed between
clients. To allow for a fair comparison between FL and HyFL, we
scale the learning rate from 0.005 for the FL setting to 0.05 for
the HyFL setting. Each client and MPC cluster performs 5 local
training epochs with either a batch size of 8 or 80, respectively,
following the recommendation of Goyal et al. [40].
Table 8: Training parameteres used in PyTorch and CrypTen.
Parameter
# clients
# clients selected per round
# MPC clusters
# clients per MPC cluster
# clients per MPC cluster per round
size of client datasets
learn rate
# local epochs
batch size
FL
HyFL
1000
100
-
-
-
10
100
10
200
0.005
0.05
5
8
80
Tab. 9 shows the hyper parameters used by the aggregation
server. The trimmed mean threshold α has been chosen such that
it can exclude all malicious updates on either side in the FL setting.
The worst-case scenario we consider is a 0.2 poison rate, which
is equivalent to approximately 20 malicious clients selected per
round.
In the HyFL setting, the cluster-focused setting is the strongest
adversarial setting and we therefore appropriately scale α. For the
trimmed mean variant, we exclude complete updates based on how
Table 9: Robust aggregation parameters.
Parameter
Trimmed Mean α
Trimmed Mean Variant excluded gradients
FLTrust root data set size
FL HyFL
20
40
2
4
200
often they were detected as outliers and therefore need to double α
to later aggregate the same number of parameters per coordinate.
FLTrust uses a root data set to calculate the server model. To
be most effective, the server model must be similar to the benign
models and therefore the root dataset must be representative for
the whole dataset. Therefore, we sample (like for all clients) 200
data points for that dataset.
A.1.4 Additional Results for Q1. Fig. 6 shows the full 2000 training
iterations. As seen in Fig. 2, HyFL trains the model faster than reg-
ular FL and converges to a higher validation accuracy. For MNIST,
HyFL achieves 98.95% compared to 98.72% for regular FL, and 89.04%
compared to 82.14% on CIFAR10, respectively.
A.1.5 Additional Results for Q4.
ResNet9/CIFAR10. Here, we present the full evaluation results
for ResNet9 trained on CIFAR10 under attack. We evaluate FedAvg,
FLTrust, and trimmed mean in regular FL and HyFL under four
different data-poisoning attacks with three different poison rates
and three different distributions of malicious clients. Fig. 7 shows
the results for equally-distributed malicious clients for 2000 rounds.
Fig. 8 shows the focused attack and Fig. 9 shows cluster-focused
results.
HyFL outperforms regular FL in nearly all settings and has more
than 5% higher validation accuracy after 2000 rounds. In both regu-
lar FL and HyFL, all three aggregation schemes show robustness
against data poisoning in the realistic settings with 0.01 and 0.1
poison rate and equally-distributed as well as focused attacks. This
is not the case for a poison rate of 0.2. Especially FedAvg as a non-
robust aggregation scheme struggles to converge. Even robust ag-
gregations cannot fully counteract the attacks. The same is true for
the cluster-focused attack distribution. Here, all aggregations have
spikes in their validation accuracy; only FLTrust manages to train
a model comparable to the other settings. This is because FLTrust
is designed to be robust against model poisoning, and the cluster-
focused setting is the closest to a model-poisoning attack.
LeNet/MNIST. We now show additional evaluation results for LeNet
trained on MNIST. The settings are the same as previously. Fig. 10
shows equally-distributed, Fig. 11 shows focused, and Fig. 12 shows
the cluster-focused attack distribution for 2000 iterations.
As for ResNet9, HyFL trains the model faster than regular FL, but
both converge to a similar accuracy in most cases after 2000 rounds.
Here, the advantage of HyFL over regular FL mostly lies in the
faster convergence: after only 100 rounds of training, HyFL nearly
reaches 98% accuracy, regardless of the attack or attack setting. Also,
there is little difference between the three aggregation schemes
for the realistic settings. For the 0.2 poison rate, FedAvg starts to
struggle a lot to train the model. This can mostly be seen for FedAvg
in regular FL and sometimes in HyFL.
A.1.6 Additional Results for Q6.
ResNet9/CIFAR10. We present the extended evaluation of the
trimmed mean variant for CIFAR10 under all attacks and attack
settings in HyFL. The plots are divided into the three distributions
for malicious clients and show the evaluation results for 2000 it-
erations. Fig. 13 shows equally-distributed, Fig. 14 shows focused,
and Fig. 15 shows cluster-focused. We compare trimmed mean
with our trimmed mean variant when samling 10, 100 and 1000
coordinates.
In most cases, all four aggregations perform equally and the final
validation accuracy is nearly the same. The only difference can be
seen with the cluster-focused attack distribution and 0.2 poison
rate. Here, trimmed mean achieves a substantially lower accuracy
than the trimmed mean variant. We assume that is because cluster-
focused acts more like a model poisoning attack and trimmed mean
variant deals better with this by discarding whole gradients rather
than operating coordinate-wise.
LeNet/MNIST. We also compared trimmed mean against our
trimmed mean variant for LeNet being trained on MNIST. However,
almost all settings, the aggregations perform very similar. Hence,
we omit the full plots.
Figure 6: Validation accuracy for FL and HyFL for 2000
epochs (top: LeNet/MNIST, bottom: ResNet9/CIFAR10)
14
0500100015002000Epochs0255075100Accuracy18001900200098.599.0FLHyFL0500100015002000Epochs0255075100Accuracy1800190020008090FLHyFLFigure 7: Validation accuracy for ResNet9/CIFAR10 training with FedAvg, FLTrust, and trimmed mean for 2000 iterations
under RLF, SLF, DLF, and TLF attacks in the equally-distributed setting.
15
025050075010001250150017502000Poison: 0.01020406080100RLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100RLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100RLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100SLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100SLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100SLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100DLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100DLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100DLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100TLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100TLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100TLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFLFigure 8: Validation accuracy for ResNet9/CIFAR10 training with FedAvg, FLTrust, and trimmed mean for 2000 iterations
under RLF, SLF, DLF, and TLF attacks in the focused setting.
16
025050075010001250150017502000Poison: 0.01020406080100RLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100RLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100RLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100SLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100SLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100SLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100DLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100DLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100DLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100TLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100TLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100TLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFLFigure 9: Validation accuracy for ResNet9/CIFAR10 training with FedAvg, FLTrust, and trimmed mean for 2000 iterations
under RLF, SLF, DLF, and TLF attacks in the cluster-focused setting.
17
025050075010001250150017502000Poison: 0.01020406080100RLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100RLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100RLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100SLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100SLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100SLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100DLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100DLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100DLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100TLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100TLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100TLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFLFigure 10: Validation accuracy for LeNet/MNIST training with FedAvg, FLTrust, and trimmed mean for 2000 iterations under RLF,
SLF, DLF, and TLF attacks in the equally-distributed setting.
18
025050075010001250150017502000Poison: 0.01020406080100RLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100RLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100RLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100SLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100SLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100SLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100DLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100DLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100DLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100TLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100TLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100TLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFLFigure 11: Validation accuracy for LeNet/MNIST training with FedAvg, FLTrust, and trimmed mean for 2000 iterations under RLF,
SLF, DLF, and TLF attacks in the focused setting.
19
025050075010001250150017502000Poison: 0.01020406080100RLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100RLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100RLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100SLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100SLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100SLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100DLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100DLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100DLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100TLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100TLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100TLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFLFigure 12: Validation accuracy for LeNet/MNIST training with FedAvg, FLTrust, and trimmed mean for 2000 iterations under RLF,
SLF, DLF, and TLF attacks in the cluster-focused setting.
20
025050075010001250150017502000Poison: 0.01020406080100RLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100RLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100RLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100SLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100SLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100SLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100DLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100DLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100DLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100TLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100TLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100TLF1800185019001950200090951001800185019001950200095.097.5100.0FedAvgFLTrustTrimmed MeanFLHyFLFigure 13: Validation accuracy for ResNet9/CIFAR10 training with trimmed mean and our trimmed mean variant for 2000
iterations under RLF, SLF, DLF, and TLF attacks in the equally-distributed setting.
21
025050075010001250150017502000Poison: 0.01020406080100RLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100RLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100RLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100SLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100SLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100SLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100DLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100DLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100DLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100TLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100TLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100TLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFLFigure 14: Validation accuracy for ResNet9/CIFAR10 training with trimmed mean and our trimmed mean variant for 2000
iterations under RLF, SLF, DLF, and TLF attacks in the focused setting.
22
025050075010001250150017502000Poison: 0.01020406080100RLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100RLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100RLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100SLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100SLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100SLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100DLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100DLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100DLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100TLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100TLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100TLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFLFigure 15: Validation accuracy for ResNet9/CIFAR10 training with trimmed mean and our trimmed mean variant for 2000
iterations under RLF, SLF, DLF, and TLF attacks in the cluster-focused setting.
23
025050075010001250150017502000Poison: 0.01020406080100RLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100RLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100RLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100SLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100SLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100SLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100DLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100DLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100DLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.01020406080100TLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.1020406080100TLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL025050075010001250150017502000Poison: 0.2020406080100TLF180018501900195020007080180018501900195020008090FedAvgFLTrustTrimmed MeanFLHyFL |
|
http://arxiv.org/abs/2302.09893v2 | 2023-09-10T18:06:56 | 2023-02-20T10:40:29 | Efficient Generator of Mathematical Expressions for Symbolic Regression | We propose an approach to symbolic regression based on a novel variational
autoencoder for generating hierarchical structures, HVAE. It combines simple
atomic units with shared weights to recursively encode and decode the
individual nodes in the hierarchy. Encoding is performed bottom-up and decoding
top-down. We empirically show that HVAE can be trained efficiently with small
corpora of mathematical expressions and can accurately encode expressions into
a smooth low-dimensional latent space. The latter can be efficiently explored
with various optimization methods to address the task of symbolic regression.
Indeed, random search through the latent space of HVAE performs better than
random search through expressions generated by manually crafted probabilistic
grammars for mathematical expressions. Finally, EDHiE system for symbolic
regression, which applies an evolutionary algorithm to the latent space of
HVAE, reconstructs equations from a standard symbolic regression benchmark
better than a state-of-the-art system based on a similar combination of deep
learning and evolutionary algorithms.\v{z} | [
"Sebastian Mežnar",
"Sašo Džeroski",
"Ljupčo Todorovski"
] | 10.1007/s10994-023-06400-2 | [
{
"@title": "doi",
"@href": "http://dx.doi.org/10.1007/s10994-023-06400-2",
"@rel": "related",
"@type": null
},
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09893v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09893v2",
"@rel": "related",
"@type": "application/pdf"
}
] | [
"Mach Learn (2023)"
] | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.AI",
"I.2.0; I.2.6"
] | 3
2
0
2
p
e
S
0
1
]
G
L
.
s
c
[
2
v
3
9
8
9
0
.
2
0
3
2
:
v
i
X
r
a
Efficient Generator of Mathematical
Expressions for Symbolic Regression
Sebastian Mežnar1,2*, Sašo Džeroski1 and Ljupčo Todorovski3,1
1*Department of Knowledge Technologies, Jožef Stefan Institute,
Jamova cesta 39, Ljubljana, 1000, Slovenia.
2Jožef Stefan International Postgraduate School, Jamova cesta 39,
Ljubljana, 1000, Slovenia.
3Faculty of Mathematics and Physics, University of Ljubljana,
Jadranska 21, Ljubljana, 1000, Slovenia.
*Corresponding author(s). E-mail(s): [email protected];
Contributing authors: [email protected];
[email protected];
Abstract
We propose an approach to symbolic regression based on a novel vari-
ational autoencoder for generating hierarchical structures, HVAE. It
combines simple atomic units with shared weights to recursively encode
and decode the individual nodes in the hierarchy. Encoding is performed
bottom-up and decoding top-down. We empirically show that HVAE can
be trained efficiently with small corpora of mathematical expressions
and can accurately encode expressions into a smooth low-dimensional
latent space. The latter can be efficiently explored with various opti-
mization methods to address the task of symbolic regression. Indeed,
random search through the latent space of HVAE performs better than
random search through expressions generated by manually crafted proba-
bilistic grammars for mathematical expressions. Finally, EDHiE system
for symbolic regression, which applies an evolutionary algorithm to the
latent space of HVAE, reconstructs equations from a standard sym-
bolic regression benchmark better than a state-of-the-art system based
on a similar combination of deep learning and evolutionary algorithms.
Keywords: Symbolic regression, Equation discovery, Generative models,
Variational autoencoders, Evolutionary algorithms
1
2
Efficient Generator of Mathematical Expressions for Symbolic Regression
1 Introduction
Symbolic regression (also known as equation discovery) aims at discovering
closed-form equations in collections of measured data [1, 2]. Methods for
symbolic regression explore the vast space of candidate equations to find
those that fit the given data well. They often employ modeling knowledge
from the domain of use to constrain the search space of candidate equations.
The knowledge is usually formalized into grammars [3] or libraries of model
components, such as entities and processes [4]. Knowledge-based equation
discovery methods have successfully solved practical modeling problems in
various domains [5, 6].
Grammars and libraries of model components are used to generate candidate
expressions that might appear in the discovered equations. However, they must
be manually crafted, which is a severe obstacle to their broader use. The central
aim of this article is to develop a novel generative model of mathematical
expressions that can be used for efficient symbolic regression. The model can be
trained from a corpus of mathematical expressions from the domain of interest,
thus automatically tailoring the space of candidate equations to the application
at hand. The developed generative model must have two essential properties
to be applicable in such a scenario. First, it should be trainable from a small
number of mathematical expressions, e.g., collected from a textbook or from
scientific literature in the application domain. Second, the model should encode
the expressions in a low-dimensional latent space. The latter space can then
be efficiently explored by optimization methods to solve the task of symbolic
regression. Lowering the dimensionality of the latent space will significantly
increase the efficiency of symbolic regression.
Recently, several variational autoencoders (VAEs) have been shown to be
efficient generative models. CVAE [7] employs a VAE based on recurrent neural
networks to encode discrete expressions into a continuous latent space and
then decode points from the latent space back into discrete mathematical
expressions. This decoder can be used to generate expressions. However, CVAE
still generates invalid sequences and requires extensive training data to reduce
the likelihood of generating invalid expressions [8]. The grammar variational
autoencoder, GVAE [9], and its successor, SD-VAE [10], employ a context-free
grammar to ensure the syntactic validity of the generated expressions. Instead
of directly training models on sequences, they model the distribution of parse
trees that are produced by the grammar while deriving syntactically (and, in
the case of SD-VAE, semantically) valid expressions.
We claim that grammars are an unnecessarily powerful and too general
formalism for generating mathematical expressions. Grammars add syntactic
categories to the expression symbols rendering the parse trees, i.e., the structures
modeled with the autoencoder, more complex than the original sequences. This
overhead on training expressions inevitably translates to a requirement for more
extensive training data and a latent space with larger dimensionality, reducing
the efficiency of optimization methods for symbolic regression operating in that
latent space.
Efficient Generator of Mathematical Expressions for Symbolic Regression
3
We propose a novel variational autoencoder for hierarchical data objects,
HVAE, to address these issues. It builds upon the ideas of variational autoen-
coders for hierarchical data [11] and gated recursive convolutional neural
networks [12]. HVAE combines simple atomic units with shared weights to
encode and decode the individual nodes in the hierarchy. The atomic units
are extensions of the standard gated recurrent unit (GRU) cells. The encoding
units are stacked into a tree that follows the hierarchy of the training object,
and they encode the hierarchy bottom-up, compiling the codes of the descen-
dants to encode the ancestor nodes. The decoding units proceed top-down
and use the decoded symbols of the ancestor nodes to decide upon the need
to extend the hierarchy with descendant nodes. We claim that HVAE can be
efficiently trained to generate valid mathematical expressions from a training
set of modest size, while using a low-dimensional latent space.
We exploit these expected properties of our HVAE to implement a novel
approach for symbolic regression, EDHiE. It performs an evolutionary search
through the latent space of a HVAE trained on mathematical expression trees
as shown in Figure 1. The genetic operations utilize the HVAE encoder to
obtain the expressions' latent codes, generate new individuals with crossover
and mutation in the latent space, and decode the latter back to mathemati-
cal expressions. EDHiE can then evaluate the fit of the obtained expressions
against the measurements. We conjecture that the performance of EDHiE on
standard benchmarks [13, 14] would compare favorably to that of a state-of-the-
art symbolic regression methods [15]. The results of our empirical evaluation
of HVAE and EDHiE confirm our conjectures. HVAE can achieve better recon-
struction of the training expressions with order-of-magnitude fewer training
examples while using latent spaces with fewer dimensions. EDHiE outperforms
alternative methods for symbolic regression on the task of reconstructing the
ten equations in the Ngyuen benchmark.
We can summarize the contributions of this work as follows:
• We propose HVAE, a variational autoencoder for hierarchical data, that
can be efficiently trained to generate mathematical expressions from modest
amounts of data, while using a low-dimensional latent space.
• We introduce EDHiE, a symbolic regression approach that exploits HVAE
to efficiently search through the space of candidate equations.
The remainder of the paper is organized as follows. Section 2 reviews
related work on generative models and symbolic regression. We introduce
the hierarchical variational autoencoder HVAE and the symbolic regression
approach EDHiE in Section 3. Section 4 presents the results of the empirical
evaluation of HVAE and EDHiE. Finally, Section 5 summarizes and discusses
the contributions of the presented work and outlines directions for further
research.
4
Efficient Generator of Mathematical Expressions for Symbolic Regression
Fig. 1: A schematic representation of the EDHiE approach. In the first step,
we train a HVAE model. In the second step, we explore the latent space of the
HVAE model with an evolutionary algorithm. The red dot represents the best
expression in a given iteration.
2 Related work
Most of the early successful applications of generative models have been in the
domains of text, speech, images, and video, i.e., they have been mainly used for
generating unstructured data objects composed of continuous data elements.
The discrete data structures that generative models have most often tackled are
strings or sequences of characters, where the data elements are discrete symbols.
The models that use strings as input (and output) usually do so by training a
recurrent neural network [16], most commonly using seq2seq autoencoders [17].
A major problem of sequence-to-sequence autoencoders is that they do not
guarantee the syntactic correctness of the generated expressions. One way to
solve this problem is to learn an additional validation model for checking the
correctness of the generated sequence [18]. Grammar variational autoencoders
(GVAE) [9] use context-free grammars for specifying the space of valid struc-
tured data objects. Each data object can be then represented as a sequence of
grammar productions (rewrite rules) that derives it. In turn, GVAE encode
sequences of rewrite rules that derive objects instead of the objects themselves.
The structure of the decoder is constrained to generate valid sequences of
rewrite rules that are then used together with the grammar to generate valid
expressions.
Dai et al. [10] propose the use of attribute grammars, i.e., context-free
grammars that attach attributes to the grammar's syntactic categories. By
Efficient Generator of Mathematical Expressions for Symbolic Regression
5
prescribing properties and relationships between the attributes, such grammars
can also encode semantic constraints on the derived data objects. The attribute
grammars, together with SD-VAE, i.e., syntax-directed VAE, can generate
expressions that are consistent with a set of both syntactic and semantic con-
straints. Alternative generalizations of grammars have been used for generative
modeling of program source code in high-level languages [19].
Most of the above approaches can also generate mathematical expressions.
However, they need the complex formalism of grammars to generate more
complex data structures, most often molecular structures [7, 10]. Since mathe-
matical expressions can be represented as simpler structures, i.e., binary trees,
our work concerns generative models for hierarchical (tree-structured) data.
Hierarchical data have been tackled by generative models in several ways. By
making a node depend on its parent and previous sibling, DRNN [20] combines
representations obtained from the depth-wise and width-wise recurrent cells
to generate new nodes, which proves useful for recovering the structure of a
tree. On the other hand, Tree-LSTM [21] and JT-VAE [11] focus on adapting
equations for recurrent cells to encode (and decode) hierarchical structures
more efficiently. Tree-LSTM proposes a generalization of the LSTM cell for
encoding trees into a representation that proves effective for classification tasks
and semantic relatedness of sentence pairs. JT-VAE adapts recurrent cells for
tree message passing. Trees are used as scaffolding for the graph that represents
molecules. Encoding and decoding are thus split into four parts: encoding of
the graph, encoding of the tree, decoding of the tree, and decoding of the graph.
While these adaptations are similar to the ones presented in our work, their
focus is on encoding more general structures that are unrelated to mathematical
expressions.
Note that our model falls into the general framework of gated recursive
convolutional neural networks [12] that combine atomic units with shared
parameters in a hierarchy. The output of the root node produces a fixed-length
encoding of a data object with an arbitrarily complex structure. Another
model, marginally related to ours, is the one of equivalence neural networks [22].
The encoding produced by these networks follows the expressions' semantic
similarity and equivalence, in contrast to their syntactic similarity, which is
followed by all the other approaches, including ours.
Finally, our work is also related to algorithms for equation discovery and
symbolic regression. Most of them generate candidate expressions for equations
first and then estimate the values of their constant parameters by matching
the equations against data in the second phase. Classical symbolic regression
approaches [1, 23, 24], based on evolutionary algorithms, use stochastic genera-
tors of expression trees: At the beginning, the expression trees are randomly
sampled, and later on, they are transformed using the evolutionary stochastic
operations of mutation and cross-over. In contrast, process-based modeling
approaches [4] generate equations by following domain-specific knowledge (pro-
vided by the user) that specifies a set of entities (variables) and processes
6
Efficient Generator of Mathematical Expressions for Symbolic Regression
(interactions among entities). Grammar-based approaches to equation discov-
ery employ user-specified context-free grammars (which can also be based on
domain knowledge), deterministic [25] or probabilistic [3], as efficient generators
of expressions.
Recently, many symbolic regression approaches based on neural networks
have been proposed [14, 26–30]. In particular, Deep Symbolic Optimization,
DSO approaches symbolic regression (among other optimization tasks [15])
by combining neural networks and reinforcement learning with evolutionary
algorithms. The neural networks are used to sample the individuals in the initial
population of the evolutionary algorithm and are retrained at each iteration to
focus on expressions leading to better fit. It is closely related to our work, since
it combines similar methods. Yet our focus here is on efficient neural networks
for generating mathematical expressions that are trained before the beginning
of the evolutionary process.
3 Methodology
We start this section by briefly introducing the task of symbolic regression
and the search space of mathematical expressions (Section 3.1). After this,
we introduce variational autoencoders and the structure of the hierarchical
variational autoencoder, HVAE (Section 3.2). We finish the section by explaining
how to use HVAE for generating mathematical expressions and how to combine
it with an evolutionary algorithm for symbolic regression (Section 3.3).
3.1 Symbolic regression and expression trees
Symbolic regression (SR) is the machine learning task of discovering equations
in collections of measured data. Symbolic regression methods take a data
set S consisting of multiple measurements of a set of real-valued variables
V = {x1, x2, . . . , xp, y}, where y is a designated target variable. The output
of SR is an equation of the form y = f (x1, x2, . . . , xp), where the right-hand
side of the equation is a closed-form mathematical expression. The equation
should provide an optimal fit against the measurements from S, i.e., minimize
the discrepancy between the observed values of the target variable y and values
calculated by using the equation. Symbolic regression methods usually follow
the parsimony principle, preferring simpler expressions over more complex ones.
Symbolic regression methods search through the space of candidate math-
ematical expressions for the right-hand side of the equation to find the one
that optimally fits the measurements. Mathematical expressions can be repre-
sented in different ways. We commonly use the infix notation, where operators
are placed between two sub-expressions they operate on, e.g., A + B, where
A and B are sub-expressions. Infix notation uses parentheses to indicate the
order in which the operations need to be performed. Prefix (Polish) or post-
fix (reverse Polish) notations do not need parentheses since the operators are
written before or after the two sub-expressions, e.g., +AB or AB+. The three
notations correspond to different traversals of the nodes in an expression tree.
Efficient Generator of Mathematical Expressions for Symbolic Regression
7
The latter is a hierarchical data structure, where the inner nodes correspond
to mathematical operators and functions, while the leaf nodes correspond to
variables and constants.
In symbolic regression, the constants' values are fitted against the measured
data from S, while variables include elements from V without the target
variable. We assume binary expression trees since standard arithmetic operators
are binary. We take that the second descendant node is null in the inner
nodes corresponding to single-argument functions. We define the height of an
expression tree as the number of nodes on the longest path from the root node
to one of the leaves. Figure 2 depicts an example expression tree with a height
of four, along with the corresponding mathematical expression in different
notations.
Fig. 2: An expression tree with a height of four and three sequence-based
representations of the corresponding mathematical expression.
Our model generates expression trees, as they have several advantages over
sequences (strings). Firstly, it is easy to achieve syntactic correctness, since
operators and functions are in the inner nodes, while variables and constants
are in the leafs. Secondly, information needs to travel at most log n steps up the
tree (up to the tree's height) instead of n steps along the sequence (up to the
length of the sequence). Lastly, sub-expressions can be encoded independently
of each other during the encoding process.
3.2 Hierarchical variational autoencoder
In recent years, variational autoencoders [31] have emerged as one of the
most popular generative models. The reason for this is that, when trained
correctly, variational autoencoders map the observed data with an unknown
distribution into a latent representation with a known distribution. This results
in a continuous latent space, from which one can sample and synthesize new
data. In contrast to a (deterministic) autoencoder, where the encoder outputs a
latent representation z that is directly fed into the decoder, the encoder in the
variational autoencoder outputs the parameters for an approximate posterior
distribution, e.g., μ and σ in the case of a latent space parameterized by a
multivariate Gaussian distribution.
Thus, a representation z that is fed into the decoder is sampled from
the underlying distribution with the learned parameters (μ, σ). The loss of
8
Efficient Generator of Mathematical Expressions for Symbolic Regression
(a) Encoding
(b) Decoding
Fig. 3: The processes of (a) encoding and (b) decoding the expression tree of
x + cos x. The acronyms EC and DC stand for "encoding cell" (introduced in
Section 3.2.2) and "decoding cell" (introduced in Section 3.2.3).
the variational autoencoder is the reconstruction error, i.e., the difference
between the input to the encoder and the output of the decoder. Additionally,
variational autoencoders typically use Kullback-Leibler (KL) divergence [32] as
the regularization term for the loss. The loss can thus be calculated as:
J(x, μz, σz) = Jrec(x) + λ * KL(N (μz, σz) ∥ N (0, I)),
(1)
where Jrec(x) is the reconstruction loss of x and λ ≥ 0 the regularization cost
parameter. In case the underlying distribution is Gaussian, KL divergence to
an isotropic unit Gaussian can be estimated as
KL(N (μz, σz) ∥ N (0, I)) =
1
2
(1 + log σ2
z − μ2
z − σ2
z ).
(2)
We use cost annealing [33] to focus on the reconstruction error (i.e., use small
values of λ) at the beginning and then gradually shift the focus towards the
smoothness of the latent space by increasing the value of λ.
3.2.1 Model overview
Our approach uses a variational autoencoder structure that consists of an
encoder and a decoder. The encoder takes tree-structured data as input and
outputs a distribution in the latent vector space, represented with the mean
(μz) and the logarithm of the variance (log σz) vectors. The decoder works
in the opposite direction, sampling a point from the latent vector space as
input and transforming it into a binary expression tree. To make the backward
propagation possible, we sample points with the reparametrization trick.
Trees are encoded recursively, starting from leafs and ending at root nodes.
To encode a subtree with a root in n, we first encode its left and right subtrees.
We then pass their codes, along with the symbol in the node n, as inputs to the
Efficient Generator of Mathematical Expressions for Symbolic Regression
9
encoding cell (further described in Section 3.2.2). This cell outputs the code of
the subtree rooted in n. At the beginning of the recursion, in each leaf node,
the codes corresponding to the (missing) children are assumed to be vectors of
zeros. Once the root of the tree is encoded, its code is passed through two fully
connected layers that give the mean and log-variance vectors that form the
latent representation of the tree. Figure 3a illustrates the recursive encoding
process on the expression x + cos x.
The first layer of the decoder transforms the sampled point from the latent
space into the code of the hierarchy. After this, the tree is generated recursively
by passing the code of the current node (subtree) through the decoding cell
(further described in section 3.2.3). This cell takes the code of the node (subtree)
as input and generates a node symbol, along with the codes of the two child
nodes. There are three possible symbol types. If we encounter an operator,
both child nodes are generated recursively. On the other hand, if the symbol
represents a function, we only generate the left child. Lastly, if the symbol is
either a variable or a constant, no further child nodes are generated in this
branch. This process is shown in Figure 3b, where the expression x + cos x is
decoded.
During training, we follow the structure of the encoded tree and try to predict
the correct node symbols. In turn, we jointly learn to predict the structure
of the expression tree and the symbols inside the node, since the structure
is determined by the symbols. We calculate the loss using cross-entropy on a
sequence of symbols obtained with the in-order traversal of the expression tree.
Some additional implementation details are explained in Appendix D.
3.2.2 Encoder
The encoding proceeds in two phases. The first follows the hierarchy of the
input and applies the encoding cell to each node of the hierarchy as described
above. In the second phase, the code of the root node is transformed into the
mean and log-variance vectors of the input's latent representation.
Encoding comprises a GRU21 cell, which we have adapted from the GRU
cell [34]. The (output) code h in GRU21 is computed from the input vector x,
and codes hl of the left and hr of the right child with the following equations:
r = φS(Wirx + bir + Whr(hl ++ hr) + bhr)
u = φS(Wiux + biu + Whu(hl ++ hr) + bhu)
n = tanh(Winx + bin + r ∗ (Whn(hl ++ hr) + bhn))
h = (1 − u) ∗ n +
u
2
∗ hl +
u
2
∗ hr,
(3)
(4)
(5)
(6)
where φS denotes the Sigmoid activation function. In these expressions, r, u,
and n represent the standard reset gate, update gate and candidate activation
vectors from a GRU cell. When compared to the original equations of the GRU
cell, Equations (3),(4),(5) exhibit two differences. First, instead of the code of
the previous symbol in the sequence, the concatenation of the codes hl and
10
Efficient Generator of Mathematical Expressions for Symbolic Regression
hr of the child nodes is used (denoted by (hl ++ hr)). Second, the dimension
of the weight matrices Whr, Whu, Whn must be dim(hl) + dim(hr) instead of
dim(h). Thus, while Equation (6) remains similar to the original one, we change
the second term (from its usual form u ∗ ht−1) to u
2 ∗ hr, to retain
information from the codes of the two child nodes. Recall that ∗ denotes the
element-wise multiplication of vectors.
2 ∗ hl + u
In the second phase, the model transforms the code of the root node into the
latent representation of the input expression through two fully-connected layers.
3.2.3 Decoder
The decoding also comprises two phases. In the first, a fully-connected layer
transforms a point from the latent vector space into the code of the root node.
In the second phase, the decoding cell is recursively deployed to decode each of
the nodes in the expression tree.
Fig. 4: The structure of the decoding cell.
Figure 4 depicts the structure of the decoding cell. The cell is composed of a
fully connected layer, a softmax layer, and the GRU12 cell, an adaptation of the
original GRU cell. The input code is first passed through the sequence of a fully-
connected and a softmax layer. The latter creates the vector of probabilities,
from which the most probable output symbol is chosen. If the output symbol
is either a constant or a variable, the decoding stops. Otherwise, the output
vector is also used as an input to the GRU12 cell, together with the code that
is given as input into the decoding cell. The GRU12 cell produces two codes,
one for the left and one for the right child.
GRU12 computes the two codes hl and hr for the child nodes using the
input vector x and the code h with the following equations:
r = φS(Wirx + bir + Whrh + bhr)
u = φS(Wiux + biu + Whuh + bhu)
n = tanh(Winx + bin + r ∗ (Whnh + bhn))
d = (1 − u) ∗ n + u ∗ (h ++ h)
(7)
(8)
(9)
(10)
Efficient Generator of Mathematical Expressions for Symbolic Regression
d ≡ hl ++ hr
11
(11)
There are two major differences between GRU12 and the original GRU cell.
First, the vectors r,u, and n in Equations (7),(8),(9) are of dimension 2 * dim(h)
instead of dim(h). Consequently, all bias vectors are of dimension 2 * dim(h),
and all weight matrices have an output dimension of 2 * dim(h). Second, in
Equation (10), the code h is concatenated with itself to make the dimensions
in the equation match. Vector d is then split in half in Equation 11. The first
part is used as a code for the left child, while the second is used as a code for
the right child.
3.3 Generating expressions for symbolic regression
Recall that the goal of symbolic regression is to efficiently search through the
space of mathematical expressions and find the one that, when used on the
right-hand of an equation, fits given measurements well. In this section, we
explain how to use HVAE for generating expressions.
3.3.1 HVAE as a generative model
We can generate expressions in two ways, corresponding to two different sym-
bolic regression scenarios. The first way, which aims at discovering equations
from data, samples random vectors from the standardized Gaussian distribution
N (0, I) in the latent space and passes them through the decoder.
On the other hand, we might want to generate expressions in a scenario
that corresponds to the revision of existing equations to fit newly gathered
data. Here, we want to generate mathematical expressions that are similar to
the one given as input. Our approach achieves this by encoding an expression
and sampling its immediate neighborhood in the latent space. We expect these
points to be decoded into expressions similar to the one given as input. We
will show that HVAE meets this expectation in Section 4.1.4.
3.3.2 Evolutionary algorithm operators
Finally, we can search the latent space spanned by our model with evolution-
ary algorithms [35], one of the most commonly used paradigms for symbolic
regression. Evolutionary algorithms explore the search space by first randomly
sampling individuals for the initial population. Then they repetitively generate
new populations by combining pairs of individuals from the current population
with the genetic operators of mutation and crossover.
An individual in a population is in our case a real-valued vector z, corre-
sponding to the code of an expression tree in the latent vector space. Using
the HVAE model, z can be decoded into an expression tree. To calculate the
individual's fit against the training data, we first fit the values of the constant
parameters in the decoded expression tree and then measure the error of the
equation with the resulting expression on the right-hand side (with respect to
12
Efficient Generator of Mathematical Expressions for Symbolic Regression
the training data). We generate the initial population by randomly sampling
individuals from the Gaussian distribution N (0, I).
Crossover combines two individuals, referred to as parents zA and zB, into
an offspring zO. We generate the latter as a convex combination of zA and zB,
i.e. zO = (1 − a) * zA + a * zB, where a is sampled from the uniform distribution
on the interval [0, 1]. For values of a close to 0 and 1, the offspring is close to
one of the parents, while values of a close to 0.5 lead to an offspring equally
dissimilar to both parents.
The mutation operator transforms an individual z into a mutated individual
zM . To perform a mutation, we first decode z into an expression tree and
immediately encode it back into its latent space representation to obtain the
value of σz. Now, we can mutate z into an individual with a syntactically
similar expression by sampling from N (μz, σz) or into a random individual by
sampling the offspring zO from N (0, I). Similarly to the case of crossover, we
interpolate between these two extremes by sampling from N (a * μz + (1 − a) *
0, a * σz + (1 − a) * I) = N (a * μz, a * σz + (1 − a) * I), where a is randomly sampled
from the uniform distribution on the interval [0, 1]. When a is close to 0, the
offspring zO is chosen at random (see the first paragraph of Section 3.3.1). On
the other hand, when a is close to 1, zO is syntactically similar to z (second
paragraph of Section 3.3.1).
We implement the EDHiE (Equation Discovery with Hierarchical variational
autoEncoders) approach for symbolic regression by combining HVAE with evo-
lutionary algorithms using these operators. Our implementation uses pymoo [36]
for evolutionary algorithms and ProGED [3] functionality for evaluating the fit
of a candidate equation.
4 Evaluation
In this section, we will investigate the validity of our hypothesis that the hier-
archical variational autoencoder is a more efficient generator of mathematical
expressions than the alternative VAEs for sequences by conducting two series
of computational experiments. In the first series, we are going to evaluate the
performance and efficiency of HVAE on the task of generating mathematical
expressions. In the second series, we will evaluate the performance of EDHiE
on the symbolic regression downstream task.
4.1 The performance of HVAE
We start this section by introducing the experimental setup (Section 4.1.1).
We continue with reporting the experimental results of evaluating HVAE with
respect to the reconstruction error (Section 4.1.2), efficiency in terms of the size
of training data needed, the dimensionality of the latent space (Section 4.1.3),
and finally the smoothness of the latent space (Section 4.1.4). In Appendix B,
we further justify our claim that points close in the latent space of HVAE are
decoded into similar expressions.
Efficient Generator of Mathematical Expressions for Symbolic Regression
13
4.1.1 Experimental setup
Data sets. We estimate the reconstruction error of the variational autoencoders
on a collection of six synthetic data sets, ranging from small ones, including
simple expressions, to large ones, including complex expressions. The data sets
are as follows:
AE4-2k, AE5-15k, and AE7-20k have 2, 15, and 20 thousand mathematical
expressions with trees with a maximum height of four, five, and seven. These
expressions can contain constants, variables, and the operators +,−,*,/, and ˆ.
Trig4-2k, Trig5-15k, and Trig7-20k are the same as above, but the expressions
also contain the sine and cosine functions.
We create these data sets with the ProGED [3] system by randomly sampling
mathematical expressions from a given probabilistic context-free grammar. The
generated expressions are simplified using the Python library SymPy [37]. The
context-free grammars that constrain the output of GVAE and the ones used
to generate the data sets are documented in Appendix A.
Parameter setting. We train GVAE and CVAE for 150 epochs with the
following values of their hyper-parameters: latent dimension = 128, hidden
dimension = 128, batch size = 64, kernel sizes of the convolution layers
= 2, 3, 4, and the ADAM optimizer [38]. For reconstruction results created
with our approach (HVAE), the hyper-parameters are: latent size = 128, batch
size = 32, and the ADAM optimizer with the default learning rate. For the
first 1,800 iterations i, we calculate the regularization cost parameter λ using
λi = 0.5 * (tanh i−4,500
2 + 1), after this, we set λi to λ1,800.
Estimating the reconstruction error. The Levenshtein distance [39] (often
referred to as the edit distance) quantifies the dissimilarity of two strings in
terms of the number of insertion, removal, and substitution operations that
are needed to transform one string into the other. We use this distance to test
how well our autoencoder recreates expressions.
We first pass the expression through the VAE to get the predicted expression.
If needed, we validate the syntactical correctness of the latter and transform
it into an expression tree. We then traverse the input and the output trees in
post-order (left child, right child, node symbol) to obtain the input and the
output expressions in the postfix notation (which does not require parentheses
and is hence more suited for calculating the distance between expressions).
Finally, we calculate the edit distance between those two strings.
To estimate the reconstruction error on unseen expressions, we use five-fold
cross-validation with the same splits across all methods. GVAE and CVAE
sometimes produce invalid expressions, which we discard from the evaluation.
Because of this, the results in Section 4.1.2 and 4.1.3 might be biased in favor
of CVAE due to many syntactically incorrect expressions being discarded.
Note that GVAE has fixed-size input (and output) that might be too short
for encoding all the grammar rules needed to derive an expression. In those
cases, GVAE returns empty strings, which we consider invalid expressions.
14
Efficient Generator of Mathematical Expressions for Symbolic Regression
CVAE, on the other hand, produces syntactically incorrect expressions such
as xc(/x)c) sin sin(c)), * * x − c * / sin(x)), or (/x(−x)c) (presented here in infix
notation).
4.1.2 Out-of-sample reconstruction error
Table 1 compares the out-of-sample reconstruction error and the ratio of
invalid expressions for the three variational autoencoders. Our hierarchical VAE
significantly outperforms the other two methods on all data sets. An interesting
observation is that GVAE works consistently better on expressions involving
trigonometric functions, while HVAE and CVAE perform worse. The reason for
the opposite effect is probably the following: for GVAE, functions only represent
yet another production rule in the grammar, while for HVAE and CVAE
they drastically change the structure of the expression (tree). This translates
to better performance of GVAE, as expressions with trigonometric functions
are usually shorter, given that the nodes corresponding to the trigonometric
functions have only one descendant instead of the usual two.
Table 1: The out-of-sample reconstruction error and the percentages of syntac-
tically incorrect expressions generated by the three variational autoencoders.
HVAE
GVAE
CVAE
Dataset
Edit distance
Invalid
Edit distance
Invalid
Edit distance
Invalid
AE4-2k
Trig4-2k
AE5-15k
Trig5-15k
AE7-20k
Trig7-20k
0.076 (± 0.024)
0.119 (± 0.026)
0.079 (± 0.014)
0.093 (± 0.010)
0.501 (± 0.017)
0.530 (± 0.036)
0.0 (± 0.0)
0.0 (± 0.0)
0.0 (± 0.0)
0.0 (± 0.0)
0.0 (± 0.0)
0.0 (± 0.0)
0.2 (± 0.0)
3.959 (± 0.135)
3.199 (± 0.068)
0.0 (± 0.0)
2.827 (± 0.280) < 0.1 (± 0.0)
1.489 (± 0.195) < 0.1 (± 0.0)
5.201 (± 0.289) < 0.1 (± 0.0)
3.423 (± 0.467) < 0.1 (± 0.0)
3.873 (± 0.132)
3.619 (± 0.045)
1.547 (± 0.466)
2.086 (± 0.346)
3.654 (± 0.349)
3.660 (± 0.287)
33.8 (± 1.1)
48.3 (± 0.6)
3.5 (± 0.0)
13.9 (± 0.0)
9.9 (± 0.0)
26.3 (± 0.1)
The percentages of invalid expressions generated by the approaches show
that our approach always produces syntactically correct expressions, while
GVAE and CVAE sometimes fail to produce valid outputs. The fraction of
such expressions is quite small when the GVAE approach is used (see the
explanation above) but quite significant when CVAE is used. Lastly, we can
notice that, as expected, longer expressions are harder to recreate and thus
have higher edit distance and a higher percentage of invalid expressions than
shorter ones, provided enough training data is used.
4.1.3 Training efficiency and the latent space dimensionality
We proceed to test our conjectures about the efficiency of training the generators
of mathematical expressions. We expect that HVAE would require less training
data and a lower dimensionality of the latent space to achieve the same levels of
reconstruction error in comparison to other approaches. The latter is especially
important because of the exploration of the latent space, which is more efficient
in low-dimensional latent spaces.
Efficient Generator of Mathematical Expressions for Symbolic Regression
15
(a) Size of the training set
(b) Dimensionality of the latent space
Fig. 5: The impact of the (a) training data set size and (b) dimensionality of
the latent space on the reconstruction error of the three autoencoders.
Figure 5a depicts the impact of the number of expressions in the training
set on the reconstruction error for the three different generative models. Again,
HVAE significantly outperforms the other two VAEs. Its reconstruction error is
estimated to be consistently lower than 0.25, even when trained on 2 thousand
examples only. This error is an order of magnitude lower than the lowest error
of 1.5 achieved by the second best model, GVAE, when trained on the whole
data set of 12 thousand examples.
Figure 5b shows the impact of the dimensionality of the latent space on the
reconstruction error across different VAEs. In line with the previous results,
HVAE significantly outperforms both CVAE and GVAE. HVAE with latent
space of dimension 16 performs on par or better than GVAE and CVAE with
latent spaces of 256 dimensions. We can see that the reconstruction error
quickly raises when the latent space dimension is less than 32, but otherwise,
the reconstruction error is consistently low. Even with a latent space size of 16,
our approach is still comparable to the other two methods with a latent space
of dimension 256. This allows us to reduce the dimensionality of the latent
space by two orders of magnitude, which makes HVAE an excellent candidate
for generating expressions for symbolic regression.
The reason for the superior efficiency of HVAE is the use of expression
trees, as subexpressions are always encoded into the same code, regardless of
their position in the expression. This significantly reduces the space of possible
codes and allows for training the model in a way that better generalizes to the
repetitive subexpressions (subpatterns) it encounters.
4.1.4 Latent space smoothness
Finally, we expect the latent space of HVAE to be smooth in the sense that
samples close to the latent representation of the input expression are decoded
into expressions similar to the one given as input. We investigate the validity
of this conjecture by applying linear interpolation (performing a homotopic
16
Efficient Generator of Mathematical Expressions for Symbolic Regression
transformation) between two expressions in the latent space. Assume that
we are given two expressions, A and B. Using the model, we encode them
into their latent representations zA and zB. We can then generate new latent
representations zα by combining the two representations with the formula
zα = (1 − α) * zA + α * zB, where α ∈ {i/n : i ∈ N ∧ i ≤ n}. Decoding the
latent representations zα in a smooth latent space should produce intermediate
expressions that represent a smooth transition from A to B in n steps.
Table 2: Examples of linear interpolation between two expressions in the latent
spaces of the three VAEs. Expressions that are colored red are syntactically
incorrect. Here, we set n = 4 and α = i/4, 0 ≤ i ≤ 4.
α
HVAE
GVAE
CVAE
Expression A c * cos c + c
α = 0
α = 0.25
α = 0.5
α = 0.75
α = 1
Expression B
Expression A
α = 0
α = 0.25
α = 0.5
α = 0.75
α = 1
Expression B
sin x
x + x
x + x
sin x
x + x
c * x + c
c * sin c + c
c*sin c
c + x
sin(x−sin c)
x
sin(x−c)
x
sin(x−c)
x
sin c
sin c
c * cos c + c
c * cos c + c
c + c
x + x
x + x
cos c + c * x
ccos c * x
x − x
c + x
x + c * c
sin(x−c)
x
sin(x−c)
x
x − sin(c * x)
x − sin(c * x)
x * sin c − sin(c * x)
c * sin x + x
c * cos x
c + c
c * x * cos x
c * x * cos x
c + c
c + c
x − sin(c * x)
x
sin(c*x)
x
sin(c*x)
c + cos c
c * x * cos( x
c )
c
c * x * cos( x
c ) + c
c * x * cos( x
c ) + c
c * cos c + c
c * cos c + x
cos c + c − x
c − cos c − x
x + x
sin c
xx * sin x
c * sin x
x * sin c
c
cos(x(c) − c*
sin(x−c)
x
sin(x−c)
x
x − sin(c * x)
x − sin(c * x)
x − cos(c * x)
c
cos − cos *c) − c
c * x * cos( c
x )
c
c * x * cos( x
c ) + c
c * x * cos( x
c ) + c
Table 2 shows the results of such a linear interpolation in the latent spaces of
the different VAEs. HVAE and GVAE produce continuous latent spaces where
the transition from expression A to expression B is indeed smooth. CVAE
also produces a smooth transition, but some of the intermediate expressions
might be syntactically incorrect. The second interpolation in the lower part
of the table is an example of a smooth transition in the HVAE latent space.
We can see that at each step only a few expression symbols change and that
these changes are rarely redundant. Appendix B provides further examples of
interpolations with visualizations of the expression trees.
4.2 Evaluating EDHiE
In the second series of experiments, we evaluate the performance of EDHiE.
We start the section by introducing the experimental setup (Section 4.2.1). We
then report on the impact of the dimensionality of the latent space on the
performance of symbolic regression (Section 4.2.2). Furthermore, we compare
the performance of EDHiE with that of other methods for symbolic regression
on the Nguyen benchmark (Section 4.2.3) and report the performance of EDHiE
on the Feynman benchmark (Section 4.2.4).
Efficient Generator of Mathematical Expressions for Symbolic Regression
17
4.2.1 Experimental setup
Data sets. The Nguyen [13] benchmark contains eight equations with one non-
target variable and two equations with two non-target variables. The right-hand
sides of these equations are shown in the second column of Table 3. We generate
two data sets (train and test) with five thousand simulated measurements for
each equation. We use the train set to select the best expressions and the
test set to evaluate their performance with the metrics described below. We
sample points from the interval [−20, 20] for equations 1-6, the interval [0, 40]
for equation 7, [0, 80] for equation 8, and [0, 20] for equations 9 and 10.
We further evaluate our approach on the 16 equations involving up to two
variables from the Feynman benchmark [14]. The right-hand sides of these
equations are shown on in the last column of Table 3. Because equations in
the Feynman benchmark represent real-world equations, each of the equations
FM-3, FM-4, FM-5, and FM-7 contains two entries. Each entry comes with its
own variables and data sets of measurements.
Table 3: Expressions from the Nguyen (first two columns on the left-hand
side) and Feynman (last three columns on the right-hand side) benchmarks.
ID
NG-1
NG-2
NG-3
NG-4
NG-5
NG-6
NG-7
NG-8
NG-9
NG-10
Expression
ID
ID-Feynman
Expression
x3 + x2 + x
FM-1
I.6.2a
x4 + x3 + x2 + x
x5 + x4 + x3 + x2 + x
x6 + x5 + x4 + x3 + x2 + x
sin x2 * cos x − 1
sin x + sin(x + x2)
ln(x + 1) + ln(x2 + 1)
x
sin x + sin y2
2 sin x * cos y
√
√
(
FM-2
FM-3
FM-4
FM-5
FM-6
FM-7
FM-8
FM-9
I.6.2
I.12.1, I.12.5
I.14.4, II.8.31
I.25.13, I.29.4
I.26.2
I.34.27, III.12.43
I.39.1
II.3.24
FM-10
FM-11
FM-12
II.11.28
II.27.18
II.38.14
2
2
(2π)−0.5e− x2
2π * y)−1e− (x/y)2
xy
0.5 xy2
x/y
arcsin(x sin y)
(2π)−1xy
1.5 xy
x
4πy2
1+xy
1−(0.3 xy)
xy2
x
2*(1+y)
Evaluation process. We compare the performance of EDHiE on the Nguyen
benchmark equations to the performance of three other symbolic regression sys-
tems. ProGED [3] uses probabilistic grammars as generators of mathematical
expressions. DSO [30] combines deep neural networks with evolutionary algo-
rithms. PySR [24] employs evolutionary optimization with operators directly
applied to the expression trees. We run each system ten times on each equation
and evaluate at most 100,000 sampled expressions. All approaches use the same
library of tokens and/or grammars, further described in Appendix A. When
running PySR, we allow fitting the values of the constant parameters since it
can not be turned off in the implementation. The dimensionality of the latent
space of HVAE is set to 32; the ADAM optimizer uses the default learning
rate. We elaborate on the setting of the dimensionality of the latent space in
the next section. Appendix C gives the complete report on the experiments in
latent spaces with varying dimensions.
18
Efficient Generator of Mathematical Expressions for Symbolic Regression
Estimating the performance. We use three metrics: the number of successful
reconstructions, i.e., runs leading to an equation equivalent to the original one;
the mean R2 of the best equation; and the number of expressions sampled to
achieve reconstruction. We consider a run successful if we find an expression
where the RMSE between the target and predicted values is lower than 10−10. To
guarantee accurate reporting, we manually check if the original and expression
with the lowest RMSE are equivalent. In each run, we use the expression with
the lowest RMSE to calculate the bounded R2 metric on the test set using the
formula
R2(ˆy, y) = max
0, 1 −
(cid:18)
(cid:19)
(cid:80)
(cid:80)
i(yi − ˆyi)2
i(yi − y)2
,
(12)
where ˆyi denotes the predicted value of the target variable (calculated by using
the equation), yi is the measured value of the target variable, and y is the
mean value of y in the training data set. Lastly, we show the average number
(across the ten runs) of unique expressions considered before reconstructing
the original equation. To this end, we count the unique expressions that the
symbolic regression system has considered before the reconstructed equation is
encountered in the generation process for all the methods that report this.
4.2.2 The impact of the dimensionality of the latent space
Let us start with a series of computational experiments exploring the latent
space for encoding mathematical expressions with random sampling. Here,
we perform symbolic regression by taking randomly sampled points in the
latent space and decoding them into expressions that are then evaluated on
the measurements/data. The expression that fits the data best is selected as
the candidate for the discovered equation.
Table 4 shows the number of successful runs of the random sampling
approaches based on the three VAEs, CVAE, GVAE, and HVAE. In the further
discussion of results, we use the name HVAR for HVAE with random sampling.
We can see here a typical example of the curse of dimensionality at work. When
the symbolic regression algorithm explores high-dimensional latent spaces, it
can easily slip into parts of those spaces that do not lead to optimal equations.
Table 4: The performance of symbolic regression (number of successful recon-
structions) by randomly sampling with CVAE, GVAE, and HVAE on the
Nguyen benchmark.
Equation\Approach CVAE
Latent space size
32
64
GVAE
32
64
128
HVAR
32
64
128
128
NG-1
NG-2
NG-3
NG-4
NG-5
NG-6
NG-7
NG-8
Total/Mean
4
0
0
0
0
0
0
10
14
2
0
0
0
0
0
0
10
12
2
0
0
0
0
0
0
3
5
10
2
0
0
0
2
0
10
24
9
4
0
1
0
0
0
10
24
10
3
0
0
0
0
0
10
23
10
10
0
0
0
4
0
10
34
10
5
0
0
0
4
0
10
29
10
9
1
0
0
0
0
10
30
Efficient Generator of Mathematical Expressions for Symbolic Regression
19
Table 5: Comparison of the performance of symbolic regression (number of
successful reconstructions, R2, and number of evaluated equations) with random
sampling on the Nguyen benchmark. We compare sampling from a manually-
crafted probabilistic grammar (ProGED) with sampling using a trained HVAE
(HVAR).
Name
NG-1
NG-2
NG-3
NG-4
NG-5
NG-6
NG-7
NG-8
NG-9
NG-10
Total/Mean
ProGED [3]
Successful
Average R2
Evaluated
HVAR (Ours)
Successful
Average R2
Evaluated
10
2
0
0
0
0
0
10
1
0
23
1.00 (± 0.00)
1.00 (± 0.01)
1.00 (± 0.01)
1.00 (± 0.01)
0.01 (± 0.01)
0.60 (± 0.11)
0.99 (± 0.01)
1.00 (± 0.00)
0.56 (± 0.14)
0.65 (± 0.11)
0.78 (± 0.31)
2374 (± 1451)
7680 (± 670)
NA
NA
NA
NA
NA
319 (± 287)
12602 (± 0)
NA
10
10
0
0
0
4
0
10
5
0
39
1.00 (± 0.00)
1.00 (± 0.00)
1.00 (± 0.01)
1.00 (± 0.01)
0.00 (± 0.00)
0.81 (± 0.20)
0.99 (± 0.01)
1.00 (± 0.00)
0.83 (± 0.21)
0.55 (± 0.08)
0.81 (± 0.31)
901 (± 1332)
9729 (± 5337)
NA
NA
NA
37619 (± 2773)
NA
392 (± 456)
23236 (± 11844)
NA
This shows that the ability of HVAE to encode mathematical expressions in low-
dimensional latent spaces is crucial for the performance of symbolic regression
with HVAR.
Based on the results of the experiments in Table 4 and Appendix C, in the
remainder of this section, we use 32-dimensional latent space for EDHiE.
4.2.3 Comparison on the Nguyen equations
In the next series of experiments, we compare the performance of HVAR, the
random sampling method using HVAE, to the one of ProGED-the latter
samples mathematical expressions using manually crafted probabilistic grammar.
Table 5 reports the results of the comparison. The results show that the
generator used within HVAE is not worse than the probabilistic grammar. To
our surprise, HVAR outperforms ProGED significantly. First, it successfully
reconstructs five (of the ten) equations from the Nguyen benchmark in ten runs,
one more than ProGED. Second, for the three equations of NG-2, NG-6, and
NG-9, the reconstruction is achieved faster, i.e., by evaluating fewer candidate
expressions.
Furthermore, we check the contribution of the evolutionary approach in
EDHiE over the random sampling method HVAR. To this end, we compare the
last three columns of Table 5 with the last three columns of Table 6. EDHiE
successfully reconstructs all ten equations from the Nguyen benchmarks in at
least one of the ten runs. In three cases, the equations are reconstructed in
every run. Note also that the successful reconstructions with EDHiE require
fewer evaluations of candidate equations than the random sampling approaches.
Table 6 compares EDHiE with PySR, which uses evolutionary operators on
expression trees directly (i.e., without embedding them into a latent space),
and DSO, that similarly to our approach, combines deep learning with evo-
lutionary optimization. Overall, EDHiE performs better than the other two
methods across all metrics1: it achieves the highest total number of successful
1PySR does not report the number of evaluated equation. Hence, we could not include them in
Table 6.
20
Efficient Generator of Mathematical Expressions for Symbolic Regression
Table 6: Comparison of the performance of the symbolic regression systems
EDHiE, DSO, and PySR on the Nguyen benchmark.
Name
NG-1
NG-2
NG-3
NG-4
NG-5
NG-6
NG-7
NG-8
NG-9
NG-10
Total/Mean
EDHiE (our)
Successful
Mean R2
Evaluated
DSO [30]
Successful
Mean R2
Evaluated
PySR [24]
Successful
Mean R2
10
10
6
3
3
8
8
10
8
1
66
1.00 (± 0.00)
1.00 (± 0.00)
1.00 (± 0.01)
1.00 (± 0.01)
0.32 (± 0.45)
0.88 (± 0.14)
1.00 (± 0.01)
1.00 (± 0.00)
0.95 (± 0.15)
0.70 (± 0.17)
0.89 (± 0.21)
573 (± 261)
5803 (± 4148)
20931 (± 4858)
21346 (± 4479)
20615 (± 8394)
12772 (± 7923)
19203 (± 3595)
405 (± 174)
7041 (± 3933)
31863 (± 6970)
10
10
10
8
0
1
10
10
2
0
61
1.00 (± 0.00)
1.00 (± 0.00)
1.00 (± 0.00)
1.00 (± 0.01)
0.00 (± 0.00)
0.59 (± 0.15)
1.00 (± 0.00)
1.00 (± 0.00)
0.60 (± 0.20)
0.56 (± 0.10)
0.78 (± 0.31)
4565 (± 327)
12206 (± 9186)
8053 (± 3766)
32946 (± 15613)
NA
49599 (± 0)
22579 (± 10264)
5521 (± 1779)
39786 (± 28197)
NA
10
10
2
0
0
4
7
10
10
1
54
1.00 (± 0.00)
1.00 (± 0.00)
1.00 (± 0.01)
0.99 (± 0.01)
0.16 (± 0.15)
0.86 (± 0.13)
0.99 (± 0.01)
1.00 (± 0.00)
1.00 (± 0.00)
0.80 (± 0.16)
0.88 (± 0.26)
reconstructions. EDHiE has more successful reconstructions for five equations
than PySR and less for a single equation, NG-9. The superior performance
of EDHiE relative to PySR indicates that evolutionary optimization is more
efficient in the latent space than in the space of expression trees. For four
equations, EDHiE achieves successful reconstruction more often than DSO.
In the two instances of reconstructing NG-3 and NG-4, DSO achieves success
twice as often as our method.
Finally, note that the experiments on the Nguyen benchmark were performed
on noise-free synthetic data. The results of the experiments on synthetic data
with added noise, reported in Appendix C.3, show that EDHiE is robust to
noise: The increasing noise level has little effect on the reconstruction success
rate while significantly increasing the rank of the successfully reconstructed
equation in the list of evaluated equations, sorted with respect to increasing
RMSE. Appendix C also includes additional results on the Nguyen benchmark
by random sampling of CVAE, GVAE, and HVAE latent space with varying
number of dimensions.
Table 7: Results of EDHiE on the 16 equations from the Feynman database
that include at most two non-target variables.
Name
FM-1
FM-2
FM-3.1
FM-3.2
FM-4.1
FM-4.2
FM-5.1
FM-5.2
FM-6
FM-7.1
FM-7.2
FM-8
FM-9
FM-10
FM-11
FM-12
Successful
Mean R2
Evaluated
10
0
10
10
10
10
10
10
0
10
10
10
10
5
10
10
1.00 (± 0.00)
0.98 (± 0.01)
1.00 (± 0.00)
1.00 (± 0.00)
1.00 (± 0.00)
1.00 (± 0.00)
1.00 (± 0.00)
1.00 (± 0.00)
0.99 (± 0.01)
1.00 (± 0.00)
1.00 (± 0.00)
1.00 (± 0.00)
1.00 (± 0.00)
0.99 (± 0.01)
1.00 (± 0.00)
1.00 (± 0.00)
4311 (± 1914)
NA
38 (± 37)
53 (± 28)
184 (± 123)
188 (± 204)
63 (± 44)
101 (± 109)
NA
43 (± 36)
39 (± 39)
62 (± 45)
950 (± 72)
22668 (± 21676)
62 (± 42)
924 (± 795)
Total/Mean
135
1.00 (± 0.01)
Efficient Generator of Mathematical Expressions for Symbolic Regression
21
4.2.4 Results on the Feynman equations
In this section, we evaluate the ability of EDHiE to reconstruct real equations
from the domain of physics included in the Feynman database. Table 7 presents
the results of symbolic regression on a subset of 16 equations from the database
with up to two non-target variables. EDHiE successfully reconstructs 13
equations in all the runs. Most of these equations are simple; thus, EDHiE
explores small search spaces comprising less than two hundred evaluated expres-
sions. A more complex equation FM-10 is reconstructed in five out of ten runs
exploring more than 20 thousand expressions on average. The equation FM-6
could not be reconstructed in any of the runs since it includes the function
arcsin that has not been included in our token library. Finally, EDHiE fails to
reconstruct the most complex equation FM-2.
5 Discussion and conclusion
We introduce a novel variational autoencoder for hierarchies, HVAE, that can
be efficiently trained to generate valid mathematical expressions represented as
expression trees. Compared to generators based on variational autoencoders
for sequences, HVAE has three significant advantages. First, it consistently
generates valid expressions. Second, its performance is robust even for small
training sets: HVAE trained from only two thousand expressions achieves much
lower reconstruction error than sequential VAEs trained from 12 thousand
examples. Third, the HVAE operating in 32-dimensional latent space has a
lower reconstruction error than sequential VAEs with comparable latent spaces.
The ability of HVAE to encode mathematical expressions in a low-
dimensional latent space makes it an excellent proxy for exploring the search
space of candidate expressions in symbolic regression. Indeed, when performing
a random search through the latent space, we achieve comparable performance
with a random search through the space of candidate expressions defined by
a manually crafted probabilistic grammar. EDHiE, a symbolic regression sys-
tem that performs evolutionary optimization in the latent space of the HVAE,
significantly outperforms methods based on random search and achieves per-
formance comparable to the state-of-the-art symbolic regression system DSO
based on a similar combination of evolutionary algorithms and deep learning.
The comparison of EDHiE with PySR, a genetic programming approach oper-
ating on expression trees directly, shows the benefit of performing evolutionary
optimization in the latent space.
HVAE has been used here for symbolic regression, but its potential to
efficiently generate and encode hierarchies makes it useful in many different
contexts, e.g., generating molecular structures or more general symbolic expres-
sions. Analysis of its performance in these application domains is a promising
direction for further research. Moreover, the ability of HVAE to learn from
small corpora of expressions might prove helpful in retraining the generator
after each generation of the evolutionary search, much like the iterative learning
in DSO. This will narrow its focus to generating better expressions, leading
22
Efficient Generator of Mathematical Expressions for Symbolic Regression
to more accurate equations. In general, training the generator on expressions
involved in mathematical models that have proved useful in a domain of inter-
est will enable seamless integration and transfer of background knowledge in
symbolic regression.
Code availability. The implementation of HVAE and EDHiE and the scripts
needed for performing their evaluation, presented in this article, can be found
at https://github.com/smeznar/HVAE.
Acknowledgments. The authors acknowledge the financial support of the
Slovenian Research Agency via the research core funding No. P2-0103, project
No. N2-0128, and by the ARRS Grant for young researchers (first author). The
authors especially appreciate the helpful comments and suggestions by Nikola
Simidjievski and the fruitful discussions within the SHED discussion group
(with Jure Brence, Boštjan Gec, and Nina Omejc).
Declarations
• Funding: The authors acknowledge the financial support of the Slovenian
Research Agency via the research core funding No. P2-0103, project No. N2-
0128, and by the ARRS Grant for young researchers (first author).
• Conflict of interest/Competing interests: Not applicable
• Ethics approval: Not applicable
• Consent to participate: Not applicable
• Consent for publication: Not applicable
• Availability of data and materials: All data used in this work is available in
repositories https://github.com/smeznar/HVAE.
• Code availability: The code used in experiments is available in repositories
https://github.com/smeznar/HVAE.
• Authors' contributions: Conceptualization: Sebastian Mežnar, Ljupčo Todor-
ovski; Methodology: Sebastian Mežnar, Ljupčo Todorovski; Writing - original
draft preparation: Sebastian Mežnar, Ljupčo Todorovski; Writing - review
and editing: Sebastian Mežnar, Ljupčo Todorovski, Sašo Džeroski; Funding
acquisition: Sašo Džeroski; Resources: Sašo Džeroski; Supervision: Ljupčo
Todorovski, Sašo Džeroski; Software: Sebastian Mežnar; Visualization: Sebas-
tian Mežnar; Data curation: Sebastian Mežnar; Investigation: Sebastian
Mežnar; Validation: Sebastian Mežnar.
References
[1] Schmidt, M., Lipson, H.: Distilling free-form natural laws from experi-
mental data. Science 324(5923), 81–85 (2009). https://doi.org/10.1126/
science.1165893
[2] Todorovski, L.: Equation discovery. In: Encyclopedia of Machine Learning
and Data Mining, pp. 410–414. Springer, ??? (2017). Chap. 5. https:
//doi.org/10.1007/978-1-4899-7687-1_258
Efficient Generator of Mathematical Expressions for Symbolic Regression
23
[3] Brence, J., Todorovski, L., Džeroski, S.: Probabilistic grammars for
equation discovery. Knowledge-Based Systems 224, 107077 (2021). https:
//doi.org/10.1016/j.knosys.2021.107077
[4] Bridewell, W., Langley, P., Todorovski, L., Džeroski, S.: Inductive process
modeling. Machine Learning 71(1), 1–32 (2008). https://doi.org/10.1007/
s10994-007-5042-6
[5] Radinja, M., Škerjanec, M., Šraj, M., Džeroski, S., Todorovski, L.,
Atanasova, N.: Automated modelling of urban runoff based on domain
knowledge and equation discovery. Journal of Hydrology 603, 127077
(2021). https://doi.org/10.1016/j.jhydrol.2021.127077
[6] Simidjievski, N., Todorovski, L., Kocijan, J., Dzeroski, S.: Equation dis-
covery for nonlinear system identification. IEEE Access 8, 29930–29943
(2020). https://doi.org/10.1109/access.2020.2972076
[7] Gómez-Bombarelli, R., Wei, J.N., Duvenaud, D., Hernández-Lobato, J.M.,
Sánchez-Lengeling, B., Sheberla, D., Aguilera-Iparraguirre, J., Hirzel, T.D.,
Adams, R.P., Aspuru-Guzik, A.: Automatic chemical design using a data-
driven continuous representation of molecules. ACS Central Science 4(2),
268–276 (2018). https://doi.org/10.1021/acscentsci.7b00572
[8] Kusner, M.J., Hernández-Lobato, J.M.: GANS for Sequences of Discrete
Elements with the Gumbel-softmax Distribution. arXiv (2016). https:
//doi.org/10.48550/ARXIV.1611.04051
[9] Kusner, M.J., Paige, B., Hernández-Lobato, J.M.: Grammar variational
autoencoder. In: Proceedings of the 34th International Conference on
Machine Learning - Volume 70. ICML'17, pp. 1945–1954. JMLR.org, ???
(2017). https://doi.org/10.48550/ARXIV.1703.01925
[10] Dai, H., Tian, Y., Dai, B., Skiena, S., Song, L.: Syntax-Directed Variational
Autoencoder for Structured Data (2018)
[11] Jin, W., Barzilay, R., Jaakkola, T.: Junction tree variational autoencoder
for molecular graph generation. In: Artificial Intelligence in Drug Discovery,
pp. 228–249. The Royal Society of Chemistry, ??? (2021). https://doi.org/
10.1039/9781788016841-00228
[12] Cho, K., van Merrienboer, B., Bahdanau, D., Bengio, Y.: On the properties
of neural machine translation: Encoder-decoder approaches. arXiv, ???
(2014). https://doi.org/10.48550/ARXIV.1409.1259
[13] Uy, N.Q., Hoai, N.X., O'Neill, M., McKay, R.I., Galván-López, E.:
Semantically-based crossover in genetic programming: application to real-
valued symbolic regression. Genetic Programming and Evolvable Machines
24
Efficient Generator of Mathematical Expressions for Symbolic Regression
12(2), 91–119 (2011)
[14] Udrescu, S.-M., Tegmark, M.: AI Feynman: A physics-inspired method for
symbolic regression. Science Advances 6(16), 2631 (2020)
[15] Mundhenk, T.N., Landajuela, M., Glatt, R., Santiago, C.P., Faissol, D.M.,
Petersen, B.K.: Symbolic Regression via Neural-Guided Genetic Program-
ming Population Seeding. arXiv (2021). https://doi.org/10.48550/ARXIV.
2111.00053
[16] Sherstinsky, A.: Fundamentals of Recurrent Neural Network (RNN)
and Long Short-Term Memory (LSTM) network. Physica D: Nonlinear
Phenomena 404, 132306 (2020). https://doi.org/10.1016/j.physd.2019.
132306
[17] Sutskever, I., Vinyals, O., Le, Q.V.: Sequence to sequence learning with
neural networks. In: Proceedings of the 27th International Conference
on Neural Information Processing Systems - Volume 2. NIPS'14, pp.
3104–3112. MIT Press, Cambridge, MA, USA (2014)
[18] Janz, D., van der Westhuizen, J., Paige, B., Kusner, M.J., Hernández-
Lobato, J.M.: Learning a generative model for validity in complex
discrete structures. In: The Sixth International Conference on Learning
Representations (2017). https://doi.org/10.48550/ARXIV.1712.01664
[19] Bielik, P., Raychev, V., Vechev, M.: PHOG: Probabilistic model for code.
In: Balcan, M.F., Weinberger, K.Q. (eds.) Proceedings of The Thirty-Third
International Conference on Machine Learning. Proceedings of Machine
Learning Research, vol. 48, pp. 2933–2942. New York, New York, USA
(2016)
[20] Alvarez-Melis, D., Jaakkola, T.: Tree-structured decoding with doubly-
recurrent neural networks. In: ICLR (2017)
[21] Tai, K.S., Socher, R., Manning, C.D.: Improved semantic representations
from tree-structured long short-term memory networks. In: Proceedings of
the 53rd Annual Meeting of the Association for Computational Linguistics
and the 7th International Joint Conference on Natural Language Processing
(Volume 1: Long Papers), pp. 1556–1566. Association for Computational
Linguistics, Beijing, China (2015). https://doi.org/10.3115/v1/P15-1150
[22] Allamanis, M., Chanthirasegaran, P., Kohli, P., Sutton, C.: Learning con-
tinuous semantic representations of symbolic expressions. In: Proceedings
of the 34th International Conference on Machine Learning - Volume 70,
pp. 80–88. JMLR.org, ??? (2017)
[23] Guimerà, R., Reichardt, I., Aguilar-Mogas, A., Massucci, F.A., Miranda,
Efficient Generator of Mathematical Expressions for Symbolic Regression
25
M., Pallarès, J., Sales-Pardo, M.: A Bayesian machine scientist to aid in
the solution of challenging scientific problems. Science Advances 6(5), 6971
(2020). https://doi.org/10.1126/sciadv.aav6971
[24] Cranmer, M.: Interpretable Machine Learning for Science with PySR and
SymbolicRegression.jl (2023)
[25] Todorovski, L., Dzeroski, S.: Declarative bias in equation discovery. In: Pro-
ceedings of the Fourteenth International Conference on Machine Learning.
ICML '97, pp. 376–384. Morgan Kaufmann Publishers Inc., San Francisco,
CA, USA (1997)
[26] Martius, G., Lampert, C.H.: Extrapolation and learning equations (2016)
[27] Biggio, L., Bendinelli, T., Neitz, A., Lucchi, A., Parascandolo, G.: Neural
Symbolic Regression that Scales. In: Proceedings of 38th International
Conference on Machine Learning (ICML). Proceedings of Machine Learning
Research, vol. 139, pp. 936–945. PMLR, ??? (2021). https://proceedings.
mlr.press/v139/biggio21a.html
[28] d'Ascoli, S., Kamienny, P.-A., Lample, G., Charton, F.: Deep symbolic
regression for recurrent sequences. arXiv preprint arXiv:2201.04600 (2022)
[29] Kamienny, P.-A., d'Ascoli, S., Lample, G., Charton, F.: End-to-end sym-
bolic regression with transformers. arXiv (2022). https://doi.org/10.48550/
ARXIV.2204.10532
[30] Petersen, B.K., Landajuela, M., Mundhenk, T.N., Santiago, C.P., Kim,
S.K., Kim, J.T.: Deep symbolic regression: Recovering mathematical
expressions from data via risk-seeking policy gradients. In: Proc. of the
International Conference on Learning Representations (2021)
[31] Kingma, D.P., Welling, M.: Auto-Encoding Variational Bayes. In: 2nd
International Conference on Learning Representations, ICLR 2014, Banff,
AB, Canada, April 14-16, 2014, Conference Track Proceedings (2014)
[32] Kullback, S., Leibler, R.A.: On Information and Sufficiency. The Annals
of Mathematical Statistics 22(1), 79–86 (1951). https://doi.org/10.1214/
aoms/1177729694
[33] Bahuleyan, H.: Natural Language Generation with Neural Variational
Models (2018)
[34] Cho, K., van Merriënboer, B., Gulcehre, C., Bahdanau, D., Bougares,
F., Schwenk, H., Bengio, Y.: Learning phrase representations using RNN
encoder–decoder for statistical machine translation. In: Proceedings of the
2014 Conference on Empirical Methods in Natural Language Processing
26
Efficient Generator of Mathematical Expressions for Symbolic Regression
(EMNLP), pp. 1724–1734. Association for Computational Linguistics,
Doha, Qatar (2014). https://doi.org/10.3115/v1/D14-1179
[35] Koza, J.R.: Genetic programming as a means for programming computers
by natural selection. Statistics and Computing 4(2), 87–112 (1994). https:
//doi.org/10.1007/BF00175355
[36] Blank, J., Deb, K.: pymoo: Multi-objective optimization in python. IEEE
Access 8, 89497–89509 (2020)
[37] Meurer, A., Smith, C.P., Paprocki, M., Čertík, O., Kirpichev, S.B., Rocklin,
M., Kumar, A., Ivanov, S., Moore, J.K., Singh, S., Rathnayake, T., Vig, S.,
Granger, B.E., Muller, R.P., Bonazzi, F., Gupta, H., Vats, S., Johansson, F.,
Pedregosa, F., Curry, M.J., Terrel, A.R., Roučka, v., Saboo, A., Fernando,
I., Kulal, S., Cimrman, R., Scopatz, A.: Sympy: symbolic computing in
python. PeerJ Computer Science 3, 103 (2017). https://doi.org/10.7717/
peerj-cs.103
[38] Kingma, D.P., Ba, J.: Adam: A method for stochastic optimization. In:
Bengio, Y., LeCun, Y. (eds.) 3rd International Conference on Learning Rep-
resentations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference
Track Proceedings (2015)
[39] Levenshtein, V.I.: Binary codes capable of correcting deletions, insertions,
and reversals. Soviet physics. Doklady 10, 707–710 (1965)
Appendix A Grammars and token libraries
In the empirical evaluation of the hierarchical autoencoder, we use several
context-free grammars and different token libraries. Grammars used to generate
synthetic data sets are probabilistic. Mathematical expressions in the data sets
with a name prefix of AE include the five common binary arithmetic operators
and are generated using the following grammar:
S → SAF [0.4] | F [0.6]
A → + [0.5] | − [0.5]
F → F BT [0.4] | T [0.6]
B → * [0.5] | / [0.5]
T → (S) [0.25] | c [0.375] | x [0.375]
Data sets with a name prefix Trig include, in addition, the trigonometric
functions of sine and cosine and are generated using the same grammar as the
one above, with different productions for the non-terminal (syntactic category)
Efficient Generator of Mathematical Expressions for Symbolic Regression
27
T and a new non-terminal L:
T → (S) [0.15] | cos(S) [0.05] | sin(S) [0.05] | L [0.75]
L → c [0.5] | x [0.5].
While we do not explicitly have the power operator in the grammars to be
used during the generation of the data sets, exponentiation (and thus the power
operator) can occur during the simplification of the generated expressions.
Because of this, expressions in the data sets also contain the power operator.
In addition, GVAE also needs grammars for generating valid expressions.
When applied to the data sets with a name prefix of AE, GVAE uses the
following grammar:
S → S + T | S − T | S * T |
T → (S) | x | c
S
T
| ST | T
For the data sets with the name prefix of Trig, GVAE uses the same grammar
as above with different productions for the non-terminal symbol T :
T → (S) | sin(S) | cos(S) | x | c.
CVAE uses the token library {+, −, *, /,ˆ, x, c, (, ), "} for data sets with the
name prefix AE, and {+, −, *, /,ˆ, sin, cos, x, c, (, ), "} for data sets with the
name prefix Trig.
For experiments on the Nguyen benchmark, we use the grammar:
E → E + F [0.2] | E − F [0.2] | F [0.6]
F → E * T [0.2] | E/T [0.2] | T [0.6]
T → V [0.4] | (E)P [0.2] | (E) [0.2] | R(E) [0.2]
V → x [1.0]
P → ˆ2 [0.39] | ˆ3 [0.26] | ˆ4 [0.19] | ˆ5 [0.16]
R → sin [0.2] | cos [0.2] | eˆ[0.2] | log [0.2] | sqrt [0.2]
for ProGED, GVAE, and to generate training examples for HVAE. HVAE
and DSO use the token library {x, +, −, *, /,ˆ2,ˆ3,ˆ4,ˆ5, sin, cos, exp, log, sqrt},
while CVAE uses token {(, ), "} in addition to the tokens used by HVAE and
DSO. For expressions with two non-target variables, we add token y and change
the non-terminal symbol V to:
V → x [0.5] | y [0.5].
28
Efficient Generator of Mathematical Expressions for Symbolic Regression
For experiments on the Feynman benchmark, we use the grammar:
E → E + F [0.2] | E − F [0.2] | F [0.6]
F → E * T [0.2] | E/T [0.2] | T [0.6]
T → V [0.4] | c [0.3] | A [0.3]
A → (E)P [0.1] | (E) [0.55] | R(E) [0.35]
V → x [1.0]
P → ˆ2 [0.8] | ˆ3 [0.2]
R → sin [0.25] | cos [0.25] | eˆ[0.25] | sqrt [0.25]
generate
to
tokens
{x, c, +, −, *, /,ˆ2,ˆ3, sin, cos, exp, sqrt}. For expressions with two non-target
variables, we add token y and change the non-terminal symbol V to:
examples
training
HVAE
and
for
V → x [0.5] | y [0.5].
Appendix B Additional latent space
smoothness results
Additional examples of linear interpolation with HVAE are shown in Table B1.
We can see that the space is continuous, as the expressions smoothly transition
from Expression 1 to Expression 2. This is best seen in example 1 from the
Trig5-15k data set, where in each step, only a few (relevant) symbols change.
In the first step, sin c and x change to c. Then in the next step, c + c and sin x
change to x. In the next step x
changes to c and x/c changes to x * sin c. In
c
the last step x + c changes to xc.
While most of the time, expressions change gradually, this is not always the
case. This can be best seen in the examples from the AE4-2k data set, where
only the expressions at α = 0.5 differ from the starting ones.
Since we write expressions as a sequence, it is not always obvious how the
underlying expression tree changes during interpolation. Visualization of the
gradual change for two pairs of expressions is shown in Figure B1.
Trees are being transformed by changing their structure and the symbols
inside nodes. These transformations are interrelated as changing a constant or a
variable into an operator also transforms the structure. This is best seen in the
transition between α = 0 and α = 0.25 for the expression trees at the bottom of
Figure B1. However, the structure of the expression tree does not always change.
This is most noticeable for transitions between α = 0 and α = 0.5 for expression
trees at the top of Figure B1. Here only an operator changes at each step.
Efficient Generator of Mathematical Expressions for Symbolic Regression
29
Dataset
α
Example 1
Example 2
AE4-2k
AE7-20k
Trig5-15k
Expression A
α = 0
α = 0.25
α = 0.5
α = 0.75
α = 1
Expression B
Expression A
α = 0
α = 0.25
α = 0.5
α = 0.75
α = 1
Expression B
c * (x + c) + xc
c
c * (x + c) + xc
c
c * (x + c) + xc
c
c * x + x+c
c
c − x + x+c
c
c − x + x+c
c
c − x + x+c
c
c*xc+xc
+ c
c
c*xc+xc
+ c
c
c+xc
c + c
c*xc
c + x
c
c − xc
c
c − xc
c
c − xc
c
Expression A c + sin c + sin x
c + sin c + sin x
c + c + sin x
c − x
x + x
x − x
x − x
c − x
c
c
c
c
α = 0
α = 0.25
α = 0.5
α = 0.75
α = 1
Expression B
x + c − x * sin c
xc − x * sin c
xc − x * sin c
c − x * c + x
c − x * c + x
c − x * c + x
c − c * x + x
c+c*x
c
c+c*x
c
c+c*x
c
c*x
c−x + c − x + c
c*x
c−x + c − x + c
c * (c − x) + c − x + c
c * x * c − x + c
c*xc
c+x + x
c*xc
c+x + x
c*xc
c+x + x
xc * cos c + x
xc * cos c + x
x * cos c + x
c * cos c + cos xc
c + cos xc
c
c + cos xc
c
c + cos xc
c
Table B1: Linear interpolation of examples in the HVAE latent space. The
first row shows examples from the AE4-2k data set, the second examples from
the AE7-20k data set, and the third from the Trig5-15k data set. Here n = 4
and α = i
4 , 0 ≤ i ≤ 4.
Appendix C Additional results on the Nguyen
benchmark
In this appendix, we show additional results of the empirical evaluation. First,
we show the performance of HVAR on the first eight equations from the
Nguyen benchmark with random sampling (By sampling points from the
standardized Gaussian distribution) and different dimensions of the latent
space in Section C.1. Next, we show the learning curves of approaches HVAR,
ProGED, and EDHiE in Section C.2. After this, we show the performance of
EDHiE on noisy data in Section C.3. Finally, we conclude this section in C.4
by showing the performance of CVAE with random sampling and GVAE with
both random sampling and an evolutionary algorithm.
30
Efficient Generator of Mathematical Expressions for Symbolic Regression
Fig. B1: Examples of linearly interpolated mathematical expressions visualized
as expression trees.
C.1 Dimensions
Table C2 shows the results of evaluation using HVAE with different dimensions
of the latent vector space. Here new expressions are generated by randomly
sampling points from the standardized Gaussian distribution and decoding
them. We can see overall, models, where the dimension of the latent vector
space is either 16 or 32, perform the best. HVAE 32 produces expressions
that usually have a slightly higher mean R2, while HVAE 16 usually needs to
evaluate less unique expressions to generate the desired one. Because we prefer
the number of successful runs and the mean R2 metrics, we select the model
with the latent vector space dimension 32 for experiments where the HVAE
model is coupled together with evolutionary algorithms.
Table C2: The performance of HVAR (number of successful reconstructions, R2,
and number of evaluated equations) with varying number of latent dimensions
on the Nguyen benchmark.
Name
NG-1
NG-2
NG-3
NG-4
NG-5
NG-6
NG-7
NG-8
Total/Mean
HVAR 16
Successful
Mean R2
Evaluated
HVAR 32
Successful
Mean R2
Evaluated
HVAR 64
Successful
Mean R2
Evaluated
HVAR 128
Successful
Mean R2
Evaluated
10
10
1
0
0
3
0
10
34
1.00 (± 0.00)
1.00 (± 0.00)
1.00 (± 0.01)
1.00 (± 0.01)
0.00 (± 0.00)
0.75 (± 0.18)
1.00 (± 0.01)
1.00 (± 0.00)
0.84 (± 0.33)
500 (± 378)
4407 (± 2904)
16595 (± 0)
NA
NA
13345 (± 425)
NA
345 (± 276)
10
10
0
0
0
4
0
10
34
1.00 (± 0.00)
1.00 (± 0.00)
1.00 (± 0.01)
1.00 (± 0.01)
0.00 (± 0.01)
0.81 (± 0.13)
0.99 (± 0.01)
1.00 (± 0.00)
0.85 (± 0.32)
901 (± 1332)
9729 (± 5337)
NA
NA
NA
37619 (± 2773)
NA
392 (± 456)
10
5
0
0
0
4
0
10
29
1.00 (± 0.00)
1.00 (± 0.01)
1.00 (± 0.01)
1.00 (± 0.01)
0.01 (± 0.01)
0.74 (± 0.22)
1.00 (± 0.01)
1.00 (± 0.00)
0.84 (± 0.33)
1985 (± 2270)
14435 (± 8279)
NA
NA
NA
26169 (± 12187)
NA
233 (± 171)
10
9
1
0
0
0
0
10
30
1.00 (± 0.00)
1.00 (± 0.01)
1.00 (± 0.01)
1.00 (± 0.01)
0.04 (± 0.07)
0.57 (± 0.09)
1.00 (± 0.01)
1.00 (± 0.00)
0.83 (± 0.33)
1544 (± 1523)
14261 (± 13074)
24562 (± 0)
NA
NA
NA
NA
273 (± 205)
C.2 Learning curves
Optimization algorithms continually enhance solutions over time by itera-
tively exploring the input space to minimize an objective function or maximize
performance. The learning curve serves as a valuable measure for evaluating
Efficient Generator of Mathematical Expressions for Symbolic Regression
31
algorithmic performance, illustrating how the chosen metric evolves as opti-
mization progresses. Steep improvements in the learning curve indicate rapid
convergence towards better solutions, while plateaus or slow convergence sug-
gest challenges in finding superior solutions. By analyzing the learning curve, we
can be gain an insight into the algorithm's effectiveness, convergence, stability,
and potential for further improvement.
Figure C2 shows the learning curves of HVAR, ProGED, and EDHiE on
six equations from the Nguyen benchmark. We can see that overall EDHiE
performs the best as it achieves the highest R2 score and needs to test the
least expression to do so. This is not true on equation NG-8, where the other
two approaches find the desired expressions quicker. This happens because all
approaches find the desired expression quickly and the evolution part of EDHiE
does not yet come into effect.
C.3 Robustness to noise
In practical scenarios, working with noisy data is common, making it crucial for
symbolic regression approaches to perform well in the presence of noise. The
performance of EDHiE on noisy data is demonstrated in Table C3. To generate
noisy data sets, we sample values ε from a Gaussian distribution N (0, I) and
add them to the target values y using the formula ̃y = y * (1 + ηε), where η
represents the noise level.
To evaluate our approach on noisy data, we employ two metrics: the number
of successful runs and the mean rank. We execute our approach on noisy data,
rank all the generated expressions based on their RMSE, and evaluate these
expressions using noiseless data. A run is considered successful if we find an
expression that achieves an RMSE below 10−10 on noiseless data. In the case
of a successful run, we record the rank of the first expression with an RMSE
below 10−10 and use it to calculate the mean rank.
Table C3: The performance of EDHiE with varying level of noise added to
synthetic data from the Nguyen benchmark.
η
Name
NG-1
NG-2
NG-3
NG-4
NG-5
NG-6
NG-7
NG-8
NG-9
NG-10
Total
0.01
0.02
0.05
Successful Mean Rank
Successful Mean Rank
Successful Mean Rank
0.1
Successful
10
10
5
2
4
6
10
10
9
1
67
7.30 (6.74)
1.10 (0.30)
39.40 (4.41)
85.00 (38.00)
1.00 (0.00)
1.00 (0.00)
1.00 (0.00)
1.00 (0.00)
1.00 (0.00)
1.00 (0.00)
7.33 (18.38)
10
10
3
4
1
6
8
10
7
0
59
6.00 (6.20)
1.20 (0.40)
32.67 (20.98)
57.00 (6.16)
1.00 (0.00)
1.00 (0.00)
1.00 (0.00)
1.50 (1.50)
1.00 (0.00)
NA
7.37 (16.10)
10
10
3
2
2
6
9
10
9
1
62
9.00 (8.04)
6.80 (3.09)
34.33 (9.81)
52.50 (6.50)
1.00 (0.00)
1.00 (0.00)
1.00 (0.00)
1.70 (1.19)
1.00 (0.00)
1.00 (0.00)
6.61 (11.91)
10
10
2
0
4
9
9
10
8
1
63
Mean Rank
14.60 (16.27)
175.10 (42.15)
50.50 (1.50)
NA
1.00 (0.00)
1.00 (0.00)
1.11 (0.31)
3.30 (3.44)
1.00 (0.00)
1.00 (0.00)
32.75 (65.10)
0.2
Successful
10
10
3
2
5
7
8
10
8
1
64
Mean Rank
23.80 (13.91)
222.80 (28.72)
169.33 (25.85)
210.50 (4.50)
1.00 (0.00)
1.00 (0.00)
10.00 (3.46)
5.10 (4.39)
1.00 (0.00)
1.00 (0.00)
55.42 (87.83)
The results demonstrate that the number of successful runs remains rel-
atively consistent across different noise levelsm indicating the robustness of
our approach. Additionally, we can see that the mean rank increases as the
amount of noise rises. This outcome is expected, as higher noise levels allow
32
Efficient Generator of Mathematical Expressions for Symbolic Regression
(a) NG-1
(b) NG-5
(c) NG-6
(d) NG-8
(e) NG-9
(f) NG-10
Fig. C2: Learning curves for HVAR, ProGED, and EDHiE on the selected
equations from the Nguyen benchmark. Curves for the equations NG-2, NG-
3, NG-4, and NG-7 are omitted since they resemble the curve for the NG-1
equation.
Efficient Generator of Mathematical Expressions for Symbolic Regression
33
more expressions to overfit the noisy data. In practical applications, expressions
that overfit can be eliminated by assigning complexity scores to each expression
and selecting less complex expressions from the Pareto front.
C.4 Performance of CVAE and GVAE on symbolic
regression
Table C4 shows the results of the CVAE baseline. Models presented in the table
use the same parameters as they do in Section 4.1.1 apart from the dimension
of the latent vector space. We can see that this baseline performs very poorly,
as it finds only the two simplest equations. The main reason for this is the high
number of invalid expressions (more than 96.8%) the baseline produces.
Table C4: Results of symbolic regression by random sampling of the CVAE
latent space with varying number of dimensions on the Nguyen benchark.
Name
NG-1
NG-2
NG-3
NG-4
NG-5
NG-6
NG-7
NG-8
Total/Mean
CVAE 32
Successful
Mean R2
Invalid
CVAE 64
Successful
Mean R2
Invalid
CVAE 128
Successful
Mean R2
Invalid
4
0
0
0
0
0
0
10
14
1.00 (± 0.01)
1.00 (± 0.01)
0.99 (± 0.01)
0.99 (± 0.01)
0.00 (± 0.00)
0.49 (± 0.01)
0.71 (± 0.29)
1.00 (± 0.00)
96851 (± 57)
96816 (± 38)
96857 (± 59)
96867 (± 39)
96846 (± 46)
96843 (± 55)
96837 (± 49)
96801 (± 48)
0.77 (± 0.34)
96839 (± 20)
2
0
0
0
0
0
0
10
12
1.00 (± 0.01)
1.00 (± 0.01)
0.99 (± 0.01)
0.99 (± 0.01)
0.00 (± 0.00)
0.49 (± 0.02)
0.60 (± 0.32)
1.00 (± 0.00)
98131 (± 57)
98143 (± 38)
98131 (± 47)
98151 (± 60)
98148 (± 46)
98127 (± 43)
98108 (± 27)
98146 (± 39)
0.75 (± 0.34)
98135 (± 13)
2
0
0
0
0
0
0
3
5
1.00 (± 0.01)
1.00 (± 0.01)
0.97 (± 0.07)
0.99 (± 0.01)
0.00 (± 0.00)
0.09 (± 0.15)
0.14 (± 0.28)
0.58 (± 0.42)
99243 (± 25)
99247 (± 18)
99250 (± 22)
99238 (± 17)
99239 (± 18)
99227 (± 24)
99249 (± 31)
99229 (± 34)
0.59 (± 0.42)
99240 (± 8)
Lastly, Table C5 shows the results of the GVAE baseline. We can see that
GVAE performs better than CVAE but worse than HVAE. For the GVAE
Evo approach we use the GVAE baseline with the latent space dimension
64 together with the evolutionary operators presented in Section 3.3.2. Here,
different models find different equations: GVAE 32 finds the equation NG-6,
while GVAE 64 finds NG-4, and GVAE Evo NG-3. Overall GVAE Evo
performs the best as it successfully finishes 4 runs more than other models.
Table C5: Results of symbolic regression by random sampling and evolutionary
optimization in the GVAE latent space with varying number of dimensions on
the Nguyen benchark.
Name
NG-1
NG-2
NG-3
NG-4
NG-5
NG-6
NG-7
NG-8
Total/Mean
GVAE 32
Successful
Mean R2
Invalid
GVAE 64
Successful
Mean R2
Evaluated
GVAE 128
Successful
Mean R2
Invalid
GVAE Evo
Successful
Mean R2
Invalid
10
2
0
0
0
2
0
10
24
1.00 (± 0.00)
1.00 (± 0.01)
1.00 (± 0.01)
1.00 (± 0.01)
0.00 (± 0.01)
0.59 (± 0.20)
0.92 (± 0.02)
1.00 (± 0.00)
15972 (± 95)
15917 (± 111)
15985 (± 107)
15900 (± 115)
15896 (± 102)
15925 (± 120)
15987 (± 123)
15986 (± 132)
0.81 (± 0.33)
15946 (± 37)
9
4
0
1
0
0
0
10
24
1.00 (± 0.01)
1.00 (± 0.01)
1.00 (± 0.01)
1.00 (± 0.01)
0.00 (± 0.01)
0.49 (± 0.00)
0.92 (± 0.00)
1.00 (± 0.00)
58229 (± 149)
58295 (± 150)
58383 (± 153)
58318 (± 169)
58322 (± 137)
58327 (± 162)
58268 (± 107)
58252 (± 157)
0.81 (± 0.34)
58299 (± 45)
10
3
0
0
0
0
0
10
23
1.00 (± 0.00)
1.00 (± 0.01)
1.00 (± 0.01)
1.00 (± 0.01)
0.00 (± 0.00)
0.49 (± 0.00)
0.91 (± 0.03)
1.00 (± 0.00)
72863 (± 96)
72840 (± 110)
72802 (± 101)
72848 (± 105)
72808 (± 97)
72787 (± 183)
72865 (± 116)
72825 (± 186)
0.80 (± 0.34)
72830 (± 27)
10
7
1
0
0
0
0
10
28
1.00 (± 0.00)
1.00 (± 0.01)
1.00 (± 0.01)
1.00 (± 0.01)
0.00 (± 0.01)
0.53 (± 0.09)
0.92 (± 0.00)
1.00 (± 0.00)
0 (± 1)
0 (± 1)
1 (± 0)
0 (± 0)
0 (± 1)
1 (± 1)
0 (± 1)
0 (± 1)
0.81 (± 0.34)
0 (± 0)
34
Efficient Generator of Mathematical Expressions for Symbolic Regression
Appendix D Implementation details
This section provides implementation details that are not part of the
methodology but are crucial for the reproducibility of our approach and
its implementation. These details include batching, encoding/decoding, and
training.
D.1 Batching
Since our approach works on expression trees with varying structures, we cannot
employ standard batching methods. Instead, we represent a batch of expression
trees with a Python object we refer to as a "batched node". A batched node
contains a list of symbols, a left (batched) child node, and a right (batched)
child node.
Since an expression tree may not contain all the nodes in the batched tree,
the list of symbols within a batched node might include an empty string as a
placeholder for the missing symbol. During training, each batched node also
contains a target matrix, a prediction matrix, and a mask vector. The target
matrix comprises one-hot symbol encodings, with empty strings represented by
zero values. The decoding cell generates the prediction matrix, which, in turn,
predicts the target matrix. Finally, the mask vector is a binary vector where
the value at index i equals one if the node appears in the expression tree i and
equals zero otherwise.
D.2 Encoding/Decoding
The encoding process involves traversing the batched node using a post-order
traversal. We first visit and encode the left (batched) child, followed by the
right (batched) child. Finally, we generate the code for the batched node using
codes obtained from the child nodes.
Decoding is performed in reverse. We start by decoding the (batched) root
code, which yields a list of symbols, the codes for the left and right (batched)
child nodes, and the masks for the left and right child nodes. The masks for
the left and right child nodes are calculated using symbols produced by the
decoding cell and the mask of the current node. Specifically, if the value of the
current mask at a given position is 0, the corresponding values in the mask
for the left and right child nodes remain 0. Otherwise, the masks are assigned
values appropriate to the symbol type: both 1 for an operator, 1, and right 0
for a function, and both 0 for a variable or constant. When all values in a mask
become 0, the decoding process for this branch terminates.
D.3 Training
Expression trees have two components: the binary tree structure and the
symbols within the nodes. However, the structure of the binary tree can be
inferred from the symbols present in the nodes. Therefore, it is sufficient for
our approach to learn to reconstruct the symbols occurring in the nodes.
Efficient Generator of Mathematical Expressions for Symbolic Regression
35
When training the model, we restrict the output tree's structure to match the
input structure. Specifically, we utilize the input batched node and incorporate
a prediction matrix into each node. We then calculate the reconstruction
error using the target and prediction sequences obtained through an in-order
traversal of the batched node. While computing the cross-entropy loss, we apply
a masking technique to exclude nodes that do not occur in an expression tree
from the loss calculation, effectively removing them from the training process.
|
http://arxiv.org/abs/2302.09880v3 | 2023-10-30T10:14:02 | 2023-02-20T10:15:36 | Towards Unbounded Machine Unlearning | Deep machine unlearning is the problem of `removing' from a trained neural
network a subset of its training set. This problem is very timely and has many
applications, including the key tasks of removing biases (RB), resolving
confusion (RC) (caused by mislabelled data in trained models), as well as
allowing users to exercise their `right to be forgotten' to protect User
Privacy (UP). This paper is the first, to our knowledge, to study unlearning
for different applications (RB, RC, UP), with the view that each has its own
desiderata, definitions for `forgetting' and associated metrics for forget
quality. For UP, we propose a novel adaptation of a strong Membership Inference
Attack for unlearning. We also propose SCRUB, a novel unlearning algorithm,
which is the only method that is consistently a top performer for forget
quality across the different application-dependent metrics for RB, RC, and UP.
At the same time, SCRUB is also consistently a top performer on metrics that
measure model utility (i.e. accuracy on retained data and generalization), and
is more efficient than previous work. The above are substantiated through a
comprehensive empirical evaluation against previous state-of-the-art. | [
"Meghdad Kurmanji",
"Peter Triantafillou",
"Jamie Hayes",
"Eleni Triantafillou"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09880v3",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09880v3",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.CR"
] | 3
2
0
2
t
c
O
0
3
]
G
L
.
s
c
[
3
v
0
8
8
9
0
.
2
0
3
2
:
v
i
X
r
a
Towards Unbounded Machine Unlearning
Meghdad Kurmanji∗
University of Warwick
Peter Triantafillou
University of Warwick
Jamie Hayes
Google DeepMind
Eleni Triantafillou
Google DeepMind
Abstract
Deep machine unlearning is the problem of 'removing' from a trained neural
network a subset of its training set. This problem is very timely and has many
applications, including the key tasks of removing biases (RB), resolving confusion
(RC) (caused by mislabelled data in trained models), as well as allowing users to
exercise their 'right to be forgotten' to protect User Privacy (UP). This paper is
the first, to our knowledge, to study unlearning for different applications (RB, RC,
UP), with the view that each has its own desiderata, definitions for 'forgetting' and
associated metrics for forget quality. For UP, we propose a novel adaptation of
a strong Membership Inference Attack for unlearning. We also propose SCRUB,
a novel unlearning algorithm, which is the only method that is consistently a top
performer for forget quality across the different application-dependent metrics for
RB, RC, and UP. At the same time, SCRUB is also consistently a top performer
on metrics that measure model utility (i.e. accuracy on retained data and gener-
alization), and is more efficient than previous work. The above are substantiated
through a comprehensive empirical evaluation against previous state-of-the-art.
1
Introduction
Can we make a deep learning model 'forget' a subset of its training data? Aside from being
scientifically interesting, achieving this goal of deep machine unlearning is increasingly important
and relevant from a practical perspective and this research direction is enjoying significant attention
recently [Triantafillou et al., 2023]. Regulations such as EU's General Data Protection Regulation
[Mantelero, 2013] stipulate that individuals can request to have their data 'deleted' (the 'right to be
forgotten'). Nowadays, given the ubiquity of deep learning systems in a wide range of applications,
including computer vision, natural language processing, speech recognition and healthcare, allowing
individuals to exercise this right necessitates new technology. Unlearning aims to fill this need.
However, unlearning has several additional important applications where privacy with respect to
a subset of individual training examples isn't necessarily a consideration: removing out-of-date
examples, outliers, poisoned samples [Jagielski et al., 2018], noisy labels [Northcutt et al., 2021], or
data that may carry harmful biases [Fabbrizzi et al., 2022]. In fact, we are the first to argue that the
definition of 'forgetting' is application-dependent, and unlearning comes with different desiderata
and priorities in different scenarios. For instance, for a privacy application, 'forgetting' the data
of users who requested deletion is the primary objective and we may be willing to sacrifice model
performance to some degree, in exchange for reliably defending Membership Inference Attacks
(MIAs). In other cases, for instance, when deleting outdated data to keep a model current, maintaining
the model's performance throughout such 'cleanup' operations may be the primary consideration,
and guaranteeing that no trace of the old data is left behind may be irrelevant. While previous work
does not establish such distinctions, we study three scenarios and propose a method that is the most
consistent top-performer across applications and metrics.
∗Correspondence to [email protected].
37th Conference on Neural Information Processing Systems (NeurIPS 2023).
Unfortunately, removing the influence of a subset of the training set from the weights of a trained
model is hard, since deep models memorize information about specific instances [Zhang et al., 2020,
2021, Arpit et al., 2017] and their highly non-convex nature makes it difficult to trace the effect of
each example on the model's weights. Of course, we can apply the naive solution of retraining the
model from scratch without the cohort of data to be forgotten. This procedure indeed guarantees that
the weights of the resulting model aren't influenced by the instances to forget (it performs 'exact
unlearning'), but the obvious drawback is computational inefficiency: retraining a deep learning
model to accommodate each new forgetting request isn't viable in practice. To mitigate that cost,
recent work turned to approximate unlearning [Izzo et al., 2021, Golatkar et al., 2020a,b] where the
goal is to modify the weights of the trained model to approximate those that would have been obtained
by exact unlearning. That is, they strive to achieve 'indistinguishability' between the approximate and
exact solutions, typically accompanied by theoretical guarantees for the quality of that approximation.
This goal is also mirrored in the metrics used by these works: the model's error on the deleted data is
desired to be just as high as the error of the 'exact' retrained model (which truly never saw that data).
The argument is that an error higher than that reference point may cause susceptibility to membership
inference attacks: a noticeably poor performance on an example can reveal that it was unlearned.
In this work, we show empirically that such approximate unlearning methods often perform poorly in
practice (in one or more of RB, RC and UP). We hypothesize that this is due to potential violations of
assumptions made by these methods, e.g. that the 'optimal' solution of unlearning is close in weight
space to the original model [Golatkar et al., 2020a,b] (due to assumptions of stability of SGD and
'small enough' forget sets). Further, we find these previous methods scale poorly to the size of the
training set and the model, often making them impractical. To address these issues, we propose a new
unlearning model, SCalable Remembering and Unlearning unBound (SCRUB) that departs from that
methodology. SCRUB bears a novel teacher-student formulation, where the student model selectively
disobeys an all-knowing teacher, to inherit from it only knowledge that does not pertain to the data to
be deleted. This method is 'unbound' from limiting assumptions (e.g., to facilitate formal guarantees),
poor scalability limits, and is not tailored to a single unlearning application. We find that SCRUB
can yield a very high error on the deleted data, which is desired in some scenarios but may cause
susceptibility to membership inference attacks. To mitigate this when relevant, we extend SCRUB
with a novel 'rewinding' procedure that pinpoints the 'checkpoint' of the unlearning process to use
such that the error on the deleted data approximates the reference point of being 'just high enough'.
We also propose the first, to our knowledge, adaptation of the state-of-the-art LiRA MIA [Carlini
et al., 2022] to the framework of unlearning, as a metric for UP. Overall, we perform a comprehensive
evaluation using different baselines, datasets, architectures and three application scenarios. We find
that SCRUB is by far the most consistent top performer out of all state-of-the-art methods considered.
SCRUB is able to ensure high forget quality, satisfying different forget-quality metrics for different
applications while also being a top performer with respect to model utility (accuracy on retained data,
and generalization). Our findings highlight the need to consider a broad spectrum of applications
when evaluating unlearning algorithms, to better understand their properties and trade-offs.
2 Problem Definition for Unlearning Unbound
Notation and preliminaries Let D = {xi, yi}N
i=1 denote a training dataset containing N examples,
where the i'th example is represented by a vector of input features xi and a corresponding class label
yi. Let f (*; w) denote a function parameterized by trainable weights w. In this work, we study the
case where f is represented by a deep neural network, trained in a supervised manner via empirical
risk minimization. Specifically, we define the loss function as L(w) = 1
i=1 l(f (xi; w), yi) where
N
l denotes the cross entropy loss.
(cid:80)N
Deep Machine Unlearning We now formalize the problem of deep machine unlearning. We
assume that we are given a model f (*; wo) that has been trained on D, where f denotes a neural
network and wo its trained parameters, obtained by minimizing the above loss function. We will refer
to this as the 'original model' (i.e. before any unlearning intervention is performed). We are also
given a 'forget set' Df = {xi, yi}Nf
i=1 ⊂ D, comprised of Nf examples from D and a 'retain set' Dr
of Nr training examples that the model is still allowed to retain information for. For simplicity, we
consider the standard scenario where Dr is the complement of Df or, in other words, Df ∪ Dr = D.
2
Given f (*; wo), Df and Dr, the goal of deep machine unlearning is to produce a new set of weights
wu such that the 'unlearned model' f (*; wu) has 'forgotten' Df without hurting the 'utility' of the
original model (its performance on the retained data Dr and generalization to data outside of D). We
argue that defining (and measuring) 'forgetting' is application-dependent. Our work is the first, to the
best of our knowledge, to perform a thorough empirical evaluation of unlearning algorithms on three
different application scenarios, each with its own definition of forgetting and associated metrics.
Defining and measuring 'forgetting' We consider three different application scenarios in this
work, each with their own definition of forgetting and associated metrics. 1) Removing biases. We
want maximal error on Df : the model should never predict the assigned labels of forget examples,
since they reflect unintended behaviour. 2) Resolving confusion. A model may be 'confused' due to
incorrect labels in its dataset. A successful unlearning algorithm resolves this if mislabeled examples
are placed in the forget set (see metrics in Section 5). 3) User privacy. Success from a privacy
perspective is associated with a forget error only as high as that of retraining-from-scratch; a higher
forget error could lead to vulnerability to Membership Inference Attacks (MIAs). In all of the above
cases, in addition to achieving forgetting, we seek unlearning algorithms that don't damage model
utility, i.e. accuracy on retained data and generalization ability, and that unlearning is efficient enough
to be preferable over the simple and expensive solution of retraining the model.
Fundamental trade-offs A top-performing unlearning algorithm must simultaneously achieve
three feats: (i) obtain high 'forget quality', (ii) ensure continued high accuracy on retained and unseen
data, and (iii) efficiency / scalability. In practice, there are fundamental trade-offs in two different
dimensions. The first dimension involves trade-offs between (i), (ii) and (iii), for example achieving
good 'forget quality' at the expense of efficiency. Retraining from scratch is such an example, but,
as we will show later, some methods suffer from inefficiencies even worse than retraining. Another
common issue we will observe is achieving good 'forget quality' at the expense of utility. The
second dimension involves trade-offs within the context of achieving good 'forget quality' across
applications, since the metric for this quality is application-specific, and an algorithm may perform
strongly on one such metric but poorly on others. SCRUB is designed to handle these trade-offs and
is shown empirically to consistently outperform previous methods across the board.
3 SCalable Remembering and Unlearning unBound (SCRUB)
We present SCRUB, a new unlearning algorithm based on a novel casting of the unlearning problem
into a teacher-student framework. We design SCRUB to meet the desiderata of unlearning: efficiently
'forgetting' without hurting model utility. Because we argue that the definition of forgetting is
application-dependent, we propose a recipe that works across applications: We first design SCRUB
to strive for maximal forget error, which is desirable in some scenarios (e.g. RB and RC) but not
in others (e.g. UP). To address the latter case, we complement SCRUB with a novel 'rewinding'
procedure that can reduce the forget set error appropriately when required. SCRUB is 'unbound'
from limiting assumptions (e.g., to facilitate formal guarantees), poor scalability limits and is by far
the most consistent method in forgetting across applications while preserving model utility.
3.1 The SCRUB
We consider the original model wo as the 'teacher' and we formulate our goal as training a 'student'
wu that selectively obeys that teacher. Intuitively, our goal for wu is twofold: forget Df while still
remembering Dr. To that effect, wo should be obeyed when teaching about Dr, but disobeyed when
teaching about Df . Our code is available for reproducibility 2.
En route to deriving our training objective, let us first define:
d(x; wu) = DKL(p(f (x; wo))∥p(f (x; wu)))
In words, d(x; wu) is the KL-divergence between the student and teacher output distributions (softmax
probabilities) for the example x. We make the dependence of d on wu explicit, since we will optimize
the student weights wu while keeping the teacher weights frozen wo, treating them as a constant.
2https://github.com/Meghdad92/SCRUB
3
Concretely, we begin by initializing the student wu to the weights of the teacher wo. Since the teacher
weights wo were trained on all of D, the teacher performs well on both constituents of D, namely
both of Dr and Df . Therefore, the student has good performance on Dr at initialization, already
fulfilling one of our desiderata. Can we then start from this solution and modify it to unlearn Df ? In
principle, one could do this by optimizing:
min
wu
−
1
Nf
(cid:88)
xf ∈Df
d(xf ; wu)
(1)
However, in practice, when performing this maximization of the distance between the student
and teacher on the forget set, we noticed that, while indeed the performance on Df degrades, as
desired, it unfortunately also results in degrading performance on Dr. To amend that, we propose
to simultaneously encourage the student to 'stay close' to the teacher on retain examples, while
encouraging it to 'move away' from the teacher on forget examples, adding a contrastive flavour.
Formally, the optimization objective becomes:
min
wu
1
Nr
(cid:88)
xr∈Dr
d(xr; wu) −
1
Nf
(cid:88)
xf ∈Df
d(xf ; wu)
(2)
Furthermore, SCRUB also simultaneously optimizes for the task loss on the retain set, to further
strengthen the incentive to perform well there. Our final training objective is then the following:
min
wu
α
Nr
(cid:88)
xr∈Dr
d(xr; wu) +
γ
Nr
(cid:88)
l(f (xr; wu), yr) −
(xr,yr)∈Dr
1
Nf
(cid:88)
xf ∈Df
d(xf ; wu)
(3)
where l stands for the cross-entropy loss and the α and γ are scalars that we treat as hyperparameters.
In practice, we found that optimizing the objective in Equation 3 is challenging, due to oscillations in
the loss. Intuitively, this is due to trying to simultaneously satisfy two objectives, which may interfere
with each other, namely moving close to the teacher on some data points while moving away from it
on others. To address this, SCRUB provides a practical recipe for optimization, reminiscent of 'tricks'
used in other min-max-like problems like Generative Adversarial Networks [Goodfellow et al., 2014]
where the discriminator is trained for several steps before each update to the generator.
Specifically, SCRUB iterates between performing an epoch of updates on the forget set (the max-
step) followed by an epoch of updates on the retain set (the min-step), in an alternating fashion.
Guarding against hurting retain performance due to this alteration of min-steps and max-steps,
SCRUB also performs a sequence of additional min-steps at the end of the sequence to restore the
retain performance in the event that it was harmed. SCRUB training stops when the forget error has
increased without harming the retain set error. We find in practice this point can be reached with a
small number of epochs. We provide pseudocode, training plots and ablations in the Appendix.
3.2 SCRUB and Rewind (SCRUB+R)
By construction, SCRUB encourages obtaining a high error on the forget set. This is desired for some
application scenarios. However, an uncharacteristially high error on deleted examples can make them
identifiable, causing vulnerability to membership inference attacks. SCRUB+R addresses this.
To this end, we are after a procedure for selecting the checkpoint of SCRUB where the forget set error
is 'just high enough'. One could obtain a reference point for that by retraining from scratch without
the forget set and recording the error of that model on the forget set. However, that would defeat the
purpose of unlearning, as we want to avoid that computation. Therefore, we propose a different way
of establishing a reference point. First, we create a validation set of the same distribution as the forget
set. For instance, if the forget set has only examples of class 0, we keep only examples of class 0
in the validation set too. Next, we train SCRUB as usual, storing a model checkpoint every epoch.
At the end of its training, where the forget error is typically the highest, we measure the error on
the constructed validation set. This will serve as the reference point for the desired forget set error.
Finally, we 'rewind' to the checkpoint where the forget error is closest to that reference point.
4
(a) CIFAR-10 class unlearning.
(b) CIFAR-10 selective.
(c) CIFAR-5 selective.
Figure 1: RB results: SCRUB is the only consistent top-performer in terms of forgetting and
preserving utility. It is also highly efficient: second only to Bad-T which, however, fails at
forgetting and damages utility. In all subfigures, each point represents the average across ResNet
and All-CNN variants. For large-scale results, we also compute the scale-up factor: the fraction of
the runtime of retraining from scratch over the runtime of the given unlearning algorithm (multiplied
by 5 here, for visualization purposes). We find that selective unlearning is harder for all methods,
especially for EU-k and Fisher (see Figure 1a vs 1b). CF-k and Finetuning perform similarly (they
perform poorly) in all cases, so their lines occlude one another. Complete tables are in the Appendix.
The intuition is that the last step of unlearning approximates 'maximally forgetting'. Consequently,
the error on the identically-distributed validation set approximates the error of a model that never
learned about that distribution from the forget set: any correct predictions on the held-out examples
are due only to the generalization power of the model that was trained only on the retain set. Therefore,
we choose that validation set error to serve as the reference point for how high we would like the
forget set error to be for UP applications. We show empirically that this rewinding procedure greatly
increases the defense against membership inference attacks, making SCRUB a strong performer for
applications where privacy is a consideration.
4 Related Work
Unlearning definitions Despite prior work on unlearning, this research problem is still in its
infancy and we lack a well-established formal definition. The term 'unlearning' was coined in Cao
and Yang [2015], where, in the context of certain structured problems, unlearning is defined to be
successful if deleting an example yields the same outputs on a dataset as if that example had never
been inserted. Ginart et al. [2019] introduce a more relaxed probabilistic definition for machine
unlearning inspired by Differential Privacy [Dwork et al., 2014] that requires the unlearned model
to yield outputs that are similar to those that would have been produced by a model retrained from
scratch without the forget set. This led to the development of 'approximate learning' methods that
aren't identical to retrain-from-scratch ('exact unlearning') but 'similar' [Guo et al., 2019, Golatkar
et al., 2020a]. Sekhari et al. [2021] and Neel et al. [2021] adopt similar DP-inspired definitions of
(approximate) unlearning based on the goal of indistinguishability from retrain-from-scratch.
However, there is a recent line of criticism against the idea of defining or measuring unlearning
success based on indistinguishability from retrain-from-scratch. Thudi et al. [2022b] theoretically
show that we can obtain arbitrarily similar model weights from training on two non-overlapping
datasets. This implies that reaching a particular point in parameters space isn't a sufficient condition
for having unlearned. Furthermore, Goel et al. [2022] argue that it's not a necessary condition
either: retraining from scratch may arrive at different model distributions due to changes in e.g.
hyperparameters [Yang and Shami, 2020]. Therefore, a unlearning method may be unnecessarily
penalized for not matching a particular retrained-from-scratch model. In our work, we take a practical
viewpoint and define unlearning as 'forgetting' in an efficient manner and without hurting model
utility, for three different application-specific metrics for forgetting that we discuss in the next section.
Unlearning methods Cao and Yang [2015] introduce unlearning and provide an exact forgetting
algorithm for statistical query learning. [Bourtoule et al., 2021] proposed a training framework by
sharding data and creating multiple models, enabling exact unlearning of certain data partitions.
Ginart et al. [2019] introduce a probabilistic definition for machine unlearning inspired by Differential
5
Privacy [Dwork et al., 2014], and formed the origin of the idea of the model indistinguishability
goal. More recently, Guo et al. [2019], Izzo et al. [2021], Sekhari et al. [2021] built upon this
framework and introduced unlearning methods that can provide theoretical guarantees under certain
assumptions. Further, Huang and Canonne [2023] provide bounds for 'deletion capacity' in the
DP-based unlearning methods using the group property of DP. [Graves et al., 2021] proposed two
methods applicable to deep networks. The first randomly re-labels the forget set and retrains for a
small number of updates, while the second stores the index of examples that participated in each
batch and the per-batch parameter updates, and unlearns by 'undoing' the affected updates. This
requires a lot of storage and can also lead to a poor proxy of the model that would have been obtained
had those parameter updates not happened in the first place, especially for larger sequences. [Golatkar
et al., 2020a] proposed an information-theoretic procedure for removing information about Df from
the weights of a neural network and [Golatkar et al., 2020b, 2021] propose methods to approximate
the weights that would have been obtained by unlearning via a linearization inspired by NTK theory
[Jacot et al., 2018] in the first case, and based on Taylor expansions in the latter. However, [Golatkar
et al., 2020a,b] scale poorly with the size of the training dataset, as computing the forgetting step
scales quadratically with the number of training samples. [Golatkar et al., 2021] addresses this issue,
albeit under a different restrictive assumption: that a large dataset is available for pre-training that
will remain 'static', in that no forgetting operations will be applied on it; an assumption that is not
met in many important applications (e.g. healthcare, medical images). Some more recent works
propose modifications to the original model training, to make the resulting model more amenable to
unlearning. Thudi et al. [2022a] propose a regularizer to reduce the 'verification error', which is an
approximation to the distance between the unlearned model and a retrained-from-scratch model. The
goal is to make unlearning easier in the future. Additionally, they propose a single gradient update
that reverses the effect of Df . This regularizer, however, may have a negative effect on the model's
performance, and the single gradient unlearning step only removes the effect that Df has had in the
first iteration of training. [Zhang et al., 2022] present a training process that quantizes gradients
and applies randomized smoothing. This process is designed to make unlearning unnecessary in the
future and comes with certifications under some conditions. However, a deletion request that causes
too large a change to the data distribution (e.g. if doing class unlearning), may exceed the 'deletion
budget' and invalidate their assumptions.
Related research areas Differential Privacy (DP) [Dwork et al., 2014] and Life-Long Learning
(LLL) [Parisi et al., 2019] have shared goals with unlearning. DP seeks to ensure that the trained
model doesn't store information about any training instance; a strong goal that is difficult to achieve
for deep neural networks [Abadi et al., 2016]. In contrast, in unlearning we only desire to remove
the influence of the training instances in the forget set, which can be seen as a relaxation of the
same problem. LLL seeks to continuously update a model to solve new sets of tasks, without
'catastrophically forgetting' previously-learned tasks. The notion of forgetting a task, though, is
distinct from that of forgetting a training example: the performance on a task can degrade, without
having removed the influence of particular examples from the model weights.
Teacher-student and contrastive methods The teacher-student methodology has been used in a
different contexts, e.g. self-supervised [Grill et al., 2020, Chen and He, 2021] and semi-supervised
learning [Xie et al., 2020]. Knowledge Distillation [Hinton et al., 2015] can also be thought of as
a teacher-student approach with the additional desire for compression, where the student is chosen
to have a smaller architecture than the teacher. In addition, our training objective has a contrastive
flavour [Chen et al., 2020, He et al., 2020], due to both pulling the student close to the teacher, and
pushing it away from it, for different parts of the training set. For unlearning, [Kim and Woo, 2022,
Wu et al., 2022] propose methods with a two-stage pipeline: 'neutralization' / forgetting followed
by a 'retraining' / restoring, that restores performance that may be lost in the first phase. Both use
distillation only in the second phase on only the retain set. In contrast, SCRUB employs a single
phase where we carefully design a teacher-student formulation to both encourage forgetting the
requested data and retaining the other knowledge, simultaneously. Most similar to our work in that
regard is the method of [Chundawat et al., 2022] that employs a related but different teacher-student
objective that encourages moving close to a 'Bad Teacher' for the forget set (we thus refer to this as
'Bad-T'). Moving close to a different, 'bad', teacher for forget examples is fundamentally different
from our goal of moving away from the (single) teacher as in SCRUB. We find that Bad-T forgets
poorly compared to SCRUB in all applications, and degrades model quality.
6
ResNet
All-CNN
Model
Retrain
Original
Finetune
NegGrad+
CF-k
EU-k
Fisher
NTK
Bad-T
SCRUB
IC test error (↓)
mean
std
IC retain error (↓)
mean
std
Fgt test error (↓)
mean
std
Fgt retain error (↓)
mean
std
IC test error (↓)
mean
std
IC retain error (↓)
mean
std
Fgt test error (↓)
mean
std
Fgt retain error (↓)
mean
std
24.0
56.0
52.0
47.5
54.8
47.0
51.5
37.5
47.3
19.0
1.8
3.0
3.1
5.3
2.0
4.8
7.5
4.0
9.7
3.9
0.0
0.0
0.0
0.0
0.0
8.3
26.3
0.0
6.0
0.0
0.0
0.0
0.0
0.0
0.0
4.7
9.5
0.0
6.2
0.0
18.3
92.0
79.3
69.0
85.3
63.3
79.0
52.0
27.0
19.7
4.2
7.9
10.1
13.5
7.0
9.7
3.6
10.6
8.7
7.5
0.0
0.0
0.0
0.0
0.0
3.7
20.0
0.0
0.3
0.0
0.0
0.0
0.0
0.0
0.0
2.5
7.9
0.0
0.6
0.0
19.0
49.0
43.7
42.3
47.8
59.5
56.8
36.7
39.3
26.0
1.3
4.8
7.3
11.3
5.8
5.2
8.7
4.1
8.2
4.4
0.0
6.0
0.0
0.0
0.0
38.3
31.7
3.0
3.0
0.0
0.0
10.39
0.0
0.0
0.0
6.7
14.0
5.2
1.0
0.0
11.3
80.7
67.3
62.0
76.3
68.7
78.3
54.3
25.7
18.0
4.6
12.6
16.0
22.6
14.4
15.6
15.5
9.0
5.0
11.1
0.0
6.0
0.0
0.0
0.0
19.7
17.7
3.0
1.0
0.0
0.0
10.4
0.0
0.0
0.0
10.4
11.5
5.2
1.0
0.0
Table 1: RC-application results: SCRUB is the strongest performer in terms of resolving class
confusion. These results are on CIFAR-5 with ResNet and All-CNN, where we confused 50 samples
of class 0 by mislabeling them as class 1, and 50 of class 1 by mislabeling them as class 0.
5 Experiments
5.1 Experimental setup
Overview of applications and metrics We consider three sets of forget-quality metrics, for different
applications. First, we consider the scenario of Removing Biases (RB) where we desire the highest
possible forget set error (reflecting that we want the model to never predict the associated labels
of the forget set, since those capture an unintended behaviour / bias). Next, inspired by Goel et al.
[2022], we consider unlearning for Resolving Confusion (RC) between classes, caused by a portion
of the model's original training set being mislabelled. Finally, we consider a scenario of data deletion
for User Privacy (UP). In this case, we use Membership Inference Attacks (MIAs) to measure
success (including the first, to our knowledge, adaptation of the state-of-the-art LiRA MIA [Carlini
et al., 2022] to unlearning), where unlearning succeeds if the attacker is unable to tell apart forgotten
examples from truly unseen ones. In all cases, aside from achieving the application-specific forgetting
goal, we also measure utility (performance on Dr and a test set Dt) as an additional metric.
Experimental details We utilize the
same two datasets from previous work:
CIFAR-10 [Krizhevsky et al., 2009] and
Lacuna-10 [Golatkar et al., 2020a], which
is derived from VGG-Faces [Cao and Yang,
2015], and the same two architectures:
All-CNN [Springenberg et al., 2014] and
ResNet-18 [He et al., 2016]. For consis-
tency with previous work, we pre-train the
original model on CIFAR-100 / Lacuna-
100 for the CIFAR-10 / Lacuna-10 ex-
periments, respectively [Golatkar et al.,
2020a,b]. We run each experiment with
3 random seeds and report the mean and
standard deviation.
(a) Small-scale.
(b) Large-scale.
Figure 2: The number of times each method was a top
performer in forgetting in RB-application. A model is
a top-performer if its 95% confidence interval overlaps
with that of the best mean. Small-scale counts are over
{ResNet, All-CNN} x {CIFAR, Lacuna} (4 total), large-
scale additionally x {class, selective} (8 total). SCRUB
is the most consistent top-performer.
We consider two settings throughout the pa-
per: small-scale and large-scale. The for-
mer allows comparisons with NTK, which
doesn't scale beyond it. For the small-scale, we exactly follow the setup in [Golatkar et al., 2020b]
that uses only 5 classes from each of CIFAR and Lacuna ('CIFAR-5' / 'Lacuna-5'), with 100 train,
25 validation and 100 test examples per class. The forget set contains 25 examples from class 0 (5%).
For the large-scale, we exactly follow the setup in [Golatkar et al., 2020a] that uses all 10 classes of
each of CIFAR and Lacuna, and considers both a class unlearning scenario where the forget set is
the entire training set for class 5 (10%), as well as a selective unlearning one where 100 examples
of class 5 are forgotten (0.25% in CIFAR and 2% in Lacuna). We note that the Appendix contains
complete results for all scenarios (several are ommitted from the main paper due to space constraints)
and also contains the complete experimental details and hyperparameters.
7
Unlearning algorithms We compare against state-of-the-art approaches as well as various baselines:
Retrain: Retraining from scratch without the forget set. This is assumed to not be viable in practice,
but we include it as a reference. Original: The 'original' model trained on all of D without any
unlearning. Finetuning: Finetunes the original model on data from the retain set Dr. NegGrad+:
Similar to Finetuning, starts from the original model and finetunes it both on data from the retain
and forget sets, negating the gradient for the latter. Previous work considered a weaker baseline that
only trains on the forget set, with a negative gradient (NegGrad). We tune the stronger NegGrad+ to
achieve a good balance between the two objectives in the same way as SCRUB. Fisher Forgetting
[Golatkar et al., 2020a]. NTK Forgetting [Golatkar et al., 2020b]. Catastrophic Forgetting-k (CF-k)
and Exact Unlearning-k (EU-k) [Goel et al., 2022]: they freeze the first k layers of the original model
and either finetune the remaining layers on Dr (CF-k) or train them from scratch on Dr (EU-k).
Bad-T: the concurrent teacher-student method of [Chundawat et al., 2022]. We utilize the public code
for the NTK and Fisher for correctness. We implement Bad-T ourselves (no code was available).
5.2 Unlearning for Removing Biases (RB)
In RB, we desire to achieve the highest possible error on Df , without hurting the error of Dr and Dt.
Some example scenarios are removing biases from trained models, outdated or incorrect information.
A maximal forget error on Df in this case is desirable as it reflects that we want the model to never
make the predictions that were deemed harmful or no longer valid or accurate.
We report the results for this scenario in Figures 1 and 2. We also report complete results in the
Appendix for all architectures, datasets and baselines. As shown in Figure 2, SCRUB is by far the
most consistent method in terms of achieving high forget quality (highest forget error), while it
doesn't hurt retain and test errors.
5.3 Unlearning for Resolving Confusion (RC)
In this section, following Goel et al. [2022], we study unlearning for resolving confusion between
two classes that the original model suffers from due to a part of its training set being mislabelled.
Specifically, we place all and only the mislabeled training examples in the forget set. A successful
unlearning algorithm would thus entirely resolve the model's confusion. In more detail, the setup is:
1) Mislabel some portion of the training dataset (we mislabeled examples between classes 0 and 1 of
each of CIFAR-5 and Lacuna-5), 2) Train the 'original model' on the (partly mislabeled) training
dataset, and 3) Unlearn with the confused examples as the forget set.
We consider the following metrics inspired from Goel et al. [2022] that are variants of the model's
error on examples from the confused classes (lower is better for both). We outline them below and
define them formally in the Appendix.
• Interclass Confusion IC-ERR (e.g. IC test error, IC retain error). This counts mistakes
where an example from either of the two confused classes was incorrectly predicted to
belong to any other class.
• FGT-ERR (e.g. Fgt test error, Fgt retain error). This metric counts only misclassification
between the confused classes, i.e. an example of class 0 being predicted as belonging to
class 1, or vice versa.
We observe from Table 1 that, across the board, SCRUB is by far the most consistent method in terms
of eliminating class confusion without damaging the quality of the model (on retain and test sets).
5.4 Unlearning for User Privacy (UP)
Next, we consider a privacy-critical application: the deletion of the data of a user exercising their
right-to-be-forgotten. We use Membership Inference Attacks (MIAs) as the metric where the goal is
that, after applying unlearning, an attacker can't tell apart examples that were unlearned from those
that were truly never seen, thus protecting the privacy of the user requesting deletion.
While previous unlearning papers have reported MIA results [Golatkar et al., 2020a], those MIAs
are simple and far from state-of-the-art MIAs used in privacy and security papers. Indeed, it's not
trivial to adapt such MIAs to the unlearning protocol. To initiate bridging this gap, we report results
on two MIAs: 1) a simple one that is closer to the typical MIAs used in the unlearning literature, and
8
(a) Forget 100 examples.
(b) Forget 150 examples.
(c) Forget 175 examples.
(d) Forget 200 examples.
Figure 3: MIA results for different sizes of forget set on CIFAR-10 with ResNet. Error bars show
95% confidence intervals. Rewinding is most useful for smaller forget sizes (see the discussion in
Section 5.4). SCRUB+R successfully defends MIAs, comparably to the Retrain oracle.
2) the first, to our knowledge, adaptation of the state-of-the-art LiRA attack [Carlini et al., 2022] to
the unlearning protocol. We describe both at a high-level here and in detail in the Appendix.
Basic attack We train a binary classifier (the 'attacker') on the unlearned model's losses on forget
and test examples for the objective of classifying 'in' (forget) versus 'out' (test). The attacker then
makes predictions for held-out losses (losses the attacker wasn't trained on) that are balanced between
forget and test losses. For a perfect defense, the attacker's accuracy is 50%, indicating that it is unable
to separate the two sets, marking a success for the unlearning method.
mean
Class
Class
Model
ResNet
Selective
All-CNN
std mean
std mean
std mean
Selective
std
1.67
0.67
0.69
1.19
0.34
2.27
1.10
1.71
1.71
54.00
65.33
64.00
66.67
65.00
53.00
59.67
78.00
58.67
Retrain
Original
Finetune
NegGrad+
CF-k
EU-k
Bad-T
SCRUB
49.33
71.10
75.57
69.57
75.73
54.20
54.00
52.20
SCRUB+R 52.20
We present Basic MIA results in Table 2 for
CIFAR-10. We observe that SCRUB+R is
a strong performer. EU-k can also perform
strongly in this metric, though not as consis-
tently. We also observe that rewinding was only
triggered once, for selective unlearning. Recall
that, in both selective and class unlearning, the
forget set contains examples coming from a sin-
gle class, but in the former, it doesn't contain
all examples of that class; the rest are in the re-
tain set. Thus, we indeed expect that rewinding
would be more useful for selective unlearning:
the smaller the portion of a class in the forget
set, the larger the remainder of that class in the
retain set and consequently, the better we expect
the model to generalize on held-out examples of
that class (lower error), making it in turn more
likely to need to rewind, in order to also lower
the forget set error commensurately. In Figure 3 we plot results for different variants of selective
unlearning, with different number of examples in the forget set (from the same class) and indeed find
that for smaller numbers, rewinding is triggered. Our take-away is that, when needed, rewinding can
substantially improve SCRUB's MIA results.
Table 2: Basic MIA results (for UP): SCRUB
successfully defends MIA. Note the rewinding
procedure of SCRUB+R was triggered only once;
see discussion in Section 5.4 and Figure 3. In the
Appendix, we also show that the forget error of
SCRUB(+R) is close to that of Retrain, as desired.
48.73
71.40
74.97
70.03
72.93
51.60
77.67
54.30
54.30
55.00
66.50
68.00
72.00
69.00
66.50
63.4
52.00
52.00
4.00
0.50
1.00
0.00
2.00
3.50
1.2
0.00
0.00
0.24
0.70
1.27
1.92
1.06
1.22
4.11
2.24
2.24
1.63
0.47
0.82
1.70
0.00
3.27
4.19
2.45
1.89
LiRA-for-unlearning attack In the standard privacy setting, the LiRA attacker trains a large
number of 'shadow models' [Carlini et al., 2022], for which it controls which examples are in the
training set each time (by construction). To then predict the membership status of a 'target example',
it estimates two Gaussian distributions: the distribution of confidences of that example under shadow
models that trained on it, and the distribution of its confidences under shadow models that didn't. It
predicts that the target example is 'in' if the likelihood of the former is larger than that of the latter.
We propose the first, to our knowledge, adaptation of LiRA for unlearning. This is a strong attack
where we allow the attacker knowledge of the unlearning algorithm. Concretely, for each shadow
model, the attacker also produces a 'shadow unlearned' model by applying the given unlearning
algorithm several times, using a large number of forget sets (similar to Chen et al. [2021]). Now,
for each 'target example', this setup allows the attacker to estimate a different pair of Gaussians:
the distribution of (confidences of) that target example under models where it was forgotten, and as
before, under models where it was not seen. The attacker predicts the example was forgotten if its
likelihood under the former is larger than under the latter. We present all details and findings in the
Appendix and observe that SCRUB+R outperforms the other methods in defending this attack.
9
5.5 Overview of results and take-aways
Finetuning is a poor method: it may retain model utility but fails to forget. The previous state-the-
art NTK and Fisher models aren't among the top-performers either. The former performs poorly
across the board in terms of forgetting and doesn't scale beyond small datasets. The latter sometimes
performs well in RB in terms of forgetting, though not always and it is very slow (Figure 1), exceeding
the runtime of Retrain; as also observed in [Goel et al., 2022]. NegGrad+, our proposed enhancement
over the NegGrad baseline, is a strong baseline in terms of achieving a balance between forgetting
and utility (it performs well in several settings in terms of RB, albeit not as consistently as SCRUB)
and we encourage future work to report this baseline, though SCRUB outperforms it, especially for
RC. CF-k inherits the performance profile of Finetune: it maintains utility but forgets poorly. On the
other hand, EU-k more reliably forgets (performs strongly in UP, and often in RB), which is expected
relative to CF-k due to retraining part of the network, but SCRUB outperforms it significantly in
terms of RC and is more consistently a top performer in RB. A notable failure case that we discovered
for EU-k in RB is selective unlearning (notice the contrast between EU-k's forget error between e.g.
Figures 1a and 1b). This finding may speak to where class vs instance information is stored in neural
networks and warrants further investigation. Bad-T is very efficient, but performs poorly in terms of
forgetting, across all applications and also damages model utility. Overall, SCRUB is by far the most
consistent in successfully forgetting under different metrics without hurting utility and being efficient.
In the Appendix, we discuss limitations of our work, broader impact, future work and present full
experimental results and all details including hyperparameters and pseudocode.
6 Discussion and Conclusion
Despite substantial recent attention [Triantafillou et al., 2023], unlearning is a young area of research.
In this work, we propose SCRUB, an unlearning method that is unbound from limiting assumptions
and poor scalability limits. SCRUB(+R) is found empirically to perform very strongly: it is by far
the most consistent method in achieving good forgetting quality with respect to different application-
dependent metrics, while incurring only minimal utility degradation. As such, we believe that SCRUB
fills the important need for scalable unlearning methods that perform well in practice on several
metrics of interest. However, important questions remain open for future work.
Crucially, despite progress in this direction, a well-established formal definition of the problem of
unlearning remains elusive, and consequently we also lack well-established metrics for measuring
(theoretically or empirically) the quality of unlearning algorithms. In this work, we focus on empirical
evaluation with respect to different application-dependent metrics for forgetting quality that we believe
are relevant in real-world applications. However, as the unlearning community matures, we hope that
success criteria for (different applications of) unlearning will be formalized and standardized.
Further, an important limitation of SCRUB is the absence of theoretical guarantees, making it perhaps
ill-suited for certain application scenarios. While methods that come with guarantees exist, they
either aren't applicable to deep neural networks, or we find through our empirical analysis that they
perform poorly and don't scale beyond small datasets. Therefore, future work that theoretically
studies scalable methods like SCRUB would be very valuable. In absence of that, continuing to study
and better understand the trade-offs offered by different methods is an important direction.
On the practical side, we hope that future work continues to push the limits of scalability and studies
unlearning in larger models, different architectures, different training objectives like self-supervised
learning and different domains and modalities, including foundation language models.
Broader Impact While recent advances in deep learning represent exciting opportunities for our
community, they also come with great responsibility. As researchers, we are responsible for under-
standing and mitigating the issues associated with the widespread use of deep learning technology.
Machine learning models may carry harmful biases, unintended behaviours, or compromise user
privacy. Our work is intended to take a step in addressing these issues via a post-processing 'unlearn-
ing' phase that makes progress over previous solutions in practice, as we show through an extensive
empirical investigation. However, SCRUB does not come with theoretical guarantees and we can not
prove that applying SCRUB perfectly mitigates those issues, so caution must be taken in practice and
proper auditing of machine learning models is critical.
10
Acknowledgments and Disclosure of Funding
We would like to thank Fabian Pedregosa for countless insightful discussions, especially on the topic
of membership inference attacks.
References
Martin Abadi, Andy Chu, Ian Goodfellow, H Brendan McMahan, Ilya Mironov, Kunal Talwar, and
Li Zhang. Deep learning with differential privacy. In Proceedings of the 2016 ACM SIGSAC
conference on computer and communications security, pages 308–318, 2016.
Devansh Arpit, Stanisław Jastrz ̨ebski, Nicolas Ballas, David Krueger, Emmanuel Bengio, Maxinder S
Kanwal, Tegan Maharaj, Asja Fischer, Aaron Courville, Yoshua Bengio, et al. A closer look at
memorization in deep networks. In International conference on machine learning, pages 233–242.
PMLR, 2017.
Lucas Bourtoule, Varun Chandrasekaran, Christopher A Choquette-Choo, Hengrui Jia, Adelin Travers,
Baiwu Zhang, David Lie, and Nicolas Papernot. Machine unlearning. In 2021 IEEE Symposium
on Security and Privacy (SP), pages 141–159. IEEE, 2021.
Yinzhi Cao and Junfeng Yang. Towards making systems forget with machine unlearning. In 2015
IEEE Symposium on Security and Privacy, pages 463–480. IEEE, 2015.
Nicholas Carlini, Steve Chien, Milad Nasr, Shuang Song, Andreas Terzis, and Florian Tramer.
Membership inference attacks from first principles. In 2022 IEEE Symposium on Security and
Privacy (SP), pages 1897–1914. IEEE, 2022.
Min Chen, Zhikun Zhang, Tianhao Wang, Michael Backes, Mathias Humbert, and Yang Zhang. When
machine unlearning jeopardizes privacy. In Proceedings of the 2021 ACM SIGSAC Conference on
Computer and Communications Security, pages 896–911, 2021.
Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for
contrastive learning of visual representations. In International conference on machine learning.
PMLR, 2020.
Xinlei Chen and Kaiming He. Exploring simple siamese representation learning. In Proceedings of
the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2021.
Vikram S Chundawat, Ayush K Tarun, Murari Mandal, and Mohan Kankanhalli. Can bad teaching
induce forgetting? unlearning in deep networks using an incompetent teacher. arXiv preprint
arXiv:2205.08096, 2022.
Cynthia Dwork, Aaron Roth, et al. The algorithmic foundations of differential privacy. Foundations
and Trends® in Theoretical Computer Science, 9(3–4):211–407, 2014.
Simone Fabbrizzi, Symeon Papadopoulos, Eirini Ntoutsi, and Ioannis Kompatsiaris. A survey on
bias in visual datasets. Computer Vision and Image Understanding, page 103552, 2022.
Antonio Ginart, Melody Guan, Gregory Valiant, and James Y Zou. Making ai forget you: Data
deletion in machine learning. Advances in neural information processing systems, 32, 2019.
Shashwat Goel, Ameya Prabhu, and Ponnurangam Kumaraguru. Evaluating inexact unlearning
requires revisiting forgetting. arXiv preprint arXiv:2201.06640, 2022.
Aditya Golatkar, Alessandro Achille, and Stefano Soatto. Eternal sunshine of the spotless net:
Selective forgetting in deep networks. In Proceedings of the IEEE/CVF Conference on Computer
Vision and Pattern Recognition, pages 9304–9312, 2020a.
Aditya Golatkar, Alessandro Achille, and Stefano Soatto. Forgetting outside the box: Scrubbing deep
networks of information accessible from input-output observations. In European Conference on
Computer Vision, pages 383–398. Springer, 2020b.
11
Aditya Golatkar, Alessandro Achille, Avinash Ravichandran, Marzia Polito, and Stefano Soatto.
Mixed-privacy forgetting in deep networks. In Proceedings of the IEEE/CVF Conference on
Computer Vision and Pattern Recognition, pages 792–801, 2021.
Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair,
Aaron Courville, and Yoshua Bengio. Generative adversarial nets. Advances in neural information
processing systems, 27, 2014.
Laura Graves, Vineel Nagisetty, and Vijay Ganesh. Amnesiac machine learning. In Proceedings of
the AAAI Conference on Artificial Intelligence, volume 35, pages 11516–11524, 2021.
Jean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec, Pierre Richemond, Elena
Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Guo, Mohammad Gheshlaghi Azar,
et al. Bootstrap your own latent-a new approach to self-supervised learning. Advances in neural
information processing systems, 33:21271–21284, 2020.
Chuan Guo, Tom Goldstein, Awni Hannun, and Laurens Van Der Maaten. Certified data removal
from machine learning models. arXiv preprint arXiv:1911.03030, 2019.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image
recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition,
pages 770–778, 2016.
Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for
unsupervised visual representation learning. In Proceedings of the IEEE/CVF conference on
computer vision and pattern recognition, pages 9729–9738, 2020.
Geoffrey Hinton, Oriol Vinyals, Jeff Dean, et al. Distilling the knowledge in a neural network. arXiv
preprint arXiv:1503.02531, 2(7), 2015.
Yiyang Huang and Clément L Canonne. Tight bounds for machine unlearning via differential privacy.
arXiv preprint arXiv:2309.00886, 2023.
Zachary Izzo, Mary Anne Smart, Kamalika Chaudhuri, and James Zou. Approximate data deletion
from machine learning models. In International Conference on Artificial Intelligence and Statistics,
pages 2008–2016. PMLR, 2021.
Arthur Jacot, Franck Gabriel, and Clément Hongler. Neural tangent kernel: Convergence and
generalization in neural networks. Advances in neural information processing systems, 31, 2018.
Matthew Jagielski, Alina Oprea, Battista Biggio, Chang Liu, Cristina Nita-Rotaru, and Bo Li.
Manipulating machine learning: Poisoning attacks and countermeasures for regression learning. In
2018 IEEE Symposium on Security and Privacy (SP), pages 19–35. IEEE, 2018.
Junyaup Kim and Simon S Woo. Efficient two-stage model retraining for machine unlearning. In
Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages
4361–4369, 2022.
Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
Alessandro Mantelero. The eu proposal for a general data protection regulation and the roots of the
'right to be forgotten'. Computer Law & Security Review, 29(3):229–235, 2013.
Seth Neel, Aaron Roth, and Saeed Sharifi-Malvajerdi. Descent-to-delete: Gradient-based methods
for machine unlearning. In Algorithmic Learning Theory, pages 931–962. PMLR, 2021.
Curtis G Northcutt, Anish Athalye, and Jonas Mueller. Pervasive label errors in test sets destabilize
machine learning benchmarks. arXiv preprint arXiv:2103.14749, 2021.
German I Parisi, Ronald Kemker, Jose L Part, Christopher Kanan, and Stefan Wermter. Continual
lifelong learning with neural networks: A review. Neural Networks, 113:54–71, 2019.
Ayush Sekhari, Jayadev Acharya, Gautam Kamath, and Ananda Theertha Suresh. Remember
what you want to forget: Algorithms for machine unlearning. Advances in Neural Information
Processing Systems, 34:18075–18086, 2021.
12
Reza Shokri, Marco Stronati, Congzheng Song, and Vitaly Shmatikov. Membership inference attacks
against machine learning models. In 2017 IEEE symposium on security and privacy (SP), pages
3–18. IEEE, 2017.
Jost Tobias Springenberg, Alexey Dosovitskiy, Thomas Brox, and Martin Riedmiller. Striving for
simplicity: The all convolutional net. arXiv preprint arXiv:1412.6806, 2014.
Anvith Thudi, Gabriel Deza, Varun Chandrasekaran, and Nicolas Papernot. Unrolling sgd: Under-
standing factors influencing machine unlearning. In 2022 IEEE 7th European Symposium on
Security and Privacy (EuroS&P), pages 303–319. IEEE, 2022a.
Anvith Thudi, Hengrui Jia, Ilia Shumailov, and Nicolas Papernot. On the necessity of auditable
algorithmic definitions for machine unlearning. In 31st USENIX Security Symposium (USENIX
Security 22), pages 4007–4022, 2022b.
Eleni Triantafillou, Fabian Pedregosa, Jamie Hayes, Peter Kairouz, Isabelle Guyon, Meghdad Kur-
manji, Gintare Karolina Dziugaite, Peter Triantafillou, Kairan Zhao, Lisheng Sun Hosoya, Julio
C. S. Jacques Junior, Vincent Dumoulin, Ioannis Mitliagkas, Sergio Escalera, Jun Wan, Sohier
Dane, Maggie Demkin, and Walter Reade. Neurips 2023 - machine unlearning, 2023. URL
https://kaggle.com/competitions/neurips-2023-machine-unlearning.
Chen Wu, Sencun Zhu, and Prasenjit Mitra. Federated unlearning with knowledge distillation. arXiv
preprint arXiv:2201.09441, 2022.
Qizhe Xie, Minh-Thang Luong, Eduard Hovy, and Quoc V Le. Self-training with noisy student
improves ImageNet classification. In Conference on Computer Vision and Pattern Recognition,
pages 10687–10698, 2020.
Li Yang and Abdallah Shami. On hyperparameter optimization of machine learning algorithms:
Theory and practice. Neurocomputing, 415:295–316, 2020.
Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep
learning (still) requires rethinking generalization. Communications of the ACM, 64(3):107–115,
2021.
Yuheng Zhang, Ruoxi Jia, Hengzhi Pei, Wenxiao Wang, Bo Li, and Dawn Song. The secret revealer:
Generative model-inversion attacks against deep neural networks. In Proceedings of the IEEE/CVF
conference on computer vision and pattern recognition, pages 253–261, 2020.
Zijie Zhang, Yang Zhou, Xin Zhao, Tianshi Che, and Lingjuan Lyu. Prompt certified machine
unlearning with randomized gradient smoothing and quantization. Advances in Neural Information
Processing Systems, 35:13433–13455, 2022.
13
7 Appendix
This Appendix contains the following sections:
• Section 8: Limitations and Future Work
• Section 9: Experimental Details and Pseudocode
• Section 10: Formal Description of Metrics
• Section 11: Membership Inference Attacks: Description and Additional Findings
• Section 12: Ablations and Sensitivity Analysis
• Section 13: Larger-scale settings
• Section 14: Additional Results for Removing Biases (RB)
• Section 15: Additional Results for Resolving Confusion (RC)
• Section 16: Additional Results for User Privacy (UP)
8 Limitations and Future Work
SCRUB has shown impressive results in terms of being consistently a top-performer in terms of
unlearning, with a minimal drop in performance compared to previous works. However, SCRUB has
limitations that we hope future work will address.
A significant step for future work is to develop theoretical guarantees for the gains provided by
our methods. We opted to focus on an empirical approach for the following reasons: First, while
theoretical guarantees abound for linear models, deep networks pose additional significant challenges.
Second, methods accompanied with theoretical guarantees suffer from practical limitations with
respect to accuracy and/or scalability. For these reasons we opted to approach the problem from
a practical standpoint, pushing the envelope by developing unlearning algorithms which are top
performers across many important different application scenarios, different evaluation metrics,
different architectures and datasets. We look forward to future work that strives to strike a compromise
between effective unlearning, good performance, scalability, and theoretical insights.
Another limitation of SCRUB is the difficulty and instability associated with tuning the min-max
objective, as shown in the literature e.g. for GANs. For instance, this can lead to oscillating behaviour,
as we show in Figure 6. We remedy this to a large extent in practice by providing a practical
algorithm that works well, showing consistently improved results over prior work, but there is room
for improvement on this front for future work.
SCRUB's rewinding procedure also has limitations. We find in practice throughout all of our
experiments that it can help to substantially increase the success of SCRUB's defense on MIA in
scenarios where the forget error obtained by SCRUB at the end of unlearning is 'too high'. However,
a different failure case which can also appear is that SCRUB's forget error at the end of training is
'too low'. This can happen due to the way in which we tune hyperparameters, which is designed to not
harm the retain and validation performance too much, and thus can in some cases lead to 'premature
stopping' before the forget error reaches the same level as a reference point for how high it would be
if the model had truly never seen those examples. We highlight that addressing all possible issues
that can arise in all scenarios and provide an unlearning algorithm that performs strongly across the
board is extremely challenging. The fact that we have observed failure cases for each algorithm, be it
SCRUB or other baselines, is indicative of the extensiveness of the experimentation we conducted.
Our work has made important strides in designing consistently strong-performing unlearning methods
and we look forward to future contributions in this direction.
We hope that future work also continues to push the limits of scalability. We believe that our work
constitutes an important step in this direction. However, the datasets and models we consider aren't
too large, in order to allow comparisons to previous works that would not be feasible to run for larger
scale experiments. An interesting topic of future work is investigating the interplay between SCRUB
and other scalable algorithms like NegGrad+ with increasing amounts of scale.
Another really interesting future work direction is to investigate how different unlearning algorithms
interact with different architectures, like Transformers, and loss functions, like self-supervised
learning.
14
9 Experimental Details and Pseudocode
Algorithm 1 SCRUB
Require: Teacher weights wo
Require: Total max steps MAX-STEPS
Require: Total steps STEPS
Require: Learning rate ε
wu ← wo
i ← 0
repeat
if i < MAX-STEPS then
wu ← DO-MAX-EPOCH(wu)
end if
wu ← DO-MIN-EPOCH(wu)
until i < STEPS
Datasets. We have used CIFAR-10 and Lacuna-
10 datasets for evaluation purposes. CIFAR-10
consists of 10 classes with 60000 color images
of size 32 x 32. In our experiments, the train,
test, and validation sizes are 40000, 10000, and
10000 respectively. Lacuna-10 is a dataset de-
rived from VGG-Faces [Cao and Yang, 2015].
We have followed the same procedure described
in [Golatkar et al., 2020a] to build Lacuna. We
randomly select 10 celebrities (classes) with at
least 500 samples. We use 100 samples of each
class to form the test-set, and the rest make the
train-set. All the images are resized to 32 x 32.
We also use CIFAR-100 and Lacuna-100 to pre-
train the models. Lacuna-100 is built in a similar
way as Lacuna-10, and there is no overlap be-
tween the two datasets. We have not applied any
data augmentation throughout the experiments.
Small-Scale datasets. We followed the same procedure as decribed in [Golatkar et al., 2020b] to
create the small versions of CIFAR-10 and Lacuna-10, namely CIFAR-5 and Lacuna-5. To this end,
we take the first 5 classes of each dataset and randomly sample 100 images for each class. We make
the train and test sets by sampling from the respective train and test sets of CIFAR-10 and Lacuna-10.
We also make 25 samples from each class from the train set to create the validation sets.
Algorithm 2 DO-MAX-EPOCH
Require: Student weights wu
Require: Learning rate ε
Require: Batch size B
Require: Forget set Df
Require: Procedure NEXT-BATCH
b ← NEXT-BATCH(Df , B)
repeat
wu ← wu + ε∇wu
1
|b|
d(xf ; wu)
(cid:88)
xf ∈b
b ← NEXT-BATCH(Df , B)
until b
size 128.
Models. We use the same models with the same
architectural modifications in [Golatkar et al.,
2020a,b]. For All-CNN, the number of layers is
reduced and batch normalization is added before
each non-linearity. For Resnet, ResNet-18 ar-
chitecture is used. For small scale experiments,
the number of filters is reduced by 60% in each
block. For the large-scale experiments, the exact
architecture has been used.
Pretraining. Following the previous work for
consistency, we apply pretraining. Specifically,
for CIFAR datasets, we have pretrained the mod-
els on CIFAR-100. For Lacuna, we have pre-
trained the models on Lacuna-100. We pretrain
the models for 30 epochs using SGD with a fixed
learning rate of 0.1, Cross-Entropy loss function,
weight decay 0.0005, momentum 0.9, and batch
Baselines. 'Original' is the model trained on the entire dataset D. For 'Retrain', we train the same
architecture on Dr, with the same hyperparameters used during training of the original model. For
'Finetune', we fine-tune the 'original' model on Dr for 10 epochs, with a fixed learning rate of 0.01
and weight-decay 0.0005. For 'NegGrad+', we fine-tune the 'original' model using the following
loss:
L(w) = β ×
1
|Dr|
l(f (xi; w), yi) − (1 − β) ×
1
|Df |
|Dr|
(cid:88)
i=1
|Df |
(cid:88)
j=1
l(f (xj; w), yj)
(4)
Where β ∈ [0, 1]. We have tuned β to get a high forget-error while not destroying retain-error and
validation-error. For small-scale experiments, β = 0.95 and we have trained for 10 epochs, with
SGD, 0.01 lr and 0.1 weight-decay. For large-scale experiments β = 0.9999 and we have trained for
5 epochs, with SGD, 0.01 lr, and 0.0005 weight-deay. Please note that small β result in explosion
quickly. For 'CF-k', we freeze the first k layers of the network and finetune the rest layers with
Dr. We use the same setting as 'Finetune' baseline. For 'EU-k' we freeze the first k layers, and
15
model
dataset
unlearning-type
forget-set bs
retain-set bs max steps min steps
ResNet
All-CNN
CIFAR-10
CIFAR-10
Lacuna-10
Lacuna-10
CIFAR-5
Lacuna-5
CIFAR-10
CIFAR-10
Lacuna-10
Lacuna-10
CIFAR-5
Lacuna-5
class
selective
class
selective
selective
selective
class
selective
class
selective
selective
selective
512
16
128
32
32
32
512
16
32
8
16
32
128
64
128
32
32
32
256
64
32
32
32
32
2
5
5
4
10
5
3
5
4
2
5
5
3
5
5
4
10
10
4
5
4
4
10
10
Table 3: SCRUB's hyperparameters for each experiment
re-initialize the weights of the remaining layers and retrain them with Dr. As all the models are
pretrained on larger datasets, for re-initializing we use the weights of the pretrained models. For
'EU-k' we use the same settings as the 'Retrain' baseline. In both 'EU-k' and 'CF-k' baselines, for
both ResNet and All-CNN we freeze all the layers except for the last block of the network. For
Resnet the last block is block4 and for All-CNN, the last block of layers is the 9th sequential block.
For Bad-T, we follow the specifications given in Chundawat et al. [2022] with possible tuning of
the parameters in different settings to get the highest forget-error without damaging retain-error.
More specifically, for all models we perform one epoch of unlearning using Adam optimizer, and a
temperature scalar of 4. Also, we use the whole retain-set compared to 30% reported in their paper as
we empirically observed that using only 30% of retain-set for Bad-T yields high test errors.
Algorithm 3 DO-MIN-EPOCH
Require: Student weights wu
Require: Learning rate ε
Require: Batch size B
Require: Retain set Dr
Require: Procedure NEXT-BATCH
SCRUB pseudocode and parameters. We
train SCRUB using Algorithm 1. Throughout
the experiments, we tune the parameters to get a
high forget-error while retaining the retain and
validation error of the original model. We use
the same optimizer for both min and max steps.
We observed that for small-scale settings 'Adam'
optimizer works better, while in large-scale set-
tings both 'Adam' and 'SGD' could be used. For
all experiments, we initialize the learning rate at
0.0005 and decay it by 0.1 after a number of min
and max steps. Decaying the learning rate is cru-
cial to control the oscillating behaviour of our
min and max optimization. We apply a weight
decay of 0.1 for small-scale setting and 0.0005
for large scale experiments, with a momentum
of 0.9. Finally, we use different batch sizes for
the forget-set and the retain-set to control the
number of iteration in each direction, i.e the max and the min respectively. We report these in Table 3.
γl(f (xr; wu), yr)
b ← NEXT-BATCH(Dr, B)
b ← NEXT-BATCH(Dr, B)
repeat
wu ← wu − ε∇wu
αd(xr; wu) +
until b
(xr,yr)∈b
1
|b|
(cid:88)
System specification. For scale-up experiments, the code is executed in Python 3.8, on an Ubuntu 20
machine with 40 CPU cores, a Nvidia GTX 2080 GPU and 256GB memory.
10 Formal Description of Metrics
In this section, we give more details and mathematical definitions of the metrics that we use throughout
the paper. We first mathematically define the forget, retain and test errors, and then other application-
dependent metrics, for Resolving Confusion (RC) and User Privacy (UP).
16
Forget, retain and test errors Here, we define the retain error, forget error and test error. Let Dr,
Df and Dt denote the retain and forget portions of the training dataset, and a test dataset of heldout
examples, respectively. We define error (Err) as follows:
Err(D) = 1 −
1
|D|
(cid:88)
(xi,yi)∈D
1[arg max(f (xi; w)) == yi]
(5)
where f , parameterized by w is the neural network model (comprised of a feature extractor followed
by a softmax classifier layer), arg max(f (xi; w)) is the label that the model thinks is most likely for
example xi, and 1[x] is the indicator function that returns 1 if x is True and 0 otherwise.
Based on the above, the retain error, forget error and test error are computed as Err(Dr), Err(Df )
and Err(Dt), respectively.
Metrics for Unlearning for Resolving Confusion (RC) We now define the class confusion metrics
inspired by Goel et al. [2022]. Specifically, we explore a scenario where the forget set has confused
labels (e.g. for two classes A and B, examples of A are labelled as B, and vice versa). The idea
here is that, because mislabelled examples are only present in the forget set, successful unlearning
(removing the influence of the forget set) would lead to a model that is not at all confused between
classes A and B.
In more detail, the setup we follow is: 1) We first mislabel some portion of the training dataset (we
mislabelled examples between classes 0 and 1 of each of CIFAR-5 and Lacuna-5 in our experiments),
2) train the 'original model' on the (partly mislabelled) training dataset (it has mislabelled examples
for classes 0 and 1 but correct labels for the remaining classes), 3) perform unlearning where the
forget set contains all and only the confused examples. Given this, the goal for the unlearning
algorithm is to resolve the confusion of the original model.
We consider the following metrics (using terminology consistent with Goel et al. [2022]). They are
presented in order of decreasing generality, and increasing focus on measuring degrees of confusion
between the two classes considered.
• Error (e.g. test error, retain error, forget error). This counts all mistakes, so anytime that an
example of some class is predicted to be in any other class, it will be counted. These are the
same metrics that we use for the rest of the paper (see Equation 5). For test and retain error,
lower is better, whereas for forget error, higher is better.
• Interclass Confusion IC-ERR (e.g. IC test error, IC retain error). This counts only mistakes
that involve examples from the confused classes A and B. Specifically, it counts instances
of any example of class A being predicted to be in any other class , and similarly for class
B. Compared to Error, this metric is more focused towards understanding the result of the
introduced confusion, since it only considers cases that relate to the confused classes. A
successful unlearning method would make no such errors, so lower is better for each of IC
test error and IC retain error.
• FGT-ERR (e.g. Fgt test error, Fgt retain error). This metric counts only misclassification
between the confused classes A and B. Here, a mistake of an example of class A (or B)
being predicted to be in class other than A or B will not be counted. Only mistakes of an
example of class A being predicted to be in class B, and vice versa, are counted. This is
the most focused metric that directly measures the amount of remaining confusion
between the two classes in question. A successful unlearning method would make no such
errors, so lower is better for each of Fgt test and Fgt retain.
More formally, Error is the same as defined in Equation 5. Let us now mathematically define IC-ERR
and FGT-ERR. We denote by C w,D the confusion matrix for model parameterized by w on the dataset
D, and let DA denote the part of the dataset D that belongs to class A. So, for example DrA denotes
the part of the retain set Dr that belongs to class A, and the entry C w,D
A,B of the confusion matrix stores
the number of times that a sample belonging to class A was (mis)classified as belonging to class B in
the dataset D by the model parameterized by w. Then, we have:
(cid:80)
k C w,D
A,k + (cid:80)
|DA| + |DB|
k′ C w,D
B,k′
IC-ERR(D, A, B; w) =
17
(6)
where k ̸= A, k′ ̸= B.
So, for example, the 'IC test error' column in our tables is computed via IC-ERR(Dt, 0, 1; w), where
Dt denotes the test set, and 0 and 1 are the two classes confused in our experiments. Analogously,
'IC retain error' is computed as IC-ERR(Dr, 0, 1; w)
Finally:
FGT-ERR(D, A, B; w) = C w,D
A,B + C w,D
B,A
(7)
That is, FGT-ERR only measures the misclassification between the two confused classes A and B. So,
for example, the 'Fgt test error' in our tables is computed as FGT-ERR(Dt, 0, 1; w) and analogously
'Fgt retain error' is computed as FGT-ERR(Dr, 0, 1; w).
User Privacy (UP) Metrics Please see the next section for full details for each of the two Membership
Inference Attacks (MIAs) that we use and experimental results.
11 Membership Inference Attacks: Description and Additional Findings
As mentioned in our paper, we utilize two different MIAs: 1) a 'Basic MIA' that is similar to the ones
typically used in unlearning papers (but far from the state-of-the-art of MIAs used by privacy and
security colleagues), and 2) the first, to our knowledge, adaptation of the state-of-the-art LiRA attack
[Carlini et al., 2022] to the framework of unlearning ('LiRA-for-unlearning' MIA).
In this section, we use the term 'target model' to refer to the model that is being attacked and the
term 'target example' to refer to an example whose membership status ('in' or 'out') the attacker
tries to predict, based on the 'behaviour' (e.g loss value) of that example under the 'target model'. In
both attacks that we consider, the target model is the unlearned model, and target examples are either
forget set ('in') or test set ('out') examples. The unlearning algorithm successfully defends an MIA if
the attacker can't tell apart examples that were unlearned (forget set examples) from examples that
were truly never seen.
11.1 Basic MIA
Returning to our previous notation, let l(f (x; wu), y) denote the cross-entropy loss of the unlearned
model (a deep network f with weights wu) on example x with label y. We abbreviate this as l(x, y)
from now on; dropping the dependence on f and wu.
eval = {(l(xi, yi), yb
train = {(l(xi, yi), yb
The attacker is a binary classifier that takes as input loss values, coming from either the forget set
Df or a held-out test set Dt, and predicts whether the example whose loss value was presented
was in the training set of the original model. We train this attacker via supervised learning on a
class-balanced labelled training set for this binary problem: Db
i )} where each xi
is an example coming either from Df or Dt, and its binary label yb
i is defined as being 0, if xi ∈ Dt
and 1 if xi ∈ Df . Once the binary classifier attacker is trained, we use it to make predictions for a
held-out evaluation set of the binary problem: Db
i )} that is also balanced between
examples coming from Df and Dt, but is disjoint from Db
The attacker succeeds if it achieves high accuracy on Db
eval, meaning that it can tell apart examples
that were part of the original training set from those that weren't, which marks a defeat for the
unlearning model in terms of this metric, since it has 'left traces behind' (in this case, in terms of
loss values) and leaks information about membership in the forget set. We consider that an optimal
defense against this MIA corresponds to a 50% attack accuracy; that is, no better than randomly
guessing whether an example had been trained on. In principle, the Retrain oracle should defend
optimally: it in fact did not train on the forget set, so the forget and test sets are simply two different
held-out sets for this model whose loss values should generally be indistinguishable from each other
if these sets are identically-distributed. We find in our experiments, presented in the main paper, that
SCRUB+R is able to defend this MIA comparably to Retrain, and outperforms the other baselines in
its ability to consistently do so.
train.
Experimental details
In practice, if the distribution of the forget set and the test set are very
different from each other, their loss values will be very distinguishable. This means that the binary
classifier can tell them apart easily, but without having truly learned to infer membership in the
18
Figure 4: ROC curves for the strong LiRA-for-unlearning attack (Area Under the Curve (AUC) is
also reported in the legend, for each unlearning method). Different subplots correspond to different
target models (we trained the target unlearned model 5 times for each unlearning method, using
different random seeds, and different forget sets). Positives are examples in the forget set, and
negatives in the test set. A true positive means that the attacker correctly identified that an example
was forgotten, whereas a false positive means that it incorrectly predicted that a test example was
forgotten. We are primarily interested in the area of small False Positive Rate [Carlini et al., 2022]
and a good unlearning method is associated with a smaller True Positive Rate, i.e. fewer successes for
the attacker, especially in the region of interest. We observe that SCRUB(+R) defends the strong
LiRA-for-unlearning attack more successfully than the other baselines.
training dataset. This makes the attacker's evaluation unreliable. To circumvent this problem, we
ought to pick the held-out test set from the same distribution. More specifically, if the forget set is
examples from the 'cat' class of CIFAR10 dataset, we use the same class for our held-out test set.
In our experiments, we clip the loss values to a range between [-400, +400] to remove anomalies.
Also, we use the default LogisticRegression() classifier of the Python's scikit-learn library as our
attack model, and perform a cross-validation with 5 random splits. We report the average accuracy of
the evaluation part of each of the 5 folds as the MIA score. Ideally (for a perfect defense), this score
is closest to 50%, indicating that the attacker fails to tell apart the forget set from the test set.
We present additional results for the Basic MIA attack in Section 16.
11.2 LiRA-for-unlearning attack
In the standard privacy setting, the LiRA attacker [Carlini et al., 2022] trains a large number of
'shadow models' [Shokri et al., 2017], for which it controls which examples are in the training set
each time (by construction). To then predict the membership status of a 'target example', it estimates
two Gaussian distributions, using the shadow models: the distribution of confidences of that example
under shadow models that trained on it, and the distribution of its confidences under shadow models
that didn't. Then, it computes the confidence of the target example under the target model and it
predicts that the target example was 'in' if the likelihood of the target confidence under the former
Gaussian is larger than that under the latter Gaussian.
Adapting LiRA to the framework of unlearning is not trivial, and we are not aware of this done in any
previous work. We propose the first, to our knowledge, adaptation of LiRA for unlearning. This
is a strong attack where we allow the attacker knowledge of the unlearning algorithm. Concretely, for
each shadow model, the attacker also produces a 'shadow unlearned' model by applying the given
unlearning algorithm several times, using a large number of forget sets (similar to Chen et al. [2021]).
Now, for each 'target example', this setup allows the attacker to estimate a different pair of Gaussians:
the distribution of (confidences of) that target example under models where it was forgotten, and as
before, under models where it was not seen. The attacker then computes the confidence of the target
example under the target model, and predicts the example was forgotten if its likelihood under the
former is larger than under the latter.
19
103102101100False Positive Rate103102101100True Positive RateOriginal = 0.92SCRUB = 0.72SCRUB+R = 0.72NegGrad+ = 0.80CF-k = 0.92EU-k = 0.84103102101100False Positive Rate103102101100True Positive RateOriginal = 0.92SCRUB = 0.73SCRUB+R = 0.74NegGrad+ = 0.80CF-k = 0.91EU-k = 0.82103102101100False Positive Rate103102101100True Positive RateOriginal = 0.92SCRUB = 0.74SCRUB+R = 0.74NegGrad+ = 0.79CF-k = 0.92EU-k = 0.81103102101100False Positive Rate103102101100True Positive RateOriginal = 0.92SCRUB = 0.74SCRUB+R = 0.73NegGrad+ = 0.79CF-k = 0.92EU-k = 0.81103102101100False Positive Rate103102101100True Positive RateOriginal = 0.92SCRUB = 0.73SCRUB+R = 0.73NegGrad+ = 0.79CF-k = 0.92EU-k = 0.81Experimental setup: overview We run our
LiRA-for-unlearning attack on selective unlearn-
ing on CIFAR-10, for the scenario where the
forget set has size 200 and comes from class 5.
Attacker: For the attacker, we first train 256
'shadow original' models on random splits of
half of the CIFAR-10 training set. Let D de-
note the original dataset. To train each shadow
model, we split D in half, and use one half to
as the 'training set' and the other half as the
'test set' of that particular shadow model. Then,
for each of these 'shadow original' models, we
run unlearning on 10K different forget sets (for
each unlearning method). Specifically, the for-
get set is a random subset of 200 examples of
class 5, sampled from the training set of the cor-
responding 'shadow original' model. After this
procedure, for every example in class 5, we se-
lect 256 associated shadow models when it was
not included in training, and 256 shadow models
when it was unlearned (i.e. it was in the forget
set). After this, the LiRA attack proceeds as
normal, where we take each in / out distribution
and apply a likelihood ratio test on an unknown
example to infer membership.
Figure 5: Sensitivity of SCRUB to γ and α. To
create this plot, we ran SCRUB many times for dif-
ferent values of γ ([0.1, 0.5, 1, 2, 3]) and α ([0.1,
0.5, 1, 2, 3]). The x-axis is represents combinations
of these values. t-error, f-error and r-error refer to
test, forget and retain error, respectively. We find
that SCRUB is not very sensitive to these hyper-
parameters: the retain error remains low across
values, and there are several different settings to
these hyperparameters for which we can obtain the
desired results for test and forget errors too.
Defender: We next train the target model that
LiRA-for-unlearning will attack. For this, we
begin by training the 'original' model, on (a
random split of) half of D. Then, we apply the given unlearning algorithm on a randomly-sampled
forget set, which is a subset of the original model's training set of size 200, coming from class 5, in
the same way as was done by the shadow models.
Implementation note We run this attack at a much larger scale than the remaining experiments of
the paper (we run 10K unlearning runs, on different forget sets, for each of the 256 'shadow original'
models). We do this because the strength of the attacker is heavily dependent on the number of
shadow original/unlearned models, and we wanted to benchmark our baselines against a very strong
attacker. Therefore, to allow better scaling, instead of implementing SCRUB+R as rewinding, we
implement it through filtering runs of SCRUB that don't satisfy the condition of SCRUB+R that the
forget set error should be close to the validation error (where, as explained in the main paper, this
refers to the validation set that is constructed to have the same distribution as the forget set; containing
examples of only the same class as the one in the forget set). We used 0.1 as our threshold.
Computing the 'confidence' Consistent with [Carlini et al., 2022], the confidence of an example
(x, y) (where y denotes the ground-truth class label) is defined as softmax(f (x))[y]. In words, the
confidence is the softmax probability of the correct class. Following Carlini et al. [2022], we apply
logit-scaling to each confidence, to make their distributions Gaussian.
Conclusions and findings Figure 4 plots the ROC curve, showing the False Positive Rate and
True Positive Rate of the attacker, in log-log scale. Different subplots correspond to different target
unlearned models, each of which was trained with a different random seed, and different retain/forget
set split. A successful defense is associated with a smaller Area Under the Curve (AUC); meaning
fewer True Positives for the attacker. Carlini et al. [2022] however advocate that the AUC is not a
good indicator of the attacker's strength and, instead, they argue that we should primarily consider the
region of the ROC curve associated with very small False Positive Rates. We observe that, especially
in that region, SCRUB(+R) is the strongest method in terms of defending our LiRA-for-unlearning
attack (and also we observe that SCRUB(+R) has the best AUC too). The improved NegGrad+
baseline that we also proposed in this paper is also a strong model in terms of defending this attack.
20
(a) Only max steps (Equation 1).
(b) SCRUB with insufficient max steps.
(c) SCRUB with too many max steps.
(d) SCRUB.
Figure 6: Illustration of training dynamics of SCRUB variants, on CIFAR-5 with a ResNet model.
Performing the right interleaving of min-steps and max-steps is important for achieving a good
balance between high forget error and low retain and validation errors.
We found that CF-k is not able to improve the privacy of the original model in most cases, while
EU-k can sometimes improve but only slightly, and not reliably.
Limitations To stay consistent with previous work on unlearning, as mentioned previously, we
turn off data augmentations. Consequently, the 'original model' (before unlearning is applied) has
overfitted more than a state-of-the-art CIFAR model would. Indeed, as can be seen from Figure 4,
the 'Original' model has poor privacy (the attacker has a high True Positive Rate). We note that this
is the first, to our knowledge, investigation of privacy of unlearning algorithms using strong MIAs,
and we hope that future work continues to investigate increasingly more realistic scenarios with
models closer to the state-of-the-art, and considers unlearning on original models of varying degrees
of privacy and generalization ability.
12 Ablations and Sensitivity Analysis
In this section, we illustrate the training dynamics of SCRUB and the importance of different design
choices. As a reminder, the student is initialized from the teacher and subsequently undergoes an
alternating sequence of max-steps and min-steps; the former encouraging the student to move far
from the teacher on the forget set, and the latter encouraging it to stay close to the teacher on the
retain set. We also found it useful to perform a sequence of additional min-steps after the alternating
sequence. We now explore the effect of these decisions.
First, we show that performing only max-steps, by optimizing Equation 1, is not a good solution.
Simply pushing the student away from the teacher on the forget set achieves forgetting but unfortu-
nately also hurts the retain and validation set performance (Figure 6a). Therefore, alternating between
max-steps and min-steps is necessary. However, it is important to find the right balance. For instance,
as seen in Figure 6b, performing too few max-steps leads to the unwanted consequence of the forget
error dropping. On the other hand, removing the final sequence of only min-steps is also harmful,
as shown in Figure 6c that trains for a larger number of epochs of an equal number of (alternating)
max-steps and min-steps without achieving a good balance at any point throughout the trajectory.
On the other hand, SCRUB (Figure 6d) achieves a good balance of high forget error and low retain
and validation error simultaneously. We also ablate the cross-entropy term in Equation 3, which
provides a small but consistent added protection against degrading performance in Figure 10. We
show additional examples of training dynamics (Figures 7, 8, 9).
21
(a) Performing only max steps (Equation 1).
(b) SCRUB with insufficient max steps.
(c) SCRUB with too many max steps.
(d) SCRUB.
Figure 7: Illustration of training dynamics of SCRUB variants, on CIFAR-5 with All-CNN. Per-
forming the right interleaving of min-steps and max-steps is important for achieving a good balance
between high forget error and low retain and validation errors.
Table 4: Results for class-unlearning. Class-0 (400 examples) of Cifar-100 (40k examples). The
numbers are averaged over 3 runs.
Model
Test error (↓) Retain error (↓)
std mean
mean
std
Forget error (↑)
mean
std
Basic MIA
std
mean
Original
Retrain
NegGrad+
Bad-T@epoch1
Bad-T@epoch10
SCRUB+R
SCRUB
35.84
36.92
43.16
44.14
43.33
37.60
38.27
0.76
1.02
3.13
1.84
1.27
1.18
3.08
0.07
0.09
6.86
8.78
7.74
0.12
0.78
0.02
0.06
5.16
2.08
3.21
0.10
2.47
0.00
100.00
49.50
63.83
85.33
100.00
100.00
0.00
0.00
12.79
24.64
4.18
0.00
0.00
61.67
55.67
64.67
61.67
63.33
57.33
48.33
16.20
34.09
18.07
20.57
28.15
28.99
12.25
Finally, we also investigate the sensitivity of SCRUB's results on the γ and α hyperparameters, in
Figure 5. We find that SCRUB is not very sensitive to these hyperparameters: the retain error remains
low across values, and there are several different settings to these hyperparameters for which we can
obtain the desired results for test and forget errors too.
13 Larger-scale Settings
In this section, we scale up to an even larger setting, by choosing a larger model and performing a
larger classification task. The experiments here are conducted on VGG16+BN with almost 138M
parameters, and CIFAR-100, with varying forget set sizes. The results are reported in Table 4 and
Table 5. Furthermore, for these experiments we train Bad-T for different number of iterations (recall
that Bad-T originally proposes 1 epoch of unlearning) to study if its performance would improve with
longer iterations. The results suggest that, again, SCRUB is consistently among the top performers
across all the metrics. Furthermore, the results show that longer iterations does not improve Bad-T in
any of the metrics.
22
(a) Performing only max steps (Equation 1).
(b) SCRUB with insufficient max steps.
(c) SCRUB with too many max steps.
(d) SCRUB.
Figure 8: Illustration of training dynamics of SCRUB variants, on Lacuna-5 with ResNet. Performing
the right interleaving of min-steps and max-steps is important for achieving a good balance between
high forget error and low retain and validation errors.
(a) Performing only max steps (Equation 1).
(b) SCRUB with insufficient max steps.
(c) SCRUB with too many max steps.
(d) SCRUB.
Figure 9: Illustration of training dynamics of SCRUB variants, on Lacuna-5 with All-CNN. Per-
forming the right interleaving of min-steps and max-steps is important for achieving a good balance
between high forget error and low retain and validation errors.
23
(a) CIFAR-5 with ResNet.
(b) CIFAR-5 with All-CNN.
(c) Lacuna-5 with ResNet.
(d) Lacuna-5 with All-CNN.
Figure 10: Effect of adding the cross-entropy loss in Equation 3. Dashed lines omit cross-entropy
while solid lines use it. We find that the addition of cross-entropy offers an additional protection to
maintaining the model's performance during the unlearning procedure. This sometimes comes at
the cost of smaller forget set error, compared to the forget set error that would have been achieved if
cross-entropy was omitted from the loss.
Table 5: Results for selective unlearning. 10 examples from class-0 of Cifar-100 dataset.The numbers
are averaged over 10 runs.
Forget Size
Model
Test error (↓) Retain error (↓)
mean
mean
std
std
10
20
Original
Retrain
NegGrad+
Bad-T@epoch1
Bad-T@epoch10
SCRUB+R
SCRUB
Original
Retrain
NegGrad+
Bad-T@epoch1
Bad-T@epoch10
SCRUB+R
SCRUB
37.46
37.54
45.98
47.23
47.09
38.40
38.18
37.46
37.74
45.56
46.46
45.88
38.39
38.29
4.99
5.24
6.79
5.76
5.65
4.70
4.78
4.99
5.31
7.00
6.28
5.70
4.63
4.61
0.54
0.57
11.64
13.79
13.80
0.69
0.48
0.54
0.56
11.14
12.95
12.03
0.68
0.49
1.74
1.84
12.02
10.28
9.79
2.07
1.44
1.74
1.77
12.57
11.71
9.44
2.00
1.42
24
Forget error (↑)
mean
std
Basic MIA
std
mean
0.00
19.00
44.00
66.00
96.00
40.00
45.00
0.00
19.50
47.00
55.50
92.00
23.00
29.00
0.00
15.81
11.15
18.22
8.07
13.33
13.60
0.00
12.00
9.89
16.20
10.25
8.70
16.28
58.00
45.00
55.00
62.00
77.00
61.00
56.00
63.00
49.00
67.50
55.00
70.00
49.50
54.50
9.10
19.04
23.88
30.20
17.25
17.59
19.76
10.96
11.47
13.94
21.59
10.87
11.68
18.54
Model
Finetune
Fisher
NegGrad+
CF-k
EU-k
Bad-T
SCRUB
CIFAR-10
Lacuna-10
ResNet
All-CNN
ResNet
All-CNN
class
selective
class
selective
class
selective
class
selective
3.8
0.08
3.4
3.55
1.41
19.07
7.84
3.09
0.07
2.96
3.17
1.26
20.44
7.41
3.33
0.16
2.30
3.37
1.34
17.91
6.36
3.03
0.14
2.97
2.91
1.20
17.03
5.33
1.7
0.08
1.66
3.42
1.39
20.05
2.17
2.03
0.07
1.5
3.20
1.28
20.27.
1.95
2.16
0.16
2.41
3.27
1.32
16.32
2.81
2.00
0.15
2.27
3.11
1.26
16.02
2.48
Table 6: Scale-up factor: the fraction of the runtime of retrain from scratch over the runtime of each
given unlearning algorithm. That is, a scale-up value of X for an unlearning algorithm means that
that algorithm runs X times faster than retrain from scratch.
Model
Retrain
Original
Finetune
Fisher
NTK
NegGrad+
CF-k
EU-k
Bad-T
SCRUB
CIFAR-5
Test error (↓) Retain error (↓)
std mean
mean
std
Forget error (↑) Test error (↓) Retain error (↓)
mean
mean
mean
std
std
std
Lacuna-5
24.9
24.2
24.3
31.6
24.4
25.5
22.6
23.5
27.73
24.2
2.5
2.6
2.4
3.4
2.6
1.1
1.9
1.1
1.89
1.6
0.0
0.0
0.0
14.0
0.0
0.0
0.0
0.0
5.12
0.0
0.0
0.0
0.0
6.0
0.0
0.0
0.0
0.0
1.56
0.0
28.8
0.0
0.0
4.8
22.4
41.3
0.0
10.7
8.00
40.8
5.9
0.0
0.0
5.2
9.2
6.1
0.0
2.3
8.64
1.8
5.8
5.7
5.6
14.0
5.6
6.1
5.8
5.9
5.00
6.2
0.4
0.4
0.3
3.6
0.5
0.7
0.4
0.6
0.33
0.73
0.0
0.0
0.0
6.7
0.0
0.0
0.0
0.0
0.14
0.0
0.0
0.0
0.0
3.3
0.0
0.0
0.0
0.0
0.10
0.0
Forget error (↑)
mean
std
4.8
0.0
0.0
6.4
0.0
1.3
0.0
0.0
0.00
24.8
3.4
0.0
0.0
8.3
0.0
2.3
0.0
0.0
0.00
5.2
Table 7: Small-scale results with ResNet for the Removing Biases (RB) application. SCRUB is the
top-performer in terms of forgetting with minimal performance degradation.
14 Additional Results for Removing Biases (RB)
In this section, we provide the results for all scenarios we studied for the Removing Biases (RB)
application for ResNet and All-CNN, on both CIFAR and Lacuna, for both small-scale and large-scale,
for completeness, in Tables 7, 8, 9, 10, 11, 12.
Model
Test error (↓) Retain error (↓)
mean
mean
std
std
CIFAR-5
Forget error (↑)
mean
std
Test error (↓)
std
mean
Lacuna-5
Retain error (↓)
mean
std
Forget error (↑)
mean
std
Retrain
24.36
1.61
0.13
0.28
28.8
9.12
4.6
0.38
0.0
0.0
4.67
6.41
24.08
23.48
42.64
24.16
26.07
22.67
25.87
25.87
23.88
Original
Finetune
Fisher
NTK
NegGrad+
CF-k
EU-k
Bad-T
SCRUB
0.0
0.0
16.83
8.29
10.58
0.00
6.93
4.99
8.2
Table 8: Small-scale results with All-CNN for the Removing Biases (RB) application. SCRUB is
the top-performer in terms of forgetting with minimal performance degradation.
0.47
10.76
13.87
0.47
0.76
0.70
0.20
0.66
0.72
0.0
13.22
14.54
0.0
0.12
0.00
0.00
0.79
0.0
0.17
0.04
31.83
0.17
0.56
0.00
3.23
9.68
0.08
0.0
0.0
15.2
13.6
36.00
0.00
8.00
10.67
40.8
0.0
40.03
40.43
4.68
13.86
0.00
0.00
0.00
4.13
0.0
19.33
39.33
3.33
12.00
0.00
0.00
0.00
25.33
0.38
0.09
10.47
0.38
0.49
0.00
1.69
0.45
0.12
0.0
6.63
51.09
0.0
0.14
0.00
0.00
2.32
0.0
4.53
9.77
52.53
4.47
5.27
4.67
5.20
8.87
3.87
1.86
1.91
6.56
1.77
1.21
1.55
0.64
1.80
1.78
25
Model
Retrain
Original
Finetune
Fisher
NegGrad+
CF-k
EU-k
Bad-T
SCRUB
CIFAR-10
Test error (↓) Retain error (↓)
mean
mean
std
std
Lacuna-10
Forget error (↑) Test error (↓) Retain error (↓)
mean
mean
mean
std
std
std
14.72
16.56
16.41
26.42
17.84
15.31
18.73
19.56
15.73
0.16
0.1
0.09
1.41
1.46
0.12
0.42
1.44
0.17
0.0
0.0
0.0
2.45
1.74
0.00
0.00
11.34
0.51
0.0
0.0
0.0
0.84
2.55
0.00
0.00
1.82
0.02
100.0
0.0
0.0
100.0
91.26
0.03
98.79
94.67
100.0
0.0
0.0
0.0
0.0
7.73
0.01
0.18
6.12
0.0
2.87
3.07
3.02
3.33
3.41
2.89
3.19
3.37
3.69
0.34
0.26
0.37
0.54
0.17
0.22
0.17
0.50
0.36
0.0
0.0
0.0
0.0
0.00
0.00
0.01
1.06
0.28
0.0
0.0
0.0
0.0
0.00
0.00
0.02
0.47
0.23
Forget error (↑)
mean
std
99.75
0.0
0.0
100.0
14.90
0.00
4.06
67.60
100.0
0.56
0.0
0.0
0.0
1.78
0.00
0.83
24.26
0.0
Table 9: Large-scale, class unlearning results with ResNet for the Removing Biases (RB) applica-
tion. SCRUB and EU-k are the top-performers in this setting in terms of forgetting with minimal
performance degradation. Note, however, that EU-k doesn't perform strongly across the board and in
particular performs very poorly in selective unlearning (notice the contrast between EU-k's forget
error between Figures 1a and 1b Fisher is also a top-performer in terms of forget error in this setting
too, but on CIFAR causes a large degradation in test error, as is often observed for this method.
Model
Retrain
Original
Finetune
Fisher
NegGrad+
CF-k
EU-k
Bad-T
SCRUB
CIFAR-10
Test error (↓) Retain error (↓)
std mean
mean
std
Lacuna-10
Forget error (↑) Test error (↓) Retain error (↓)
mean
mean
mean
std
std
std
13.97
15.56
15.39
27.4
17.87
14.99
15.30
16.98
15.06
0.19
0.25
0.22
2.28
0.31
0.23
0.69
0.40
0.14
0.0
0.0
0.0
3.66
0.58
0.00
0.13
5.84
0.12
0.0
0.0
0.0
1.03
0.13
0.00
0.14
0.43
0.03
100.0
0.0
0.0
99.0
87.22
0.00
100.00
81.93
100.0
0.0
0.0
0.0
0.0
1.67
0.00
0.00
3.50
0.0
1.59
1.56
1.67
1.78
1.63
1.48
1.74
2.56
2.0
0.36
0.33
0.44
0.29
0.17
0.36
0.45
0.09
0.4
0.0
0.0
0.0
0.0
0.00
0.00
0.00
0.37
0.0
0.0
0.0
0.0
0.0
0.00
0.00
0.00
0.18
0.0
Forget error (↑)
mean
std
100.0
0.0
0.0
89.0
6.56
0.00
77.19
38.65
100.0
0.0
0.0
0.0
0.0
1.13
0.00
39.51
36.80
0.0
Table 10: Large-scale, class unlearning results with All-CNN for the Removing Biases (RB) appli-
cation. SCRUB is the top-performer in terms of forgetting with minimal performance degradation.
Model
Retrain
Original
Finetune
Fisher
NegGrad+
CF-k
EU-k
Bad-T
SCRUB
CIFAR-10
Test error (↓) Retain error (↓)
mean
mean
std
std
Lacuna-10
Forget error (↑) Test error (↓) Retain error (↓)
mean
mean
mean
std
std
std
17.4
17.36
17.37
21.23
22.7
17.4
21.8
23.47
18.04
0.14
0.14
0.11
0.27
0.6
0.1
0.2
1.57
0.2
0.0
0.0
0.0
2.88
4.1
0.0
0.4
14.53
0.0
0.0
0.0
0.0
0.54
0.5
0.0
0.6
1.65
0.0
29.67
0.0
0.0
3.0
53.7
0.0
23.7
34.67
70.33
3.21
0.0
0.0
2.65
6.8
0.0
3.5
1.70
4.16
2.7
2.73
2.63
3.1
4.7
2.7
2.9
7.30
3.0
0.2
0.15
0.12
0.35
0.2
0.2
0.1
2.20
0.0
0.0
0.0
0.0
0.0
0.9
0.0
0.0
3.26
0.0
0.0
0.0
0.0
0.0
0.1
0.0
0.0
1.83
0.0
Forget error (↑)
mean
std
1.0
0.0
0.0
0.0
13.0
0.0
0.0
0.33
4.67
1.0
0.0
0.0
0.0
1.0
0.0
0.0
0.47
3.06
Table 11: Large-scale, selective unlearning results with ResNet for the Removing Biases (RB)
application. SCRUB and NegGrad+ are the top-performers in terms of forgetting, though NegGrad+
has worse test performance than SCRUB in both cases. Note also that NegGrad+ isn't as consistent
at forgetting across settings as SCRUB.
26
Model
Retrain
Original
Finetune
Fisher
NegGrad+
CF-k
EU-k
Bad-T
SCRUB
CIFAR-10
Test error (↓) Retain error (↓)
mean
mean
std
std
Lacuna-10
Forget error (↑) Test error (↓) Retain error (↓)
mean
mean
mean
std
std
std
16.47
16.43
16.5
21.39
21.36
16.29
17.62
22.43
16.55
0.21
0.08
0.18
1.22
0.34
0.07
0.61
0.37
0.11
0.0
0.0
0.0
4.0
3.23
0.00
0.11
10.13
0.0
0.0
0.0
0.0
1.44
0.37
0.00
0.11
0.15
0.0
25.67
0.0
0.0
13.0
45.33
0.00
0.33
1.67
29.33
2.31
0.0
0.0
11.27
2.89
0.00
0.58
1.25
3.21
1.6
1.53
1.43
1.87
2.77
1.53
1.83
4.90
2.07
0.44
0.31
0.21
0.21
0.25
0.31
0.47
2.10
0.31
0.0
0.0
0.0
0.01
0.40
0.00
0.00
1.34
0.0
0.0
0.0
0.0
0.02
0.07
0.00
0.00
1.20
0.0
Forget error (↑)
mean
std
0.67
0.0
0.0
0.0
8.67
0.00
0.00
0.67
1.67
0.58
0.0
0.0
0.0
0.58
0.00
0.00
0.94
0.58
Table 12: Large-scale, selective unlearning results with All-CNN for the Removing Biases (RB)
application. SCRUB and NegGrad+ are the top-performers in terms of forgetting, though NegGrad+
has worse test performance than SCRUB in both cases. Note also that NegGrad+ isn't as consistent
at forgetting across settings as SCRUB, as can be seen in Figure 2
model
Retrain
Original
Finetune
NegGrad+
CF-k
EU-k
Fisher
NTK
SCRUB
Test error (↓) Retain error (↓)
mean
mean
std
std
Forget error (↑)
mean
std
IC test error (↓)
mean
std
IC retain error (↓)
mean
std
Fgt test error (↓)
mean
std
Fgt retain error (↓)
mean
std
26.67
41.0
38.13
36.27
39.6
37.47
44.8
32.6
25.93
2.87
2.09
1.42
0.42
1.64
1.62
2.36
2.51
3.13
0.0
0.0
0.0
0.0
0.0
7.33
21.33
0.0
1.08
0.0
0.0
0.0
0.0
0.0
1.26
3.45
0.0
0.52
90.33
0.0
0.0
12.67
0.0
43.67
32.0
60.33
96.0
1.53
0.0
0.0
21.94
0.0
2.08
11.53
0.58
1.73
24.0
56.0
52.0
47.5
54.83
47.0
51.5
37.5
19.0
1.8
3.04
3.12
5.27
2.02
4.77
7.47
4.0
3.91
0.0
0.0
0.0
0.0
0.0
8.33
26.33
0.0
0.0
0.0
0.0
0.0
0.0
0.0
4.73
9.5
0.0
0.0
18.33
92.0
79.33
69.0
85.33
63.33
79.0
52.0
19.67
4.16
7.94
10.07
13.53
7.02
9.71
3.61
10.58
7.51
0.0
0.0
0.0
0.0
0.0
3.67
20.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
2.52
7.94
0.0
0.0
Table 13: Results on CIFAR-5 with ResNet for the Resolving Confusion (RC) application. (Confused
class 0,1; 50-50 samples). SCRUB is the best-performer by far in terms of eliminating the confusion
via unlearning (see the IC error and Fgt error columns), while not hurting performance for other
classes (see e.g. the usual Error metrics in the first 3 groups of columns).
15 Additional Results for Resolving Confusion (RC)
We show the full results are in Tables 13, 14, 15, 16, 17, 18, 19, 20 for all settings. We observe that
across the board, SCRUB is a top-performer on this metric too (see the captions of the individual
tables for more details about performance profile).
16 Additional results for User Privacy (UP)
We present Basic MIA results for all settings in Tables 21, 22, 23, 24, 25, 26, 27, 28. We find that
SCRUB, especially equipped with its rewinding procedure, is able to consistently have a strong
defense against MIAs.
model
Retrain
Original
Finetune
NegGrad+
CF-k
EU-k
Fisher
NTK
SCRUB
Test error (↓) Retain error (↓)
mean
24.4
mean
0.0
std
2.75
std
0.0
Forget error (↑)
mean
90.67
std
4.04
IC test error (↓)
mean
19.0
std
1.32
IC retain error (↓)
mean
0.0
std
0.0
Fgt test error (↓)
mean
11.33
std
4.62
Fgt retain error (↓)
mean
0.0
std
0.0
37.07
34.33
33.53
36.13
51.6
51.93
32.2
25.0
4.67
3.35
4.47
4.21
1.0
2.95
2.84
3.14
1.5
0.0
0.0
0.0
27.67
35.17
0.75
0.0
2.6
0.0
0.0
0.0
3.5
3.92
1.3
0.0
5.67
3.0
13.33
0.33
52.67
31.0
43.33
93.33
9.81
5.2
21.36
0.58
6.03
11.53
14.15
2.52
49.0
43.67
42.33
47.83
59.5
56.83
36.67
26.0
4.77
7.29
11.34
5.8
5.22
8.69
4.07
4.44
6.0
0.0
0.0
0.0
38.33
31.67
3.0
0.0
10.39
0.0
0.0
0.0
6.66
14.01
5.2
0.0
80.67
67.33
62.0
76.33
68.67
78.33
54.33
18.0
12.58
16.04
22.65
14.43
15.57
15.53
9.02
11.14
6.0
0.0
0.0
0.0
19.67
17.67
3.0
0.0
10.39
0.0
0.0
0.0
10.41
11.5
5.2
0.0
Table 14: Results on CIFAR-5 with All-CNN for the Resolving Confusion (RC) application.
(Confused class 0,1; 50-50 samples). SCRUB is the best-performer by far in terms of eliminating the
confusion via unlearning (see the IC error and Fgt error columns), while not hurting performance for
other classes (see e.g. the usual Error metrics in the first 3 groups of columns).
27
model
Test error (↓) Retain error (↓)
mean
mean
std
std
Forget error (↑)
mean
std
IC test error (↓)
mean
std
IC retain error (↓)
mean
std
Fgt test error (↓)
mean
std
Fgt retain error (↓)
mean
std
Retrain
6.0
Original
Finetune
NegGrad+
CF-k
EU-k
Fisher
NTK
SCRUB
27.07
18.8
17.8
22.27
15.27
35.87
14.53
8.47
0.2
3.33
4.26
2.95
4.31
3.19
3.33
5.22
1.17
0.0
1.67
0.0
1.67
0.08
0.83
17.75
0.0
0.33
0.0
0.88
0.0
0.72
0.14
0.38
3.78
0.0
0.14
99.67
4.33
14.67
55.33
10.67
62.0
27.33
51.67
96.0
0.58
1.53
6.03
2.08
5.03
12.49
3.79
23.18
1.0
7.17
57.5
37.67
33.17
46.33
29.33
60.0
27.17
11.33
2.57
6.26
11.15
5.25
10.97
9.0
5.27
11.3
3.82
0.0
6.67
0.0
5.33
0.33
2.33
31.0
0.0
1.33
0.0
3.51
0.0
1.53
0.58
1.53
7.94
0.0
0.58
0.0
108.0
63.67
56.67
81.67
43.67
109.0
43.33
9.33
0.0
14.18
22.01
12.9
23.01
16.29
14.53
25.32
1.53
0.0
6.67
0.0
4.33
0.33
0.33
30.0
0.0
1.33
0.0
3.51
0.0
1.53
0.58
0.58
7.0
0.0
0.58
Table 15: Results on Lacuna-5 with ResNet for the Resolving Confusion (RC) application. (Confused
class 0,1; 50-50 samples). SCRUB is the best-performer by far in terms of eliminating the confusion
via unlearning (see the IC error and Fgt error columns), while not hurting performance for other
classes (see e.g. the usual Error metrics in the first 3 groups of columns). NTK in some cases is able
to resolve confusion, but not consistently, and it also suffers from higher Test Error.
model
Test error (↓) Retain error (↓)
mean
mean
std
std
Forget error (↑)
mean
std
IC test error (↓)
mean
std
IC retain error (↓)
mean
std
Fgt test error (↓)
mean
std
Fgt retain error (↓)
mean
std
Retrain
4.2
Original
Finetune
NegGrad+
CF-k
EU-k
Fisher
NTK
SCRUB
25.47
12.8
12.8
21.27
17.0
49.6
12.87
3.87
0.87
2.32
2.8
9.06
1.63
8.91
4.73
6.63
0.7
0.0
5.75
0.0
2.5
0.58
3.92
39.25
2.83
0.0
0.0
5.63
0.0
3.12
0.8
3.99
7.45
4.91
0.0
100.0
20.33
23.0
90.0
9.33
92.33
40.0
72.33
100.0
0.0
25.74
7.94
6.56
0.58
4.93
9.54
12.06
0.0
5.33
56.17
25.83
20.33
47.0
35.0
57.67
25.5
4.33
2.25
4.93
7.75
17.04
4.58
18.26
10.79
17.88
1.26
0.0
23.0
0.0
5.0
2.33
13.0
42.33
11.33
0.0
0.0
22.54
0.0
6.24
3.21
11.36
11.59
19.63
0.0
0.0
105.67
39.67
12.67
82.67
3.67
88.67
35.67
0.0
0.0
8.08
12.74
11.68
10.12
4.73
11.68
24.03
0.0
0.0
23.0
0.0
2.67
2.33
0.0
29.67
10.0
0.0
0.0
22.54
0.0
3.79
3.21
0.0
16.86
17.32
0.0
Table 16: Results on Lacuna-5 with All-CNN for the Resolving Confusion (RC) application.
(Confused class 0,1; 50-50 samples). SCRUB is the best-performer by far in terms of eliminating the
confusion via unlearning (see the IC error and Fgt error columns), while not hurting performance for
other classes (see e.g. the usual Error metrics in the first 3 groups of columns).
model
retrain
original
finetune
NegGrad+
CF-k
EU-k
SCRUB
Test error (↓) Retain error (↓)
std mean
mean
std
Forget error (↑)
mean
std
IC test error (↓)
mean
std
IC retain error (↓)
mean
std
Fgt test error (↓)
mean
std
Fgt retain error (↓)
mean
std
18.7
21.86
20.85
23.41
20.93
20.03
18.01
0.07
0.37
0.37
0.32
0.38
0.19
0.18
0.0
0.0
0.0
3.87
0.0
0.25
0.02
0.0
0.0
0.0
0.31
0.0
0.08
0.01
98.57
0.0
0.0
80.07
0.0
95.55
95.45
0.28
0.0
0.0
6.77
0.0
0.54
0.26
14.78
31.23
26.75
41.08
27.27
17.85
15.07
0.18
0.45
0.48
0.6
0.76
0.67
0.99
0.0
0.0
0.0
20.29
0.0
0.18
0.04
0.0
0.0
0.0
1.52
0.0
0.03
0.03
31.33
356.0
255.0
46.0
267.33
53.0
30.33
2.08
11.53
10.58
8.72
16.17
7.94
3.79
0.0
0.0
0.0
0.67
0.0
3.33
0.33
0.0
0.0
0.0
1.15
0.0
2.31
0.58
Table 17: Results on CIFAR-10 with ResNet for the Resolving Confusion (RC) application. (Con-
fused class 0,1; 2000-2000 samples).
model
retrain
original
finetune
NegGrad+
CF-k
EU-k
SCRUB
Test error (↓) Retain error (↓)
std mean
mean
std
Forget error (↑)
mean
std
IC test error (↓)
mean
std
IC retain error (↓)
mean
std
Fgt test error (↓)
mean
std
Fgt retain error (↓)
mean
std
16.43
19.95
18.72
21.74
19.31
17.66
15.92
0.03
0.23
0.11
0.44
0.23
0.23
0.17
0.0
0.0
0.0
4.48
0.0
1.36
0.2
0.0
0.0
0.0
0.34
0.0
0.19
0.06
98.42
0.0
1.05
87.65
0.0
87.9
87.47
0.15
0.0
0.61
2.98
0.0
1.28
1.46
14.37
30.18
24.33
40.05
27.45
16.82
14.98
0.24
0.66
0.2
0.44
0.61
0.79
0.13
0.0
0.0
0.0
21.8
0.0
2.89
0.39
0.0
0.0
0.0
0.66
0.0
0.46
0.15
23.67
348.67
223.67
44.0
294.0
63.67
54.0
2.31
13.58
6.66
5.2
4.36
8.62
3.61
0.0
0.0
0.0
2.33
0.0
91.67
9.67
0.0
0.0
0.0
3.21
0.0
12.58
2.52
Table 18: Results on CIFAR-10 with All-CNN for the Resolving Confusion (RC) application.
(Confused class 0,1; 2000-2000 samples).
28
model
retrain
original
finetune
NegGrad+
CF-k
EU-k
SCRUB
Test error (↓) Retain error (↓)
mean
mean
std
std
Forget error (↑)
mean
std
IC test error (↓)
mean
std
IC retain error (↓)
mean
std
Fgt test error (↓)
mean
std
Fgt retain error (↓)
mean
std
2.43
7.37
4.17
5.63
5.4
3.0
3.07
0.32
0.31
0.5
0.38
0.4
0.26
0.59
0.0
1.21
0.0
0.31
0.07
0.0
0.0
0.0
0.12
0.0
0.22
0.06
0.0
0.0
99.83
15.83
56.83
71.33
33.83
90.17
98.5
0.29
4.19
9.44
9.88
3.33
4.65
0.5
3.33
27.67
11.17
19.33
17.33
6.0
6.83
0.58
1.26
1.76
1.04
1.76
1.8
1.26
0.0
8.26
0.0
2.12
0.45
0.0
0.0
0.0
0.8
0.0
1.51
0.39
0.0
0.0
0.0
46.0
15.67
8.33
27.67
2.0
0.67
0.0
4.36
3.51
2.31
3.51
2.65
0.58
0.0
36.33
0.0
0.0
2.0
0.0
0.0
0.0
3.51
0.0
0.0
1.73
0.0
0.0
Table 19: Results on Lacuna-10 with ResNet for the Resolving Confusion (RC) application. (Con-
fused class 0,1; 200-200 samples).
model
retrain
original
finetune
NegGrad+
CF-k
EU-k
SCRUB
Test error (↓) Retain error (↓)
mean
mean
std
std
Forget error (↑)
mean
std
IC test error (↓)
mean
std
IC retain error (↓)
mean
std
Fgt test error (↓)
mean
std
Fgt retain error (↓)
mean
std
2.13
7.83
3.0
4.3
5.27
2.53
2.1
0.25
0.55
0.7
0.52
0.47
0.67
0.4
0.0
1.21
0.0
0.4
0.11
0.09
0.0
0.0
0.52
0.0
0.06
0.07
0.02
0.0
99.83
16.0
74.5
89.67
33.33
97.83
97.5
0.29
4.92
6.08
4.25
1.61
2.08
1.73
2.5
31.33
6.5
15.33
18.5
5.17
4.17
1.32
1.76
2.0
2.47
2.29
1.04
0.58
0.0
8.26
0.0
2.73
0.76
0.38
0.0
0.0
3.53
0.0
0.39
0.47
0.35
0.0
0.0
56.33
9.0
4.67
31.33
0.33
0.33
0.0
3.79
3.0
3.21
3.51
0.58
0.58
0.0
36.33
0.0
0.0
3.33
0.67
0.0
0.0
15.53
0.0
0.0
2.08
0.58
0.0
Table 20: Results on Lacuna-10 with All-CNN for the Resolving Confusion (RC) application.
(Confused class 0,1; 200-200 samples).
method
Retrain
Test error
Forget error
Retain error
MIA
mean
16.71
std mean
26.67
0.05
std mean
0.00
3.09
std mean
51.33
0.00
Original
Finetune
NegGrad+
CF-k
EU-k
Bad-T
SCRUB
16.71
16.86
21.65
16.82
18.44
22.43
17.01
SCRUB+R 16.88
0.07
0.13
0.40
0.03
0.21
0.37
0.20
0.19
0.00
0.00
47.00
0.00
0.33
1.67
33.00
26.33
0.00
0.00
3.74
0.00
0.47
1.25
5.89
4.50
0.00
0.00
4.54
0.00
0.32
10.13
0.00
0.00
0.00
0.00
0.70
0.00
0.02
0.15
0.00
0.00
68.67
69.33
73.00
69.67
66.00
77.67
51.00
49.33
std
6.13
3.09
2.05
1.41
1.89
2.94
4.11
1.41
2.49
Table 21: Basic MIA for All-CNN architecture on CIFAR-10 for selective unlearning, for the User
Privacy (UP) application.
Retain error
MIA
method
Retrain
Test error
std
0.07
mean
13.98
Forget error
mean
100.00
std mean
0.00
0.00
Original
Finetune
NegGrad+
CF-k
EU-k
Bad-T
SCRUB
15.70
14.53
17.04
15.72
15.76
16.98
14.93
SCRUB+R 14.93
0.09
0.13
0.11
0.06
0.28
0.40
0.17
0.17
0.00
1.31
59.91
0.00
100.00
81.93
100.00
100.00
0.00
0.54
1.53
0.00
0.00
3.50
0.00
0.00
0.00
0.00
0.43
0.00
0.24
5.84
0.09
0.09
std mean
48.73
0.00
0.00
0.00
0.09
0.00
0.02
0.43
0.02
0.02
71.40
74.97
70.03
72.93
51.60
58.07
54.30
54.30
std
0.24
0.70
1.27
1.92
1.06
1.22
1.76
2.24
2.24
Table 22: Basic MIA for All-CNN architecture on CIFAR-10 for class unlearning, for the User
Privacy (UP) application.
29
std
1.63
0.47
0.82
1.70
0.00
3.27
4.19
2.45
1.89
std
1.67
0.67
0.69
1.19
0.34
2.27
0.31
1.71
1.71
method
Retrain
Test error
std mean
29.33
0.15
Forget error
std
2.49
Retain error
mean
0.00
std mean
54.00
0.00
MIA
mean
17.38
Original
Finetune
NegGrad+
CF-k
EU-k
Bad-T
SCRUB
17.41
17.48
21.69
17.53
19.77
23.47
17.01
SCRUB+R 17.54
0.15
0.16
0.07
0.19
0.04
1.57
0.03
0.28
0.00
0.00
45.33
0.00
13.67
34.67
71.67
19.33
0.00
0.00
2.62
0.00
0.47
1.70
0.94
14.64
0.00
0.00
3.94
0.00
0.06
14.53
0.01
0.01
0.00
0.00
0.43
0.00
0.01
1.65
0.01
0.01
65.33
64.00
66.67
65.00
53.00
59.67
78.00
58.67
Table 23: Basic MIA for ResNet architecture on CIFAR-10 for selective unlearning, for the User
Privacy (UP) application.
method
Retrain
Test error
std
0.10
mean
14.69
Original
Finetune
NegGrad+
CF-k
EU-k
Bad-T
SCRUB
16.33
15.10
17.41
15.29
17.05
19.56
15.33
SCRUB+R 15.33
0.14
0.16
0.09
0.02
0.07
1.44
0.06
0.06
Retain error
MIA
Forget error
mean
100.00
std mean
0.00
0.00
std mean
49.33
0.00
0.00
0.33
61.00
0.04
97.48
11.34
100.00
100.00
0.00
0.17
1.14
0.04
0.28
1.82
0.00
0.00
0.00
0.00
0.44
0.00
0.05
94.67
0.08
0.08
0.00
0.00
0.05
0.00
0.01
6.12
0.01
0.01
71.10
75.57
69.57
75.73
54.20
54.33
52.20
52.20
Table 24: Basic MIA for ResNet architecture on CIFAR-10 for class unlearning, for the User Privacy
(UP) application.
method
Retrain
Original
Finetune
NegGrad+
CF-k
EU-k
Bad-T
SCRUB
SCRUB+R
Test error
Forget error
Retain error
MIA
mean
1.50
std mean
0.33
0.08
std mean
0.00
0.47
std mean
52.00
0.00
1.57
1.40
3.60
1.57
3.90
4.90
1.67
1.67
0.24
0.16
0.14
0.12
1.47
2.10
0.19
0.19
0.00
0.00
14.33
0.00
0.00
1.34
0.00
0.00
0.00
0.00
1.25
0.00
0.00
1.20
0.00
0.00
0.00
0.00
0.87
0.00
0.76
0.67
0.00
0.00
0.00
0.00
0.07
0.00
0.63
0.94
0.00
0.00
59.00
57.33
51.00
58.33
52.00
67.67
57.67
57.67
std
2.16
2.16
3.30
1.63
2.49
3.56
6.94
0.94
0.94
Table 25: Basic MIA for All-CNN architecture on Lacuna-10 for selective unlearning, for the User
Privacy (UP) application.
30
method
Retrain
Original
Finetune
NegGrad+
CF-k
EU-k
Bad-T
SCRUB
SCRUB+R
Test error
std
0.09
mean
1.67
Forget error
std
mean
0.00
100.00
1.70
1.67
2.00
2.07
4.15
2.56
1.96
1.96
0.21
0.27
0.00
0.14
1.22
0.09
0.34
0.34
0.00
0.00
14.27
0.00
62.08
38.65
100.00
100.00
0.00
0.00
0.74
0.00
44.26
36.80
0.00
0.00
Retain error
mean
0.00
std mean
55.67
0.00
MIA
0.00
0.00
0.00
0.00
0.81
0.37
0.00
0.00
0.00
0.00
0.00
0.00
0.53
0.18
0.00
0.00
58.00
56.33
54.33
52.33
52.67
63.33
50.33
50.33
std
2.62
1.63
1.25
2.05
2.05
3.68
2.49
2.62
2.62
Table 26: Basic MIA for All-CNN architecture on Lacuna-10 for class unlearning, for the User
Privacy (UP) application.
method
Retrain
Original
Finetune
NegGrad+
CF-k
EU-k
Bad-T
SCRUB
SCRUB+R
Test error
Forget error
Retain error
MIA
mean
2.50
std mean
1.67
0.24
std mean
0.00
0.94
std mean
49.67
0.00
2.53
2.67
4.30
2.47
2.60
7.30
2.97
2.97
0.25
0.05
0.43
0.25
0.00
2.20
0.25
0.25
0.00
0.00
12.67
0.00
0.00
3.26
6.00
6.00
0.00
0.00
3.30
0.00
0.00
1.83
3.27
3.27
0.00
0.00
0.95
0.00
0.03
0.33
0.00
0.00
0.00
0.00
0.08
0.00
0.00
0.47
0.00
0.00
56.67
53.67
54.00
56.00
56.00
67.33
50.67
50.67
std
3.09
1.70
0.94
2.16
0.82
2.83
3.40
4.03
4.03
Table 27: Basic MIA for ResNet architecture on Lacuna-10 for selective unlearning, for the User
Privacy (UP) application.
method
Retrain
Original
Finetune
NegGrad+
CF-k
EU-k
Bad-T
SCRUB
SCRUB+R
Test error
std
0.19
mean
2.52
Forget error
std
mean
0.00
100.00
Retain error
mean
0.00
std mean
55.00
0.00
MIA
2.81
3.04
2.74
2.81
2.48
3.37
3.26
3.26
0.28
0.19
0.26
0.28
0.14
0.50
0.38
0.38
0.00
0.00
9.48
0.00
7.71
67.60
99.90
99.90
0.00
0.00
0.64
0.00
2.52
24.26
0.15
0.15
0.00
0.00
0.00
0.00
0.00
1.06
0.07
0.07
0.00
0.00
0.00
0.00
0.00
0.47
0.05
0.05
56.00
54.67
53.67
56.00
54.33
58.00
54.33
54.33
std
2.94
2.45
1.25
4.03
2.45
3.09
2.94
2.49
2.49
Table 28: Basic MIA for ResNet architecture on Lacuna-10 for class unlearning, for the User Privacy
(UP) application.
31
|
|
http://arxiv.org/abs/2302.09875v2 | 2023-02-28T00:51:47 | 2023-02-20T10:06:49 | Backstepping Temporal Difference Learning | Off-policy learning ability is an important feature of reinforcement learning
(RL) for practical applications. However, even one of the most elementary RL
algorithms, temporal-difference (TD) learning, is known to suffer form
divergence issue when the off-policy scheme is used together with linear
function approximation. To overcome the divergent behavior, several off-policy
TD-learning algorithms, including gradient-TD learning (GTD), and TD-learning
with correction (TDC), have been developed until now. In this work, we provide
a unified view of such algorithms from a purely control-theoretic perspective,
and propose a new convergent algorithm. Our method relies on the backstepping
technique, which is widely used in nonlinear control theory. Finally,
convergence of the proposed algorithm is experimentally verified in
environments where the standard TD-learning is known to be unstable. | [
"Han-Dong Lim",
"Donghwan Lee"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09875v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09875v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.AI"
] | 3
2
0
2
b
e
F
8
2
]
G
L
.
s
c
[
2
v
5
7
8
9
0
.
2
0
3
2
:
v
i
X
r
a
BACKSTEPPING TEMPORAL DIFFERENCE LEARNING
Han-Dong Lim
Department of Electrical Engineering
KAIST, Daejeon, 34141, South Korea
[email protected]
Donghwan Lee
Department of Electrical Engineering
KAIST, Daejeon, 34141, South Korea
[email protected]
ABSTRACT
Off-policy learning ability is an important feature of reinforcement learning (RL)
for practical applications. However, even one of the most elementary RL algo-
rithms, temporal-difference (TD) learning, is known to suffer form divergence
issue when the off-policy scheme is used together with linear function approxi-
mation. To overcome the divergent behavior, several off-policy TD-learning al-
gorithms, including gradient-TD learning (GTD), and TD-learning with correc-
tion (TDC), have been developed until now. In this work, we provide a unified
view of such algorithms from a purely control-theoretic perspective, and propose
a new convergent algorithm. Our method relies on the backstepping technique,
which is widely used in nonlinear control theory. Finally, convergence of the pro-
posed algorithm is experimentally verified in environments where the standard
TD-learning is known to be unstable.
1
INTRODUCTION
Since Mnih et al. (2015), which has demonstrated that deep reinforcement learning (RL) outper-
forms human in several video games (Atari 2600 games), significant advances has been made in
RL theory and algorithms. For instance, Van Hasselt et al. (2016); Lan et al. (2020); Chen et al.
(2021) proposed some variants of the so-called deep Q-network (Mnih et al., 2015) that achieves
higher scores in Atari games than the original deep Q-network. An improved deep RL was devel-
oped in Badia et al. (2020) that performs better than average human scores across 57 Atari games.
Not only performing well in video games, but Schrittwieser et al. (2020) also have shown that an RL
agent can self-learn chess, Go, and Shogi. Furthermore, RL has shown great success in real world
applications, e.g., robotics (Kober et al., 2013), healthcare (Gottesman et al., 2019), and recommen-
dation systems (Chen et al., 2019).
Despite the practical success of deep RL, there is still a gap between theory and practice. One
of the notorious phenomena is the deadly triad (Sutton & Barto, 2018), the diverging issue of the
algorithm when function approximation, off-policy learning, and bootstrapping are used together.
One of the most fundamental algorithms, the so-called temporal-difference (TD) learning (Sutton,
1988), is known to diverge under the deadly triad, and several works have tried to fix this issue for
decades. In particular, the seminar works Sutton et al. (2008; 2009) introduced the so-called GTD,
gradient-TD2 (GTD2), and TDC, which are off-policy, and have been proved to be convergent with
linear function approximation. More recently, Ghiassian et al. (2020) suggested regularized version
of TDC called TD learning with regularized correction (TDRC), and showed its favorable features
under off-policy settings. Moreover, Lee et al. (2021) developed several variants of GTD based on
primal dual formulation.
On the other hand, backstepping control (Khalil, 2015) is a popular method in designing stable
controllers for nonlinear systems with special structures. The design technique offers a wide range
of stable controllers, and is proved to be robust under various settings. It has been used in various
fields including quadrotor helicopters (Madani & Benallegue, 2006), mobile robots (Fierro & Lewis,
1997), and ship control (Fossen & Strand, 1999). Using backstepping control technique, in this
paper, we develop a new convergent off-policy TD-learning which is a single time-scale algorithm.
In particular, the goal of this paper is to introduce a new unifying framework to design off-policy TD-
learning algorithms under linear function approximation. The main contributions are summarized
as follows:
1
• We propose a systemic way to generate off-policy TD-learning algorithms including GTD2
and TDC from control theoretic perspective.
• Using our framework, we derive a new TD-learning algorithm, which we call backstepping
TD (BTD).
• We experimentally verify its convergence and performance under various settings including
where off-policy TD has known to be unstable.
In particular, most of the previous works on off-policy TD-learning algorithms (e.g., GTD2 and
TDC) are derived based on optimization perspectives starting with an objective function. Then,
the convergence is proved by proving stability of the corresponding O.D.E. models. In this paper,
we follow reversed steps, and reveal that an off-policy TD-learning algorithm (called backstepping
TD) can be derived based on control theoretic motivations. In particular, we develop stable O.D.E.
models first using the backstepping technique, and then recover back the corresponding off-policy
TD-learning algorithms. The new analysis reveals connections between off-policy TD-learning and
notions in control theory, and provides additional insights on off-policy TD-learning with simple
concepts in control theory. This sound theoretical foundation established in this paper can potentially
motivate further analysis and developments of new algorithms.
Finally, we briefly summarize TD learning algorithms that guarantee convergence under linear func-
tion approximation. GTD (Sutton et al., 2008), GTD2 and TDC (Sutton et al., 2009) have been de-
veloped to approximate gradient on mean squared projected Belllman error. Later, GTD and GTD2
has been discovered to solve minimax optimization problem (Macua et al., 2014; Liu et al., 2020).
Such sadde-point view point of GTD has led to many interesting results including Du et al. (2017);
Dai et al. (2018); Lee et al. (2021). TDRC (Ghiassian et al., 2020) adds an additional term similar to
regularization term to one-side of parameter update, and tries to balance between the performance
of TD and stability of TDC. TDC++ (Ghiassian et al., 2020) also adds an additional regularization
term on both sides of the parameter update. Even though TDRC shows good performance, it uses
additional parameter condition to ensure convergence, whereas TDC++ does not.
2 PRELIMINARIES
2.1 NONLINEAR SYSTEM THEORY
Nonlinear system theory will play an important role throughout this paper. Here, we briefly review
basics of nonlinear systems. Let us consider the continuous-time nonlinear system
x0 ∈ Rn,
̇xt = f (xt, ut),
(1)
where x0 ∈ Rn is the initial state, t ∈ R, t ≥ 0 is the time, xt ∈ Rn is the state, ut ∈ Rn is the
control input, and f : Rn × Rn → Rn is a nonlinear mapping. An important concept in dealing
with nonlinear systems is the equilibrium point. Considering the state-feedback law ut = μ(xt),
the system can be written as ̇xt = f (xt, ut) = f (xt, μ(xt)) =: f (xt), and a point x = xe in the
state-space is said to be an equilibrium point of (1) if it has the property that whenever the state
of the system starts at xe, it will remain at xe (Khalil, 2015). For ̇xt = f (xt), the equilibrium
points are the real roots of the equation f (x) = 0. The equilibrium point xe is said to be globally
asymptotically stable if for any initial state x0 ∈ Rn, xt → xe as t → ∞.
An important control design problem is to construct a state-feedback law ut = μ(xt) such that
the origin becomes the globally asymptotically stable equilibrium point of (1). To design a state-
feedback law to meet such a goal, control Lyapunov function plays a central role, which is defined
in the following definition.
Definition 2.1 (Control Lyapunov function (Sontag, 2013)). A positive definite function V : Rn →
R is called a control Lyapunov function (CLF) if for all x (cid:54)= 0, there exists a corresponding control
input u ∈ Rm that satisfies the inequality, ∇xV (x)(cid:62)f (x, u) < 0 for all x (cid:54)= 0.
Once such a CLF is found, then it guarantees that there exists the control law that stabilizes the
system. Moreover, the corresponding state-feedback control law can be extracted from the CLF, e.g.,
μ(x) = arg minu ∇xV (x)(cid:62)f (x, u) provided that the minimum exists and unique. The concept of
control Lyapunov function will be used in the derivations of our main results. For the autonomous
2
system, ̇xt = f (xt), and Lypaunov function V : Rn → R, Lie derivative is defined as Lf V (x) :=
∇xV (x)(cid:62)f (x) so that ̇V (xt) = Lf V (xt) along the solution.
2.2 STOCHASTIC APPROXIMATION AND O.D.E. APPROACH
Including Q-learning (Watkins & Dayan, 1992) and TD-learning (Sutton, 1988), reinforcement
learning algorithms can be considered as stochastic approximation (Robbins & Monro, 1951) de-
scribed by
xk+1 = xk + αk(f (xk) + (cid:15)k),
(2)
where f : Rn → Rn is a nonlinear mapping, and (cid:15)k is an i.i.d. noise. Borkar and Meyn the-
orem (Borkar & Meyn, 2000) is a well-known method to bridge the asymptotic convergence of
stochastic approximation and the stability of its corresponding O.D.E. model, which can be ex-
pressed as
̇xt = f (xt),
x0 ∈ Rn,
(3)
where x0 ∈ Rn is initial state, and t ∈ R, t ≥ 0 is the time.
Borkar and Meyn theorem (Borkar & Meyn, 2000) states that under the conditions in Assumption 7.1
in the Appendix, global asymptotic stability of the O.D.E. (3) leads to asymptotic convergence of
the stochastic approximation update (2), which is formally stated in the following lemma.
Lemma 2.1 (Borkar and Meyn theorem (Borkar & Meyn, 2000)). Suppose that Assumption 7.1 in
the Appendix holds, and consider the stochastic approximation in (2). Then, for any initial x0 ∈ Rn,
supk≥0 ||xk|| < ∞ with probability one. In addition , xk → xe as k → ∞ with probability one,
where xe is the unique equilibrium point of the O.D.E. in (3).
The main idea of Borkar and Meyn theorem is as follows: iterations of a stochastic recursive al-
gorithm follow the solution of its corresponding O.D.E. in the limit when the step-size satisfies the
so-called Robbins-Monro condition (Robbins & Monro, 1951) in (33) in the Appendix. Therefore,
by proving asymptotic stability of the O.D.E., we can induce convergence of the original algorithm.
In this paper, we will use an O.D.E. model of TD-learning, which is expressed as a linear time-
invariant system.
2.3 BACKSTEPPING CONTROL
This section provides the concept of the backstepping control (Kokotovic, 1992; Khalil, 2015),
which will be the main tool in this paper to derive TD-learning algorithms. The backstepping tech-
nique is a popular tool for generating a CLF (control Lyapunov function) for nonlinear systems with
specific structures. In particular, let us start with the following general nonlinear system:
̇yt = f (yt) + g(yt)xt
̇xt = ut,
(4)
where yt ∈ Rm, xt ∈ Rm are the states, ut ∈ Rm is the input, and f : Rm → Rm and g : Rm → R
are continuous functions. The first system is a nonlinear system with a particular affine structure,
and the second system is simply an integrator. It can be seen as a cascade interconnection of two
systems, where the second system's state is injected to the input of the first system. The backstepping
control technique gives us a systematic way to generate a CLF for such particular nonlinear systems
provided that the first system admits a CLF independently. To this end, we suppose that the first
system admits a CLF. Through the backstepping approach, designing a stable control law for the
above system can be summarized in the following steps:
Step 1. Consider xt in (4) as virtual input ̃x(yt) (state-feedback controller), and consider the fol-
lowing system: ̇λt = f (yt) + g(yt) ̃x(yt). Design ̃x(yt) such that the above system admits
a CLF V , i.e., it admits a positive definite and radially unbounded function V such that its
time derivative is negative definite, i.e., ̇V (yt) < 0, ∀yt (cid:54)= 0.
Step 2. Denote the error between the virtual state-feedback controller ̃x(yt) and state variable xt
as zt := xt − ̃x(yt). Now, rewrite the original O.D.E. in (4) with the new variable (yt, zt):
(cid:21)
(cid:20)yt
zt
d
dt
=
(cid:20)f (yt) + g(yt) ̃x(yt) + g(yt)zt
ut − ̇ ̃x(yt)
(cid:21)
3
Step 3. Design the control input ut such that the above system is stable. One popular choice is to
consider the CLF Vc(yt, zt) := V (yt) + ||zt||2/2, where V (yt) is defined in Step 1. Then
choose ut such that the time derivative of Vc(yt, zt) to be negative definite.
A simple example of designing stabilizing control law by backstepping technique is given in Ap-
pendix Section 7.3.
2.4 MARKOV DECISION PROCESS
In this paper, we consider a Markov decision process (MDP) characterized by the tuple
(S, A, P, γ, r), where S := {1, 2, . . . , |S|} stands for the set of finite state space, |S| denotes
the size of S, A := {1, 2, . . . , |A|} denotes the set of finite action space, |A| is the size of A,
γ ∈ (0, 1) is the discount factor, P : S × A × S → [0, 1] denotes the Markov transition kernel,
and r : S × A × S → R means the reward function. In particular, if an agent at state s ∈ S, takes
action a ∈ A, then the current state transits to the next state s(cid:48) ∈ S with probability P(s, a, s(cid:48)),
and the agent receives reward r(s, a, s(cid:48)). Each element of the state to state transition matrix under
policy π, denoted by P π ∈ R|S|×|S| is [P π]ij := (cid:80)
1 ≤ i, j ≤ |S|, where
[P π]ij corresponds to i-th row and j-th column element of matrix P π. Moreover, the stationary
state distribution induced by policy μ, is denoted as dμ : S → [0, 1], i.e., dμ(cid:62)P μ = dμ(cid:62). With the
above setup, we define the following matrix notations:
π(a|i)P(i, a, j),
a∈A
dμ(1)
Dμ :=
. . .
∈ R|S|×|S|, Rπ =
dμ(|S|)
Ea∼π[r(s, a, s(cid:48))|s = 1]
Ea∼π[r(s, a, s(cid:48))|s = 2]
...
Ea∼π[r(s, a, s(cid:48))|s = |S|]
∈ R|S|,
k=0 γkr(Sk, Ak, Sk+1)(cid:12)
where Dμ is a diagonal matrix of the state distribution induced by behavior policy μ, each
element of Rπ is the expected reward under policy π at the corresponding state. The pol-
icy evaluation problem aims to approximate the value function at state s ∈ S, vπ(s)
:=
E (cid:2) (cid:80)∞
(cid:12) S0 = s, π(cid:3), where the trajectory is generated under policy π : S ×
A → [0, 1].
In this paper, we consider the linear function approximation to approximate the
value function vπ(s). In particular, we parameterize the value function vπ(s) with φ(cid:62)(s)ξ, where
φ : S → Rn is a pre-selected feature vector with φ(s) := [φ1(s)
* * * φn(s)], φ1, . . . , φn : S → R
are feature functions, and ξ ∈ Rn is the learning parameter. The goal of the policy evaluation
problem is then to approximate the value function vπ(s) using this linear parameterization, i.e.,
φ(cid:62)(s)ξ ≈ vπ(s). Moreover, using the matrix notation Φ := [φ(1), φ(2), * * * , φ(|S|)](cid:62) ∈ R|S|×n,
called the feature matrix, the linear parameterization can be written in the vector form Φξ. We also
assume that Φ is full column rank matrix throughout the paper, which is a standard assumption (Sut-
ton et al., 2008; 2009; Ghiassian et al., 2020; Lee et al., 2021).
2.5 TEMPORAL DIFFERENCE LEARNING
k following s(cid:48)
This section provides a brief background on TD-learning (Sutton, 1988). Suppose that we have
access to stochastic samples of state sk from the state stationary distribution induced by the behav-
ior policy μ, i.e., sk ∼ dμ(*), and action is chosen under behavior policy μ, i.e., ak ∼ μ(*|sk).
Then, we observe the next state s(cid:48)
k ∼ P(*, ak, sk), and receive the reward rk :=
r(sk, ak, s(cid:48)
k). Using the simplified notations for the feature vectors φk := φ(sk), φ(cid:48)
k).
the TD-learning update at time step k with linear function approximation can be expressed as
ξk+1 = ξk + αkρkδk(ξk)φk, where αk > 0 is the step-size, δk(ξk) := rk + γφ(cid:48)(cid:62)
k ξk is called
the temporal difference or temporal difference error (TD-error), and ρk := ρ(sk, ak) = π(ak|sk)
μ(ak|sk)
is called the importance sampling ratio (Precup et al., 2001). The importance sampling ratio re-
weights the TD-error to handle the mismatch between the behavior policy μ and target policy π. It
is known that TD-learning with linear function approximation and off-policy learning scheme does
not guarantee convergence in general. The above stochastic approximation aims to find fixed point
of the following projected Bellman equation, which is, after some manipulations, expressed as:
k ξk − φ(cid:62)
k = φ(s(cid:48)
Φ(cid:62)DμΦξ∗ − γΦ(cid:62)DμP πΦξ∗ = Φ(cid:62)DμRπ.
(5)
4
To simplify the expressions, let use introduce one more piece of notations:
A := Es∼dμ(s),s(cid:48)∼P π(s(cid:48)|s)[φ(s)(φ(s) − γφ(s(cid:48)))(cid:62)] = Φ(cid:62)DμΦ − γDμP πΦ ∈ Rn×n,
b := Es∼dμ(s),a∼π(a|s),s(cid:48)∼P (s(cid:48)|s,a)[r(s, a, s(cid:48))φ(s)] = Φ(cid:62)DμRπ ∈ Rn×1.
Even though we can use arbitrary distribution, for simplicity we assume stationary distribution of μ.
Now, we can rewrite (5) compactly as
Aξ∗ = b.
(6)
The corresponding O.D.E. for TD-learning can be written as ̇ξt = Aξt − b, ξ0 ∈ Rn. Using the
coordinate transform xk := ξk − ξ∗, we get the O.D.E. ̇xt = Axt, x0 ∈ Rn, whose origin is
globally asymptotically stable equilibrium point if ρ(s, a) = π(a|s)
μ(a|s) = 1 for all (s, a) ∈ S × A.
Throughout the paper we will use the vector xk := ξk − ξ∗ to represent the coordinate transform of
ξk to the origin, and will use ξt and xt to denote the corresponding continuous-time counterparts of
ξk and xk, respectively.
2.6 GRADIENT TEMPORAL DIFFERENCE LEARNING
To fix the instability issue of off-policy TD-learning under linear function approximation, Sutton
et al. (2008) and Sutton et al. (2009) introduced various stable off-policy TD-learning algorithms,
called GTD (gradient TD-learning), GTD2, and TDC (temporal difference correction). The idea be-
hind these algorithms is to minimize the mean-square error of projected Bellman equation (MSPBE)
x(cid:62)Dx, and the global min-
minξ∈Rn
imizer of MSPBE corresponds to the solution of (6). The core idea of the algorithms is to introduce
an additional variable λk ∈ Rn to approximate the stochastic gradient descent method for MSPBE
as an objective function. In particular, GTD2 update can be written as
2 ||Φ(cid:62)Dμ(Rπ +γP πΦξ−Φξ)||2
(Φ(cid:62)DμΦ)−1, where ||x||D :=
√
1
λk+1 = λk + αk(−φ(cid:62)
k λk + ρkδk(ξk))φk,
ξk+1 = ξk + αk(φ(cid:62)
k λkφk − ρkγφ(cid:62)
k λkφ(cid:48)
k).
We denote λt to denote continuous time part of λk. Since the fixed point for λk is zero, it doesn't
require coordinate transformation. It is a single time-scale algorithm because it uses a single step-
size αk. The corresponding O.D.E. is expressed as ̇λt = −Cλt − Axt, ̇xt = A(cid:62)λt, where C :=
Es∼dμ(s)[φ(s)φ(cid:62)(s)] = Φ(cid:62)DμΦ ∈ Rn×n. Similarly, TDC update can be written as
λk+1 = λk + αk(−φ(cid:62)
ξk+1 = ξk + βk(−ρkγφ(cid:62)
k λk + ρkδk(ξk))φk
k λkφ(cid:48)
k + ρkδk(ξk)φk),
(7)
(8)
where the step-sizes, αk and βk, satisfy αk/βk → 0 as k → ∞ and the Robbins and Monro step-size
condition (Robbins & Monro, 1951) in (33) in Appendix. It is a two time-scale algorithm because it
uses two time-steps, αk and βk.
3 DESIGNING TD-LEARNING THROUGH BACKSTEPPING
We briefly explain the motivation for our algorithmic development. Borkar and Meyn the-
orem (Borkar & Meyn, 2000) in Lemma 2.1 is a typical tool to prove convergence of Q-
learning (Borkar & Meyn, 2000; Lee & He, 2019) and TD-learning (Sutton et al., 2009; Lee et al.,
2021). Most of the previous works on off-policy TD-learning algorithms (e.g., GTD2 and TDC)
first start with an objective function, and then derive GTD algorithms based on optimization per-
spectives. Then, the convergence is proved using the corresponding O.D.E. models and stability
theory of linear time-invariant systems. A natural question arises is, can we derive off-policy TD-
learning algorithms following a reversed step? In other words, can we develop a stable O.D.E. model
first using tools in control theory, and then recover back the corresponding off-policy TD-learning
algorithms? In this paper, we reveal that a class of off-policy TD-learning algorithms can be derived
based on purely control theoretic motivations following such a reversed process. By doing so, this
work provides additional insights on off-policy TD-learning algorithms and gives a sound theoretical
foundation on off-policy TD-learning algorithms for further developments of new algorithms.
5
Designing stabilizing control laws for continuous-time nonlinear system has been successful over
the past decades (Khalil, 2015). One such technique, so called backstepping, is a popular controller
design method in non-linear control literature (Khalil, 2015). With the help of the backstepping
method (Khalil, 2015), we design stabilizing control laws for continuous-time systems, and then the
corresponding off-policy TD-learning algorithms are derived, and are shown to be convergent via
Borkar and Meyn theorem (Borkar & Meyn, 2000) in Lemma 2.1. The brief procedure is explained
in the following steps: Step 1) Choose an appropriate continuous-time dynamic model such that
(a) we can recover the TD-fixed point ξ∗ in (6) via its equilibrium point; (b) the corresponding
stochastic approximation algorithm can be implementable only through transitions of MDP and
accessible data.; Step 2) Using the backstepping method, design a control input to stabilize the
dynamic model chosen in Step 1).
3.1 BACKSTEPPING TD
Now, we introduce a new off-policy TD-learning algorithm, which we call Backstepping TD (BTD).
Firstly, we will develop a stabilizing control law for the following the continuous-time system:
̇λt = (−C + ηA)λt − Axt
̇xt = ut
(9)
(10)
The idea stems from finding a control system for which we can easily apply the backstepping tech-
inque. In details, the backstepping techinqiue can be applied to the two interconnected systems
where one subsystem, namely (4), can be stabilized with xt in (4) as a control input. Therefore,
our first aim is to find such a system. To this end, we can try a natural choice of O.D.E. to solve
the TD problem, i.e., ̇λt = Aλt, which is however unstable in the off-policy case. Therefore, we
can develop a modified O.D.E. ̇λt = (−C + ηA)λt − Axt, where xt is the control input, the neg-
ative definite matrix −C is introduced to stabilize the system, and η > 0 is introduced to provide
additional degrees of freedom in design. Now, the constructed system can be stabilized through the
state-feedback controller xt = ηλt and admits the simple control Lypaunov function V (λ) = ||λ||2.
Moreover, A should be included in the right-hand side in order to implement the corresponding
algorithm without knowing the solution because xk = ξk − ξ∗ and ξ∗ should be removed using
Aξ∗ = b in the final step. Simply setting xt = ηλt may cancel out A in the right-hand side, the
O.D.E. becomes ̇λt = −Cλt, Therefore, as mentioned before, we can apply the backstepping tech-
nique by adding an additional dynamic controller. As the next step, the backstepping technique is
applied, and one needs to observe what would be the final form of the control system. In summary,
if we consist f (λt) with the combination of A and −C (not necessarily −C, it may be −I) , it
can be a reasonable candidate to apply the backstepping technique. Cancelling A with virtual input
only leaves −C, which guarantees stability from its negative definiteness. Therefore, (9) and (10)
is a reasonable candidate for the dynamics where we can apply the backstepping technique.
In
particular, our aim is to design an appropriate control input ut for the above system such that the
origin is the unique asymptotically stable equilibrium point, i.e., (λt, xt) → 0 as t → ∞ for any
(λ0, x0) ∈ Rn × Rn. The overall procedure is depicted in Figure 1 in the Appendix, and we show
how to choose the control input ut in the following lemma.
Lemma 3.1. Consider the O.D.E. in (9) and (10). If we choose the control input ut := (A(cid:62) +η2A−
ηC)λt − ηAxt, then the above O.D.E. has globally asymptotically stable origin, i.e., (λt, xt) →
(0, 0) as t → ∞ for any (λ0, x0) ∈ Rn × Rn.
Proof sketch. The proof follows the steps given in the backstepping scheme in Section 3. First,
substituting xt in (9) with a virtual controller ̃x(λt), we will design a control law ̃x(λt) that stabilizes
the following new virtual system:
̇λt = (−C + ηA)λt − A ̃x(λt).
(11)
One natural choice of the virtual controller is ̃x(λt) = ηλt. Plugging it into (11) leads to ̇λt =
−Cλt, and we can verify the global asymptotic stability of the above system with the following
Lyapunov function:
V (λt) :=
||λt||2
2
2
.
6
(12)
We now consider the original O.D.E. in (9) and (10). Applying simple algebraic manipulations yield
̇λt = −Cλt − A(xt − ηλt),
̇xt = ut. The error between xt and the virtual controller ̃x(λt) can
be expressed as new variable zt, which is zt := xt − ̃x(λt) = xt − ηλt. Rewriting the O.D.E. in (9)
and (10) with (λt, zt) coordinates, we have
̇λt = −Cλt − Azt
̇zt = ut + ηCλt + ηAzt.
(13)
To prove the global asymptotic stability of the above system, consider the function Vc(λt, zt) :=
V (λt)+ 1
2 where V (λt) is defined in (12). By taking ut as ut = A(cid:62)λt −ηCλt −ηAzt, we can
apply LaSall'es invariance principle in Lemma 7.1. The full proof is in Appendix Section 7.4.1.
2 ||zt||2
Using the relation zt := xt − ηλt, the control input in the original coordinate (λt, xt) can be written
as ut := A(cid:62)λt − ηCλt − ηAzt = (A(cid:62) + η2A − ηC)λt − ηAxt. Plugging this input into the
original open-loop system in (9) and (10), the closed-loop system in the original coordinate (λt, xt)
can written as
̇λt = (−C + ηA)λt − Axt
̇xt = (A(cid:62) + η2A − ηC)λt − ηAxt,
(14)
(15)
whose origin is also globally asymptotically stable according to Lemma 3.1. Recovering back from
xt to ξt, we have d
dt
(cid:20) −C + ηA
−A
A(cid:62) + η2A − ηC −ηA
approximation of the O.D.E. in Theorem 3.1 becomes
. The corresponding stochastic
(cid:21) (cid:20)λt
ξt
(cid:20) b
ηb
(cid:20)λt
ξt
+
=
(cid:21)
(cid:21)
(cid:21)
λk+1 = λk + αk(((−1 + η)φ(cid:62)
ξk+1 = ξk + αk(((−η + η2)φ(cid:62)
k − ηρkγφ(cid:48)(cid:62)
k − η2ρkγφ(cid:48)(cid:62)
k )λk + ρkδk(ξk))φk
k )λkφk + ηρkδk(ξk)φk + (φ(cid:62)
k λkφk − ρkγφ(cid:62)
k λkφ(cid:48)
(16)
k)).
(17)
The equilibrium point of the above O.D.E. is (0, ξ∗). Hence, we only need to transform the coordi-
nate of ξt to xt = ξt − ξ∗, which results to the O.D.E. in (14) and (15). With the above result, we are
now ready to prove convergence of Algorithm 1. The proof simply follows from Borkar and Meyn
theorem in Lemma 2.1, of which the details can be found in Sutton et al. (2009).
Theorem 3.1. Under the step size condition (33) , with Algorithm 1 in Appendix, ξk → ξ∗ as
k → ∞ with probability one, where ξ∗ is the fixed point of (6).
Proof. The proof is done by checking Assumption 7.1 in Appendix.
Remark 3.1. Theorem 3.1 doesn't require any condition on η. Therefore, we can set η = 0, which
results to GTD2 developed in Sutton et al. (2009).
3.2 RECOVERING SINGLE TIME-SCALE TDC
In this section, we derive a single-time scale version of TDC (Sutton et al., 2009) through the back-
stepping design in the previous section. TDC (Sutton et al., 2009) was originally developed as a
two-time scale algorithm in Sutton et al. (2009). Even though the two time-scale method provides
theoretical guarantee for a larger class of algorithms, the single time-scale scheme provides more
simplicity in practice, and shows faster convergence empirically. Subsequently, Maei (2011) pro-
vided a single-time scale version of TDC by multiplying a large enough constant η > 0 to the faster
time scale part (7), which leads to
λk+1 = λk + βkη(−φ(cid:62)
ξk+1 = ξk + βk(−ρkγφ(cid:62)
k λk + ρkδk(ξk))φk
k λkφ(cid:48)
k + ρkδk(ξk)φk),
where
η > max (cid:8)0, −λmin
(cid:0)C −1(A + A(cid:62))/2(cid:1)(cid:9) .
7
(18)
(19)
(20)
Here, we derive another version of single-time TDC by multiplying a constant to the slower time-
scale part in (8), which results in
λk+1 = λk + αk(−φ(cid:62)
ξk+1 = ξk + αkβ(φ(cid:62)
k λk + ρkδk(ξk))φk
k λkφ(cid:48)
k λkφk − ρkγφ(cid:62)
k + ρkδk(ξk)φk),
where β satisfies
0 < β < −
λmin(C)
λmin(A)
if λmin(A) < 0, else β > 0.
(21)
(22)
(23)
We can derive the above algorithm following similar steps as in Section 3.1. Let us first consider the
following dynamic model:
̇λt = −Cλt − Axt
̇xt = ut
(24)
(25)
Using the backstepping technique, we can prove that the above system admits the origin as a global
asymptotically stable equilibrium point with the control input ut := β (cid:0)(A(cid:62) − C)λt − Aξt
(cid:1), which
is shown in the following lemma:
Lemma 3.2. Consider the O.D.E. in (24) and (25). Suppose that we choose the control input
ut := β (cid:0)(A(cid:62) − C)λt − Aξt
(cid:1)), and β satisfies condition (23). Then, the above O.D.E. has globally
asymptotically stable origin, i.e., (λt, xt) → (0, 0) as t → ∞.
The proof of Lemma 3.2 is given in Appendix Section 7.4.2. By Borkar and Meyn theorem
in Lemma 2.1, we can readily prove the convergence of Algorithm 2 in Appendix, which uses
stochastic recursive update (21) and (22).
Theorem 3.2. Consider Algorithm 2 in Appendix. Under the step size condition (33), and if β
satisfies (23), ξk → ξ∗ as k → ∞ with probability one, where ξ∗ is the fixed point of (6).
We will call the Algorithm 4 as TDC-slow, and single-time version of TDC suggested by Maei
(2011) as TDC-fast. Other than the multiplication of a constant reflecting two-time scale property,
we can make TDC into a single-time algorithm, which we call a single time-scale TDC2, while the
original version in Maei (2011) will be called the single time-scale TDC. The derivation is given in
Appendix Section 7.5. The performance of such versions of TDC are evaluated in Appendix Sec-
tion 7.9.1. Even though not one of the algorithms outperforms each other, TDC-slow and TDC2
shows better performance in general.
3.3 GENERALIZING TDC++
This section provides versions of TDC++ (Ghiassian et al., 2020), which is variant of TDC. With
an additional regularization term ξk on both updates of TDC in (7) and (8), the update is written as
follows:
λk+1 = λk + αkη(−φ(cid:62)
ξk+1 = ξk + αk(−ρkγφ(cid:62)
k λk + ρkδk(ξk))φk − βλk)
(26)
k λkφ(cid:48)
where η > 0 satisfies (20) and β > 0 is a new parameter. Note that TDC++ can be simply viewed
as variant of TDC by adding the term βλk in the update, which can be seen as a regularization term.
Therefore, letting β = 0 yields the original TDC. In this paper, we prove that our controller design
leads to the following update:
k − βλk + ρkδk(ξk)φk),
(27)
λk+1 = λk + αkη(−φ(cid:62)
ξk+1 = ξk + αk(−ρkγφ(cid:62)
k λk + ρkδk(ξk))φk − βλk)
k λkφ(cid:48)
k + (1 − κη)φ(cid:62)
k λkφk − κβηλk + ρkκηδk(ξk)φk),
where κ and β are new parameters and when κ = 1/η it becomes TDC++. The difference with
the original TDC++ can be seen in their corresponding O.D.E. forms. The corresponding O.D.E.
(cid:21)
.
for (26) and (27) (original TDC++) can be expressed as: d
dt
(cid:20) −η(C + βI) −ηA
A(cid:62) − C − βI −A
(cid:20)λt
xt
=
(cid:21)
Meanwhile,
the O.D.E. corresponding to (28) and (29) (new TDC++) becomes d
dt
8
(28)
(29)
(cid:21) (cid:20)λt
xt
(cid:21)
(cid:20)λt
xt
=
(cid:20) −η(C + βI)
−ηA
A(cid:62) − κη(C + βI) −κηA
behavior of new TDC++. The result shows that in general, smaller κ leads to better performance.
The results are given in Appendix Section 7.9.
. We experiment under different of κ and η to examine the
(cid:21) (cid:20)λt
xt
(cid:21)
Lemma 3.3. Consider the following O.D.E.:
̇λt = −η(C + βI)λt − ηAxt
̇xt = ut.
(30)
(31)
Suppose that we choose the control input ut := (A(cid:62) − κη(C + βI))λt − κηAxt. Assume η > 0
and β and κ satisfies the following condition: β + κλmin(A) > λmin(C). Then, the above O.D.E.
has globally asymptotically stable origin, i.e., (λt, xt) → (0, 0) as t → ∞.
The proof is given in Appendix Section 7.4.3. With Lemma 2.1, we can prove the convergence of
stochastic update with (28) and (29) whose pseudo code is given in Algorithm 5 in Appendix.
Theorem 3.3. Consider Algorithm 5 in Appendix. Under the step-size condition (33) and if η
satisfies (20), then ξk → ξ∗ as k → ∞ with probability one, where ξ∗ is the TD fixed point in (6).
Remark 3.2. We can replace the regularization term with nonlinear terms satisfying certain condi-
tions. The details are given in Appendix Section 7.6.
4 EXPERIMENTS
We verify the performance and convergence of the proposed BTD under standard benchmarks
to evaluate off-policy TD-learning algorithms, including Baird environment (Baird, 1995), Ran-
domWalk (Sutton et al., 2009) with different features, and Boyan chain (Boyan, 2002). The details
about the environments are given in Appendix Section 7.7. From the experiments, we see how
BTD behaves under different coefficients η ∈ {−0.5, −0.25, 0, 0.25, 0.5}. We measure the Root
Mean-Squared Projected Bellman Error (RMSPBE) as the performance metric, and every results
are averaged over 100 runs. From Table 1, the result with η = 0.5 shows the best performance
except at Baird, where η = 0, corresponding to GTD2 performs best. There exist two aspects on the
role of η. First of all, it can be thought of as a parameter that can mitigate the effect of instability
coming from matrix A in (9). For example, a smaller η can stabilize the system. However, as a
trade off, if η is too small, then the update rate might be too small as well. As a result, the overall
convergence can be slower. Furthermore, η also controls the effect of −C in (13) in the BTD update
rules, where −C corresponds to (−η + η2)φ(cid:62)
k λkφk in (17). Note that the role of η in the final BTD
update rule in (17) shows different perspectives compared to that in (9). In particular, η = 1/2
maximizes the effect of −C in (17). From Table 1, it leads to reasonably good performances in most
domains. Another natural choice is to multiply η to −C instead of A. However, in such cases, we
need to introduce another constrain η > 0, whereas in the current BTD, convergence is guaranteed
for all η ∈ R. Finally, we note that simply multiplying −C by a large positive constant does not
lead to good results in general. This is because in this case, it may increase variance, and destabilize
the algorithm. Overall results are given in Appendix Section 7.8.
Table 1: Backstepping TD, step-size = 0.01
η
Env
Boyan
Dependent
Inverted
Tabular
Baird
-0.5
-0.25
0
0.25
0.5
1.51 ± 0.66
0.11 ± 0.19
0.21 ± 0.25
0.17 ± 0.28
0.1 ± 0.64
1.481 ± 0.656
0.097 ± 0.163
0.173 ± 0.218
0.147 ± 0.238
0.09 ± 0.629
1.452 ± 0.647
0.086 ± 0.142
0.151 ± 0.193
0.133 ± 0.208
0.085 ± 0.625
1.428 ± 0.64
0.079 ± 0.128
0.139 ± 0.177
0.124 ± 0.191
0.087 ± 0.628
1.408 ± 0.635
0.076 ± 0.122
0.136 ± 0.172
0.122 ± 0.188
0.092 ± 0.637
9
5 CONCLUSION
In this work, we have proposed a new framework to design off-policy TD-learning algorithms from
control-theoretic view. Future research directions would be extending the framework to non-linear
function approximation setting.
6 ACKNOWLEDGEMENTS
This work was
supported by the National Research Foundation under Grant NRF-
2021R1F1A1061613, Institute of Information communications Technology Planning Evaluation
(IITP) grant funded by the Korea government (MSIT)(No.2022-0-00469), and the BK21 FOUR
from the Ministry of Education (Republic of Korea). (Corresponding author: Donghwan Lee.)
REFERENCES
Adrià Puigdomènech Badia, Bilal Piot, Steven Kapturowski, Pablo Sprechmann, Alex Vitvitskyi,
Zhaohan Daniel Guo, and Charles Blundell. Agent57: Outperforming the atari human benchmark.
In International Conference on Machine Learning, pp. 507–517. PMLR, 2020.
Leemon Baird. Residual algorithms: Reinforcement learning with function approximation.
In
Machine Learning Proceedings 1995, pp. 30–37. Elsevier, 1995.
Vivek S Borkar and Sean P Meyn. The ode method for convergence of stochastic approximation
and reinforcement learning. SIAM Journal on Control and Optimization, 38(2):447–469, 2000.
Justin A Boyan. Technical update: Least-squares temporal difference learning, 2002.
Xinshi Chen, Shuang Li, Hui Li, Shaohua Jiang, Yuan Qi, and Le Song. Generative adversarial user
model for reinforcement learning based recommendation system. In International Conference on
Machine Learning, pp. 1052–1061. PMLR, 2019.
Xinyue Chen, Che Wang, Zijian Zhou, and Keith Ross. Randomized ensembled double q-learning:
Learning fast without a model. arXiv preprint arXiv:2101.05982, 2021.
Bo Dai, Albert Shaw, Lihong Li, Lin Xiao, Niao He, Zhen Liu, Jianshu Chen, and Le Song. Sbeed:
Convergent reinforcement learning with nonlinear function approximation. In International Con-
ference on Machine Learning, pp. 1125–1134. PMLR, 2018.
Simon S Du, Jianshu Chen, Lihong Li, Lin Xiao, and Dengyong Zhou. Stochastic variance reduction
methods for policy evaluation. In International Conference on Machine Learning, pp. 1049–1058.
PMLR, 2017.
Rafael Fierro and Frank L Lewis. Control of a nonholomic mobile robot: Backstepping kinematics
into dynamics. Journal of robotic systems, 14(3):149–163, 1997.
Thor I Fossen and Jan P Strand. Tutorial on nonlinear backstepping: Applications to ship control.
1999.
Sina Ghiassian, Andrew Patterson, Shivam Garg, Dhawal Gupta, Adam White, and Martha White.
Gradient temporal-difference learning with regularized corrections. In International Conference
on Machine Learning, pp. 3524–3534. PMLR, 2020.
Omer Gottesman, Fredrik Johansson, Matthieu Komorowski, Aldo Faisal, David Sontag, Finale
Doshi-Velez, and Leo Anthony Celi. Guidelines for reinforcement learning in healthcare. Nature
medicine, 25(1):16–18, 2019.
Hassan K Khalil. Nonlinear control, volume 406. Pearson New York, 2015.
Jens Kober, J Andrew Bagnell, and Jan Peters. Reinforcement learning in robotics: A survey. The
International Journal of Robotics Research, 32(11):1238–1274, 2013.
10
Petar V Kokotovic. The joy of feedback: nonlinear and adaptive. IEEE Control Systems Magazine,
12(3):7–17, 1992.
Qingfeng Lan, Yangchen Pan, Alona Fyshe, and Martha White. Maxmin q-learning: Controlling
the estimation bias of q-learning. arXiv preprint arXiv:2002.06487, 2020.
Donghwan Lee and Niao He. A unified switching system perspective and ode analysis of q-learning
algorithms. arXiv preprint arXiv:1912.02270, 2019.
Donghwan Lee, Han-Dong Lim, Jihoon Park, and Okyong Choi. Versions of gradient temporal
difference learning. arXiv preprint arXiv:2109.04033, 2021.
Bo Liu, Ji Liu, Mohammad Ghavamzadeh, Sridhar Mahadevan, and Marek Petrik. Finite-sample
analysis of proximal gradient td algorithms. arXiv preprint arXiv:2006.14364, 2020.
Sergio Valcarcel Macua, Jianshu Chen, Santiago Zazo, and Ali H Sayed. Distributed policy evalu-
ation under multiple behavior strategies. IEEE Transactions on Automatic Control, 60(5):1260–
1274, 2014.
Tarek Madani and Abdelaziz Benallegue. Backstepping control for a quadrotor helicopter. In 2006
IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 3255–3260. IEEE,
2006.
Hamid Reza Maei. Gradient temporal-difference learning algorithms. 2011.
A Rupam Mahmood, Huizhen Yu, Martha White, and Richard S Sutton. Emphatic temporal-
difference learning. arXiv preprint arXiv:1507.01569, 2015.
Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Belle-
mare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level
control through deep reinforcement learning. nature, 518(7540):529–533, 2015.
Doina Precup, Richard S Sutton, and Sanjoy Dasgupta. Off-policy temporal-difference learning
with function approximation. In ICML, pp. 417–424, 2001.
Herbert Robbins and Sutton Monro. A stochastic approximation method. The annals of mathemati-
cal statistics, pp. 400–407, 1951.
Julian Schrittwieser, Ioannis Antonoglou, Thomas Hubert, Karen Simonyan, Laurent Sifre, Simon
Schmitt, Arthur Guez, Edward Lockhart, Demis Hassabis, Thore Graepel, et al. Mastering atari,
go, chess and shogi by planning with a learned model. Nature, 588(7839):604–609, 2020.
Eduardo D Sontag. Mathematical control theory: deterministic finite dimensional systems, vol-
ume 6. Springer Science & Business Media, 2013.
Richard S Sutton. Learning to predict by the methods of temporal differences. Machine learning, 3
(1):9–44, 1988.
Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press, 2018.
Richard S Sutton, Csaba Szepesvári, and Hamid Reza Maei. A convergent o (n) algorithm for
off-policy temporal-difference learning with linear function approximation. Advances in neural
information processing systems, 21(21):1609–1616, 2008.
Richard S Sutton, Hamid Reza Maei, Doina Precup, Shalabh Bhatnagar, David Silver, Csaba
Szepesvári, and Eric Wiewiora. Fast gradient-descent methods for temporal-difference learning
with linear function approximation. In Proceedings of the 26th Annual International Conference
on Machine Learning, pp. 993–1000, 2009.
Hado Van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double q-
learning. In Proceedings of the AAAI conference on artificial intelligence, volume 30, 2016.
Christopher JCH Watkins and Peter Dayan. Q-learning. Machine learning, 8(3):279–292, 1992.
11
7 APPENDIX
7.1 TECHINICAL DETAILS
We elaborate the conditions for the Borkar and Meyn Theorem (Borkar & Meyn, 2000). Consider
the stochastic approximation in (2).
Assumption 7.1. 1. The mapping f : Rn → Rn is globally Lipschitz continuous, and there exists a
function f∞ : Rn → Rn such that
lim
c→∞
f (cx)
c
= f∞(x),
∀x ∈ Rn.
(32)
2. The origin in Rn is an asymptotically stable equilibrium for the O.D.E.: ̇xt = f∞(xt).
3. There exists a unique globally asymptotically stable equilibrium xe ∈ Rn for the ODE
̇xt = f (xt) , i.e., xt → xe as t → ∞.
4. The sequence {mk, k ≥ 1} where Gk is sigma-algebra generated by {(xi, mi, i ≥ k)},
is a Martingale difference sequence. In addition , there exists a constant C0 < ∞ such that for any
initial x0 ∈ Rn , we have E[||mk+1||2|Gk] ≤ C0(1 + ||xk||2), ∀k ≥ 0.
5. The step-sizes satisfies the Robbins-Monro condition (Robbins & Monro, 1951) :
∞
(cid:88)
k=0
αk = ∞,
∞
(cid:88)
k=0
α2
k < ∞.
(33)
Furthermore, we introduce an important tool to prove stability of O.D.E..
Lemma 7.1 (LaSall'es Invariance Principle (Khalil, 2015)). Let the origin be an equilibrium point
for (3). Let V : Rn → R be a continuously differentiable and positive definite function satisfying
the below conditions:
1. V (x) is radially unbounded function , i.e., ||x|| → ∞ implies V (x) → ∞,
2. Consider the Lie derivative Lf V (x) := ∇xV (x)(cid:62)f (x) so that ̇V (xt) = Lf V (xt) along
the solution, and it is negative semi-definite, i.e., Lf V (x) ≤ 0 for all x ∈ Rn.
Let S := {x ∈ Rn | Lf V (x) = 0}, and suppose that no solution can stay identically in S other
than trivial solution x ≡ 0, where we say that a solution stays identically in S if x(t) ∈ S, ∀t ≥ 0 .
Then, the origin is globally asymptotically stable.
Definition 7.1 (Invariant set (Khalil, 2015)). A set M is an invariant set with respect to ̇x = f (x) if
x0 ∈ M → xt ∈ M for all t ≥ 0.
7.2 OMIITTED PSEUDO CODES AND DIAGRMAS
Algorithm 1 Backstepping TD
1: Initialize ξ0, λ0 ∈ Rn.
2: Set the step-size (αk)∞
3: for iteration k = 0, 1, . . . do
4:
5:
6:
7: end for
k=0, and the behavior policy μ.
Sample sk ∼ dμ and ak ∼ μ
Sample s(cid:48)
k ∼ P (sk, ak, *) and rk+1 = r(sk, ak, s(cid:48)
k)
Update λk and ξk using (16) and (17) respectively
12
Algorithm 2 TDC-slow
1: Initialize ξ0, λ0 ∈ Rn.
2: Set the step-size (αk)∞
3: for iteration k = 0, 1, . . . do
4:
5:
6:
7: end for
k=0, and the behavior policy μ.
Sample sk ∼ dμ and ak ∼ μ
Sample s(cid:48)
k ∼ P (sk, ak, *) and rk+1 = r(sk, ak, s(cid:48)
k)
Update λk and ξk using (18) and (19) respectively
Algorithm 3 TDC++2
1: Initialize ξ0, λ0 ∈ Rn.
2: Set the step-size (αk)∞
3: for iteration k = 0, 1, . . . do
4:
5:
6:
7: end for
k=0, and the behavior policy μ.
Sample sk ∼ dμ' and ak ∼ μ
k ∼ P (sk, ak, *) and rk+1 = r(sk, ak, s(cid:48)
Sample s(cid:48)
k)
Update λk and ξk using (28) and (29) respectively
u
(cid:82)
x
−A
+
(cid:82)
λ
−C + ηA
u
(cid:82)
x
+
−A
+
−ηλ
u
+
(cid:82)
z
−A
+
−η ̇λ
λ
λ
(cid:82)
−C
(cid:82)
−C
Figure 1: Backstepping diagram
7.3 EXAMPLE OF BACKSTEPPING
Here, we provide a simple example to design control law using backstepping control.
13
Example 7.1. Consider the following two-dimensional system:
̇λt = −λ3
̇xt = ut,
t − λt + xt
(34)
where λt, xt ∈ R are the states, and ut ∈ R is control input. First, considering xt in (34) as virtual
input xs(λt), it is easy to check that xs(λt) = λt satisfies the condition in Step 1 in Section 2.3.
Substituting xt in (34) with xs(λt), we have
The globally asymptotically stability of the above system cab be established with the following Lya-
punov function:
̇λt = −λ3
t .
Let zt := xt − xs(λt). Expressing the O.D.E. in (34) with (λt, zt), we have
V (λt) =
λ2
t
2
.
t + zt
̇λt = −λ3
̇xt = ut + λ3
t − zt.
Suppose we choose a candidate Lyapunov function:
Vc(λt, zt) = V (λt) +
z2
t
2
The time derivative of Vc(λt, zt) becomes
̇Vc(λt, zt) = −λ4
t + λtzt + zt(ut + λ3
t − zt).
To make the time derivative negative definite, we can design the control law as:
which leads to the following inequality:
ut := −λt − λ3
t ,
̇Vc(λt, zt) ≤ −λ4
t − z2
t
Now, we can conclude that the origin of the system becomes globally asymptotically stable.
7.4 OMITTED PROOFS
7.4.1 PROOF OF LEMMA 3.1
Proof. In this proof, we follow the steps given in the backstepping scheme in Section 3. First,
substituting xt in (9) with a virtual controller ̃x(λt), we will design a control law ̃x(λt) that stabilizes
the following new virtual system:
̇λt = (−C + ηA)λt − A ̃x(λt).
(35)
Even though matrix C is positive definite, due to matrix A, the system may be unstable. One natural
choice of the virtual controller is ̃x(λt) = ηλt. Plugging into (35) leads to ̇λt = −Cλt. The
system now has a globally asymptotically stable origin due to the positive definiteness of matrix C.
It is straightforward to verify the global asymptotic stability of the above system with the following
Lyapunov function:
V (λt) :=
||λt||2
2
2
.
(36)
With this result in mind, we now consider the original O.D.E. in (9) and (10). Applying simple
algebraic manipulations yield ̇λt = −Cλt − A(xt − ηλt),
̇xt = ut. The error between xt and the
14
virtual controller ̃x(λt) can be expressed as new variable zt, which is zt := xt − ̃x(λt) = xt − ηλt.
Rewriting the O.D.E. in (9) and (10) with (λt, zt) coordinates, we have
̇λt = −Cλt − Azt
̇zt = ut + ηCλt + ηAzt.
(37)
To prove the global asymptotic stability of the above system, consider the function Vc(λt, zt) :=
V (λt) + 1
2 where V (λt) is defined in (36) . The time derivative of the Lyapunov function
along the system's solution becomes
2 ||zt||2
̇Vc(λt, zt) = λ(cid:62)
t (−Cλt − Azt) + z(cid:62)
t (ut + ηCλt + ηAzt)
= −||λt||2
C + z(cid:62)
t (−A(cid:62)λt + ut + ηCλt + ηAzt).
(cid:20) λt
zt
(cid:21)
=
(cid:21)
A(cid:62)
(cid:21) (cid:20) λt
zt
=: f (λt, zt), and we have ̇Vc = −||λt||2
By taking ut as ut = A(cid:62)λt − ηCλt − ηAzt, the corresponding closed-loop system is d
dt
(cid:20) −C −A
0
C ≤ 0 for all (λt, zt) (cid:54)= (0, 0).
Since the inequality is not strict, Lyapunov theory cannot be directly applied. Therefore, we will use
LaSall'es invariance principle in Lemma 7.1 in Appendix. Define the Lie derivative Lf V (λ, z) :=
− (cid:107)λ(cid:107)2
̇Vc(λt, zt) = Lf V (λt, zt) along the solution. Consider a solution (λt, zt), t ≥ 0
and the set S := {(λ, z) | Lf V (λ, z) = 0} = {(λ, z) | λ = 0}. Suppose that the solution,
(λt, zt), t ≥ 0, is inside S, i.e., (λt, zt) ∈ S, t ≥ 0. Then, we should have λ ≡ 0, which implies
from (37) that z ≡ 0. Therefore, S can only contain the trivial solution (λ, z) ≡ (0, 0). Therefore,
from LaSall'es invariance principle in Lemma 7.1 and noting that Vc is radially unbounded, the
closed-loop system admits the origin as a globally asymptotically stable equilibrium point. Using
the relation zt := xt − ηλt, we can also easily conclude that the closed-loop system in the original
coordinate (λt, xt) admits the origin as a globally asymptotically stable equilibrium point.
C so that
7.4.2 PROOF OF LEMMA 3.2
Proof. One simple option is to set the virtual controller ̃x(λt) := 0, which would result to GTD2
as in Section 3.1. Instead, we take the virtual controller as ̃x(λt) := βλt, and plug into xt in (24),
which results to
̇λt = −Cλt − βAλt = (−C − βA)λt.
The above system is globally asymptotically stable since
−C − βA ≺ 0,
which results from the condition on β in (23). Using change of coordinates, we introduce the new
variable zt,
The O.D.E. in (24) and (25) can be rewritten as
zt := xt − ̃x(λt) = xt − βλt.
̇λt = (−C − βA)λt − Azt
̇zt = ut + (βC + β2A)λt + βAzt.
(38)
Now consider the following candidate Lyapunov function:
Vc(λt, zt) =
β
2
||λt||2 +
1
2
||zt||2.
The time derivative of the Lyapunov function along the system's solution becomes,
̇Vc = βλT
= βλT
t ((−C − βA)λt − Az) + z(cid:62)
t ((−C − βA)λt) + z(cid:62)
t (ut + (βC + β2A)λt + βAzt)
t (ut − βAT λt + (βC + β2A)λt + βAzt).
15
(cid:21)
(cid:20)λt
zt
=
(cid:21)
βA(cid:62)
(cid:21) (cid:20)λt
zt
:= f (λt, zt), and we have ̇Vc = −β||λt||2
By taking ut = βA(cid:62)λt−(βC +β2A)λt−βAzt, the corresponding closed-loop system is d
dt
(cid:20)−C − βA −A
0
−C+βA ≤ 0 for all (λt, zt) (cid:54)=
(0, 0). We will again use LaSall'es invariance principle in Lemma 7.1 in Appendix. Define the
̇Vc(λt, zt) = Lf V (λt, zt) along the solution.
Lie derivative Lf V (λ, z) := −β||λ||2
Consider a solution (λt, zt), t ≥ 0 and the set S := {(λt, zt)|Lf V (λ, z) = 0} = {(λ, z)|λ =
0}. Suppose that the solution (λt, zt), t ≥ 0, is inside S, i.e., (λt, zt) ∈ S, t ≥ 0. Then, we
should have λ ≡ 0, wchih implies from (38) that z ≡ 0. Therefore, S can only contain the trivial
solution (λ, z) ≡ (0, 0). Therefore, from LaSall'es invariance principle in Lemma 7.1 and noting
that Vc is radially unbounded, the closed-loop system admits the origin as a globally asymptotically
stable equilibrium point. Using the relation zt = xt − βλt, we can also conclude that the closed-
loop system in the original coordinate (λt, xt) admits the origin as a globally asymptotically stable
equilibrium point.
C+βA so that
Using the relation zt := xt −βλt , the control input in the original coordinate (λt, xt) can be written
as
ut = βA(cid:62)λt − (βC + β2A)λt − βAzt
= βA(cid:62)λt − (βC + β2A)λt − βA(xt − βλt)
= (βA(cid:62) − βC)λt − βAxt.
Plugging this input into the original open-loop system in (24) and (25), the closed-loop system in
the original coordinate (λt, zt) can be written as
̇λt = −Cλt − Axt,
̇xt = β(A(cid:62) − ηC)λt − βAxt,
(39)
(40)
whose origin is also globally asymptotically stable according to Lemma 3.2. Recovering back from
xt to ξt, we have
̇λt = −Cλt − Aξt + b,
̇ξt = β(A(cid:62) − ηC)λt − βAξt + βb,
whose corresponding stochastic approximation is (21) and (22).
7.4.3 PROOF OF LEMMA 3.3
Proof. The proof is similar to Lemma 3.1, hence we breifly explain the procedure. Let the virtual
controller ̃x(λt) = κλt. We first need to check −ηC − κηA − ηβI is negative definite. From the
condition that β + κλmin(A) > λmin(C), −ηC − κηA − ηβI becomes negative definite.
Using coordinate transform , we define the new variable zt,
zt = xt − ̃x(λt) = xt − κλt.
Expressing (30) and (31) in (λt, zt), we have
̇λt = −η(C + βI + κA)λt − ηAzt
̇zt = ut + ηκ(C + βI + κA)λt + ηκAzt.
Now, consider the following positive definite function V (λt, zt), and its time derivative:
V (λt, zt) =
1
2η
||λt||2
2 +
1
2
||zt||2
2,
̇V = −λ(cid:62)
= −λ(cid:62)
t (C + βI + κA)λt − Azt) + (z(cid:62)
t (C + βI + κA)λt + (z(cid:62)
t )(ut + ηκ(C + βI + κA)λt + κηAzt)
t )(−A(cid:62)λt + ut + κη(C + βI + κA)λt + κηAzt)
16
(cid:21)
(cid:21)
=
A(cid:62)
(cid:20)λt
zt
(cid:21) (cid:20)λt
zt
(cid:20)−η(C + βI + κA) −ηA
Taking ut = A(cid:62)λt − ηκ(C + βI + κA)λt − κηAzt, the corresponding closed-loop system becomes
d
C+βI+κA ≤
dt
0. To use LaSall'es invariance principle in Lemma 7.1 given in Appendix, first define the Lie deriva-
tive Lf V (λ, z) := −||λ||2
C+βI+κA along the solution. Consider the solution (λt, zt), t ≥ 0 and the
set S := {(λ, z)|Lf V (λ, z) = 0} = {(λ, z)|λ = 0}. Suppose that the solution (λt, zt), t ≥ 0 is
inside S, i.e., (λt, zt) ∈ S, t ≥ 0. Therefore, S can only contain the trivial solution (λ, z) ≡ (0, 0).
Applying Lasall'es invariance principle in Lemma 7.1, we can conclude that the original coordinate
(λt, xt) admits the origin as globally asymptotically stable equilibrium point.
:= f (λt, zt), and we have ̇Vc = −||λt||2
0
Using the relation zt := xt − κλt, the control input in the original coordinate (λt, xt) can be written
as
ut = AT λt − ηκ(C + βI + κA)λt − κηAzt
= AT λt − ηκ(C + βI + κA)λt − κηA(xt − κλt)
= (AT − κηβI − κηC)λt − κηAxt.
Plugging this input into the original open-loop system in (30) and (31), the closed-loop system in
the original coordinate (λt, xt) can be written as
̇λt = −η(C + βI)λt − ηAxt
̇xt = (A(cid:62) − κη(C + βI))λt − κηAxt.
Recovering back from xt to ξt we have
̇λt = −η(C + βI)λt − ηAξt + b
̇ξt = (A(cid:62) − κη(C + βI))λt − κηAξt + κηb,
whose corresponding stochastic approximation is (28) and (29).
7.5 DERIVATION OF SINGLE TIME-SCALE TDC2
In Section 3.2, we discussed turning TDC into single-time scale algorithm reflecting the two-time
scale property. Other than multiplication of constant reflecting two-time scale property, we can make
TDC into single-time scale algorithm as follows:
λk+1 = λk + αk(−ηφ(cid:62)
ξk+1 = ξk + αk((φ(cid:62)
k) − ηφkλkφk + ρkδk(ξk)φk)
k λk + ρkδk(ξk))φk)
k λkφk − ρkγφ(cid:62)
k λkφ(cid:48)
(42)
(41)
It can be shown that the above stochastic update follows from stabilizing controller design in the
following lemma:
Lemma 7.2. Consider the following O.D.E.:
̇λt = −ηCλt − Axt
̇xt = ut
(43)
Suppose we choose the control input ut := (A(cid:62) − ηC)λt − Axt, and η satisfies condition (20).
Then, the above O.D.E. has globally asymptotically stable origin, i.e., (λt, xt) → (0, 0) as t → ∞.
Proof. Considering xt in (43) as virtual controller xs(λt), one possible option is to take xs(λt) := 0.
Using backstepping method as in Section 3, it results to O.D.E. corresponding to GTD2 (Sutton
et al., 2009). Instead, we choose the virtual controller xs(λt) := λt. Substituting xt with xs(t)
in (43), we can rewrite (43) as follows:
̇λt = −ηCλt − Axs(t) = (−ηC − A)λt.
Since −ηC − A ≺ 0 due to the condition on η in (20), the origin of the above system is globally
asymptotically stable. Now, denote the error between the virtual controller xs(t) and xt as zt :=
xt − xs(λt) = xt − λt . Using change of coordinates, we can rewrite the O.D.E. in (43) as follows:
̇λt = (−ηC − A)λt − Azt
̇zt = ut + (ηC + A)λt + Azt
(44)
17
Now, let us define the following positive definite function:
1
2
V (λt, zt) =
||λt||2 +
1
2
||zt||2
The time derivative of the above function becomes,
̇V = λ(cid:62)
= λ(cid:62)
t ((−ηC − A)λt − Azt) + z(cid:62)
t (−ηC − A)λt + z(cid:62)
t (ut + (ηC + A)λt + Azt)
t (ut − A(cid:62)λt + (ηC + A)λt + Azt).
Take ut
(cid:20)−ηC − A −A
0
(cid:21)
(cid:21) (cid:20)λt
zt
:= A(cid:62)λt − (ηC + A)λt − Azt, the corresponding closed-loop system is d
dt
(cid:21)
(cid:20)λt
zt
=
A(cid:62)
:= f (λt, zt), and we have ̇Vc = −||λt||2
ηC+A ≤ 0. To use LaSall'es in-
variance principle in Lemma 7.1 given in Appendix, first define the Lie derivative Lf V (λ, z) :=
−||λ||2
ηC+A along the solution. Consider the solution (λt, zt), t ≥ 0 and the set S :=
{(λ, z)|Lf V (λ, z) = 0} = {(λ, z)|λ = 0}. Suppose that the solution (λt, zt), t ≥ 0 is inside
S, i.e., (λt, zt) ∈ S, t ≥ 0. Therefore, S can only contain the trivial solution (λ, z) ≡ (0, 0). Ap-
plying Lasall'es invariance principle in Lemma 7.1, we can conclude that the original coordinate
(λt, xt) admits the origin as globally asymptotically stable equilibrium point.
Using the relation zt := xt − λt, the control input in the original coordinate (λt, xt) can be written
as
ut = A(cid:62)λt − (ηC + A)λt − Azt
= A(cid:62)λt − (ηC + A)λt − A(xt − λt)
= (A(cid:62) − ηC)λt − Axt.
Plugging this input into the original open-loop system in (43), the closed-loop system in the original
coordinate (λt, xt) can be written as
̇λt = −ηCλt − Axt
̇xt = (A(cid:62) − ηC)λt − Axt.
Recovering back from xt to ξt we have
̇λt = −ηCλt − Aξt + b
̇ξt = (A(cid:62) − ηC)λt − Aξt + b,
whose corresponding stochastic approximation is (41) and (42).
Remark 7.1. The difference from the update in Algorithm 2 can be seen in their corresponding
O.D.E. respectively. Multiplying large constant η to C is enough to make the origin of the O.D.E.
stable.
By Borkar and Meyn theorem in Lemma 2.1, we can readily prove the convergence of Algorithm 4.
Theorem 7.1. Consider Algorithm 4 given in the Appnedix, which uses stochastic recursive up-
date (41) and (42). Under the step-size condition (33) and if η satisfies (20), then ξk → ξ∗ as
k → ∞ with probability one, where ξ∗ is the TD fixed point in (6).
Algorithm 4 Single-time scale TDC2
1: Initialize ξ0, λ0 ∈ Rn.
2: Set the step-size (αk)∞
3: for iteration k = 0, 1, . . . do
4:
5:
6:
7: end for
Sample sk ∼ dμ and ak ∼ μ
Sample s(cid:48)
k ∼ P (sk, ak, *) and rk = r(sk, ak, s(cid:48)
k)
Update λk and ξk using (41) and (42) respectively
k=0, and the behavior policy μ.
Comparison on performance on versions of TDC are given in Section 7.9.1.
18
7.6 TDC++ WITH NONLINEAR TERMS
This section provides replacing the so-called regularization term in TDC++ with nonlinear term
including ReLU and Leaky ReLU. The basic motiviation is that treating the regularization term
as known disturbance, we can cancel the nonlinear term through backstepping. The condition on
nonlinear function f : Rn → Rn are as follows:
Assumption 7.2.
1. f : Rn → Rn is Lipschitz continuous.
2. For some positive constant c > 0,
||f (λk)||2
2 ≤ c||λk||2
2.
3. f is zero at origin.
4. limc→∞ f (cλk)/c → 0 or limc→∞ f (cλk)/c → f (λk).
Remark 7.2. Such nonlinear terms include ReLU and Leaky ReLU.
Overall we can prove that the below stochastic recursive update is convergent:
λk+1 = λk + αkη(−φ(cid:62)
ξk+1 = ξk + αk(−ρkγφ(cid:62)
k λk + ρkδk(ξk))φk − βf (λk))
k + (1 − κη)φ(cid:62)
k λkφ(cid:48)
where fk := f (λk). It has the following corresponding O.D.E. form:
k λkφk − κβηf (λk) + κρkηδk(ξk)φk),
̇λt = −ηCλt − ηβdt − ηAxt
̇xt = (A(cid:62) − κηC)λt − κηβf (λt) − κηAxt.
The global asymptotic stability of the above O.D.E. is stated in the following lemma:
Lemma 7.3. Consider the following O.D.E.:
̇λt = −ηCλt − ηβf (λt) − ηAxt
̇xt = ut.
(45)
(46)
(47)
(48)
Suppose we choose the control input ut := (AT − κηβf (λt) − ηC)λt − κηAxt. Assume η > 0 and
κ and β satisfies the following condition:
1.
2.
0 < κ < −λmin(C)λmin
(cid:16) A+A(cid:62)
2
(cid:17)
0 < κ
if λmin
if λmin
(cid:16) A+A(cid:62)
2
(cid:16) A+A(cid:62)
2
(cid:17)
(cid:17)
< 0
≥ 0
β <
1
c
λmax(C + κA)
(49)
(50)
Then, the above O.D.E. has globally asymptotically stable origin, i.e., (λt, xt) → (0, 0) as t → ∞.
Proof. The proof is similar to Lemma 3.1, hence we briefly explain the procedure. Let the virtual
controller ̃x(λt) = κλt. We first need to check that
has globally asymptotically stable origin. Consider the candidate Lyapunov function
̇λt = −ηCλt − ηβf (λt) − ηκAλt
V (λt) =
||λt||2
2
2
,
which leads to
̇V (λt) = −η(C + κA)||λt||2
2 − ηβf (λt)(cid:62)λt ≤ −η(C + κA − cβI)||λt||2
2.
19
̇V becomes negative definite function due to (49) and (50).
Now, using coordinate transform , we define the error variable zt,
zt = xt − ̃x(λt) = xt − κλt.
Expressing (30) and (31) in (λt, zt), we have
̇λt = −η(C + κA)λt − ηβf (λt) − ηAzt
̇zt = ut + κη(C + κA)λt + κηβf (λt) + κηAzt.
Now, consider the following positive definite function V (λt, zt), and its time derivative:
V (λt, zt)
1
2η
=
||λt||2
2 +
1
2
||zt||2
2
̇V
= λ(cid:62)
= −λ(cid:62)
t (−(C + κA)λt − βf (λt) − Az) + (z(cid:62)
t ((C + κA)λt − βf (λt)) + (z(cid:62)
t )(ut + κη(C + κA)λt + κηβf (λt) + κηAzt)
t )(−A(cid:62)λt + ut + κη(C + κA)λt + κηβf (λt) + κηAzt)
To achieve ̇V ≤ 0, we can choose ut as follows:
ut = A(cid:62)λt − κη(C + βf (λt) + A)λt − κηAzt
= A(cid:62)λt − κη(C + βf (λt) + A)λt − κηA(xt − λt)
= (A(cid:62) − κηC)λt − κηβf (λt) − κηAxt
Using Lasall'es Invariance Principle in Lemma 7.1 and similar arguments as before, we can show
that the origin is globally asymptotically stable. The proof is complete.
By Borkar and Meyn theorem in Lemma 2.1, we can readily prove the convergence of Algorithm 5.
Theorem 7.2. Consider Algorithm 5. Under the step-size condition (33) and if η satisfies (20), then
ξk → ξ∗ as k → ∞ with probability one, where ξ∗ is the TD fixed point in (6).
Algorithm 5 TDC++ with nonlinear terms
1: Initialize ξ0, λ0 ∈ Rn.
2: Set the step-size (αk)∞
3: for iteration k = 0, 1, . . . do
4:
5:
6:
7: end for
Sample sk ∼ dμ' and ak ∼ μ
k ∼ P (sk, ak, *) and rk+1 = r(sk, ak, s(cid:48)
Sample s(cid:48)
k)
Update λk and ξk using (45) and (46) respectively
k=0, and the behavior policy μ.
Here, we present experimental results on TDC++ with nonlinear terms. As shown in below,
replacing simple regularization term λk with Relu function increases the performance. We set
κ = 1, η = 1, β = 1 and step-size a s 0.01. When f is Relu and LeakyRelu, we call it TDCRelu
and TDCLeaky respectively.
Table 2: Best case comparison
Algorithms
Env
Boyan
Dependent
Inverted
Tabular
Baird
TDCRelu
TDCLeaky
TDC++
1.392 ± 0.558
0.138 ± 0.143
0.358 ± 0.21
0.178 ± 0.174
0.078 ± 0.624
1.423 ± 0.55
0.139 ± 0.143
0.36 ± 0.211
0.179 ± 0.175
0.078 ± 0.624
2.381 ± 0.256
0.201 ± 0.192
0.493 ± 0.243
0.25 ± 0.245
0.087 ± 0.627
20
7.7 EXPERIMENT ENVIRONMENTS
7.7.1 BARID COUNTER-EXAMPLE
Baird's counter-example (Baird, 1995) is a well-known example where TD-learning diverges with
over-parameterized linear function approximation. The environment consists of seven states. There
are two actions for each state, namely solid and dash action. Solid action leads to the seventh state
deterministically, and dash action leads to state other than seventh state with probability 1/6 and no
transition occurs with probability 5/6. The behavior policy selects dashed action with probability
1/7, and solid action with 6/7. As in Baird (1995), we set the initial parameters as [1, . . . , 10, 1]. The
target policy π only selects solid action at every state.
Φ :=
2 0
0 2
0 0
0 0
0 0
0 0
0 0
1
7
Dμ :=
. . .
∈ R7×8, P π =
1
1
1
1
1
1
2
0
0
0
0
0
0
1
0 0 0
0 0 0
0 0 0
2 0 0
0 2 0
0 0 2
0 0 0
∈ R7×7, Rπ = 0 ∈ R7,
0
0
2
0
0
0
0
1
7
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
∈ R7×7,
where 0 denotes zero column vector with appropriate dimension.
7.7.2 BOYAN CHAIN
Boyan Chain (Boyan, 2002) has thirteen states with four features and was designed as on-policy
problem. There are two actions and except at state one, where the reward is minus two, each ac-
tion occurs reward minus three. The behavior policy selects each action under same probability.
For states one, five, nine, and 13, the feature vectors are [0,0,0,1],[0,0,1,0],[0,1,0,0], and [1,0,0,0]
respectively. The other states are averages over its neighbouring states.
Φ :=
0
0
0
0
0
1
0
1
3/4 1/4
1/2
1/2
1/4 3/4
0
0
0
0
0
0
0
0
0
3/4 1/4
1/2
1/2
3/4
1/4
1
0
3/4
0
1/2
0
1/4
0
0
0
0
0
0
0
0
0
0
0
0
1/4
1/2
3/4
1
∈ R13×4,
j = i + 1
or
j = 13 or
for
i = 13,
1 ≤ i ≤ 11, 1 ≤ j ≤ 13
j = 13
,
[P π]ij =
if
(cid:26) 1
2
1
1
13
Dμ :=
i = j + 1
i = 12,
∈ R13×13,
if
. . .
Rπ := [−3 −3
1
13
* * * −3 −2
0](cid:62) ∈ R13
21
7.7.3 RANDOM WALK
Random walk (Sutton et al., 2009) has five states and two terminal states. Zero rewards occurs except
at the last state with a plus one reward. The behavior policy μ selects each action with same probabil-
ity. Following Sutton et al. (2009), we use three different representations, namely tabular, dependent,
and inverted features. The diagonal terms are all zero, and off-diagonal terms have a value 1/2, i.e.,
the feature map of the first state becomes [0, 1/2, 1/2, 1/2, 1/2]. For the dependent feature case, we
√
have [1/
2] for each state.
3], [0, 1/
2, 0], [1/
3], [1/
3, 1/
3, 1/
3, 1/
2, 1/
2, 1/
3, 1/
√
√
√
√
√
√
√
√
√
Φtabular :=
Φdependent :=
, Φinverted :=
0 0 0
1 0 0
0 1 0
0 0 1
0 0 0
0 0 0
0 0 0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
√
1/
√
1/
0
0
0
2
3
0
0
√
1/
√
1/
√
1/
0
0
0
0
0
2
√
3 1/
√
2 1/
1
0
, P π :=
3
2
1
0.6
0
0
0
0
0
0
0
1/2
1/2
1/2
1/2
0
0
0
0.6
0
0
0
0
0
1/2
0
1/2
1/2
1/2
0
0
0.4
0
0.6
0
0
0
0
1/2
1/2
0
1/2
1/2
0
0
1/2
1/2
1/2
0
1/2
0
0
1/2
1/2
1/2
1/2
0
0
,
0
0
0.4
0
0.6
0
0
0
0
0
0.4
0
0.6
0
0
0
0
0
0.4
0
0
0
0
0
0
0
0.4
1
.
7.8 EXPERIMENT ON BTD
Table 3: Backstepping TD, step-size = 0.1
η
Env
Boyan
Dependent
Inverted
Tabular
Baird
-0.5
-0.25
0
0.25
0.5
0.336 ± 0.475
0.041 ± 0.073
0.05 ± 0.105
0.075 ± 0.117
0.07 ± 0.596
0.327 ± 0.466
0.037 ± 0.065
0.044 ± 0.092
0.068 ± 0.109
0.063 ± 0.593
0.321 ± 0.457
0.035 ± 0.06
0.041 ± 0.083
0.064 ± 0.104
0.06 ± 0.594
0.317 ± 0.45
0.034 ± 0.057
0.04 ± 0.079
0.063 ± 0.102
0.06 ± 0.597
0.317 ± 0.443
0.036 ± 0.057
0.041 ± 0.078
0.065 ± 0.101
0.063 ± 0.602
7.9 EXPERIMENT ON VERSIONS OF TDC++
Table 4: new TDC++, step-size = 0.01, η = 1/2, β = 1
κ
Env
Boyan
Dependent
Inverted
Tabular
Baird
1/8
1/4
1/2
1
2
2.404 ± 0.242
0.166 ± 0.16
0.366 ± 0.18
0.217 ± 0.216
0.101 ± 0.681
2.4 ± 0.241
0.163 ± 0.156
0.369 ± 0.183
0.214 ± 0.209
0.098 ± 0.679
2.393 ± 0.243
0.165 ± 0.156
0.39 ± 0.194
0.215 ± 0.206
0.094 ± 0.677
2.382 ± 0.255
0.191 ± 0.182
0.478 ± 0.233
0.238 ± 0.227
0.096 ± 0.681
2.374 ± 0.302
0.296 ± 0.27
0.726 ± 0.342
0.342 ± 0.315
0.127 ± 0.711
22
Table 5: new TDC++, step-size = 0.01, η = 1, β = 1
1/8
1/4
1/2
1
2
2.402 ± 0.241
0.163 ± 0.156
0.367 ± 0.181
0.213 ± 0.204
0.078 ± 0.625
2.398 ± 0.241
0.163 ± 0.155
0.373 ± 0.186
0.213 ± 0.203
0.076 ± 0.623
2.391 ± 0.243
0.168 ± 0.161
0.4 ± 0.199
0.218 ± 0.21
0.076 ± 0.622
2.381 ± 0.256
0.201 ± 0.192
0.493 ± 0.243
0.25 ± 0.245
0.087 ± 0.627
2.374 ± 0.306
0.31 ± 0.285
0.746 ± 0.356
0.36 ± 0.343
0.122 ± 0.655
Table 6: new TDC++, step-size = 0.01, η = 2, β = 1
1/8
1/4
1/2
1
2
2.401 ± 0.24
0.163 ± 0.156
0.368 ± 0.182
0.213 ± 0.203
0.073 ± 0.609
2.397 ± 0.24
0.163 ± 0.156
0.376 ± 0.187
0.214 ± 0.205
0.073 ± 0.609
2.39 ± 0.243
0.17 ± 0.164
0.405 ± 0.202
0.222 ± 0.216
0.076 ± 0.61
2.38 ± 0.256
0.206 ± 0.198
0.502 ± 0.248
0.257 ± 0.256
0.089 ± 0.618
2.374 ± 0.307
0.317 ± 0.293
0.757 ± 0.363
0.37 ± 0.358
0.125 ± 0.651
κ
Env
Boyan
Dependent
Inverted
Tabular
Baird
κ
Env
Boyan
Dependent
Inverted
Tabular
Baird
7.9.1 COMPARISON BETWEEN TDC
In this section we compare single time version of TDC suggested by Maei (2011), which we denote
it as TDC-fast for convenience. We call Algorithm 2 as TDC-slow, and Algorithm 4 as TDC2. Under
step-size set as 0.01 and 0.1, we swept over η ∈ [0.01, 0.1, 0.5, 1, 2, 4] and report best performance.
The experiment shows that depending on hyper-parameters and step-size, the performance differs.
In general, TDC-slow and TDC2 shows better performance than TDC-fast.
Table 7: Best case comparison, step-size = 0.01
Algorithms
Env
Boyan
Dependent
Inverted
Tabular
Baird
TDC-fast
TDC-slow
TDC2
0.89 ± 0.637
0.059 ± 0.088
0.084 ± 0.115
0.095 ± 0.124
0.057 ± 0.585
0.874 ± 0.615
0.051 ± 0.083
0.074 ± 0.106
0.078 ± 0.159
0.074 ± 0.614
0.533 ± 0.587
0.043 ± 0.098
0.077 ± 0.123
0.069 ± 0.159
0.074 ± 0.614
Table 8: Best case comparison, step-size = 0.1
Algorithms
Env
Boyan
Dependent
Inverted
Tabular
Baird
TDC-fast
TDC-slow
TDC2
0.323 ± 0.439
0.031 ± 0.046
0.032 ± 0.056
0.052 ± 0.088
0.053 ± 0.607
0.286 ± 0.321
0.028 ± 0.053
0.032 ± 0.058
0.05 ± 0.092
0.05 ± 0.591
0.268 ± 0.33
0.031 ± 0.047
0.032 ± 0.058
0.052 ± 0.088
0.052 ± 0.609
The full results are given in Appendix Section 7.9.2.
7.9.2 RESULTS ON VERSIONS OF TDC
Here, we give the full results on the experiments on versions of TDC. We marked '-' in the table if
the algorithm diverges.
23
Table 9: TDC-fast, step-size = 0.01
0.01
0.1
0.5
1
2
0.89 ± 0.637
0.578 ± 0.318
0.575 ± 0.337
0.496 ± 0.211
-
1.049 ± 0.546
0.251 ± 0.177
0.274 ± 0.179
0.235 ± 0.172
-
1.353 ± 0.511
0.084 ± 0.101
0.12 ± 0.128
0.107 ± 0.139
0.133 ± 0.752
1.393 ± 0.557
0.065 ± 0.09
0.094 ± 0.12
0.096 ± 0.13
0.074 ± 0.614
1.414 ± 0.586
0.059 ± 0.088
0.084 ± 0.115
0.095 ± 0.124
0.057 ± 0.585
Table 10: TDC-fast, step-size = 0.1
0.01
0.1
0.5
1
2
0.533 ± 0.352
0.314 ± 0.274
0.321 ± 0.25
0.343 ± 0.239
-
0.338 ± 0.356
0.059 ± 0.103
0.075 ± 0.112
0.092 ± 0.126
-
0.327 ± 0.414
0.033 ± 0.052
0.036 ± 0.064
0.053 ± 0.09
0.064 ± 0.623
0.324 ± 0.43
0.031 ± 0.047
0.032 ± 0.058
0.052 ± 0.088
0.054 ± 0.608
0.323 ± 0.439
0.031 ± 0.046
0.032 ± 0.056
0.053 ± 0.087
0.053 ± 0.607
Table 11: TDC-slow, step-size = 0.01
0.01
0.1
0.5
1
2
2.804 ± 0.145
0.474 ± 0.213
0.612 ± 0.207
0.771 ± 0.343
1.844 ± 2.12
2.574 ± 0.17
0.222 ± 0.156
0.299 ± 0.193
0.272 ± 0.243
0.218 ± 1.011
1.898 ± 0.413
0.094 ± 0.108
0.132 ± 0.142
0.128 ± 0.153
0.084 ± 0.665
1.393 ± 0.557
0.065 ± 0.09
0.094 ± 0.12
0.096 ± 0.13
0.074 ± 0.614
0.874 ± 0.615
0.051 ± 0.083
0.074 ± 0.106
0.078 ± 0.116
0.084 ± 0.638
Table 12: TDC-slow, step-size = 0.1
0.01
0.1
0.5
1
2
2.588 ± 0.168
0.223 ± 0.154
0.295 ± 0.183
0.273 ± 0.236
0.215 ± 0.951
1.433 ± 0.613
0.058 ± 0.087
0.08 ± 0.109
0.097 ± 0.12
0.055 ± 0.584
0.452 ± 0.571
0.028 ± 0.053
0.032 ± 0.068
0.05 ± 0.092
0.05 ± 0.591
0.324 ± 0.43
0.031 ± 0.047
0.032 ± 0.058
0.052 ± 0.088
0.054 ± 0.608
0.286 ± 0.321
0.042 ± 0.047
0.041 ± 0.055
0.064 ± 0.085
-
η
Env
Boyan
Dependent
Inverted
Tabular
Baird
η
Env
Boyan
Dependent
Inverted
Tabular
Baird
β
Env
Boyan
Dependent
Inverted
Tabular
Baird
β
Env
Boyan
Dependent
Inverted
Tabular
Baird
Table 13: TDC2, step-size = 0.01
η
Env
Boyan
DependentRep
InvertedRep
TabularRep
BairdRep
0.01
0.1
0.5
1
2
0.73 ± 0.574
0.051 ± 0.106
0.109 ± 0.14
0.083 ± 0.166
-
0.533 ± 0.587
0.043 ± 0.098
0.093 ± 0.134
0.069 ± 0.159
-
0.883 ± 0.652
0.045 ± 0.086
0.077 ± 0.123
0.076 ± 0.134
0.125 ± 0.72
1.393 ± 0.557
0.065 ± 0.09
0.094 ± 0.12
0.096 ± 0.13
0.074 ± 0.614
1.894 ± 0.41
0.104 ± 0.11
0.137 ± 0.133
0.133 ± 0.149
0.076 ± 0.62
24
Table 14: TDC2, step-size = 0.1
η
Env
Boyan
DependentRep
InvertedRep
Tabular
Baird
0.01
0.1
0.5
1
2
0.324 ± 0.313
0.049 ± 0.052
0.053 ± 0.067
0.068 ± 0.095
-
0.275 ± 0.274
0.043 ± 0.049
0.046 ± 0.063
0.062 ± 0.091
-
0.268 ± 0.33
0.034 ± 0.046
0.035 ± 0.058
0.053 ± 0.087
4.492 ± 57.657
0.324 ± 0.43
0.031 ± 0.047
0.032 ± 0.058
0.052 ± 0.088
0.054 ± 0.608
0.456 ± 0.569
0.032 ± 0.055
0.036 ± 0.067
0.055 ± 0.093
0.052 ± 0.609
7.9.3 OVERALL COMPARISON BETWEEN THE ALGORITHMS
Table 15: Overall comparison, step-size = 0.01
Algorithms
Env
Boyan
Dependent
Inverted
Tabular
Baird
TD
GTD2
BTD (η = 0.5)
TDC-fast
TDC-slow
TDC2
ETD
0.536 ± 0.699
1.452 ± 0.647
1.408 ± 0.635
0.89 ± 0.637
0.874 ± 0.615
0.533 ± 0.587
0.469 ± 0.599
0.016 ± 0.029
0.086 ± 0.142
0.076 ± 0.122
0.059 ± 0.088
0.051 ± 0.083
0.043 ± 0.098
0.019 ± 0.023
0.03 ± 0.041
0.151 ± 0.193
0.136 ± 0.172
0.084 ± 0.115
0.074 ± 0.106
0.077 ± 0.123
0.032 ± 0.035
0.028 ± 0.036
0.133 ± 0.208
0.122 ± 0.188
0.095 ± 0.124
0.078 ± 0.159
0.069 ± 0.159
0.021 ± 0.028
-
0.085 ± 0.625
0.092 ± 0.637
0.057 ± 0.585
0.074 ± 0.614
0.074 ± 0.614
-
Even though TD and ETD ( Emphatic Temporal-Difference learning) (Mahmood et al. (2015))
shows good performance in several domains, it shows unstable behavior in Baird's counter example.
TDC-fast shows better performance than other algorithms in Baird's counter example, but in other
domains it shows worse performance than TDC-slow or TDC2 as can be seen in Table 7. Moreover,
when η = 0.5, BTD shows better performance than GTD2 except at Baird's counter example.
7.10 O.D.E. RESULTS
In this section, we see how each O.D.E. dyanmics of TD-learning algorithm dynamics behave in
Baird counter example.
25
(a) TD
(b) GTD2
(c) TDC-fast, η = 1
(d) BTD, η = 0.5
Figure 2: O.D.E. dynamics of first element of λt in Baird counter example
As can be seen in (a), the O.D.E. behavior of TD shows divergence, whereas other algorithms
including GTD2, TDC-fast, and BTD show stable behavior. GTD2 and BTD, compared to TDC,
show some oscillatory behavior, which may cause slow convergence compared to TDC in Baird
counter example.
7.11 BACKGROUND ON GTD2 AND TDC
Sutton et al. (2009) introduced GTD2 and TDC to find the global minimizer of MSPBE:
1
2
(cid:13)Φ(cid:62)DμΦθ − γΦ(cid:62)DμP πΦθ − Φ(cid:62)DR(cid:13)
(cid:13)
2
C−1 .
(cid:13)
Taking gradient fo the above equation with respect to θ, we get
(Φ(cid:62)DμΦ − γΦ(cid:62)DμP πΦ)(cid:62)C −1 (cid:0)Φ(cid:62)DμΦθ − γΦ(cid:62)DμP πΦθ − Φ(cid:62)DR(cid:1) .
The above gradient is equal to E[(γφ(cid:48)
k ξk)φk], and due to
the inverse operation and double sampling issue (dependency of φ(cid:48)
k in the first term and last term),
stochastic samples would lead to significant biases. Hence, GTD2 and TDC try to approximate the
stochastic gradient of MSPBE, i.e., the term (Φ(cid:62)DμΦ − γΦ(cid:62)DμP πΦ)(cid:62)C −1.
k ]−1E[(rk + γφ(cid:48)(cid:62)
k ]E[φkφ(cid:62)
k − φk)φ(cid:62)
k ξk − φ(cid:62)
26
|
|
http://arxiv.org/abs/2302.09871v1 | 2023-02-20T10:03:01 | 2023-02-20T10:03:01 | Attitudes and Latent Class Choice Models using Machine learning | Latent Class Choice Models (LCCM) are extensions of discrete choice models
(DCMs) that capture unobserved heterogeneity in the choice process by
segmenting the population based on the assumption of preference similarities.
We present a method of efficiently incorporating attitudinal indicators in the
specification of LCCM, by introducing Artificial Neural Networks (ANN) to
formulate latent variables constructs. This formulation overcomes structural
equations in its capability of exploring the relationship between the
attitudinal indicators and the decision choice, given the Machine Learning (ML)
flexibility and power in capturing unobserved and complex behavioural features,
such as attitudes and beliefs. All of this while still maintaining the
consistency of the theoretical assumptions presented in the Generalized Random
Utility model and the interpretability of the estimated parameters. We test our
proposed framework for estimating a Car-Sharing (CS) service subscription
choice with stated preference data from Copenhagen, Denmark. The results show
that our proposed approach provides a complete and realistic segmentation,
which helps design better policies. | [
"Lorena Torres Lahoz",
"Francisco Camara Pereira",
"Georges Sfeir",
"Ioanna Arkoudi",
"Mayara Moraes Monteiro",
"Carlos Lima Azevedo"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09871v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09871v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "econ.EM",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"econ.EM",
"cs.LG"
] | Attitudes and Latent Class Choice Models using
Machine Learning
Lorena Torres Lahoz1∗, Francisco Camara Pereira 1,
Georges Sfeir1, Ioanna Arkoudi1,
Mayara Moraes Monteiro1, Carlos Lima Azevedo1
1DTU Management, Technical University of Denmark
Building 116, Bygningstorvet, 2800 Kongens Lyngby
∗Corresponding author: [email protected]
February 21, 2023
Abstract
Latent Class Choice Models (LCCM) are extensions of discrete choice models (DCMs) that cap-
ture unobserved heterogeneity in the choice process by segmenting the population based on the
assumption of preference similarities. We present a method of efficiently incorporating attitudi-
nal indicators in the specification of LCCM, by introducing Artificial Neural Networks (ANN)
to formulate latent variables constructs. This formulation overcomes structural equations in
its capability of exploring the relationship between the attitudinal indicators and the decision
choice, given the Machine Learning (ML) flexibility and power in capturing unobserved and
complex behavioural features, such as attitudes and beliefs. All of this while still maintain-
ing the consistency of the theoretical assumptions presented in the Generalized Random Utility
model and the interpretability of the estimated parameters. We test our proposed framework
for estimating a Car-Sharing (CS) service subscription choice with stated preference data from
Copenhagen, Denmark. The results show that our proposed approach provides a complete and
realistic segmentation, which helps design better policies.
Keywords
Machine learning, Latent Class Choice Models, Car-Sharing, Psychometric Indicators, Deep
Learning.
3
2
0
2
b
e
F
0
2
]
M
E
.
n
o
c
e
[
1
v
1
7
8
9
0
.
2
0
3
2
:
v
i
X
r
a
1
1
Introduction
Latent Class Choice Models (LCCMs) are extensions of discrete choice models (DCMs) that
are typically implemented to capture unobserved heterogeneity in the choice process by seg-
menting the population based on the assumption of preference similarities. Traditionally, the
latent classes are often defined by the socio-economic characteristics of the decision-makers
[1, 2, 3]. However, incorporating individuals' attitudes and/or perceptions, typically measured
using psychometric indicators, into the specification of the latent classes can offer additional
behavioural insights, allowing for a more realistic market segmentation that can help design
more appropriate strategies and effective policies [4, 5, 6].
In this study, we explore a new method of efficiently incorporating attitudinal indicators in
the specification of LCCM by relying on Machine Learning (ML) techniques. All this while
preserving the benefits of the economic and behavioural interpretability of DCMs.
There are many examples in the literature of employing ML in DCMs, such as the ones
reviewed in section 2.3. However, there is a lack of effective use of ML techniques for incorpo-
rating attitudinal variables into the model formulation. Even though such variables have been
included in traditional DCMs, a complex interaction with the decision-making process should
be expected [7]. We hypothesise that ML could be a good starting point to explore it, given its
flexibility and power in capturing unobserved and complex interactions. Therefore, we propose
a model that includes latent classes and latent variables, the latter being defined as an Artificial
Neural Network (ANN).
Finally, the developed model follows the generalized random utility model [3] theoretical
structure, which provides us with a discrete representation of heterogeneity, and, therefore,
higher-level behavioural insights into the composition of the latent classes. This has been shown
to allow for more accurate market segmentation and policies that account for the different char-
acteristics, preferences, and attitudes of individuals in each market segment (see for example
[8], [9]).
2 Literature Review
2.1 Latent Class Choice Models (LCCM)
Based on McFadden's model [10], Walker and Ben-Akiva [3] presented a practical general-
ized random utility model with extensions for latent variables and classes. They extended basic
Random Utility Model (RUM) to relax assumptions and enrich the model's capabilities. Latent
classes refer to unobserved population groups, in which each individual has an associated prob-
ability of belonging to each group/class.
LCCM are a particular case of mixed logit models. Mixed logit models are defined as logit
models where the coefficients of the utility function vary across decision-makers according to a
given density f (β) [11]. Therefore, unobserved heterogeneity is captured by assuming a param-
eter distribution over the population, where each individual has a slightly different behaviour
toward the same attribute of the alternatives.
For the particular case of LCCM, the hypothesis is that there may be discrete segments of
decision-makers that are not immediately identifiable from the data. Hence, the population
can be probabilistically segmented into groups with different preferences and decision proto-
cols or that behave differently towards a decision, signified by class-specific utility equations
for each class. This segmentation could lead to more practical results, such as more efficient
design policies [3].
2
Although mixed logit models are highly flexible and can approximate any random utility model
[12], they are more challenging to interpret and use in practice as they do not identify the causes
for the variations of taste among decision-makers. On the other hand, evidence in the literature
suggests that latent class models are very convenient, flexible, and intuitive to account for taste
heterogeneity in discrete choice models [13].
A critical part of LCCMs is specifying the class membership model since it is not defined be-
forehand. Traditionally, straightforward logit formulations are employed since they allow for a
closed-form expression of the probability to belong to each class. Moreover, they typically base
their segmentation on only socio-demographic variables [1, 2, 3].
In the following sections, we will explore different class membership formulations that include
information about attitudinal variables. As we have mentioned, incorporating individuals' atti-
tudes and/or perceptions into the specification of the latent classes helps construct more realistic
population segments, allowing for more accurate and successful policies [13, 4].
2.2 Latent Psychosocial Constructs in DCM
Apart from the attributes of the alternatives and the characteristics of the decision-maker, ac-
cording to psychological theory, there exist more complex, unobserved constructs that may
have a relevant effect on how we make choices. Some of these latent factors can be the decision
maker's lifestyle, attitudes, or perceptions [14].
Psychometric indicators measure the effect of unobserved attributes on individuals' preferences
on topics related to the choice. They are additional information that can helps specify and esti-
mate latent classes. Atasoy et al. [15] estimated an LCCM where psychometric indicators are
included in the maximum likelihood estimation to improve the model's accurancy. The psy-
chometric indicators were modelled as conditional on the latent class k. Therefore, the item-
response probability of observing indicator In was given by Pn(In|k) that was defined as a pa-
rameter jointly estimated with the choice and the class membership model. The model evidence
that includes the psychometric indicators allows for richer analysis and generates significantly
different estimates for the class membership model.
Another approach for including attitudinal variables in DCM models can be found in work de-
veloped by Hurtubia et al. [13]. Psychometric indicators are introduced by assuming that the
probability of giving an agreement level to an attitudinal question also depends on the respon-
dent's class. In this case, they use an ordinal logit approach to model the response probability
Pn(Ik|k), since the responses to the indicators consist of a few ordered integer values corre-
sponding with the level of agreement with the statement on a Likert scale [16]. The advantage
of this formulation is the close form of the ordinal logit used to measure the indicators, which
allows for a more straightforward estimation procedure, where the choice and the response to
the indicators are estimated together.
Another study [17] has gone further by including latent variables and latent classes, to model
the relationship between normative beliefs, modality styles, and travel behaviour. Normative
beliefs refer to the individual's perception of the opinion of others concerning a specific be-
haviour, while modality style describes the part of an individual's lifestyle characterized by
using a particular set of travel modes. The study shows evidence of associations between travel
behaviour and different latent psychosocial constructs. Their model exemplifies how the socio-
psychological approach, which originated in social psychology, can extend conventional travel
behaviour analysis. However, due to the model's complexity, sequencial estimation procedure
is employed, encountering identification issues for some coefficients.
Finally, Alonso-González et al.[18] presented an exploratory factor analysis and latent class
3
cluster analysis of attitudinal variables performed to divide individuals into groups concerning
their inclination to adopt MaaS (Mobility as a Service). Even though the model is enriched with
a series of covariates referring to socioeconomic, mobility, and technology-related characteris-
tics, they do not improve the model; they only help cluster identification. Attitudinal variables
are the ones defining the structure of the latent classes.
The previous examples have highlighted the importance and relevance of including attitudes,
preferences, and beliefs in DCMs, especially in LCCM. They have proved to be relevant for
improving the model estimation and creating more realistic and meaningful classes.
2.3 Machine Learning for Taste Heterogeneity in DCM
In recent years, the use of ML techniques has increased, mainly due to their power to improve
prediction accuracy. However, one of the main criticisms of ML techniques vs. econometric
models is that it provides results that are less interpretable. Thus, in the transportation field,
researchers have also focused on providing interpretable and meaningful estimates from ML
applications, so that they can be more useful for travel analysis and policy decisions.
Some interesting works are, for example, Sifringer et al. [19], which, based on previous works
[20],[21],[22], included an additional term in the utility layer called the Learning Term, which
was estimated separately with a Dense Neural Network, using a priori disregard explanatory
variables. This model outperformed previous formulations while keeping the interpretability
of the other terms of the utility. Following this idea and based on Pereira [24] previous work,
Arkoudi et al [23] proposed an embedding encoding for the socio-characteristic variables that
provided a latent representation of these variables in concordance with individuals' choices.
Moreover, they included a Learning Term that increased the model's accuracy. However, this
embedding formulation does not consider information about attitudinal indicators since these
variables cannot be directly included in the utility specifications. Furthermore, none of these
works provided latent classes or variables formulations.
The work developed by Han et al [25], proposed a nonlinear LCCM by using a neural network to
specify the class membership model. In their application, a model with eight latent classes out-
performed the previous ones in prediction accuracy. Due to non-linearity, the proposed LCCM
was less transparent and lost interpretability. The work of Sfeir et al. presented two model
formulations for the construct of latent class choice models using Gaussian process [26] and
Mixture models [27], while Wong et al. [28] employed a generative non-parametric ML ap-
proach, a Boltzmann machine, to estimate latent variables. Although these works allowed for
more flexibility in the definition of these latent constructs, none of them relied on attitudinal
indicators' information.
To summarize, the theory of LCCM has been widely explored and successfully employed for
many decades, and more recently, ML techniques have provided practical solutions for situations
where the traditional discrete choice models were more constrained, improving their estimation
and flexibility. However, the employment of ML for incorporating attitudinal information in
DCM is still in the earliest steps of research, given its theoretical and practical underlying com-
plexity.
3 Methodology
In this section, we present our model formulation following the generalized random utility model
structure (Figure 1) presented by Walker et al., 2002 [3] and the added modifications for the
4
incorporation of latent variables through the employment of ANN in the latent class model.
In Figure 1, solid arrows represent structural equations (cause-effect relationships), and dashed
arrows represent measurement equations (relationship between observable indicators and the
underlying latent variable).
Figure 1: Generalized random utility model [3]
3.1 Latent Class Choice Models (LCCM)
LCCMs are composed of two sub-models: a class membership model and a class-specific choice
model. The former computes the probability of an individual n belonging to a certain class,
while the latter assigns the probability of choosing each alternative, given that individual n
belongs to a certain class k.
Typically, in the class membership model is define as logit, where the utility of an individual n
belonging to class k can be expressed as follows:
Unk = ASCk + Qnγk + υnk
(1)
where ASCK is the alternative-specific value for each class k, Qn is a vector containing the
characteristics of individual n, γk is a vector of the unknown parameters that need to be estimated
and υnk is an error term that is assumed to be independently and identically distributed Extreme
Value Type I over individuals and classes. Thus, the probability that individual n belongs to
class k given their characteristics is the logit formula:
P (qnk|Qn, γk) =
eQnγk
k′=1 eQnγk′
∑K
(2)
where qnk = 1 if the individual belongs to class k and 0 otherwise.
As for the class-specific choice model, it returns the probability that an individual n chooses a
specific alternative, given that he/she belongs to a certain class k.
The utility of individual n choosing alternative i, given that he/she belongs to class k is formu-
lated as:
Uni|k = Vni|k + εni|k = Xniβk + εni|k
(3)
5
where Vnit|k is the observed part of the utility, and εnit|k is an independent and normally dis-
tributed Extreme Value Type I error term distributed over individuals, alternatives and classes.
Xni is the vector of observed attributes of alternative i and normally includes an alternative-
specific constant, and βk is the vector of unknown parameters that need to be estimated.
Therefore, the probability that individual n chooses alternative i, conditioned on class k, is for-
mulated as:
P (yni|Xni, qnk, βk) =
|k
(4)
eVni|k
j′=1 eVnj′
∑J
where yni is 1 if individual n chooses alternative i and 0 otherwise, and J is the total number of
alternatives.
Conditional on the class, the probability of observing yn is formulated as:
P (yn|Xn, qnk, βk) =
J
∏
(P (ynj|Xnj, qnk, βk))ynj
j=1
(5)
where yn is a J vector of all choices ynj of an individual n and Xn is a J vector of Xnj.
The unconditional probability of observing yn can be calculated by mixing the previous condi-
tional choice probability with the probability of belonging to each class k, as follows:
P (yn) =
K
∑
k=1
P (qnk|Qn, γk)P (yn|Xn, qnk, βk)
Finally, the likelihood over all individuals N, considering independence between them, is:
P (y) =
N
∏
K
∑
n=1
k=1
P (qnk|Qn, γk)P (yn|Xn, qnk, βk)
(6)
(7)
In section 5.1, we employ this LCCM formulation as a baseline for our new model.
3.2 Latent Variables and Latent Classes with ANN for Incorporation of
Attitudinal Indicators
The straightforward solution for incorporating the attitudinal indicators in DCMs would include
their responses directly into the utility of the latent classes. However, there are three main rea-
sons to avoid this approach. Firstly, this type of data is not always available for forecasting
since these types of surveys are usually expensive and time-consuming. Therefore, the model
can predict the class membership model probability even when no information about attitudinal
indicators is provided. The second reason is that the multicollinearity inherent in the responses
makes it difficult to estimate the unknown parameters correctly and can lead to inconsistent
estimates. In this sense, even a low-dimensional representation of the indicators, e.g., factor
analysis, cannot be included directly in the utility unless the correlated error terms are added.
Lastly, and more importantly, there is no apparent justification that such attitudinal information
can uncover some causal relationship directly with behaviour. Instead, the literature points out
that these indicators seem to be the consequences of some latent constructs, which combined
can represent individuals' attitudes [29].
We follow the generalized random utility model structure presented by [3] to address the pre-
viously mentioned issues. Moreover, we include the information on the attitudinal indicators
6
by employing an ANN to formulate the latent variables constructs, which provides more flexi-
bility in how the latent variables are formulated. The graphical representation of the proposed
formulation is shown in Figure 2.
Finally, we decided not to include the arrow between the latent variables and the utilities, and
the revealed preference indicators, since we did not find it relevant to our concrete application.
However, these relations can be included for other cases by following the same principle as in
Figure 1 [3].
Figure 2: Graphical representation of the model formulation
3.2.1 Latent classes with latent variables formulation
The utility of the class membership model can be written as:
Unk = Vnk + υnk
(8)
where Vnk is the representative utility of individual n belonging to class k and, as defined in
the traditional LCCM, υnk is the error term that is assumed to be independent and identically
distributed Extreme Value Type I over individuals and classes ans defined in 1.
In this case, we define Vnk as:
Vnk = ASCk + Qnγk + rnδk + ωnbk
(9)
where ASCk is the alternative-specific value for class k, Qn is the vector containing socio-
characteristics of individual n, and γk, the vector of unknown parameters that need to be esti-
mated for each class k. In addition, rn is the vector of latent variables for individual n and δk the
corresponding vector of unknown parameters specific to class k, that also need to be estimated.
Finally, ωn is an individual-specific constant with its corresponding coefficient bk for each class
k.
The term ωn represents the individual variation of all the latent variables caused by the variance
of their underlying distributions. It is formulated as a one-layer ANN that gets activated by the
ID of each decision maker in the train set (Idn is 1 for decision-maker n and 0 otherwise)
w(1)
1n Idn
ωn =
N
∑
1
7
(10)
where w(1)
1n are the weights of the layer. Since only the difference between classes matters, we
introduce the corresponding bk term for each class, which accounts for the effect of the latent
variables variation for each of the latent classes.
Given the distribution of the error term (υnk), the probability P (qnk|Qn, γk, rn, bk) can be ex-
pressed as:
P (qnk|Qn, γk, rn, bk) =
eVnk
k′=1 eVnk′
∑K
(11)
As it is standard practice in class membership models, the utility of one class is set to zero due
to the parameters' identification since only the differences in utility matter.
3.2.2 Latent variables formulation as ANN
The novelty of this work is the employment of ANN for the construction of latent variables. We
propose a non-linear relationship between the socio-characteristics of the individuals and the
latent constructs by employing two densely connected layers. It can be expressed as follows:
H
∑
rzn = a2(
M
∑
w(2)
zh a1(
w(1)
hmQmn))
(12)
h=0
m=0
where M is the number of socio-demographic variables used to predict the answer to the indi-
cators, and H is the number of hidden units in the hidden layer. w(1)
hm are the weights of the first
layer, and a1 represents the first activation function defined as a Rectified Linear Unit (ReLU)
(a1(x) = max(0, x)); for the second layer, a linear activation function is applied a2(x) = x,
and the weights are represented by w(2)
zh . By adding an extra input Q0n, which is set to one and
extending the sum to go from zero, we avoid writing the intercept term.
The number of latent variables, defined as Z, the number of hidden neurons in the hidden layer,
H, and the number of densely connected layers are dimensions that the researcher can tune since
they are not observed in the data. Employing different values for these hyperparameters for a
different model application does not invalidate the proposed formulation and can help achieve
higher model prediction for the test data.
The formulation presented is based on the hypothesis that the socio-characteristics of the indi-
viduals define the latent variables. Moreover, these latent constructs influence the response to
specific attitudinal indicators.
3.2.3 The ordinal measurement model
We focus on the case where indicators take the form of questions that receive an ordered re-
sponse, as in Likert scales [16]. Each option of the scale represents a level of agreement with a
particular statement. Thus, we define the utility of individual n for indicator p, as a measurement
of the level of agreement with its statement, and we formulated it as:
Upn = Vpn + νpn = rnαp + cpωn + νpn
(13)
where Vpn is the representative utility of individual n to indicator p and νpn is the error term that
is assumed to be independently and identically distributed Extreme Value Type I over individu-
als and indicators. rn is a vector of length Z containing the latent variables of individual n, αp is
also a vector of size Z with its corresponding parameters to be estimated. ωn is the individual-
specific parameter estimated together with the latent class model, and cp is its corresponding
8
coefficient for each indicator p .
Therefore, the probability that individual n answers with a certain level of agreement l to indi-
cator p is expressed as:
P (Ipln = 1|rn, αp, cp, ωn) = P (τ p
l−1 < Upn < τ p
l )
(14)
where we define Ipln as 1 if individual n answers with a level of agreement l to indicator p and
0 otherwise. τ p
l are strictly increasing class-specific thresholds that define an ordinal relation
between the utility Upn and the level of agreement to indicator p.
Finally, the probability of individual n providing an answer l to indicator p can be computed as
an ordinal softmax:
P (Ipln = 1|rn, αp, cp, ωn) = P (τ p
= P rob(νvp < τ p
l − Vpn) − P (νvp < τ p
l−1 < Upn < τ p
l ) =P (τ p
l−1 − Vpn) = =
l−1 < Vpn + νvp < τ p
eτp
l −Vpn
1 + eτp
eτp
1 + eτp
l −Vpn
−
l ) =
l−1−Vpn
l−1−Vpn
(15)
where one threshold per indicator is set to zero, as only the difference between them matters.
The final model formulation is presented in Figure 3. Maximizing the log-likelihood with re-
spect to the unknown parameters will not lead to a closed-form solution. Thus, the estimation
becomes more complex and challenging as empirical singularity issues could appear at some
iterations [30]. To overcome these problems, we employ the Expectation-Maximization (EM)
algorithm (Dempster et al., 1977 [31]), a powerful method used for maximizing the likelihood
in models with latent variables.
9
Figure 3: Model architecture1
3.2.4 EM algorithm
We estimate all components of the proposed model together since simultaneous estimation usu-
ally leads to more efficient estimates than sequential estimation [32], [14].
For this purpose, we employ the EM algorithm, which combines an expectation step with a
maximization one until convergence is reached. We start by randomly initializing the unknown
parameters. After that, we estimate the expected values of the latent variables (E-step) using
Bayes' theorem. Then, we update the unknown parameters' values using log-likelihood maximi-
sation (M-step). Finally, we evaluate the log-likelihood with the updated values of the unknown
1The expressions without simplifying for P (k = 1) and P (k = K) can be found in equation (11), for P (Ipnl = 1)
and P (Ipnl = L) in equation (15) and for P (ynj = 1|k = K) and similars in equation (5).
10
parameters and check for convergence. We return to the E-step until convergence is reached. In
this case, the convergence is defined by the number of iterations.
We can rewrite the joint likelihood assuming that the clusters are observed as follows:
]qnk
P (y, q, Q, X) =
[
N
∏
K
∏
n=1
k=1
N
∏
K
∏
X
eVnk
k′=1 eVnk′
[
∑K
J
∏
n=1
k=1
j=1
eVnj|k
j′=1 eVnj′
∑J
]ynj qnk
|k
The function is divided into two parts when we take the logarithm of the likelihood:
]
]
[
[
LL =
qnklog
N
∑
K
∑
n=1
k=1
eVnk
k′=1 eVnk′
∑K
N
∑
K
∑
J
∑
+
n=1
k=1
j=1
ynjqnklog
eVnt|k
j′=1 eVn′t|k
∑J
(16)
(17)
this equation can be solved by equating its derivatives to zero with respect to each of the un-
known parameters of the choice model if qnk is assumed to be known.
In order to find the initial values of qnk, we estimate the expectation of qnk (E-step) using Bayes's
theorem:
E[qnk] = γqnk =
[
∏J
j=1
eVnj|k
Vnj′
e
∑J
]ynj
|k
j′=1
[
eVk
∑K
k′=1
[
eVk′
eVk
∑K
k′=1
∑K
k′=1
eVk′
∏J
j=1
eVnj|k
Vnj′
e
∑J
j′=1
]ynj ]
|k
(18)
where γqnk is considered as the posterior probability of the classes.
Combining equations (17) and (18), we can formulate the expected value of the log-likelihood
as:
E(LL) =
N
∑
K
∑
J
∑
n=1
k=1
j=1
ynjγqnklog
[
eVnj|k
j′=1 eVnj′
∑J
|k
]
+ +
N
∑
K
∑
n=1
k=1
γqnklog
]
[
eVk
k′=1 eVk′
∑K
(19)
By setting the derivatives of the expected log-likelihood to zero with respect to the unknown
parameters βk of the choice model, we can estimate them with the following equation:
βk = argmaxβk
N
∑
J
∑
n=1
j=1
ynjγqnk
log
]
[
eVnj|k
j′=1 eVnj′
∑J
|k
(20)
where no closed-form solution can be obtained. Thus, we employ the gradient-based numerical
optimization method BFGS [33].
For the unknown parameters of the class membership, back-propagation with cross-entropy loss
is applied since the parameters are encoded inside a neural network. As presented in [19], min-
imizing the cross entropy loss is equivalent to maximizing the log-likelihood function, which
allows us to compute the Hessian matrix and, therefore, provides useful post-estimation indica-
tors such as the standard deviation or the confidence intervals of the parameters of the model.
After convergence is reached, we can calculate the probability of observing a vector of choices
y for all individuals as follows:
P (y) =
N
∏
K
∑
n=1
k=1
P (qnk|Qn, γk, rn, bk)
J
∏
j=1
(P (ynj|Xnj, qnk, βk)
)ynj
(21)
11
To benchmark our proposed model we use the formulation presented in [3] as baseline. One can
represent it in graphical representation, similarly as in 3, with the difference that the relation
between the indicators' utility and the decision-makers' socio-demographic characteristics is
linear.
4 Data
The data used in this study comes from a survey carried out for the Share-More project 2, which
aimed to analyse individual preferences towards car-sharing (CS) services under different per-
sonalized incentive schemes.
The data was collected through a tailor-made online survey (available in both web and mobile
versions), from July 16th to August 6th 2020, in Copenhagen (CPH). Respondents were recruited
through panels, and the eligibility criteria were being more than 18 years old and having a valid
driver's license. The survey yielded a total of 542 complete answers and was available in English
and Danish. The average duration was around 15 minutes. It included five relevant parts:
1. A brief introduction to the project and its objective.
2. A survey on the subject's socio-demographic characteristics (Qn), including experience
with CS.
3. A survey addressing questions regarding the respondents' attitudes toward private and CS.
The respondents' perceptions in regard to car ownership and CS usage were measured
by their level of agreement with relevant statements using a 5-point Likert scale. The
statements employed are presented in Table 1.
4. A survey with questions related to preferences about CS incentives.
5. A Stated Preference (SP) experiment with different options for CS plans, taking into ac-
count possible incentive schemes for CPH.
2https://eitum-sharemore.net.technion.ac.il/
12
Indicator Description
I1
I2
I3
I4
I5
I6
I7
I8
I9
I10
I11
I12
I13
I14
I15
I16
I17
I feel stressed when driving
It is difficult to find parking
Owning and using a car is a big expense
It's easy for me to conduct my daily trips without a private car
Driving a car is the most convenient way to move around
For me the car is a status symbol
I am worried about the environmental footprints of my car
Car sharing is more affordable than owning my own car
Car sharing is a more environmentally friendly alternative to car ownership
By using car-sharing, I do not have to deal with vehicle maintenance and repair
Thanks to car sharing, I can save from the fuel, taxes, insurance and parking
expenses associated with private vehicle ownership
Having access to different types of vehicles is an important advantage
Using car-sharing service can lower my transport expenses
Using car-sharing whenever I need it can make my life easier
I would not need to buy a car because I have car-sharing
Car-sharing is more convenient than public transport
I wouldn't mind sharing my personal car with other people
Table 1: Attitudinal indicators employed in the survey
The sample socio-characteristics (Qn) are described in Table 2. More than 90% of respon-
dents stated to be aware of CS services, which indicates that they are well-known. The sample is
quite balanced regarding gender and proportionally representative of the population in terms of
age. Most of the respondents live in the city centre and are employed. For the level of education,
more than 60% of the population have at least a bachelor's degree. Moreover, most respondents
live in households of 1 or 2 members, up to one car and have two or more bikes at home. Given
the income level, most respondents earn around average (350.000 kr./year) or above, which is
likely related to the high level of education of the sample.
13
Car -sharing membership status
Car-sharing awareness
Gender
Age
Place of residence
Employment status
Level of education
Size of the household
Number of cars in the household
Number of bicycles in the household
Income
Car-sharing member
Past-car sharing member
Non-car-sharing member
Yes
No
Man
Woman
Prefer not to say
18-30
31-40
41-50
51-60
More than 60
City center
Suburbs
Another city in the metropolitan region
Outside the metropolitan region
Student
Employed
Unemployed
On leave
Retired
Other
Less than high school
High school diploma or equivalent
Bachelor's degree
Master's degree
Doctoral degree
Other
Did not answer
1
2
3
4
>4
0
1
2
>2
0
1
2
>2
Low (Up to 250.000 kr.)
Medium (251-500.000 kr.)
High (Over 500.000 kr.)
Did not answer
Total
96
64
383
490
53
267
275
1
146
88
97
88
124
235
190
71
47
74
354
12
7
100
8
39
150
169
134
8
17
26
152
223
80
68
20
139
304
91
9
40
128
156
219
82
140
221
100
%
17.68
11.79
70.53
90.24
9.76
49.17
50.64
0.18
26.89
16.21
17.86
16.21
22.84
43.28
34.99
13.08
8.66
13.63
65.19
2.21
1.29
18.42
1.47
7.18
27.62
31.12
24.68
1.47
3.13
4.79
27.99
41.07
14.73
12.52
3.68
25.60
55.99
16.76
1.66
7.37
23.57
28.73
40.33
15.1
25.8
40.7
18.4
Table 2: Copenhagen Sample characteristics
14
For further details on the survey and the CPH data collection and sampling processes, the
reader is referred to [34, 35].
Our analysis focuses on the data from parts 2, 4 and 5 of the questionnaire, using the latter for
modelling the choice of CS subscription plans. In this SP, each respondent answered 3 exper-
iment tasks which presented 4 CS alternative plans with 8 associated attributes Xn, (one-time
subscription cost, usage cost, walking time to access the vehicle, probability to get a shared
vehicle, CS vehicle type, CS vehicle engine type, walking time from parking location to des-
tination and extra features) and the option to select 'None of the alternatives.' Figure 4 shows
an example of a choice task presented to the respondents. To minimize response bias, the order
of appearance of the attributes was random for each individual but was the same for the three
tasks presented to the same individual.
Figure 4: Example of choice task presented to respondents
As the name suggests, in one-way CS (station-based), or OWSB, the cars can be found in
fixed locations (stations) around the city. The user can take a vehicle from one of the fixed loca-
tions available and return it to the same place or another fixed location available in the service.
In one-way CS (free-floating), or OWFF, the users can pick up or return the car in any available
parking spot in the city within a delimited coverage area of the service (thus, no fixed stations),
giving extra freedom to users. In roundtrip CS (RT), one can pick up a car at fixed stations scat-
tered around the city, and need to drop it off at the same location. Finally, peer-to-peer (P2P) CS
services are those which make it possible for vehicle owners to rent out their cars to other users
for a defined time period, also relying on fixed (and identical) pick-up and drop-off locations for
a given ride.
The attributes of the alternatives included in the tasks and their corresponding levels were se-
lected by considering the published literature and qualitative surveys previously conducted dur-
ing the Share-More project [34, 35]. The cost of usage was presented in cost per minute, hour
or day to test the influence of these units on respondents' choices.
15
5 Results
5.1 Baseline Model Results
To benchmark the proposed model, we tried to use the formulation presented in the general-
ized random utility model [3] as a baseline. One can represent it in graphical representation,
similarly as in Figure 3, with the difference that the relation between the indicators' utility and
the decision-makers socio-demographic characteristics is linear instead of a densely connected
layer. However, the class membership formulation's simplicity made the model unable to con-
verge for our data, making the Hessian matrix for the variance computation not invertible.
To have a benchmark model with comparable magnitude for the likelihood, we have estimated
the model with a traditional LCCM as a baseline without including the attitudinal variables. We
have employed 20% of the data for testing, dividing the data into train and test with 433 and 109
individuals, respectively. The results are presented in Table 2:
Model No Classes No parameters Null LL
-2047.21
LCCM
-2047.21
LCCM
30
43
2
3
LL
-1599.41
-1568.14
AIC
BIC R-squared Test null LL Test LL
-400.52
-398.73
-515.02
-515.02
0.22
0.23
3258.81 3413
3234.29 3487
Table 3: LCCM results without attitudinal variables
For the models above, we have used the same socio-characteristics for constructing the class
membership as in our proposed formulation. More specifically, we employed age, binary vari-
ables that indicate if the decision-makers have a bike or car at home, their CS membership status,
kids at home, or if they are students or retired.
However, we found that having a car at home, being retired or being a student is not statistically
significant under this formulation. When applying the proposed formulation, we can effectively
include this information in the model, which improve our characterization of the latent space.
Given the probability of each individual in the sample and its corresponding socio-characteristics,
we have represented the classes in Figure 5, by using the Bayes Theorem to compute:
Pn(socio − characteristic|K = k)
(22)
where k is the corresponding class number.
Figure 5: Representation of the class membership of the LCCM model
Figure 5 is compared in the next subsection with the proposed model results.
16
5.2 Proposed Model Results
We have explored our proposed formulation for different numbers of latent classes and latent
variables. We have employed the same train/test split as for the baseline model. It is important
to note that our EM process has been replicated five times with random initializations. We have
computed the likelihood variance between the different obtained model estimates to check for
stability. The results are summarized in the following table:
No Classes
2
3
3
No latent
variables
2
2
3
EM
iterations
15
30
25
Null LL
LL
-2047.21 -1575.32
-2047.21 -1539.56
-2047.21 -1531.41
Variance
LL
14.62
22.01
26.36
R-squared
0.23
0.25
0.25
Test null
LL
-515.02
-515.02
-515.02
Test LL
-404.72
402.72
-400.73
Variance
Test LL
0.28
9.8
9.36
Table 4: Model results
The model with three latent classes and two latent variables has given the best overall esti-
mation. Even though the model with three classes and three latent classes has a slightly better
fit, when another latent variable is included, its corresponding estimates parameters were not
statistically significant, which made us reject this model formulation.
Comparing the results from Tables 3 and 4, we observe an increase in the training likelihood
for our formulation. On the other hand, we do not provide better results for the test data, but
just comparable ones. This could be due to the small size of the test sample or to the fact that
we don't have access to attitudinal information or wn values in the test stage, which can affect
the prediction accuracy.
We now analyse the parameters of the best model, where all the data has been used for the esti-
mation.
Variable
ASCCS f ree−f loating
ASCCS station−based
ASCCS peer to peer
ASCroundtrip
βOne time subscription cost
βU sage cost(OW F F ,OW ST ,RT )
βU sage cost(P 2P )
βU sage cost per day
βU sage cost per hour
βOnly combustion cars
βP robability of f inding a shared car
βW alking time f rom parking to destination
Class specific choice model
Class 2
-2.71(1.34)
-2.64(1.34)
0.47(1.45)
-3.50(0.40)
-1.12(0.51)
-0.16(0.09)
-5.57(1.31)
-2.40(0.74)
-0.99(0.50)
0.09(0.33)
1.38(1.35)
0.02(0.04)
Class 3
-1.68(0.89)
0.07(0.80)
1.50(0.83)
0.15(0.80)
-0.35(0.22)
-0.34(0.08)
-3.86(0.80)
-1.09(0.39)
-0.43(0.34)
-0.66(0.20)
2.70(0.75)
0.03(0.02)
Class 1
3.50(0.46)
3.04(0.48)
4.12(0.52)
2.97(0.48)
-1.00(0.17)
0.05(0.04)
-1.30(0.39)
-0.35(0.24)
-0.10(0.21)
-0.23(0.12)
0.13(0.44)
-0.05(0.01)
Table 5: Estimate and standard deviation of the parameters of the class-specific choice model
17
Variable
ASCclass1
ASCclass2
γkidsathome,class1
γkidsathome,class2
δr1,class1
δr1,class2
δr2,class1
δr2,class2
bclass1
bclass2
Parameter St error P-value
0.031
0.0057
0.050
0.22
0.17
0.0009
0.27
0.00
0.17
0.00
0.97
-1.40
0.56
-0.45
0.18
-0.48
0.12
-0.44
0.61
-4.014
0.45
0.51
0.29
0.37
0.13
0.14
0.10
0.11
0.44
0.54
Table 6: Parameters of the class membership model
Table 5 shows the estimated parameters of the class-specific choice model with its corre-
sponding standard deviation. The utility for not choosing any of the CS services offered is set
to zero for parameter identification.
Based on the values and signs of the estimated beta parameters, we observe that class 1 and
class 2 are more negatively affected by the subscription cost, while class 3 is less influenced
by this cost, but more negatively affected by the cost usage. In general, P2P presents a higher
alternative-specific value than the other alternatives for all the classes. However, this is compen-
sated by the βU sage cost(P 2P ) values being also more damaging in the three classes. Class 2 is the
one less inclined about the P2P CS type since it has the lowest ASC-P2P and the more negative
βU sage cost(P 2P ) estimator. On the other hand, individuals with a high probability of belonging to
class 3 are the most concerned if the type of engine is just combustion. Thus, CS could possibly
be seen as an electric alternative to those who are more worried about the environmental foot-
print of their trips. Given the beta values for displaying the cost in hours (βU sage cost per hour) or
days (βU sage cost per day), Table 5 also shows a bias towards displaying the price per minute (base-
line) instead of per day or hour across all the classes, related to the fact that CS users tend to
drive it for short time periods. Regarding the probability of finding a car, it is a more important
feature for classes 2 and 3, which make them more dependent on the availability of the service.
Overall, class 2 seems to be less prone to use any CS, given all its estimated parameters.
The parameters of the class membership model are summarised in Table 6. Given the prob-
ability of each individual in the sample and its corresponding socio-characteristics, we have
represented the classes in Figure 6. Individuals with a higher probability of belonging to class
1 have around 20% probability of being a CS member, a bit above the sample average (17.5%).
They also tend to have more kids at home, as well as bikes than the other classes. Studies like
[37] have shown that when there are significant life changes, such as the birth of a child, people
become more inclined to use CS. On the other hand, class 2 presents the lowest probability of
being a CS member and having kids or bikes at home. Retired people tend to have more predis-
position for this class, while students have less. This is aligned with evidence in the literature
[38] suggesting that young people are more prone to use this service. Finally, class 3 has the
same probability of being a CS member as class 1, but it is also the class with less probability of
having a car at home which could make them more dependent on the availability of the service.
18
Figure 6: Representation of the class membership of our proposed model
Comparison between Figure 5 and Figure 6, shows that the configuration of the classes
with respect to the socio-characteristics changes when we include attitudinal information, as is
expected. However, bearing in mind that the betas values of the two models are slightly different
and classes cannot be directly compared.
Continuing with the proposed formulation results, in order to understand the implications of the
coefficient of the latent variables in the utility of the class membership model, we have plotted
the latent constructs for each individual in the sample and characterised them with their socio-
characteristics. Figure 7 provides us with a visual understanding of how these latent variables
are constructed and distributed.
Figure 7: Latent variables representation characterised by socio-characteristics
By analysing the parameters for the latent variables in Table 6 and looking at their distribu-
tions in Figure 7, we notice that the values of the first latent variable (r1) are always negative.
19
The more negative value of r1, the more probable is to belong to class 2, and therefore, the less
inclined people are to use CS services. A negative value of r2 seems to have the same effect.
Thus, individuals with a more negative combination of r1 and r2 tend to be less inclined about
CS and the other way around. Figure 7, suggests that students are more prone to use the service
while retired people are the least predisposed. Moreover, having or not having a car seems to
determine the clusters in which the rs values are structured, as we can see in the upper right plot
of Figure 7.
The coefficients of the ωn parameter are a representation of the heterogeneity present in the
classes. Therefore, class three seems to be more heterogeneous. Finally, the parameters of
the utility for each of the indicators are presented in Table 7. The mean accuracy for all the
indicators given the ordinal logit probability is 0.44.
Indicator
I1
I2
I3
I4
I5
I6
I7
I8
I9
I10
I11
I12
I13
I14
I15
I16
I17
α1
0.24
0.43
-0.14
-0.22
-0.40
0.19
-0.026
-0.40
0.09
-0.070
-0.40
-0.33
-0.040
0.019
-0.095
-0.17
0.17
α2
0.42
0.34
0.28
0.27
0.24
-0.38
0.23
0.14
0.045
0.19
-0.083
-0.016
0.044
-0.10
0.45
0.43
0.34
c
0.65
-0.14
0.65
0.87
0.56
-0.62
1.59
2.59
1.72
2.56
2.28
2.97
1.80
2.40
2.42
2.35
1.60
Table 7: Parameters of the measurement model
Finally, it is interesting to see how the answers for some indicators are distributed in the latent
space. Figures 7 and 8, show that people with a car at home agree more with the statement that
the car is a status symbol. For indicator 15, people with a more positive value of r2 seem to
agree more with the statement that they wouldn't need a car if they have CS, as we would expect
given the r2 coefficients of Table 6 and the positive α2 coefficient for the utility of indicator 15
in Table 7.
20
Figure 8: Latent variables representation characterized by the answers to indicators 6 and 15
6 Conclusions
We focused on the relevance and impact of adding attitudinal information to the models, evi-
dencing its importance in configuring the latent classes for heterogeneity representation. We
propose a new way to account for complex (and non-linear) constructs of latent classes by ex-
tending the general random utility model with ML frameworks for latent space representation.
We have tested our proposed framework for estimating a car-sharing (CS) service subscription
choice with SP data from Copenhagen, Denmark. Our results confirm that the inclusion of at-
titudinal variables provides a DCM more behaviorally realistic. For example, individuals who
are more inclined towards the concept of CS tend to be grouped together in classes with higher
parameter estimates of the utility of choosing different CS plans. Also, as expected, such classes
are sensitive to different attributes of the CS plans, but, more importantly, the complex struc-
ture of such classes can be modelled by considering non-linear formulations learned by an ANN
framework. This confirms that complex beliefs and attitudes play a key role in CS subscription
decision-making, and including this information allows for more accurate estimation and a bet-
ter understanding of the classes.
From the application perspective, it provides us with extra insights to help us design better poli-
cies by having a more realistic population segmentation. In our CS application, when creating
new approaches to attract and retain CS members, attitudinal information allows us to focus on
changing beliefs and mindsets that we know are closely related to individual choices. Finally,
it also helps to understand better how the decision-making process works from a theoretical
point of view. We have also improved our understanding of how the features of the CS business
can maintain and attract new members. We have noted the importance of the subscription and
usage cost throughout all the models. In addition, the price format is relevant to the decision,
and the price per minute display is the most attractive, possibly driven by the past experience
in the case-study at stake. We have also observed that the availability of cars is essential in
attracting new members, which can be seen as an improvement opportunity for CS companies.
Choosing an electric car is more favourable for those more inclined to use CS, so having a fleet
with electric vehicles can be essential to maintain CS members.
Our study also has a few limitations. Regarding our proposed model at the estimation level,
the values of the latent variables change between iterations, even though the underlying struc-
ture and model probabilities are kept between runs. This is the main difference between an ML
learning approach and a traditional DCM estimation, where all the parameters need to be identi-
fiable. On the other hand, convergence is defined empirically by setting the number of iterations
due to small fluctuations in the convergence of the EM algorithm. Also, given the small sample
21
size, we could not divide the dataset in training, validation, and testing; therefore, the hyper-
parameters referring to the number of nodes and layers in the NN were not tuned according to
the validation samples. Regarding our overall model architecture, and in order to improve the
prediction performance, further work can be done, trying to apply other types of explainable AI
(XAI) and other latent space representations (word embeddings) [23].
Although this work has its limitations, we are optimistic that this analysis has opened the door to
future research on integrating attitudinal variables in DCMs through ML techniques. This inves-
tigation could improve the overall model fit and prediction accuracy, thanks to the representation
of heterogeneity due to ML techniques' ability to capture complex unobserved patterns. How-
ever, we always have to bear in mind that the transparency and interpretability of new modelling
frameworks are of utmost importance.
6.1 Acknowledgements
We thank Share-More project for providing the data used in this study and eMOTIONAL Cities-
Grant agreement ID: 945307, funding from EU's Horizon 2020. 3
3https://emotionalcities-h2020.eu/
22
References
[1] Hess, S., Ben-Akiva, M., Gopinath, D., Walker, J. (2009). Taste heterogeneity, correla-
tion, and elasticities in latent class choice models, in Transportation Research Board 88th
Annual Meeting.
[2] Hess, S. (2014). Latent class structures: Taste heterogeneity and beyond, Handbook of
Choice Modelling, pp. 311–329. doi: 10.4337/9781781003152.00021.
[3] Walker, J., & Ben-Akiva, M. (2002). Generalized random utility model. Mathematical
social sciences, 43(3), 303-343.
[4] Motoaki, Y., & Daziano, R. A. (2015). A hybrid-choice latent-class model for the analysis
of the effects of weather on cycling demand. Transportation Research Part A: Policy and
Practice, 75, 217-230
[5] Haustein, S., Hunecke, M., 2013. Identifying target groups for environmentally sustainable
transport: assessment of different segmentation approaches. Curr. Opin. Environ. Sustain.
https://doi.org/10.1016/j.cosust.2013.04.009.
[6] Haustein, S., 2012. Mobility behavior of the elderly: An attitude-based segmenta-
tion approach for a heterogeneous target group. Transportation (Amst) 39, 1079–1103.
https://doi.org/10.1007/s11116-011-9380-7
[7] Bahamonde-Birke, F.J., Kunert, U., Link, H. et al. About attitudes and perceptions: finding
the proper way to consider latent variables in discrete choice models. Transportation 44,
475–493 (2017). https://doi.org/10.1007/s11116-015-9663-5
[8] Weibo Li, Maria Kamargianni (2020) An Integrated Choice and Latent Variable Model
to Explore the Influence of Attitudinal and Perceptual Factors on Shared Mobility
Choices and Their Value of Time Estimation. Transportation Science 54(1):62-83.
https://doi.org/10.1287/trsc.2019.0933
[9] Paulssen, M., Temme, D., Vij, A. et al. Values, attitudes and travel behavior: a hierarchi-
cal latent variable mixed logit model of travel mode choice. Transportation 41, 873–888
(2014). https://doi.org/10.1007/s11116-013-9504-3
[10] McFadden, D., Economic Choices. The American Economic Review, Vol. 91, No. 3 (Jun.,
2001), pp. 351-378
[11] Train K.,(2009) Discrete Choice Methods with Simulation, Cambridge University Press.
153- 168.
[12] McFadden, D., Train, K. (2000). Mixed MNL models for discrete response. Journal of
applied econometrics 15: 447-470.
[13] Hurtubia, R., Nguyen, M. H., Glerum, A., & Bierlaire, M. (2014). Integrating psychome-
tric indicators in latent class choice models. Transportation Research Part A: Policy and
Practice, 64, 135-146.
[14] McFadden, D., 1986. The choice theory approach to market research. Market. Sci. 5 (4),
275–297.
23
[15] Atasoy, B., Glerum, A., & Bierlaire, M. (2011). Mode choice attitudinal latent class: a
Swiss case-study. Second International Choice Modeling Conference, July 2011
[16] Likert, R. (1932) A technique for the measurement of attitudes. Arch. Psychol. 22 (140).
[17] Krueger, R., Vij, A., Rashidi, T.H..(2016). Normative belief and modality styles: a latent
class and latent variable model of travel behaviour. Springer Science+Business Media
New York.
[18] Alonso-González, M. J., Hoogendoorn-Lanser, S., van Oort, N., Cats, O., Hoogendoorn,
S. Drivers and barriers in adopting Mobility as a Service (MaaS) – A latent class cluster
analysis of attitudes, (2020). Transportation Research Part A: Policy and Practice, Volume
132, Pages 378-401, ISSN 0965-8564,https://doi.org/10.1016/j.tra.2019.11.022.
[19] Sifringer, B., Lurkin, V., & Alahi, A. (2020). Enhancing discrete choice models with rep-
resentation learning. Transportation Research Part B: Methodological, 140, 236-261.
[20] Bentz, Y., & Merunka, D. (2000). Neural networks and the multinomial logit for brand
choice modelling: a hybrid approach. Journal of Forecasting, 19(3), 177-200.
[21] Hruschka, H., Fettes, W., Probst, M., & Mies, C. (2002). A flexible brand choice model
based on neural net methodology a comparison to the linear utility multinomial logit model
and its latent class extension. OR spectrum, 24(2), 127-143.
[22] Hruschka, H., Fettes, W., & Probst, M. (2004). An empirical comparison of the validity
of a neural net based multinomial logit choice model to alternative model specifications.
European Journal of Operational Research, 159(1), 166-180.
[23] Arkoudi, I., Azevedo, C. L., & Pereira, F. C. (2021). Combining Discrete Choice Mod-
els and Neural Networks through Embeddings: Formulation, Interpretability and Perfor-
mance. arXiv preprint arXiv:2109.12042.
[24] Pereira, F. C. (2019). Rethinking travel behavior modeling representations through em-
beddings. arXiv preprint arXiv:1909.00154.
[25] Han, Y., 2019. Neural-Embedded Discrete Choice Models.
[26] Sfeir, G., Rodrigues,
class
choice models. Transportation Research Part C: Emerging Technologies, 136.
https://doi.org/10.1016/j.trc.2022.103552
F., Abou-Zeid, M. Gaussian
process
latent
[27] Sfeir, G., Abou-Zeid, M., Rodrigues, F., Pereira, F.C., Kaysi, I. (2021). Latent class choice
model with a flexible class membership component: A mixture model approach. Journal
of Choice Modelling, 41, 100320. https://doi.org/10.1016/j.jocm.2021.100320
[28] Wong, M., Farooq, B., Bilodeau, G.A., 2018. Discriminative Conditional Restricted Boltz-
mann Machine for Discrete Choice and Latent Variable Modelling. J. Choice Model. 29,
152–168. https://arxiv.org/abs/1706.00505
[29] Ben-Akiva, M., Walker J., Bernardino A. T., Gopinath, D. A., Morikawa, T., & Poly-
doropoulou, A. (2002). Integration of choice and latent variable models. Chapter 21 In:
Mahmassani, Hani S. (Ed.), In perpetual motion: Travel behaviour research opportunities
and application challenges. Emerald Group Publishing Limited, Bingley, United Kingdom,
pp. 431–470.
24
[30] Train, K.E., 2008. EM algorithms for nonparametric estimation of mixing distributions. J.
Choice Model. 1, 40–69. https://doi.org/10.1016/S1755-5345(13)70022-8
[31] Dempster, A.P., Laird, N.M., Rubin, D.B., 1977. Maximum Likelihood from
J. R. Stat. Soc. Ser. B 39, 1–38.
Incomplete Data via the EM Algorithm.
https://doi.org/10.1177/019262339101900314
[32] Train, K., D. McFadden and A. Goett (1986). The Incorporation of Attitudes in Econo-
metric Models of Consumer Choice. Cambridge Systematics working paper.
[33] Nocedal, J., Wright, S.J., Robinson, S.M., 1999. Numerical Optimization. Springer, New
York.
[34] Frenkel, A., Shiftan, Y., Gal-Tzur, A., Tavory, S. S., Lerner, O., Antoniou, C., Cantelmo,
G., Amini, R. E., Lima Azevedo, C. M., Monteiro, M.M., Kamargianni, M., Shachar,
F. S., Israel, D., Behrisch, C., Schiff, K., Shalev, J., & Peretz, D.(2021). Share More:
Shared MObility Rewards - Summary report. https://orbit.dtu.dk/en/publications/share-
more-shared-mobility-rewards-summary-report
[35] Monteiro, M. M.; Azevedo, C. M. L.; Kamargianni, M.; Cantelmo, G.; Tavory, S. S.;
Gal-Tzur, A.; Antoniou, C.; Shiftan, Y. Car-Sharing Subscription Preferences and the
Role of Incentives: The Case of Copenhagen, Munich, and Tel Aviv-Yafo. arXiv preprint
arXiv:2206.02448
[36] Københavns Kommune. City of Cyclists. https://urbandevelopmentcph.kk.dk/artikel/city-
cyclists Accessed Apr. 30, 2020.
[37] Priya Uteng, T., T. E. Julsrud, and C. George. The Role of Life Events and Context in
Type of Car Share Uptake: Comparing Users of Peer-to-Peer and Cooperative Programs
in Oslo, Norway. Transportation Research Part D: Transport and Environment, Vol. 71,
No. June 2018, 2019, pp.186–206. https://doi.org/10.1016/j.trd.2019.01.009.
[38] Prieto, M., G. Baltas, and V. Stan. Car Sharing Adoption Intention in Urban Areas: What
Are the Key Sociodemographic Drivers? Transportation Research Part A: Policy and Prac-
tice, Vol. 101, 2017, pp. 218–227. https://doi.org/10.1016/j.tra.2017.05.012.
25
|
|
http://arxiv.org/abs/2302.09865v2 | 2023-03-07T07:23:38 | 2023-02-20T09:56:51 | Can discrete information extraction prompts generalize across language
models? | We study whether automatically-induced prompts that effectively extract
information from a language model can also be used, out-of-the-box, to probe
other language models for the same information. After confirming that discrete
prompts induced with the AutoPrompt algorithm outperform manual and semi-manual
prompts on the slot-filling task, we demonstrate a drop in performance for
AutoPrompt prompts learned on a model and tested on another. We introduce a way
to induce prompts by mixing language models at training time that results in
prompts that generalize well across models. We conduct an extensive analysis of
the induced prompts, finding that the more general prompts include a larger
proportion of existing English words and have a less order-dependent and more
uniform distribution of information across their component tokens. Our work
provides preliminary evidence that it's possible to generate discrete prompts
that can be induced once and used with a number of different models, and gives
insights on the properties characterizing such prompts. | [
"Nathanaël Carraz Rakotonirina",
"Roberto Dessì",
"Fabio Petroni",
"Sebastian Riedel",
"Marco Baroni"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09865v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09865v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.CL",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.CL",
"cs.AI",
"cs.LG"
] | 3
2
0
2
r
a
M
7
]
L
C
.
s
c
[
2
v
5
6
8
9
0
.
2
0
3
2
:
v
i
X
r
a
Published as a conference paper at ICLR 2023
CAN DISCRETE INFORMATION EXTRACTION PROMPTS
GENERALIZE ACROSS LANGUAGE MODELS?
Nathana ̈el Carraz Rakotonirina,1 Roberto Dess`ı,1,2, Fabio Petroni,3 Sebastian Riedel,4 Marco Baroni1,5
1Universitat Pompeu Fabra, 2Meta AI, 3Samaya AI, 4University College London, 5ICREA
ABSTRACT
We study whether automatically-induced prompts that effectively extract informa-
tion from a language model can also be used, out-of-the-box, to probe other lan-
guage models for the same information. After confirming that discrete prompts
induced with the AutoPrompt algorithm outperform manual and semi-manual
prompts on the slot-filling task, we demonstrate a drop in performance for Au-
toPrompt prompts learned on a model and tested on another. We introduce a
way to induce prompts by mixing language models at training time that results
in prompts that generalize well across models. We conduct an extensive analysis
of the induced prompts, finding that the more general prompts include a larger
proportion of existing English words and have a less order-dependent and more
uniform distribution of information across their component tokens. Our work pro-
vides preliminary evidence that it's possible to generate discrete prompts that can
be induced once and used with a number of different models, and gives insights
on the properties characterizing such prompts.1
1
INTRODUCTION
NLP has shifted to a paradigm where very large pre-trained language models (LMs) are adapted to
downstream tasks through relatively minor updates (Bommasani et al., 2021; Liu et al., 2021). In the
most extreme case, task adaptation does not require modifying the LM or even accessing its internals
at all, but simply formulating a linguistic query that elicits an appropriate, task-specific response by
the model (Petroni et al., 2019a; Radford et al., 2019). This has promising practical applications, as
one could easily imagine proprietary LMs only exposing a natural-language-based interface, with
downstream agents extracting the information they need by formulating the appropriate queries.2
In this scenario, one fundamental question is how robust the querying protocol is to changes in the
underlying LM. On the one hand, the same downstream agent might want to query multiple LMs.
On the other, if the LM provider updates the model, this should not break the downstream pipeline.
On a more theoretical level, the properties of an emergent robust protocol might give us insights
on the general language processing capabilities of neural networks, and how they relate to natural
language.
We present a systematic study of the extent to which LM query protocols, that, following current
usage, we call prompting methods, generalize across LMs. Extending and confirming prior results,
we find that discrete prompts that are automatically induced through an existing optimization proce-
dure (Shin et al., 2020) outperform manually and semi-manually crafted prompts, reaching a good
performance level when tested with the same LM used for prompt induction. While the automati-
cally induced discrete prompts also generalize better to other LMs than (semi-)manual prompts and
currently popular "soft" prompts, their overall generalization performance is quite poor. We next
show that a simple change to the original training procedure, namely using more than one LM at
prompt induction time, leads to discrete prompts that better generalize to new LMs. The proposed
procedure, however, is brittle, crucially relying on the "right" choice of LMs to mix at prompt in-
duction. We finally conduct the first extensive analysis of automatically induced discrete prompts,
1The code to reproduce our analysis is available at https://github.com/ncarraz/prompt_
generalization.
2As a concrete example, one of the most powerful current LMs, GPT3, is only available via a text-based
API (https://beta.openai.com/overview).
1
Published as a conference paper at ICLR 2023
Figure 1: Cartoon summary of our main results. Prompts induced using a single language model
have a significant drop of performance when used to query other models. The problem is allevi-
ated when prompts are exposed to multiple models in the induction phase. Subtle but consistent
differences in the nature of the induced prompts also emerge.
tentatively identifying a set of properties characterizing the more general prompts, such as a higher
incidence of existing English words and robustness to token shuffling and deletion.
2 RELATED WORK
Prior work such as Petroni et al. (2019a) and Radford et al. (2019) demonstrated that LMs can be
directly adapted to new tasks through appropriate querying methods. This led to an explosion of
work on so-called "prompt engineering" (see Liu et al., 2021, for a thorough review). Much of
this work focuses on crafting appropriate manual or semi-manual prompts and/or on tuning LMs to
better respond to such prompts (e.g., Schick & Sch ̈utze, 2021; Sanh et al., 2022). Going beyond
manual prompts, Shin et al. (2020) introduced the AutoPrompt algorithm to generate prompts using
gradient-guided search, and demonstrated that such prompts often outperform manual ones. While
automatically induced prompts suffer of issues such as low-interpretability, we think it is important
to continue focusing on them because, besides their better performance (a result we confirm here
for AutoPrompt across a range of LMs), they are more promising than manual prompts in terms of
scalability, especially in contexts in which it is not sufficient to formulate a single prompt template
for a whole task, but each input query demands a distinct prompt formulation (Zhang et al., 2022).
Concurrent and later work has proposed to replace discrete strings, such as those generated by
AutoPrompt, with sequences of arbitrary vectors from the LM's embedding space (Lester et al.,
2021; Zhong et al., 2021). We confirm here that these continuous, or "soft" prompts outperform
AutoPrompt when trained and tested on the same LM. However, they cannot be used in our envis-
aged multiple-LM scenario. First, they require access to a model inner representations, beyond the
standard natural language querying interface, so that embeddings can be passed as input. Second,
continuous prompts, by their nature, won't generalize out-of-the-box to other LMs. Trivially, they
can't generalize across models with different embedding dimensionality. Even when models share
dimensionality, there is no reason why the absolute position of a vector in the embedding space of a
model should meaningfully transfer to another model. Discretizing soft prompt tokens to their near-
est vocabulary neighbours in order to overcome these issues does not help either. Khashabi et al.
(2021) demonstrated that it is possible to find well-performing soft prompts whose nearest neighbor
projections are arbitrarily fixed discrete tokens. Appendix B elaborates on the failure of soft prompts
to generalize across models, as well as the problematic behaviour of discretized soft prompts.
We are not aware of much previous work that has addressed the challenge of LM-to-LM transfer-
ability. Wallace et al. (2019) studied this problem in the context of textual adversarial attacks (that
can be seen as a special case of prompting, and indeed their attack method is closely related to
AutoPrompt). Similarly to us, they notice some performance drop when transferring adversarial
"triggers" to different LMs, and they show that this can be mitigated by an ensembling approach
where two triggers generated using variants of the same LM are combined.
Su et al. (2022) study LM-to-LM transferability in the context of continuous prompts. Since, as
we just discussed, such prompts are not directly transferable, they induce a projection from the
embedding space of the source LM to that of the target LM, thus considering a very different scenario
from the type of "out-of-the-box" transferability we are interested in here.
2
Published as a conference paper at ICLR 2023
3 EXPERIMENTAL SETUP
3.1 DATA
We focus on the task of slot-filling which, since its introduction in LM evaluation through the LAMA
benchmark (Petroni et al., 2019a), has been extensively used to probe the knowledge contained in
LMs (AlKhamissi et al., 2022). More specifically, we use the T-ReX split (Elsahar et al., 2018)
of LAMA. Each fact in T-ReX is represented as a triple (cid:104)subject, relation, object(cid:105)-for example,
(cid:104)Dante, place of birth, Florence(cid:105). LMs are queried using cloze prompts as in "Dante was born in
." A LM is said to have properly stored a fact if it can successfully predict the ground-truth
object given a prompt and the corresponding subject. We have decided to focus primarily on this
task because the prompts convey actual semantic information (characterizing the relation between
the subject and the object) rather than just metalinguistic information (as would be the case, for
example, for a machine-translation prompt, which might express something like: "translate the next
sentence from English to French"). Furthermore, the task requires learning a different prompt for
each relation, which can be seen as a first step toward fully flexible prompts that would change with
each single input (Zhang et al., 2022).
The LAMA test set contains 41 relations, each with up to 1,000 facts. We also evaluate on the
more challenging LAMA-UHN subset (Poerner et al., 2019), addressing some of the weaknesses
of the original LAMA, in Appendix D. All prompting methods are trained using the training data
collected by Shin et al. (2020), which include 1,000 facts for each relation type, drawn from either
the original T-REx dataset or Wikidata. LAMA also provides manual prompts, which we will use in
our experiments.
Since each LM class in our experiments (see Section 3.2 below) has its own vocabulary, a common
subset must be used for fair comparison. This is obtained from the intersection of the vocabularies
of all models considered. Furthermore, the training and test datasets are filtered to ensure that each
object is included in the common vocabulary. There are 11,511 case-sensitive items in the common
vocabulary. The filtered test set contains 25,358 facts, while the training set contains 25,247 facts.
We evaluate prompting methods using micro-averaged accuracy (precision@1).
3.2 LANGUAGE MODELS
Our experiments cover the three main types of LM. We use pre-trained LMs without any kind of
parameter updating. Table 1 shows the LMs considered in this study.
Masked LMs They produce representations using both the left and right context. Given a se-
quence x = [x1, ..., xn], they estimate the probability of a token xi given its left and right context
p(xi) = p(xi|x1, ..., xi−1, xi+1, ..., xn).
Left-to-right LMs They predict the next token conditioned on previous ones or assign a probabil-
ity to a sequence of tokens. Given a sequence of tokens x = [x1, ..., xn], left-to-right LMs assign a
probability p(x) to the sequence using the chain rule p(x) = (cid:81)
t p(xt|x1, ..., xt−1).
Sequence-to-sequence LMs They are composed of a bidirectional encoder that uses both left and
right context and a left-to-right decoder that do not share parameters.
3.3 PROMPT INDUCTION METHODS
Prompts are either manually crafted or generated automatically by prompting methods. In this study,
we have selected 3 different prompting methods that are representative of semi-manual, discrete and
continuous induction methods, respectively. They have been shown to perform well on the slot
filling task and associated code is publicly available.
LPAQA Starting from seed manual prompts, Jiang et al. (2020) generate a diverse candidate
prompt set using mining- and paraphrasing-based methods. For each relation, the best perform-
ing candidate on the training data is selected. To improve performance, the authors also propose
3
Published as a conference paper at ICLR 2023
Table 1: Pre-trained language models considered in this study.
Type
Model
Masked
BERTBASE (Devlin et al., 2019)
Masked
BERTLARGE (Devlin et al., 2019)
Masked
DistilBERT (Sanh et al., 2019)
Masked
RoBERTaBASE (Liu et al., 2019)
RoBERTaLARGE (Liu et al., 2019)
Masked
DistilRoBERTa (Sanh et al., 2019) Masked
GPT2 (Radford et al., 2019)
Left-to-right
GPT2MEDIUM (Radford et al., 2019) Left-to-right
Left-to-right
GPT2LARGE (Radford et al., 2019)
Left-to-right
GPT2XL (Radford et al., 2019)
Seq2seq
BARTBASE (Lewis et al., 2019)
Seq2seq
BARTLARGE (Lewis et al., 2019)
Seq2seq
T5SMALL (Raffel et al., 2020)
Seq2seq
T5BASE (Raffel et al., 2020)
Seq2seq
T5LARGE (Raffel et al., 2020)
#Parameters Training Corpus
110M
340M
66M
125M
355M
82M
117M
345M
774M
1.5B
140M
400M
60M
220M
770M
WebText (40GB)
Wikipedia (en) & BookCorpus (16GB)
Wikipedia (en) & BookCorpus & CC-News
& OpenWebText & Stories (160GB)
OpenWebText (38GB)
Wikipedia (en) & BookCorpus & CC-News
& OpenWebText & Stories (160GB)
C4 & Wiki-DPR (765GB)
prompt ensembling. However, ensembling tends to increase performance independently of the un-
derlying prompting method (see Appendix A). Consequently, we will only focus on the top-1 prompt
selection method here. We consider LPAQA a semi-manual method because it needs to be seeded
with manual prompts, and mining retrieves further human-generated strings.
AutoPrompt
It is an automated method proposed by Shin et al. (2020) to generate discrete
prompts using gradient-guided search (Wallace et al., 2019). The prompts are composed of a se-
quence of tokens selected from the vocabulary of the LM. The number of tokens is pre-defined. The
process is divided into two phases. For each specific token position, a set of candidates that maxi-
mize the likelihood on a batch of training data is first created. Then, the candidates are re-evaluated
on a different batch, with the best one retained. Even though the generated prompts are less inter-
pretable, they perform better than manual prompts. In our experiments, we use 5-token prompts and
run the algorithm for 1,000 iterations.
OptiPrompt Zhong et al. (2021) propose an automated method to generate continuous prompts.
They are dense vectors in the embedding space of the LM that are learned using gradient descent
on a separate training dataset. Except for the learning rate, which is increased to 3e-2 for the T5
models for proper convergence, we use the same hyperparameters as the original implementation.
We initialize vectors randomly.
4 RESULTS AND ANALYSIS
4.1 PROMPTING METHOD PERFORMANCE
We start by evaluating the performance of the different prompting methods.3 Prompts are induced
with a specific LM and then evaluated by retrieving objects from the same LM. Table 2 summarizes
the results. For reference, a majority-class baseline always picking the most common object for each
relation reaches 26.91% accuracy (note that this baseline has partial access to the ground truth in
order to retrieve the most common object of each relation). The random baseline is virtually at 0%.
AutoPrompt clearly outperforms LAMA and LPAQA, although it lags behind OptiPrompt. We thus
confirm that soft prompts are the way to go if you have access to a model embedding space and are
not interested in generalization across models. If either of these conditions is not met, AutoPrompt
is preferable to manual and semi-manual prompts.
Masked models tend to perform better as source LMs. This could be attributed to the fact that they
were pre-trained with a fill-in-the-blank task (Devlin et al., 2019), which is exactly how the slot
filling task is formulated.
3Following Petroni et al. (2019b), when testing manual and LPAQA prompts with left-to-right LMs, only
the tokens before [MASK] are used. [MASK] is always the last AutoPrompt and OptiPrompt token.
4
Published as a conference paper at ICLR 2023
Table 2: Comparison of different prompting methods using micro-averaged accuracy (precision@1).
Model
BERTBASE
BERTLARGE
DistilBERT
RoBERTaBASE
RoBERTaLARGE
DistilRoBERTa
GPT2
GPT2MEDIUM
GPT2LARGE
GPT2XL
BARTBASE
BARTLARGE
T5SMALL
T5BASE
T5LARGE
average
st dev
LAMA LPAQA AutoPrompt OptiPrompt
48.26
50.88
44.76
44.73
47.39
44.21
39.28
38.43
44.14
47.76
43.05
45.06
28.10
40.51
44.42
43.39
5.40
50.09
49.52
29.79
39.63
44.12
41.17
11.36
18.59
12.91
15.42
39.63
26.56
31.44
39.59
42.00
32.62
13.12
41.18
42.15
13.14
32.80
40.54
32.43
9.63
18.29
19.97
21.31
32.43
36.78
20.94
32.70
36.07
28.69
10.56
34.82
35.81
6.75
26.36
31.63
23.80
7.23
13.74
15.50
16.98
22.95
27.07
14.94
24.35
28.21
22.00
9.17
Figure 2: Prompt generalization. For each relation, a prompt is induced from the source LM. At test
time, the prompt is tested on the target LM.
4.2 AUTOPROMPT GENERALIZATION
In this section, we investigate AutoPrompt's ability to generalize across different LMs.4 Prompts are
induced using a Source LM and then evaluated on a Target LM, which can be the same or different
from the Source (Figure 2).
The results, relative to single-model LM performance, are shown in Figure 3. AutoPrompt generally
performs best when the Source and Target LMs are the same, as shown by the fact that off-diagonal
values are mostly negative. The performance gap gets bigger as we transfer across different LM
types. Prompts are generally more stable across different sizes of the same model, such as BERTBASE
and BERTLARGE. The drop in generalization performance of left-to-right models is less dramatic
simply because, for these models, the original same-source-and-target performance is already low.
We also verify the impact of model size on generalization. For each source model, we define the
generalization drop score as the average of the corresponding column in Figure 3. It measures the
average drop in accuracy when prompts from a source model are tested on a different target, with
respect to the original same-source-and-target accuracy. We discovered that performance drop and
source model size are highly correlated (0.6). We do not have a clear explanation for this correlation,
but we think it is an intriguing observation that should be further studied in the prompt analysis
literature.
4Appendix B confirms that OptiPrompt prompts do not generalize well. Appendix C shows that AutoPrompt
outperforms LPAQA also in terms of generalization.
5
Published as a conference paper at ICLR 2023
Figure 3: AutoPrompt relative performance across LMs. Each column represents a Source LM and
each row a Target LM. Each value represents the difference between the accuracy achieved by the
Target LM when using prompts induced with the Source LM and the accuracy obtained when Target
is also used for training.
4.3 MIXED-TRAINING AUTOPROMPT GENERALIZATION
We propose a simple modification to AutoPrompt training to generate prompts that generalize better.
Recall that the AutoPrompt algorithm involves two phases: one in which candidate prompts are
generated, and one in which the prompts are evaluated. Rather than relying on the same model
for the two phases, we now use two different LMs. The first model, which we call the generator,
proposes a set of candidates. Then, the second model, that we call the evaluator, evaluates the
candidates and chooses the best one.
To avoid a combinatorial explosion, we focus on combining the single LMs of each class that per-
formed best in the same-source-and-target setup (Table 2 above). For each pair, we arbitrarily use
the best of the two LMs (in the same-source-and-target setup) as generator. We deliberately avoid
picking models based on generalization performance (Figure 3), as in a realistic settings we might
not have advance access to the new architectures we need to generalize to.
Table 3 compares the performance of standard and mixed AutoPrompt (we extend these experiments
to LAMA-UHN in Appendix D). The BERTBASE/T5LARGE mix has the highest average accuracy.
Although it does not perform as well as BERTBASE on the BERT models, it transfers better to all the
other models (including the RoBERTa family). This mixed AutoPrompt variant even outperforms
the best seq2seq model T5LARGE on all sequence-to-sequence models (including T5LARGE itself). It
also outperforms GPT2MEDIUM on two GPT2 variants.
If these results are very encouraging, Table 3 also shows that simply mixing models does not guar-
antee good generalization. When we replace BERTBASE with T5LARGE as generator, generalization
performance is actually worse than when using T5LARGE alone, and combining BERTBASE as gener-
ator with GPT2MEDIUM as evaluator leads to minor generalization improvements compared to using
BERTBASE alone. Some preliminary insights on the best mixing strategy are offered in Appendix E.
6
Published as a conference paper at ICLR 2023
Table 3: AutoPrompt mixed training. The first three columns report generalization accuracy for the
single best LM in each class; the next three columns evaluate their combination.
Source
Target
BERTBASE
BERTLARGE
DistilBERT
RoBERTaBASE
RoBERTaLARGE
DistilRoBERTa
GPT2
GPT2MEDIUM
GPT2LARGE
GPT2XL
BARTBASE
BARTLARGE
T5SMALL
T5BASE
T5LARGE
Average
BERTBASE GPT2MEDIUM T5LARGE BERTBASE/T5LARGE BERTBASE/GPT2MEDIUM T5LARGE/GPT2MEDIUM
50.09
47.01
15.75
32.31
37.79
31.71
4.70
14.38
17.95
18.34
28.98
26.73
15.78
29.26
32.32
26.87
18.02
22.54
4.37
21.31
24.07
18.28
9.71
18.59
15.68
15.02
24.11
25.20
16.23
22.04
28.90
18.94
20.83
26.43
4.71
20.28
26.06
17.24
6.04
12.51
13.52
13.09
21.62
20.32
11.89
26.58
42.00
18.88
41.13
40.51
15.08
36.01
38.63
33.49
10.19
16.29
22.33
19.74
34.57
33.73
19.31
36.67
44.51
29.48
38.64
39.6
13.35
30.56
34.24
28.53
7.53
22.49
19.95
23.19
31.62
29.15
18.28
32.06
35.71
26.99
16.47
16.29
3.65
17.24
21.16
16.58
8.12
16.47
14.84
18.87
18.84
18.94
7.99
16.99
27.22
15.98
training LM(s)
semantic
overlap
BERTBASE
5.3*
GPT2MEDIUM
0.97
T5LARGE
2.43*
BERTBASE/T5LARGE
3.29*
BERTBASE/GPT2MEDIUM 3.51*
T5LARGE/GPT2MEDIUM
1.44
real-word
ratio
81.7
68.8
71.9
86.0
88.6
73.3
shuffled accuracy
non-normalized
11.5 (3.1)
6.0 (1.2)
15.1 (2.6)
11.5 (3.1)
9.5 (3.1)
9.7 (2.4)
ratio
23.0 (6.2)
32.4 (6.7)
36.0 (6.1)
27.9 (7.4)
24.5 (8.0)
35.8 (9.0)
Table 4: AutoPrompt prompt analysis. The semantic overlap column reports the t-score for the dif-
ference in semantic overlap between matching and mismatched prompts (see text for explanation),
with * marking significant scores at α=0.05. The real-word ratio column reports percentage ratios
of corpus-attested English words among space-/punctuation-mark delimited tokens appearing in a
prompt set. The shuffled accuracy columns report percentage accuracy after token shuffling, di-
vided by the original accuracy in the ratio column (averages of 10 random shufflings with standard
deviations in parenthesis).
4.4 PROMPT ANALYSIS
We study the prompts generated by AutoPrompt through single-model and mixed training, looking
for differences that might hint at how the latter generalize better. Since the prompt examples in
Table 8 (Appendix F) suggest that there are no huge differences directly visible to the "naked eye",
we undertake a quantitative analysis led by the following hypotheses.
1) Each LM has its own peculiarities, but they all share English as training language. Prompts op-
timized on a single model might overfit the quirks of that model, but mixed-training prompts might
capture more general properties of English that are shared across models. We thus hypothesize that
prompts that generalize better will have a larger semantic overlap with manually crafted English
prompts. 2) Modern LMs use sub-word tokenization strategies that differ from model to model.
AutoPrompt is thus free to combine sub-words into non-word sequences (e.g., slalomgraphers, pub-
lishedtoon in Table 8) that might in turn be tokenized differently by different models, leading to
inter-model brittleness. We thus conjecture that prompts that generalize better will contain a larger
proportion of real English words. 3) Natural languages rely on word order to express meaning, but
it's less clear that LMs are capturing genuine syntactic rules (Sinha et al., 2021). It's more likely that,
to the extent that prompts crucially rely on token order, this is exploiting statistical co-occurrence
quirks of specific LMs. We thus conjecture that a "bag-of-token" prompt sequence that does not
require the tokens to be in any special order will be more general than one where order matters
and, consequently, generalizing prompts will be more robust to token shuffling. 4) On a related
point, single-model-optimized prompts might concentrate information in the slots the source model
is most sensitive to, but such slots might vary from model (type) to model (type). We thus conjecture
that generalizing prompts will distribute information more evenly across tokens and thus they will
be more robust to single-token deletion.
7
Published as a conference paper at ICLR 2023
Semantic overlap with English The manual LAMA prompts are our English reference point. We
measure semantic overlap as the cosine between a vector representing an AutoPrompt-generated
prompt and a LAMA prompt. Specifically, we use fastText (Bojanowski et al., 2017) to represent
prompts, both because it offers independent representations from those of any of the LMs we are
comparing, and because it relies on vocabulary- and tokenization-independent n-gram-based se-
quence representations. Instead of reporting difficult-to-interpret absolute cosines, we report the
t-score for the cosine difference between cases where AutoPrompt prompts are compared to the
LAMA prompts for the same T-ReX relation, and cases where AutoPrompt prompts are compared
to different-relation LAMA prompts. In other words, the larger this value is, the clearer the dif-
ference in semantic overlap is between meaningful and random prompt comparisons. Results are
in the first column of Table 4. There is a strong correlation (>0.9 Pearson) between a prompt se-
mantic overlap with English and its accuracy when tested on the model used as source/generator
during training. This is encouraging in itself, suggesting that more effective AutoPrompt prompts
are also more semantically transparent. However, our hypothesis that better generalization implies
higher semantic overlap is disproven: there is a clear decrease in overlap between BERTBASE-based
prompts and the better generalizing ones obtained through BERTBASE/T5LARGE mixed-training.
Real-word ratio We verify whether a space- or punctuation-marked delimited character sequence
in a prompt is an existing English word by checking if it appears in the list of 56k words occurring at
least 1k times in the ukWaC corpus (Baroni et al., 2009). This corpus was not used for training any
of the models, thus minimizing biases towards any of them. The minimum occurrence threshold was
determined by manual inspection, observing that rarer strings tend not to be real words but "corpus
detritus" (numbers, dates, code fragments, typos). The second column of Table 4 reports percentage
attested-word ratios among the tokens produced by AutoPrompt for the whole T-ReX relation set in
various training setups. For reference, this ratio is at 99.4% for the manual LAMA prompts. The
generalizing BERTBASE/T5LARGE setup clearly outperforms single-model training on BERTBASE on
this metric, tentatively confirming our hypothesis that more word-like strings will transfer better
across models. Note however that BERTBASE/GPT2MEDIUM, a mixed-training setup that does not
generalize better than BERTBASE-based training alone, features prompts sporting an even higher
proportion of existing words. So, the latter might be a common property of mixed-training-induced
prompts, but not one that automatically entails better generalization.
Shuffling We shuffle the tokens in each prompt, and compute the resulting T-ReX accuracy when
retrieving information from the LM used as source/generator during AutoPrompt training. To tease
the effect of shuffling apart from the absolute performance of a prompt set, we also report the ratio
of accuracy after shuffling to accuracy with unshuffled prompts. We repeat the shuffling experiment
10 times, and report averaged accuracies/ratios and standard deviations in the last two columns of
Table 4. By superficially eyeing AutoPrompt prompts such as those in Table 8, one could think they
are bags of tokens, but the ratios show that token order matters, as there is always a big drop in per-
formance after shuffling. Indeed, by closer inspection of the prompts in Table 8, we notice that some
of them do have a sentence flavor ('[X] teaches modelling frescoes downtown in [Y]"). Our hypoth-
esis that the generalizing BERTBASE/T5LARGE prompts are less order-sensitive than the BERTBASE
ones is confirmed (compare the ratios of these setups). The extra robustness of BERTBASE/T5LARGE
might be due to the fact that T5LARGE itself is particularly robust to shuffling, and it remains to be
seen if for mixed-training prompts there is a causal relationship between robustness to shuffling and
generalization. Note that the relatively high ratio of GPT2MEDIUM might be due to a flooring effect,
as this setup has low accuracy before and after shuffling.
Token deletion To verify if information is equally distributed across the 5 tokens of an Auto-
Prompt prompt, for each prompt set we compute T-ReX accuracy (retrieving information from the
matching source/generator model) after removing a single token, repeating the experiment for each
token position. Figure 4 reveals that BERTBASE-based prompts are concentrating a lot of information
towards the end of the sequence, and in particular on the last token, with a huge drop in performance
if the latter is deleted. While the same tendency to pack information towards the end of the se-
quence is present in the better-generalizing BERTBASE/T5LARGE prompts, the drop is less dramatic
(especially when taking into account the fact that the latter prompts start from a lower full-sequence
accuracy). Figure 5 in Appendix G shows that all generated prompts have a tendency to pack more
information at the end of the sequence (which is remarkable, as their encoders are based on the fully
8
Published as a conference paper at ICLR 2023
(a) BERTBASE
(b) BERTBASE/T5LARGE
Figure 4: Percentage accuracy after dropping the token in each position of an AutoPrompt-generated
5-token prompt. The dashed horizontal line marks full-sequence accuracy.
symmetric transformer architecture), but T5LARGE generates prompts that are less affected by single-
token deletion. The higher robustness of BERTBASE/T5LARGE compared to BERTBASE might thus be
inherited from T5LARGE, and further studies should ascertain whether there is a causal relation be-
tween smoother information distribution and better generalization for mixed-training prompts.
5 DISCUSSION
Take-home points Automatically induced discrete prompts, such as those derived with the Auto-
Prompt algorithm, strike a good balance between (semi-)manual prompts, that they outperform in
retrieval quality and (potentially) scalability, and soft prompts, that can only be used out-of-the-box
on the model they were induced from, and require access to inner model structures to function. How-
ever, the standard AutoPrompt method must be adapted to get good performance across language
models. In particular, a simple modification in which AutoPrompt is trained using two language
models leads to prompts that better generalize to further models.
The better-generalizing prompts induced in this way look quite similar to prompts induced with the
standard method. However, a probing analysis suggests that there are systematic differences, and
in particular that the generalizing prompts tend to feature a larger proportion of existing English
words, and to be more robust to ablations that probe sensitivity to token order and asymmetries in
information distribution.
In sum, our results suggest that it is viable to use a learning-based algorithm to generate "universal"
discrete prompts that can be employed to extract information from a variety of pre-trained language
models, only requiring access to their standard discrete-string interface.
Limitations and directions for further work Our results are based on a single task, slot filling,
and a single data-set (T-ReX). We believe this is a good starting point, because in slot filling a
separate, semantically contentful prompt must be learned for each relation, but future work should
extend the investigation to different tasks, including tasks where successful knowledge retrieval
requires more than recalling a single word, as in the LAMA/T-ReX setup we used.
We used a single discrete prompt induction algorithm, AutoPrompt, confirming that it is generat-
ing high-quality prompts. However, this method generates a single fixed prompt for each task or
sub-task. True scalability will only be achieved with prompting methods that can generate an appro-
priate query for each different input they receive, and we intend to design discrete-prompt-induction
algorithms matching this desideratum (see Haviv et al. (2021) for a step in this direction). Another
reason to focus on algorithm development is that the single-model comparison between AutoPrompt
and the OptiPrompt soft prompts shows there is still large room to improve retrieval quality.
Our analysis revealed systematic differences between the best model-specific and generalizing
prompts. However, it is not clear that any of these differences is causally connected with generaliza-
tion improvement. In future work, we would like to better understand the relation between properties
such as robustness to shuffling and generalization. A particular exciting direction is to favour the
emergence of such properties through appropriate auxiliary functions at prompt-induction time, and
verify whether they lead to further improvements in generalization performance.
9
Published as a conference paper at ICLR 2023
ACKNOWLEDGMENTS
We thank the reviewers for constructive feedback. We thank the members of the UPF COLT group
for discussion and advice. UPF has received funding from the European Research Council (ERC)
under the European Union's Horizon 2020 research and innovation programme (grant agreement No.
101019291). This paper reflects the authors' view only, and the funding agency is not responsible
for any use that may be made of the information it contains. Fabio Petroni conducted work on the
project while at Meta AI.
REPRODUCIBILITY STATEMENT
All datasets, pre-trained models and prompting methods used in this paper are publicly available.
We use the same hyperparameters as the original implementation of the prompting methods unless
it is clearly specified in the text. Code to reproduce the results as well as the common vocabulary
and the filtered datasets will be shared upon acceptance.
ETHICS STATEMENT
Prompting relies on pre-trained language models, and thus inherits most ethical risks inherent in
such models (Weidinger et al., 2022). As we are not introducing new models, we are not adding new
potential issues tied to LMs.
As the examples in Table 8 show, automated prompting methods tend to produce opaque prompts.
This characteristic might be exploited for harmful purposes, such as adversarial attacks in which
a model is "triggered" to produce unwanted information through an apparently innocuous prompt
(Wallace et al., 2019). We believe that this provides further motivation for our focus on discrete
prompts, that are more directly human-readable than soft prompts. We showed in particular in
Section 4.4 that there is a very high correlation (>.9) between the quality of automatically-induced
prompts in the relevant information retrieval task and the degree of semantic transparency of the
prompts. If this result could be extended, it would constitute very good news on the interpretability
front, suggesting that very high-quality prompts will also be more human-interpretable, making it
harder to exploit opaque prompts for harmful purposes.
REFERENCES
Badr AlKhamissi, Millicent Li, Asli Celikyilmaz, Mona Diab, and Marjan Ghazvininejad. A review
on language models as knowledge bases. arXiv preprint arXiv:2204.06031, 2022.
Marco Baroni, Silvia Bernardini, Adriano Ferraresi, and Eros Zanchetta. The WaCky wide web: A
collection of very large linguistically processed web-crawled corpora. Language Resources and
Evaluation, 43(3):209–226, 2009.
Piotr Bojanowski, Edouard Grave, Armand Joulin, and Tomas Mikolov. Enriching word vectors with
subword information. Transactions of the Association for Computational Linguistics, 5:135–146,
2017.
Rishi Bommasani, Drew Hudson, Ehsan Adeli, Russ Altman, Simran Arora, Sydney von Arx,
Michael Bernstein, Jeannette Bohg, Antoine Bosselut, Emma Brunskill, Erik Brynjolfsson, Shya-
mal Buch, Dallas Card, Rodrigo Castellon, Niladri Chatterji, Annie Chen, Kathleen Creel, Jared
Davis, Dorottya Demszky, Chris Donahue, Moussa Doumbouya, Esin Durmus, Stefano Ermon,
John Etchemendy, Kawin Ethayarajh, Li Fei-Fei, Chelsea Finn, Trevor Gale, Lauren Gillespie,
Karan Goel, Noah Goodman, Shelby Grossman, Neel Guha, Tatsunori Hashimoto, Peter Hender-
son, John Hewitt, Daniel Ho, Jenny Hong, Kyle Hsu, Jing Huang, Thomas Icard, Saahil Jain, Dan
Jurafsky, Pratyusha Kalluri, Siddharth Karamcheti, Geoff Keeling, Fereshte Khani, Omar Khat-
tab, Pang Wei Koh, Mark Krass, Ranjay Krishna, Rohith Kuditipudi, Ananya Kumar, Faisal Lad-
hak, Mina Lee, Tony Lee, Jure Leskovec, Isabelle Levent, Xiang Li, Xuechen Li, Tengyu Ma, Ali
Malik, Christopher Manning, Suvir Mirchandani, Eric Mitchell, Zanele Munyikwa, Suraj Nair,
Avanika Narayan, Deepak Narayanan, Ben Newman, Allen Nie, Juan Carlos Niebles, Hamed
10
Published as a conference paper at ICLR 2023
Nilforoshan, Julian Nyarko, Giray Ogut, Laurel Orr, Isabel Papadimitriou, Joon Sung Park, Chris
Piech, Eva Portelance, Christopher Potts, Aditi Raghunathan, Rob Reich, Hongyu Ren, Frieda
Rong, Yusuf Roohani, Camilo Ruiz, Jack Ryan, Christopher R ́e, Dorsa Sadigh, Shiori Sagawa,
Keshav Santhanam, Andy Shih, Krishnan Srinivasan, Alex Tamkin, Rohan Taori, Armin Thomas,
Florian Tram ́er, Rose Wang, William Wang, Bohan Wu, Jiajun Wu, Yuhuai Wu, Sang Xie, Michi-
hiro Yasunaga, Jiaxuan You, Matei Zaharia, Michael Zhang, Tianyi Zhang, Xikun Zhang, Yuhui
Zhang, Lucia Zheng, Kaitlyn Zhou, and Percy Liang. On the opportunities and risks of foundation
models. https://arxiv.org/abs/2108.07258, 2021.
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep
bidirectional transformers for language understanding. In Proceedings of NAACL, pp. 4171–4186,
Minneapolis, MN, 2019.
Hady Elsahar, Pavlos Vougiouklis, Arslen Remaci, Christophe Gravier, Jonathon Hare, Frederique
Laforest, and Elena Simperl. T-rex: A large scale alignment of natural language with knowledge
base triples. In Proceedings of the Eleventh International Conference on Language Resources
and Evaluation (LREC 2018), 2018.
Tatsunori B Hashimoto, David Alvarez-Melis, and Tommi S Jaakkola. Word embeddings as metric
recovery in semantic spaces. Transactions of the Association for Computational Linguistics, 4:
273–286, 2016.
Adi Haviv, Jonathan Berant, and Amir Globerson. BERTese: Learning to speak to BERT.
In
Proceedings of EACL, pp. 3618–3623, Online, 2021.
Zhengbao Jiang, Frank F Xu, Jun Araki, and Graham Neubig. How can we know what language
models know? Transactions of the Association for Computational Linguistics, 8:423–438, 2020.
Daniel Khashabi, Shane Lyu, Sewon Min, Lianhui Qin, Kyle Richardson, Sameer Singh, Sean
Prompt wayward-
arXiv preprint
Welleck, Hannaneh Hajishirzi, Tushar Khot, Ashish Sabharwal, et al.
ness: The curious case of discretized interpretation of continuous prompts.
arXiv:2112.08348, 2021.
Brian Lester, Rami Al-Rfou, and Noah Constant. The power of scale for parameter-efficient prompt
tuning. In Proceedings of EMNLP, pp. 3045–3059, Punta Cana, Dominican Republic, 2021.
Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer
Levy, Ves Stoyanov, and Luke Zettlemoyer. Bart: Denoising sequence-to-sequence pre-
arXiv preprint
training for natural language generation,
arXiv:1910.13461, 2019.
translation, and comprehension.
Pengfei Liu, Weizhe Yuan, Jinlan Fu, Zhengbao Jiang, Hiroaki Hayashi, and Graham Neubig. Pre-
train, prompt, and predict: A systematic survey of prompting methods in natural language pro-
cessing. https://arxiv.org/abs/2107.13586, 2021.
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike
Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining
approach. arXiv preprint arXiv:1907.11692, 2019.
Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representa-
tions of words and phrases and their compositionality. Advances in neural information processing
systems, 26, 2013.
Fabio Petroni, Tim Rockt ̈aschel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, Alexander H Miller,
and Sebastian Riedel. Language models as knowledge bases? arXiv preprint arXiv:1909.01066,
2019a.
Fabio Petroni, Tim Rockt ̈aschel, Sebastian Riedel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, and
Alexander Miller. Language models as knowledge bases? In Proceedings EMNLP, pp. 2463–
2473, Hong Kong, China, 2019b.
Nina Poerner, Ulli Waltinger, and Hinrich Sch ̈utze. Bert is not a knowledge base (yet): Factual
knowledge vs. name-based reasoning in unsupervised qa. arXiv preprint arXiv:1911.03681, 3,
2019.
11
Published as a conference paper at ICLR 2023
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language
models are unsupervised multitask learners. OpenAI blog, 1(8):9, 2019.
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi
Zhou, Wei Li, Peter J Liu, et al. Exploring the limits of transfer learning with a unified text-to-text
transformer. J. Mach. Learn. Res., 21(140):1–67, 2020.
Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf. Distilbert, a distilled version of
bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108, 2019.
Victor Sanh, Albert Webson, Colin Raffel, Stephen Bach, Lintang Sutawika, Zaid Alyafeai, Antoine
Chaffin, Arnaud Stiegler, Arun Raja, Manan Dey, Saiful Bari, Canwen Xu, Urmish Thakker,
Shanya Sharma Sharma, Eliza Szczechla, Taewoon Kim, Gunjan Chhablani, Nihal Nayak, De-
bajyoti Datta, Jonathan Chang, Mike Tian-Jian Jiang, Han Wang, Matteo Manica, Sheng Shen,
Zheng Xin Yong, Harshit Pandey, Rachel Bawden, Thomas Wang, Trishala Neeraj, Jos Rozen,
Abheesht Sharma, Andrea Santilli, Thibault Fevry, Jason Alan Fries, Ryan Teehan, Teven Le
Scao, Stella Biderman, Leo Gao, Thomas Wolf, and Alexander Rush. Multitask prompted train-
In Proceedings of ICLR, Online, 2022. Published
ing enables zero-shot task generalization.
online: https://openreview.net/group?id=ICLR.cc/2022/Conference.
Timo Schick and Hinrich Sch ̈utze. It's not just size that matters: Small language models are also
few-shot learners. In Proceedings of NAACL, pp. 2339–2352, Online, 2021.
Thibault Sellam, Steve Yadlowsky, Jason Wei, Naomi Saphra, Alexander D'Amour, Tal Linzen,
Jasmijn Bastings, Iulia Turc, Jacob Eisenstein, Dipanjan Das, et al. The multiberts: Bert repro-
ductions for robustness analysis. arXiv preprint arXiv:2106.16163, 2021.
Taylor Shin, Yasaman Razeghi, Robert Logan IV, Eric Wallace, and Sameer Singh. AutoPrompt:
Eliciting knowledge from language models with automatically generated prompts. In Proceedings
of EMNLP, pp. 4222–4235, virtual conference, 2020.
Koustuv Sinha, Robin Jia, Dieuwke Hupkes, Joelle Pineau, Adina Williams, and Douwe Kiela.
Masked language modeling and the distributional hypothesis: Order word matters pre-training
for little. In Proceedings of EMNLP, pp. 2888–2913, Punta Cana, Dominican Republic, 2021.
Yusheng Su, Xiaozhi Wang, Yujia Qin, Chi-Min Chan, Yankai Lin, Huadong Wang, Kaiyue Wen,
Zhiyuan Liu, Peng Li, Juanzi Li, Lei Hou, Maosong Sun, and Jie Zhou. On transferability of
prompt tuning for natural language processing. In Proceedings of NAACL, pp. 3949–3969, Seattle,
WA, 2022.
Eric Wallace, Shi Feng, Nikhil Kandpal, Matt Gardner, and Sameer Singh. Universal adversarial
triggers for attacking and analyzing NLP. In Proceedings of EMNLP, pp. 2153–2162, Hong Kong,
China, 2019.
Laura Weidinger, Jonathan Uesato, Maribeth Rauh, Conor Griffin, Po-Sen Huang, John Mellor,
Amelia Glaese, Myra Cheng, Borja Balle, Atoosa Kasirzadeh, Courtney Biles, Sasha Brown,
Zac Kenton, Will Hawkins, Tom Stepleton, Abeba Birhane, Lisa Anne Hendricks, Laura Rimell,
William Isaac, Julia Haas, Sean Legassick, Geoffrey Irving, and Iason Gabriel. Taxonomy of
risks posed by language models. In Proceedings of FAccT, pp. 214–229, Seoul, Korea, 2022.
Yue Zhang, Hongliang Fei, Dingcheng Li, and Ping Li. PromptGen: Automatically generate
prompts using generative models. In Findings of NAACL, pp. 30–37, Seattle, WA, 2022.
Zexuan Zhong, Dan Friedman, and Danqi Chen. Factual probing is [mask]: Learning vs. learning
to recall. arXiv preprint arXiv:2104.05240, 2021.
A PROMPT ENSEMBLING
Discrete prompt ensembling for knowledge extraction was introduced by Jiang et al. (2020) using
LPAQA. Instead of selecting the top-1 prompt from a set of candidates, multiple prompts are com-
bined in order to improve performance. The authors argue that ensembling improves the extraction
12
Published as a conference paper at ICLR 2023
Table 5: Direct OptiPrompt transfer across LMs with same embedding dimension.
Source
Target
BERTBASE
DistilBERT
RoBERTaBASE
DistilRoBERTa
GPT2
BARTBASE
T5BASE
BERTBASE DistilBERT RoBERTaBASE DistilRoBERTa GPT2 BARTBASE T5BASE
48.25
11.89
2.27
2.12
0.01
1.20
4.17
33.71
46.41
2.02
1.88
0.04
0.72
4.53
0.62
0.97
46.17
39.86
0.15
1.02
4.89
1.24
0.83
41.04
45.26
0.01
0.05
4.64
1.02
1.64
2.67
2.48
40.57
0.60
2.89
1.00
0.81
3.13
2.87
0.00
44.3
4.92
0.19
0.64
4.90
3.81
0.00
0.27
42.08
of knowledge that appeared in different contexts within the training data. Since the idea of ensem-
bling is distinct from the specifics of the LPAQA method, in this appendix we check if ensembling
also helps AutoPrompt. Specifically we experiment with the optimized ensembling approach used
with LPAQA by Jiang et al. (2020), which associates learnable weights to each prompt.
For ensembling purposes, multiple candidate prompts for each relation are required. One way to
obtain these candidate prompts for AutoPrompt is by inducing prompts from instances of the same
model trained with different seeds. Considering the computational cost of retraining the models our-
selves, we use the already available MultiBERT collection (Sellam et al., 2021), which contains 25
instances of BERTBASE trained with different seeds. Unfortunately, unlike the models in Table 1, the
MultiBERTs were trained on uncased data, which means we can only evaluate on the MultiBERTs
themselves. Specifically, we use seed-0 MultiBERT as our target model, and obtain the AutoPrompt
prompts from the remaining MultiBERTs. For LPAQA, we use seed-0 MultiBERT for training and
testing, obtaining the candidate prompts with the standard LPAQA mining and paraphrasing proce-
dure.
First, we confirm that in this different setup AutoPrompt is still outperforming LPAQA in top-1 eval-
uation (39.40% vs. 35.17% T-ReX accuracies, respectively). Second, ensembling helps both mod-
els. However, ensembled LPAQA barely reaches the performance of top-1 Automprompt (39.21%),
whereas ensembled AutoPrompt further improves to 42.43% accuracy.
B SOFT PROMPT GENERALIZATION
Transferring soft prompts across models is not as straightforward as with discrete prompts. In or-
der to transfer the vectors, the source and target must have the same embedding dimension. We
experiment with the subset of models that have a common embedding dimension of 768. Table 5
confirms that soft prompts generalize extremely poorly. The only exception is decent student/teacher
transfers for distilled models, probably because their embeddings were initialized with those of the
corresponding teacher models.
A more general approach consists in discretizing the soft prompts to their nearest vocabulary neigh-
bors (Mikolov et al., 2013; Hashimoto et al., 2016), and using the resulting vocabulary item se-
quences as prompts. OptiPrompt vectors can be initialized with random numbers, random vocab-
ulary embeddings or manual prompts. When initialized with random vocabulary embeddings or
manual prompts, the nearest neighbor projections of the resulting vectors are always identical to
the initialization tokens, making the process vacuous. However, when the vectors are initialized
to random numbers, the nearest neighbors of the optimized vectors are the same for multiple rela-
tions.5 As expected, unlike the corresponding soft prompts, these discretized prompts perform very
poorly. For example, when training on BERTBASE, OptiPrompt soft prompts achieve 48.26% T-ReX
accuracy. The corresponding discretized prompts only achieve 1.21% accuracy.
5This might be related to the "prompt waywardness" phenomenon observed by Khashabi et al. (2021), who
showed that, for any arbitrary embedding, it is possible to find a well-performing soft prompt that has that
embedding as its nearest neigbhor.
13
Published as a conference paper at ICLR 2023
Table 6: Comparison of LPAQA and AutoPrompt across LMs. Each method is trained on the LM
leading to the best same-source-and-target performance.
Source LPAQA
Target
BERTBASE
BERTLARGE
DistilBERT
RoBERTaBASE
RoBERTaLARGE
DistilRoBERTa
GPT2
GPT2MEDIUM
GPT2LARGE
GPT2XL
BARTBASE
BARTLARGE
T5SMALL
T5BASE
T5LARGE
Average
BERTLARGE
38.01
42.14
7.24
27.68
33.68
22.21
7.88
14.88
17.15
18.01
26.74
28.47
16.38
27.76
31.20
23.96
AutoPrompt
BERTBASE
50.09
47.01
15.75
32.31
37.79
31.71
4.70
14.38
17.95
18.34
28.98
26.73
15.78
29.26
32.32
26.87
C LPAQA GENERALIZATION
AutoPrompt is better than LPAQA in the same-source-and-target setup, as demonstrated in Table 2.
Table 6 further shows that AutoPrompt also generalizes better than LPAQA to other target models
(we train the latter on BERTLARGE, since this is the LPAQA setup reaching the best same-source-
and-target accuracy).
D LAMA-UHN RESULTS
LAMA-UHN (UnHelpfulNames) (Poerner et al., 2019) is a subset of LAMA where facts that can
be answered based on entity names alone were removed. The dataset is built using two heuristics.
The first one filters facts whose object is a case-insensitive substring of the subject entity name.
The second heuristic deletes a triple if a given model can infer information such as native language,
nationality or place of birth using the subject's surface form only. We use the original dataset with
BERTBASE as filtering model.
Table 7 shows that the generalization results still hold. The difference between BERTBASE and
BERTBASE/T5LARGE is smaller, possibly due to a ceiling effect with this harder data-set, but (once we
exclude the non-generalizing same-source-and-target BERTBASE case), it is statistically significant
(paired t-test, α=0.05).
E CHOOSING MODELS FOR MIXED-TRAINING
We study to what extent same-target-same-source accuracies of component models are good predic-
tors of mixture generalization accuracy. To avoid a combinatorial explosion, we fix BERTBASE (the
best model in the same-target-same-source setup) as either generator or evaluator, and pair it with 15
different LMs. The correlation across 15 mixtures is at 0.22 when BERTBASE is fixed as generator,
and at 0.49 when it is fixed as evaluator. Overall, this suggests that single-model setup performance
is a good predictor of mixture quality. We attribute the lower score with BERT-as-generator to a
mild ceiling effect in this case.
Indeed, we observe that, on average, performance is better when using BERTBASE as generator than
as evaluator. This is likely due to the fact that the generator model does most of the "heavy lifting" in
the mixture, as it is the one finding candidate prompts, that are then simply reranked by the evaluator.
It thus makes sense to use the best single-model-setup system used as the generator in a mixture.
14
Published as a conference paper at ICLR 2023
Table 7: AutoPrompt generalization evaluated on LAMA-UHN.
BERTBASE GPT2MEDIUM T5LARGE BERTBASE/T5LARGE BERTBASE/GPT2MEDIUM T5LARGE/GPT2MEDIUM
39.80
37.91
13.51
25.35
30.82
24.98
2.54
9.28
11.63
11.02
22.25
19.62
6.04
20.36
23.46
19.90
13.69
17.88
3.02
16.57
18.91
14.17
6.65
14.19
10.88
9.78
18.81
18.74
7.79
13.71
20.70
13.70
15.00
20.73
3.54
14.82
20.14
11.71
3.68
9.43
9.78
9.57
15.18
13.80
3.83
15.19
31.48
13.19
31.03
32.00
13.11
28.23
31.62
24.61
6.48
10.09
15.06
12.54
26.21
25.07
9.55
25.98
34.25
21.72
28.61
32.25
11.64
23.52
28.18
21.03
3.83
15.02
13.30
16.36
23.19
21.24
7.86
21.19
25.84
19.54
13.98
13.81
2.88
13.99
18.14
13.01
5.22
11.96
10.87
13.48
14.63
14.53
3.30
11.74
19.37
12.06
Source
Target
BERTBASE
BERTLARGE
DistilBERT
RoBERTaBASE
RoBERTaLARGE
DistilRoBERTa
GPT2
GPT2MEDIUM
GPT2LARGE
GPT2XL
BARTBASE
BARTLARGE
T5SMALL
T5BASE
T5LARGE
Average
Finally, when fixing BERTBASE as generator, we observe that, in the majority of cases, we obtain
better generalization results by using a different evaluator than BERTBASE itself, suggesting that
mixed-training generalizes better compared to single model training even when randomly selecting
one of the two models.
F PROMPT EXAMPLES
Table 8 shows manual (LAMA) and AutoPrompt prompts for a randomly picked set of T-ReX re-
lations. We present examples for AutoPrompt trained on BERTBASE, the best choice in the same-
source-and-target setup, and for mixed training using BERTBASE as generator model and T5LARGE
as evaluator (BERTBASE/T5LARGE), since this combination results in the best generalization perfor-
mance. For comparison, we also present prompts obtained using GPT2MEDIUM as source model,
since this is a setup with relatively low performance in both the same-source-and-target and gener-
alization evaluations.
We note that the two better models generally produce prompts that have at least some degree of
semantic/lexical relevance to the relation. This might be to some degree the case for GPT2MEDIUM
as well, but much more opaquely so.
Interestingly, for the two better models at least, the most
transparent information is concentrated towards the end of the string. For example, the BERTBASE
location prompt ends with headquartered in, and the corresponding BERTBASE/T5LARGE prompt
ends with headquarters in. The BERTBASE manufacturer prompt ends with marketed by, and the
corresponding BERTBASE/T5LARGE prompt ends with maker. Both these observations (higher se-
mantic relevance of better-performing prompts and higher information concentration at the end of
the prompt string) are confirmed by the quantitative analyses reported in Section 4.4 of the main
text.
By qualitative inspection, the only noticeable difference between the BERTBASE prompts (better in
the non-generalizing setup) and the BERTBASE/T5LARGE ones (better at generalization) is that the
latter contain a higher proportion of well-formed English words (as opposed to concatenations of
word pieces that do not result in existing words). Again, this is quantitatively confirmed by the
analysis in Section 4.4
15
Published as a conference paper at ICLR 2023
]
Y
[
n
i
n
w
o
t
n
w
o
d
]
Y
[
n
w
o
t
n
w
o
d
s
e
o
c
s
e
r
f
g
n
i
l
l
e
d
o
m
s
e
h
c
a
e
t
]
X
[
]
Y
[
d
n
a
s
i
r
a
P
(
l
a
u
d
m
y
n
o
d
u
e
s
p
]
X
[
y
l
s
s
e
l
e
l
i
x
e
s
e
e
fl
d
n
a
l
l
]
X
[
]
Y
[
n
i
d
e
i
d
]
X
[
h
t
a
e
d
f
o
e
c
a
l
p
]
Y
[
d
a
e
r
p
s
y
l
l
u
f
e
c
a
e
p
]
Y
[
x
o
d
o
h
t
r
o
]
Y
[
e
t
i
s
o
p
p
o
n
o
i
g
i
l
e
r
n
o
i
g
i
l
e
r
]
Y
[
e
h
t
d
e
p
l
e
h
s
e
u
q
s
o
m
y
t
s
a
n
y
d
]
X
[
s
e
t
u
t
i
t
s
n
o
c
d
f
f
f
u
\
d
8
f
9
u
\
u
n
g
/
"
:
"
]
X
[
l
a
t
n
e
m
a
d
n
u
f
d
e
fi
i
t
n
e
d
i
n
u
e
v
e
i
l
e
b
]
X
[
h
t
i
w
d
e
t
a
i
l
fi
f
a
s
i
]
X
[
n
o
i
g
i
l
e
r
E
G
R
A
L
5
T
/
E
S
A
B
T
R
E
B
M
U
I
D
E
M
2
T
P
G
E
S
A
B
T
R
E
B
l
a
u
n
a
M
n
o
i
t
a
l
e
r
s
n
m
u
l
o
c
o
w
t
g
n
i
w
o
l
l
o
f
e
h
T
.
s
t
p
m
o
r
p
A
M
A
L
d
e
t
f
a
r
c
-
y
l
l
a
u
n
a
m
s
w
o
h
s
n
m
u
l
o
c
l
a
u
n
a
M
e
h
T
.
t
e
s
b
u
s
n
o
i
t
a
l
e
r
X
e
R
-
T
m
o
d
n
a
r
a
r
o
f
s
t
p
m
o
r
p
e
l
p
m
a
x
E
:
8
e
l
b
a
T
h
g
u
o
r
h
t
d
e
t
a
r
e
n
e
g
t
p
m
o
r
p
s
w
o
h
s
n
m
u
l
o
c
t
s
a
l
e
h
T
.
y
l
e
v
i
t
c
e
p
s
e
r
,
I
M
U
D
E
M
2
T
P
G
d
n
a
E
S
A
B
T
R
E
B
s
l
e
d
o
m
e
c
r
u
o
s
s
a
g
n
i
s
u
t
p
m
o
r
P
o
t
u
A
y
b
d
e
t
a
r
e
n
e
g
s
t
p
m
o
r
p
w
o
h
s
.
s
t
o
l
s
t
c
e
j
b
o
d
n
a
t
c
e
j
b
u
s
e
h
t
r
o
f
d
n
a
t
s
]
Y
[
d
n
a
]
X
[
,
s
e
s
a
c
l
l
a
n
I
.
l
e
d
o
m
r
o
t
a
u
l
a
v
e
s
a
E
G
R
A
L
5
T
d
n
a
l
e
d
o
m
r
o
t
a
r
e
n
e
g
s
a
E
S
A
B
T
R
E
B
g
n
i
s
u
,
g
n
i
n
i
a
r
t
d
e
x
i
m
t
p
m
o
r
P
o
t
u
A
]
Y
[
r
e
k
a
m
]
Y
[
y
b
d
e
t
e
k
r
a
m
g
n
i
d
l
e
fi
n
o
i
l
l
i
b
y
b
d
e
s
i
v
e
d
]
X
[
.
]
Y
[
t
e
b
a
h
p
i
k
a
s
a
n
o
s
n
h
o
J
n
e
g
a
w
0
5
6
]
X
[
y
r
a
n
i
b
s
e
d
u
t
i
t
l
a
n
s
i
]
X
[
]
Y
[
y
b
d
e
c
u
d
o
r
p
s
i
]
X
[
r
e
r
u
t
c
a
f
u
n
a
m
l
a
n
fi
i
m
e
s
d
l
r
o
w
d
e
m
a
e
r
t
s
]
X
[
]
Y
[
g
n
i
t
n
e
s
e
r
p
e
r
n
o
t
n
i
m
d
a
b
]
Y
[
d
n
a
y
n
a
m
r
e
G
[
y
r
l
a
v
i
r
e
l
y
t
s
e
]
X
[
n
o
o
t
d
e
h
s
i
l
b
u
p
a
s
r
e
v
s
e
m
o
c
]
X
[
]
Y
[
n
i
d
e
t
a
e
r
c
s
a
w
]
X
[
n
i
g
i
r
o
f
o
y
r
t
n
u
o
c
]
Y
[
e
d
i
s
t
u
o
d
e
s
a
b
y
l
g
n
i
d
e
s
i
l
a
i
c
e
p
s
]
X
[
]
Y
[
n
i
s
r
e
t
r
a
u
q
d
a
e
h
&
g
n
i
k
i
b
c
i
h
p
a
r
g
o
f
n
i
]
X
[
]
Y
[
n
i
n
o
i
t
a
d
o
m
m
o
c
c
a
]
Y
[
n
i
d
e
r
e
t
r
a
u
q
d
a
e
h
s
r
e
h
p
a
r
g
m
o
l
a
l
s
s
t
s
a
r
t
n
o
c
]
X
[
]
Y
[
n
i
d
e
t
a
c
o
l
s
i
]
X
[
n
o
i
t
a
c
o
l
16
Published as a conference paper at ICLR 2023
(a) BERTBASE
(b) GPT2MEDIUM
(c) T5LARGE
(d) BERTBASE/T5LARGE
(e) BERTBASE/GPT2MEDIUM
(f) T5LARGE/GPT2MEDIUM
Figure 5: Percentage accuracy after dropping the token in each position of an AutoPrompt-generated
5-token prompt. The dashed horizontal line marks full-sequence accuracy.
G TOKEN DELETION FULL RESULTS
Figure 5 reports the T-ReX accuracy for AutoPrompt prompt sets obtained using different LMs or
LM combinations, always tested on the LM used for AutoPrompt training (the generator LM in
mixed-training setups), when one token at a time is removed from the full prompt sequence.
17
|
|
http://arxiv.org/abs/2303.01245v1 | 2023-02-20T09:48:11 | 2023-02-20T09:48:11 | An Incremental Gray-box Physical Adversarial Attack on Neural Network
Training | Neural networks have demonstrated remarkable success in learning and solving
complex tasks in a variety of fields. Nevertheless, the rise of those networks
in modern computing has been accompanied by concerns regarding their
vulnerability to adversarial attacks. In this work, we propose a novel
gradient-free, gray box, incremental attack that targets the training process
of neural networks. The proposed attack, which implicitly poisons the
intermediate data structures that retain the training instances between
training epochs acquires its high-risk property from attacking data structures
that are typically unobserved by professionals. Hence, the attack goes
unnoticed despite the damage it can cause. Moreover, the attack can be executed
without the attackers' knowledge of the neural network structure or training
data making it more dangerous. The attack was tested under a sensitive
application of secure cognitive cities, namely, biometric authentication. The
conducted experiments showed that the proposed attack is effective and
stealthy. Finally, the attack effectiveness property was concluded from the
fact that it was able to flip the sign of the loss gradient in the conducted
experiments to become positive, which indicated noisy and unstable training.
Moreover, the attack was able to decrease the inference probability in the
poisoned networks compared to their unpoisoned counterparts by 15.37%, 14.68%,
and 24.88% for the Densenet, VGG, and Xception, respectively. Finally, the
attack retained its stealthiness despite its high effectiveness. This was
demonstrated by the fact that the attack did not cause a notable increase in
the training time, in addition, the Fscore values only dropped by an average of
1.2%, 1.9%, and 1.5% for the poisoned Densenet, VGG, and Xception,
respectively. | [
"Rabiah Al-qudah",
"Moayad Aloqaily",
"Bassem Ouni",
"Mohsen Guizani",
"Thierry Lestable"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2303.01245v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2303.01245v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.CR",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.CR",
"cs.LG"
] | An Incremental Gray-box Physical Adversarial
Attack on Neural Network Training
Rabiah Al-qudah1, Moayad Aloqaily1, Bassem Ouni2, Mohsen Guizani1, Thierry Lestable2
1Mohamed Bin Zayed University of Artificial Intelligence (MBZUAI), UAE
2Technology Innovation Institute, Abu Dhabi, UAE
E-mails: 1{rabiah.alqudah; moayad.aloqaily; mohsen.guizani}@mbzuai.ac.ae
2{bassem.ouni; thierry.lestable}@tii.ae
3
2
0
2
b
e
F
0
2
]
R
C
.
s
c
[
1
v
5
4
2
1
0
.
3
0
3
2
:
v
i
X
r
a
Abstract-Neural networks have demonstrated remarkable
success in learning and solving complex tasks in a variety
of fields. Nevertheless, the rise of those networks in modern
computing has been accompanied by concerns regarding their
vulnerability to adversarial attacks. In this work, we propose a
novel gradient-free, gray box, incremental attack that targets the
training process of neural networks. The proposed attack, which
implicitly poisons the intermediate data structures that retain
the training instances between training epochs acquires its high-
risk property from attacking data structures that are typically
unobserved by professionals. Hence, the attack goes unnoticed
despite the damage it can cause. Moreover, the attack can be
executed without the attackers' knowledge of the neural network
structure or training data making it more dangerous. The attack
was tested under a sensitive application of secure cognitive cities,
namely, biometric authentication. The conducted experiments
showed that the proposed attack is effective and stealthy. Finally,
the attack effectiveness property was concluded from the fact
that it was able to flip the sign of the loss gradient in the
conducted experiments to become positive, which indicated noisy
and unstable training. Moreover, the attack was able to decrease
the inference probability in the poisoned networks compared to
their unpoisoned counterparts by 15.37%, 14.68%, and 24.88%
for the Densenet, VGG, and Xception, respectively. Finally, the
attack retained its stealthiness despite its high effectiveness. This
was demonstrated by the fact that the attack did not cause a
notable increase in the training time, in addition, the Fscore
values only dropped by an average of 1.2%, 1.9%, and 1.5% for
the poisoned Densenet, VGG, and Xception, respectively.
Index Terms-Adversarial Attacks, Data Poisoning, Neural
Networks, Iris Recognition.
I. INTRODUCTION
Cognitive cities [1] are proactive, hyper-connected, and
citizen-driven cities that are designed to minimize resource
consumption, in order to achieve sustainability. In addition, the
vast advancement in Artificial Intelligence (AI) and Internet
of Things (IoT) technologies have enhanced the evolution
of research that integrates both technologies to deliver and
automate services for cognitive cities' residents. In fact, the
great development that emerged from the integration of those
technologies has brought unforeseen exposures to cybersecu-
rity, in addition to novel attacks that need to be addressed in
order to deliver secure automation to cognitive cities.
Securing access to different services and facilities, such
as connected buildings and data centers, and managing the
flow of foot traffic are crucial requirements when adopting
the cognitive city paradigm. Those requirements can be im-
plemented using biometric authentication such as fingerprint
recognition and iris recognition. Despite the benefits of bio-
metric authentication, privacy concerns and security attacks
pose serious challenges to this technology after deployment.
Attacks that target biometric recognition systems typically
include presenting human characteristics or artifacts directly
to a biometric system to interfere or bias with its standard
operation. Such attacks can result in granting access to unau-
thorized individuals into secured premises, allowing tailgating,
or triggering denial of service by rejecting the biometrics
of authorized individuals. For instance, in 2017, the Chaos
Computer Club executed a successful attack on the Samsung
Galaxy S8 iris scanner using a simple photograph and a contact
lens [2].
On a different note, neural networks have gained wide pop-
ularity in the past decade due to their supremacy in terms of
accuracy and minimal need for human intervention. Moreover,
those networks are data hungry and are very sensitive to
patterns they are exposed to during the training phase. On the
other hand, neural networks are vulnerable and can be biased
even with the introduction of simple adversarial attacks. For
example, altering a single pixel in the data fed to an image
classifier can disrupt the learning experience and result in a
biased model [3].
Adversarial attacks are considered white box when the
attacker has full access to the neural network and data, while
gray box attacks assume having access to either and black
box attacks assume access to neither. Those attacks can be
categorized into digital attacks and physical attacks. Digital
attacks engineer pixel values of input images, whereas physical
attacks insert pixel patches that represent real world objects
into the input image instance. Attacker goals can vary from
faulting the predictions of a certain class, in what is called
"targeted attacks". Moreover, an attack can be "non-targeted"
and aim to fault the model in general.
Furthermore, attacks that target faulting the inference phase
have been extensively studied in the literature. On the contrary,
only a handful of papers focused on faulting the training phase
and the intermediate values related to its computations. In
2022, Breier et al. introduced the first attack that directly
targets the training phase by perturbing the ReLu values while
training [4]. In fact, the lack of research attention on attacks
that target the training phase puts many applications that rely
on neural networks in jeopardy. In this work, we propose and
test a novel attack that focuses on faulting the training process
of neural networks in the domain of biometric authentication
through iris recognition. The contributions of this work can be
summarized as follows:
This method includes adding noise whose direction is the same
as the gradient of the cost function with respect to the data
using a trained model. The work in [4], proposed the first
attack that targets the training phase by changing the values
of the ReLu function to bias the neural network. The novel
attack was proven to be effective and stealthy.
1) We introduce a novel gradient-free, data poisoning attack
that incrementally and directly targets the training set
during the training process of a neural network with
minimal knowledge by the attacker. To the best of
this is the first attack that executes
our knowledge,
between training epochs and targets the intermediate
data structures of the training phase.
2) We conduct extensive experimental verification on the
proposed attack to test its effectiveness and stealthiness.
We define four evaluation criteria to quantify the effect
of the attack, namely, the average of the loss change,
the average inference probability, the training time dif-
ference, and the performance degradation measure.
3) We experiment the proposed attack on an important
aspect of a cognitive city, namely, iris recognition. To
the best of our knowledge, this is the first attempt to
test the effect of an adversarial attack that occurs during
training on the domain of iris recognition.
The rest of this paper is organized as follows: the most recent
literature on the domain of physical attacks and iris recognition
is presented in Section II. The proposed methods are outlined
in Section III. The results are described and discussed in
Section IV. Finally, Section V concludes and summarizes the
main highlights and observations of this work.
II. RELATED WORK
A. Attacks on Neural Networks
Patch attacks are physical attacks that replace a subset
of pixels in an image with pixels from adversarial patches
to bias a model [5]. While many studies have proposed
attacks that target faulting the inference phase [6], [7], only
a handful of papers focused on faulting the training phase
and the intermediate values related to its computations [4].
For example, Zhao et al. [6] applied the alternating direction
method of multipliers at
the inference time to solve the
optimization problem of the targeted fault sneaking attack.
The results showed that the attack was successful and stealthy,
moreover, the success rate was approximately 100% when
the number of targeted images was less than 10. Whereas,
the success rate decreased as the number of fooled images
increased. Furthermore, the work in [7] studied the effects of
bitwise perturbations at inference time on 19 deep networks.
The vulnerable parameters of the experimented networks were
identified using heuristic functions. The results showed that
most deep architectures have at least one parameter that causes
an accuracy loss of over 90% when a bit-flip is executed on
their bitwise representation.
In addition, the Fast Gradient Sign Method (FGSM) has
been widely used in the literature as an attacking strategy [8].
B. Attacks on Iris Recognition Systems
The crucial role iris recognition has played in securing
premises, in addition to the threatening effects of breaching
such authentication systems, have made iris biometric authen-
tication systems an active target for adversarial attacks. A
novel morph attack on iris recognition systems was tackled
in [9]. Sharma et al. generated morphed iris images using the
Indian Institute of Technology Delhi (IITD) Iris Database and
West Virginia University (WVU) multi-modal datasets. The
morph attack achieved a success rate higher than 90% on two
state-of-the-art iris recognition methods, which indicates the
vulnerability of iris recognition systems.
In order to protect against the increasing attacks, researchers
have also focused on studying countermeasures and detection
mechanisms for iris recognition attacks. For example, Thukral
et al. [10] proposed an iris spoofing detection system that
utilized Gabor filters and Histogram of Gradient (HOG) bins
to extract features. Next, a Support Vector Machine (SVM)
was used to detect if the extracted features represented fake
or real iris. The proposed system was able to detect spoofing
attacks with an accuracy of 98%. Finally, Tapia et al. [11]
tackled testing the liveness of the scanned iris to protect the
system from being fooled by printed images or artificial eyes.
The proposed work utilized a MobileNetV2 network, which
was trained from scratch. Moreover, the authors increased the
number of filters and weighted each class based on the number
of its instances. The proposed method was able to accurately
classify irises with competitive Bona Fide Classification Error
Rates (BPCER) of less than 4% in all experiments.
III. PHYSICAL GRAY-BOX ADVERSARIAL ATTACKS
A labeled training set of size s can be represented as
DS = {(xi, yi)}s
i=1, where yi ∈ Y and Y is the set of all
possible output classes for an image classification problem.
When training a deep classifier, we aim to optimize a dis-
criminant function F that maps each instance,xi, to the class
associated with the highest class probability, as can be seen
in Equation 1. This optimization process takes place during
the training process by passing DS to a deep classifier for
a number of training rounds. The number of training rounds
will be referred to as Epochs throughout the rest of this paper.
The aforementioned setting of training F without any attacks
will be referred to as the base model throughout this work.
F → argmax(P (Y | xi))
(1)
A. Attack Definition
In our proposed attack, an attacker aims to corrupt the
training process by perturbing the training instances incre-
mentally between training epochs in order to optimize a
corrupted poisoned discriminant function F (cid:48)
that produces
faulty probability distributions over the possible output classes.
The attack is executed implicitly in multiple rounds. In each
poisoning round, a poisoning procedure that selects X ⊆ DS
of size |X| = α ∗ s is executed, where α ∈ (0%, 100%] is
the poisoning percentage coefficient. The attacker's goal is to
replace X = {(xi, yi)}|X|
i=1 with a poisoned set X (cid:48) = {g(xi),
yi)}|X|
i=1, where g(.) is the poisoning function that modifies
xi at a pixel level. The poisoning function replaces the pixels
that fall within a selected area, namely P atchArea, with faulty
pixels, x(cid:48), in order to corrupt the image representation and
result in a faulty training process. The poisoning function can
be seen in Equation 2, where W and H are the width and
height of the training image instance xi.
g(x) =
x(cid:48)
u,v
if (u, v) ∈ P atchArea
, u ∈ [0, W ), v ∈ [0, H)
xu,v Else
(2)
The attack targets the intermediate data structures, where
the training instances are saved. In addition, it is executed
incrementally between training epochs, such that a different
X is selected every poisoning round in order to accumulate
the poisoned training instances and increase the effectiveness
of the attack.
The attack frequency coefficient determines the number of
poisoning rounds and is called β ∈ [1, Epochs]. When the
value of β is chosen to be 1, then the attack will be executed
after each training epoch causing an increased risk of damage.
On the contrary, if the value is chosen to be Epochs, then the
poisoning process will only happen once after the first training
epoch.
B. Poisoning Strategy
Function g(.) in Equation 2 replaces pixels in a training
instance within the defined poisoning area, P atchArea. This
poisoning procedure can be implemented in multiple ways. In
this work, we opted to implement g(.) to execute local pertur-
bations and global perturbations [12]. It is worth mentioning
that only one type of perturbations was considered in each of
the conducted experiments in this work.
In the local perturbations setting, a small area called physi-
cal patch in the training instance is selected and replaced with
pixels from another image. In this work, the physical patch
was chosen to be close to the training set domain, hence it
was an image of a human eye. It is worth mentioning that the
size of the P atchArea and its location are randomized, and
optimizing them is out of the scope of this work [5].
On the other hand, in the global perturbations setting, all the
instances in X are replaced with another randomly selected
image from the training set. This way the classifier will be
exposed to a highly redundant training set which corrupts the
training process by increasing the risk of overfitting. Both
poisoning strategies are not easy to blacklist, since the local
setting only alters a small area of each instance and the global
perturbation setting uses an image from within the training
instances in a manner that imitates image augmentation, which
is a benign, widely used technique in training neural networks.
C. Attack Characteristics
The attack specifications can be summarized as:
1) The attack is non-targeted: the attack definition in
III-A shows that no restrictions apply on the choice of
yi in X. Moreover, the value of yi remains unchanged
after poisoning takes place in X (cid:48).
2) The attack does not affect packets delay: the attack
only targets the training phase, whereas the inference
phase is executed in the usual manner. Hence, the attack
is stealthy in the sense that it does not affect the packet
delay when the deep classifier is deployed on the cloud.
3) The attack samples without replacement: to guarantee
faster and stealthier execution, X is sampled every
poisoning round without replacement; that is an instance
can only be included once in X at a certain poisoning
round, however an instance can be included in multiple
poisoning rounds. This implies that the network will be
exposed to a different training set after every poisoning
round, which results in a higher training instability.
4) The attack is incremental for increased effectiveness:
the poisoned instances in X (cid:48) accumulate in the train-
ing set after each poisoning round and throughout the
training phase, which in turn intensifies the effect of
poisoning even at a low value of α.
5) The attack is gradient-free [13] and is gray box:
the attack is gray box since we assume that the attacker
only has access to the intermediate data structures of the
training process without the need to access the physical
path of the training instances or the neural network
architecture. In other words, the attack is agnostic to the
neural network architecture. The attack is also gradient-
free since it perturbs the training data between epochs
without the need to access the gradients of the attacked
neural network.
6) The attack targets intermediate data structures: typ-
ically developers' efforts are more focused on preparing
and preprocessing the training set before training. On
the other hand, what happens during training and the
values of the intermediate data structures that keep the
training instances are overlooked, especially that
the
training is usually conducted on powerful servers with
limited physical access. Hence, this attack which poisons
the data implicitly between training epochs, acquires its
high risk property from attacking data structures that are
typically not monitored by professionals, and hence the
attack goes unnoticed despite the damage it causes.
D. Evaluation Metrics
In each experiment, the neural networks will be evaluated
and compared in terms of the following evaluation measures:
1) Attack effectiveness measures: an attack is called effec-
tive if it achieves its intended goals. In our proposed
attack, the goal is to expose the deep classifier to an
unstable training process, which in turn, will result in
faulty probability distributions produced by the network
at the inference stage.
a) Average of Loss Change (ALC): the loss function
is typically expected to decrease as the training
process progresses. This is due to backpropagation,
which reflects what the network learned during
each training epoch. The ALC measures the av-
erage change in the loss value over the training
epochs, and the sign of this evaluation metric is
a leading element, as it reflects whether the loss
was decreasing or increasing throughout training.
Executing the attack is expected to cause instability
in the training process due to the noisy poisoned
increase the ALC value. The
data and, hence,
ALC can be defined as follows, where the (cid:96) is the
loss and Epochs is the number of training epochs:
ALC =
(cid:80)Epochs
i=1
((cid:96)i − (cid:96)i−1)
Epochs − 1
(3)
b) Average Inference Probability (AIP): the softmax
function is typically used in the last layer of deep
classifiers to normalize the output to a probability
distribution over the possible output classes. Each
test instance is classified as the class of the highest
probability. In this evaluation criterion, we assess
the effect of the attack on the probabilities pro-
duced by the model at the inference stage, as typ-
ically higher probabilities imply more confidence
about the selected class. As a result, a decreased
average probability reflects the effectiveness of the
attack on the final output of the model. AIP can
be calculated using Equation 4, where ti is a test
instance.
AIP = Average(argmax(P (Y | ti)))
(4)
2) Attack stealthiness measures: an attack is called stealthy
if the evaluation metrics of the corrupted classifier F (cid:48)
are close to the metrics of the base model F [4].
a) Training Time Difference (T T D): training a neural
network can be a lengthy process, especially when
the training instances are large. Hence, it is crucial
to ensure that executing the attack will not cause
an observable added amount of time to the training
phase, in order to keep the attack unnoticed. The
T T D measure can be defined as follows:
T T D = T rainingT ime(cid:48) − T rainingT imebase
(5)
where T rainingT imebase is the time taken to
train the base model, and T rainingT ime(cid:48) is the
training time when the neural network is trained
with poisoned data.
b) Performance Degradation Measure (PDM): in or-
der to confirm the attack stealthiness, the metrics
of the poisoned classifier need to be reasonably
close to the metrics of the base classifier. In this
evaluation criterion,
the difference between the
macro Fscore of the base model and each poisoned
model is calculated, as described in Equation 6,
where F score(cid:48) is the Fscore of a poisoned model.
P DM = F scorebase − F score(cid:48)
(6)
E. Datasets
The proposed attack perturbs images and hence can target
any computer vision application. Nevertheless, we opted to
apply it to an iris recognition dataset, due to the significance
of this domain. The CASIA Iris Subject Ageing dataset [14]
was considered in our experiments. This dataset was collected
by the National Laboratory of Pattern Recognition (NLPR) in
China in April 2009 and April 2013. In this work, the subset
of CASIA Iris Subject Ageing which was collected in 2009
using the H100 sensor was chosen due to its high diversity
and good size. The subset comprises 37912 instances of the
left and right eyes of 48 individuals. The dataset instances
pose some challenging scenarios, like glasses, partially closed
eyes, Moreover, some instances have very low brightness. The
cross-validation method was used to train and evaluate the
neural networks, and 100 images from each user subject were
randomly selected for the test dataset.
F. Technical and Experimental Setup
Three state-of-the-art deep classifiers, namely, Densenet,
VGG, and Xception were considered for this work. Moreover,
the number of epochs was set to 10, the cross entropy loss
function was used and the networks were trained with a
learning rate of .01 on the Google Colab Pro platform which
utilizes NVIDIA GPUs. It is worth mentioning that the code
of this work is available on Github [15].
Each of the 3 considered deep classifiers were experimented
with α values of 5%, 10%,15%, and 20%, as 20% is typically
the maximum poisoning percentage considered in the literature
[16]. In the experiments description and results, the local
perturbations poisoning strategy will be referred to as P , and
the global perturbations strategy will be referred to as R.
IV. RESULTS AND DISCUSSION
In this section, the results of evaluating the proposed attack
will be presented in detail. Figures 1, 2, and 3 depict the results
of the evaluation metrics described in III-D. In all figures, the
result of the base model is depicted as the origin point (α =
0%).
A. Analysis of Attack Effectiveness
Figure 1 depicts the ALC results for the 3 considered deep
classifiers. A positive ALC value indicates increasing loss
values and poor training, whereas a low negative value indi-
cates a more stable training process. From Figure 1, it can be
noted that increasing α was always associated with increased
ALC values, hence, it can be concluded that increasing the
poisoning percentage increases the effectiveness of the attack.
Fig. 1. Experimental results of the Average of Loss Change (ALC) values
Fig. 2. Experimental results of the Average Inference Probability (AIP) values
Fig. 3. Experimental results of the Performance Degradation Measure (PDM) values
On a different note, increasing the attack frequency (i.e., a
lower β) resulted in increased effectiveness in all experiments.
In the experiments where β's value was set to 1, the ALC
kept increasing as the value of α increased, and the value
was positive in all experiments where α ≥ 10%. On the other
hand, when β = Epochs, the ALC results were increasing but
negative in all experiments, which means that the loss values
were still decreasing but at a lower rate compared to the base
model and the experiments of higher frequency.
The AIP results are depicted in Figure 2, where it can
be seen that increasing the value of α resulted in decreasing
the AIP in all experiments. However, this decrease varied in
the experiments; for example, the decrease was slight, even
when α increased, in the experiments where β=Epochs. On
the other hand, increasing α with a higher frequency (β = 1)
resulted in a more noticeable drop in the AIP values. For
example, it can be seen in Figure 2(c) that the AIP value
dropped by 24.88% when α = 20% and β = 1 in the
random poisoning experiment, R. Whereas, the AIP value
only dropped by 5% when we only changed the value of
β to be equal to the number of Epochs. Furthermore, the
highest drop in the AIP in the poisoned networks compared
to their unpoisoned counterparts at inference time was 15.37%,
14.68%, and 24.88% for the Densenet, VGG, and Xception,
respectively. Overall, we can conclude that the attack was
effective in all conducted experiments. Moreover, the attack
effectiveness has a positive correlation with the percentage α
and frequency β.
B. Analysis of Attack Stealthiness
It is crucial to keep the proposed attack undetected. The
attack can be easily noticed if it takes long to execute, thus, to
ensure the attack stealthiness, the T T D measure is monitored
0%5%10%15%20%The poisoning percentage coefficient ()0.30.20.10.00.10.2ALC(a) The ALC values for DenseNetB=1,PB=Epochs,PB=1,RB=Epochs,R0%5%10%15%20%The poisoning percentage coefficient ()0.30.20.10.00.10.2ALC(b) The ALC values for VGGB=1,PB=Epochs,PB=1,RB=Epochs,R0%5%10%15%20%The poisoning percentage coefficient ()0.30.20.10.00.10.2ALC(c) The ALC values for XceptionB=1,PB=Epochs,PB=1,RB=Epochs,R0%5%10%15%20%The poisoning percentage coefficient ()65707580859095100AIP (%)(a) The AIP values for DenseNetB=1,PB=Epochs,PB=1,RB=Epochs,R0%5%10%15%20%The poisoning percentage coefficient ()65707580859095100AIP (%)(b) The AIP values for VGGB=1,PB=Epochs,PB=1,RB=Epochs,R0%5%10%15%20%The poisoning percentage coefficient ()65707580859095100AIP (%)(c) The AIP values for XceptionB=1,PB=Epochs,PB=1,RB=Epochs,R0%5%10%15%20%The poisoning percentage coefficient ()0246810PDM (%)(a) The PDM values for DenseNetB=1,PB=Epochs,PB=1,RB=Epochs,R0%5%10%15%20%The poisoning percentage coefficient ()0246810PDM (%)(b) The PDM values for VGGB=1,PB=Epochs,PB=1,RB=Epochs,R0%5%10%15%20%The poisoning percentage coefficient ()0246810PDM (%)(c) The PDM values for XceptionB=1,PB=Epochs,PB=1,RB=Epochs,Rin all experiments. Among all conducted experiments, the
maximum T T D value was 63 seconds. Hence, the attack did
not add a noticeable period of time to the training time of
the base model. Moreover, to monitor the stealthiness of the
attack, the P DM values were recorded as can be seen in
Figure 3. The maximum P DM value was recorded for the
VGG network with α = 20% and β = 1 in the random
poisoning experiment, R. Overall, the average P DM values
were 1.2%, 1.9%, and 1.5% for the Densenet, VGG, and
Xception, respectively. Hence, it can be concluded that the
attack demonstrated a stealthy behavior.
C. Analysis of Poisoning Strategy
As explained in Section III-B, the attack was experimented
under local perturbations setting (P ) and global perturbations
setting (R). The influence of the perturbation type was highly
associated with the value of β. It can be seen in Figures 1, 2
and 3 that in the experiments of low frequency, where β =
Epochs, both perturbation types achieved comparable results.
On the other hand, when the poisoning rounds were executed
after every epoch, where β=1, the attack showed the highest
effectiveness in the global perturbations setting, P .
Finally,
the results showed that
the proposed attack is
effective and stealthy. Those properties increase when the
attack is intensified by increasing the value of α, increas-
ing the number of affected pixels, similar to the case of
global perturbations, and decreasing β for higher execution
frequency. Moreover, the proposed attack inherits its riskiness
from attacking unobserved data structures that usually reside
on powerful servers with limited physical access. The attack
is also incremental and accumulates poisoned data gradually
to intensify its effectiveness across the training epochs. In
addition, the attack requires no knowledge about the neural
network structure, as all experiments in this work were con-
ducted using the same injection code.
V. CONCLUSION AND FUTURE WORK
Neural networks are vulnerable to adversarial attacks. More-
over, the digital transformation adopted worldwide implies
continuous acquisition and analytics of big streams of data,
which has brought novel digital threats and unforeseen ex-
posures to cybersecurity. In this work, we propose a novel
gradient-free, gray box, incremental attack that targets the
intermediate data structures of the training phase of neural
networks. The attack has 3 main parameters: the attack per-
centage coefficient, the attack frequency coefficient, and the
poisoning strategy. In all conducted experiments, it was noted
that the attack stealthiness and effectiveness had a positive
correlation with the aforementioned parameters.
Moreover, the attack resulted in unstable training, as it made
the loss values increase which in turn indicates poor learning
and generalization. Moreover, the attack was able to decrease
the probability of the output class (AIP ) in the poisoned net-
works compared to their unpoisoned counterparts at inference
time by 15.37%, 14.68%, and 24.88% for the Densenet, VGG,
and Xception, respectively. Despite its effectiveness, the attack
remained stealthy as it only dropped the Fscore values by
1.2%, 1.9%, and 1.5% for the poisoned Densenet, VGG, and
Xception, respectively.
In future works, further sensitivity analyses will be con-
ducted on existing and new parameters, such as the type of
communication protocol, and the area and size of the patch
the attack will be compared to other iris
area. Moreover,
recognition attacks.
ACKNOWLEDGEMENTS
This research was supported by the Technology Innovation
Institute (TII), Abu Dhabi, UAE, under the CyberAI project
(grant number: TII/DSRC/2022/3036).
REFERENCES
[1] J. Machin, E. Batista, A. Ballest ́e, and A. Solanas, "Privacy and security
in cognitive cities: A systematic review," Applied Sciences, vol. 11, p.
4471, 05 2021.
[2] A. Morales, J. Fierrez, J. Galbally, and M. Gomez-Barrero, "Introduc-
tion to iris presentation attack detection," in Handbook of Biometric
Anti-Spoofing, 2nd Ed., 2019.
[3] J. Su, D. V. Vargas, and K. Sakurai, "One pixel attack for fooling
deep neural networks," IEEE Transactions on Evolutionary Computation,
vol. 23, no. 5, pp. 828–841, 2019.
[4] J. Breier, X. Hou, M. Ochoa, and J. Solano, "Foobar: Fault fooling
backdoor attack on neural network training," IEEE Transactions on
Dependable and Secure Computing, pp. 1–1, 2022.
[5] X. Li and S. Ji, "Generative dynamic patch attack," 2021.
[6] P. Zhao, S. Wang, C. Gongye, Y. Wang, Y. Fei, and X. Lin, "Fault sneak-
ing attack: a stealthy framework for misleading deep neural networks,"
2019 56th ACM/IEEE Design Automation Conference (DAC), pp. 1–6,
2019.
[7] S. Hong, P. Frigo, Y. Kaya, C. Giuffrida, and T. Dumitras ̧, "Terminal
brain damage: Exposing the graceless degradation in deep neural net-
works under hardware fault attacks," in Proceedings of the 28th USENIX
Conference on Security Symposium, ser. SEC'19.
USA: USENIX
Association, 2019, p. 497–514.
[8] V. W. Anelli, A. Bellog ́ın, Y. Deldjoo, T. Di Noia, and F. A.
Merra, "Msap: Multi-step adversarial perturbations on recommender sys-
tems embeddings," The International FLAIRS Conference Proceedings,
vol. 34, April 2021.
[9] R. Sharma and A. Ross, "Image-level iris morph attack," in 2021 IEEE
International Conference on Image Processing (ICIP), 2021, pp. 3013–
3017.
[10] A. Thukral, Jyoti, and M. Kumar, "Iris spoofing through print attack us-
ing svm classification with gabor and hog features," in 2022 International
Conference for Advancement in Technology (ICONAT), 2022, pp. 1–6.
[11] J. E. Tapia, S. Gonzalez, and C. Busch, "Iris liveness detection using
a cascade of dedicated deep learning networks," IEEE Transactions on
Information Forensics and Security, vol. 17, pp. 42–52, 2022.
[12] C. Yang, A. Kortylewski, C. Xie, Y. Cao, and A. Yuille, "Patchat-
tack: A black-box texture-based attack with reinforcement learning," in
Computer Vision – ECCV 2020, A. Vedaldi, H. Bischof, T. Brox, and
J.-M. Frahm, Eds. Cham: Springer International Publishing, 2020, pp.
681–698.
[13] M. Alzantot, Y. Sharma, S. Chakraborty, H. Zhang, C.-J. Hsieh, and
M. Srivastava, "Genattack: Practical black-box attacks with gradient-
free optimization," 2018.
[14] National Laboratory of Pattern Recognition (NLPR) - Institute of Au-
tomation, Chinese Academy of Sciences (CASIA), "CASIA Iris Subject
Ageing," http://biometrics.idealtest.org/, Accessed in October 4th 2022.
Training
https://github.com/Artifitialleap-
Data
MBZUAI/IncrementalTrainingDataPoisoning, October 2022.
[15] Artifitialleap-MBZUAI,
"Incremental
Attack,"
[16] M. Jagielski, A. Oprea, B. Biggio, C. Liu, C. Nita-Rotaru, and B. Li,
"Manipulating machine learning: Poisoning attacks and countermeasures
for regression learning," 2018 IEEE Symposium on Security and Privacy
(SP), pp. 19–35, 2018.
|
|
http://arxiv.org/abs/2302.12205v1 | 2023-02-20T09:38:12 | 2023-02-20T09:38:12 | Harris Hawks Feature Selection in Distributed Machine Learning for
Secure IoT Environments | The development of the Internet of Things (IoT) has dramatically expanded our
daily lives, playing a pivotal role in the enablement of smart cities,
healthcare, and buildings. Emerging technologies, such as IoT, seek to improve
the quality of service in cognitive cities. Although IoT applications are
helpful in smart building applications, they present a real risk as the large
number of interconnected devices in those buildings, using heterogeneous
networks, increases the number of potential IoT attacks. IoT applications can
collect and transfer sensitive data. Therefore, it is necessary to develop new
methods to detect hacked IoT devices. This paper proposes a Feature Selection
(FS) model based on Harris Hawks Optimization (HHO) and Random Weight Network
(RWN) to detect IoT botnet attacks launched from compromised IoT devices.
Distributed Machine Learning (DML) aims to train models locally on edge devices
without sharing data to a central server. Therefore, we apply the proposed
approach using centralized and distributed ML models. Both learning models are
evaluated under two benchmark datasets for IoT botnet attacks and compared with
other well-known classification techniques using different evaluation
indicators. The experimental results show an improvement in terms of accuracy,
precision, recall, and F-measure in most cases. The proposed method achieves an
average F-measure up to 99.9\%. The results show that the DML model achieves
competitive performance against centralized ML while maintaining the data
locally. | [
"Neveen Hijazi",
"Moayad Aloqaily",
"Bassem Ouni",
"Fakhri Karray",
"Merouane Debbah"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12205v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12205v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.CR",
"eess.SP"
] | Harris Hawks Feature Selection in Distributed
Machine Learning for Secure IoT Environments
Neveen Hijazi1, Moayad Aloqaily1, Bassem Ouni2, Fakhri Karray1, Merouane Debbah2
1Mohamed Bin Zayed University of Artificial Intelligence (MBZUAI), UAE
2Technology Innovation Institute (TII), Abu Dhabi, UAE
E-mails: 1{neveen.hijazi; moayad.aloqaily; fakhri.karray}@mbzuai.ac.ae
2{bassem.ouni; merouane.debbah}@tii.ae
3
2
0
2
b
e
F
0
2
]
G
L
.
s
c
[
1
v
5
0
2
2
1
.
2
0
3
2
:
v
i
X
r
a
Abstract-The development of the Internet of Things (IoT)
has dramatically expanded our daily lives, playing a pivotal
role in the enablement of smart cities, healthcare, and buildings.
Emerging technologies, such as IoT, seek to improve the quality of
service in cognitive cities. Although IoT applications are helpful
in smart building applications, they present a real risk as the
large number of interconnected devices in those buildings, using
heterogeneous networks, increases the number of potential IoT
attacks. IoT applications can collect and transfer sensitive data.
Therefore,
it is necessary to develop new methods to detect
hacked IoT devices. This paper proposes a Feature Selection (FS)
model based on Harris Hawks Optimization (HHO) and Random
Weight Network (RWN) to detect IoT botnet attacks launched
from compromised IoT devices. Distributed Machine Learning
(DML) aims to train models locally on edge devices without
sharing data to a central server. Therefore, we apply the proposed
approach using centralized and distributed ML models. Both
learning models are evaluated under two benchmark datasets
for IoT botnet attacks and compared with other well-known
classification techniques using different evaluation indicators. The
experimental results show an improvement in terms of accuracy,
precision, recall, and F-measure in most cases. The proposed
method achieves an average F-measure up to 99.9%. The results
show that the DML model achieves competitive performance
against centralized ML while maintaining the data locally.
Index Terms-IoT, Harris Hawks Optimization, Cognitive
Cities, Smart Buildings, Distributed Machine Learning.
I. INTRODUCTION
Internet of Things (IoT) is one of the most significant
revolutions of the 21st century and can be simply described
as a set of connected smart edge devices. These devices can
be found in many applications we encounter across our daily
lives including healthcare, smart cities, transportation systems,
and smart grids [1]. IoT environments typically consist of
collections of distributed heterogeneous devices with low
computational memory, and they have the ability to expand
with other interconnected networks, which results in many
security concerns [2]. The enormous increase in IoT devices
and their lack of security guarantees has motivated attackers to
launch attacks by setting up large-scale IoT botnet attacks. A
botnet is a network of devices connected to IoT devices that
are infected by malware. In addition, compromised devices
have a simple infection process, which makes every vulnerable
device a bot candidate. Some of the most popular examples
of IoT botnet attacks are Mirai, BASHLITE, and Phishing
[3]. Consequently, this highlights the importance of increasing
security measures to identify the most critical cyberattacks in
a smart IoT environment.
Intrusion Detection Systems (IDSs) are security systems
that detect attacks and malicious activities in networks, such
as botnet attacks. ML techniques can play an essential role
in IDS structures to classify and predict attacks. Different
ML techniques are used to detect anomalies and attacks in
cybersecurity, such as K-Nearest Neighbor (KNN), Support
Vector Machines (SVM), and Decision Trees (DT) [4], [5].
However, IoT devices continuously produce vast amounts of
data that is challenging to deal with using traditional ML
techniques and requires complex models to process such as
deep learning technique [1]. Therefore, there is a need for
more efficient searching and learning algorithms, which has
led to the emergence of metaheuristic algorithms.
Metaheuristics algorithms are a well-regarded choice to
solve high-dimensional problem through the utilization of
the feature selection technique [6]. The objective of this
technique is to generate a highly accurate general model while
minimizing the number of selected features in order to reduce
computational time. Therefore, various works have utilized
metaheuristic algorithms in feature selection methods such as
Genetic Algorithm (GA), Particle Swarm Optimization (PSO),
and Harris Hawks Optimization (HHO) [5], [7].
Distributed ML is a valuable approach, it aims to train one
or more ML models for a network of users, each having a
local dataset. Thus, distributed ML reduces data transmissions
within centralized ML and minimizes the risks of privacy
leaks. In addition, it can reduce the risk of a single point of
failure compared to centralized ML [8]. Distributed ML can
be applied in various applications such as healthcare [9] and
wireless network [2]. In this study, we propose a hybrid model
based on the HHO and Random Weight Network (RWN) al-
gorithms to detect botnet attacks launched from compromised
IoT devices. The proposed approach performs wrapper FS
based on two main stages: centralized and distributed ML.
Wrapper FS consists of three repeated steps including search
algorithm, learning algorithm, and an evaluation measure. In
our work, we used HHO as a search algorithm to select the
near-optimal feature subset of the input features and optimized
the RWN structure simultaneously to increase the prediction
power. Then, RWN is applied as a learning algorithm to fit
the training dataset according to the selected solution. Finally,
evaluation measures are applied to assess the quality of the
selected solution. The proposed approach is compared with
other metaheuristics approaches [10].
The contributions of this work can be summarized as
1) We propose an intrusion detection system based on HHO
with RWN.
2) We apply RWN as the base classifier in wrapper FS,
unlike most of the literature that uses KNN.
3) We utilize the HHO algorithm to achieve two different
objectives simultaneously, including, near-optimal sub-
set of features and number of hidden neurons in RWN.
4) We leverage distributed ML to maintain data privacy
and apply the proposed approach using a distributed ML
scheme.
The rest of the paper is organized as follows. Section II
presents the background and related works of Harris Hawks
Optimization, Random Weight Network algorithms, and De-
centralized machine learning. The methodology and proposed
approach are described in detail in Section III. The conducted
experiments and the obtained results are discussed in Section
IV. Finally, we conclude our work and provide suggestions
for future directions in Section V.
II. BACKGROUND AND RELATED WORK
A. Harris Hawks Optimization (HHO)
HHO is a meta-heuristic optimization algorithm developed
by A. Heidari et al. [11]. The HHO algorithm was inspired
by the behavior of Harris Hawks. Precisely, HHO uses a
multi-agent system where each agent represents a solution and
collaborates with other agents to search for the global optimal
solution. The algorithm starts with a set of initial solutions,
and then updates the solutions by exchanging information and
searching in a new direction. The algorithm terminates when a
stopping criterion is met, such as reaching a maximum number
of iterations or finding a solution that meets a certain fitness
threshold. HHO uses a combination of global and local search
techniques to balance the exploration and exploitation of a
search space in order to find the global optimum solution. In
the exploration phase, candidate solutions are randomly gen-
erated and evaluated for potential optimization. The selection
of the solution generation strategy is based on a probabil-
ity of either considering the location of already discovered
solutions or relying on randomly determined positions. The
exploitation phase of the HHO algorithm is a key component
that influences the optimization performance. In this phase,
the algorithm uses the surprise pounce strategy to search for
optimal solutions in the problem space. The algorithm follows
four different chasing strategies: Soft Besiege, Hard Besiege,
Soft Besiege with progressive rapid dives, and Hard Besiege
with advanced fast dives. The choice of strategy is based on
the energy of the prey, where the prey energy loses its energy
while escaping the hawk. Thus, the hawks alternate between
different exploitative behaviors based on the prey's energy
during running.
HHO is applied in different and broad applications in the
literature. For instance, O. Alzubi et al. [4] proposed an SVM
combined with HHO for Android malware detection. Their
research relied on two targets, the first goal was to determine
the best hyperparameters for the SVM, and the second was
to determine the weights of the features to determine the
most important ones, thus improving the detection process
by using the HHO algorithm. Their approach was compared
against existing techniques using four different datasets. The
results showed superior performance over other metaheuris-
tic algorithms and state-of-art classifiers. Another work also
mentioned the importance of HHO [12]. In this study, S.
Sokkalingam et al. proposed three hybrid ML approaches with
feature selection methods for IDS: SVM-PSO, SVM-HHO-
PSO, and SVM-HHO. The performance of these methods was
evaluated using the NSL-KDD dataset and compared with
various classifiers. The experimental outcomes indicated that
SVM-HHO-PSO achieved the best results compared to other
methods.
B. Random Weight Networks (RWN)
RWN is a computational neural network model developed
by Schmidt et al. [13] to handle the training process of a
Single Hidden Layer Feedforward Neural Network (SLFN),
where a node can be a subnet that consist of extra hidden node.
RWN has overcome the problems of back-propagation, such
as slow convergence and high probability of being trapped in
a local minimum. In RWN, the input weights and the hidden
biases are initialized randomly; then, the output weights are
analytically computed using the Moore–Penrose generalized
inverse method. Compared to other gradient descent methods
used in SLFN, the RWN learning rate is speedy and has
better generalization performance. Moreover, RWN does not
need human intervention to set the parameters manually such
as learning rate, number of epochs, etc. RWN has only one
parameter that needs to be initialized, which is the number of
hidden neurons.
RWN is a powerful learning algorithm, which is used in a
wide range of applications. For example, H. Faris et al. [5]
proposed a hybrid email spam detection system based on GA
and RWN. The proposed approach performs a wrapper FS
method using an RWN classifier. The GA is used to select
the optimal features and determine the number of neurons in
the hidden layer of the RWN. Their approach detected spam
emails and achieved excellent results in terms of accuracy,
recall, and precision. Another hybrid method proposed by E.
Rawashdeh et al. in [14]. In this study, the authors depended
on RWN and PSO. The aim of the work was to optimize the
structure of the RWN and to find the best subset of features.
PSO was used to find the best subset of features, as well as the
number of hidden neurons in RWN. The proposed approach
was evaluated on thirty datasets, compared with other state-of-
the-art methods, and showed superior results in most datasets.
C. Distributed Machine Learning (DML)
In this approach of learning, a generic model is distributed
by the server to all clients or devices. The devices then
customize the model through local training and testing with
their own data, enabling predictions and insights from live data
generated by the device. This approach keeps the data local,
reducing security and privacy concerns, but the downside is
that IoT devices are not well-suited for intensive computation
[2].
Distributed ML has gained more attention in recent years.
For instance, F. Zerka et al. [9] applied several ML algorithms
using a distributed framework to preserve medical data pri-
vacy. Their approach was compared with the centralized ML
approach using four small medical datasets. The results show
the distributed approach delivers similar performance
that
to the centralized approach, while preserving privacy of the
patient data. A. Tuladhar et al. [15] investigated a distributed
ML model by ensemble using three classifiers: ANNs, SVM,
and Random Forests (RF). Their approach was evaluated on
four medical datasets. They found improvement in results
when increasing the number of locally trained models in the
ensemble. The authors suggested using the proposed approach
on small datasets.
According to the No Free Lunch theorem (NLF) [16], there
is no single optimization algorithm that outperforms the others
in all optimization problems. Therefore, this field of research
offers opportunities for improvement and the development of
new techniques that can tackle a wider range of problems and
applications. This will ultimately lead to more competitive
and improved results when compared to current algorithms.
Overall, it can be understood from the literature that applying
evolutionary algorithms with RWN is gaining more attention
from researchers. HHO is a recent optimization algorithm that
has been applied in different applications and has achieved
promising results compared to other metaheuristic techniques.
it provides good exploration and exploitation.
Moreover,
Therefore, it would be wise to use these properties with a
robust learning algorithm, such as RWN. In conclusion, the
proposed approach differs from previous studies by proposing
a wrapper FS based on HHO and RWN algorithms to solve
the IoT botnet detection problem, and applying the proposed
approach within distributed ML that addresses IoT security
and privacy issues.
III. METHODOLOGY
The proposed work is conducted based on a two-stage:
centralized and distributed ML models. We apply the FS
method, model construction, evaluation, and assessment in
each stage. The main contribution lies in FS and the phases
of model construction, where a new model based on HHO
and RWN is proposed. This section presents the details of
the proposed approach, which is based on using HHO for FS
while simultaneously optimizing the RWN structure.
A. Data Preprocessing
Two benchmark datasets were used for this work: N-BaIoT
dataset [17] and Phishing legitimate dataset [18]. The N-BaIoT
dataset is obtained from the University of California at Irvine
(UCI) machine learning repository. This dataset represents a
real IoT network consisting of nine devices: a baby monitor,
Fig. 1. An overview of the proposed approach.
two doorbells, four security cameras, a thermostat, and a web-
cam. The second dataset was collected from Kaggle datasets.
The dataset comprises 48 features extracted from 10,000 web
pages, with 5000 being phishing pages and the other 5000
being legitimate ones [18]. Using the preliminary dataset
without any preprocessing may impact the overall performance
of the obtained model. Because we deal with massive and real
datasets, they may contain inconsistent and redundant data. In
order to get the best possible results, we apply data integration
and data normalization. In the integration step, we integrated
the data for the N-BaIoT dataset according to each device
type. For example, the four different types of security cameras
are merged into one file. All the devices in the N-BaIoT
dataset have 115 features and 7,062,606 instances. These
devices typically connect
to IoT networks through Wi-Fi.
For each device, data were collected during normal operation
and various attacks conducted by the BASHLITE and Mirai
botnet. The total number of attacks carried out by BASHLITE
and Mirai were 555,932 and 2,838,272 respectively. The
integration step's benefit is reducing the number of generated
models [17]. For the normalization step, we apply the Min-
Max normalization method to both datasets to make all the
input values within a consistent scale [0,1].
B. Wrapper Feature Selection based on HHO-RWN
In this work, we apply an FS method on the training dataset
to eliminate irrelevant features, reduce data dimensionality,
and increase prediction performance. Two well-known meth-
ods in feature selection are filter-based and wrapper-based
approaches. In our work, we used a wrapper-based approach.
Wrapper FS consists of three main components: the search
algorithm, learning algorithm, and evaluation of the features.
Wrappers are more potent than filters when accuracy is more
MaliciousBenignDatasetsTraining setTesting set34%66%Training set with selected features and number of hidden nodesRWNTesting set with selected features and number of hidden nodesFinal evaluation based on testing setEndHHORWNFitnessSelected featuresPre-processingimportant than speed. This is because they explore the relevant
subset of features in the search space of a particular classifier,
where most studies use the same classifier used in the learning
process [5]. On the other hand, the drawback of the wrappers
is that they require a high computational time. Most studies
use fast classifiers such as KNN as a primary classifier [5].
In our proposed approach, we utilize RWN as the base
classifier;
in addition to the fast-learning property, RWN
has good generalization performance. Our wrapper-based ap-
proach selects HHO to search for the relevant feature subsets.
In order to apply a metaheuristic optimization algorithm for
a given task, two crucial design issues have to be addressed:
the solution representation and the fitness function used to
evaluate the solution, which are discussed below:
As mentioned earlier, the proposed approach was applied in
two stages: centralized and distributed ML. In the centralized
ML model, we trained the proposed approach and other
traditional ML techniques by using the entire training dataset.
Then we use the centralized ML model as a reference to
compare the performance of each corresponding distributed
ML model in each dataset. In contrast, the distributed ML
models, representing various IoT devices, were trained on local
datasets. We split the training datasets by sampling without
replacement method to ensure the diversity (i.e. different parts
of the training datasets) for each user. So, each user has
local data and applies the proposed approach and other ML
techniques, thus distributed ML contributes to preserve the
data privacy.
1) Solution Representation: A hawk in HHO represents a
candidate solution for the targeted problem. A solution
in our work consists of two parts. The first part is a set
of binary bits 1 or 0, which indicate if the corresponding
features are selected or not. The second part of the
candidate solution consists of a group of binary bits that
determine the number of hidden nodes in RWN. The
length of the solution is L + M, where L is the number
of features in the dataset, and M is the number of bits
reserved to represent the maximum number of hidden
neurons.
2) Fitness Function: A fitness function is needed to assess
the quality of the solutions. In this work, we use a fitness
function that addresses three objectives: increasing the
classification accuracy, reducing the dimensionality of
the dataset by selecting the relevant features, and de-
creasing the complexity of the RWN in terms of the
number of hidden nodes. This fitness function is defined
in Eq. 1.
F itness = αErr + β
f
F
+ γ
n
N
(1)
The parameters α, β, and γ are three factors within the
range [0–1] that control the weight of each of the classifi-
cation rate, number of selected features, and hidden neurons,
respectively. Err represents the classification error rate of the
RWN classifier, f denotes the number of selected features,
F is the total number of original features in the dataset, n
is the number of neurons determined by the evaluated HHO
solution, and N is the maximum number of possible neurons
in the RWN. The maximum number of neurons is set to
1024, which is represented by ten elements in the solution.
Usually, the error rate is measured as (Err = 1−Acc), where
Acc represents the classification accuracy. To consider the
imbalanced datasets, we use the F-measure instead of accuracy
in the error rate measure. Thus, the error rate in our case
becomes (Err = 1 − F measure). After we obtained the
selected features from the FS process, we must remove the
irrelevant features and keep only the selected features from
the training and testing data which will highly improve the
performance measure. The proposed approach is illustrated in
Fig.1. The code is available in the GitHub [19].
IV. RESULTS AND DISCUSSION
This section presents a performance evaluation of the pro-
posed approach through experiments on the datasets. All the
experiments were performed using a PC with Intel Core (TM)
i7-165G7 2.8 GHz and 16 GB RAM. The proposed approach
was implemented and tested in Python 3.9.12. Initially, the
datasets are divided into (66% and 34%) for training and
testing, respectively. The training dataset is further distributed
into (75% and 25%) for training and validation, respectively.
Since Evolutionary Algorithms (EAs) are based on random-
ness, experiments must be repeated several times to reduce the
random effect in EAs performance. Therefore, the proposed
approach was tested under 30 independent runs, while the
number of iterations was 100 and the population size was
200. Commonly, the population size should be large enough
to guarantee the diversity of the solutions [20]. Most recent
references have set the value of the population size to 200 or
less [7], [10]. Therefore, we used the maximum population
size value of many studies. Also, many previous works have
set the values of α, β, and γ, fitness function parameters
to 0.99, 0.01, and 0.01, respectively [5], [7]. Therefore, this
paper uses the same values of these parameters in the fitness
function. In addition, we compare the performance with other
known classifiers commonly used in the literature, including
KNN, SVM, Adaboost, and DT. This experiment aims to show
the motivation for using RWN as a primary classifier within
the FS method and as a final classifier. Because the datasets
are imbalanced, considering the accuracy ratio for evaluation
is misleading. Therefore, we should examine other metrics
such as recall, precision, and F-measure. For all results, the
best results were indicated by a bold typeface. The results of
accuracy, recall, precision, and F-measure values of the cen-
tralized and distributed ML models are shown in Tables I and
II, respectively. According to the HHO-RWN results in Table
I, we can see that all average accuracy values are enhanced
compared to SVM and Adaboost classifiers. The accuracy rate
has improved up to 2.6% compared to HHO-SVM in Security
camera device. Regarding the average precision results, we
can observe that all values in HHO-RWN are higher than
other classifiers. The precision enhancement rate reached 6.6%
in Phishing legitimate dataset. As for the average F-measure,
Fig. 2. The convergence curves for centralized ML models during training
iterations.
Fig. 3. The convergence curves for distributed ML models during training
iterations.
HHO-RWN outperforms the other classifiers with 4 out of
5 devices in the N-BaIoT dataset. It also achieved the best
average F-measure result in Phishing legitimate dataset. The
maximum result accomplished by HHO-RWN with 99.9%.
The F-measure rate has improved by 8.0% compared to HHO-
SVM in Webcam device. Table II illustrates the results for
the distributed ML model. We can observe that HHO-RWN
and HHO-DT obtained the highest F-measure with 99.9% in
the Webcam dataset, and HHO-Adaboost achieved the second
highest with 99.5%. The F-measure rate has improved up to
9.3%. The precision rate has enhanced up to 14.5% in Phishing
legitimate dataset. According to the average recall results,
the maximum result achieved by HHO-RWN with 99.0%,
and the improvement rate reached 24.0% in the Security
camera device. Additionally, we compare the performance of
centralized and distributed ML models. The average F-measure
of distributed ML yields the best results in the Security camera
device with 99.9%, and it shares the same results with the
centralized ML model in the Baby Monitor device with 99.8%
and in the Webcam device with 99.9%, and is very competitive
in the other cases. Overall, the results in the distributed ML
scheme showed promising performance. In the distributed ML
scheme, we trained the proposed approach on a portion of the
training dataset. While in the centralized scheme, the proposed
approach has been trained in the entire training dataset, leading
to higher generalization and better performance.
The convergence curves of the HHO-RWN in centralized
and distributed ML models with other classifiers are shown in
Figs. 2 and 3, respectively for all datasets, according to the
measurement of fitness. It can be seen that the different selec-
tion schemes show a similar convergence pattern. However, the
proposed approach is relatively preferable with regards to the
convergence rate. Noting that 100 iterations are used to moni-
tor convergence in all cases. It is reasonable to say that the best
feature subsets and the best number of hidden neurons that are
selected by the proposed approach enable it to obtain higher
values based on the four metrics measured on the testing
dataset. Table III shows the comparison of average accuracy,
recall, and precision values between HHO-RWN and other
metaheuristics. According to the collected results, HHO-RWN
achieved the highest average accuracy among all algorithms
for two devices. HHO-RWN recorded the best performance
with a 0.999% accuracy at the Baby monitor device. When
evaluating HHO-RWN ability to correctly identify anomalies,
the results were the best in two devices. Table III also reveals
that HHO-RWN achieved the best average precision values
among two devices.
Since privacy and security factors are essential in many
applications, distributed ML is a promising learning solution.
It enables the training of machine learning models locally,
so there is no need to transfer the data to a central cloud.
Thus, the reduction in heavy data transmissions will minimize
the number of potential attacks consequently decreasing the
risks of privacy leakage. Therefore, the choice of whether
to build a centralized or distributed model depends on the
target application and the nature of the data. We can say
that choosing the appropriate learning scheme depends on
the application's environment, priorities, and objectives while
considering factors of privacy, performance, and computational
resources.
V. CONCLUSION
Due to the dramatic increase in the number of IoT devices
deployed online and the security sensitives of these devices,
hackers and attackers exploit the increase of such devices to
deploy different types of attacks. Intrusion detection systems
are one of the techniques allocated to protecting the IoT
network. The main aim of the proposed approach is to detect
IoT botnet attacks by utilizing HHO to improve RWN and
at the same time, to perform FS based on centralized and
distributed ML models. Experimental results revealed that the
proposed model performs well in centralized and distributed
models to detect attacks on smart IoT devices. For future work,
we plan to integrate the proposed approach using Federated
Learning (FL) to improve security and privacy issues. In
addition, investigate the efficiency of the proposed approach
for other types of applications such as the healthcare system.
ACKNOWLEDGEMENTS
This research was supported by the Technology Innovation
Institute (TII), Abu Dhabi, UAE, under the CyberAI project
020406080100Iteration0.0020.0040.0060.0080.0100.0120.014FitnessBaby_MonitorHHO-AdaboostHHO-SVMHHO-DTHHO-kNNHHO-RWN020406080100Iteration0.0020.0030.0040.0050.0060.0070.0080.0090.010FitnessDoorbellHHO-AdaboostHHO-SVMHHO-DTHHO-kNNHHO-RWN020406080100Iteration0.0020.0040.0060.0080.0100.0120.0140.0160.018FitnessThermostatHHO-AdaboostHHO-SVMHHO-DTHHO-kNNHHO-RWN020406080100Iteration0.000.010.020.030.040.050.06FitnessSecurity_cameraHHO-AdaboostHHO-SVMHHO-DTHHO-kNNHHO-RWN020406080100Iteration0.0040.0060.0080.010FitnessWebcamHHO-AdaboostHHO-SVMHHO-DTHHO-kNNHHO-RWN020406080100Iteration0.030.040.050.060.070.080.090.10FitnessPhishing_legitimateHHO-AdaboostHHO-SVMHHO-DTHHO-kNNHHO-RWN020406080100Iteration0.0040.0060.0080.0100.0120.014FitnessBaby_MonitorHHO-AdaboostHHO-SVMHHO-DTHHO-kNNHHO-RWN020406080100Iteration0.0040.0060.0080.0100.012FitnessDoorbellHHO-AdaboostHHO-SVMHHO-DTHHO-kNNHHO-RWN020406080100Iteration0.0050.0100.0150.0200.025FitnessThermostatHHO-AdaboostHHO-SVMHHO-DTHHO-kNNHHO-RWN020406080100Iteration0.000.010.020.030.040.050.060.07FitnessSecurity_cameraHHO-AdaboostHHO-SVMHHO-DTHHO-kNNHHO-RWN020406080100Iteration0.0040.0060.0080.0100.012FitnessWebcamHHO-AdaboostHHO-SVMHHO-DTHHO-kNNHHO-RWN020406080100Iteration0.040.050.060.070.080.090.100.11FitnessPhishing_legitimateHHO-AdaboostHHO-SVMHHO-DTHHO-kNNHHO-RWNTABLE I
EVALUATION RESULTS OF PROPOSED APPROACH AND OTHER COMPARATIVE METHODS UNDER THE CENTRALIZED LEARNING SCHEME.
HHO-KNN
HHO-SVM
HHO-Adaboost
HHO-DT
HHO-RWN
Prec F-measure Acc Rec
Prec F-measure Acc Rec
Prec F-measure Acc Rec
Prec F-measure Acc Rec
Prec F-measure
Acc Rec
Datasets
0.996 0.989 0.993 0.994
Baby Monitor
0.999 0.989 0.987 0.993
Doorbell
0.999 0.958 0.978 0.992
Thermostat
0.998 0.991 0.985 0.970
Security camera
0.997 0.992 0.989 0.993
Webcam
Phishing legitimate 0.951 0.953 0.947 0.951
0.991 0.954 0.991 0.979
0.996 0.982 0.982 0.954
0.984 0.983 0.984 0.988
0.974 0.720 0.974 0.963
0.996 0.978 0.996 0.919
0.906 0.899 0.909 0.821
0.997 0.992 0.988 0.992
0.995 0.990 0.973 0.992
0.998 0.851 0.972 0.996
0.997 0.980 0.991 0.992
0.998 0.992 0.982 0.995
0.967 0.942 0.944 0.944
0.990 0.993 0.993 0.985
0.994 0.995 0.992 0.977
0.998 0.995 0.933 0.976
0.997 0.993 0.991 0.960
0.999 0.993 0.992 0.953
0.965 0.957 0.972 0.965
0.999 0.996 0.995 0.998
0.998 0.984 0.996 0.997
0.995 0.968 0.995 0.999
1.000 0.992 1.000 0.990
0.998 0.997 0.998 0.999
0.974 0.973 0.975 0.974
TABLE II
EVALUATION RESULTS OF PROPOSED APPROACH AND OTHER COMPARATIVE METHODS UNDER THE DISTRIBUTED LEARNING SCHEME.
HHO-KNN
HHO-SVM
HHO-Adaboost
HHO-DT
HHO-RWN
Prec F-measure Acc Rec
Prec F-measure Acc Rec
Prec F-measure Acc Rec
Prec F-measure Acc Rec
Prec F-measure
Acc Rec
Datasets
0.991 0.997 0.991 0.996
Baby Monitor
0.998 0.991 0.982 0.997
Doorbell
0.997 0.945 0.926 0.997
Thermostat
0.998 0.988 0.988 0.971
Security camera
Webcam
0.996 0.990 0.992 0.990
Phishing legitimate 0.941 0.886 0.927 0.930
0.989 0.972 0.990 0.994
0.995 0.989 0.982 0.997
0.984 0.980 0.984 0.981
0.970 0.750 0.950 0.924
0.990 0.988 0.994 0.906
0.909 0.857 0.827 0.898
0.992 0.995 0.998 0.996
0.993 0.984 0.994 0.998
0.996 0.943 0.965 0.997
0.997 0.983 0.992 0.994
0.996 0.996 0.996 0.995
0.969 0.958 0.959 0.958
0.996 0.990 0.966 0.990
0.993 0.990 0.970 0.999
0.997 0.895 0.969 0.998
0.999 0.981 0.983 0.998
0.999 0.998 0.996 0.999
0.959 0.936 0.935 0.959
0.998 0.994 0.991 0.998
0.996 0.980 0.994 0.996
0.992 0.971 0.993 0.997
0.997 0.990 0.997 0.998
0.995 0.996 0.994 0.999
0.969 0.970 0.972 0.963
TABLE III
COMPARISON BETWEEN HHO-RWN AND OTHER METAHEURISTICS IN TERMS OF ACCURACY, RECALL, AND PRECISION
Dataset
Recall
HHO-RWN NSGA-II MOPSO-L ́evy SPEA-II HHO-RWN NSGA-II MOPSO-L ́evy SPEA-II HHO-RWN NSGA-II MOPSO-L ́evy SPEA-II
Accuracy
Precision
Baby Monitor 0.999
0.998
Doorbell
0.995
Thermostat
0.565
0.487
0.289
0.937
0.989
0.998
0.604
0.801
0.327
0.996
0.984
0.968
0.985
0.693
0.149
0.920
0.780
0.997
0.967
0.902
0.157
0.995
0.996
0.995
0.479
0.256
0.022
0.710
1.000
0.957
0.521
0.559
0.000
(grant number: TII/DSRC/2022/3036).
REFERENCES
[1] M. Aloqaily, S. Otoum, I. Al Ridhawi, and Y. Jararweh, "An intrusion
detection system for connected vehicles in smart cities," Ad Hoc
Networks, vol. 90, p. 101842, 2019.
[2] B. Ghimire and D. B. Rawat, "Recent advances on federated learning
for cybersecurity and cybersecurity for federated learning for internet of
things," IEEE Internet of Things Journal, 2022.
[3] C. Kolias, G. Kambourakis, A. Stavrou, and J. Voas, "Ddos in the iot:
Mirai and other botnets," Computer, vol. 50, no. 7, pp. 80–84, 2017.
[4] O. A. Alzubi, J. A. Alzubi, A. Al-Zoubi, M. A. Hassonah, and U. Kose,
"An efficient malware detection approach with feature weighting based
on harris hawks optimization," Cluster Computing, vol. 25, no. 4, pp.
2369–2387, 2022.
[5] H. Faris, A.-Z. Ala'M, A. A. Heidari, I. Aljarah, M. Mafarja, M. A.
Hassonah, and H. Fujita, "An intelligent system for spam detection and
identification of the most relevant features based on evolutionary random
weight networks," Information Fusion, vol. 48, pp. 67–83, 2019.
[6] Z. Chkirbene, A. Erbad, R. Hamila, A. Mohamed, M. Guizani, and
M. Hamdi, "Tidcs: A dynamic intrusion detection and classification
system based feature selection," IEEE Access, vol. 8, pp. 95 864–95 877,
2020.
[7] N. M. Hijazi, H. Faris, and I. Aljarah, "A parallel metaheuristic approach
for ensemble feature selection based on multi-core architectures," Expert
Systems with Applications, vol. 182, p. 115290, 2021.
[8] Y. Jiang, K. Zhang, Y. Qian, and L. Zhou, "Anonymous and efficient
authentication scheme for privacy-preserving distributed learning," IEEE
Transactions on Information Forensics and Security, 2022.
[9] F. Zerka, V. Urovi, F. Bottari, R. T. Leijenaar, S. Walsh, H. Gabrani-
Juma, M. Gueuning, A. Vaidyanathan, W. Vos, M. Occhipinti et al.,
"Privacy preserving distributed learning classifiers–sequential learning
with small sets of data," Computers in Biology and Medicine, vol. 136,
p. 104716, 2021.
[10] M. Habib, I. Aljarah, and H. Faris, "A modified multi-objective particle
swarm optimizer-based l ́evy flight: An approach toward intrusion detec-
tion in internet of things," ARABIAN JOURNAL FOR SCIENCE AND
ENGINEERING, 2020.
[11] A. A. Heidari, S. Mirjalili, H. Faris, I. Aljarah, M. Mafarja, and
H. Chen, "Harris hawks optimization: Algorithm and applications,"
Future generation computer systems, vol. 97, pp. 849–872, 2019.
[12] S. Sokkalingam and R. Ramakrishnan, "An intelligent intrusion detection
system for distributed denial of service attacks: A support vector ma-
chine with hybrid optimization algorithm based approach," Concurrency
and Computation: Practice and Experience, vol. 34, no. 27, p. e7334,
2022.
[13] W. F. Schmidt, M. A. Kraaijveld, R. P. Duin et al., "Feed forward neural
networks with random weights," in International conference on pattern
recognition.
IEEE Computer Society Press, 1992, pp. 1–1.
[14] E. F. Rawashdeh, I. Aljarah, and H. Faris, "A cooperative coevolutionary
method for optimizing random weight networks and its application for
medical classification problems," Journal of Ambient Intelligence and
Humanized Computing, vol. 12, no. 1, pp. 321–342, 2021.
[15] A. Tuladhar, S. Gill, Z. Ismail, N. D. Forkert, A. D. N. Initiative
et al., "Building machine learning models without sharing patient data:
A simulation-based analysis of distributed learning by ensembling,"
Journal of biomedical informatics, vol. 106, p. 103424, 2020.
[16] D. H. Wolpert and W. G. Macready, "No free lunch theorems for
optimization," IEEE transactions on evolutionary computation, vol. 1,
no. 1, pp. 67–82, 1997.
[17] Y. Meidan, M. Bohadana, Y. Mathov, Y. Mirsky, A. Shabtai, D. Breiten-
bacher, and Y. Elovici, "N-baiot-network-based detection of iot botnet
attacks using deep autoencoders," IEEE Pervasive Computing, vol. 17,
no. 3, pp. 12–22, 2018.
[18] C. L. Tan, "Phishing dataset for machine learning: Feature evaluation,"
Mendeley Data, vol. 1, 2018.
[19] N. Hijazi, M. Aloqaily, B. Ouni, F. Karray, and M. Debbah, "Harris
hawks feature selection in distributed machine learning for secure iot
environments." [Online]. Available: https://github.com/Artifitialleap-
MBZUAI/Harris-Hawks-Feature-Selection-in-Distributed-Machine-L
earning-for-Secure-IoT-Environments
[20] H. Fukumoto and A. Oyama, "Study on improving efficiency of multi-
objective evolutionary algorithm with large population by m2m decom-
position and elitist mate selection scheme," in 2018 IEEE Symposium
Series on Computational Intelligence (SSCI).
IEEE, 2018, pp. 1180–
1187.
|
|
http://arxiv.org/abs/2302.09854v1 | 2023-02-20T09:35:13 | 2023-02-20T09:35:13 | Faster Region-Based CNN Spectrum Sensing and Signal Identification in
Cluttered RF Environments | In this paper, we optimize a faster region-based convolutional neural network
(FRCNN) for 1-dimensional (1D) signal processing and electromagnetic spectrum
sensing. We target a cluttered radio frequency (RF) environment, where multiple
RF transmission can be present at various frequencies with different
bandwidths. The challenge is to accurately and quickly detect and localize each
signal with minimal prior information of the signal within a band of interest.
As the number of wireless devices grow, and devices become more complex from
advances such as software defined radio (SDR), this task becomes increasingly
difficult. It is important for sensing devices to keep up with this change, to
ensure optimal spectrum usage, to monitor traffic over-the-air for security
concerns, and for identifying devices in electronic warfare. Machine learning
object detection has shown to be effective for spectrum sensing, however
current techniques can be slow and use excessive resources. FRCNN has been
applied to perform spectrum sensing using 2D spectrograms, however is unable to
be applied directly to 1D signals. We optimize FRCNN to handle 1D signals,
including fast Fourier transform (FFT) for spectrum sensing. Our results show
that our method has better localization performance, and is faster than the 2D
equivalent. Additionally, we show a use case where the modulation type of
multiple uncooperative transmissions is identified. Finally, we prove our
method generalizes to real world scenarios, by testing it over-the-air using
SDR. | [
"Todd Morehouse",
"Charles Montes",
"Ruolin Zhou"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09854v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09854v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "eess.SP",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"eess.SP",
"cs.LG"
] | Faster Region-Based CNN Spectrum Sensing and
Signal Identification in Cluttered RF Environments
Todd Morehouse, Charles Montes, and Ruolin Zhou
Department of Electrical and Computer Engineering
University of Massachusetts, Dartmouth, MA
1
3
2
0
2
b
e
F
0
2
]
P
S
.
s
s
e
e
[
1
v
4
5
8
9
0
.
2
0
3
2
:
v
i
X
r
a
Abstract-In this paper, we optimize a faster region-based
convolutional neural network (FRCNN) for 1-dimensional (1D)
signal processing and electromagnetic spectrum sensing. We
target a cluttered radio frequency (RF) environment, where
multiple RF transmission can be present at various frequencies
with different bandwidths. The challenge is to accurately and
quickly detect and localize each signal with minimal prior
information of the signal within a band of interest. As the number
of wireless devices grow, and devices become more complex from
advances such as software defined radio (SDR), this task becomes
increasingly difficult. It is important for sensing devices to keep
up with this change, to ensure optimal spectrum usage, to monitor
traffic over-the-air for security concerns, and for identifying
devices in electronic warfare. Machine learning object detection
has shown to be effective for spectrum sensing, however current
techniques can be slow and use excessive resources. FRCNN has
been applied to perform spectrum sensing using 2D spectrograms,
however is unable to be applied directly to 1D signals. We
optimize FRCNN to handle 1D signals, including fast Fourier
transform (FFT) for spectrum sensing. Our results show that
our method has better localization performance, and is faster
than the 2D equivalent. Additionally, we show a use case where
the modulation type of multiple uncooperative transmissions is
identified. Finally, we prove our method generalizes to real world
scenarios, by testing it over-the-air using SDR.
I. INTRODUCTION
Wireless communications continue to become more prolific
and more complex due to cheapening hardware and advances
in fields like machine learning (ML) and software defined
radio (SDR). Sensing becomes an increasingly difficult task
as frequency congestion increases and device use increasingly
complex patterns. Machine learning has improved a device's
ability to adapt, with technologies such as online learning
allowing new patterns, behaviors, and capabilities, to be real-
ized in the field. Additionally, wireless devices continue to be
deployed in increasingly diverse environments, including very
urban and very remote areas. These devices experience very
diverse wireless channels in congestion levels, noise levels,
and multipath effects. These changes and effects all impact
spectrum sensing, the process of identifying signals within a
wide spectrum band. Spectrum sensing is vital for allocating
spectrum resources for communications, and for organizations
to monitor activities. Adaptive radios must ensure to use an
available portion of the spectrum, and do not interfere with
devices that have higher priority. To achieve this, devices
must accurately locate any other transmissions in a band.
Government, military, and commercial sectors may wish to
monitor communications for security threats over RF, or
improper use of spectrum. Electronic warfare may wish to
identify adversary communications or interference. The ability
to accurately locate each transmission present is paramount for
each of these tasks.
Popular traditional spectrum sensing techniques include
energy-based and eigenvalue-based detection methods, such
as MED, and AGM, which require prior knowledge of noise
power [1]. Newer eigenvalue-based methods have addressed
the drawbacks, but are still inflexible in domains with dynamic
users [1], [2]. Deep learning methods often employ techniques,
such as convolutional neural networks (CNNs), that do not
require prior knowledge of the signal-to-noise ratio (SNR)
conditions [3]. APASS, implemented by Xie et al [4] is a CNN
method to identify if a primary user is active on a channel,
and outperforms traditional detectors. More recently, object
detection and segmentation methods have been used to localize
signals in multi-user environment. In O'Shea et al [5], the
authors showed that you-only-look-once (YOLO) can be used
to find signals present in a spectrogram. In Prasad et al [6], [7]
the authors used faster region-based CNN (FRCNN) to jointly
detect signals within the spectrogram image, and classify
detections as Bluetooth, WiFi, or microwave oven interference.
They were able to achieve a mean average precision (mAP) of
0.713 under the SNR interval between 15dB and 50dB. They
tested their system over-the-air (OTA), but were only able to
achieve a mAP of 0.125. In Vagollari et al [8], the authors used
YOLO and FRCNN to localize signals within a spectrogram,
and classify them by their modulation type. They were able to
achieve an mAP of 87% and a generalized intersection over
union (gIoU) of 90%. They found that FRCNN outperforms
YOLO for spectrum sensing. Other authors investigated object
detection on frequency contents only. In Ghanney and Ajib
[9], the authors locate RF interference within a FFT generated
plot. In order to process the plot with YOLO, they save images
of the plots. Their results achieve an mAP of 0.81 at an IoU
of 0.5. In Kayraklik et al [10], the authors generate power
spectral density (PSD) plots from baseband signals collected
OTA. They save their PSD plots as images so that they can be
processed by You Only Learn One Representation (YOLOR)
and Detectron2.
A. Challenges in Current Research
Our literature review shows that current implementations
are limited to images by their object detection baselines. In
this paper, we show that by optimizing FRCNN to process
1D FFTs directly, we can significantly reduce computational
cost. In signal processing, especially wireless signals, data
is often one dimensional. In the spectrum sensing case, if
time information is not required, then the process can be
performed with only a single dimension. In order to create
images, additional information needs to be added or extracted.
Using spectrograms can organize time information as well
as spectral information, however, this requires significantly
more collected data, and the additional data requires more
computation to perform detection. In one paper, the authors
to generate an image [9], but
render an FFT as a plot
this introduces more data without new information. These
approaches introduce two major issues: an introduction of a
second dimension increases search space and computational
complexity, and in the FFT plot case, adding sources of error
due to the limitations of rendering an image. Object detection
in a 2D case requires exponentially higher computation than
for a 1D case. We show a cost comparison between the two
techniques in Sec. I-B. Plotting an FFT to generate an image
is an effective way to utilize standard FRCNN to perform 1D
spectrum sensing, however it is costly in both computation
and performance. The increased dimension will increase data
size, without adding any additional information. Furthermore,
when the plot is rendered, points and lines that are close
together overlap, blurring them together. This can be seen in
Fig. 10, where we plot an FFT. The resolution in parts with
high variance is lost, resulting in a solid shape.
B. Cost of 2D and 1D Spectrum Sensing
In this example, we show the difference in data size and
acquisition time between a 2D and 1D spectrum sensing
scenario. First, consider a receiver operating at a 200kHz
baseband sample rate, and using an FFT size of 1024. Thus, in
order to create one vector of size 1024 for spectrum sensing,
we must receive samples for t = 1024/200000 = 5.12ms. If
we wish to generate a square spectrogram with the same FFT
size, then we must collect 10242 samples, or approximately
1.05 MS. Thus, we would need to record for 5.24s. Thus,
to achieve the same frequency sensing resolution, we would
need to record 1024x longer, and 1024x more data. We can
reduce this cost by reducing the FFT size to something smaller,
like 128. This still results in recording for 128x longer and
128x more data, while having a lower frequency resolution.
Thus, we can see that a 1D scenario can be significantly more
favorable for performing spectrum sensing.
C. Our Approach
We identify and localize RF signals in frequency domain
using 1D FRCNN. Additionally, we consider a dynamic en-
vironment, where no centralized channel allocation is present.
This allows wireless devices to transmit at any frequency
and bandwidth, requiring a more sophisticated detection. The
FRCNN algorithm is a modification to CNNs, allowing object
detection and segmentation. It is applied in this project to de-
tect and isolate received signals. The standard implementations
of FRCNN are intended for processing images, and are not fit
for processing received baseband samples directly. Therefor,
2
we optimized FRCNN for the 1D signal case by modifying
the ML architecture and optimizing anchor box proposals. In a
use case, we show how each detected signal can be separated,
and classified by its modulation type. This can be extended to
further applications in classification or signal processing, such
as performing security related checks, or locating a radio to
communicate with. We test our system over-the-air (OTA),
using two USRP N2901 software defined radios (SDRs).
These devices allow controlling the physical layer of wireless
communications using high level software, and provide an easy
platform to integrate machine learning with communications.
We used these radios to broadcast test signals, which were
received on a separate radio, and processed with our spectrum
sensing algorithm.
D. Novelty and Contribution of our Research
Our work optimizes FRCNN for 1D signals, greatly reduc-
ing the computational complexity, and improving the perfor-
mance in spectrum sensing for detecting and locating signals.
The contributions of our research are as follows
1) Redesigning the ML architecture of FRCNN for 1D
signals
2) Optimization of the feature extraction layers for spec-
trum sensing
3) Application of 1D FRCNN for spectrum sensing in
cluttered and unknown RF environments
The ML architecture of FRCNN consists of operations de-
signed for working with 2D features from images. These
operations had to be redesigned to process 1D signals. Ad-
ditionally, several stages of FRCNN involve preprocessing the
data, including generating a dataset to train the region proposal
network, pooling features for the classifier, and selecting
detections after classification. These stages need to handle 1D
inputs and features. The feature extraction layers of FRCNN
are typically designed to extract relevant image features, thus,
state-of-the-art networks such as RESNET should be ideal.
However, signal features are not
the same, and may not
be analogous to image features. We first evaluate different
feature extractors for the spectrum sensing application, then
optimize the best extractor for performance and inference
time. Finally, we show that our optimizations provide superior
performance over 2D FRCNN with spectrograms as well as
over a baseline energy-based detection method. Additionally,
we show that our optimizations are significantly faster than
2D FRCNN. We measured the mAP, mIoU, probability of
detection (Pd), and probability of false alarm (Pfa) over the
SNR range of -5dB to +20dB. The mAP was measured to
be 0.716, mIoU as 0.586, Pd as 0.823, and Pfa as 0.166.
Directly comparing metrics to other papers is difficult, due
to differences in simulated channel conditions and metric
measurement methods. In Vagollari et al [8] the authors use
the generalized IoU, while we use the simple IoU, and they do
not provide an SNR for the measured gIoU. In Prasad et al [7],
the authors calculate the interpolated mAP, but do not give a
probability threshold, which is typical for this method, and in
Ghanney and Ajib [9], the mAP is not well defined. Therefor,
we implement a 2D spectrogram spectrum sensing method
using FRCNN, using techniques from these papers, to give
an accurate comparison of our results. However, if we give
a direct comparison between mAP, ours is comparible with
Prasad et al [7], while being lower than Ghanney and Ajib
[9]. Our OTA mAP significantly outperforms Prasad et al [7],
where ours measured 0.826 compared to their 0.125. When
comparing with our implementation of 2D FRCNN, we show
significant improvement mIoU by 91%, our primary metric,
with slightly improved mAP by 4%.
E. Paper Organization
This paper is organized into the following sections: First we
describe our optimized FRCNN model in Sec. II. In Sec. III,
we describe the RF environment that we apply our work to. In
Sec. IV we describe each spectrum sensing methodology we
test in this paper, including our approach. In Sec. V we discuss
how we measure performance. In Sec. VI we analyze different
FRCNN parameters and their effect on performance, and in
Sec. V we go into detail on how we test each methodology.
In Sec. VII, we show a use-case of our 1D FRCNN with
Automatic Modulation Classification, and we show our test
results for simulation and over-the-air in Sec. VIII. Finally we
conclude on the research in Sec. IX.
II. OPTIMIZING FRCNN
In this section, we introduce our optimized FRCNN, design
decisions that we made, and how we constructed the network.
Faster region-Based CNN [11] is an object detection ML
model that makes heavy uses of CNNs in each stage. For
spectrum sensing this allows detection of transmitters within
a received signal. However, the architecture is designed for
image processing. We optimize the three major components
of FRCNN for 1D signal processing, including the convolu-
tional feature extractor, region proposal network (RPN), and
classifier stage, shown in order in Fig. 1.
A. Feature Extraction Base Layers
The first part of FRCNN is feature extraction, achieved
using a fully convolutional network. The goal
is to have
each feature map to a region in the input. For an image,
this region would be a windowed subsection condensed into
a single feature. Condensing intervals reduces the search
space, since only the feature matrix needs to be analyzed to
propose and find features. However, higher levels of feature
extraction reduce the granularity, since larger sections of the
input are being condensed into a single feature. Thus, a trade-
off needs to be balanced between greater data reduction,
feature complexity, inference time, and accuracy. Additionally,
wireless signals have unique features that should be focused
on. Thus, a different approach should be taken over image
processing techniques. We analyzed different architectures
for their feature extraction performance, as well as different
levels of feature extraction. This is detailed in Sec. VI. To
ensure that the feature matrix maps directly to the input, the
downscaling factor must be an integer divisor of the input size,
to avoid truncation. Otherwise, this truncation would result
in innaccurate mapping of features to locations in the signal
space.
3
Fig. 1: FRCNN Flowchart
B. Anchor Intervals and Region Proposals
Anchor intervals are an efficient way to search for objects
within a dataspace, by using predefined locations and aspect
ratios called anchors. The goal of the region proposal network
is to identify which anchors overlap a ground truth, given an
input. To achieve this, the feature matrix, which is proportional
to the input size, is used. Each element of the feature matrix
maps to an anchor box in the input data. The region proposal
network consists of a three layer convolutional network, shown
in Fig. 2. First, a 3x1 convolutional layer serves as an interme-
diate layer, performing further feature extraction and setting
the feature depth. The output of this is broken into two separate
1x1 convolutions, for classification and regression separately.
For the classifier convolution, the number of features is set
to the number of anchor boxes. The regression layer predicts
intervals, therefore number of filters is twice the number of
anchor boxes, allowing it to predict two points for each anchor
box. The outputs are a n x k classification matrix matrix, and
an n x 2k regression matrix, where n represents the feature
matrix size, and k represents the number of anchors. This gives
a probability and interval for each anchor box on each feature
region.
C. Region Pooling and Classification
The region pooling and classification fine tune proposed
regions from the RPN. Since the number of proposed re-
gions will always be the same, many will be duplicates or
background detections. Thus, the classifier stage must process
each proposed region to evaluate if an object actually exists,
Feature MatrixFeature ExtractionProposed RegionsRegion ProposalNetworkWindowed FeaturesROI PoolingClassifierFFT InputIntervalsProbabilities4
Fig. 3: Deep learning layers of the classifier and ROI pooling
"background", and a regression is given as the anchor box that
it overlaps.
IOU(A,B) =
|A ∩ B|
|A ∪ B|
(1)
L = −
1
N
N
(cid:88)
i
i log (pi) + (1 − p∗
p∗
i ) log (1 − pi)
(2)
L = −
1
N
N
(cid:88)
i
p∗
i log pi
L =
(cid:26) 1
2 (ti − t∗
|ti − t∗
i )2
i | − 1
2
if|ti − t∗
i | < 1.0
otherwise
(cid:27)
(3)
(4)
We use separate loss functions for the RPN classification
and regression outputs. The classifier uses binary crossentropy
loss, shown in Eq. 2. The loss is calculated between the
predicted probability for each proposal, pi, and an indicator
if the proposal overlaps a ground truth, p∗
i . The indicator
is 1 for a positive overlap, and 0 for a negative overlap.
The RPN regression uses smooth L1 loss, shown in Eq. 4,
where ti represents the predicted regression target, and t∗
i
represents the ground truth overlap. The final classifier stage
consists of separate classification and regression outputs. The
regression output is trained with the same smooth L1 loss used
for the RPN, shown in Eq. 4. The classifier uses categorical
crossentropy, shown in Eq. 3. The predicted probabilities are
represented by pi, while the true probabilities are represented
by p∗
i . This is used since the FRCNN final classifier can
have multiple classes, instead of simply "background" and
"foreground".
Fig. 2: Convolutional layers of the RPN
and best fit a bounding interval to the object. The classifier
uses regression and the feature matrix to best fit an interval
to the object. The architecture for this could be seen in
Fig. 3. First, the features around each proposed region of
interest are windowed, then resized to a 1x7 vector. This
standard size allows it to be processed by the next step, a
fully connected layer. First, the features are flattened, then
processed by two fully connected layers. Finally, the result is
passed to two different fully connected layers for classification
and regression. The classification is either "foreground" or
"background", or alternatively, a set of custom classes. The
regression output is two points for each proposal and class.
The output of the classifier is a fixed number of predictions
each time, however the number of objects present is not fixed.
In order to output only detected objects, thresholding is applied
for each output probabilities. We chose a probability threshold
of 0.70. That is, any detection with a probability less than 0.70,
was considered background and discarded. This allows only
very confident predictions to be output.
D. Training the Model
We train the network using a two-step training process,
where we alternate between training the RPN and the classifier.
First, the RPN is trained on an input signal to produce propos-
als. Then, the RPN proposals, and the feature matrix, are used
to train the classifier. These two steps are alternated until the
entire model is fully trained. To achieve this, an intermediate
dataset is needed to train the RPN, consisting of classification
and regression targets for anchors. The downscaling factor
between the input signal and feature matrix is determined by
the feature extraction layers. Thus, the dimension of the feature
matrix is known, and the anchor locations can be found from
this. For each feature, the anchor locations are screened for
overlaps with ground truths by their IOU, calculated using
Eq. 1. If the IoU with any ground truth is found to be greater
than 0.7, then it is considered a positive overlap. Likewise, an
IoU less than 0.3 is considered a negative overlap. If the IoU is
between 0.3 and 0.7, then the overlap is considered ambiguous,
and not used for training. This ambiguous classification helps
the RPN is learning on confident samples.
to ensure that
For each feature, a classification is given as "foreground" or
Conv 3x1Conv 1x1 Conv 1x1 Anchor RegressionAnchor ProposalsFeature MatrixFeatureWindowingResizeInterval RegressionInterval ProbabilitiesFeature MatrixFully ConnectedLayerFully ConnectedLayerFully ConnectedLayerFully ConnectedLayerIII. RF TESTBED
B. Synthesized Testbed
5
In this research, we focus on determining the frequency
location of each transmission, from the perspective of a
receiver. This is illustrated in Fig. 4, where a single receiver
observes multiple transmitters. The goal of the optimized
FRCNN sensing algorithm is to locate all signals present in
frequency domain. In this section, we discuss the wireless
environment that we design the model around, how we syn-
thesize the environment to train and test the network, and how
we construct an OTA test to evaluate the model.
Fig. 4: Illustration of a wideband receiver
A. Wireless Environment
First, we define the wireless environment that we are oper-
ating in. We consider a spectrum of arbitrary size, where mul-
tiple transmitters are present. We observe the entire spectrum
from a single receiver. Each transmission may occur at any
center frequency within the band, and occupy any bandwidth.
An example from a receiver's perspective is shown in Fig.
5, where five transmissions are present, relative to the center
frequency of the receiver. This scenario represents a decentral-
ized and independent sensor, where channel allocations may be
unknown or nonexistent. A simple spectrum sensing method
of identifying if a channel is occupied would lose most of
the information present. For many applications, this approach
will not meet requirements. Instead, a better approach is to
use object detection, to detect and localize each transmission
present.
Fig. 5: Receiver's Perspective of the Wireless Environment
Machine learning models require large amounts of diverse
data for training, otherwise overfitting will occur and the
model will not generalize. We elected to synthesize our
training data, allowing us to generate as many samples as
needed, and to generate diverse scenarios through simulated
channel impairments. Diverse channel impairments allows our
model to be deployed in different scenarios, without requiring
retraining. Collecting data OTA is possible, but significantly
more challenging, since channel effects are difficult to control
and data can be difficult to label. In previous research, we
synthesized our training and test data, and showed that our
approach generalizes well to OTA tests [12]–[14].
The dataset generated must satisfy the input and output
of the model shown in Fig. 1. To generate the input, each
transmitted signal
is generated independently. The process
for synthesizing samples could be seen in Fig. 6. For each
signal, random binary data is generated, then modulated. The
modulation type is chosen at random. Each signal is then
pulse shaped using a raised cosine filter, and resampled to
achieve a desired bandwidth. The signal
is finally shifted
by its center frequency offset
in frequency domain. This
process is repeated a total of five times, where each center
frequency and bandwidth is chosen at random. Then, if any
signals are overlapping in frequency domain, one of the signals
is removed at random. This selection process results in a
random number of transmitters. Finally, all of the signals
are mixed together, by summing them in time domain. This
process generates random environments, where the number of
transmissions are random, as well as their corresponding center
frequencies and bandwidths.
y =
x
(cid:80) |x2|
(cid:113) 1
N
(5)
Channel effects were applied to each mixed signal, as shown
in Fig. 7. Before AWGN could be applied, the signal's power
was normalized to 1, using Eq. 5. We considered an indoor
system, where a direct line of sight was present between all
transmitters and the receiver. Thus, a Rician multipath process
was used. Finally, the FFT of the signal was taken, to be used
for training FRCNN, along with the frequency location of each
signal present, as shown in Fig. 6.
This process was repeated to generate a total of 3,000
training samples.
C. OTA Testbed
An OTA testbed was designed to model Fig. 4. To create
this, we used SDR, allowing us to control the transmitted
waveforms, as well as to process the received waveform
using machine learning. We used 2x USRP N2901, which are
capable of 2x2 MIMO each. The SDRs were configured as
three transmitters, and one receiver. They were placed in an
indoor environment, where each transmitter had a direct line
of sight path to the receiver. The radios were configured to
operate at a center frequency of 5 GHz, with a sample rate
of 200kHz for each channel. Each radio was calibrated to the
Transmitter 1Transmitter 2Transmitter 3ReceiverWidebandReceived SignalAWGN Multipath Fading Timing Offsets Frequency Offsets AttenuationChannel-2-1.5-1-0.500.511.52Carrier Offset Frequency, fc + f (Hz)105-70-60-50-40-30-20-100AmplitudeSpectrum from Receiver's Perspective6
Fig. 6: Process for synthesizing signals in MATLAB
Fig. 7: Channel Impairment Process for Synthesized Signals
same center frequency, to remove any center frequency offset
from hardware, and thus collect more accurate metrics. To
control each transmission's center frequency and bandwidth,
offsets and pulse shaping were applied to the baseband signals
before transmitting, following the same process for synthesiz-
ing signals. A random bitstream was generated, modulated,
and pulse shaped, then resampled to a desired bandwidth.
Finally, a center frequency offset was applied, and the signal
was transmitted. An example from the receiver's perspective
could be seen in Fig. 5. Controlling the center frequency in
baseband allowed easier collection of metrics for OTA tests,
since the frequency location of each signal was known by
software.
IV. SPECTRUM SENSING METHODOLOGIES
A. Energy-based Spectrum Sensing
To compare our results to popular energy-based spectrum
sensing, we implement a base-line solution. This approach
identifies when a transmitter is present when the signal energy
exceeds a threshold. Multiple transmitters can be identified and
localized using changepoint detection, which finds the points
that exceed an energy threshold. In doing this,
individual
signals can be located. First, the FFT of a received signal
is taken, so that its frequency contents can be observed. Next,
the FFT output is scanned from left to right, looking for
parts where the energy exceeds the noise floor. The intervals
between these detections are considered a transmission, and
the detections themselves are the frequency bounds. The noise
floor must first be estimated, and a threshold determined from
this. A simple estimate is to use bot the mean and standard
deviation of a received signal frame, and to sum them together
as γ. The equation for finding the noise floor threshold, γ, is
shown in Eq. 6, where μ is the mean of the FFT frame, si is
the ith sample of the frame, and N is the length of the frame.
For frames with a signal present, this will be slightly higher
than the noise. For frames with no signal present, this will
be the peaks of the noise. An example of this energy-based
detection on an FFT frame could be seen in Fig. 8.
γ = μ +
(cid:115)
(cid:80)N (si − μ)2
N
(6)
Fig. 8: Example detection using energy-based spectrum sens-
ing.
B. Spectrogram Spectrum Sensing using FRCNN
The standard implementation of FRCNN can process 2D
inputs, and therefor cannot be used to perform spectrum
sensing on an FFT directly. To work around this, other authors
have used the STFT to generate spectrograms, such as in
Prasad et al [6], [7]. To compare our results with this approach,
we implement 2D FRCNN spectrum sensing algorithm based
on their approach. Since spectrograms are created by taking
the FFT of many signals over time, they require significantly
more data to create than if a single FFT was used. In order
to produce a square image, the number of frames must be the
FFT bin size. It is typical to use a smaller FFT size to reduce
total data size, which comes at a tradeoff of reduced frequency
resolution. We reduced the FFT size for spectrograms to
128, requiring 16,384 samples per spectrogram, compared to
1024 samples per frame for energy-based and 1D FRCNN
spectrum sensing. Spectrograms incorporate time-frequency
information into the same image. Therefor, an advantage of
spectrograms is that the bounding boxes represent detections
in both domains, unlike the energy-based and 1D FRCNN,
which only detect frequency information. An example of using
FRCNN on spectrograms could be seen in Fig. 9.
C. Spectrum Sensing using Optimized 1D FRCNN
In our optimized 1D FRCNN, we process FFT signals
directly, bypassing the need to generate large spectrograms.
The FFT is performed on a received baseband mixed-signal,
is eas-
and converted to decibels, which is a form that
ier to distinguish signals from noise. This resultant signal
contains the same frequency information as a spectrogram
equivalent, but consists of significantly less data compared
to spectrograms. The resultant output from our optimized 1D
FRCNN are bounding intervals, representing a single detected
Modulate & Pulse ShapeApplyFrequencyOffsetsMix SignalsGenerate DataMixed SignalApply TimeOffsetsRemoveOverlappingSignalsAWGN Rician Fading AttenuationImpaired SignalGenerated SignalChannel20015010050050100150200Frequency (kHz)706050403020100Amplitude (dB)ThresholdEnergy-Based Detection7
we define these metrics, and how we measure them. These
measurements may be different than other approaches, since
we are comparing traditional energy-based methods to object
detection methods. We consider the mIoU as our primary
performance metric, as we are optimizing for the ability to
localize all signals present, while minimizing false positive
detections. However, other metrics give different insights to
our model, that might be more relevant to other applications.
A. Average Precision
Object detection and data retrieval
tasks often use the
average precision (AP) or mean average precision (mAP) as
performance measurements. The precision of a detector is the
ability to make correct predictions, and recall is the ability
to find all objects. Precision does not include missed objects,
while recall does not include false predictions. To measure
them, we first categorize predictions. Ground truths are objects
that exist within an input. For example, the cars that exist
within an image. Detections are the output object location and
classifications of the detector. A true positive (TP) is when the
detection overlaps a ground truth, where a false positive (FP)
is a detection that overlaps no ground truth. A false negative
(FN) is when there is no detection for a ground truth. True
negatives (TN) are if there is no detection and no ground truth,
and are not evaluated. We can count the number of TPs, FPs,
and FNs by running the detector on a test dataset, and find
the precision and recall by Eq. 7 and Eq. 8. We can construct
a precision-recall (PR) curve by measuring the precision and
recall for each input image or signal. Finally, we can find the
AP by taking the area under the PR curve.
Precision =
TP
TP + FP
Recall =
TP
TP + FN
(7)
(8)
To determine if a detection is true or false, we use the IoU,
which measures the overlap between two objects, shown in
Eq. 1. For 2D detection, these are typically bounding box
detections, while for our 1D architecture, these are intervals.
Typically, a detection is considered positive if the IoU with
any ground truth is greater than 0.5, and negative if it is less
than or equal to 0.5.
Detectors will give a probability for each detection. For
FRCNN, the probability corresponds to a class. At minimum,
there are two classes, foreground representing an object, and
background representing no detection, however detectors can
be configured to have more. We threshold the probability to de-
termine if a detection is positive or negative. If the probability
is above a threshold, the detection is considered positive. This
can improve performance by removing poor samples. Since the
probability threshold changes which detections are positive or
negative, it also changes the precision and recall, and thus the
AP. The mAP can measure a detector's performance across
different thresholds, by finding the AP for each threshold, and
averaging them together.
A common method of finding the AP is through interpo-
lation. This method can be superior to the standard way of
Fig. 9: Example detection using spectrograms and 2D FRCNN.
transmission, as well as the confidence in each prediction.
These predictions are then thresholded by their confidence,
such that only highly confident samples are considered positive
detections. All other samples are discarded. An example of
using 1D FRCNN on an FFT frame could be seen in Fig. 10.
Fig. 10: Example detection using FFTs and 1D FRCNN.
V. MEASURING PERFORMANCE
To measure performance, we use four metrics: The mean
average precision (mAP), the mean intersection over union
(mIoU), the probability of detection (Pd), and the probability
of false alarm (Pfa). In object detection, the mAP is one of
the most common metrics [6]–[9], [11], [15]–[20]. However,
in spectrum sensing, the Pd and Pfa are the most common
metrics for spectrum sensing [1]–[4]. The mAP and mIoU
are typical measurements for object detectors, while Pd and
Pfa are typical metrics for spectrum sensing. In this section,
01020304050607080Time (ms)1007550250255075100Frequency (kHz)2D FRCNN Spectrogram Detection1000007500050000250000250005000075000100000Frequency Offset (Relative to Fc), fo (Hz)706050403020100Amplitude, (dB)Spectrum Sensing Resultsfinding AP, since recall values may not be evenly distributed
between [0,1], and may be concentrated around a single point.
First, we sort each detection by its probability in descending
order. Then, each prediction is determined to be a truth if
its IoU with any ground truth is greater than 0.5, and false
otherwise. The total number of false negatives are counted
from this. Then, the precision and recall is calculated for each
sample, with the number of true positives and false positives
accumulating. Some recalls may have multiple precision val-
ues. For these, the maximum precision is used. Finally, the PR
curve is divided into even spaced points, typically eleven. The
precision at each point is averaged together to find the AP.
B. Mean Intersection over Union
In order to address some of the shortcomings from AP,
we introduce the mean intersection over union (mIoU). The
average precision tends to over estimate the ability of the
detector in cases where the number of false positives are
high, but false negatives are low. This is due to having
mostly high recall, while precision can be very low. This
is exacerbated by the common practice of assuming the PR
curve starts at a precision of 1, and ends at a recall of 0,
as well as in interpolated AP, where we take the maximum
precision for each recall level. Additionally, the AP makes
binary predictions of overlaps. If the IoU is greater than a
threshold, then it is considered overlapping a ground truth.
Therefor, the AP may overestimate how well the detector
localizes objects. Finding the mean of IoUs can address both
of these concerns. For spectrum sensing, many applications
require accurate localization of transmissions in frequency
domain. When sharing spectrum, inaccurate localization can
result in poor spectrum usage, or interference between trans-
mitters. Other sensing tasks may require learning information
about a transmitter from its spectral patterns, or separating
transmissions.
To find the mIoU, we first loop through every input signal
and corresponding detection. For each detection, we calculate
the IoU with all ground truths. If the IoU is greater than 0.5,
it is considered overlapping, and the IoU is recorded. If the
IoU is less than 0.5, or if it is a duplicate detection, the IoU is
recorded as zero. Additionally, for any ground truths that had
no detections overlapping, a value of zero is recorded for the
IoU. For the multiclass case, misclassifications are considered
a false positive, thus even if the IoU of a detection with a
ground truth is high, it will still be considered zero if it is
misclassified. Finally, the mean of all recorded IoUs is taken
as the mIoU. An mIoU of zero is a detector that is unable to
locate any objects, while an mIoU of one is a detector that
locates all objects perfectly.
There are some shortcomings to the way we define and mea-
sure the mIoU. Both duplicate detections, and false positive
detections over noise, are weighted equally. While these can
both be viewed as negative, in some applications, duplicate
detections may not be an issue. Additionally, detections that
are close to overlapping, but do not have an IoU greater than
0.5, will be factored into the metric as an IoU of 0.0, which
may underestimate the ability of the detector. An alternative
8
to using the mIoU could be to find the AP over a range of IoU
thresholds from 0.5 to just under 1.0, then averaging all APs
together as the mAP. This would allow the mAP to incorporate
the detector's ability to localize objects, but would not address
the first issue, when false negatives are low and false positives
are high. In this research, we focus on the mIoU as our primary
metric, as it is the most fitting for spectrum sensing using
object detection.
C. Probability of Detection
The probability of detection is defined as the probability
that a signal is detected, Pd = P (T > γ|H1), where γ
is an amplitude threshold and H1 is the event that a signal
exists. This is a common metric in spectrum sensing to
measure a system's ability to find all signals present. In
traditional spectrum sensing, this is the probability that the
signal amplitude exceeds a threshold, given a transmitter is
present. In the object detection case, this is better defined
as the probability that a prediction overlaps a ground truth.
To adapt this to the object detection case, we use the true
positive rate (TPR), which is defined by Eq. 9. Since FRCNN
outputs bounding box predictions, they must first be sorted
by true/false and positive/negative samples. To do this, we
apply IoU and probability thresholding. Additionally, in the
multiclass case, a misclassification will not be considered a
detection. To keep results consistent, all models, including
the energy-based spectrum sensing method, will evaluate their
probability of detection with the TPR.
TPR =
TP
TP + FN
(9)
D. Probability of False Alarm
The probability of false alarm is another common spectrum
sensing metric, which is defined as the probability that a signal
will be detected, when none exists, Pf a = P (T > γ|H0),
where γ is a threshold, and H0 is the event that no signal
exists. In the object detection case, this is better defined as the
probability that a detection does not overlap a ground truth. In
other words, a false alarm is a detection over noise, or where
the overlap with a signal is below a threshold. In the multiclass
case, a misclassification will still be considered a false alarm.
The false discovery rate (FDR) can be defined as the ratio
of false positives to number of detections, shown in Eq. 10.
To keep results consistent, all models, including the energy-
based spectrum sensing method, will evaluate their probability
of false alarm with the FDR.
FDR =
nfa
ndet
(10)
E. Inference Time
Machine learning algorithms often take longer to process
data than their signal processing counter parts. Downscaling
FRCNN to process 1D signals reduces the amount of data that
needs to be processed, and thus should decrease processing
takes to run the
time. For ML/DL networks,
is called the inference time. In the FRCNN case,
model
the time it
this is the time it takes to to find all signals present in an
input, without including preprocessing times. To compare the
different techniques, the average inference time is measured
between energy-based, 1D FRCNN, and 2D FRCNN. For the
FRCNN cases, this is the time between inputting an FFT
or spectrogram into the network, and collecting each output
detection, including postprocessing such as NMS. For energy-
based, this is the time it takes to estimate an energy threshold,
search the FFT, and organize all detections. The inference
times are heavily dependent on hardware, and thus the absolute
time measured may not be the most useful metric, thus when
reporting inference time, we normalize the time relative to the
baseline energy-based method.
VI. ANALYSIS OF FRCNN PARAMETERS
The base of the network plays an important role in extract-
ing features for the RPN and classifier. It directly controls key
parameters such as resolution, inference time, memory usage,
and complexity. Since the number of anchor boxes is directly
related to the feature matrix size, increasing the stride or
feature reduction will reduce the resolution of the RPN layer,
and make each anchor represent a larger area of the input.
However, increased number of layers can increase complexity,
and improve the features that are extracted. Additionally, other
parameters such as the number of filters in each layer, or the
general structure of feature extraction layers, can impact the
performance of the network. In this section, we evaluate the
difference in performance for different configurations of the
feature extraction layer. Then we conclude on a configuration
that best suits the application at hand.
A. VGG net feature extraction with different levels of stride
The baseline architecture used is VGG net. In the original
FRCNN paper [11], the authors used VGG-16, pre-trained on
ImageNet, as their feature extraction layers. Here, our baseline
uses 19 layers instead of 16, achieving a stride of 16. An
illustration of this architecture is shown in Fig. 11. Each block
consists of three convolutions, with a filter size of 3x1. To
ensure the dimension of the feature matrix is proportional to
the input signal, each convolution pads the output. Then, the
block ends with a 2x1 max pooling layer, with 2x1 stride,
dividing the input dimension by 2. The final block does not
have a pooling layer. The number of blocks can be changed to
achieve higher or lower stride, complexity, and more refined
features. A lower stride results in less downscaling of the
input, and thus more features. Since each feature represents an
anchor box, the granularity of anchor boxes can be increased.
In turn, a higher stride results in more downscaling of the
input, and thus less features. However, these features will be
more refined, include more of the input image, and reduce
inference time. A trade-off must be struck between increasing
the granularity of features, the number of anchor boxes, and
the complexity.
As a baseline, we use this VGG net setup. We test it with
strides of 2, 4, 8, 16, and 32. Each increase in stride is
an increment on the previous layers. These are summarized
in Table I, as well as the number of filters for the output
convolution.
9
Fig. 11: Architecture of the VGG feature extraction network.
Downscale Factor
2
4
8
16
32
Filter Count
64
128
256
512
512
TABLE I: VGG Network Parameters
B. Resnet feature extraction
We test an additional common image processing architecture
called Resnet, of which the typical architecture could be seen
in Fig. 12. The core of ResNet is the skip connection, which
forwards parameters through the network. This allows some
blocks to be skipped, if they do not contribute to the output.
We compare the use of these skip layers, by applying them to
the outlined VGG net. A skip layer is added in parallel with
each block, where the features are concatenated together after
the third convolution. Following this, batch normalization is
added to improve training, and max pooling is performed to
achieve data reduction. The resnet method was only tested for
a stride of 16.
C. Signal Processing Architecture
In previous research, we used an architecture designed and
tuned for signal processing [13], [14], illustrated in Fig. 13.
The network consists of linear blocks of convolutional layers,
ReLU activation, batch normalization, and max pooling. The
filter size of the convolutional layer was designed around
the samples per symbol of the waveform, which relates the
bandwidth of the signal to the receiver's sample rate. We test
this architecture as well, using a stride of 16.
D. Filter Sizes
In Prasad et al [7], the authors downscaled FRCNN for
the spectrum sensing case. While they still used images,
Convolution 3x1Convolution 3x1Convolution 3x1Max Pooling 2x1SignalInputFeatureMatrixBlockrepeated toachievestrideSingle Block10
E. Comparison of Configurations
To compare the architectures, each network was trained
individually. Three datasets were generated, one for each train-
ing, validation, and testing. The same three datasets were used
for training and evaluating each network. Each configuration
was trained for epochs, with 10,000 samples each epoch. The
Adam optimizer, with an initial learning rate of 10−5 was
used. While higher performance could be achieved with more
training epochs, a majority of learning is achieved in the first
4 epochs. This was verified using the validation loss. Thus,
4 epochs was chosen to reduce total training time to evaluate
each architecture. We measure the mean-IoU at SNR levels
of -5, 5, and 20 dB using synthesized data. We choose the
mean-IoU here as it measures the detector's ability to: detect
all signals present, to not raise false alarms, and localize each
signal. These results are shown in Fig. 14. Additionally, we
measure the average inference time for each configuration.
This is the time it takes to process a single frame of data.
We normalize the inference time to the highest measured,
since absolute times will depend on the specific hardware used
for testing. The comparison between different architectures
inference time could be seen in Fig. 15. When comparing
each architecture, we find that VGG net achieves the highest
mIoU, with comparable inference times to other networks.
VGG16 achieves 58% higher mIoU than the second highest
network, the signal network. Additionally, the inference time is
approximately the same as Resnet, which are both the lowest,
with 70% relative inference time. Therefor, we choose VGG-
net as our feature extraction network. Next, we evaluate the
downscaling factor for our feature extraction network. As the
downscaling factor increases, the inference time trends down,
with the exception of factor of 8 being slightly faster than
a factor of 16, although both are comparable. The highest
mIoU is for VGG8, at 20dB SNR, but only by 6% over a
stride of VGG32. However, at lower SNR, VGG16 achieves
17% higher mIoU over VGG32. Therefor, we choose VGG
with a downscaling factor of 16 as our feature extraction
layers due to its highest average mIoU, with decent inference
time. However, it should be noted, that if inference time is
more important, VGG32 is 25% faster than VGG16, with
comparable mIoU.
VII. A USE CASE OF 1D FRCNN IN SIGNAL
CLASSIFICATION
We provide a use case of our optimized 1D FRCNN using
AMC, which is the process of identifying the modulation
type of a given signal. In previous research, we used CNNs
to achieve this with raw baseband samples [12], [13]. In
this use case, we show how this can be extended to the
mixed signal case, to identify the modulation type of each
transmitter present. The process is illustrated in Fig. 16. In
this model, baseband samples from the receiver are supplied
as the input. The model outputs the modulation type for
every signal present. This process detects each transmitter
in frequency domain, separates each transmission in time
domain, then classifies the transmissions individually. First
the FFT is performed on the received baseband samples, and
Fig. 12: Architecture of the Resnet feature extraction network.
Fig. 13: Architecture of the signal processing feature extraction
network.
they found that the high number of filters were unnecessary,
and even detrimental, for this application. They reduced the
number of filters in the RPN's first convolutional layer from
512 to 128. In the classifier, they reduced the number of filters
in both fully connected layers from 4096 to 2048. We also test
this downscaling for the VGG net with 16 stride, to see if we
can achieve similar performance gains. In our results, we label
this as the downscaled version.
Convolution 3x1Convolution 3x1Convolution 3x1Max Pooling 2x1SignalInputFeatureMatrixRepeated4x (16 stride)Conv 1x1 Skip LayerConcatConvolution 8x1Batch NormMax Pooling 2DSignalInputFeatureMatrixRepeated4x (16 stride)with a different signal processing block.
y(t) = s(t) * e−j2πfot
h[n] =
B
f s
sinc(
B
f s
* n)
11
(11)
(12)
Fig. 14: Mean IoU performance of different FRCNN architec-
tures.
Fig. 16: AMC Use Case Process.
VIII. RESULTS
We create four spectrum sensing methods including energy-
based, 2D FRCNN with spectrograms, our optimized 1D
FRCNN, and our 1D FRCNN with an AMC use case. For each
of these methods, we measure the mAP, mIoU, probability of
detection, and probability of false alarm. We first test each
method offline, using the synthesized dataset, giving easy and
accurate control over the SNR of the channel. Each metric is
tested over the SNR range of -5dB to +20dB. Then, we test the
optimized 1D FRCNN with AMC over-the-air, and measure
the four metrics at a consistent SNR.
First, we create the baseline energy-based spectrum sensing
this in Python, using the numpy
method. We implement
package. The implementation follows the process outlined in
Sec. IV-A. For each frame, a noise threshold is calculated
using Eq. 6. Then, the FFT is searched to see where the
amplitude exceeds the calculated threshold. To add hysteresis,
the amplitude must drop below the threshold five consecutive
times. This prevents sudden energy spikes from triggering the
spectrum sensing algorithm. For each test SNR, a dataset is
run independently at the specified SNR. Metrics are calculated
after every image is processed. The energy-based process does
not produce probabilities, therefor, all detections are assumed
to have a probability of 1.0 for calculating metrics.
Next, a baseline 2D FRCNN spectrum sensing method using
spectrograms is created. This implementation uses Yinghan
Xu's [21] code as an implementation in Python using Ten-
sorflow and Keras. The example is modified to support our
spectrogram dataset, using uncompressed tiff files and no
resizing of the spectrogram, as well as our changed hyper-
parameters and architecture, which are shown in Table II. The
Fig. 15: Inference times of different FRCNN architectures.
the result is fed into the FRCNN model to find the location
of all signals. Next, for each detection, the signal must be
extracted from the baseband samples. This can achieved using
the detected center frequency and bandwidth from FRCNN.
This is done by removing the center frequency offset using
Eq. 11, where s(t) is the input signal, and fo is the frequency
offset. Next, a lowpass filter expressed in Eq. 12 is configured
using the detected bandwidth, where B is the bandwidth, fs is
the sampling frequency, and n is the nth tap of the filter. This
is then applied by convolving the filter taps with the baseband
samples. The result is the individual signal of interest, isolated
from all other signals. Finally, the filtered baseband samples
are fed into the AMC CNN, and a classification is produced.
This same process could be applied to other signal processing
applications, by replacing the modulation classification block
-505101520Signal-to-noise Ratio (SNR, dB)00.10.20.30.40.50.6Mean-IoUFRCNN Architecture ComparisonsVGG Stride2VGG Stride4VGG Stride8VGG Stride16VGG Stride32DownscaledSignalResnetNormalized Inference Times of FRCNN ArchitecturesVGG Stride32VGG Stride8VGG Stride16ResnetDownscaledSignalVGG Stride4VGG Stride200.10.20.30.40.50.60.70.80.91Normalized Inference TimeSignalInputFRCNNFFTSignalExtractionAMCModulation Typesarchitecture is trained over 40 epochs using 1000 spectrogram
images. The dataset mixes spectrograms between 10dB and
40dB SNR. For testing, datasets at each SNR are created
and tested independently. Each image is run individually,
and checked against ground-truths. After an entire dataset
for a specific SNR is run, the four metrics are calculated.
A probability threshold of 0.7 is applied to each detection,
where detections with probabilities below 0.7 are considered
negative detections.
Finally, we test our optimized 1D FRCNN method. We use
Yinghan Xu's [21] as a reference and baseline for FRCNN so
that we could create our 1D optimized version. The hyperpa-
rameters used are shown in Table II. The network is trained
over 20 epochs, with each epoch containing 10,000 samples.
We used 10,000 samples in the dataset to counteract overfitting
that occurred at 2,000 samples. For testing, each SNR dataset
is run and tested independently. After an entire dataset is
run, the four metrics are calculated. A probability threshold
of 0.9 is applied to each detection, where detections with
probabilities below 0.9 are considered negative detections.
This threshold was found to give the highest mIoU results
after testing thresholds between 0.0 and 0.9.
Parameter
rpn overlap min
rpn overlap max
nms overlap
Optimizer
Learn Rate
Num Epochs
Epoch Length
1D
0.3
0.7
0.5
2D
0.3
0.7
0.6
Adam Adam
10−5
10−5
40
20
1000
10000
TABLE II: Training Hyperparameters
The mAP measured over SNR could be seen in Fig. 17. The
average mAP over SNR is 0.239 for energy-based, 0.686 for
2D FRCNN, and 0.716 for our 1D FRCNN spectrum sensing.
Both FRCNN methods significantly outperform energy-based
sensing. Our method outperforms 2D spectrograms at low
SNR, however, the mAP falls below 2D after 10dB SNR.
The higher mAP shows the ability of our method to correctly
detect all signals, without making false detections. The mIoU
measured over SNR could be seen in Fig. 18. The average
mIoU over SNR is 0.125 for energy-based, 0.307 for 2D
FRCNN, and 0.587 for our 1D FRCNN spectrum sensing.
Under all SNR conditions, our method localizes transmissions
better than other approaches. The Pd measured over SNR
could be seen in Fig. 19. The average Pd over SNR is 0.469
for energy-based, 0.940 for 2D FRCNN, and 0.823 for our 1D
FRCNN spectrum sensing. The 2D spectrogram method has
the highest probability of detecting transmissions, especially
at low SNR. Our 1D method had higher Pd than energy-based
at low SNR, but significantly under-performed compared to
2D, however, as SNR increases, both 1D and 2D methods
converged to a Pd of nearly 1.0. The Pfa measured over
SNR could be seen in in Fig. 20. The average Pfa over
SNR is 0.169 for energy-based, 0.276 for 2D FRCNN, and
0.166 for our 1D FRCNN. Our optimized version performs
the best on average, over all SNRs. However, energy-based
averages almost the same, and performs significantly better
12
at high SNR. The 2D spectrogram method performs poorly
at low SNR, but the Pfa quickly reaches the same levels as
other methods at 15dB SNR. The relative inference time of
each method is shown in Table III. These are normalized to
the highest inference time, 2D FRCNN. The energy-based
method significantly outperformed both ML-based methods,
being about 500 times faster than our optimized 1D method.
However, our optimization to FRCNN significantly improved
inference time, by a factor of 4 over the original 2D FRCNN.
Method
Energy-Based
1D FRCNN
2D FRCNN
Relative Time
5.00 * 10−4
0.250
1.00
TABLE III: Normalized Inference Times
Our optimizations to FRCNN significantly improve the
localization performance and the inference speed for spec-
trum sensing. The mIoU, our primary performance metric,
increases by 91%, however the mAP increases only slightly
by 4%. Compared to energy-based, both FRCNN methods
significantly outperform at all SNRs. Our optimized version
improved mIoU by 470%, and mAP by 300% compared to
energy-based sensing. For detecting all transmissions present,
2D FRCNN performed the best at low SNR, while both our
optimized version and 2D perform just as well at SNRs above
15dB. Under the SNR intervals tested, energy-based under-
performs compared to FRCNN methods, however, it trends
towards the same Pd for increasing SNR. Finally, when com-
paring probability of false alarm, our method had a low Pfa at
very low SNR, however, the false alarm rate only marginally
improved as SNR increased. Meanwhile, both energy-based
and 2D FRCNN had significantly lower Pfa at higher SNR.
2D FRCNN had high Pfa at low SNR, being almost 2x higher
than the other methods at 5dB SNR. Our optimized FRCNN
shows improved detection and localization performance, as
well as faster inference time over 2D FRCNN. In applications
where detecting all signals present is prioritized, 2D FRCNN
still outperforms our optimized version. Additionally, only the
spectrogram case with 2D FRCNN can jointly localize in time
and frequency domain, if an application requires that. Energy-
based still fits best in applications that require fast inference
times, significantly outperforming both ML based methods.
A. AMC Use Case Results
We test our AMC use case using the same outlined metrics,
however the dataset must change to include mixed-signal time-
domain samples, as well as the class labels for each detection.
The time-domain samples are used after FRCNN detection
to isolate each signal, so that AMC can be performed on
it. The class labels refer to the modulation of each time-
domain signal. First, a dataset was generated to train the
AMC CNN described in Sec. VII, created from 9,000 samples
of the 1D FRCNN dataset. Each sample of the FRCNN
dataset contained on average three transmissions, with random
modulation types. Each transmission was lowpass filtered to
isolate it, and the frequency offset was removed. To simulate
errors in FRCNN, we apply a ±2kHz random frequency offset,
13
Fig. 17: Mean Average Precision vs SNR
Fig. 18: Mean Intersection over Union vs SNR
Fig. 19: Probability of Detection vs SNR
Fig. 20: Probability of False Alarm vs SNR
and a bandwidth offset between 70% and 150% of the signal's
original bandwidth. Additionally, we window an empty part of
the spectrum to simulate a "No Signal" case. The AMC model
is then trained over 40 epochs, with a total of 37548 training
samples, 2492 validation samples, and 12533 test samples. The
large number of test samples was chosen to ensure overfitting
was not occurring. After training, the combined FRCNN and
AMC system was tested, and metrics were measured for mAP,
mIoU, Pd, and Pfa over the SNR range of -5dB to +20dB.
These results could be seen compared to energy based, 2D
FRCNN, and our optimized 1D FRCNN without AMC, in Fig.
17-20. First, it should be noted that compared to standalone
FRCNN, combining AMC reduces the mAP, mIoU, and Pd.
The ability of the system to detect and localize signals does
not change, however, mislabelling signals will reduce each
of these metrics. For example, a detected signal classified
as "BPSK", when it was actually "PAM4", would factor in
as a false positive detection, and an IoU of 0. The average
mAP drops by 11% to 0.638, the average mIoU drops by
30% to 0.413, and the Pd drops by 28% to 0.594. However,
the Pfa improves, dropping by 10% to 0.149, significantly
outperforming all models. The Pfa metric is not effected by
false positives over ground truths, and thus misclassifications,
but the introduction of a "No Signal" class filters out additional
false positive detections over noise. This use case shows that
our optimized FRCNN model can be applied to mixed signal
classification, when multiple and unknown signals are present
in an uncontrolled band.
B. Over-the-Air Results
Finally, we test our system OTA by using SDR. We test our
combined AMC and FRCNN model, to show the feasibility of
this system to a realistic and real-world environment. We used
the same trained models for 1D FRCNN and AMC that we
collected metrics on. Two USRP N2901 SDRs were used to
create the cluttered environment, where a total of five simul-
taneous transmissions were tested. A single antenna receiver
observed the spectrum, and applied our spectrum sensing and
AMC algorithm. Each SDR channel was configured to operate
at a 5GHz center frequency, with a 200kHz baseband sample
rate. GNURadio was used to interface the SDRs with a PC,
-505101520Signal to Noise Ratio (SNR, dB)0.10.20.30.40.50.60.70.80.9mAPMean Average Precision vs SNREnergyFRCNN 2DFRCNN 1DFRCNN 1D w/ AMC-505101520Signal to Noise Ratio (SNR, dB)00.10.20.30.40.50.60.70.8mIoUMean IoU vs SNREnergyFRCNN 2DFRCNN 1DFRCNN 1D w/ AMC-505101520Signal to Noise Ratio (SNR, dB)00.10.20.30.40.50.60.70.80.91PdProbability of Detection vs SNREnergyFRCNN 2DFRCNN 1DFRCNN 1D w/ AMC-505101520Signal to Noise Ratio (SNR, dB)00.10.20.30.40.50.6PfaProbability of False Alarm vs SNREnergyFRCNN 2DFRCNN 1DFRCNN 1D w/ AMCand ZMQ was used to transfer samples between GNURadio
and Python for ML. A total of three different transmitter
configurations were run, described in Table IV. These were
created by generating the transmit waveforms in Python, and
frequency multiplexing them in baseband. When received, this
has the same effect as transmitting each signal at a different
center frequency. Received samples were binned into frames of
1024, and processed using FRCNN. Each run was conducted
until a total of 1000 frames were received, and each frame was
processed online, as they were received. Since the SDR frame
period was approximately 5ms, while the FRCNN inference
time on our hardware was approximately 500ms, the system
could not be run in real time. Instead, the spectrum was
periodically observed, at the same rate as the inference time.
While FRCNN was processing the received samples, current
received samples were dropped, to ensure only the most recent
samples were used. An FFT plot of each run could be seen in
Fig. 21-23, where the estimated center frequency, bandwidth,
and modulation type are displayed above each detection. After
running each test, the mAP, mIoU, Pd, and Pfa were calculated
for each run, then averaged together, and could be seen in
Table V. Compared to offline tests at 20dB SNR, the mAP,
mIoU, and Pd remained the same, with at most a 1.6% change
between mAP. The Pfa decreased significantly, by about 90%,
from 0.009 to 0.001. This is most likely due to the OTA
SNR being higher. Compared to other literature that measures
OTA performance, we show a significant improvement in OTA
results. In Prasad et al [7], the authors found that their model
did not generalize OTA, and produced an mAP of only 0.125.
With our mAP of 0.826, we show that our system is capable
of generalizing to real-world environments, and performing
significantly better OTA.
Fig. 21: OTA Run 1 with FRCNN Detection.
Signal Number
fc B Mod Type
Run 1
TABLE IV: OTA Configurations
mAP
mIoU
Pd
Pfa
Run 1
0.728
0.509
0.675
0.000
Run 2
0.885
0.739
0.877
0.002
Run 3
0.904
0.817
0.932
0.000
Average
0.839
0.688
0.828
0.001
TABLE V: OTA Results
14
Fig. 22: OTA Run 2 with FRCNN Detection.
Fig. 23: OTA Run 3 with FRCNN Detection.
IX. CONCLUSION
In this research, we optimized FRCNN for 1D spectrum
sensing, enabling FRCNN to be applied to 1D signals, a
feature that was not previously possible. To perform spectrum
sensing, we preprocess received signals with the FFT,
to
reveal frequency information. RF data was synthesized to
train the optimized algorithm for spectrum sensing, as well as
for testing the performance. Our optimizations improved the
model in localization performance and inference time. Overall,
the mIoU averaged 470% improvement over energy-based, and
91% improvement over 2D spectrograms. Optimizing for the
1D case improved inference time by 4 times compared to 2D
spectrograms, however, compared to energy-based detection,
ML approaches are still significantly slower, even with our
optimizations. While our model performed well in detecting
transmissions, 2D spectrograms had higher Pd at low SNR,
while energy based had lower Pfa at high SNR. To demonstrate
the application of our optimizations, we provide a use case for
multi-signal AMC. Time-domain samples are filtered to isolate
individual signals based on FRCNN detections. Since this
introduces a new source of error, labelling error, it causes the
mAP and mIoU to drop slightly. However, by also analyzing
signals in time domain, false negatives can be filtered out,
greatly improving the false alarm rate. The Pfa for our AMC
use case is comparable to energy-based. Over-the-air tests
were performed with our optimized FRCNN and AMC use
case. We used two USRP N2901, to transmit up to 5 signals
simultaneously, within a 200kHz band. We demonstrate that a
single antenna receiver can use our architecture to accurately
locate all signals. The demonstration was performed online,
1000007500050000250000250005000075000100000Frequency Offset (relative to fc), f (Hz)60504030201001020Amplitudef=-40.6kHzbw=25.0kHz16qamf=60.9kHzbw=21.9kHzpam4f=-1.6kHzbw=15.6kHzbpskf=-75.0kHzbw=12.5kHz16qamRx FFT (fc=5GHz)1000007500050000250000250005000075000100000Frequency Offset (relative to fc), f (Hz)604020020Amplitudef=59.4kHzbw=12.5kHzpam4f=18.8kHzbw=25.0kHzbpskf=-50.0kHzbw=25.0kHz16qamRx FFT (fc=5GHz)1000007500050000250000250005000075000100000Frequency Offset (relative to fc), f (Hz)60504030201001020Amplitudef=78.1kHzbw=18.8kHz16qamf=0.0kHzbw=18.8kHzpam4f=35.9kHzbw=15.6kHzbpskf=-70.3kHzbw=15.6kHzpam4f=-34.4kHzbw=25.0kHz16qamRx FFT (fc=5GHz)15
[10] S. Kayraklik, Y. Alag ̈oz, and A. F. Cos ̧kun, "Application of Object
Detection Approaches on the Wideband Sensing Problem," in 2022 IEEE
International Black Sea Conference on Communications and Networking
(BlackSeaCom), Jun. 2022, pp. 341–346.
[11] S. Ren, K. He, R. Girshick, and J. Sun, "Faster R-CNN: Towards
Real-Time Object Detection with Region Proposal Networks," Jun.
2015. [Online]. Available: https://arxiv.org/abs/1506.01497v3
[12] C. Gravelle, T. Morehouse, and R. Zhou, "Deep Learning-Enabled Real-
Time Recognition of Wireless Signals," in 2019 IEEE International
Symposium on Dynamic Spectrum Access Networks (DySPAN), Nov.
2019, pp. 1–2, iSSN: 2334-3125.
[13] T. Morehouse, N. Rahimi, M. Shao, and R. Zhou, "Baseband Modu-
lation Classification using Incremental Learning," in 2020 IEEE 63rd
International Midwest Symposium on Circuits and Systems (MWSCAS),
Aug. 2020, pp. 225–228, iSSN: 1558-3899.
[14] T. Morehouse, C. Montes, M. Bisbano, J. F. Lin, M. Shao, and
learning-based jammer classification," in
R. Zhou, "Incremental
Artificial
Intelligence and Machine Learning for Multi-Domain
Operations Applications III, T. Pham, L. Solomon, and M. E. Hohil, Eds.
Online Only, United States: SPIE, Apr. 2021, p. 78. [Online]. Available:
https://www.spiedigitallibrary.org/conference-proceedings-of-spie/
11746/2588003/Incremental-learning-based-jammer-classification/10.
1117/12.2588003.full
[15] Z. Li and J. Wang, "An improved algorithm for deep learning YOLO
network based on Xilinx ZYNQ FPGA," in 2020 International Confer-
ence on Culture-oriented Science & Technology (ICCST), Oct. 2020, pp.
447–451.
[16] R. Bassiouny, A. Mohamed, K. Umapathy, and N. Khan, "An Inter-
pretable Object Detection-Based Model For The Diagnosis Of Neonatal
Lung Diseases Using Ultrasound Images," in 2021 43rd Annual Inter-
national Conference of the IEEE Engineering in Medicine & Biology
Society (EMBC), Nov. 2021, pp. 3029–3034, iSSN: 2694-0604.
[17] J. U. Kim and Y. Man Ro, "Attentive Layer Separation for Object
Classification and Object Localization in Object Detection," in 2019
IEEE International Conference on Image Processing (ICIP), Sep. 2019,
pp. 3995–3999, iSSN: 2381-8549.
[18] K. N. Renu Chebrolu and P. Kumar, "Deep Learning based Pedestrian
Detection at all Light Conditions," in 2019 International Conference on
Communication and Signal Processing (ICCSP), Apr. 2019, pp. 0838–
0842.
[19] Z. Wu, C. Liu, C. Huang, J. Wen, and Y. Xu, "Deep Object Detection
with Example Attribute Based Prediction Modulation," in ICASSP 2022
- 2022 IEEE International Conference on Acoustics, Speech and Signal
Processing (ICASSP), May 2022, pp. 2020–2024, iSSN: 2379-190X.
[20] L. Liu, B. Zhou, G. Liu, D. Lian, and R. Zhang, "Yolo-Based Multi-
Model Ensemble for Plastic Waste Detection Along Railway Lines,"
in IGARSS 2022 - 2022 IEEE International Geoscience and Remote
Sensing Symposium, Jul. 2022, pp. 7658–7661, iSSN: 2153-7003.
implemented
"Faster R-CNN (object
[21] Y. Xu,
detection)
by
Images. . . ,"
Keras
Feb.
https://towardsdatascience.com/
faster-r-cnn-object-detection-implemented-by-keras-for-custom-data-from-googles-open-images-125f62b9141a
custom data
[Online]. Available:
from Google's Open
for
2019.
to show the ability to integrate the model with a receiver
system. Compared to other papers that collected OTA metrics,
our model performed significantly better. In Prasad et al [7]
the authors measured an OTA mAP of 0.125, while our
mAP was measured 0.826. However, our work could still
benefit from several improvements, including faster inference
improved probabiltiy of detection and probality of
times,
false alarm, and greater performance at low SNR. In future
applications, we plan to extend our work to other object
detection in signal processing, integration into larger systems,
and implementation on an FPGA for real-time acceleration.
Our results contribute to broader spectrum sensing research,
as well as object detection in signal processing. We show
improved spectrum sensing results, beyond state of the art,
for cluttered RF environments. Additionally, we improve the
inference time over previous FRCNN methods. Our work can
also be extended to other signal processing applications, where
object detection is useful, such as localizing anomalies in a
signal.
ACKNOWLEDGEMENTS
This work was supported by AFRL Beyond 5G SDR Uni-
versity Challenge program, the University of Massachusetts
Dartmouth's Marine and Undersea Technology (MUST) Re-
search Program funded by the Office of Naval Research
(ONR) under Grant No. N00014-20-1-2170, and ONR Naval
Engineering Education Consortium (NEEC) program under
Grant No. N00174-22-1-0008.
REFERENCES
[1] W. Zhao, H. Li, M. Jin, Y. Liu, and S.-J. Yoo, "Eigenvalues-Based
Universal Spectrum Sensing Algorithm in Cognitive Radio Networks,"
IEEE Systems Journal, vol. 15, no. 3, pp. 3391–3402, Sep. 2021,
conference Name: IEEE Systems Journal.
[2] C. Liu, J. Wang, X. Liu, and Y.-C. Liang, "Maximum Eigenvalue-Based
Goodness-of-Fit Detection for Spectrum Sensing in Cognitive Radio,"
IEEE Transactions on Vehicular Technology, vol. 68, no. 8, pp. 7747–
7760, Aug. 2019, conference Name: IEEE Transactions on Vehicular
Technology.
[3] J. Xie, J. Fang, C. Liu, and X. Li, "Deep Learning-Based Spectrum
Sensing in Cognitive Radio: A CNN-LSTM Approach," IEEE Commu-
nications Letters, vol. 24, no. 10, pp. 2196–2200, Oct. 2020.
[4] J. Xie, C. Liu, Y.-C. Liang, and J. Fang, "Activity Pattern Aware
Spectrum Sensing: A CNN-Based Deep Learning Approach," IEEE
Communications Letters, vol. 23, no. 6, pp. 1025–1028, Jun. 2019,
conference Name: IEEE Communications Letters.
[5] T. O'Shea, T. Roy, and T. C. Clancy, "Learning robust general radio
signal detection using computer vision methods," in 2017 51st Asilomar
Conference on Signals, Systems, and Computers, Oct. 2017, pp. 829–
832, iSSN: 2576-2303.
[6] K. N. R. S. V. Prasad, K. B. Dsouza, V. K. Bhargava, S. Mallick,
and H. Boostanimehr, "A Deep Learning Framework for Blind Time-
Frequency Localization in Wideband Systems," in 2020 IEEE 91st
Vehicular Technology Conference (VTC2020-Spring), May 2020, pp. 1–
6, iSSN: 2577-2465.
[7] K. N. R. S. V. Prasad, K. B. D'souza, and V. K. Bhargava, "A
Downscaled Faster-RCNN Framework for Signal Detection and Time-
Frequency Localization in Wideband RF Systems," IEEE Transactions
on Wireless Communications, vol. 19, no. 7, pp. 4847–4862, Jul. 2020,
conference Name: IEEE Transactions on Wireless Communications.
[8] A. Vagollari, V. Schram, W. Wicke, M. Hirschbeck, and W. Gerstacker,
"Joint Detection and Classification of RF Signals Using Deep Learning,"
in 2021 IEEE 93rd Vehicular Technology Conference (VTC2021-Spring),
Apr. 2021, pp. 1–7, iSSN: 2577-2465.
[9] Y. Ghanney and W. Ajib, "Radio Frequency Interference Detection using
Deep Learning," in 2020 IEEE 91st Vehicular Technology Conference
(VTC2020-Spring), May 2020, pp. 1–5, iSSN: 2577-2465.
|
|
http://arxiv.org/abs/2302.13850v1 | 2023-02-20T09:02:10 | 2023-02-20T09:02:10 | Exploring the Advantages of Transformers for High-Frequency Trading | This paper explores the novel deep learning Transformers architectures for
high-frequency Bitcoin-USDT log-return forecasting and compares them to the
traditional Long Short-Term Memory models. A hybrid Transformer model, called
\textbf{HFformer}, is then introduced for time series forecasting which
incorporates a Transformer encoder, linear decoder, spiking activations, and
quantile loss function, and does not use position encoding. Furthermore,
possible high-frequency trading strategies for use with the HFformer model are
discussed, including trade sizing, trading signal aggregation, and minimal
trading threshold. Ultimately, the performance of the HFformer and Long
Short-Term Memory models are assessed and results indicate that the HFformer
achieves a higher cumulative PnL than the LSTM when trading with multiple
signals during backtesting. | [
"Fazl Barez",
"Paul Bilokon",
"Arthur Gervais",
"Nikita Lisitsyn"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.13850v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.13850v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "q-fin.ST",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"q-fin.ST",
"cs.LG"
] | 3
2
0
2
b
e
F
0
2
]
T
S
.
n
i
f
-
q
[
1
v
0
5
8
3
1
.
2
0
3
2
:
v
i
X
r
a
EXPLORING THE ADVANTAGES OF TRANSFORMERS FOR
HIGH-FREQUENCY TRADING
A PREPRINT
Fazl Barez
Edinburgh Centre for Robotics
The University of Edinburgh
[email protected]
Paul Bilokon
Department of Computing
Imperial College London
[email protected]
Arthur Gervais
Department of Computing
Imperial College London
[email protected]
Nikita Lisitsyn
Department of Computing
Imperial College London
[email protected]
February 28, 2023
ABSTRACT
This paper explores the novel deep learning Transformers architectures for high-frequency
Bitcoin-USDT log-return forecasting and compares them to the traditional Long Short-Term
Memory models. A hybrid Transformer model, called HFformer, is then introduced for time
series forecasting which incorporates a Transformer encoder, linear decoder, spiking activa-
tions, and quantile loss function, and does not use position encoding. Furthermore, possible
high-frequency trading strategies for use with the HFformer model are discussed, including
trade sizing, trading signal aggregation, and minimal trading threshold. Ultimately, the per-
formance of the HFformer and Long Short-Term Memory models are assessed and results
indicate that the HFformer achieves a higher cumulative PnL than the LSTM when trading
with multiple signals during backtesting1.
1 Introduction
Forecasting Financial Time Series (FTS) has been of interest to financial market participants who are in-
It has historically been approached using
terested in making profitable trades on the financial markets.
stochastic and machine learning models. Stochastic methods include linear models such as Autoregres-
sive Integrated Moving Average (ARIMA) [1] that support non-stationary time series and non-linear mod-
els, including the Generalized Autoregressive Conditional Heteroskedasticity (GARCH) [2] model. Machine
learning methods are data-driven approaches, among which Recurrent Neural Networks (RNNs) [3], more
specifically, Long Short-Term Memory (LSTM) networks [4], have been especially popular for time series
prediction. Periodically, new deep learning models are being adopted in quantitative research to find the
most accurate models in FTS forecasting that would lead to more efficient trading strategies.
Recently, a new type of deep learning [5] architecture called Transformer [6], relying on Attention [7],
was introduced for Natural Language Processing (NLP) applications. Transformers have since been used in
other applications such as computer vision tasks [8] and more recently in time series forecasting. This paper
will focus on the application of Transformers in high-frequency FTS forecasting.
FTS are characterized by properties including frequency, auto-correlation, heteroskedasticity, drift, and
seasonality [9]. The frequency of trading strategies ranges from milliseconds to minutes and days. Most
studies on FTS forecasting [10, 11] focus on minute frequencies as millisecond trading data is expensive. For
1The code will be publicly available upon publication
Exploring the Advantages of Transformers for High-Frequency Trading
A PREPRINT
the results of this paper to be in line with real-world trading conditions, we will use millisecond frequency
tick price and level 2 Limit Order Book (LOB) data [12] which will allow us to focus on the bid and ask
prices and quantities of the first ten levels of the LOB. We will be using data collected from the Binance
cryptocurrency exchange for the Bitcoin - USDT trading pair.
Traders require automated systems to make decisions based on the order book and tick price data at
millisecond frequencies. Stochastic modeling has long been used to describe prices as exogenous random
variables, however, it relies on assumptions that may oversimplify the complexity of financial markets. Con-
trary to stochastic modeling, deep learning forecasting relies on a data-driven approach to learn past dynam-
ics to predict future behavior. Deep learning approaches have shown promising results in High-Frequency
Trading (HFT) strategies [10]. Currently, LSTMs are the most widely used deep learning architecture for
FTS forecasting [13]. However, LSTMs are affected by vanishing and exploding gradient problems for long
time series [14], and they are sequential structures that are difficult to parallelize.
Transformers use multi-head Attention to capture long-term dependencies and are naturally paralleliz-
able, which makes them a good candidate for low-latency trading strategies. However, Transformers were
not specifically engineered for modeling local sequential structures and require finely tuned position embed-
dings. Modeling short- and long-range temporal dependencies while accounting for FTS properties (e.g.,
seasonality and auto-correlation) remains an open question [15, 16].
In this paper, we compare the performance of existing deep learning architectures for FTS forecasting.
We then introduce an improved deep learning model called the HFformer, which combines certain features
of previously compared architectures. Finally, we compare the performance of the HFformer to existing
architectures in the context of FTS forecasting. We focus on describing the collected cryptocurrency data and
detailing the pre-processing of the data before feeding it into deep learning models. Then, we cover the LSTM
and original Transformer encoder-decoder architecture and compare their forecasting performance. We focus
on understanding more recent Transformer architectures precisely engineered for time series forecasting:
Autoformer and FEDformer. We evaluate the idiosyncrasies of these novel architectures and compare their
performance to the original Transformer. We combine some novelties introduced by time series Transformer
architectures to create a Transformer specifically optimized for HFT, which we refer to as HFformer. Finally,
we compare the HFformer's performance to the most currently used deep learning architecture for FTS
forecasting, the LSTM, on larger datasets. We also compare the trades done by both architectures. We
conclude by presenting possible trading strategies and assessing their performance.
2 Background and Related Work
2.1 FTS
The world financial markets have undergone a technological revolution in the past decades. The execution
time of market orders decreased from 25 ms in 2000 to less than 0.017 ms in 2017 [17]. The trades
are spaced randomly and endogenously [18] as more trading occurs during market openings and closings,
breaking news, and abrupt price changes. This leads to auto-correlated prices and quantities. FTS are
non-stationary as they exhibit seasonality at different scales linked to the market opening hours, underlying
assets, and economic events. Properties such as trend, drift, auto-correlation, and heteroskedasticity make
FTS forecasting a challenging problem.
2.2 Traditional Methods for FTS
Stochastic FTS forecasting relies on linear and non-linear methods. Linear models include Moving Average
(MA), Autoregressive (AR), and ARIMA [19] models. Linear models can solve stationary and non-stationary
time series. Non-linear models such as GARCH and GARCH-based models are used to forecast stock market
volatility exhibiting heteroskedasticity [20].
Currently, LSTMs are successfully used for minute-frequency FTS forecasting [21] for one- and multi-
step forecasting [22]. Convolutional Neural Networks (CNNs) and LSTM-CNNs are used to extract informa-
tion from LOBs [10]. Spiking Neural Networks (SNNs) predict price spikes for HFT strategies [23].
Attention layers have been combined with LSTMs [24] for NLP sentiment classification tasks. Recently,
LSTM encoder-decoder architectures with dual Attention have been used to make the encoder and decoder
hidden state selection more relevant for FTS forecasting [11].
2.3 Transformers for FTS
Initially introduced for NLP, the Transformer has shown state-of-the-art performance for forecasting time
series [25]. The Transformer requires a positional encoding, such as Time2Vec [26], to be added to the
2
Exploring the Advantages of Transformers for High-Frequency Trading
A PREPRINT
input embeddings to model time series. Novel Transformer designs [27] have focused on reducing the
O(L2) complexity by using causal convolutions or sparse bias in the Attention module to process longer
sequences.
Other structural changes were made to improve time series forecasting. The Autoformer [15] has a mod-
ified auto-correlation Attention module that selects the top-k similar sub-sequences. The Temporal Fusion
Transformer (TFT) [28] uses static covariate encoders, gating layers for noise suppression, and recurrent
layers for local processing. The FEDformer [16] performs a Fourier and Wavelet time series decomposition
using the Attention mechanism.
3 Exploratory Data Analysis
3.1 FTS data
Level 2 LOB data is collected from the Binance cryptocurrency exchange for the BTC-USDT trading pair using
Binance's 100 ms LOB web socket2.
Most of the collected LOB snapshots for the BTC-USDT trading pair are within 100 ms. We then proceed
to compute the weighted midprice defined as follows:
M idpricet =
qa;1
t
* pa;1
t + qb;1
2
t
* pb;1
t
(1)
where pa;1
t
at time t.
, qa;1
t
, pb;1
t
, and qb;1
t
are the bid price and quantity and ask price and quantity of level 1 of the LOB
We process the collected LOB data by dropping snapshots with the same consecutive midprice value as
the analysis will be done at trade time rather than wall clock time. This is done because we are interested in
predicting the values at which the future trades will occur, and this brings the distribution of the observed
values closer to a normal distribution (cf. subsubsection 3.1.1).
In this paper, the terms "midprice" and
"weighted midprice" will be used interchangeably.
3.1.1 Log-Returns
One challenge with FTS is that the range of values varies significantly, even for the same financial asset. If
we want to apply a deep learning method to forecast FTS, we need to transform the time series to remove
the non-stationarity. Usually, three price time series transformations are proposed:
• price differencing: dt+1 = pt+1 − pt
t+1 = pt+1−pt
• returns: r∗
pt
• log-returns: rt+1 = log(pt+1) − log(pt)
All three of these methods remove the non-stationarity of prices. However, using price differencing
preserves the units and will be proportional to the underlying price of the asset, which is undesirable in the
case of Bitcoin because of its high volatility. On the contrary, returns and log-returns are unitless as it is a
ratio of two prices. Returns represent the change in asset price as a percentage and are therefore widely
used in finance for their convenience.
From now on, we focus on forecasting log-returns over different time horizons. We define log-returns
the following way:
rt+τ = log(pt+τ ) − log(pt) = log
(cid:19)
(cid:18) pt+τ
pt
(2)
where τ ∈ {1, ..., 30}. τ is the value of the forecasting horizon.
The range of considered forecasting horizons can be justified using the Augmented Dickey-Fuller (ADF)
stationarity test, which tests for different horizons of the log-returns. As the prediction horizon increases,
the information contained in the observed prices, quantities, and historical returns becomes less informative
for future predictions (cf. Figure 1) because the time series becomes less stationary. A lower value means
that the time series exhibits stronger stationary properties.
2More details on Binance's LOB web socket can be found at https://www.binance.com/en/binance-api.
3
Exploring the Advantages of Transformers for High-Frequency Trading
A PREPRINT
Figure 1: Augmented Dickey-Fuller stationarity test for different log-return horizons of four different samples of
9000 LOB snapshots.
3.1.2 LOB
The LOB contains information about the bid and ask prices and the quantities offered at those prices (cf.
Figure 2). Market participants can choose to place different types of orders. Market orders are executed
at the current market price if the offered quantity allows; otherwise, the order will be partially filled until
completion at higher levels of the LOB for buy orders and lower levels of the LOB for sell orders. This can
sometimes lead to price slippage, resulting in a less desirable average fill price. Another strategy is to place a
limit order which will be executed only at the specified price or better as mentioned in the order. Depending
on the limit price, these orders will appear at a certain level in the LOB.
Figure 2: Bid-ask pressure for 10 levels of bid and ask for BTC-USDT.
Figure 2 shows two examples of the bid-ask pressure. In the first case, the midprice will have a greater
resistance to change than in the second case since a larger amount of BTC would need to be bought or sold
to move the midprice.
From Figure 3, we notice that as the bid pressure builds up in the LOB, the weighted midprice starts
to move higher and vice-versa for the ask pressure. This leads us to explore the predictive power of the
information contained in the LOB for forecasting future log-returns.
3.1.3 Normalization of FTS
To improve the performance of machine learning methods, input data needs to be normalized. Traditionally,
the normalization parameters from the training set are applied to the test set (e.g., the mean and standard
deviation of the training data). However, as in the case of the BTC-USDT pair, the mean and standard
deviation of the prices and quantities fluctuate significantly. Taking this into account, we propose to use
online normalization.
The online normalization of the input data is done by computing the mean and standard deviation of
the data contained in the look-back window. We then normalize the data in the look-back window using the
computed mean and standard deviation. Later, we will test the performance of the forecasting models for
look-back windows of sizes 100, 200, 300, and 400 timesteps (cf. Figure 12). During data normalization,
it is important not to compute any estimates based on future values that we want to forecast to avoid
contaminating the training set.
4
20406080100Horizon18161412108ADF statisticAugmented Dickey-Fuller Stationarity Test - BTC-USDT30199.530200.030200.530201.030201.530202.030202.530203.0Price01234567AmountLOB Snapshot 1218462184821850218522185421856Price0.00.51.01.52.02.53.03.54.0AmountLOB Snapshot 2Exploring the Advantages of Transformers for High-Frequency Trading
A PREPRINT
Figure 3: LOB bid-ask pressure for 10 aggregated levels.
4 LSTM and Transformers for FTS
4.1 LSTM
Recurrent Neural Networks (RNNs) are neural networks that were developed to work with sequential data to
model dependencies of arbitrary length. The goal is to learn the mapping between x1:T and y1:T by encoding
the input sequence into a hidden state ht that is then decoded into yt:
ht = φh(Whht−1 + Wxxt + bh)
yt = φy(Wyht + by)
(3)
(4)
where Wh, Wx, Wy, bh, by are learned parameters and φh and φy are activation functions.
However, RNNs suffer from vanishing/exploding gradients due to the backpropagation mechanism used
during Gradient Descent (GD). GD is an iterative optimization algorithm used to find a given function's local
optimum to reduce the difference between the predicted and true values. Various loss functions are used to
compute the difference between the true and predicted values, which is then propagated back to modify the
weights of the model. This issue is mitigated by using memory cell states and gating mechanisms in LSTMs:
f t = σ(Wf * [ht−1, xt] + bf )
it = σ(Wi * [ht−1, xt] + bi)
ot = σ(Wo * [ht−1, xt] + bo)
̃ct = tanh(Wc * [ht−1, xt] + bc)
ct = f (cid:12) ct−1 + it (cid:12) ̃ct
ht = ot (cid:12) ct
(5)
(6)
(7)
(8)
(9)
(10)
where Wf , Wi, Wo, Wc, bf , bi, bo, bc and σ* is the sigmoid activation function.
4.2 Transformer
4.2.1 Attention
A scaled dot-product Attention [6] mechanism is a key-value lookup based on a query matrix Q, key matrix
K, and value matrix V described as:
Attention(Q, K, V ; α) = α
(cid:32)
QKT
(cid:112)dq
(cid:33)
V
(11)
where Q ∈ RN ×dq , K ∈ RM ×dq , V ∈ RM ×dv , and α(.) is an activation function applied row-wise. dq and dv
represent the dimensions of the query and value vectors respectively. The sof tmax(.) activation function is
used in Transformers and is defined as:
sof tmax(xi) =
exp(xi)
j exp(xj)
(cid:80)
(12)
Intuitively sof tmax(.) transforms a vector x into a probability vector for which the sum of elements adds up
to 1.
5
100020003000400050006000Timesteps0.00.20.40.60.81.0Bid-Ask PressureLOB Bid-Ask Pressure - 10 Levels Aggregated - BTC-USDT30190302003021030220302303024030250Exploring the Advantages of Transformers for High-Frequency Trading
A PREPRINT
Transformers, compared to RNNs, are easily parallelizable and can be fed multiple consecutive time
series in a batch to encode and decode. However, providing consecutive time series may prevent the Trans-
former from learning, as it could use the time series in the batch to see the "future." Masked Attention
prevents the Transformer from seeing future values:
M askedAttention(Q, K, V ; α, M ) = α
mask
(cid:32)
(cid:32)
(cid:33)(cid:33)
, M
V
QKT
(cid:112)dq
(13)
where M nm is 0 for masking and 1 otherwise. When M nm = 0, set (QKT )nm = −∞ which in the case
= 0. Therefore, the value vm will not contribute to the Attention
of sof tmax(.) will result in exp
output for query qn.
(cid:18)
(cid:19)
QKT√
dq
Transformers combine multiple Attention heads into a multi-head Attention module where each head
captures different parts of the sequence, which allows for coarser and finer encodings of the time series.
4.2.2 Position Encoding
Notice that scaled dot-product Attention is permutation equivariant:
Attention(P Q, K, V ; α) = α
(cid:33)
(cid:32)
P QKT
(cid:112)dq
V = P α
(cid:33)
(cid:32)
QKT
(cid:112)dq
V = P Attention(Q, K, V ; α)
(14)
As the ordering information matters in time series forecasting, where we input a sequence of queries
q1, . . . , qN , we construct a modified version of the query matrix Q:
where f (.) is a summation and concatenation, and P E(n) is the position encoding of input with index n,
which could be learned or computed. We use sinusoid embedding to encode FTS ordering information.
(cid:101)Q = ( (cid:101)q1, . . . , (cid:101)qN )T ,
(cid:101)qn = f (qn, P E(n))
(15)
4.2.3 Layer Normalization
Layer normalization [29] is used to stabilize the training of the neural network.
Let y = {y1, . . . , yn} = W x + b be the output of a feed-forward layer before going through an activation
function. The layer normalization is defined as:
y ←
y − ˆy
σ
,
ˆy =
1
n
n
(cid:88)
k=1
yk,
σ =
(cid:118)
(cid:117)
(cid:117)
(cid:116)
1
n
n
(cid:88)
k=1
(yk − ˆy)2
In Transformers, layer normalization is applied with a residual connection:
Add&N orm(x) = LayerN orm(x + Sublayer(x))
(16)
(17)
where Sublayer(.) can either be a multi-head Attention layer or a point-wise feed-forward network.
4.2.4 Point-wise Feed-forward Network
Transformers use the point-wise feed-forward network as the feed-forward layer. The output of the multi-
head Attention layer after the Add&Norm layer is a N × dout matrix which contains the Attention results for
N queries. The point-wise feed-forward network processes this matrix row by row.
4.3 Novel Transformer Architectures
4.3.1 Autoformer
The Autoformer uses a new type of Attention based on auto-correlation in its encoder and decoder. The
encoder eliminates the long-term trend by series decomposition using the Fast Fourier Transform and focuses
on modeling seasonal patterns. The past seasonal and trend information from the encoder is then used by
the decoder to predict future values.
Compared to the Transformer's full Attention module (cf. Figure 4), the auto-correlation Attention (cf.
Figure 5) achieves a reduced complexity of O(L log(L)) compared to O(L2) for a length-L time series. The
performance improvement is due to querying only the top log(L) entries based on the series periodicity.
6
Exploring the Advantages of Transformers for High-Frequency Trading
A PREPRINT
Figure 4: Attention module in a Transformer [15].
Figure 5: Auto-correlation Attention module in Auto-
former [15].
4.3.2 FEDformer
The FEDformer, similar to the Autoformer, uses seasonal-trend decomposition to predict future values. The
FEDformer uses either the Fast Fourier Transform or the Wavelet Transform to map the time series into the
frequency domain. It then randomly queries the frequency domain Attention module for high-frequency and
low-frequency components, which reduces the complexity from O(L2) to O(L) for length-L time series. The
goal behind using the frequency domain is to achieve an optimal mix between high-frequency components,
which are more affected by local noise, and low-frequency components, which are more affected by the
overall trend of the time series.
4.4 HFformer
Having evaluated existing Transformer-like architectures, we combine some of their different architectural
components into a new Transformer-like architecture called the HFformer. Below is an illustration of the
architecture of the HFformer.
Figure 6: HFformer - Architecture.
4.4.1 Transformer Encoder with Spiking Activation
The HFformer's encoder is based on a Transformer encoder with activation functions that were modified to
be spiking:
SpikingActivation(x) =
(cid:26)x,
0,
if x ≥ threshold,
if x < threshold.
(18)
7
ProcessEncoderProcessAdd & NormFeed ForwardMulti-Head AttentionAdd & NormLOBLinearPredicted Log-Returns QuantilesDecoderSpiking ActivationInput EmbeddingN xx MExploring the Advantages of Transformers for High-Frequency Trading
A PREPRINT
where the threshold is learned during training.
We use a combination of the spiking activation with a PReLU activation function. The Pytorch-Spiking
Python library3 provides the implementation of the spiking activation. Due to the noisy nature of the LOB
data, a spiking activation function reduces the noise propagated through the Transformer encoder by learn-
ing a passing threshold below which the information is not propagated in the encoder.
4.4.2 Linear Decoder
The linear decoder contains two linear layers connected by a PReLU activation function. The decoder needs
to output a single value for each forecast horizon as we forecast log-returns. Shifting from an autoregressive
decoder to a linear decoder helps to reduce error propagation and decrease the training time.
4.4.3 No Positional Encoding
The positional encoding was removed from the model. As a result, the model's performance was improved,
and the training time was reduced as the number of trainable parameters decreased. Positional encoding was
introduced for NLP tasks. It is used as an augmentation technique for the self-Attention mechanism, which
is invariant to the sequence order. However, as we no longer require an autoregressive decoder since we
use a linear decoder, the positional encoding becomes less relevant. Additionally, the amount of information
provided to the Transformer encoder increases with the position dimension, which could serve as a form of
positional encoding [30].
4.4.4 Quantile Loss
The quantile loss is defined as follows:
L(ˆyp
i , yi) = max[q(ˆyp
i − yi), (q − 1)(ˆyp
i − yi)]
(19)
where ˆyp
for the loss.
i is the model's output for a given quantile p and yi is the true value. The mean reduction is used
The HFformer works with MSE and MAE loss. However, quantile loss allows forecasting an interval
around the predicted value. This is helpful when the inter-quartile range becomes larger than the mean
inter-quartile range, which could signify a low certainty about the forecasted value and therefore one might
decide not to enter the trade.
5 Experiments
5.1 Data
To compare the performance of different deep learning architectures, we use a subset of 100,000 LOB snap-
shots, where 80,000 LOB snapshots are used for training and 20,000 for validation (cf. Figure 7 and Fig-
ure 8).
Figure 7: Subset of LOB snapshots used to assess
model performance - Midprice.
Figure 8: Subset of LOB snapshots used to assess
model performance - Bid-Ask pressure.
The same subset of LOB snapshots is used later for comparing different Transformer architectures.
5.2 Setup
The input data fed into the models consists of 38 features:
• 9 bid prices and the 9 associated quantities
• 9 ask prices and the 9 associated quantities
3More details about the Pytorch-Spiking Python library can be found at https://github.com/nengo/pytorch-spiking.
8
2.002.022.042.062.082.10Timesteps1e6218002200022200224002260022800230002320023400MidpriceMidprice - BTC-USDTValidationTraining2.05002.05052.05102.05152.05202.05252.0530Timesteps1e60.00.20.40.60.81.0Bid-Ask PressureLOB Bid-Ask Pressure - 10 Levels Aggregated - BTC-USDT21800218502190021950220002205022100PriceExploring the Advantages of Transformers for High-Frequency Trading
A PREPRINT
• historical lagged log-return variable log
(cid:16) M idpricet
M idpricet−τ
(cid:17)
where τ is the forecast horizon
• the weighted midprice
The model's output is the log-return for a given forecast horizon τ ∈ {1, ..., 30}.
The training uses the adaptive moment estimation Adam with Weight Decay (AdamW) [31] optimizer.
The AdamW optimizer estimates the first and second moment of the gradient and adapts the learning rate
for each input feature. The decoupled weight decay improves the convergence to an optimum.
The Mean Squared Error (MSE) and Mean Average Error (MAE) loss functions were considered for
the LSTM, Transformer, Autoformer, FEDformer, and HFformer models. Models trained with the MSE loss,
although more sensitive to outliers than the MAE loss, yielded a higher out-of-sample R2 score.
5.3 Evaluation
Out-of-sample R2 is used to assess the performance of the models for forecasting log-returns at different
horizons. R2 has the advantage of being interpretable relative to a baseline score. However, R2 is sensitive
to outliers. Finally, after each training epoch, the model's performance is evaluated using training and
validation sets to avoid overfitting.
5.4 Results
Figure 9: Autoformer vs. FEDformer vs. Transformer vs. LSTM vs. HFformer - Log-returns.
From Figure 9, we notice that the LSTM outperforms the Transformer model for all forecasting horizons.
This could be due to the high noise-to-signal ratio that the LOB contains. The Transformer is more sensitive to
noise as it is a more complex neural network which may lead it to overfit the training data even if the training
is done using a validation set to reduce the chances of overfitting. We will later see that the Transformer's
encoder performance improves with noise-reducing activation functions and larger training sets.
Among Transformer-like architectures, the Autoformer achieves the best performance on shorter fore-
casting horizons (cf. Figure 9). The Autoformer and FEDformer require an additional input feature which
is the date and time timestamp, as both of these models use a time embedding. The frequency of the target
time series (e.g., seconds, minutes, and hours) is used as a hyperparameter.
The HFformer outperforms the other Transformer-like architectures, however, it underperforms the
LSTM (cf. Figure 9), however, as the size of the training dataset increases, the HFformer attains better
forecasting results than the LSTM during backtesting.
The hyperparameters are listed in Table 5.
5.5 Ablation Study
We conduct an ablation study to determine the impact of different suggested improvements used in the
HFformer compared to the original Transformer architecture.
The following ablations are made:
• the spiking activation combined with the PReLU activation function is replaced with a PReLU activa-
tion function
• the positional encoding is added back
• the linear decoder is replaced with the autoregressive Transformer decoder
9
51015202530Forecast Horizon0.100.050.000.050.100.15Out-of-Sample R2AutoformerFEDformerTransformer Enc-DecLSTMHFformerExploring the Advantages of Transformers for High-Frequency Trading
A PREPRINT
Figure 10: Ablation study for the HFformer - Log-returns.
We notice from Figure 10 that a major improvement in the R2 score is achieved by replacing the Trans-
former decoder with a linear decoder. Adding a spiking activation and removing the positional encoding
result in marginal improvements.
5.6 Look-back Window: LSTM vs. HFformer
We experiment with the size of the look-back window to find out which size will yield the best performance
for longer forecasting horizons. The LSTM and HFformer models are trained and tested with different look-
back window sizes using the same data as previously.
Figure 11: Look-back window size impact on the HF-
former - Log returns.
Figure 12: Look-back window size impact on the
LSTM - Log-returns.
We notice that increasing the size of the look-back window positively affected the performance of the
LSTM (cf. Figure 12). However, there was no noticeable change for the HFformer (cf. Figure 11).
5.7 Training and Validation Sets
The LSTM and HFformer models are trained on sets of the following size:
• Training set with 80,000 LOB snapshots and validation set with 20,000 LOB snapshots
• Training set with 300,000 LOB snapshots and validation set with 60,000 LOB snapshots
• Training set with 600,000 LOB snapshots and validation set with 120,000 LOB snapshots
Figure 13: Size of validation and test sets impact on the HFformer and LSTM - Log-returns.
10
51015202530Forecast Horizon0.100.050.000.050.100.150.20Out-of-Sample R2OriginalWithout spiking activationWith positional encodingWith Transformer decoder51015202530Forecast Horizon0.0000.0250.0500.0750.1000.1250.1500.1750.200Out-of-Sample R2Input window 100Input window 200Input window 300Input window 40051015202530Forecast Horizon0.0000.0250.0500.0750.1000.1250.1500.1750.200Out-of-Sample R2input window 100input window 200input window 300input window 40051015202530Forecast Horizon0.0000.0250.0500.0750.1000.1250.1500.1750.200Out-of-Sample R2LSTM: Training size 80k, validation size 20kHFformer: Training size 80k, validation size 20kLSTM: Training size 300k, validation size 60kHFformer: Training size 300k, validation size 60kLSTM: Training size 600k, validation size 120kHFformer: Training size 600k, validation size 120kExploring the Advantages of Transformers for High-Frequency Trading
A PREPRINT
From Figure 13, we notice that as the training and validation sets increases the absolute performance of
both models decreases. However, it is important to consider larger training and validation sets, as during live
trading, it can be technically challenging to continuously retrain the model and may lead to overfitting. The
LSTM outperforms the HFformer on smaller training and validation datasets. The HFformer's forecasting
performance improves relative to the LSTM's as the size of the training and validation sets increases.
5.8 Classification Performance
Previous comparisons have been based on R2, which assesses the regressional quality of the model. We now
proceed to study the classification performance of the HFformer and LSTM. For the following comparisons,
we use the HFformer and LSTM models trained on 600,000 LOB snapshots and validated on 120,000 LOB
snapshots. The classification performance is assessed on a test set of size 200,000 LOB snapshots.
We define two classes:
• buy, when the predicted log-return is positive
• sell, when the predicted log-return is negative
The ratios are the true positive rates for each class.
The first comparison is based on true positives and false positives. The second comparison is a mix of
classification and regression. The computed ratios are weighted ratios where the weights are the true values
of the log-returns. The motivation behind this comparison is to assess whether both of the models can classify
relatively large log-returns correctly. This is important in the case of volatile assets such as Bitcoin since, if
the model fails to predict large log-return changes, the trading strategy will result in large drawdowns and
limited upsides.
Figure 14: Classification performance of the HFformer
and LSTM - Log-returns.
Figure 15: Classification performance with weights of
the HFformer and LSTM - Log-returns.
We notice that, on average, the HFformer exhibits a slightly better classification performance than the
LSTM (cf. Figure 14). For the weighted ratio, the overall performance of the HFformer is similar to the
LSTM(cf. Figure 15). However, the HFformer has a smaller gap between the correct buys and correct sells
ratios. We will later examine the impact of having a model that flags buy and sell opportunities in a more
balanced way.
5.9 Backtesting
5.9.1 Strategies
The HFformer and LSTM models were trained on June 2022 data and are now backtested on BTC-USDT
LOB snapshots collected over 2 days (July 21st and 22nd, 2022).
The backtesting is based on the following assumptions:
• No trading fee, which is a realistic assumption as there are no spot trading fees on Binance for the
BTC-USDT pair
• The delay from receiving the snapshots, processing them, and placing a trade is around 200 ms,
which is approximately equivalent to 2 ticks for the LOB snapshots that were collected
• The orders are market orders
• 0.0002% of the amount bought then sold for long trades (and vice-versa for short trades) is sub-
tracted from the Profit and Loss (PnL) to simulate price slippage
• A fixed quantity of 0.1 BTC is traded
The following trading strategies are considered:
11
51015202530Forecast Horizon0.30.40.50.60.70.80.9RatioHFformer: Ratio of correct buys and sellsHFformer: Ratio of correct sellsHFformer: Ratio of correct buysLSTM: Ratio of correct buys and sellsLSTM: Ratio of correct sellsLSTM: Ratio of correct buys51015202530Forecast Horizon0.30.40.50.60.70.80.91.0Weighted RatioHFformer: Weighted ratio of correct buys and sellsHFformer: Weighted ratio of correct sellsHFformer: Weighted ratio of correct buysLSTM: Weighted ratio of correct buys and sellsLSTM: Weighted ratio of correct sellsLSTM: Weighted ratio of correct buysExploring the Advantages of Transformers for High-Frequency Trading
A PREPRINT
• Strategy 1: the trading horizon is 28 ticks. We use the HFformer and LSTM models trained on the
specific horizon to generate a trade signal. If the signal is positive, we open a long position of 0.1
BTC with a delay of 2 ticks and close it after 28 ticks plus 2 ticks of delay. Similarly, if the signal is
negative, we open a short position and proceed with a similar method to the long strategy. While
running strategy 1, when we create a scatter plot of profitable and unprofitable trades based on
start and end signals, we notice a relationship between the sign of the signals and the profitability
of trades (cf. Figure 17).
• Strategy 2: the trading horizon is 28 ticks. We use three HFformer and three LSTM models trained
on the specific horizon and +/- 2 horizons. Only if all 3 signals are positive, we open a long position
of 0.1 BTC with a delay of 2 ticks and close it after 28 ticks plus 2 ticks of delay. Similarly, if all
3 signals are negative, we open a short position and proceed with a similar method to the long
strategy.
• Strategy 3: similar to Strategy 2, however, instead of using 3 signals to trade, we use 5 signals:
signals for horizons 26, 27, 28, 29, and 30.
5.9.2 Results
Strategy 1 results in a final PnL of -10.42 USDT and a total of 13,743 trades for the HFformer and in a final
PnL of -32.54 USDT and a total of 13,743 trades for the LSTM. From Figure 16 and Figure 17, we notice that
most profitable trades happen when the HFformer model outputs start and end signals of the same sign. One
possible explanation is that profitable trades occur when the upward or downward trend predicted by the
model lasts longer than the forecasting horizon. Therefore, one possible improvement to this trading strategy
is to use multiple forecasting horizons to assess whether to go into a trade. The multiple forecasting horizons
can include short forecasting horizons (e.g., 26 and 27), which are shorter than the main forecasting horizon
(e.g., 28 in strategy 1) to reduce the chance of falsely flagging a trading opportunity. Additionally, longer
forecasting horizons (e.g., 29 and 30) can be used to confirm that the upward or downward trend duration
will last beyond the trade delay (e.g., 2 ticks in strategy 1). This leads us to strategy 2.
Figure 16: Cumulative PnL - Strategy 1 - HFformer vs. LSTM.
Figure 17: Relationship between PnL and start and
end signals outputted by the model - Strategy 1 - HF-
former.
Figure 18: Relationship between PnL and start and
end signals outputted by the model - Strategy 1 -
LSTM.
12
020004000600080001000012000Trades402002040PnLHFformerLSTM0.40.30.20.10.00.10.20.30.4Start Signal0.40.30.20.10.00.10.20.30.4End SignalUnprofitable tradeProfitable trade0.40.30.20.10.00.10.2Start Signal0.40.30.20.10.00.10.2End SignalUnprofitable tradeProfitable tradeExploring the Advantages of Transformers for High-Frequency Trading
A PREPRINT
Strategy 2 results in a final PnL of 120.04 USDT and a total of 11,928 trades for the HFformer and in
a final PnL of 9.67 USDT and a total of 12,932 trades for the LSTM. We notice an improvement in the PnL
and a reduction in the total number of trades. The total number of trades decreases as all three models with
different forecast horizons need to output a signal of the same sign for a trade to occur.
Figure 19: Cumulative PnL - Strategy 2 - HFformer vs. LSTM.
From Table 1, we see that the correlation between adjacent signals is high but not 1. This allows
exploring the option of adding more signals and reducing the number of potentially unprofitable trades by
only placing trades when the same signal is exhibited for more models.
PnL
Signal - 26
Signal - 28
Signal - 30
PnL
1
0.002603
0.007165
-0.002530
Signal - 26
Signal - 28
Signal - 30
1
0.938949
0.852447
1
0.867870
1
Table 1: Correlation table for PnL and signals for forecast horizons of 26, 28, and 30 ticks - HFformer.
PnL
Signal - 26
Signal - 28
Signal - 30
PnL
1
0.000514
0.005031
0.001102
Signal - 26
Signal - 28
Signal - 30
1
0.968979
0.972374
1
0.970612
1
Table 2: Correlation table for PnL and signals for forecast horizons of 26, 28, and 30 ticks - LSTM.
Strategy 3 results in a final PnL of 138.78 USDT and a total of 10,976 trades for the HFformer. By
adding two signals, the cumulative PnL has improved by 15.61% compared to strategy 2. As expected, the
number of trades decreased by 7.98% compared to strategy 2 and 20.13% compared to strategy 1. Strategy
3 results in a final PnL of 85.71 USDT and a total of 12,226 trades for the LSTM. By adding two signals, the
cumulative PnL has improved nine-fold. As expected, the number of trades decreased by 5.46% compared
to strategy 2 and 11.04% compared to strategy 1.
Comparing Table 3 and Table 4, we notice that the signals for different forecasting horizons of the
HFformer are less correlated than the signals generated by the LSTM. Therefore when HFformer signals are
combined, we get fewer trades, but these trades exhibit stronger buy or sell signals. As a result, the HFformer
signals, on average, result in a higher PnL than the LSTM signals (cf. Figure 19 and Figure 20).
13
020004000600080001000012000Trades250255075100125150PnLHFformerLSTMExploring the Advantages of Transformers for High-Frequency Trading
A PREPRINT
Figure 20: Cumulative PnL - Strategy 3 - HFformer vs. LSTM.
PnL
Signal - 26
Signal - 27
Signal - 28
Signal - 29
Signal - 30
PnL
1
0.009710
0.013158
0.004809
0.014907
0.010281
Signal - 26
Signal - 27
Signal - 28
Signal - 29
Signal - 30
1
0.943009
0.860272
0.923525
0.914158
1
0.877412
0.932065
0.919749
1
0.858861
0.861871
1
0.912567
1
Table 3: Correlation table for PnL and signals for forecast horizons of 26, 27, 28, 29, and 30 ticks - HFformer.
Signal - 26
Signal - 27
Signal - 28
Signal - 29
Signal - 30
PnL
1
0.007214
0.011843
0.008985
0.007163
0.010961
PnL
Signal - 26
Signal - 27
Signal - 28
Signal - 29
Signal - 30
Table 4: Correlation table for PnL and signals for forecast horizons of 26, 27, 28, 29, and 30 ticks - LSTM.
1
0.971106
0.974401
0.957233
0.965258
1
0.972183
0.956653
0.968503
1
0.953691
0.964354
1
0.955223
1
We assess HFformer's performance using 1 to 11 trading signals (cf. Figure 21). The predictions are
made for horizon 25 and signals are added progressively by an increment of 1 from each side. We notice
an improvement in the cumulative PnL when adding signals. However, after 7 signals the cumulative PnL
stagnates. Therefore, for the following experiments we will be using 7 signals.
Figure 21: Cumulative PnL - Main horizon 25 - HFformer.
14
020004000600080001000012000Trades250255075100125150PnLHFformerLSTM02000400060008000100001200014000Trades0255075100125150175PnLHFformer: 1 signalHFformer: 3 signalsHFformer: 5 signalsHFformer: 7 signalsHFformer: 9 signalsHFformer: 11 signalsExploring the Advantages of Transformers for High-Frequency Trading
A PREPRINT
5.9.3 More on Trading Signal Aggregation
Figure 22: Trade signal magnitude (top) and correlation between PnL and trade signal magnitude (bottom) - Trade
sizing - Main forecasting horizon 25 with 1, 3, 5 and 7 signals - HFformer.
From Figure 22, we notice that as we aggregate more signals through summation and then take the absolute
value of this sum, the correlation between the PnL and the aggregated signals' magnitude increases (except
for the case with five aggregated signals plotted in orange). To perform this comparison, we compute the
magnitudes of the aggregated signals and then sort the signals in ascending order. We then compute the
correlation between the signal magnitudes and the PnL by batches of 200 observations. Based on these
observations, we can improve the trading strategies presented above by using aggregated sums of signals
instead of only focusing on the sign of the signals. Additionally, we can disregard trading signals below a
certain minimum threshold.
5.9.4 Trade Sizing
Figure 23: Cumulative PnL - Trade sizing - Main forecasting horizon 25, 7 signals, and 2 and 5 trade sizing
thresholds - HFformer.
Finally, we assess HFformer's performance using trade sizing (cf. Figure 23). The trade sizing is done
depending on the absolute value of the sum of the trade signals. We use two sets of thresholds:
15
020004000600080001000012000Signal0.00.51.01.52.02.53.0Signal MagnitudeHFformer: signals 22, 23, 24, 25, 26, 27, 28 summedHFformer: signals 23, 24, 25, 26, 27 summedHFformer: signals 24, 25, 26 summedHFformer: signal 2501020304050Signal Magnitude0.150.100.050.000.050.100.15Correlation Between PnL and Signal MagnitudeHFformer: signals 22, 23, 24, 25, 26, 27, 28 summedHFformer: signals 23, 24, 25, 26, 27 summedHFformer: signals 24, 25, 26 summedHFformer: signal 250200040006000800010000Trades050100150200PnLHFformer: 7 signals, without trade sizingHFformer: 7 signals, with trade sizing (2 thresholds)HFformer: 7 signals, with trade sizing (5 thresholds)Exploring the Advantages of Transformers for High-Frequency Trading
A PREPRINT
• 2 thresholds: above the highest threshold 0.15 BTC is traded, 0.1 BTC for the medium threshold,
and 0.05 BTC otherwise
• 5 thresholds: above the highest threshold, 0.15 BTC is traded, 0.125 BTC for the second highest
threshold, 0.1 BTC for the third highest threshold, 0.075 for the fourth highest threshold, 0.05 for
the fifth highest threshold, and 0.025 BTC otherwise
The thresholds above were chosen by observing the distribution of outputted signals using training data.
For this experiment, we use 7 signals with a main forecasting horizon of 25 ticks. We notice an increase
in the cumulative PnL when using trade sizing. The standard deviation of the cumulative PnL increases
from 0.49 USDT without trade sizing to 0.58 USDT with trade sizing using 2 thresholds. However, when
the number of thresholds for trade sizing is increased to 5, the PnL does not increase significantly, but the
standard deviation of the PnL drops to 0.41 USDT. A lower standard deviation of the PnL will yield a better
Sharpe ratio long-term and reduce the volatility of the high-frequency strategy.
Moreover, from Figure 24, we notice that the ratio of trades with a positive PnL over the total number
of trades (i.e., the ratio of winning trades) increases as the magnitude of the trading signal increases in line
with previous observations. Therefore, one proposed improvement to the trading strategy is to increase the
quantity traded proportionally to the strength of the trading signal.
Finally, we complement the existing trading strategy from Figure 23 with a minimal threshold require-
ment for a trade to occur. The minimal threshold is set using training data observations. As previously,
we compute the sum of trading signals from the models and take the absolute value. The minimal trad-
ing threshold is proportional to the number of signals. From Figure 25 we notice an improvement in the
cumulative PnL by 4.53% and a decrease in the number of trades from 11,485 to 8,851.
Figure 24: Wining trades ratio - Trade sizing - Main forecasting horizon 25, 7 signals, and 2 and 5 trade sizing
thresholds - HFformer.
Figure 25: Cumulative PnL - Trade sizing with minimal threshold - Main forecasting horizon 25, 7 signals, and 5
trade sizing thresholds - HFformer.
16
0.020.040.060.080.100.120.14Quantity Traded0.4850.4900.4950.5000.5050.5100.5150.520Ratio of Winning TradesHFformer: 7 signals, 5 thresholdsHFformer: 7 signals, 2 thresholds0.020.040.060.080.100.120.14Quantity Traded0100020003000400050006000Total TradesHFformer: 7 signals, 5 thresholdsHFformer: 7 signals, 2 thresholds0200040006000800010000Trades050100150200PnLHFformer: 7 signals, with trade sizing (5 thresholds) and minimal thresholdHFformer: 7 signals, with trade sizing (5 thresholds)Exploring the Advantages of Transformers for High-Frequency Trading
A PREPRINT
6 Legal and Ethical Considerations
The strategies and models presented in this paper are purely for scientific research and curiosity. Algorithmic
trading may result in capital loss and requires continuous risk monitoring. The strategies should first be
paper traded, and various risks should be assessed (e.g., price, liquidity, compliance, and regulatory risks)
before being deployed in live trading. Simplifications to the trading environment have been made during
backtesting for this paper. Therefore, results may vary significantly if the models are deployed live. Moreover,
machine learning methods are evaluated based on classification and regression metrics without rigorous
mathematical proofs, unlike statistical methods. As a result, machine learning methods' performance can
significantly vary depending on the input data and could lead to unexpected model outputs.
Algorithmic trading is regulated by financial authorities (e.g., Financial Industry Regulatory Authority
and Security Exchange Commission for US securities). Regulatory risks need to be considered and monitored
when trading in financial markets. The trading strategies need to be reviewed and monitored to be in
accordance with continuously changing market regulations.
7 Limitations and Future Lines of Research
The HFformer and LSTM results were achieved using a simplified backtesting environment, which did not
account for factors including:
• the impact of the executed order on the market
• the actual execution price; this is set to the weighted midprice in our model
• the available BTC quantities; the executed quantity is 0.1 BTC
• any connection issues; the data was fed into the model at the same rate
• trading fees; the trading fee was set to zero, which is a realistic assumption for the BTC-USDT pair
on Binance. However, trading on traditional exchanges usually requires paying a transaction fee
• a longer backtesting period; the backtesting period is 2 days
The following future lines of research can be undertaken:
• Improve the LOB snapshot pre-processing pipeline to reduce the noisiness of the data with auto-
mated feature selection by using autoencoders [32]
• Perform a more extensive performance assessment of the HFformer on large forecast horizons and
use altcoin trading pairs such as ETH-USDT
• Implement the HFformer with other types of Attention modules such as auto-correlation Attention
[15]
• Implement a more realistic backtesting environment that accounts for the impact of the placed
order and emulates the activity of other participants in the market to assess the performance of the
HFformer
• Test the HFformer's forecasting performance on traditional financial data by using LOB data from
other papers focused on LOB deep learning models for midprice forecasting of traditional assets[10]
8 Conclusion
This paper studied the LSTM, Transformer, Autoformer, FEDformer, TFT, and HFformer deep learning archi-
tectures for high-frequency FTS forecasting.
Through experimentation, we combined various components of multiple Transformer architectures to
form the HFformer, a Transformer-like architecture adapted for HFT. When testing the LSTM and HFformer
models, we achieved a higher R2 score than the other deep learning architectures for log-returns forecasting
from 1 to 30 ticks ahead. Moreover, the LSTM and HFformer models achieved similar performance for
classification tasks. Finally, the LSTM and HFformer models were backtested on different trading strategies
involving 1, 3, and 5 trade signals. As a result, it was found that using more than 1 trade signal decreases
the number of trades and increases the cumulative PnL of a long-short trading strategy.
The HFformer, which uses the multi-head Attention mechanism, generates long and short trade signals
that result in a more balanced trading strategy than the LSTM. Moreover, the trade signals generated by the
HFformer for different forecasting horizons are less correlated than the LSTM signals. As a result, a trading
17
Exploring the Advantages of Transformers for High-Frequency Trading
A PREPRINT
strategy that combines multiple trade signals around a given forecasting horizon was proposed. This trading
strategy reduces the false positive trade signals by only engaging in trades when all signals are of the same
sign, which results in higher cumulative PnLs and fewer trading fees.
Finally, the proposed trading strategies were complemented with trade sizing to improve the cumulative
PnL. By using different trading quantities based on the strength of the trading signal, the cumulative PnL
increased, and in some cases, the volatility of the trading strategy decreased. Additionally, ignoring trade
signals below a predefined minimal threshold reduced the total number of trades and positively contributed
to the average trade PnL.
Although these improvements and strategies have been backtested on a large amount of BTC-USDT
LOB data collected over 2 days and a month after the training and validation data, these methods may yield
different results when trading another cryptocurrency pair or financial asset. Additionally, machine learning
methods may sometimes be less generalizable than traditional statistical methods as the machine learning
methods are data-driven.
References
[1] Box GE, Jenkins GM, Reinsel GC, Ljung GM. Time series analysis: forecasting and control. John Wiley
& Sons; 2015. pages 1
[2] Engle RF. Autoregressive conditional heteroscedasticity with estimates of the variance of United King-
dom inflation. Econometrica: Journal of the econometric society. 1982:987-1007. pages 1
[3] Rumelhart DE, Hinton GE, Williams RJ. Learning internal representations by error propagation. Cali-
fornia Univ San Diego La Jolla Inst for Cognitive Science; 1985. pages 1
[4] Hochreiter S, Schmidhuber J. Long short-term memory. Neural computation. 1997;9(8):1735-80.
pages 1
[5] LeCun Y, Bengio Y, Hinton G. Deep learning. nature. 2015;521(7553):436-44. pages 1
[6] Vaswani A, Shazeer N, Parmar N, Uszkoreit J, Jones L, Gomez AN, et al. Attention is all you need.
Advances in neural information processing systems. 2017;30. pages 1, 5
[7] Bahdanau D, Cho K, Bengio Y. Neural machine translation by jointly learning to align and translate.
arXiv preprint arXiv:14090473. 2014. pages 1
[8] Liu Z, Lin Y, Cao Y, Hu H, Wei Y, Zhang Z, et al. Swin transformer: Hierarchical vision transformer
using shifted windows. In: Proceedings of the IEEE/CVF International Conference on Computer Vision;
2021. p. 10012-22. pages 1
[9] Tsay RS. Analysis of financial time series. John wiley & sons; 2005. pages 1
[10] Kolm PN, Turiel J, Westray N. Deep Order Flow Imbalance: Extracting Alpha at Multiple Horizons from
the Limit Order Book. Available at SSRN 3900141. 2021. pages 1, 2, 17
[11] Qin Y, Song D, Chen H, Cheng W, Jiang G, Cottrell G. A dual-stage attention-based recurrent neural
network for time series prediction. arXiv preprint arXiv:170402971. 2017. pages 1, 2
[12] Cartea ́A, Jaimungal S, Penalva J. Algorithmic and high-frequency trading. Cambridge University Press;
2015. pages 2
[13] Sezer OB, Gudelek MU, Ozbayoglu AM. Financial time series forecasting with deep learning: A sys-
tematic literature review: 2005–2019. Applied soft computing. 2020;90:106181. pages 2
[14] Pascanu R, Mikolov T, Bengio Y. On the difficulty of training recurrent neural networks. In: Interna-
tional conference on machine learning. PMLR; 2013. p. 1310-8. pages 2
[15] Xu J, Wang J, Long M, et al. Autoformer: Decomposition transformers with auto-correlation for long-
term series forecasting. Advances in Neural Information Processing Systems. 2021;34. pages 2, 3, 7,
17
[16] Zhou T, Ma Z, Wen Q, Wang X, Sun L, Jin R. FEDformer: Frequency enhanced decomposed transformer
for long-term series forecasting. arXiv preprint arXiv:220112740. 2022. pages 2, 3
[17] Angel J. Retail Investors Get a Sweet Deal: The Cost of a SIP of Stock Market Data. Available at SSRN
3268916. 2018. pages 2
[18] Hautsch N. Modelling irregularly spaced financial data: theory and practice of dynamic duration
models. vol. 539. Springer Science & Business Media; 2011. pages 2
18
Exploring the Advantages of Transformers for High-Frequency Trading
A PREPRINT
[19] Ariyo AA, Adewumi AO, Ayo CK. Stock price prediction using the ARIMA model. In: 2014 UKSim-
AMSS 16th International Conference on Computer Modelling and Simulation. IEEE; 2014. p. 106-12.
pages 2
[20] Franses PH, Van Dijk D. Forecasting stock market volatility using (non-linear) Garch models. Journal
of forecasting. 1996;15(3):229-35. pages 2
[21] Fischer T, Krauss C. Deep learning with long short-term memory networks for financial market predic-
tions. European Journal of Operational Research. 2018;270(2):654-69. pages 2
[22] Lim B, Zohren S. Time-series forecasting with deep learning: a survey. Philosophical Transactions of
the Royal Society A. 2021;379(2194):20200209. pages 2
[23] Gao K, Luk W, Weston S. High-Frequency Trading and Financial Time-Series Prediction with Spiking
Neural Networks. Wilmott. 2021;2021(113):18-33. pages 2
[24] Wang Y, Huang M, Zhu X, Zhao L. Attention-based LSTM for aspect-level sentiment classification. In:
Proceedings of the 2016 conference on empirical methods in natural language processing; 2016. p.
606-15. pages 2
[25] Wu N, Green B, Ben X, O'Banion S. Deep transformer models for time series forecasting: The influenza
prevalence case. arXiv preprint arXiv:200108317. 2020. pages 2
[26] Kazemi SM, Goel R, Eghbali S, Ramanan J, Sahota J, Thakur S, et al. Time2vec: Learning a vector
representation of time. arXiv preprint arXiv:190705321. 2019. pages 2
[27] Li S, Jin X, Xuan Y, Zhou X, Chen W, Wang YX, et al. Enhancing the locality and breaking the mem-
ory bottleneck of transformer on time series forecasting. Advances in Neural Information Processing
Systems. 2019;32. pages 3
[28] Lim B, Arik SO, Loeff N, Pfister T. Temporal fusion transformers for interpretable multi-horizon time
series forecasting. arXiv preprint arXiv:191209363. 2019. pages 3
[29] Ba JL, Kiros JR, Hinton GE. Layer normalization. arXiv preprint arXiv:160706450. 2016. pages 6
[30] Irie K, Zeyer A, Schl ̈uter R, Ney H. Language modeling with deep transformers. arXiv preprint
arXiv:190504226. 2019. pages 8
[31] Loshchilov I, Hutter F. Decoupled weight decay regularization. arXiv preprint arXiv:171105101. 2017.
pages 9
[32] Han K, Wang Y, Zhang C, Li C, Xu C. Autoencoder inspired unsupervised feature selection. In: 2018
IEEE international conference on acoustics, speech and signal processing (ICASSP). IEEE; 2018. p.
2941-5. pages 17
The following Github repositories were used to build the deep learning models:
• LSTM: https://github.com/lkulowski/LSTM encoder decoder
• Transformer: https://github.com/AIStream-Peelout/flow-forecast
• Autoformer and FEDformer: https://github.com/cure-lab/DLinear
• Spiking activation: https://github.com/nengo/pytorch-spiking
9 Appendix
The training of the deep learning models was done on Google Colab4 using an Nvidia P100 GPU. The training
LOB data for the USDT-BTC trading pair collected from Binance's API can be found below:
• raw LOB data: https://drive.google.com/drive/folders/1GXXiVyXXCXenNsGWRAmMb Xd1Xvf-
lZq5?usp=sharing
• processed
LOB
YkL5W5YhKOLHw?usp=sharing
data:
https://drive.google.com/drive/folders/1GVJ050lVeS6vFjZ9CER
The hyperparameters that were used to train the LSTM, Transformer, Autoformer, FEDformer, and HF-
former models were found through grid search and are listed below:
4The Google Colab platform can be found at https://colab.research.google.com/notebooks/.
19
Exploring the Advantages of Transformers for High-Frequency Trading
A PREPRINT
Model
Layers
Activation Func-
tion
Optimizer
Loss
Function
Batch
Size
LSTM
5 layers size 16
PReLU
PReLU
GELU
GELU
Transformer
Autoformer
FEDformer
HFformer
and 1
1 encoder
decoder
size
128 with 8 Attention
heads
both
2 encoders and 2 de-
coders both of size
128 with 8 Attention
length
label
heads,
50, and factor 3
2 encoders and 2
decoders both of size
128 with 8 Attention
heads,
length
label
50,
and Legendre
base
en-
1 Transformer
coder and 1 linear
decoder
size
64 with 6 Attention
heads
both
AdamW with 0.001
learning rate
AdamW with 0.0001
learning rate
MSE
MSE
64
64
AdamW with 0.0002
learning rate
MSE
256
AdamW with 0.0005
learning rate
MSE
256
Spiking
PReLU
with
AdamW with 0.04
learning rate
MSE
256
Table 5: LSTM, Transformer, Autoformer, FEDformer, and HFformer hyperparameters.
20
|
|
http://arxiv.org/abs/2302.09838v1 | 2023-02-20T08:55:00 | 2023-02-20T08:55:00 | JNDMix: JND-Based Data Augmentation for No-reference Image Quality
Assessment | Despite substantial progress in no-reference image quality assessment
(NR-IQA), previous training models often suffer from over-fitting due to the
limited scale of used datasets, resulting in model performance bottlenecks. To
tackle this challenge, we explore the potential of leveraging data augmentation
to improve data efficiency and enhance model robustness. However, most existing
data augmentation methods incur a serious issue, namely that it alters the
image quality and leads to training images mismatching with their original
labels. Additionally, although only a few data augmentation methods are
available for NR-IQA task, their ability to enrich dataset diversity is still
insufficient. To address these issues, we propose a effective and general data
augmentation based on just noticeable difference (JND) noise mixing for NR-IQA
task, named JNDMix. In detail, we randomly inject the JND noise, imperceptible
to the human visual system (HVS), into the training image without any
adjustment to its label. Extensive experiments demonstrate that JNDMix
significantly improves the performance and data efficiency of various
state-of-the-art NR-IQA models and the commonly used baseline models, as well
as the generalization ability. More importantly, JNDMix facilitates MANIQA to
achieve the state-of-the-art performance on LIVEC and KonIQ-10k. | [
"Jiamu Sheng",
"Jiayuan Fan",
"Peng Ye",
"Jianjian Cao"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09838v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09838v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.CV",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.CV",
"cs.LG"
] | JNDMIX: JND-BASED DATA AUGMENTATION FOR NO-REFERENCE IMAGE QUALITY
ASSESSMENT
Jiamu Sheng1, Jiayuan Fan∗1, Peng Ye2, Jianjian Cao2
1Academy for Engineering and Technology, Fudan University, Shanghai, China
2School of Information Science and Technology, Fudan University, Shanghai, China
3
2
0
2
b
e
F
0
2
]
V
C
.
s
c
[
1
v
8
3
8
9
0
.
2
0
3
2
:
v
i
X
r
a
ABSTRACT
Despite substantial progress in no-reference image quality
assessment (NR-IQA), previous training models often suffer
from over-fitting due to the limited scale of used datasets,
resulting in model performance bottlenecks. To tackle this
challenge, we explore the potential of leveraging data aug-
mentation to improve data efficiency and enhance model ro-
bustness. However, most existing data augmentation methods
incur a serious issue, namely that it alters the image quality
and leads to training images mismatching with their original
labels. Additionally, although only a few data augmentation
methods are available for NR-IQA task, their ability to en-
rich dataset diversity is still insufficient. To address these
issues, we propose a effective and general data augmentation
based on just noticeable difference (JND) noise mixing for
NR-IQA task, named JNDMix. In detail, we randomly inject
the JND noise, imperceptible to the human visual system
(HVS), into the training image without any adjustment to
its label. Extensive experiments demonstrate that JNDMix
significantly improves the performance and data efficiency of
various state-of-the-art NR-IQA models and the commonly
used baseline models, as well as the generalization ability.
More importantly, JNDMix facilitates MANIQA to achieve
the state-of-the-art performance on LIVEC and KonIQ-10k.
Index Terms- No-reference image quality assessment,
Data augmentation, Just noticeable difference
1. INTRODUCTION
No-reference image quality assessment (NR-IQA) is a sig-
nificant task to automatically predict image quality scores
without using reference image information. With the de-
velopment of deep learning techniques, a large number of
learning-based NR-IQA methods achieve good performance.
Using pre-trained models based on a large-scale dataset like
ImageNet [1] can help NR-IQA models to extract relevant
features for distorted images with the limited scale of used
∗Corresponding author.
This work was supported in part by the National Natural Science Foun-
dation of China under Grant 62101137 and Grant 62071127, and in part by
the Zhejiang Lab Project under Grant 2021KH0AB05.
Fig. 1: An original image is processed by five different data
augmentation methods. Visually, the other four data augmen-
tation methods cause highly noticeable image quality degra-
dation, except JNDMix.
datasets. Therefore, many recent works [2, 3, 4, 5, 6] utilize
ImageNet pre-trained backbone to achieve the state-of-the-art
performance on the NR-IQA benchmarks.
A key challenge of learning-based NR-IQA methods
is the lack of sufficiently large labeled datasets, as manu-
ally annotating image quality labels is expensive and time-
consuming. As a result, the learning-based NR-IQA methods
usually suffer from over-fitting when training deep models
[7]. To some extent, using pre-trained models can allevi-
ate this issue, but this metric is not specifically designed for
NR-IQA task, and the model performance bottleneck still
exists. Therefore, it is necessary to design a novel approach
to improve the data efficiency of the NR-IQA model.
Data augmentation is a practical and simple way to im-
prove generalizability and data efficiency of models, which
can effectively alleviate the above problems on NR-IQA task.
So far, data augmentation methods are widely used in various
vision tasks, that include geometric transformations (e.g., ran-
dom cropping [8], horizontal flipping [9], cutout [10]), color
space transformations (e.g., color jittering [11]), mixing im-
ages (e.g., mixup [12], CutMix [13]), resizing [14], noise in-
jection [15], etc. Unfortunately, most of data augmentation
methods mentioned above, are mainly developed for specific
vision tasks and not available for the NR-IQA task, since the
highly noticeable image quality degradation is caused [16].
a)Original imagef)JNDMixb)Resize(224x224)e)Random crop(224x224)d)Cutoutc)Gaussian noise
As shown in Fig. 1, noise injection with Gaussian noise di-
rectly introduces distortions to the image; resizing, cutout and
random cropping can impact image composition, thus alter-
ing the image quality. Although a few augmentation methods
such as horizontal flipping and random cropping are widely
used in NR-IQA task [17], they are not specifically designed
for NR-IQA task and are still limited in their effectiveness in
enriching dataset diversity. More seriously, random cropping
leads to the loss of image information and introduces geomet-
ric deformation, resulting in generated patches mismatching
with their labels, while existing models using random crop-
ping ignore the above problem and still use the original labels
to train. Hence, a general and effective data augmentation
method is urgently needed for the NR-IQA task.
Intuitively, it is reasonable that the noise injection aug-
mentation without noticeable image quality degradation is
suitable for NR-IQA task. As the characteristic of the human
visual system (HVS), just noticeable difference (JND) is de-
fined as the minimum visual content changes that human can
perceive [18]. Namely, for each pixel, JND is a threshold, and
the HVS will not perceive any changes under it. Hence, we
believe the change under JND as a kind of noise, named JND
noise, which can be used in noise injection augmentation. In
NR-IQA datasets, the labels are the quality of images subjec-
tively scored by the human. Due to the imperceptibility of
JND noise, the image injecting JND noise will have the same
subjective quality score as the original image.
In this paper, we are the first to propose a general data
augmentation method based on JND noise mixing (JNDMix)
specifically for NR-IQA task. In detail, we randomly inject
JND noise to the training image, and it will not alter the im-
age quality visually so that the generated image can remain
the original label. The seminal proposal of JNDMix tack-
les the long-standing problem with existing data augmenta-
tion methods available for NR-IQA task, in particular, further
enriching the diversity of training images. Hence, JNDMix
can help NR-IQA models effectively to improve model per-
formance while enhancing data efficiency over previous state-
of-the-art methods. We conduct extensive experiments on two
IQA benchmarks, LIVEC and KonIQ-10k. And the results
demonstrate that JNDMix bring the significant improvements
in performance and data efficiency of various state-of-the-art
NR-IQA models and baseline models. More importantly, our
proposed JNDMix helps MANIQA to achieve the state-of-
the-art performance on LIVEC and KonIQ-10k. The cross-
dataset evaluation results also verify the great generalization
ability of our proposed method for NR-IQA models. Besides,
our approach is general and can be flexibly added to any NR-
IQA method.
2. METHOD
In this section, we will present the details of our proposed
general data augmentation method, depicted in Fig. 2.
Fig. 2: Overview of JNDMix data augmentation workflow.
2.1. Random JND Noise Injection Procedure
Let x ∈ RW ×H×C and y denote an original training image
and its label, respectively. The goal of JNDMix is to generate
a new training image ̃x and its associated label ̃y. The origi-
nal training image x and the associated generated JND image
xjnd are formed into an image pair to jointly generate a new
training image. Firstly, each pixel of the JND image xjnd is
multiplied by the random ratio λ to generate a random JND
noise xjnd where each pixel is less than the JND threshold.
Then we inject our random JND noise xjnd into the associated
training image. For each pixel, the injection noise can either
add the noise to the original pixel value or subtract the noise,
so we have to multiply a random matrix r ∈ RW ×H×C that
is random on each pixel, with only 1 and −1. Finally, the
novel training image, named JND distorted image, is gener-
ated after the above process. This random JND noise injection
procedure can be formulated as follows:
xnoise = λxjnd
̃x = x ⊕ (r * xnoise)
(1)
(2)
where ⊕ is element-wise sum. (*) is element-wise product.
Random ratio λ is sampled from the uniform distribution
(0, 1).
2.2. Model Training
In the training phase, the generated JND distorted image ̃x re-
places the original training image x in the model, but we do
not need to adjust the associated quality score label y. The
image quality scores in the dataset are obtained by subjective
human scoring, while JND noise can not be perceived by hu-
mans theoretically, so the subjective scores of JND distorted
image will not change. Thus, the following equation is ob-
tained:
̃y = y
(3)
Then, the new training sample ( ̃x, ̃y) generated by JNDMix
is used to train the model with its original training settings
and loss function. In each training iteration, each JNDMix-ed
sample ( ̃x, ̃y) is generated by multiplying the JND image by
a resampled random ratio to enrich the training sample's di-
versity, and diverse training samples reduce over-fitting. Our
method is very general and concise, so it can be flexibly added
to any NR-IQA method.
ImageJND ImageRandom Ratio ∈0,1Random Matrix ∈−1,1JND DistortedImageJND Noise⨁⨂⨂Table 1: Model performance improvements with JNDMix
across different state-of-the-art models.
Table 3: Data-efficiency improvements with JNDMix in the
state-of-the-art models HyperIQA and DBCNN.
Method
DBCNN (100%)
w/ JNDMix
HyperIQA (100%)
w/ JNDMix
MANIQA (100%)
w/ JNDMix
LIVEC
KonIQ-10k
SRCC
0.851
0.854
+0.003
0.859
0.870
+0.011
0.886
0.897
+0.011
PLCC
0.869
0.876
+0.007
0.882
0.883
+0.001
0.908
0.918
+0.010
SRCC
0.906
0.915
+0.009
0.906
0.911
+0.005
0.923
0.927
+0.004
PLCC
0.923
0.930
+0.007
0.917
0.924
+0.007
0.941
0.943
+0.002
Table 2: Model performance improvements with JNDMix
across different baseline models.
Method
Resnet34 (100%)
w/ JNDMix
Resnet50 (100%)
w/ JNDMix
ViT (100%)
w/ JNDMix
LIVEC
KonIQ-10k
SRCC
0.824
0.842
+0.018
0.838
0.851
+0.013
0.776
0.815
+0.039
PLCC
0.849
0.868
+0.019
0.868
0.872
+0.004
0.816
0.858
+0.042
SRCC
0.905
0.910
+0.005
0.916
0.920
+0.004
0.901
0.906
+0.005
PLCC
0.920
0.928
+0.008
0.931
0.932
+0.001
0.915
0.923
+0.008
Method
HyperIQA (100%)
w/ JNDMix
HyperIQA (50%)
w/ JNDMix
HyperIQA (25%)
w/ JNDMix
HyperIQA (10%)
w/ JNDMix
DBCNN (100%)
w/ JNDMix
DBCNN (50%)
w/ JNDMix
DBCNN (25%)
w/ JNDMix
DBCNN (10%)
w/ JNDMix
LIVEC
KonIQ-10k
SRCC
0.859
0.870
+0.011
0.820
0.821
+0.001
0.787
0.790
+0.003
0.700
0.740
+0.040
0.851
0.854
+0.003
0.814
0.815
+0.001
0.764
0.787
+0.023
0.699
0.718
+0.019
PLCC
0.882
0.883
+0.001
0.843
0.855
+0.012
0.809
0.818
+0.009
0.736
0.773
+0.037
0.869
0.876
+0.007
0.843
0.849
+0.006
0.793
0.812
+0.019
0.740
0.756
+0.016
SRCC
0.906
0.911
+0.005
0.892
0.902
+0.010
0.880
0.885
+0.005
0.851
0.861
+0.010
0.906
0.915
+0.009
0.902
0.907
+0.005
0.888
0.893
+0.005
0.869
0.873
+0.004
PLCC
0.917
0.924
+0.007
0.908
0.913
+0.005
0.896
0.900
+0.004
0.866
0.874
+0.008
0.923
0.930
+0.007
0.918
0.924
+0.006
0.907
0.910
+0.003
0.889
0.893
+0.004
3. EXPERIMENTS
3.1. Experimental Settings
Datasets and Evaluation Metrics. We assess different
NR-IQA models and JNDMix on two commonly used IQA
datasets: LIVEC [19] and KonIQ-10k [20]. LIVEC contains
1162 images taken in the real world by various photos using
various camera devices, resulting in complex and composite
distortions. KonIQ-10k consists of 10073 images chosen
from the large public multimedia dataset YFCC100m[21].
Two commonly used evaluation metrics Spearman's rank
order correlation coefficient (SRCC) and Pearson's linear cor-
relation coefficient (PLCC) are adopted to evaluate the perfor-
mance of NR-IQA models.
These datasets are randomly split into 80% images for
training, and 20% images for testing.
In data-efficient ex-
periments, we always use the 20% images for testing regard-
less of different fractions of the training dataset. We conduct
10 times of this random dataset splitting operation for each
experiment and the average SRCC and PLCC values are re-
ported to evaluate performance.
Models and Implementation Details. To evaluate our pro-
posed data augmentation method, we utilize JNDMix on
these three representative state-of-the-art NR-IQA models:
DBCNN [2], HyperIQA [3], MANIQA [4]. Also, three base-
line models are adopted to evaluate JNDMix effectiveness:
Resnet34, Resnet50 [22] and Vision Transformer (ViT) [23],
which are pretrained on ImageNet [1]. The JND images are
generated by RGB-JND [24] model to generate JND noise.
For rigorous comparison, the training settings for all models
trained with JNDMix are the same as without it, including
learning rate schedule, weight decay, data pre-processing and
augmentations, etc. For three state-of-the-art models, we uti-
lize their original codebases and training settings to train. For
Resnet34 and Resnet50, we utilize AdamW [25] optimization
with a mini-batch of 24, and set the base learning rate to 5e-5
with a cosine decay schedule. For ViT, we utilize AdamW
optimization with a mini-batch of 8, and set base learning rate
to 1e-5 with a cosine decay schedule.
3.2. JNDMix improves IQA benchmarks state-of-the-art
We train three representative state-of-the-art models in NR-
IQA task, DBCNN, HyperIQA, and MANIQA, to study if
JNDMix can improve state-of-the-art NR-IQA models on two
IQA benchmarks, LIVEC and KonIQ-10k. Table 1 shows
the results of applying JNDMix on the state-of-the-art mod-
els. All models using JNDMix have significant improvements
based on their original state-of-the-art performance. Specifi-
cally, it provides a gain of +0.011 SRCC and +0.01 PLCC on
LIVEC, resulting in MANIQA with the state-of-the-art per-
formance of 0.897 SRCC and 0.918 PLCC on LIVEC, as well
as achieve the state-of-the-art performance of 0.927 SRCC
and 0.943 PLCC on KonIQ-10k.
Additionally, we reveal that JNDMix improves the per-
formance of baseline models such as Resnet34, Resnet50 and
Vision Transformer (ViT). Table 2 illustrates that we get ex-
cellent improvements over these baseline models. JNDMix
improves ViT from 0.816 to 0.858 with a gain of +0.042 in
Table 4: Data-efficiency improvements with JNDMix in the
baseline models Resnet34 and Resnet50.
Method
Resnet34 (100%)
w/ JNDMix
Resnet34 (50%)
w/ JNDMix
Resnet34 (25%)
w/ JNDMix
Resnet34 (10%)
w/ JNDMix
Resnet50 (100%)
w/ JNDMix
Resnet50 (50%)
w/ JNDMix
Resnet50 (25%)
w/ JNDMix
Resnet50 (10%)
w/ JNDMix
LIVEC
KonIQ-10k
SRCC
0.824
0.834
+0.010
0.788
0.811
+0.023
0.738
0.758
+0.020
0.635
0.674
+0.039
0.835
0.842
+0.007
0.801
0.812
+0.011
0.751
0.767
+0.016
0.657
0.681
+0.024
PLCC
0.849
0.855
+0.006
0.816
0.834
+0.018
0.746
0.766
+0.020
0.609
0.653
+0.044
0.868
0.872
+0.004
0.827
0.840
+0.013
0.768
0.794
+0.026
0.682
0.695
+0.013
SRCC
0.905
0.910
+0.005
0.890
0.898
+0.008
0.869
0.881
+0.012
0.850
0.859
+0.009
0.916
0.920
+0.004
0.902
0.910
+0.008
0.886
0.892
+0.006
0.863
0.868
+0.005
PLCC
0.920
0.928
+0.008
0.908
0.914
+0.006
0.888
0.900
+0.012
0.871
0.878
+0.007
0.931
0.932
+0.001
0.917
0.923
+0.006
0.902
0.908
+0.006
0.880
0.884
+0.004
PLCC on LIVEC, and also achieves a great improvement on
Resnet34 with a gain of +0.019 PLCC.
3.3. JNDMix helps data-efficiency
In this section, we demonstrate that JNDMix is effective to
improve model performance across different dataset sizes
and helps data efficiency of models. Table 3 illustrates that
JNDMix always improves the perfomance of HyperIQA
and DBCNN across all fractions of LIVEC and KonIQ-10k,
which implies the data efficiency improvement of the state-of-
the-art models. JNDMix provides a surprising improvement
of +0.04 SRCC in the low data regime (10% of data) while
still being effective with a improvement of +0.007 PLCC
in the high data regime on LIVEC. We detect that the per-
formance growth brought by JNDMix is increasing with the
decrease of the dataset sizes, which is also reflected in the
difference in performance improvements between the two
datasets, where the images of LIVEC is 10 times less than
those of KonIQ-10k. Table 4 reveals that JNDMix also greatly
helps data efficiency of baseline models with the maximum
gain of +0.044 PLCC in the low data regime (10% of data).
3.4. JNDMix improves generalization ability
To show the generaliazation ability of NR-IQA models, the
cross dataset evaluations are performed. We train MANIQA
on different fractions of KonIQ-10k and test it on LIVEC. Ta-
ble 5 proves that JNDMix is effective to improve generaliza-
tion ability of NR-IQA models across different dataset sizes.
Table 5: Results of cross dataset evaluations trained on dif-
ferent fractions of datasets adopting the state-of-the-art model
MANIQA.
Training
Testing
KonIQ-10k
LIVEC
LIVEC
KonIQ-10k
Method
MANIQA (100%)
w/ JNDMix
MANIQA (50%)
w/ JNDMix
MANIQA (25%)
w/ JNDMix
MANIQA (10%)
w/ JNDMix
MANIQA (100%)
w/ JNDMix
SRCC
0.844
0.856
+0.012
0.837
0.843
+0.006
0.828
0.837
+0.009
0.797
0.808
+0.011
0.790
0.803
+0.013
PLCC
0.868
0.880
+0.012
0.858
0.863
+0.005
0.854
0.862
+0.008
0.828
0.836
+0.008
0.849
0.861
+0.012
Table 6: Performance of MANIQA with different noise in-
jection on 100% LIVEC.
Method
MANIQA
w/ JNDMix
w/ JND injection
w/ Gaussian noise injection
SRCC PLCC
0.908
0.886
0.918
0.897
0.911
0.891
0.825
0.796
3.5. Ablation Study
To study the contribution of JND noise injection, we conduct
ablation study by injecting different noises. Table 6 shows
the performance of MANIQA with different noise injection
trained on 100% LIVEC. 'JND injection' means we do not
use JND noise generated by multiplying the JND image with
a resampled random ratio, but directly add the JND image to
the training image. 'Gaussian noise injection' means we in-
ject the Gaussian noise to generate the new training image.
The results reveal that injecting Gaussian noise leads to per-
formance degradation and adding the JND image results in
smaller improvement than JNDMix.
4. CONCLUSION
Data augmentation is vital to many vision tasks, and however,
no effective data augmentation method specifically designed
for NR-IQA task is proposed. In this paper, we are the first
to propose a general data augmentation method for NR-IQA
task, and rigorously study the JNDMix, finding it highly ef-
fective and general. JNDMix works well across a variety of
different model architectures and helps their data efficiency,
both on LIVEC and KonIQ-10k. The JNDMix augmenta-
tion method is simple and can be flexibly plugged into any
NR-IQA model codebase. We wish that our method will be
widely used in NR-IQA task and the lack of data augmenta-
tion methods in NR-IQA task will receive attention.
5. REFERENCES
[1] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and
Li Fei-Fei,
"Imagenet: A large-scale hierarchical image
database," in Proceedings of the IEEE/CVF Conference on
Computer Vision and Pattern Recognition, 2009, pp. 248–255.
[2] Weixia Zhang, Kede Ma, Jia Yan, Dexiang Deng, and Zhou
Wang, "Blind image quality assessment using a deep bilinear
convolutional neural network," IEEE Transactions on Circuits
and Systems for Video Technology, vol. 30, no. 1, pp. 36–47,
2018.
[3] Shaolin Su, Qingsen Yan, Yu Zhu, Cheng Zhang, Xin Ge, Jin-
qiu Sun, and Yanning Zhang, "Blindly assess image quality
in the wild guided by a self-adaptive hyper network," in Pro-
ceedings of the IEEE/CVF Conference on Computer Vision and
Pattern Recognition, 2020, pp. 3667–3676.
[4] Sidi Yang, Tianhe Wu, Shuwei Shi, Shanshan Lao, Yuan Gong,
Mingdeng Cao, Jiahao Wang, and Yujiu Yang, "MANIQA:
Multi-dimension Attention Network for No-Reference Image
Quality Assessment," in Proceedings of the IEEE/CVF Con-
ference on Computer Vision and Pattern Recognition, 2022, pp.
1191–1200.
[5] Peng Ye, Baopu Li, Yikang Li, Tao Chen, Jiayuan Fan, and
"b-DARTS: Beta-Decay Regularization for
Wanli Ouyang,
in Proceedings of the
Differentiable Architecture Search,"
IEEE/CVF Conference on Computer Vision and Pattern Recog-
nition. IEEE, 2022, pp. 10874–10883.
[6] Peng Ye, Baopu Li, Tao Chen, Jiayuan Fan, Zhen Mei, Chen
Lin, Chongyan Zuo, Qinghua Chi, and Wanli Ouyang, "Effi-
cient joint-dimensional search with solution space regulariza-
tion for real-time semantic segmentation," International Jour-
nal of Computer Vision, vol. 130, no. 11, pp. 2674–2694, 2022.
[7] Hancheng Zhu, Leida Li, Jinjian Wu, Weisheng Dong, and
Guangming Shi,
"MetaIQA: Deep meta-learning for no-
reference image quality assessment," in Proceedings of the
IEEE/CVF Conference on Computer Vision and Pattern Recog-
nition, 2020, pp. 14143–14152.
[8] Chun-Hsiao Yeh, Cheng-Yao Hong, Yen-Chi Hsu, and Tyng-
Luh Liu, "SAGA: Self-Augmentation with Guided Attention
for Representation Learning," in IEEE International Confer-
ence on Acoustics, Speech and Signal Processing. IEEE, 2022,
pp. 3463–3467.
[9] Niall McLaughlin, Jesus Martinez Del Rincon, and Paul Miller,
"Data-augmentation for reducing dataset bias in person re-
identification," in IEEE International conference on advanced
video and signal based surveillance. IEEE, 2015, pp. 1–6.
[10] Terrance DeVries and Graham W Taylor, "Improved regular-
ization of convolutional neural networks with cutout," arXiv
preprint arXiv:1708.04552, 2017.
[11] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet,
Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Van-
houcke, and Andrew Rabinovich, "Going deeper with convo-
lutions," in Proceedings of the IEEE conference on computer
vision and pattern recognition, 2015, pp. 1–9.
[12] Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David
Lopez-Paz, "mixup: Beyond Empirical Risk Minimization," in
International Conference on Learning Representations, 2018.
[13] Sangdoo Yun, Dongyoon Han, Seong Joon Oh, Sanghyuk
Chun, Junsuk Choe, and Youngjoon Yoo, "Cutmix: Regular-
ization strategy to train strong classifiers with localizable fea-
tures," in Proceedings of the IEEE/CVF international confer-
ence on computer vision, 2019, pp. 6023–6032.
[14] Ross Girshick, Ilija Radosavovic, Georgia Gkioxari, Piotr
Doll ́ar, and Kaiming He, "Detectron," 2018.
[15] Francisco J Moreno-Barea, Fiammetta Strazzera, Jos ́e M Jerez,
Daniel Urda, and Leonardo Franco, "Forward noise adjustment
scheme for data augmentation," in IEEE symposium series on
computational intelligence. IEEE, 2018, pp. 728–734.
[16] Junjie Ke, Qifei Wang, Yilin Wang, Peyman Milanfar, and
Feng Yang, "Musiq: Multi-scale image quality transformer,"
in Proceedings of the IEEE/CVF International Conference on
Computer Vision, 2021, pp. 5148–5157.
[17] Qingsen Yan and Dong Gong, "Two-stream convolutional net-
works for blind image quality assessment," IEEE Transactions
on Image Processing, vol. 28, no. 5, pp. 2200–2211, 2018.
[18] Charles F Hall and Ernest L Hall,
"A nonlinear model for
the spatial characteristics of the human visual system," IEEE
Transactions on systems, man, and cybernetics, vol. 7, no. 3,
pp. 161–170, 1977.
[19] Deepti Ghadiyaram and Alan C Bovik,
"Massive online
crowdsourced study of subjective and objective picture qual-
ity," IEEE Transactions on Image Processing, vol. 25, no. 1,
pp. 372–387, 2015.
[20] Vlad Hosu, Hanhe Lin, Tamas Sziranyi, and Dietmar Saupe,
"KonIQ-10k: An ecologically valid database for deep learn-
ing of blind image quality assessment," IEEE Transactions on
Image Processing, vol. 29, pp. 4041–4056, 2020.
[21] Bart Thomee, David A Shamma, Gerald Friedland, Benjamin
Elizalde, Karl Ni, Douglas Poland, Damian Borth, and Li-Jia
Li, "YFCC100M: The new data in multimedia research," Com-
munications of the ACM, vol. 59, no. 2, pp. 64–73, 2016.
[22] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun,
"Deep residual learning for image recognition," in Proceed-
ings of the IEEE conference on computer vision and pattern
recognition, 2016, pp. 770–778.
[23] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk
Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa De-
hghani, Matthias Minderer, Georg Heigold, Sylvain Gelly,
et al., "An Image is Worth 16x16 Words: Transformers for
Image Recognition at Scale," in International Conference on
Learning Representations, 2020.
[24] Jian Jin, Dong Yu, Weisi Lin, Lili Meng, Hao Wang, and Huax-
"Full RGB Just Noticeable Difference (JND)
iang Zhang,
Modelling," arXiv preprint arXiv:2203.00629, 2022.
[25] Ilya Loshchilov and Frank Hutter, "Decoupled weight decay
regularization," in International Conference on Learning Rep-
resentations, 2018.
|
|
http://arxiv.org/abs/2302.09834v1 | 2023-02-20T08:47:23 | 2023-02-20T08:47:23 | Transductive Matrix Completion with Calibration for Multi-Task Learning | Multi-task learning has attracted much attention due to growing multi-purpose
research with multiple related data sources. Moreover, transduction with matrix
completion is a useful method in multi-label learning. In this paper, we
propose a transductive matrix completion algorithm that incorporates a
calibration constraint for the features under the multi-task learning
framework. The proposed algorithm recovers the incomplete feature matrix and
target matrix simultaneously. Fortunately, the calibration information improves
the completion results. In particular, we provide a statistical guarantee for
the proposed algorithm, and the theoretical improvement induced by calibration
information is also studied. Moreover, the proposed algorithm enjoys a
sub-linear convergence rate. Several synthetic data experiments are conducted,
which show the proposed algorithm out-performs other existing methods,
especially when the target matrix is associated with the feature matrix in a
nonlinear way. | [
"Hengfang Wang",
"Yasi Zhang",
"Xiaojun Mao",
"Zhonglei Wang"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09834v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09834v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "stat.ML",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"stat.ML",
"cs.LG",
"stat.ME"
] | 3
2
0
2
b
e
F
0
2
]
L
M
.
t
a
t
s
[
1
v
4
3
8
9
0
.
2
0
3
2
:
v
i
X
r
a
Transductive Matrix Completion with Calibration for
Multi-Task Learning∗
Hengfang Wang1, Yasi Zhang2, Xiaojun Mao3, and Zhonglei Wang4
1School of Mathematics and Statistics, Fujian Normal University, China
2Department of Statistics, University of California, Los Angeles, USA
3School of Mathematical Sciences, Ministry of Education Key Laboratory of Scientific and
Engineering Computing, Shanghai Jiao Tong University, China
4Wang Yanan Institute for Studies in Economics and School of Economics, Xiamen
University, China
Abstract
Multi-task learning has attracted much attention due to growing multi-purpose re-
search with multiple related data sources. Moreover, transduction with matrix comple-
tion is a useful method in multi-label learning. In this paper, we propose a transductive
matrix completion algorithm that incorporates a calibration constraint for the features
under the multi-task learning framework. The proposed algorithm recovers the incom-
plete feature matrix and target matrix simultaneously. Fortunately, the calibration
information improves the completion results.
In particular, we provide a statistical
guarantee for the proposed algorithm, and the theoretical improvement induced by
calibration information is also studied. Moreover, the proposed algorithm enjoys a
sub-linear convergence rate. Several synthetic data experiments are conducted, which
show the proposed algorithm out-performs other existing methods, especially when the
target matrix is associated with the feature matrix in a nonlinear way.
1
Introduction
With the advent of the big data era, massive amounts of information and data have been
collected by modern high-tech devices, including web servers, environmental sensors, x-ray
imaging machines, and so on. Based on multiple data sources related to learning pur-
poses, algorithms have been developed to achieve various learning goals. Multi-task learning
(MTL) [1], for example, implements a robust learner for multiple tasks incorporating multi-
ple sources, and it can be widely used in practice, including web search, medical diagnosis,
natural language processing, and computer version.
∗An abridged version of this paper will appear in the 2023 IEEE International Conference on Acoustics,
Speech, and Signal Processing (ICASSP 2023).
E-mail addresses: [email protected], [email protected], [email protected], [email protected].
1
MTL has advantages for analyzing the multi-response structure. For i " 1, . . . , n, let
yi P Rm be the vector of interest of length m, where n is the number of instances, and each
element corresponds to a particular task. Denote Y " pyijq to be the n ˆ m response matrix,
consisting of the n realizations of yi. If the responses for a specific task are categorical, it
is essentially a multi-label learning problem. As for continuous responses, it turns out to be
a multi-response regression problem if additional features are available. As the exponential
family is flexible to handle different data types, regardless of categorical or continuous, for
each task, we assume that yij independently comes from an exponential family distribution
with parameter z‹,ij, which forms Z‹ " pz‹,ijq. The goal is to learn the underlying Z‹
based on Y. Moreover, entries of Y may suffer from missingness which makes it difficult
to learn Z‹. To tackle this difficulty and estimate Z‹ simultaneously, matrix completion
(MC) [2, 3, 4, 5, 6] algorithms have been developed under the low-rank and other regularity
assumptions. The recovery of the target matrix without any additional features is studied
in [7]. Noisy MC is investigated in [8, 9] from the exponential family with fully observed
features.
In MTL problems, features related to the responses may exist, but it is inevitable that
such features also suffer from missingness. Goldberg et al. (2010) [10] studied such a problem
under multi-label learning. Specifically, they studied single-task binary response matrix
given feature matrix where both matrices were subject to missingness. Xu et al. (2018)
[11] proposed the co-completion method by additionally penalizing the trace norm of the
feature matrix. A recent work [12] considered this problem via a smoothed rank function
approach. Under the noiseless case, [13] studied the error rate in the scenario with corrupted
side information.
Calibration [14, 15, 16] is widely used to incorporate such prior knowledge in the learning
procedure, and it improves the estimation efficiency. In this vein, [17] studied the calibration
with local polynomial regression between responses and features. Later, [18] generalized this
idea to the so-called model calibration under a parametric framework. Afterward, [19] gen-
eralized the idea to a functional type calibration equation. As far as we know, no calibration
related work has been done under the MC framework.
In this paper, we focus on MTL problems incorporating incomplete features, and we
assume that certain prior knowledge about the features is also available. Our work can be
embodied in the following toy example. For the well-known Netflix movie rating problem
[20], we aim to simultaneously complete rating and like-dislike matrices incorporating an
incomplete feature matrix, consisting of age, gender, and so on. However, all three matrices
suffer from missingness. When additional information such as the summary statistics for
age, gender, etc., can be obtained from the census survey, we investigate the benefits of such
additional information incorporated by the calibration method. In a nutshell, we propose
a Transductive Matrix Completion with Calibration (TMCC) algorithm, and the prior in-
formation about the features is considered by an additional calibration constraint. As far
as we know, this is the first paper exploring multi-task learning under a matrix completion
framework with calibration. Methodologically, our method has two merits: (i) the target
and feature matrices can be completed simultaneously; (ii) calibration information can be
incorporated. Theoretically, we show the statistical guarantee of our method, and the ben-
efit of calibration is also discussed. Besides, we have validated that the convergence rate of
the proposed algorithm is Op1{k2q. Numerically, synthetic data experiments show that our
2
proposed method performs better than other existing methods, especially when the target
matrix has a nonlinear transformation from the feature matrix.
Notations. Denote rns as the set t1, . . . , nu. Given an arbitrary matrix S " psijq P Rn1ˆn2,
n2
ijq1{2. Denote the singular values of S as
j"1 s2
the Frobenius norm of S is }S}F " p
σ1pSq, . . . , σn1^n2pSq in descending order. The operator norm is }S} " σmaxpSq " σ1pSq and
the nuclear norm }S}‹ "
σipSq. Besides, let σminpSq " σn1^n2pSq.
n1
i"1
ř
ř
ř
n1^n2
i"1
2 Model and Algorithm
Suppose there are S response matrices, Yp1q, . . . , YpSq. For example, Yp1q can be a like-
dislike matrix, and Yp2q can be a rating matrix, whose rows correspond to users, columns
correspond to movies, and S " 2. Denote the number of instances by n, the number of
tasks for s-th response matrix by ms. For s P rSs, we have Ypsq " pypsq
ij q P Rnˆms, and ypsq
ij
can be either discrete or continuous for i P rns. We assume that within the same response
matrix, all entries follow the same generic exponential family. For example, all entries of
Yp1q follow Bernoulli distributions with different success probabilities. Let Rpsq
y " prpsq
y,ijq P
Rnˆms be the corresponding indicator matrix for Ypsq.
is observed,
then rpsq
y,ij " 0. Furthermore, assume that Ypsq is generated from a
low-rank matrix Zpsq
‹,ijq P Rnˆms by the exponential family via a base function hpsq
and a link function gpsq, namely, the density function f psqpypsq
‹,ij ́
‹,ijqu, for s P rSs. For instance, suppose gpsqpzpsq
gpsqpzpsq
ij q "
p2πσ2q ́1{2 exp t ́pypsq
ij q2{p2σ2qu, and the corresponding exponential family is the Gaussian
distribution with mean σ2zpsq
ij zpsq
‹,ijq2{2 and hpsqpypsq
ij |zpsq
‹,ijq " σ2pzpsq
y,ij " 1; otherwise, rpsq
‹,ij and variance σ2 with support R.
In particular, if ypsq
ij
‹,ijq " hpsqpypsq
ij q exptypsq
‹ " pzpsq
Denote X‹ " px‹,ijq P Rnˆd as the true feature matrix consisting of d feature, and it is
assumed to be low-rank. Let X " pxijq P Rnˆd be a noisy version of the true feature matrix,
i.e., X " X‹ ` (cid:15), where (cid:15) " p(cid:15)ijq P Rnˆd is a noise matrix with Ep(cid:15)q " 0, and its entries
are independent. As the feature matrix is also incomplete, in a similar fashion, we denote
Rx " prx,ijq P Rnˆd as the corresponding indicator matrix of X. That is, we only observe
an incomplete matrix Rx ̋ X, where ̋ denotes the Hadamard product. Let target matrix
Z‹ " rZp1q
‹ s be the collection of hidden parameter matrices. Our goal is to recover
Z‹. We believe that some hidden connection between X‹ and Z‹ may provide us benefits
for MTL.
‹ , . . . , ZpSq
Our method can be illustrated in Fig 1, where logitppq " logtp{p1 ́ pqu, for p P p0, 1q. In
this example, we have three observed matrices whose entries are from Bernoulli, Gaussian,
and Poisson distributions, correspondingly, and are subject to missingness. In addition, we
have an incomplete feature matrix related to the target matrix and calibration information
for the true feature matrix. By the proposed TMCC algorithm, we can complete the true
feature matrix and target matrix simultaneously.
Given density functions tf psquS
s"1, or collection of tgpsquS
s"1 and thpsquS
s"1, the negative
3
Feature
Bernoulli
Gaussian
Poisson
Observed Matrix
1.5
?
-0.3 ̈ ̈ ̈
-1.1
?
0.1 -0.5 ̈ ̈ ̈
?
2.3
...
?
?
...
?
̈ ̈ ̈
?
...
. . .
-2.2 ̈ ̈ ̈
?
...
2.9
?
1
?
...
?
0
?
?
...
1
1
?
0
...
?
̈ ̈ ̈
̈ ̈ ̈
̈ ̈ ̈
. . .
̈ ̈ ̈
?
0
?
...
1
-0.4 0.7 -0.3 ̈ ̈ ̈
?
?
0.1
?
̈ ̈ ̈
-0.5
?
...
0.1
?
...
?
0.1 ̈ ̈ ̈
...
. . .
̈ ̈ ̈
?
?
...
0.2
1
?
2
...
?
?
?
?
...
4
?
1
?
...
?
̈ ̈ ̈
̈ ̈ ̈
̈ ̈ ̈
. . .
̈ ̈ ̈
2
?
2
...
3
noiseless feature
logit of
probability
(Bernoulli)
with calibration constraint AX‹ " B
Target Matrix
mean (Gaussian)
log of mean (Poisson)
T
M
C
C
(
s
i
m
u
l
t
a
n
e
o
u
s
l
y
r
e
c
o
v
e
r
)
1.5
1.3 -0.3 ̈ ̈ ̈
-1
0.3 0.2 0.8 ̈ ̈ ̈
0.2
-0.2 0.8 -0.3 ̈ ̈ ̈
0.9
0.3 0.3
1.2
0
-0.5 ̈ ̈ ̈
1.3
0.7 0.6 0.7 ̈ ̈ ̈
0.1
0.6
0.2 -1.1 ̈ ̈ ̈
-0.5
0
0.3
0
0
̈ ̈ ̈
̈ ̈ ̈
n
2.1 -0.3 -1.5 ̈ ̈ ̈
...
. . .
̈ ̈ ̈
3
...
-0.4
...
-2
-1.2
...
2.9
0.2 0.7 0.1 ̈ ̈ ̈
...
. . .
0.1 0.9 0.3 ̈ ̈ ̈
...
...
0.3
...
0.6
0.4
...
0.2
0.1 ̈ ̈ ̈
0.5
...
...
. . .
1.1 -0.7 ̈ ̈ ̈
-1.3
...
0.3
0
...
0.3 ̈ ̈ ̈
0.3
...
...
. . .
0.5 0.7 0.5 ̈ ̈ ̈
0.3
0
0.3
...
0.3
d
m1
m2
m3
Figure 1: Algorithm Illustration, where a Question Mark Represents a Missing Value.
quasi log-likelihood function for Z: is
̆
`
Z:
(cid:96)0
" ́
Sÿ
ÿ
!
)
rpsq
y,ij log
f psqpypsq
ij |z:psq
ij q
s"1
pi,jqPrnsˆrmss
Sÿ
ÿ
"
rpsq
y,ij
s"1
pi,jqPrnsˆrmss
"!
́ypsq
ij z:psq
ij ` gpsq
̄)
́
z:psq
ij
)ı
!
hpsqpypsq
ij q
` log
(1)
where Z: " rZ:p1q, . . . , Z:pSqs and Z:psq " pz:psq
with the second term of (1), we refine (1) as
ij q P Rnˆms. As the argument Z: is irrelevant
Sÿ
ÿ
̆
`
(cid:96)
Z:
"
rpsq
y,ij
s"1
pi,jqPrnsˆrmss
!
́ypsq
ij z:psq
ij ` gpsq
̄)
́
z:psq
ij
.
ř
S
Let Y " rYp1q, . . . , YpSqs be the collection of each specific task, D " d `
s"1 ms and
M‹ be the concatenated matrix rX‹, Z‹s P RnˆD. Suppose we have an additional calibration
constraint AX‹ " B, where A and B are available. To incorporate the calibration constraint,
4
the estimation procedure can be formulated as
xM " arg min
M:PRnˆD
„
1
nD
"
(cid:96)
̆
`
Z:
`
fτ1
`τ1
̆
M:
`
` τ2
̆
Lτ1,τ2
M:
": arg min
M:PRnˆD
": arg min
M:PRnˆD
*
`
X: ́ X
›
›M:
›
›2
F ` τ2
̆›
›2
F
›
›
‹
ı
1
2
›
›Rx ̋
`
›
›AX: ́ B
›
›
›
›M:
‹
,
(2)
pX, pZs and we employ the commonly used square loss to complete
where M: " rX:, Z:s, xM " r
the feature part. One trivial case is that when the calibration information is strong enough,
i.e., A is invertible, the feature matrix X‹ can be exactly recovered. Note that our learning
object is quite general. When S " 1, the entries within the only response matrix come
from Bernoulli distributions, and there's no third term related to calibration in (2), our
learning object degenerates to the case considered in [10], and [11]. However, [10] had an
additional assumption that there exists a linear relationship between the feature matrix and
the hidden parameter matrix. We do not make such a structural assumption. Besides, [11]
used additional nuclear norms to penalize the feature matrix for single task learning. When
there is no feature information, the objective function will degenerate to the case in [7].
We propose a Transductive Matrix Completion with Calibration (TMCC) algorithm to
obtain the estimator in (2). In the algorithm, the ij-th element of the gradient Bfτ1pM:q
with respect to M: is
́
̄
Bfτ1pM:qij "
$
'''&
'''%
rx,ij
nD
ry,ij
nD
x:
ij ́ xij
#
́ypsq
ij ̋ `
` 2τ1pATAX: ́ ATBqij,
+
,
Bgpsqpz:psq
ij ̋ q
Bz:psq
ij ̋
for j P rds,
for
s ́1ÿ
k"1
sÿ
mk ` d ă j ď
mk ` d,
k"1
ř
s ́1
k"1 mk. For any generic matrix S with the singular value decomposition
where j ̋ " j ́ d ́
(SVD) S " UΣVT, Σ " diagpσiq, σ1 ě ̈ ̈ ̈ ě σr and r " rankpSq. Denote the singular
value soft threshold operator by TcpSq " Udiagppσi ́ cq`qVT for a constant c ą 0 and
x` " maxpx, 0q. The detailed algorithm is presented in Algorithm 1. The parameter K is a
predetermined integer that controls the learning depth of TMCC, and η is a predetermined
constant for the step size. Within the algorithm, κ in the Algorithm 1 is a predetermined
stopping criterion. The proposed algorithm iteratively updates the gradient and does singular
value thresholding (SVT) [21], in addition to an accelerated proximal gradient decent [22]
step to get a fast convergence rate.
3 Theoretical Guarantee
In this section, we first provide convergence rate analysis for TMCC algorithm. Before that,
we make the following technical assumptions.
5
Algorithm 1: TMCC algorithm
Input: Incomplete matrices X, Y; indicator matrices Rx, Ry; calibration constraint
matrices A and B, tuning parameters τ1, τ2; learning depth K, step size η,
stopping criterion κ.
Initialize: Random matrices Mp0q " Mp1q P RnˆD, c " 1.
1 for k " 1 to K do
2
Compute θ " pc ́ 1q{pc ` 2q.
Compute Q " p1 ` θqMpkq ́ θMpk ́1q.
Compute T " Q ́ ηBfτ1pQq.
Compute Mpk`1q " Tητ2pTq.
if Lτ1,τ2pMpk`1qq ą Lτ1,τ2pMpkqq then
c " 1;
else
if
c " c ` 1;
ˇ
ˇ
ˇLτ1,τ2pMpk`1qq ́ Lτ1,τ2pMpkqq
ˇ
M; " Mpk`1q;
break;
ď κ then
Output: M;
3
4
5
6
7
8
9
10
11
12
Assumption 1. There exists a positive constant pmin such that
„"
*
"
*
min
min
sPrSs
min
pi,jqPrnsˆrmss
πpsq
y,ij
,
min
pi,jqPrnsˆrds
πx,ij
ě pmin,
where πx,ij " Pprx,ij " 1q, πpsq
such that
y,ij " Pprpsq
y,ij " 1q. Further, there exists a positive constant γ
ˆ„
„
„
max
max
iPrns
tπx,i ̈ ` πy,i ̈u
,
max
jPrds
πx, ̈j
,
max
sPrSs
max
jPrmss
̇
πpsq
y, ̈j
ď γ,
where πx,i ̈ "
ř
jPrds πx,ij, πx, ̈j "
ř
iPrns πx,ij, πpsq
y, ̈j "
ř
iPrns πpsq
y,ij, πy,i ̈ "
ř
sPrSs
ř
jPrmss πpsq
y,ij.
Assumption 2. There exists a positive constant α, such that max t}X‹}8 , }Z‹}8u ď α.
Assumption 3. Let D " r ́α ́ δ, α ` δs, for some δ ą 0. For any z P D, there exist
positive constants Lα and Uα, such that Lα ď pgpsqq2pzq ď Uα, where gpsq is the link function
of exponential family for s-th response matrix, for s P rSs.
Assumption 4. There exists a positive constant ζ, for any λ P R, such that Epeλ(cid:15)ij q ď eλ2ζ{2,
where (cid:15)ij's are noises for the feature matrix.
Assumption 5. There exists a constant C ą 0, such that σminpAq ě C ą 0.
6
Assumption 1 controls the sampling probabilities for our model. The first part ensures
that all the sampling probabilities are bounded away from zero. The second part aims to
bound the operator norm of a Rademacher matrix of the same dimension as M‹ stochas-
tically. Although we assume that the parameter matrix Z‹ is bounded in Assumption 2,
the support of entries in Y can be unbounded. For instance, the support of a Poisson
distribution is unbounded, while its mean is fixed. In other words, Assumption 2 implies
M‹ P G8pαq :" tG P RnˆD : }G}8 ď αu. Assumption 3 is mild under the canonical expo-
nential family framework. That is, we have Varpys
‹,ijq ą 0 for each i, j.
We extend it a little bit with tolerance δ for ease of proof. Furthermore, define ̃Lα " pLα ^ 1q
and ̃Uα " pUα _ζ _1q. Assumption 4 implies that the errors for the feature matrix come from
sub-Gaussian distributions. Assumption 5 indicates that the calibration matrix A should be
of full rank. The following Theorem 1 shows the convergence rate of the proposed algorithm
is Op1{k2q.
Theorem 1. Suppose that Assumption 1 „ 4 hold, τ1 ď
tnDσ2
sequences tMpkqu generated by Algorithm 1 satisfy
c1 minrtσmaxpAqu ́2pnDαq ́1{2,
minpAqu ́1 ̃Lαpmins and τ2 " pnDq ́12c2tp ̃Uαq1{2 _ 1{δutγ1{2 ` plogpn _ Dqq3{2u. The
‹,ijqq " pgpsqq2pzs
ij|gspzs
`
fτ1
Mpkq
̆
́ fτ1 pM‹q ď
2 ̃L
›
›Mp0q ́ M‹
ηpk ` 1q2
›
›2
F
,
with probability at least 1 ́ 4{pn ` Dq, where ̃L is a constant related to c1 and α1{2 ̃Uα.
The following theorem presents the statistical guarantee for the proposed method.
̃Lαpmin and τ2 "
Theorem 2. Suppose that Assumption 1 „ 4 hold, τ1 ď tnDσ2
pnDq ́12c2tp ̃Uαq1{2_1{δutγ1{2`plogpn_Dqq3{2u. Then, with probability as least 1 ́4{pn`Dq,
* ›
›
› pX ́ X‹
+
›
›
›pZ ́ Z‹
8τ1
̃Lαpmin
#
minpAqu ́1c1
σ2
minpAq
1
nD
1
nD
›
›
2
›
F
›
›
2
›
F
`
`
"
ď
crankpM‹q
nDp2
min
α2 `
where c, c1, c2 are positive constants.
(cid:32)
̃Uα _ 1{δ2
̃L2
α
γ ` log3pn _ Dq
,
(3)
(
Theorem 2 implies that our recovered error for the target matrix, in the sense of squared
Frobenius norm, is bounded by the right hand side of (3), with probability approaching 1
when n and D are large enough. Suppose the feature matrix is also regarded as a response
matrix from Gaussian noise with unit variance, by directly applying the Theorem 7 in [7], we
have pnDq ́1p}
F q less than the terms in the second line of (3). Fortunately,
with the help of calibration information, we have a constant order improvement. Specifically,
together with Assumption 5, we have
pX ́X‹}2
pZ ́Z‹}2
F `}
›
›
2
›
F
›
›
1
› pX ́ X‹
nD
"
8τ1
1
̃Lαpmin
nD
`
piq
ă
`
1
nD
σ2
minpAq
›
›
2
›
F
›
›
›pZ ́ Z‹
* ›
›
› pX ́ X‹
›
›
2
›
F
`
1
nD
›
›
›pZ ́ Z‹
›
›
2
›
F
,
where the inequality piq is strict, which is one of the main theoretical contributions of this
paper.
7
4 Experiments
‹{}X0
‹ " PQT and X‹ " X0
We conduct a simulation study to illustrate the performance of the proposed method. Let P P
Rnˆr and Q P Rdˆr whose entries are generated independently from a uniform distribution
over p0, 1q. Then, let X0
‹}8. We further generate coefficient matrix
Wpsq P Rdˆms whose elements are independently generated from a uniform distribution
over p0, 1q for s " 1, 2, 3. Let rZpsq
‹ " X‹Wpsq. We call this setting as "linear" case. By
rZpsq
rZpsq
normalization, we have Zpsq
‹ }8. Specifically, Yp1q has Bernoulli entries with
‹ {}
support t0, 1u, Yp2q has Poisson entries and Yp3q has Gaussian entries with known σ2 " 1.
All the link between Ypsq and Zpsq are the same as those in Section 2. For calibration
information, suppose we know the column means for X‹, i.e., A " p1{nq11ˆn and B " AX‹.
On the other hand, we have a "nonlinear" case, i.e., we assume that rZpsq
is generated by
an element-wise nonlinear transformation of X‹. Specifically, let zpsq
‹,ij " tpsqpx‹,ijq, where
tp1qpxq " x2 ` x ` 0.5, tp2qpxq " ́x2 ́ x, tp3qpxq " ́x2 ́ 2x ` 0.2. The normalization
procedure is the same as the "linear" case. The proposed method TMCC is compared with
three other approaches.
‹ "
‹
1. MC 0: Exactly the same as modified TMCC except for the gradient updating
procedure. No calibration information is considered. Therefore in Bfτ1pM:qij the term
2τ1pATAX: ́ ATBqij is eliminated.
2. CMC SI: Collective matrix completion (CMC) [7] is used to complete the parameters
for the target matrix, and Soft-Impute (SI) method from [23] is used to complete the feature
matrix separately.
3. TS: A two-stage method, where, at the first stage, only the feature matrix is imputed
by the Soft-Impute method, and at the second stage, the method MC 0 is applied to the
concatenated matrix joined by the feature matrix and the observed response matrices.
Specifically, MC 0 and TMCC share the same strategy, i.e. simultaneously recovering all
matrices, while CMC SI chooses to recover separately and TS opts to recover step by step.
In the experiments, we set n " 1500, d " 500, m1 " m2 " m3 " 500 and choose
learning depth K " 1000 and stopping criterion κ " 10 ́7. Further, we compare different
methods with rank r P t5, 10, 15u. The missing rate ν P t60%, 80%u of both the feature
matrix and response matrix are the same in each experiment. For TMCC, we tune τ1 and τ2
on one independent validation set and apply the same parameters to all other repeated 50
simulations. Further, other compared methods employ the same procedure as TMCC while
they only have to be tuned for the parameter τ2.
pXq " }
The performance of each method is evaluated via the mean value and standard deviation
of the relative errors (RE) based on repeated experiments. Specifically, the relative error
pX ́ X‹}F {}X‹}F and that of target matrix
of a recovered feature matrix is REp
REp
pZ ́ Z‹}F {}Z‹}F . Experiment results are summarized in Fig 2 and Fig 3.
pZq " }
In Fig 2, it is an unsurprising fact that TMCC surpasses MC 0 with the help of calibration
information. For instance, in the linear case with ν " 60%, the mean of RE of ˆX by MC 0
is 0.51 with standard error (SE) 0.0417 when r " 5 while that by TMCC is 0.25 with SE
0.0040. TMCC's RE is less than half of MC 0's and situations in other cases are alike.
Besides, CMC SI and TS perform the best in all scenarios. Specifically, the mean of RE of
ˆX by CMC SI is 0.01 with SE 0.0005, and that by TS is 0.01 with SE 0.0006 when r " 10 in
8
Figure 2: Relative Error of Feature Matrix (with the Black Lines Representing ± the Stan-
dard Error)
Figure 3: Relative Error of Target Matrix (with the Black Lines Representing ± the Standard
Error)
the nonlinear case with ν " 60%. It is because both CMC SI and TS complete the feature
matrix without considering the target matrix. However, our primary goal is to recover Z‹,
i.e., achieving a low relative error of ˆZ. In Fig 3, the far lower relative error of ˆX by CMC SI
and TS does not bring a lower relative error of ˆZ. Of all the four approaches, CMC SI is
the only one that fails to take advantage of the feature matrix to recover the target matrix.
That is why it attains the greatest relative error of the target matrix. For example, its mean
of RE of ˆZ is 0.46 with SE 0.0046 when r " 15 in the linear case with ν " 80% and 0.53
with SE 0.0057 when r " 15 in the nonlinear case with ν " 60%, more than twice of the
other three methods. Besides, TS, MC 0, and TMCC behave similarly in the linear case
while they display great differences in the nonlinear case. When the relationship between
X‹ and Z‹ is not linear, simultaneously recovering demonstrates great strength compared
with recovering step by step and recovering separately. In the nonlinear case with ν " 80%,
the means of RE of ˆZ by CMC SI, TS, MC 0, and TMCC are 0.66, 0.58, 0.52, and 0.46
respectively when r " 5. Situations in other cases are almost the same. What is noteworthy
is that TMCC also overtakes MC 0 with respect to target matrices, which implies the power
of calibration information again. Overall, relatively low standard errors indicate the stability
of these algorithms.
9
5 Conclusion
We proposed a statistical framework for multi-task learning under exponential family matrix
completion framework with known calibration information. Statistical guarantee of our
proposed estimator has been shown and a constant order improvement is achieved compared
with existing methods. We have also shown that the proposed algorithm has a convergence
rate of Op1{k2q. The simulation study also shows that our proposed method has numerical
benefits.
References
[1] Rich Caruana, "Multitask learning," Machine Learning, vol. 28, no. 1, pp. 41–75, 1997.
[2] Benjamin Recht, "A simpler approach to matrix completion," Journal of Machine
Learning Research, vol. 12, no. Dec, pp. 3413–3430, 2011.
[3] Raghunandan Keshavan, Andrea Montanari, and Sewoong Oh, "Matrix completion
from noisy entries," Advances in neural information processing systems, vol. 22, 2009.
[4] Vladimir Koltchinskii, Karim Lounici, and Alexandre B Tsybakov, "Nuclear-norm
penalization and optimal rates for noisy low-rank matrix completion," The Annals of
Statistics, vol. 39, no. 5, pp. 2302–2329, 2011.
[5] Sahand Negahban and Martin J Wainwright, "Restricted strong convexity and weighted
matrix completion: Optimal bounds with noise," Journal of Machine Learning Re-
search, vol. 13, no. May, pp. 1665–1697, 2012.
[6] Tony Cai and Wen-Xin Zhou, "A max-norm constrained minimization approach to
1-bit matrix completion," Journal of Machine Learning Research, vol. 14, no. 1, pp.
3619–3647, 2013.
[7] Mokhtar Z Alaya and Olga Klopp, "Collective matrix completion," Journal of Machine
Learning Research, vol. 20, no. 148, pp. 1–43, 2019.
[8] Jianqing Fan, Wenyan Gong, and Ziwei Zhu, "Generalized high-dimensional trace re-
gression via nuclear norm regularization," Journal of Econometrics, vol. 212, no. 1, pp.
177–202, 2019.
[9] Genevi`eve Robin, Olga Klopp, Julie Josse, ́Eric Moulines, and Robert Tibshirani, "Main
effects and interactions in mixed and incomplete data frames," Journal of the American
Statistical Association, vol. 115, no. 531, pp. 1292–1303, 2020.
[10] Andrew Goldberg, Ben Recht, Junming Xu, Robert Nowak, and Jerry Zhu, "Trans-
duction with matrix completion: Three birds with one stone," in Advances in neural
information processing systems, 2010, pp. 757–765.
10
[11] Miao Xu, Gang Niu, Bo Han, Ivor W Tsang, Zhi-Hua Zhou, and Masashi Sugiyama,
"Matrix co-completion for multi-label classification with missing features and labels,"
arXiv preprint arXiv:1805.09156, 2018.
[12] Ashkan Esmaeili, Kayhan Behdin, Mohammad Amin Fakharian, and Farokh Marvasti,
"Transduction with matrix completion using smoothed rank function," arXiv preprint
arXiv:1805.07561, 2018.
[13] Kai-Yang Chiang, Inderjit S Dhillon, and Cho-Jui Hsieh, "Using side information to
reliably learn low-rank matrices from missing and corrupted observations," Journal of
Machine Learning Research, vol. 19, no. 1, pp. 3005–3039, 2018.
[14] Jean-Claude Deville and Carl-Erik S ̈arndal, "Calibration estimators in survey sam-
pling," Journal of the American Statistical Association, vol. 87, no. 418, pp. 376–382,
1992.
[15] Carl-Erik S ̈arndal, Bengt Swensson, and Jan Wretman, Model assisted survey sampling,
Springer Science & Business Media, 2003.
[16] Wayne A Fuller, Sampling statistics, John Wiley & Sons, 2011.
[17] F Jay Breidt and Jean D Opsomer, "Local polynomial regresssion estimators in survey
sampling," The Annals of Statistics, vol. 28, no. 4, pp. 1026–1053, 2000.
[18] Changbao Wu and Randy R Sitter, "A model-calibration approach to using complete
auxiliary information from survey data," Journal of the American Statistical Associa-
tion, vol. 96, no. 453, pp. 185–193, 2001.
[19] Jae Kwang Kim and Mingue Park, "Calibration estimation in survey sampling," Inter-
national Statistical Review, vol. 78, no. 1, pp. 21–39, 2010.
[20] James Bennett and Stan Lanning, "The netflix prize," in Proceedings of KDD cup and
workshop. Citeseer, 2007, vol. 2007, p. 35.
[21] Jian-Feng Cai, Emmanuel J Cand`es, and Zuowei Shen, "A singular value thresholding
algorithm for matrix completion," SIAM Journal on Optimization, vol. 20, no. 4, pp.
1956–1982, 2010.
[22] Shuiwang Ji and Jieping Ye, "An accelerated gradient method for trace norm minimiza-
tion," in Proceedings of the 26th annual international conference on machine learning,
2009, pp. 457–464.
[23] Rahul Mazumder, Trevor Hastie, and Robert Tibshirani, "Spectral regularization algo-
rithms for learning large incomplete matrices," Journal of Machine Learning Research,
vol. 11, no. Aug, pp. 2287–2322, 2010.
[24] Olga Klopp, "Noisy low-rank matrix completion with general sampling distribution,"
Bernoulli, vol. 20, no. 1, pp. 282–303, 2014.
11
Appendix
In this appendix, we provide technical proofs and computational time comparisons for our
main article. Specifically, it is organized as follows:
• Section A introduces necessary preliminary;
• Section B presents proof of Theorem 1;
• Section C presents proof of Theorem 2;
• Section D provides auxiliary lemmas;
• Section E provides computational time comparison for the simulations.
A PRELIMINARY
In the following, we investigate the theoretical properties of the proposed TMCC algorithm.
Before going through those theoretical results, we first introduce some useful matrix norm
inequalities. For two matrices S and T with the same dimension, define the inner product
in terms of the trace of the matrix product, i.e., xS, Ty " trpSTTq. We have trace duality
inequality
ˇ
ˇ
ˇ
ˇtrpSTTq
ď }S} }T}‹ ,
and bound for nuclear norm
Further,
a
}S}‹ ď
rankpSq }S}F .
σminpSq }T}F ď }ST}F ,
(A.4)
(A.5)
(A.6)
where the proof of (A.6) is presented in Lemma 2. Suppose the SVD of S is USΣSVT
S .
Let rPS " SpSTSq ́1ST be the projection matrix based on S. Define P K
T rPVK
,
rPFqF for a matrix F. Notice that P K
where FK " pI ́
S pTq is not a projection since it is not
idempotent. Let PSpTq " T ́ P K
S pTq and we have
S pTq "
rPUK
S
S
rank tPSpTqu ď 2rankpSq.
By [24], we have
}S}‹ ́ }T}‹ ď }PSpS ́ Tq}‹ `
›
›P K
›
›
S pS ́ Tq
.
‹
Finally, we define the Bregman divergence.
(A.7)
(A.8)
Definition 1. Let C be a closed set. For a continuously-differentiable function F : C Ñ R,
the Bregman divergence associated with F between x, y P C is
dF px, yq " F pxq ́ F pyq ́ x∇F pyq, x ́ yy.
12
Mathematically, dF px, yq is equivalent to the first-order Taylor expansion error of F pxq
evaluated at y.
Denote ΣR to be an n ˆ D matrix, consisting of i.i.d. Rademacher sequences tξx,ij : i P
rns, j P rdsu and tξpsq
y,ij : i P rns, j P rmssu for s P rSs. Specifically,
pn,dqÿ
Sÿ
pn,msqÿ
ΣR "
ξx,ijrx,ijEx,ij `
pi,jq
s"1
pi,jq
y,ijrpsq
ξpsq
y,ijEpsq
y,ij,
where Ex,ij " eipnqejpDqT and Epsq
canonical bases, eiplq is the j-th unit vector of length l and ̃j " j ` d `
y,ij " eipnqe ̃jpDqT are RnˆD matrices lying in the set of
ř
s ́1
t"1 mt.
B PROOF OF THEOREM 1
Proof. Given two arbitrary matrices S, T P RnˆD, we have
(cid:32)
|fτ1pSq ́ fτ1pTq|
ˇ
)
!
ˇ
̃(cid:96)pSq ́ ̃(cid:96)pTq
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ ̃(cid:96)pSq ́ ̃(cid:96)pTq
ˇ ` τ1
›
́
›
ĂM
›∇ ̃(cid:96)
!?
́
́ τ1
ˇ
(cid:32)
ˇ
̄›
›
› }S ́ T}‹ ` τ1σ2
̄›
›
›
›
ĂM
›∇ ̃(cid:96)
› ` 2τ1σ2
n ^ D
"
ď
ď
ď
}A pS ́ M‹q}2
}A pS ́ M‹q}2
F ́ }A pT ́ M‹q}2
F
(ˇ
ˇ
F ́ }A pT ́ M‹q}2
F
(ˇ
ˇ
ˇ
1pAq }S ́ T}F }S ` T ́ 2M‹}F
?
)
1pAq
nDα
}S ́ T}F ,
ĂMq}.
́
ĂM
where ĂM P G8pαq. We focus on bound of }∇ ̃(cid:96)p
›
̄›
›
›
›∇ ̃(cid:96)
›
›
›
›
›
›∇ ̃(cid:96)pM‹q
› `
›
›
›
›
›∇ ̃(cid:96)pM‹q
› `
›
›
›
›
ĂMq ́ ∇ ̃(cid:96)pM‹q
›∇ ̃(cid:96)p
›
›
›
Sÿ
›
›
›
›
s"1
y,ijEpsq
rpsq
1
nD
y,ij ˆ
pi,jqPrnsˆrmss
ÿ
ď
ď
ÿ
pi,jqPrnsˆrds
`
ÿ
pi,jqPrnsˆrmss
y,ijEpsq
rpsq
ı
y,ij
›
›
›
›
›∇ ̃(cid:96)pM‹q
› `
ď
a
Sÿ
›
›
›
›
›
›
s"1
̃Uα
nD
"
?
c2p
̃Uα _ 1{δq
γ ` tlogpn _ Dqu3{2
ď
ď
c3?
nD
.
nD
`
?
2
nDα ̃Uα
nD
!
pgpsqq1p ̃zpsq
)
‹,ijq ́ pgpsqq1pzpsq
‹,ijq
›
›
›
›
N pxijqu
›
›
N p ̃xijq ́ g1
rx,ijEx,ij tg1
ˇ
ˇ
‹,ij ́ zpsq
ˇ ̃zpsq
‹,ij
ˇ
ˇ
ˇ `
ÿ
pi,jqPrnsˆrds
rx,ijEx,ij | ̃xij ́ xij|
›
›
›
›
›
›
13
Therefore, as long as τ1 ď c1tσ1pAqu ́2pnDαq ́1{2, there exists positive constant ̃L " 2c1 ` c3
such that fτ1p ̈q is ̃L-Lipchitz. The remaining proof can be obtained by followed the proof of
Theorem 4.1 in [22].
C PROOF OF THEOREM 2
Proof. In general, we use the connection between exponential family distributions and Breg-
man divergence to argue the basic inequality implied by our estimation procedure. Then, a
key quantity can be bounded and the results can be obtained by the standard argument for
matrix completion. Specifically, by basic inequality, we have
ij ` gpsqpˆzpsq
ij q
)
ÿ
`
pi,jqPrnsˆrds
rx,ij
2
pˆxij ́ xijq2
fi
fl
!
́ypsq
ij z‹,ij ` gpsqpzpsq
‹,ijq
rpsq
y,ij
F ` τ2 }M‹}‹
!
́ypsq
ij z‹,ij ` gpsqpzpsq
‹,ijq
rpsq
y,ij
)
`
)
`
ÿ
pi,jqPrnsˆrds
ÿ
pi,jqPrnsˆrds
rx,ij
2
rx,ij
2
fi
fl
px‹,ij ́ xijq2
fi
fl ` τ2 }M‹}‹ ,
px‹,ij ́ xijq2
where the calibration information implies the last equality. Let gN pxq " x2{2, expanding
quadratic terms of xij, and we have
ij ` gpsqpˆzpsq
ij q
)
fi
rx,ij t ́xij ˆxij ` gN pˆxijqu
fl
ÿ
`
pi,jqPrnsˆrds
!
́ypsq
ij ˆzpsq
›
›
›
›
›xM
›
‹
` τ2
»
–
Sÿ
ÿ
rpsq
y,ij
s"1
` τ1
»
pi,jqPrnsˆrmss
›
›
›
›
2
›A pX ́ B
›
F
Sÿ
–
ÿ
s"1
pi,jqPrnsˆrmss
` τ1 }AX‹ ́ B}2
»
ÿ
Sÿ
–
s"1
pi,jqPrnsˆrmss
1
nD
ď
1
nD
"
1
nD
1
nD
»
–
Sÿ
ÿ
rpsq
y,ij
s"1
` τ1
»
pi,jqPrnsˆrmss
›
›
›
›
2
›A pX ́ B
›
F
!
́ypsq
ij ˆzpsq
›
›
›
›
›xM
›
‹
` τ2
ď
1
nD
Sÿ
–
ÿ
s"1
pi,jqPrnsˆrmss
rx,ij t ́xijx‹,ij ` gN px‹,ijqu
fi
fl ` τ2 }M‹}‹ .
!
́ypsq
ij z‹,ij ` gpsqpzpsq
‹,ijq
)
`
ÿ
rpsq
y,ij
pi,jqPrnsˆrds
14
Rearranging the terms, we obtain
̈
1
nD
Sÿ
̋
ÿ
s"1
pi,jqPrnsˆrmss
ÿ
"
rpsq
y,ij
́ypsq
ij
́
ij ́ zpsq
pzpsq
‹,ij
̄
`
!
gpsqppzpsq
ij q ́ gpsqpzpsq
‹,ijq
̨
)ı
`
rx,ij ˆ r ́xijpˆxij ́ x‹,ijq ` tgN pˆxijq ́ gN px‹,ijqus
‚
pi,jqPrnsˆrds
ď ́ τ1
" ́ τ1
›
›
›
›
2
›A pX ́ B
›
F
›
́
›
pX ́ X‹
›A
›
›
›xM
́
}M‹}‹ ́
́
}M‹}‹ ́
` τ2
̄
›
›
›
›
‹
›
›xM
` τ2
̄›
›
2
›
F
̄
›
›
›
‹
.
(C.9)
Plug in the Bregman divergence into (C.9) with (A.4), and we have
1
nD
ď ́ τ1
»
Sÿ
–
ÿ
s"1
›
›
›A pX ́ B
»
pi,jqPrnsˆrmss
›
›
2
›
F
ÿ
Sÿ
` τ2
–
1
nD
!
rpsq
y,ijdgpsq
́
}M‹}‹ ́
‹,ij
́
ij , zpsq
pzpsq
›
›
̄
›
›
›xM
›
‹
̆
!`
̄)
`
ÿ
!
rpsq
x,ijdgN ppxij, x‹,ijq
pi,jqPrnsˆrds
́
)
fi
fl
rpsq
y,ij ˆ
gpsq
1
pzpsq
‹,ijq ́ ypsq
ij
) ́
̄
ij ́ zpsq
pzpsq
‹,ij
`
s"1
pi,jqPrnsˆrmss
ÿ
rx,ij tpgN q1px‹,ijq ́ xiju pˆxij ́ x‹,ijq
fi
fl
›
›
›A pX ́ B
›
›
›A pX ́ B
pi,jqPrnsˆrds
›
›
2
›
F
›
›
2
›
F
` τ2
` τ2
" ́ τ1
ď ́ τ1
́
}M‹}‹ ́
́
}M‹}‹ ́
ř
̄
̄
›
›
›
›
›xM
›
›
›
‹
›
›
›xM
›
‹
́ x∇ ̃(cid:96)pM‹q, xM ́ M‹y
›
›
›
›
›
›
›xM ́ M‹
›∇ ̃(cid:96)pM‹q
›
`
›
›
›
‹
,
(C.10)
pi,jqPrnsˆrds rx,ij ˆt ́xijx‹,ij `gN px‹,ijqus. With an additional
Sÿ
$
&
where ̃(cid:96)pM‹q " pnDq ́1r(cid:96)pZ‹q`
assumption that τ2 ě 2}∇ ̃(cid:96)pM‹q}, together with (A.5) and (A.7), (C.10) yields
́
ij , zpsq
pzpsq
́
pX ́ X‹
›
́
›
pX ́ X‹
›A
s"1
pi,jqPrnsˆrmss
̄›
́
›
xM ́ M‹
›
‹
›
›
›xM ́ M‹
%
›
›
›PM
a
2rankpM‹q
rpsq
y,ijdgpsq
̄›
›
2
›
F
1
nD
pi,jqPrnsˆrds
́ τ1
rx,ijdgN pˆxij, x‹,ijq
ÿ
ÿ
ď
`
ď
‹,ij
̄
.
›
›
›A
́ τ1
›
›
›
F
̄›
›
2
›
F
3τ2
2
3τ2
2
,
.
-
(C.11)
Meanwhile, as Lαpx ́ yq2 ď 2dgpsqpx, yq ď Uαpx ́ yq2 and 2dgN px, yq " px ́ yq2, we have
∆2
̃(cid:96) ď
2
̃LαnD
$
&
Sÿ
ÿ
%
s"1
pi,jqPrnsˆrmss
rx,ijdgN pˆxij, x‹,ijq
,
.
- ,
́
̄
rpsq
y,ijdgpsq
ij , zpsq
pzpsq
‹,ij
`
ÿ
pi,jqPrnsˆrds
15
where
∆2
̃(cid:96) "
1
nD
$
&
Sÿ
%
s"1
ÿ
́
pzpsq
ij ́ zpsq
‹,ij
̄
2
`
rpsq
y,ij
ÿ
pi,jqPrnsˆrmss
pi,jqPrnsˆrds
rx,ij pˆxij ́ x‹,ijq2
,
.
- .
Put (C.11) and (C.12) together, and we obtain
"
∆2
̃(cid:96) ď
2
̃Lα
a
3τ2
2
2rankpM‹q
›
›
›xM ́ M‹
›
›
›A
́
pX ́ X‹
́ τ1
›
›
›
F
*
.
̄›
›
2
›
F
(C.12)
(C.13)
With Lemma 1 and 5 in the Appendix, follow the proof of Theorem 3 in [7], our main
theorem is proved.
D AUXILIARY LEMMAS
Lemma 1. Let arbitrary matrices S, T P G8pαq. Assume that τ2 ě 2}∇ ̃(cid:96)pTq} and ̃(cid:96)pSq `
τ2}S}‹ ď ̃(cid:96)pTq ́ τ1}ApSrds ́ Trdsq}2
F ` τ2}T}‹, where Srds consists of the first d columns of
S. Then we have
›
›P K
›
›
‹ ď 3 }PTpS ́ Tq}F ́ 2τ1τ ́1
TpS ́ Tq
a
minpAq
2 σ2
1.
2. }S ́ T}‹ ď 4
2rankpTq }S ́ T}F ́ 2τ1τ ́1
2 σ2
minpAq
›
›
›2
›Srds ́ Trds
F ,
›
›
›2
›Srds ́ Trds
F .
Proof. Rearranging the terms, we have
τ2 p}S}‹ ́ }T}‹q ď ̃(cid:96)pTq ́ ̃(cid:96)pSq ́ τ1
›
›
›2
›ApSrds ́ Trdsq
F .
(D.14)
By convexity of ̃(cid:96)p ̈q and (A.4), we have
̃(cid:96)pTq ́ ̃(cid:96)pSq ď x∇ ̃(cid:96)pTq, T ́ Sy ď
›
›
›
›
›∇ ̃(cid:96)pTq
› }T ́ S}‹ ď
τ2
2
}T ́ S}‹ .
(D.15)
Plug (D.15) in (D.14) with (A.8), and we obtain
›
›
‹ ́ τ2 }PTpS ́ Tq}‹ ď
TpS ́ Tq
›
›P K
τ2
τ2
2
}T ́ S}‹ ́ τ1
›
›
›2
›ApSrds ́ Trdsq
F .
Rearranging terms, we have
›
›P K
›
›
TpS ́ Tq
‹
ď3 }PTpS ́ Tq}‹ ́
ď3 }PTpS ́ Tq}‹ ́
›
›
›2
›ApSrds ́ Trdsq
F
›
›
›2
›
F ,
pSrds ́ Trdsq
σ2
minpAq
2τ1
τ2
2τ1
τ2
16
where the first part is proved. For the second part, we have
}S ́ T}‹
›
›P K
›
›P K
›
›
TpS ́ Tq ` PTpS ́ Tq
TpS ́ Tq
"
ď
‹
›
›
‹ ` }PTpS ́ Tq}‹
›
›
σ2
pSrds ́ Trdsq
minpAq
›
›Srds ́ Trds
σ2
minpAq
2τ1
τ2
›
›2
F
2τ1
τ2
›
›2
F .
ď4 }PTpS ́ Tq}‹ ́
a
ď4
2rankpTq }S ́ T}F ́
Lemma 2. Given S and T of arbitrary matrices with the same dimension,
σminpSq }T}F ď }ST}F .
Proof. By singular value decomposition, let S " USΛSVT
cyclic property of trace operator,
S and T " UTΛTVT
T. Then by the
}ST}2
F "
`
`
›
›USΣSVT
S UTΣTVT
T
›
›2
F
SUSΣSVT
TVSΣSUT
VTΣTUT
SVT
VSΣ2
S UTΣTVT
TVTΣTUT
T
̆
`
UTΣTVT
TVTΣTUT
minpSqTr
T
minpSq }T}2
F .
" tr
" tr
ě σ2
" σ2
̆
S UTΣTVT
T
̆
The following three lemmas can be adapted from [7].
Lemma 3 (Modified Lemma 5 of [7]). Suppose that Assumption 1 holds. There exists a
positive constant c, such that
c
E p}ΣR}q ď
!
?
γ `
a
)
log pn _ Dq
nD
.
Lemma 4 (Modified Lemma 6 of [7]). Suppose that Assumption 1, 3 and 4 hold and there
exists a positive constant c, such that
a
ı
›
›
›
›
›∇ ̃(cid:96)pM‹q
› ď
cp
̃Uα _ 1{δq
γ ` tlogpn _ Dqu3{2
holds with probability at least 1 ́ 4{pn ` Dq.
"
?
nD
17
Lemma 5 (Modified Lemma 19 of [7]). Suppose that Assumption 1 „ 3 hold. Let β "
946ppminnDq ́1α2 logpn ` Dq. Let
HpM‹, α, β, μ, θq "
!
?
H P G8pαq : }H ́ M‹}‹ ď
*
›
›
›xM ́ M‹
ą β
.
›
›
2
›
Π,F
1
nD
μ }H ́ M‹}F ́ θ
›
›Hrds ́ M‹rds
›
›2
F ,
Then, for any H P HpM‹, α, β, μ, θq,
ˇ
ˇ
ˇ
ˇ∆ ̃(cid:96)pH, M‹q ́
}H ́ M‹}2
ˇ
ˇ
ˇ
ˇ ď
Π,F
1
nD
1
2nD
}H ́ M‹}2
Π,F `
1392nDα2μ
pmin
tEp}ΣR}qu2 `
5567α2
nDpmin
,
with probability at least 1 ́ 4pn ` Dq ́1.
E Computational Time Comparison
In terms of accuracy, our algorithm outperforms others. For the computational time, our
algorithm enjoys a sublinear rate, which is the same as the CMS SI method. Besides, TS
and MC 0 methods are just small deviations from TMCC method, and they enjoy the
same sublinear convergence rate. We present the computational behavior among different
methods under the missing rate ν " 80%, rank r = 15 with 50 trials. Further, the stopping
criterion for the objective is κ " 1e ́ 7. For TS, the first stage (Feature matrix recovery)
stopping criterion is κ0 " 1e ́ 12. The results are presented in Table 1, where the running
time for TS consists of the time for the first stage plus that for the second stage. The results
show the comparable elapsed time for the four methods.
Table 1: Computational Time for Different Scenarios.
Transformation
Measure
CMC SI
TS
MC 0 TMCC
Linear
Nonlinear
Average Time(s)
569.82
1865.40 (185.19+1680.21)
676.20
Standard Error
78.19
801.61 (107.40+753.79)
50.86
926.53
125.39
Average Time(s)
271.78
1072.69 (201.79+870.90)
1141.88
1108.50
Standard Error
28.13
323.55 (110.12+255.70)
476.88
247.77
18
|
|
http://arxiv.org/abs/2302.09833v2 | 2023-05-03T20:03:53 | 2023-02-20T08:42:06 | Domain-Specific Pre-training Improves Confidence in Whole Slide Image
Classification | Whole Slide Images (WSIs) or histopathology images are used in digital
pathology. WSIs pose great challenges to deep learning models for clinical
diagnosis, owing to their size and lack of pixel-level annotations. With the
recent advancements in computational pathology, newer multiple-instance
learning-based models have been proposed. Multiple-instance learning for WSIs
necessitates creating patches and uses the encoding of these patches for
diagnosis. These models use generic pre-trained models (ResNet-50 pre-trained
on ImageNet) for patch encoding. The recently proposed KimiaNet, a DenseNet121
model pre-trained on TCGA slides, is a domain-specific pre-trained model. This
paper shows the effect of domain-specific pre-training on WSI classification.
To investigate the effect of domain-specific pre-training, we considered the
current state-of-the-art multiple-instance learning models, 1) CLAM, an
attention-based model, and 2) TransMIL, a self-attention-based model, and
evaluated the models' confidence and predictive performance in detecting
primary brain tumors - gliomas. Domain-specific pre-training improves the
confidence of the models and also achieves a new state-of-the-art performance
of WSI-based glioma subtype classification, showing a high clinical
applicability in assisting glioma diagnosis. We will publicly share our code
and experimental results at
https://github.com/soham-chitnis10/WSI-domain-specific. | [
"Soham Rohit Chitnis",
"Sidong Liu",
"Tirtharaj Dash",
"Tanmay Tulsidas Verlekar",
"Antonio Di Ieva",
"Shlomo Berkovsky",
"Lovekesh Vig",
"Ashwin Srinivasan"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09833v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09833v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.CV",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.CV",
"cs.AI",
"cs.LG"
] | Domain-Specific Pre-training Improves Confidence in Whole Slide
Image Classification
Soham Rohit Chitnis1, Sidong Liu2,∗, Tirtharaj Dash3, Tanmay Tulsidas Verlekar1,
Antonio Di Ieva2,∗, Shlomo Berkovsky2,∗, Lovekesh Vig4, Ashwin Srinivasan1
3
2
0
2
y
a
M
3
]
V
C
.
s
c
[
2
v
3
3
8
9
0
.
2
0
3
2
:
v
i
X
r
a
Abstract- Whole Slide Images (WSIs) or histopathology
images are used in digital pathology. WSIs pose great
challenges to deep learning models for clinical diagnosis,
owing to their size and lack of pixel-level annotations. With
the recent advancements in computational pathology, newer
multiple-instance learning-based models have been proposed.
Multiple-instance learning for WSIs necessitates creating
patches and uses the encoding of these patches for diagnosis.
These models use generic pre-trained models (ResNet-50 pre-
trained on ImageNet) for patch encoding. The recently proposed
KimiaNet, a DenseNet121 model pre-trained on TCGA slides,
is a domain-specific pre-trained model. This paper shows the
effect of domain-specific pre-training on WSI classification.
To investigate the effect of domain-specific pre-training,
we considered the current state-of-the-art multiple-instance
learning models, 1) CLAM, an attention-based model, and 2)
TransMIL, a self-attention-based model, and evaluated the
models' confidence and predictive performance in detecting
primary brain tumors - gliomas. Domain-specific pre-training
the models and also achieves
improves the confidence of
a new state-of-the-art performance of WSI-based glioma
subtype classification, showing a high clinical applicability
in assisting glioma diagnosis. We will publicly share our
code and experimental results at https://github.com/
soham-chitnis10/WSI-domain-specific.
Keywords- Domain-specific Pre-training, Whole Slide Image
Classification, Multiple Instance Learning, Brain Tumor
I. INTRODUCTION
Currently, histopathology is the clinical gold standard
for tumor assessment and diagnosis. With advancements
in digital pathology and artificial
intelligence (AI), deep
learning techniques have shown great potential in assisting
tumor diagnosis. However, deep learning-based approaches
require either manually annotated whole slide images (WSIs)
or large datasets with slide-level
labels in a weakly su-
pervised setting. The slide-level labels may correspond to
small regions from the gigapixel WSIs. Therefore, most of
the approaches rely on pixel, patch, or regions-of-interest
(ROI) level annotations [1], [2], [3], [4]. There have been
attempts to assign the same label to each patch [5], but these
approaches suffer from noisy training and are not applicable
*Sidong Liu and Antonio Di Ieva were supported by an Australian
NHMRC Ideas Grant.
1Soham Rohit Chitnis, Tanmay Tulsidas Verlekar, and Ashwin Srinivasan
are with Department of Computer Science & Information Systems, Birla
Institute of Technology and Science, Pilani
2Sidong Liu, Antonio Di Ieva and Shlomo Berkovsky are with Faculty
of Medicine, Health and Human Sciences, Macquarie University
3Tirtharaj Dash is with Boolean Lab, University of California, San Diego
4Lovekesh Vig is with TCS Research, India
when the slide-level label corresponds to tiny regions from
the image.
Recently proposed multiple-instance learning models use
feature embedding [6], [7], [8], [9], [10], [11]. Clustering-
constrained Attention Multiple instance learning (CLAM)
[10] is a deep learning-based digital pathology framework
for weakly supervised WSI classification using attention-
based instance-level clustering. The CLAM algorithm does
not require ROI extraction, or pixel or tile or patch-level
annotations. The algorithm works based on the attention
scores assigned to the tiles or patches during the training,
where the highest attention scores are considered positive
evidence of the class. A ResNet50 network [12] pre-trained
on the ImageNet dataset is used for extracting features from
tiles or patches obtained from the segmented tissue region.
CLAM produces interpretable heatmaps that allow medical
practitioners to visualize the tissue regions that contribute to
the predictions of the model. These heatmaps displaying the
morphological features can be verified by trained patholo-
gists whether the decisions made by the model align with
the manual diagnostic determinations. TransMIL [11] is a
recently proposed model which is based on a transformer
model. Just like CLAM, TransMIL only requires a slide-level
label and also shows great interpretability.
Training a deep neural network from scratch for specific
problem statements may not be feasible due to limited avail-
able data, or training may take a very long time. Therefore,
many researchers exploit pre-trained models. In domain-
specific pre-training, the models are first pre-trained on a
large dataset, followed by a fine-tuning over the domain-
specific dataset. Generally, in computer vision, models pre-
trained on ImageNet data have been used for domain-specific
downstream tasks. We call a model pre-trained on ImageNet
as generic pre-trained, and the model fine-tuned on a domain-
specific dataset as domain-specific pre-trained.
Current state-of-the-art WSI classification models, such
as CLAM and TransMIL, are based on features extracted
by generic pre-trained models, e.g., ResNet50 pre-trained
on ImageNet samples, which differ from WSIs in terms of
color, texture, morphological, and geometric representations.
However, the impact of domain-specific pre-training on WSI
classification has not yet been investigated. Our main con-
tributions are as follows:
• We introduce Confidence as an evaluation metric for
WSI classification.
• We investigate the impact of domain-specific pre-
training on the model's performance and confidence.
II. EMPIRICAL EVALUATION
standard cross-entropy loss, and the instance clustering loss
is a smooth SVM loss. For the instance clustering level,
we consider B = 8, which is 8 positive and negative samples.
A. Aims
We conjecture that domain-specific pre-training improves
not just the accuracy, but also the confidence in prediction of
the models for WSI classification. We will test this conjecture
using the following pre-training methods (a) a generic pre-
trained model, DenseNet121 (pre-trained on ImageNet Data),
(b) a domain-specific pre-trained model, KimiaNet (pre-
trained on WSIs). Generic and domain-specific pre-trained
models are used as inputs to two different approaches for
constructing models for WSI: (a) CLAM and (b) TransMIL.
TransMIL It uses a self-attention-based mechanism to
model the correlation between the patches. TransMIL has
two transformer layers for aggregating the morphological
information. TransMIL has adopted the approximation for
self-attention proposed in the Nystr ̈om method [20]. It uses
the Pyramid Positional Encoding Generator (PPEG) for
positional encoding, which can encode global and context
information. TransMIL uses the standard cross-entropy loss
for training the model.
B. Datasets
D. Evaluation Metrics
Two datasets are used for pre-training feature extrac-
tors, including ImageNet and The Cancer Genome Atlas
(TCGA). ImageNet dataset is a classical collection of nat-
ural images for the visual recognition task [13]. ResNet50
and DenseNet121 Networks are pre-trained on this dataset.
TCGA is the large domain-specific dataset on which Kimi-
aNet was trained. This is a publicly available repository [14],
[15], [16] with 30,072 WSIs. KimiaNet was trained on a
subset of this dataset with 11,579 WSIs with permanent
hematoxylin and eosin (H&E) sections. Further details are
available in [17].
The Digital Brain Tumor Atlas (DBTA) dataset [18] is
the classification models. DBTA
used to train and test
dataset consists of 3,115 slides of 126 brain tumor types. A
subset of this dataset contains a total of 866 histopathology
slides of 791 patients with the 5 primary brain tumor types
with molecular subtypes based on the 2021 WHO classi-
fication of central nervous system tumors [19], including
117 astrocytoma-IDH mutant, 66 astrocytoma-IDH wildtype,
176 oligodendroglioma-IDH wildtype, 34 glioblastoma-IDH
mutant, and 473 glioblastoma-IDH wildtype WSIs. The
70:15:15 split is used for the training, validation, and test
sets. As several patients have multiple slides, we ensure that
different slides of a patient do not exist in both the training
and test sets.
C. Models
We focus on the recently developed state-of-the-art
models, CLAM [10], and TransMIL [11], both of which are
multiple-instance learning models.
branch
(CLAM-SB)
and multiple
CLAM: We consider two variants of CLAM, namely
single
branches
(CLAM-MB). CLAM uses attention-based pooling [6]
to aggregate the slide-level representations from patch-level
representations. CLAM has N multi-class attention branches
for the N multi-classification problem, which are used to
score the class-specific slide-level representations. During
training, it has the instance clustering level, which can learn
the class-specific features; therefore, CLAM uses a weighted
loss of the slide-level classification, and the instance-level
clustering loss is used. The slide-level classification is the
The state-of-the-art models have used accuracy and Area
Under the Receiver Operating Characteristic Curve (AUC) as
the evaluation metrics for benchmarking. We also evaluate
the confidence of models, which is the average class prob-
ability of the predicted class. Confidence is given by the
equation (1), where ypred is the predicted class-label, and x
is a sample from the test set X.
Conf idence =
(cid:80)
x P (ypred|x)
|X|
(1)
E. Algorithms and Machines
We train all models on NVIDIA Tesla V100-SXM2 GPU
with 32GB memory. The code has been implemented using
PyTorch Deep Learning Framework, and Python net:cal
library [21] is used for evaluation of the confidence of the
model.
III. METHOD
A. Pre-Processing
The gigantic size of WSIs poses challenges in training a
model in an end-to-end fashion and would require expensive
computing power;
therefore, multiple-instance learning
models are proposed. In the context of WSI classification,
we consider the slide as the bag and the patches of the
slides as the instances. Figure 1 shows the key steps of the
WSI pre-processing pipeline.
Segmentation and patching For the segmentation and
patching of each slide, we use the highly efficient method
proposed by CLAM [10]. Patches of size 256 x 256 are
cropped from the segmented foreground contours. DBTA
has the slide image captured at 20x and 40x resolution.
The higher
the number
of patches, leading to higher computational requirements.
Therefore all models have been trained at 20x magnification.
the magnification,
the higher
Feature extraction The MIL-based models require cre-
ating patches from the slides. CLAM [10] and TransMIL
[11] methods require a feature extraction process. They
the features using a generic pre-trained model,
extract
The following additional details are relevant:
- data-seed is responsible for the train/validation/test
split, and model-seed is responsible for the initializa-
tion of model parameters. The number of data-seed is
5 and the number of model-seed is 3 in this study, so
there are 15 combinations in total. In all cases, average
values over all 15 experiments of accuracy, AUC, and
confidence are used for comparison.
- We train models for 200 epochs in each run and use
'early stopping' with patience of 20 epochs. We train
the model for at least 50 epochs to ensure the model has
converged. The learning rate is set to 2e-4 with weight
decay of 1e-5. The batch size is set to 1.
- Adam optimizer [23] is used for training CLAM, and
Lookahead optimizer [24] is used for training Trans-
MIL.
- Multinomial sampling is used to mitigate the class
imbalance problem in the training set. The multinomial
sampling probabilities are inversely proportional to the
frequency of the ground truth.
IV. RESULTS
The main results from our experiments comparing generic
and domain-specific pre-training are presented in Table I.
The most interesting observation is that domain-specific pre-
training results in higher average confidence in prediction (by
0.3% to 1.3%), which appears to be less well-known. The
impact of domain-specific pre-training on the model's test
accuracy and AUC are not conclusive. For example, when
using CLAM as the classification model, KimiaNet results
in higher accuracy, but DenseNet results in higher AUC, and
it is the opposite when using TransMIL. We also note that,
unlike the results in [11], which showed a clear advantage
of using the transformer-based approach, we find results for
TransMIL are mixed. This may be due to differences in the
dataset we have used, which is different to the benchmarks
used, or due to differences in hyper-parameter tuning.
TABLE I
EVALUATION OF DOMAIN-SPECIFIC PRE-TRAINING
Models
CLAM-SB
CLAM-MB
TransMIL
AUC
Accuracy
Confidence
DenseNet
95.86
(± 1.80)
96.53
(± 1.73)
95.52
(± 2.76)
KimiaNet
95.69
(± 1.99)
96.27
(± 1.51)
96.85
(± 1.20)
DenseNet
88.24
(± 3.74)
88.74
(± 2.64)
90.58
(± 1.93)
KimiaNet
89.84
(± 2.60)
89.72
(± 4.03)
89.36
(± 2.30
DenseNet
92.64
(± 3.37)
93.08
(± 2.67)
93.28
(± 4.98)
KimiaNet
93.51
(± 2.52)
94.37
(± 4.18)
93.57
(± 3.43)
Table II shows a comparison between ResNet50 and
DenseNet121. We note that the structure of the generic pre-
trained model also plays an important role in improving
both predictive accuracy (by 1.1% to 4.6%) and confidence
(by 1.6% to 9.6%). Since the DenseNet structure is uti-
lized by KimiaNet, the gains made by using the DenseNet
structure are incorporated in the results with KimiaNet. In
combination, we believe the results provide evidence for the
improved performance on model's confidence with domain-
specific pre-training, irrespective of the CLAM or TransMIL
models used for classification.
Fig. 1. The WSI pre-processing pipeline.
ResNet50 network pre-trained of the ImageNet data. There-
fore, ResNet50 is considered the baseline. DenseNet archi-
tecture has shown better results on the ImageNet dataset due
to the dense connections between all layers with match-
ing feature-maps sizes [22]. Instead of the generic pre-
trained model (DenseNet121), we propose to use the domain-
specific pre-trained network called KimiaNet [17], which is
a DenseNet121 network pre-trained on TCGA data. We will
consider the DenseNet121 network, pre-trained on ImageNet,
for comparison with KimiaNet, whose structure is the same.
B. Experimental Procedure
Our procedure to test the experimental conjecture in Sec.
II-A is straightforward:
1) Let a slide be denoted by s, where s ∈ S , the set of
slides
2) For each s ∈ S , segment and create patches; the set
of all patches of s is denoted by p
pre-training method
each
3) For
in
{ResNet50,
DenseNet121, KimiaNet}
• For each p, extract features
• Let D denote an array of data seeds, and M denote
an array of model seeds
• For each data-seed in D:
– Split the dataset into train/validation/test sets
– For each model-seed in M :
∗ Use the selected features to train each classi-
fication model in {CLAM-SB, CLAM-MB,
TransMIL}
∗ Estimate the test accuracy, AUC, and confi-
dence of the classification model
Classification of glioma types (i.e., astrocytoma, oligoden-
droglioma, and glioblastoma) is generally a difficult task;
the current state-of-the-art performance is accuracy of 0.861
and AUC of 0.961 [25]. Classification of glioma molecular
subtypes is also challenging; for instance, the best binary
classification performance of the IDH-gene molecular sub-
type is accuracy of 0.882, and AUC of 0.931 [26]. We test
our models on the classification of both glioma types and
molecular subtypes, which is a more challenging task, yet
the models that use KimiaNet or DenseNet with TransMIL
outperform this prior art.
TABLE II
EVALUATION OF THE STRUCTURE OF FEATURE EXTRACTOR
Models
CLAM-SB
CLAM-MB
TransMIL
AUC
Accuracy
Confidence
ResNet
95.43
(± 1.35)
96.70
(± 1.03)
95.40
(± 2.53)
DenseNet
95.86
(± 1.80)
96.53
(± 1.73)
95.52
(± 2.76)
ResNet
83.67
(± 4.23)
87.65
(± 2.87)
88.18
(± 3.53
DenseNet
88.24
(± 3.74)
88.74
(± 2.64)
90.58
(± 1.93)
ResNet
83.05
(± 4.85)
89.07
(± 4.18)
91.69
(± 3.92)
DenseNet
92.64
(± 3.37)
93.08
(± 2.67)
93.28
(± 4.98)
V. CONCLUSIONS
This work is the first study that investigates the impact of
domain-specific pre-training in WSI classification and uses
confidence as a metric to evaluate the model's performance.
We first consider the DenseNet model pre-trained on Im-
ageNet and assess its accuracy, AUC and confidence when
combined with CLAM and TransMIL to classify brain tumor
WSIs. We then explore KimiaNet, a DenseNet121 model pre-
trained on TCGA slides to tackle the same problem. We
propose domain-specific pre-training of KimiaNet improves
the classification accuracy, AUC and confidence of CLAM
and TransMIL. The evaluation of our proposal on the DBTA
dataset suggests that KimiaNet is a better feature extractor
than generic DenseNet and ResNet, as it improves CLAM
and TransMIL's confidence. Additionally, using TransMIL
with KimiaNet achieves a new state-of-the-art performance
of WSI-based glioma classification, which shows high clini-
cal applicability of the model in assisting glioma diagnosis,
particularly in predicting the molecular subtypes. This study
also sheds light on the impact of the feature extractor's
structure on the prediction performance. In our future work,
we will investigate if advanced convolutional structures can
further benefit multiple-instance learning models and im-
prove their classification performance.
REFERENCES
[1] S. Wang, Y. Zhu et al., "Rmdl: Recalibrated multi-instance deep
learning for whole slide gastric image classification," Medical Image
Analysis, vol. 58, p. 101549, 12 2019.
[2] P.-H. C. Chen, K. Gadepalli et al., "An augmented reality microscope
with real-time artificial intelligence integration for cancer diagnosis,"
Nature Medicine, vol. 25, pp. 1453–1457, 9 2019.
[3] K. Nagpal, D. Foote et al., "Development and validation of a deep
learning algorithm for improving gleason scoring of prostate cancer,"
npj Digital Medicine, vol. 2, p. 48, 6 2019.
[4] B. E. Bejnordi, M. Veta et al., "Diagnostic assessment of deep learning
algorithms for detection of lymph node metastases in women with
breast cancer," JAMA, vol. 318, p. 2199, 12 2017.
[5] N. Coudray, P. S. Ocampo et al., "Classification and mutation pre-
diction from non–small cell lung cancer histopathology images using
deep learning," Nature Medicine, vol. 24, pp. 1559–1567, 10 2018.
[6] M.
Ilse,
J. Tomczak, and M. Welling, "Attention-based deep
multiple instance learning," in Proceedings of the 35th International
Conference on Machine Learning, ser. Proceedings of Machine
Learning Research, J. Dy and A. Krause, Eds., vol. 80.
PMLR,
10–15 Jul 2018, pp. 2127–2136.
[Online]. Available: https:
//proceedings.mlr.press/v80/ilse18a.html
[7] N. Tomita, B. Abdollahi,
J. Wei, B. Ren, A. Suriawinata,
and S. Hassanpour, "Attention-Based Deep Neural Networks for
Detection of Cancerous and Precancerous Esophagus Tissue on
Histopathological Slides," JAMA Network Open, vol. 2, no. 11,
pp. e1 914 645–e1 914 645, 11 2019.
[Online]. Available: https:
//doi.org/10.1001/jamanetworkopen.2019.14645
[8] N. Hashimoto, D. Fukushima et al., "Multi-scale domain-adversarial
multiple-instance CNN for cancer subtype classification with non-
images," CoRR, vol. abs/2001.01599,
annotated histopathological
2020.
[9] N. Naik, A. Madani et al., "Deep learning-enabled breast cancer
hormonal receptor status determination from base-level h&e stains."
Nature communications, vol. 11, p. 5727, 11 2020.
[10] M. Y. Lu, D. F. K. Williamson, T. Y. Chen, R. J. Chen, M. Barbieri,
and F. Mahmood, "Data-efficient and weakly supervised computational
pathology on whole-slide images," Nature Biomedical Engineering,
vol. 5, pp. 555–570, 3 2021.
[11] Z. Shao, H. Bian et al., "Transmil: Transformer based correlated
multiple instance learning for whole slide image classication," in
Neural Information Processing Systems, 2021.
[12] K. He, X. Zhang, S. Ren, and J. Sun, "Deep residual learning for
image recognition," CoRR, vol. abs/1512.03385, 2015.
[13] O. Russakovsky, J. Deng et al., "Imagenet large scale visual recogni-
tion challenge," International Journal of Computer Vision, vol. 115,
pp. 211–252, 12 2015.
[14] D. A. Gutman, J. Cobb et al., "Cancer digital slide archive: an
informatics resource to support integrated in silico analysis of tcga
pathology data." Journal of the American Medical Informatics Asso-
ciation : JAMIA, vol. 20, pp. 1091–8, 2013.
[15] K. Tomczak, P. Czerwi ́nska, and M. Wiznerowicz, "The cancer
genome atlas (tcga): an immeasurable source of knowledge." Con-
temporary oncology (Poznan, Poland), vol. 19, pp. A68–77, 2015.
[16] L. A. Cooper, E. G. Demicco, J. H. Saltz, R. T. Powell, A. Rao,
and A. J. Lazar, "Pancancer insights from the cancer genome atlas:
the pathologist's perspective." The Journal of pathology, vol. 244, pp.
512–524, 4 2018.
[17] A. Riasatian, M. Babaie et al., "Fine-tuning and training of densenet
for histopathology image representation using tcga diagnostic slides,"
Medical Image Analysis, vol. 70, p. 102032, 5 2021.
[18] T. Roetzer-Pejrimovsky, A.-C. Moser et al., "The digital brain tumour
atlas, an open histopathology resource," Scientific Data, vol. 9, p. 55,
2 2022.
[19] D. N. Louis, A. Perry et al., "The 2021 who classification of tumors
of the central nervous system: a summary," Neuro-Oncology, vol. 23,
pp. 1231–1251, 8 2021.
[20] Y. Xiong, Z. Zeng et al., "Nystr ̈omformer: A nystr ̈om-based algorithm
for approximating self-attention," CoRR, vol. abs/2102.03902, 2021.
[21] F. K ̈uppers, J. Kronenberger, A. Shantia, and A. Haselhoff, "Multi-
variate confidence calibration for object detection," in The IEEE/CVF
Conference on Computer Vision and Pattern Recognition (CVPR)
Workshops, June 2020.
[22] G. Huang, Z. Liu, and K. Q. Weinberger, "Densely connected convo-
lutional networks," CoRR, vol. abs/1608.06993, 2016.
[23] D. P. Kingma and J. Ba, "Adam: A method for stochastic optimiza-
tion," CoRR, vol. abs/1412.6980, 2014.
[24] M. R. Zhang, J. Lucas, G. Hinton, and J. Ba, Lookahead Optimizer: K
Steps Forward, 1 Step Back. Red Hook, NY, USA: Curran Associates
Inc., 2019.
[25] L. Jose, S. Liu et al., "Artificial Intelligence–Assisted Classification
of Gliomas Using Whole-Slide Images," Archives of Pathology
& Laboratory Medicine, 11 2022.
[Online]. Available: https:
//doi.org/10.5858/arpa.2021-0518-OA
[26] S. Liu, Z. Shah et al., "Isocitrate dehydrogenase (IDH) status
prediction in histopathology images of gliomas using deep learning,"
Scientific Reports, vol. 10, 05 2020.
[Online]. Available: https:
//doi.org/10.1038/s41598-020-64588-y
|
|
http://arxiv.org/abs/2302.09832v2 | 2023-05-24T18:08:20 | 2023-02-20T08:37:44 | TAMUNA: Doubly Accelerated Federated Learning with Local Training,
Compression, and Partial Participation | In federated learning, a large number of users collaborate to learn a global
model. They alternate local computations and communication with a distant
server. Communication, which can be slow and costly, is the main bottleneck in
this setting. In addition to communication-efficiency, a robust algorithm
should allow for partial participation, the desirable feature that not all
clients need to participate to every round of the training process. To reduce
the communication load and therefore accelerate distributed gradient descent,
two strategies are popular: 1) communicate less frequently; that is, perform
several iterations of local computations between the communication rounds; and
2) communicate compressed information instead of full-dimensional vectors. We
propose TAMUNA, the first algorithm for distributed optimization and federated
learning, which harnesses these two strategies jointly and allows for partial
participation. TAMUNA converges linearly to an exact solution in the strongly
convex setting, with a doubly accelerated rate: it provably benefits from the
two acceleration mechanisms provided by local training and compression, namely
a better dependency on the condition number of the functions and on the model
dimension, respectively. | [
"Laurent Condat",
"Ivan Agarský",
"Grigory Malinovsky",
"Peter Richtárik"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09832v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09832v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"math.OC"
] | TAMUNA: Doubly Accelerated Federated Learning with
Local Training, Compression, and Partial Participation
Laurent Condat1
Ivan Agarský2,3
Grigory Malinovsky1
Peter Richtárik1
1King Abdullah University of Science and Technology (KAUST)
Thuwal, Kingdom of Saudi Arabia
2Brno University of Technology
Brno, Czech Republic
3Kempelen Institute of Intelligent Technologies (KInIT)
Bratislava, Slovakia
May 2023
Abstract
In federated learning, a large number of users collaborate to learn a global model. They
alternate local computations and communication with a distant server. Communication, which can
be slow and costly, is the main bottleneck in this setting. In addition to communication-efficiency,
a robust algorithm should allow for partial participation, the desirable feature that not all clients
need to participate to every round of the training process. To reduce the communication load and
therefore accelerate distributed gradient descent, two strategies are popular: 1) communicate less
frequently; that is, perform several iterations of local computations between the communication
rounds; and 2) communicate compressed information instead of full-dimensional vectors. We
propose TAMUNA, the first algorithm for distributed optimization and federated learning,
which harnesses these two strategies jointly and allows for partial participation. TAMUNA
converges linearly to an exact solution in the strongly convex setting, with a doubly accelerated
rate: it provably benefits from the two acceleration mechanisms provided by local training and
compression, namely a better dependency on the condition number of the functions and on the
model dimension, respectively.
3
2
0
2
y
a
M
4
2
]
G
L
.
s
c
[
2
v
2
3
8
9
0
.
2
0
3
2
:
v
i
X
r
a
1
Contents
1 Introduction
1.1 Formalism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Asymmetric communication regime . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
1.3 Communication efficiency in FL: state of the art
1.3.1 Local Training (LT)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3.2 Partial Participation (PP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3.3 Communication Compression (CC) . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4.1 Combining LT and PP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4.2 Combining LT and CC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4 Challenges and contributions
2 Proposed algorithm TAMUNA
3 Iteration and communication complexities
4 Experiments
A Proof of Theorem 1
A.1 The random variable dt
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.2 From Algorithm 2 to TAMUNA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
B Proof of Theorem 2
C Sublinear convergence in the convex case
3
3
4
5
5
6
6
7
8
9
11
13
15
23
28
30
32
33
2
1
Introduction
Federated Learning (FL) is a novel paradigm for training supervised machine learning models.
Initiated a few years ago (Konečný et al., 2016a,b; McMahan et al., 2017; Bonawitz et al., 2017),
it has become a rapidly growing interdisciplinary field. The key idea is to exploit the wealth of
information stored on edge devices, such as mobile phones, sensors and hospital workstations, to
train global models, in a collaborative way, while handling a multitude of challenges, like data
privacy (Kairouz et al., 2021; Li et al., 2020; Wang et al., 2021). In contrast to centralized learning
in a datacenter, in FL, the parallel computing units have private data stored on each of them and
communicate with a distant orchestrating server, which aggregates the information and synchronizes
the computations, so that the process reaches a consensus and converges to a globally optimal model.
In this framework, communication between the parallel workers and the server, which can take place
over the internet or cell phone network, can be slow, costly, and unreliable. Thus, communication
dominates the overall duration and cost of the process and is the main bottleneck to be addressed
by the community, before FL can be widely adopted and applied in our daily lives.
The baseline algorithm of distributed Gradient Descent (GD) alternates between two steps: one
round of parallel computation of the local function gradients at the current model estimate, and
one round of communication of these gradient vectors to the server, which averages them to form
the new estimate for the next iteration. To decrease the communication load, two strategies can be
used: 1) communicate less frequently, or equivalently do more local computations between successive
communication rounds; or 2) compress the communicated vectors. We detail these two strategies in
Section 1.3. Moreover, in practical applications where FL is deployed, it is unrealistic to assume that
all clients are available 100% of the time to perform the required computation and communication
operations. Thus, partial participation is an essential feature in practice, whereby only part of
the clients need to participate in any given round of the process, while maintaining the overall
convergence guarantees.
In this paper, we propose a new randomized algorithm named TAMUNA, which combines local
training and compression for communication-efficient FL. It is variance-reduced (Hanzely & Richtárik,
2019; Gorbunov et al., 2020a; Gower et al., 2020), so that it converges to an exact solution (with
exact gradients), and provably benefits from the two mechanisms: the convergence rate is doubly
accelerated, with a better dependency on the condition number of the functions and on the dimension
of the model, in comparison with GD. In addition, TAMUNA handles partial participation of the
clients.
In the remainder of this section, we formulate the setup, we propose a new model to
characterize the communication complexity, we present the state of the art, and we summarize our
contributions.
1.1 Formalism
We consider a distributed client-server setting, in which n ≥ 2 clients perform computations in
parallel and communicate back and forth with a server. We study the convex optimization problem:
minimize
x∈Rd
f (x) :=
1
n
n
(cid:88)
i=1
fi(x),
(1)
where each function fi : Rd → R models the individual cost of client i ∈ [n] := {1, . . . , n}, based
on its underlying private data. The number n of clients, as well as the dimension d ≥ 1 of the
3
model, are typically large. This problem is of key importance as it is an abstraction of empirical risk
minimization, the dominant framework in supervised machine learning.
For every i ∈ [n], the function fi is supposed L-smooth and μ-strongly convex,1 for some
L ≥ μ > 0 (a sublinear convergence result is derived in the Appendix for the merely convex case,
i.e. μ = 0). Thus, the sought solution x⋆ of (1) exists and is unique. We define κ := L
μ . We focus
on the strongly convex case, because the analysis of linear convergence rates in this setting gives
clear insights and allows us to deepen our theoretical understanding of the algorithmic mechanisms
under study; in our case, local training, communication compression, and partial participation. The
analysis of algorithms converging to a point with zero gradient in (1) with nonconvex functions
relies on significantly different proof techniques (Karimireddy et al., 2021; Das et al., 2022), so the
nonconvex setting is out of the scope of this paper.
To solve the problem (1), the baseline algorithm of Gradient Descent (GD) consists in the simple
iteration, for t = 0, 1, . . . ,
xt+1 := xt −
γ
n
n
(cid:88)
i=1
∇fi(xt),
for some stepsize γ ∈ (0, 2
L ). That is, at iteration t, xt is first broadcast by the server to all clients,
which compute the gradients ∇fi(xt) in parallel. These vectors are then sent to the server, which
averages them and performs the gradient descent step. It is well known that for γ = Θ( 1
L ), GD
converges linearly, with iteration complexity O(κ log ε−1) to reach ε-accuracy. Since d-dimensional
vectors are communicated at every iteration, the communication complexity of GD in number of
reals is O(dκ log ε−1). Our goal is a twofold acceleration of GD, with a better dependency to both κ
and d in this complexity. We want to achieve this goal by leveraging the best of the two popular
mechanisms of local training and communication compression.
1.2 Asymmetric communication regime
Uplink and downlink communication. We call uplink communication (UpCom) the parallel
transmission of data from the clients to the server and downlink communication (DownCom) the
broadcast of the same message from the server to all clients. UpCom is usually significantly slower
than DownCom, just like uploading is slower than downloading on the internet or cell phone network.
This can be due to the asymmetry of the service provider's systems or protocols used on the
communication network, or cache memory and aggregation speed constraints of the server, which
has to decode and average the large number n of vectors received at the same time during UpCom.
Communication complexity. We measure the UpCom or DownCom complexity as the expected
number of communication rounds needed to estimate a solution with ε-accuracy, multiplied by
the number of real values sent during a communication round between the server and any client.
Thus, the UpCom or DownCom complexity of GD is O(dκ log ε−1)). We leave if for future work
to refine this model of counting real numbers, to take into account how sequences of real numbers
are quantized into bitstreams, achieving further compression (Horváth et al., 2022; Albasyoni et al.,
2020).
1A function f : Rd → R is said to be L-smooth if it is differentiable and its gradient is Lipschitz continuous with
constant L; that is, for every x ∈ Rd and y ∈ Rd, ∥∇f (x) − ∇f (y)∥ ≤ L∥x − y∥, where, here and throughout the
paper, the norm is the Euclidean norm. f is said to be μ-strongly convex if f − μ
2 ∥ * ∥2 is convex. We refer to Bauschke
& Combettes (2017) for such standard notions of convex analysis.
4
A model for the overall communication complexity. Since UpCom is usually slower than
DownCom, we propose to measure the total communication (TotalCom) complexity as a weighted
sum of the two UpCom and DownCom complexities: we assume that the UpCom cost is 1 (unit of
time per transmitted real number), whereas the downCom cost is α ∈ [0, 1]. Therefore,
TotalCom = UpCom + α.DownCom.
(2)
A symmetric but unrealistic communication regime corresponds to α = 1, whereas ignoring downCom
and focusing on UpCom, which is usually the limiting factor, corresponds to α = 0. We will provide
explicit expressions of the parameters of our algorithm to minimize the TotalCom complexity for
any given α ∈ [0, 1], keeping in mind that realistic settings correspond to small values of α. Thus,
our model of communication complexity is richer than only considering α = 0, as is usually the case.
1.3 Communication efficiency in FL: state of the art
Two approaches come naturally to mind to decrease the communication load: Local Training
(LT), which consists in communicating less frequently than at every iteration, and Communication
Compression (CC), which consists in sending less than d floats during every communication round.
In this section, we review existing work related to these two strategies and to Partial Participation
(PP).
1.3.1 Local Training (LT)
LT is a conceptually simple and surprisingly powerful communication-acceleration technique. It
consists in the clients performing multiple local GD steps instead of only one, between successive
communication rounds. This intuitively results in "better" information being communicated, so that
less communication rounds are needed to reach a given accuracy. As shown by ample empirical
evidence, LT is very efficient in practice. It was popularized by the FedAvg algorithm of McMahan
et al. (2017), in which LT is a core component. However, LT was heuristic and no theory was
provided in their paper. LT was analyzed in several works, in the homogeneous, or i.i.d. data, regime
(Haddadpour & Mahdavi, 2019), and in the heterogeneous regime, which is more representative in
FL (Khaled et al., 2019, 2020; Stich, 2019; Woodworth et al., 2020; Gorbunov et al., 2021; Glasgow
et al., 2022). It stands out that LT suffers from so-called client drift, which is the fact that the local
model obtained by client i after several local GD steps approaches the minimizer of its local cost
function fi. The discrepancy between the exact solution x⋆ of (1) and the approximate solution
obtained at convergence of LT was characterized in Malinovsky et al. (2020). This deficiency of LT
was corrected in the Scaffold algorithm of Karimireddy et al. (2020) by introducing control variates,
which correct for the client drift, so that the algorithm converges linearly to the exact solution.
S-Local-GD (Gorbunov et al., 2021) and FedLin (Mitra et al., 2021) were later proposed, with similar
convergence properties. Yet, despite the empirical superiority of these recent algorithms relying on
LT, their communication complexity remains the same as vanilla GD, i.e. O(dκ log ε−1).
Most recently, a breakthrough was made with the appearance of accelerated LT methods. Scaffnew,
κ log ε−1)
proposed by Mishchenko et al. (2022), is the first LT-based algorithm achieving O(d
accelerated communication complexity. In Scaffnew, communication is triggered randomly with a
small probability p at every iteration. Thus, the expected number of local GD steps between two
κ instead of
communication rounds is 1/p. By choosing p = 1/
κ (Scaman et al., 2019) is obtained. In this paper, we propose to go even further and tackle the
κ, the optimal dependency on
√
√
√
5
multiplicative factor d in the complexity of Scaffnew. Scaffnew has been extended in Malinovsky
et al. (2022), using calls to variance-reduced (Gorbunov et al., 2020a; Gower et al., 2020) stochastic
gradient estimates instead of exact gradients. It was also analyzed as a particular case of a general
class of randomized primal–dual algorithms in Condat & Richtárik (2023). Without compression
and in case of full participation, TAMUNA reverts to Scaffnew.
A different approach was developed by Sadiev et al. (2022a) with the APDA-Inexact algorithm,
and then by Grudzień et al. (2023) with the 5GCS algorithm: in both algorithms, the local steps
correspond to an inner loop to compute a proximity operator inexactly.
1.3.2 Partial Participation (PP)
PP, a.k.a. client sampling, is the property that not all clients need to participate in a given round,
consisting of a series of local steps followed by communication with the server. This is an important
feature for a FL method, since in practice, there are many reasons for which a client might be
idle and unable to do any computation and communication for a certain period of time. PP in
SGD-type methods is now well understood (Gower et al., 2019; Condat & Richtárik, 2022), but its
combination with LT has remained unconvincing so far. Indeed, Scaffold allows for LT and PP, but
its communication complexity does not benefit from LT. Scaffnew does not allow for PP. This was
the motivation for Grudzień et al. (2023) to develop 5GCS, which is, to the best of our knowledge,
the first and only algorithm enabling LT and PP, and enjoying accelerated communication. We
refer to Grudzień et al. (2023) for a detailed discussion of the literature of LT and PP. 5GCS is
completely different from Scaffnew and based on Point-SAGA (Defazio, 2016) instead of GD. Thus,
it is an indirect, or two-level, combination of LT and PP: PP comes from the random selection
of the activated proximity operators, whereas LT corresponds to an inner loop to compute these
proximity operators inexactly. TAMUNA is a direct combination of LT and PP as two intertwined
stochastic processes. TAMUNA reverts to Scaffnew in case of full participation (and no compression);
in other words, TAMUNA is the first generalization of Scaffnew to PP, and it fully retains its LT-based
communication acceleration benefits.
Throughout the paper, we denote by c ∈ {2, . . . , n} the cohort size, or number of active clients
participating in every round. We report in Table 1 the communication complexity of the two known
algorithms converging linearly to the exact solution, while allowing for LT and PP, namely Scaffold
and 5GCS. Scaffold is not accelerated, with a complexity depending on κ, and 5GCS is accelerated
with respect to κ but not d. Also, in 5GCS the number of local steps in each communication round
is fixed of order at least (cid:0)(cid:112) cκ
n + 1(cid:1) log κ, whereas in TAMUNA it is random and typically much
smaller, of order (cid:112) sκ
n + 1, where s can be as small as 2, see (14).
1.3.3 Communication Compression (CC)
To decrease the communication complexity, a widely used strategy is to make use of (lossy) compres-
sion; that is, a possibly randomized mapping C : Rd → Rd is applied to the vector x that needs to be
communicated, with the property that it is much faster to transfer C(x) than the full d-dimensional
vector x. A popular sparsifying compressor is rand-k, for some k ∈ [d] := {1, . . . , d}, which multiplies
k elements of x, chosen uniformly at random, by d/k, and sets the other ones to zero. If the receiver
knows which coordinates have been selected, e.g. by running the same pseudo-random generator, only
these k elements of x are actually communicated, so that the communication complexity is divided
by the compression factor d/k. Another sparsifying compressor is top-k, which keeps the k elements
6
Table 1: UpCom complexity (α = 0) of linearly converging algorithms with LT or CC and allowing
for PP (with exact gradients). The (cid:101)O notation hides the log ε−1 factor (and other log factors for
Scaffold). c ∈ {2, . . . , n} is the number of participating clients.
Algorithm
DIANA-PP (a)
Scaffold
5GCS
TAMUNA
LT CC
✓
✗
✗
✓
✗
✓
✓
✓
(cid:16)√
(cid:101)O
UpCom
(cid:101)O(cid:0)(1 + d
c
c )κ + d n
(cid:101)O(dκ + d n
c )
√
κ(cid:112) n
c + d n
√
κ
c + d
c
√
n
κ(cid:112) n
(cid:101)O(cid:0)d
√
(cid:1)
(cid:1)
d
(cid:17)
c
c + d n
√
κ(cid:112) n
√
d
(a) using independent rand-1 compressors, for instance. Note that
c and d
c is better than d
c κ + d n
c + d n
√
κ
√
n
κ + d n
c , so that TAMUNA has a better complexity than DIANA-PP.
c + d n
c is better than
of x with largest absolute values unchanged and sets the other ones to zero. Some compressors, like
rand-k, are unbiased; that is, E[C(x)] = x for every x ∈ Rd, where E[*] denotes the expectation. On
the other hand, compressors like top-k are biased (Beznosikov et al., 2020).
The variance-reduced algorithm DIANA (Mishchenko et al., 2019) is a major contribution to
the field, as it converges linearly with a large class of unbiased compressors. For instance, when
the clients use independent rand-1 compressors for UpCom, the UpCom complexity of DIANA
is O(cid:0)(κ(1 + d
n ) + d) log ε−1(cid:1). If n is large, this is much better than with GD. DIANA was later
extended in several ways (Horváth et al., 2022; Gorbunov et al., 2020a); in particular, DIANA-PP is
a generalized version allowing for PP (Condat & Richtárik, 2022). Algorithms converging linearly
with biased compressors have been proposed recently, like EF21 (Richtárik et al., 2021; Fatkhullin
et al., 2021; Condat et al., 2022b), but the theory is less mature and the acceleration potential not
as clear as with unbiased compressors. We summarize existing results in Table 2. Our algorithm
TAMUNA benefits from CC with specific unbiased compressors, with even more acceleration than
DIANA. Also, the focus in DIANA is on UpCom and its DownCom step is the same as in GD, with
the full model broadcast at every iteration, so that its TotalCom complexity can be worse than
the one of GD. Extensions of DIANA with bidirectional CC, i.e. compression in both UpCom and
DownCom, have been proposed (Gorbunov et al., 2020b; Philippenko & Dieuleveut, 2020; Liu et al.,
2020; Condat & Richtárik, 2022), but this does not improve its TotalCom complexity; see also
Philippenko & Dieuleveut (2021) and references therein on bidirectional CC. We note that if LT is
disabled (L(r) ≡ 1), TAMUNA is still new and does not revert to a known algorithm with CC.
1.4 Challenges and contributions
Our new algorithm TAMUNA builds upon the LT mechanism of Scaffnew and enables PP and CC,
which are essential features for applicability to real-world FL setups. In short,
TAMUNA = (S)GD + LT
(cid:125)
(cid:124)
(cid:123)(cid:122)
Scaffnew
+ PP + CC.
We focus on the strongly convex setting but we also prove sublinear convergence of TAMUNA
in the merely convex case in the Appendix. We emphasize that the problem can be arbitrarily
heterogeneous: we don't make any assumption on the functions fi beyond smoothness and strong
7
Table 2: TotalCom complexity of linearly converging algorithms using Local Training (LT), Com-
munication Compression (CC), or both, in case of full participation and exact gradients. The (cid:101)O
notation hides the log ε−1 factor.
Algorithm
DIANA (a)
EF21 (b)
Scaffold
FedLin
S-Local-GD
Scaffnew
5GCS
✗
✓
✓
✓
✓
✓
FedCOMGATE ✓
✓
TAMUNA
LT CC
✓
✗
(cid:16)
(cid:101)O
TotalCom
)κ + d + αd2(cid:17)
TotalCom=UpCom when α = 0
(cid:101)O(cid:0)(1 + d
n )κ + d(cid:1)
(1 + αd + d+αd2
n
(cid:101)O(dκ)
(cid:101)O(dκ)
(cid:101)O(dκ)
(cid:101)O(dκ)
√
(cid:101)O(d
κ)
√
κ)
(cid:101)O(d
(cid:101)O(dκ)
√
κ√
n + d +
κ + d
√
d
(cid:16)√
✓
✗
✗
✗
✗
✗
✓
✓
(cid:101)O
(cid:101)O(dκ)
(cid:101)O(dκ)
(cid:101)O(dκ)
(cid:101)O(dκ)
√
κ)
(cid:101)O(d
√
κ)
(cid:101)O(d
(cid:101)O(dκ)
√
κ√
n + d
κ + d
√
(cid:17)
√
√
(cid:17)
κ
α d
(cid:16)√
d
(cid:101)O
(a) using independent rand-1 compressors, for instance. Note that O(
and O(d
√
κ√
n + d) is better than O( d
n κ + d), so that TAMUNA has a better complexity than DIANA.
√
√
d
κ + d) is better than O(κ + d)
(b) using top-k compressors with any k, for instance.
convexity, and there is no notion of data similarity whatsoever. We also stress that our goal is to
deepen our theoretical understanding of LT, CC and PP, and to make these 3 intuitive and effective
mechanisms, which are widely used in practice, work in the best possible way when harnessed to
(stochastic) GD. Thus, we establish convergence of TAMUNA in Theorem 1 with stochastic GD
steps of bounded variance, which is more general than exact GD steps, but only to illustrate the
robustness of our framework. A thorough analysis would need to consider the general setting of
possibly variance-reduced (Gorbunov et al., 2020a; Gower et al., 2020) SGD local steps, as was
done for Scaffnew in Malinovsky et al. (2022). We leave it for future work, since we focus on the
communication complexity, and stochastic gradients can only worsen it. Reducing the computation
complexity using accelerated (Nesterov, 2004) or stochastic GD steps is somewhat orthogonal to our
present study.
Let us elaborate on the double challenge of combining LT with PP and CC. Our notations are
summarized in Table 3 for convenience.
1.4.1 Combining LT and PP
With the recent breakthrough of Scaffnew (Mishchenko et al., 2022), we now understand that LT is
not only efficient in practice, but also grounded in theory, and yields communication acceleration
if the number of local steps is chosen appropriately. However, Scaffnew does not allow for PP. It
has been an open and challenging question to know whether its powerful randomized mechanism
would be compatible with PP. In fact, according to Grudzień et al. (2023), the authors of Scaffnew
"have tried-very hard in their own words-but their efforts did not bear any fruit." In this paper,
we break this lock: TAMUNA handles LT and PP, and fully benefits from the acceleration of LT,
whatever the participation level; that is, its communication complexity depends on
κ, not κ.
√
Combining LT and PP is difficult: we want PP not only during communication whenever it
8
Algorithm 1 TAMUNA
1: input: stepsizes γ > 0, η > 0; number of participating clients c ∈ {2, . . . , n}; sparsity index
for compression s ∈ {2, . . . , c}; initial model estimate ̄x(0) ∈ Rd at the server and initial control
variates h(0)
n ∈ Rd at the clients, such that (cid:80)n
1 , . . . , h(0)
i=1 h(0)
i = 0.
2: for r = 0, 1, . . . (rounds) do
3:
choose a subset Ω(r) ⊂ [n] of size c uniformly at random
choose the number of local steps L(r) ≥ 1
for clients i ∈ Ω(r), in parallel, do
:= ̄x(r) (initialization received from the server)
x(r,0)
i
for l = 0, . . . , L(r) − 1 (local steps) do
x(r,l+1)
i
∇fi
end for
(cid:0)x(r,l)
i
− γg(r,l)
:= x(r,l)
i
i
(cid:1) of variance σ2
i
+ γh(r)
i
, where g(r,l)
i
is an unbiased stochastic estimate of
(cid:17)
(cid:16)
end for
UpCom: the server and active clients agree on a random binary mask q(r) = (cid:0)q(r)
i∈Ω(r) ∈ Rd×c
generated as explained in Figure 1, and every client i ∈ Ω(r) sends the compressed vector
C(r)
to the server, where C(r)
i
x(r,L(r))
i∈Ω(r) C(r)
̄x(r+1) := 1
i
s
for clients i ∈ Ω(r), in parallel, do
i + η
(cid:17) (cid:17) (cid:0) ̄x(r+1) is received from the server(cid:1)
(v) denotes v multiplied elementwise by q(r)
(aggregation by the server)
x(r,L(r))
i
(cid:80)
(cid:0) ̄x(r+1)(cid:1) − C(r)
x(r,L(r))
i
(cid:17)
(cid:16)
(cid:16)
(cid:16)
(cid:1)
.
i
i
i
i
i
γ
C(r)
i
:= h(r)
h(r+1)
i
end for
for clients i /∈ Ω(r), in parallel, do
(the client is idle)
:= h(r)
i
h(r+1)
i
end for
18:
19: end for
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
occurs, but also with respect to all computations before. The simple idea of allowing at every round
some clients to be active and to proceed normally, and other clients to be idle with unchanged local
variables, does not work. A key property of TAMUNA is that only the clients which participated
in a given round make use of the updated model broadcast by the server to update their control
variates (step 14). From a mathematical point of view, our approach relies on combining the two
stochastic processes of probabilistic communication and random client selection in two different ways,
for updating after communication the model estimates xi on one hand, and the control variates hi
on the other hand. Indeed, a crucial property is that the sum of the control variates over all clients
always remains zero. This separate treatment was the key to the success of our design.
1.4.2 Combining LT and CC
It is very challenging to combine LT and CC. In the strongly convex and heterogeneous case
considered here, the methods Qsparse-local-SGD (Basu et al., 2020) and FedPAQ (Reisizadeh et al.,
2020) do not converge linearly. The only linearly converging LT + CC algorithm we are aware of
is FedCOMGATE (Haddadpour et al., 2021). But its rate is O(dκ log ε−1), which does not show
any acceleration. We note that random reshuffling, which can be seen as a kind of LT, has been
9
Table 3: Summary of the main notations used in the paper.
LT
CC
PP
L
μ
κ = L/μ
d
n, i
[n] = {1, . . . , n}
α
i , σ2 := (cid:80)
σ2
i σ2
i
c ∈ {2, . . . , n}
Ω ⊂ [n]
s ∈ {2, . . . , c}
q = (qi)c
r
L, l
p
t, T
γ, η, χ
xi
hi
̄x(r)
τ
i=1
local training
communication compression
partial participation (a.k.a. client sampling)
smoothness constant
strong convexity constant
condition number of the functions
dimension of the model
number and index of clients
weight on downlink communication (DownCom), see (2)
variance of the stochastic gradients, see (3)
number of active clients (a.k.a. cohort size). Full participation if c = n
index set of active clients
sparsity index for compression. No compression if s = c
random binary mask for compression, as detailed in Figure 1
index of rounds
number and index of local steps in a round
inverse of the expected number of local steps per round
indexes of iterations
stepsizes
local model estimate at client i
local control variate tracking ∇fi
model estimate at the server at round r
convergence rate
combined with CC in Sadiev et al. (2022b); Malinovsky & Richtárik (2022).
Like for PP, the program of combining LT and CC looks simple, as it seems we just have to "plug"
compressors into Scaffnew. Again, this simple approach does not work and the key is to have separate
stochastic mechanisms to update the local model estimates and the control variates. In our previous
work (Condat et al., 2022a), we managed to design a specific compression mechanism compatible with
LT and proposed CompressedScaffnew, which combines the LT mechanism of Scaffnew and this new
CC mechanism. CompressedScaffnew is the first algorithm, to the best of our knowledge, to exhibit a
doubly-accelerated linear rate, by leveraging LT and CC. However, like Scaffnew, CompressedScaffnew
only works in case of full participation. We stress that this successful combination of LT and CC does
not help in combining LT and PP: a non-participating client does not participate to communication
whenever it occurs, but it also does not perform any computation before. Therefore, there is no way
to enable PP in loopless algorithms like Scaffnew and CompressedScaffnew, where communication
can be triggered at any time. Whether a client participates or not must be decided in advance, at
the beginning of a round consisting of a sequence of local steps followed by communication. Our
new algorithm TAMUNA is the first to solve this challenge. It works with any level of PP, with as
few as two clients participating in every round. TAMUNA relies on the same dedicated design of the
compressors as CompressedScaffnew, explained in Figure 1 and such that the messages sent by the
different clients complement each other, to keep a tight control of the variance after aggregation. We
10
(a)
(b)
(c)
(d)
c ⌋ or ⌈ sd
Figure 1: The random sampling pattern q(r) = (q(r)
i=1 ∈ Rd×c used for communication is generated
)c
i
by a random permutation of the columns of a fixed binary template pattern, which has the prescribed
number s ≥ 2 of ones in every row. In (a) with (d, c, s) = (5, 6, 2) and (b) with (d, c, s) = (5, 7, 2),
with ones in blue and zeros in white, examples of the template pattern used when d ≥ c
s : for every
row k ∈ [d], there are s ones at columns i = mod(s(k − 1), c) + 1, . . . , mod(sk − 1, c) + 1. Thus, there
are ⌊ sd
c ⌉ ones in every column vector qi. In (c), an example of sampling pattern obtained
after a permutation of the columns of the template pattern in (a). In (d) with (d, c, s) = (3, 10, 2),
an example of the template pattern used when c
s ≥ d: for every column i = 1, . . . , ds, there is 1 one
at row k = mod(i − 1, d) + 1. Thus, there is 0 or 1 one in every column vector qi. We can note that
when d = c
s and c
s ≥ d for constructing the template pattern are
equivalent, since they give exactly the same set of sampling patterns when permuting their columns.
These two rules make it possible to generate easily the columns q(r)
of q(r) on the fly, without having
to generate the whole mask q(r) explicitly.
s , the two different rules for d ≥ c
i
currently don't know how to use any other type of compressors in TAMUNA.
Thus, by combining LT and CC, TAMUNA establishes the new state of the art in communication
efficiency. For instance, with exact gradients, if α is small and n is large, its TotalCom complexity
in case of full participation is
(cid:16)(cid:16)√
√
O
d
κ + d
(cid:17)
log ε−1(cid:17)
;
our general result is in Theorem 2. Thus, TAMUNA enjoys twofold acceleration, with
κ thanks to LT and
d instead of d thanks to CC.
√
√
κ instead of
2 Proposed algorithm TAMUNA
Its main loop is over the rounds,
The proposed algorithm TAMUNA is shown as Algorithm 1.
indexed by r. A round consists of a sequence, written as an inner loop, of local steps indexed by
l and performed in parallel by the active clients, followed by compressed communication with the
server and update of the local control variates hi. The c active, or participating, clients are selected
randomly at the beginning of the round. During UpCom, every client sends a compressed version
of its local model xi: it sends only a few of its elements, selected randomly according to the rule
explained in Figure 1 and known by both the clients and the server (for decoding).
At the end of the round, the aggregated model estimate ̄x(r+1) formed by the server is sent
only to the active clients, which use it to update their control variates hi. This update consists in
overwriting only the coordinates of hi which have been involved in the communication process; that
is, for which the mask q(r)
has a one. Indeed, the received vector ̄x(r+1) does not contain relevant
i
information to update hi at the other coordinates.
11
The update of the local model estimates xi at the clients takes place at the beginning of the
round, when the active clients download the current model estimate ̄x(r) to initialize their local steps.
So, it seems that there are two DownCom steps from the server to the clients per round (steps 6 and
14), but the algorithm can be written with only one: ̄x(r+1) can be broadcast by the server at the
end of round r not only to the active clients of round r, but also to the active clients of the next
round r + 1, at the same time. We keep the algorithm written in this way for simplicity.
Thus, the clients of index i /∈ Ω(r), which do not participate in round r, are completely idle: they
don't compute and don't communicate at all. Their local control variates hi remain unchanged, and
they don't even need to store a local model estimate: they only need to receive the latest model
estimate x(r) from the server when they participate in the process.
In TAMUNA, unbiased stochastic gradient estimates of bounded variance σ2
i can be used: for
every i ∈ [n],
(cid:104)
g(r,l)
E
i
(cid:105)
| x(r,l)
i
= ∇fi
(cid:0)x(r,l)
i
(cid:1), E
(cid:20)(cid:13)
(cid:13)g(r,l)
(cid:13)
i − ∇fi
(cid:0)x(r,l)
i
(cid:1)(cid:13)
2
(cid:13)
(cid:13)
(cid:21)
| x(r,l)
i
≤ σ2
i ,
(3)
for some σi ≥ 0. We have g(r,l)
i=1 σ2
i .
Our main result, stating linear convergence of TAMUNA to the exact solution x⋆ of (1), or to a
neighborhood if σ > 0, is the following:
(cid:1) if σi = 0. We define the total variance σ2 := (cid:80)n
(cid:0)x(r,l)
i
= ∇fi
i
Theorem 1 (fast linear convergence). Let p ∈ (0, 1]. In TAMUNA, suppose that at every round
r ≥ 0, L(r) is chosen randomly and independently according to a geometric law of mean p−1; that is,
for every L ≥ 1, Prob(L(r) = L) = (1 − p)L−1p. Also, suppose that
and η := pχ, where
0 < γ <
2
L
0 < χ ≤
n(s − 1)
s(n − 1)
∈
(cid:21)
, 1
.
(cid:18) 1
2
For every total number t ≥ 0 of local steps made so far, define the Lyapunov function
t :=
Ψ
n
γ
(cid:13)
(cid:13) ̄xt − x⋆(cid:13)
2 +
(cid:13)
γ
p2χ
n − 1
s − 1
n
(cid:88)
i=1
(cid:13)
(cid:13)h(r)
(cid:13)
i − h⋆
i
(cid:13)
2
(cid:13)
(cid:13)
,
(4)
(5)
(6)
where x⋆ is the unique solution to (1), h⋆
i = ∇fi(x⋆), r ≥ 0 and l ∈ {0, . . . , L(r) − 1} are such that
and
Then, for every t ≥ 0,
t =
r−1
(cid:88)
ˆr=0
L(ˆr) + l,
̄xt :=
1
s
(cid:88)
C(r)
i
(cid:16)
x(r,l)
i
(cid:17)
.
i∈Ω(r)
t(cid:105)
(cid:104)
E
Ψ
0
≤ τ tΨ
+
γσ2
1 − τ
,
12
(7)
(8)
(9)
where
(cid:18)
τ := max
(1 − γμ)2, (γL − 1)2, 1 − p2χ
(cid:19)
s − 1
n − 1
< 1.
(10)
Also, if σ = 0, ( ̄x(r))r∈N converges to x⋆ and (h(r)
i )r∈N converges to h⋆
i , almost surely.
The complete proof is in the Appendix. We give a brief sketch here. The analysis is made for a
single-loop version of the algorithm, shown as Algorithm 2, with a loop over the iterations, indexed
by t, and one local step per iteration. Thus, communication does not happen at every iteration but
is only triggered randomly with probability p. Its convergence is proved in Theorem 3. Indeed, the
contraction of the Lyapunov function happens at every iteration and not at every round, whose size
is random. That is why we have to reindex the local steps to obtain a rate depending on the number
of iterations t so far. We detail in the Appendix how Theorem 3 on Algorithm 2 yields Theorem 1
on TAMUNA.
We note that in (8), ̄xt is actually computed only if l = 0, in which case ̄xt = ̄x(r). We also note
that the theorem depends on s but not on c. The dependence on c is hidden in the fact that s is
upper bounded by c.
Remark 1 (setting η). In the conditions of Theorem 1, one can simply set η = p
which is independent of n and s. However, the larger η, the better, so it is recommended to set
2 in TAMUNA,
η = p
n(s − 1)
s(n − 1)
.
(11)
Also, as a rule of thumb, if the average number of local steps per round is L, one can replace p by
L−1.
We can comment on the difference between TAMUNA and Scaffold, when CC is disabled (s = c).
In TAMUNA, hi is updated by adding ̄x(r+1) − x(r,L(r))
i
estimate ̄x(r+1) and the latest local estimate x(r,L(r))
is used
instead, which involves the "old" global estimate ̄x(r). Moreover, this difference is scaled by the
number of local steps, which makes it small. That is why no acceleration from LT can be obtained in
Scaffold, whatever the number of local steps. This is not a weakness of the analysis in Karimireddy
et al. (2020) but an intrinsic limitation of Scaffold.
. By contrast, in Scaffold, ̄x(r) − x(r,L(r))
, the difference between the latest global
i
i
We can also note that the neighborhood size in (9) does not show so-called linear speedup; that
is, it does not decrease when n increases. The properties of performing LT with SGD steps remain
little understood (Woodworth et al., 2020), and we believe this should be studied within the general
framework of variance reduction (Malinovsky et al., 2022). Again, this goes far beyond the scope of
this paper, which focuses on communication.
3
Iteration and communication complexities
We consider in this section that exact gradients are used (σ = 0),2 since our aim is to establish a
new state of the art for the communication complexity, regardless of the type of local computations.
We place ourselves in the conditions of Theorem 1.
2If σ > 0, it is possible to derive sublinear rates to reach ε-accuracy for the communication complexity, by setting
γ proportional to ε, as was done for Scaffnew in Mishchenko et al. (2022, Corollary 5.6).
13
We first remark that TAMUNA has the same iteration complexity as GD, with rate τ ♯ :=
n−1 ≤ τ ♯. This is
max(1 − γμ, γL − 1)2, as long as p and s are large enough to have 1 − χp2 s−1
remarkable: LT, CC and PP do not harm convergence at all, until some threshold.
Let us consider the number of iterations (= total number of local steps) to reach ε-accuracy, i.e.
t(cid:105)
(cid:104)
E
L ), and χ = Θ(1), the iteration complexity of TAMUNA
Ψ
≤ ε. For any s ≥ 2, p ∈ (0, 1], γ = Θ( 1
is
Thus, by choosing
(cid:18)(cid:18)
O
κ +
(cid:19)
n
sp2
log ε−1
(cid:19)
.
(cid:18)
p = min
Θ
(cid:18)(cid:114) n
sκ
(cid:19)
(cid:19)
, 1
,
which means that the average number of local steps per round is
(cid:104)
E
L(r)(cid:105)
(cid:18)
= max
Θ
(cid:18)(cid:114) sκ
n
(cid:19)
(cid:19)
, 1
,
the iteration complexity becomes
(cid:16)(cid:16)
O
κ +
n
s
(cid:17)
log ε−1(cid:17)
.
(12)
(13)
We now consider the communication complexity. Communication occurs at every iteration with
probability p, and during every communication round, DownCom consists in broadcasting the full
d-dimensional vector ̄x(r), whereas in UpCom, compression is effective and the number of real values
sent in parallel by the clients is equal to the number of ones per column in the sampling pattern q,
which is ⌈ sd
c ⌉ ≥ 1. Hence, the communication complexities are:
DownCom: O
pd
κ +
(cid:18)
(cid:18)
(cid:19)
n
sp2
log ε−1
(cid:19)
,
(cid:18)
UpCom: O
p
(cid:18) sd
c
(cid:19) (cid:18)
+ 1
κ +
(cid:19)
n
sp2
log ε−1
(cid:19)
.
TotalCom: O
p
(cid:18)
(cid:18) sd
c
(cid:19) (cid:18)
+ 1 + αd
κ +
(cid:19)
n
sp2
log ε−1
(cid:19)
.
For a given s, the best choice for p, for both DownCom and UpCom, is given in (12), for which
(cid:18)
(cid:18)
O
p
κ +
(cid:19)(cid:19)
n
sp2
= O
(cid:18)(cid:114) nκ
s
+
(cid:19)
n
s
and the TotalCom complexity is
TotalCom: O
(cid:18)(cid:18)(cid:114) nκ
s
+
(cid:19)(cid:18) sd
c
n
s
(cid:19)
+ 1 + αd
log ε−1
(cid:19)
.
We see the first acceleration effect due to LT: with a suitable p < 1, the communication complexity
only depends on
κ, not κ, whatever the participation level c and compression level s.
√
Without compression, i.e. s = c, whatever α, the TotalCom complexity becomes
(cid:18)(cid:114) nκ
c
log ε−1
(cid:19)
.
n
c
O
+
(cid:19)
(cid:18)
d
We can now set s to further accelerate the algorithm, by minimizing the TotalCom complexity:
14
Theorem 2 (doubly accelerated communication). In the conditions of Theorem 1, suppose that
σ = 0, γ = Θ( 1
L ), χ = Θ(1), and
(cid:18)
p = min
Θ
(cid:18)(cid:114) n
sκ
(cid:19)
(cid:19)
, 1
,
s = max
(cid:16)
2,
(cid:107)
(cid:106) c
d
, ⌊αc⌋
(cid:17)
.
Then the TotalCom complexity of TAMUNA is
(cid:18)(cid:18)√
O
√
d
(cid:114) n
κ
c
√
+ d
√
n
c
κ
+ d
n
c
√
+
α d
(cid:19)
√
(cid:114) n
κ
c
log ε−1
(cid:19)
.
(14)
(15)
As reported in Tables 1 and 2, TAMUNA improves upon all known algorithms using either LT or
CC on top of GD, even those working only with full participation.
Corollary 1 (dependence on α). As long as α ≤ max( 2
α = 0, in which we only focus on UpCom, and the TotalCom complexity is
d , n
c , 1
κc ), there is no difference with the case
(cid:18)(cid:18)√
O
√
d
(cid:114) n
κ
c
√
+ d
√
n
c
κ
+ d
(cid:19)
n
c
log ε−1
(cid:19)
.
On the other hand, if α ≥ max( 2
c , 1
d , n
κc ), the complexity increases and becomes
(cid:18)√
√
αd
O
(cid:114) n
c
κ
log ε−1
(cid:19)
,
(16)
(17)
but compression remains operational and effective with the
α factor. It is only when α = 1 that
s = c, i.e. there is no compression, and that the Upcom, DownCom and TotalCom complexities all
become
√
(cid:18)
√
O
d
κ
(cid:114) n
c
log ε−1
(cid:19)
.
Thus, in case of full participation (c = n), TAMUNA is faster than Scaffnew for every α ∈ [0, 1].
Corollary 2 (full participation). In case of full participation (c = n), the TotalCom complexity of
TAMUNA is
(cid:18)(cid:18)√
√
d
κ + d
+ d +
α d
κ
√
√
(cid:19)
log ε−1
(cid:19)
.
√
√
κ
n
O
4 Experiments
Carrying out large-scale experiments is beyond the scope of this work, which focuses on studying
the foundational algorithmic and theoretical properties of a specific class of algorithms. Nonetheless,
we provide illustrations and confirm our results using a practical logistic regression problem.
The global loss function is defined as
f (x) =
1
M
M
(cid:88)
(cid:16)
(cid:16)
log
1 + exp
m=1
(cid:16)
−bma⊤
mx
(cid:17)(cid:17)
+
μ
2
∥x∥2(cid:17)
,
(20)
15
(18)
(19)
(a) w8a, n = 1000, α = 0, c = n
(b) w8a, n = 1000, α = 0.1, c = n
(c) w8a, n = 1000, α = 0, c = 0.1n
(d) w8a, n = 1000, α = 0.1, c = 0.1n
Figure 2: Logistic regression experiment in the case n > d. The dataset w8a has d = 300 features
and n = 1000, so n ≈ 3d. The first row shows a comparison in the full participation regime, while
the second row shows a comparison in the partial participation regime with 10% of clients. On the
left, α = 0, while on the right, α = 0.1.
where the variables am ∈ Rd and bm ∈ {−1, 1} represent the data samples, and M denotes the
total number of samples. The function f in (20) is divided into n separate functions fi, with any
remainder from dividing M by n discarded.
We select the strong convexity constant μ so that κ = 104.
For our analysis, we choose n = 1000 and examine two scenarios: in the first one, we have d > n
using the 'real-sim' dataset with d = 20958, and in the second one, we have n > d using the 'w8a'
dataset with d = 300, from the widely-used LIBSVM library (Chang & Lin, 2011). Additionally, we
consider two cases for each scenario: α = 0 and α = 0.1, where α is the weight on DownCom defined
in (2).
We measure the convergence error f (x) − f (x⋆) with respect to TotalCom, i.e. the total number
of communicated reals, as defined in Section (1.2). Here, x denotes the model known by the server;
for TAMUNA, this is ̄x(r). This error serves as a natural basis for comparing algorithms, and since
2 ∥x − x⋆∥2 for any x. Consequently, the error converges
f is L-smooth, we have f (x) − f (x⋆) ≤ L
linearly at the same rate as Ψ in Theorem 1..
16
(a) real-sim, n = 1000, α = 0, c = n
(b) real-sim, n = 1000, α = 0.1, c = n
(c) real-sim, n = 1000, α = 0, c = 0.1n
(d) real-sim, n = 1000, α = 0.1, c = 0.1n
Figure 3: Logistic regression experiment in the case d > n. The dataset real-sim has d = 20, 958
features and n = 1000, so n ≈ d/20. The first row shows a comparison in the full participation
regime, while the second row shows a comparison in the partial participation regime with 10% of
clients. On the left, α = 0, while on the right, α = 0.1.
We compare the performance of three algorithms allowing for PP, namely Scaffold, 5GCS, and
TAMUNA, for two participation scenarios: c = n and c = 0.1n (10% participation). In the full
participation case, we add Scaffnew to the comparison.
In order to ensure theoretical conditions that guarantee linear convergence, we set γ and η for
TAMUNA as
γ =
2
L + μ
,
η = p
n(s − 1)
s(n − 1)
,
where the remaining parameters s and p are fine-tuned to achieve the best communication complexity.
In our experimental setup, we found that using s = 40 and p = 0.01 resulted in excellent performance.
The conditions of Theorem 1 are met with these values, so linear convergence of TAMUNA is
guaranteed. We adopt the same values of γ and p for Scaffnew. For Scaffold, we use p−1 local steps,
which is the same, on average, as for TAMUNA and Scaffnew; the behavior of Scaffold changed
marginally with other values. We also set γ to its highest value that ensures convergence. In the case
of 5GCS, we tune γ, τ , and the number of local steps to achieve the best communication complexity.
17
The models in all algorithms, as well as the control variates in TAMUNA, Scaffnew and Scaffold,
are initialized with zero vectors.
The results are shown in Figures 2 and 3. Each algorithm is run multiple times with different
random seeds, depending on its variance (7 times for TAMUNA, 5 times for Scaffnew, and 3 times for
Scaffold and 5GCS). The shaded area in the plots shows the difference between the maximum and
minimum convergence error achieved over these runs. Additionally, the progress of the first run for
each algorithm is depicted with a thicker line and markers.
As can be seen, our proposed algorithm TAMUNA outperforms all other methods. In case of
full participation, Scaffnew outperforms Scaffold and 5GCS, which shows the efficiency of its LT
mechanism. TAMUNA embeds the same mechanism and also benefits from it, but it outperforms
Scaffnew thanks to CC, its second communication-acceleration mechanism. The difference between
TAMUNA and Scaffnew is larger for α = 0 than for α = 0.1, as explained by our theory; the difference
would vanish if α tends to 1. TAMUNA is applicable and proved to converge with any level of PP,
whereas Scaffnew only applies to the full participation case.
References
Albasyoni, A., Safaryan, M., Condat, L., and Richtárik, P. Optimal gradient compression for
distributed and federated learning. preprint arXiv:2010.03246, 2020.
Basu, D., Data, D., Karakus, C., and Diggavi, S. N. Qsparse-Local-SGD: Distributed SGD With
IEEE Journal on Selected Areas in
Quantization, Sparsification, and Local Computations.
Information Theory, 1(1):217–226, 2020.
Bauschke, H. H. and Combettes, P. L. Convex Analysis and Monotone Operator Theory in Hilbert
Spaces. Springer, New York, 2nd edition, 2017.
Bertsekas, D. P. Convex optimization algorithms. Athena Scientific, Belmont, MA, USA, 2015.
Beznosikov, A., Horváth, S., Richtárik, P., and Safaryan, M. On biased compression for distributed
learning. preprint arXiv:2002.12410, 2020.
Bonawitz, K., Ivanov, V., Kreuter, B., Marcedone, A., McMahan, H. B., Patel, S., Ramage, D.,
Segal, A., and Seth, K. Practical secure aggregation for privacy-preserving machine learning. In
Proc. of the 2017 ACM SIGSAC Conference on Computer and Communications Security, pp.
1175–1191, 2017.
Chang, C.-C. and Lin, C.-J. LIBSVM: A library for support vector machines. ACM Trans-
Software available at
actions on Intelligent Systems and Technology, 2:27:1–27:27, 2011.
http://www.csie.ntu.edu.tw/%7Ecjlin/libsvm.
Condat, L. and Richtárik, P. MURANA: A generic framework for stochastic variance-reduced
optimization. In Proc. of the conference Mathematical and Scientific Machine Learning (MSML),
PMLR 190, pp. 81–96, 2022.
Condat, L. and Richtárik, P. RandProx: Primal-dual optimization algorithms with randomized
proximal updates. In Proc. of Int. Conf. Learning Representations (ICLR), 2023.
18
Condat, L., Agarský, I., and Richtárik, P. Provably doubly accelerated federated learning: The first
theoretically successful combination of local training and compressed communication. preprint
arXiv:2210.13277, 2022a.
Condat, L., Li, K., and Richtárik, P. EF-BV: A unified theory of error feedback and variance
reduction mechanisms for biased and unbiased compression in distributed optimization. In Proc.
of Conf. Neural Information Processing Systems (NeurIPS), 2022b.
Das, R., Acharya, A., Hashemi, A., Sanghavi, S., Dhillon, I. S., and Topcu, U. Faster non-convex
federated learning via global and local momentum. In Proc. of Conf. on Uncertainty in Artificial
Intelligence (UAI), 2022.
Defazio, A. A simple practical accelerated method for finite sums. In Proc. of 30st Conf. Neural
Information Processing Systems (NIPS), volume 29, pp. 676–684, 2016.
Fatkhullin, I., Sokolov, I., Gorbunov, E., Li, Z., and Richtárik, P. EF21 with bells & whistles:
Practical algorithmic extensions of modern error feedback. preprint arXiv:2110.03294, 2021.
Glasgow, M. R., Yuan, H., and Ma, T. Sharp bounds for federated averaging (Local SGD) and
continuous perspective. In Proc. of Int. Conf. Artificial Intelligence and Statistics (AISTATS),
PMLR 151, pp. 9050–9090, 2022.
Gorbunov, E., Hanzely, F., and Richtárik, P. A unified theory of SGD: Variance reduction, sampling,
quantization and coordinate descent. In Proc. of 23rd Int. Conf. Artificial Intelligence and Statistics
(AISTATS), PMLR 108, 2020a.
Gorbunov, E., Kovalev, D., Makarenko, D., and Richtárik, P. Linearly converging error compensated
SGD. In Proc. of Conf. Neural Information Processing Systems (NeurIPS), 2020b.
Gorbunov, E., Hanzely, F., and Richtárik, P. Local SGD: Unified theory and new efficient methods.
In Proc. of 24th Int. Conf. Artificial Intelligence and Statistics (AISTATS), PMLR 130, pp.
3556–3564, 2021.
Gower, R. M., Loizou, N., Qian, X., Sailanbayev, A., Shulgin, E., and Richtárik, P. SGD: General
analysis and improved rates. In Proc. of 36th Int. Conf. Machine Learning (ICML), volume PMLR
97, pp. 5200–5209, 2019.
Gower, R. M., Schmidt, M., Bach, F., and Richtárik, P. Variance-reduced methods for machine
learning. Proc. of the IEEE, 108(11):1968–1983, November 2020.
Grudzień, M., Malinovsky, G., and Richtárik, P. Can 5th Generation Local Training Methods Support
Client Sampling? Yes! In Proc. of Int. Conf. Artificial Intelligence and Statistics (AISTATS),
April 2023.
Haddadpour, F. and Mahdavi, M. On the Convergence of Local Descent Methods in Federated
Learning. preprint arXiv:1910.14425, 2019.
Haddadpour, F., Kamani, M. M., Mokhtari, A., and Mahdavi, M. Federated learning with com-
pression: Unified analysis and sharp guarantees. In Proc. of Int. Conf. Artificial Intelligence and
Statistics (AISTATS), PMLR 130, pp. 2350–2358, 2021.
19
Hanzely, F. and Richtárik, P. One method to rule them all: Variance reduction for data, parameters
and many new methods. preprint arXiv:1905.11266, 2019.
Horváth, S., Ho, C.-Y., Horváth, L., Sahu, A. N., Canini, M., and Richtárik, P. Natural compression
for distributed deep learning. In Proc. of the conference Mathematical and Scientific Machine
Learning (MSML), PMLR 190, 2022.
Horváth, S., Kovalev, D., Mishchenko, K., Stich, S., and Richtárik, P. Stochastic distributed learning
with gradient quantization and variance reduction. Optimization Methods and Software, 2022.
Kairouz, P. et al. Advances and open problems in federated learning. Foundations and Trends in
Machine Learning, 14(1–2), 2021.
Karimireddy, S. P., Kale, S., Mohri, M., Reddi, S., Stich, S. U., and Suresh, A. T. SCAFFOLD:
Stochastic controlled averaging for federated learning. In Proc. of 37th Int. Conf. Machine Learning
(ICML), pp. 5132–5143, 2020.
Karimireddy, S. P., Jaggi, M., Kale, S., Mohri, M., Reddi, S., Stich, S. U., and Suresh, A. T. Breaking
the centralized barrier for cross-device federated learning. In Proc. of Conf. Neural Information
Processing Systems (NeurIPS), 2021.
Khaled, A., Mishchenko, K., and Richtárik, P. Better communication complexity for local SGD. In
NeurIPS Workshop on Federated Learning for Data Privacy and Confidentiality, 2019.
Khaled, A., Mishchenko, K., and Richtárik, P. Tighter theory for local SGD on identical and
heterogeneous data. In Proc. of 23rd Int. Conf. Artificial Intelligence and Statistics (AISTATS),
PMLR 108, 2020.
Konečný, J., McMahan, H. B., Ramage, D., and Richtárik, P. Federated optimization: distributed
machine learning for on-device intelligence. arXiv:1610.02527, 2016a.
Konečný, J., McMahan, H. B., Yu, F. X., Richtárik, P., Suresh, A. T., and Bacon, D. Federated
learning: Strategies for improving communication efficiency. In NIPS Private Multi-Party Machine
Learning Workshop, 2016b. arXiv:1610.05492.
Li, T., Sahu, A. K., Talwalkar, A., and Smith, V. Federated learning: Challenges, methods, and
future directions. IEEE Signal Processing Magazine, 3(37):50–60, 2020.
Liu, X., Li, Y., Tang, J., and Yan, M. A double residual compression algorithm for efficient distributed
learning. In Proc. of Int. Conf. Artificial Intelligence and Statistics (AISTATS), PMLR 108, pp.
133–143, 2020.
Malinovsky, G. and Richtárik, P. Federated random reshuffling with compression and variance
reduction. preprint arXiv:arXiv:2205.03914, 2022.
Malinovsky, G., Kovalev, D., Gasanov, E., Condat, L., and Richtárik, P. From local SGD to local
fixed point methods for federated learning. In Proc. of 37th Int. Conf. Machine Learning (ICML),
volume PMLR 119, pp. 6692–6701, 2020.
20
Malinovsky, G., Yi, K., and Richtárik, P. Variance reduced ProxSkip: Algorithm, theory and
In Proc. of Conf. Neural Information Processing Systems
application to federated learning.
(NeurIPS), 2022.
McMahan, H. B., Moore, E., Ramage, D., Hampson, S., and y Arcas, B. A. Communication-efficient
learning of deep networks from decentralized data. In Proc. of Int. Conf. Artificial Intelligence
and Statistics (AISTATS), PMLR 54, 2017.
Mishchenko, K., Gorbunov, E., Takáč, M., and Richtárik, P. Distributed learning with compressed
gradient differences. arXiv:1901.09269, 2019.
Mishchenko, K., Malinovsky, G., Stich, S., and Richtárik, P. ProxSkip: Yes! Local Gradient Steps
In Proc. of the 39th International
Provably Lead to Communication Acceleration! Finally!
Conference on Machine Learning (ICML), July 2022.
Mitra, A., Jaafar, R., Pappas, G., and Hassani, H. Linear convergence in federated learning: Tackling
client heterogeneity and sparse gradients. In Proc. of Conf. Neural Information Processing Systems
(NeurIPS), 2021.
Nesterov, Y.
Introductory lectures on convex optimization: a basic course. Kluwer Academic
Publishers, 2004.
Philippenko, C. and Dieuleveut, A. Artemis: tight convergence guarantees for bidirectional compres-
sion in federated learning. preprint arXiv:2006.14591, 2020.
Philippenko, C. and Dieuleveut, A. Preserved central model for faster bidirectional compression in
distributed settings. In Proc. of Conf. Neural Information Processing Systems (NeurIPS), 2021.
Reisizadeh, A., Mokhtari, A., Hassani, H., Jadbabaie, A., and Pedarsani, R. FedPAQ: A
communication-efficient federated learning method with periodic averaging and quantization.
In Proc. of Int. Conf. Artificial Intelligence and Statistics (AISTATS), pp. 2021–2031, 2020.
Richtárik, P., Sokolov, I., and Fatkhullin, I. EF21: A new, simpler, theoretically better, and
practically faster error feedback. In Proc. of 35th Conf. Neural Information Processing Systems
(NeurIPS), 2021.
Sadiev, A., Kovalev, D., and Richtárik, P. Communication acceleration of local gradient methods via
an accelerated primal-dual algorithm with an inexact prox. In Proc. of Conf. Neural Information
Processing Systems (NeurIPS), 2022a.
Sadiev, A., Malinovsky, G., Gorbunov, E., Sokolov, I., Khaled, A., Burlachenko, K., and Richtárik,
P. Federated optimization algorithms with random reshuffling and gradient compression. preprint
arXiv:2206.07021, 2022b.
Scaman, K., Bach, F., Bubeck, S., Lee, Y. T., and Massoulié, L. Optimal convergence rates for
convex distributed optimization in networks. Journal of Machine Learning Research, 20:1–31,
2019.
Stich, S. U. Local SGD converges fast and communicates little. In Proc. of International Conference
on Learning Representations (ICLR), 2019.
21
Wang, J. et al. A field guide to federated optimization. preprint arXiv:2107.06917, 2021.
Woodworth, B. E., Patel, K. K., and Srebro, N. Minibatch vs Local SGD for heterogeneous
distributed learning. In Proc. of Conf. Neural Information Processing Systems (NeurIPS), 2020.
22
Algorithm 2
1: input: stepsizes γ > 0, χ > 0; probability p ∈ (0, 1]; number of participating clients c ∈
{2, . . . , n}; compression index s ∈ {2, . . . , c}; initial estimates x0
n ∈
Rd such that (cid:80)n
i = 0, sequence of independent coin flips θ0, θ1, . . . with Prob(θt = 1) = p,
and for every t with θt = 1, a subset Ωt ⊂ [n] of size c chosen uniformly at random and a random
i)i∈Ωt ∈ Rd×c generated as explained in Figure 1. The compressed vector
binary mask qt = (qt
i (v) is v multiplied elementwise by qt
Ct
i.
n ∈ Rd and h0
1, . . . , h0
1, . . . , x0
i=1 h0
2: for t = 0, 1, . . . do
3:
for i = 1, . . . , n, at clients in parallel, do
ˆxt
i := xt
i − γgt
if θt = 1 then
i + γht
i, where gt
i is an unbiased stochastic estimate of ∇fi(xt
i) of variance σ2
i
i to the server, which aggregates ̄xt := 1
s
(cid:80)
j∈Ωt Ct
j(ˆxt
j) and broadcasts it to all
i + pχ
γ
(cid:0)Ct
i ( ̄xt) − Ct
i (ˆxt
i)(cid:1)
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
if i ∈ Ωt then
send ˆxt
clients
ht+1
i
else
:= ht
:= ht
i
ht+1
i
end if
xt+1
i
else
:= ̄xt
:= ˆxt
i
:= ht
i
xt+1
i
ht+1
i
end if
end for
17:
18: end for
Appendix
A Proof of Theorem 1
We first prove convergence of Algorithm 2, which is a single-loop version of TAMUNA; that is, there
is a unique loop over the iterations and there is one local step per iteration. In Section A.2, we show
that this yields a proof of Theorem 1 for TAMUNA. We can note that in case of full participation
(c = n, Ωt ≡ [n]), Algorithm 2 reverts to our previous algorithm CompressedScaffnew (Condat et al.,
2022a).
To simplify the analysis of Algorithm 2, we introduce vector notations: the problem (1) can be
written as
find x⋆ = arg min
f (x)
s.t. W x = 0,
(21)
i=1 fi(xi) is L-smooth and μ-strongly convex, the linear operator W : X → X maps x = (xi)n
x∈X
i=1 ∈ X is a collection of vectors xi ∈ Rd, f : x ∈ X (cid:55)→
where X := Rd×n, an element x = (xi)n
(cid:80)n
i=1 to
(xi − 1
i=1. The constraint W x = 0 means that x minus its average is zero; that is, x has
n
identical components x1 = * * * = xn. Thus, (21) is indeed equivalent to (1). We have W = W ∗ = W 2.
We also rewrite Algorithm 2 using vector notations as Algorithm 3. It converges linearly:
j=1 xj)n
(cid:80)n
23
Algorithm 3
i=1 h0
input: stepsizes γ > 0, χ > 0; probability p ∈ (0, 1], parameter ω ≥ 0; number of participating
clients c ∈ {2, . . . , n}; compression index s ∈ {2, . . . , c}; initial estimates x0 ∈ X and h0 ∈ X such
that (cid:80)n
i = 0; sequence of independent coin flips θ0, θ1, . . . with Prob(θt = 1) = p, and for
every t with θt = 1, a subset Ωt ⊂ [n] of size c chosen uniformly at random and a random binary
mask qt = (qt
i (v) is v
multiplied elementwise by qt
i.
for t = 0, 1, . . . do
i)i∈Ωt ∈ Rd×c generated as explained in Figure 1. The compressed vector Ct
i=1 ≈ ∇f (xt)
i)n
ˆxt := xt − γgt + γht, where gt = (gt
if θt = 1 then
̄xt := ( ̄xt)n
xt+1 := ̄xt
dt := (dt
i)n
j∈Ωt Ct
(cid:26) (1 + ω) (cid:0)Ct
0 otherwise
i=1, where ̄xt := 1
s
i=1 with dt
i =
(cid:80)
j(ˆxt
j)
i (ˆxt
i) − Ct
i ( ̄xt)(cid:1) if i ∈ Ωt,
else
xt+1 := ˆxt
dt := 0
end if
ht+1 := ht − pχ
γ(1+ω) dt
end for
Theorem 3 (fast linear convergence). In Algorithm 3, suppose that 0 < γ < 2
ω = n−1
p(s−1) − 1. For every t ≥ 0, define the Lyapunov function
L , 0 < χ ≤ n(s−1)
s(n−1) ,
Ψt :=
1
γ
(cid:13)
(cid:13)xt − x⋆(cid:13)
2 +
(cid:13)
γ(1 + ω)
pχ
(cid:13)
(cid:13)ht − h⋆(cid:13)
2 ,
(cid:13)
(22)
where x⋆ is the unique solution to (21) and h⋆ := ∇f (x⋆). Then Algorithm 3 converges linearly: for
every t ≥ 0,
E(cid:2)Ψt(cid:3) ≤ τ tΨ0 +
γσ2
1 − τ
,
where
(cid:18)
τ := max
(1 − γμ)2, (γL − 1)2, 1 − p2χ
(cid:19)
s − 1
n − 1
< 1.
Also, if σ = 0, (xt)t∈N and (ˆxt)t∈N both converge to x⋆ and (ht)t∈N converges to h⋆, almost surely.
Proof. We consider the variables of Algorithm 3. For every t ≥ 0, we denote by F t
0 the σ-algebra
generated by the collection of X -valued random variables x0, h0, . . . , xt, ht, and by F t the σ-algebra
generated by these variables, as well as the stochastic gradients gt. dt is a random variable; as
proved in Section A.1, it satisfies the 3 following properties, on which the convergence analysis of
Algorithm 3 relies: for every t ≥ 0,
1. E(cid:2)dt | F t(cid:3) = W ˆxt.
2. E
2 | F t(cid:105)
(cid:104)(cid:13)
(cid:13)dt − W ˆxt(cid:13)
(cid:13)
≤ ω (cid:13)
(cid:13)W ˆxt(cid:13)
2 .
(cid:13)
24
(23)
(24)
i=1 dt
i = 0.
t ≥ 0, (cid:80)n
3. dt belongs to the range of W ; that is, (cid:80)n
We suppose that (cid:80)n
i=1 h0
i = 0; that is, W ht = ht.
For every t ≥ 0, we define ˆht+1 := ht − pχ
i=1 ˆxt
i=1, with ̄xt♯ := 1
n
also define ̄xt♯ := ( ̄xt♯)n
̄xt is an unbiased random estimate.
i=1 ht
(cid:80)n
i = 0. Then, it follows from the third property of dt that, for every
γ W ˆxt, wt := xt − γgt and w⋆ := x⋆ − γ∇f (x⋆). We
i, of which
i; that is, ̄xt♯ is the exact average of the ˆxt
Let t ≥ 0. We have
E
(cid:104)(cid:13)
(cid:13)xt+1 − x⋆(cid:13)
2
(cid:13)
| F t(cid:105)
= pE
(cid:105)
(cid:104)(cid:13)
(cid:13) ̄xt − x⋆(cid:13)
2 | F t, θt = 1
(cid:13)
+ (1 − p) (cid:13)
(cid:13)ˆxt − x⋆(cid:13)
2 ,
(cid:13)
Since E(cid:2) ̄xt | F t, θt = 1(cid:3) = ̄xt♯,
E
(cid:105)
(cid:104)(cid:13)
(cid:13) ̄xt − x⋆(cid:13)
2 | F t, θt = 1
(cid:13)
=
with
(cid:13)
(cid:13)
(cid:13) ̄xt♯ − x⋆(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13) ̄xt♯ − x⋆(cid:13)
2
(cid:13)
(cid:13)
+ E
(cid:20)(cid:13)
(cid:13) ̄xt − ̄xt♯(cid:13)
(cid:13)
2
(cid:13)
(cid:13)
(cid:21)
| F t, θ = 1
,
= (cid:13)
2 − (cid:13)
(cid:13)ˆxt − x⋆(cid:13)
(cid:13)
(cid:13)W ˆxt(cid:13)
2 .
(cid:13)
(cid:105)
(cid:104)(cid:13)
(cid:13) ̄xt − x⋆(cid:13)
2 | F t, θt = 1
To analyze E
, where the expectation is with respect to the active subset Ωt
(cid:13)
and the mask qt, we can remark that the expectation and the squared Euclidean norm are separable
with respect to the coordinates of the d-dimensional vectors. So, we can reason on the coordinates
independently on each other, even if the the coordinates, or rows, of qt are mutually dependent.
Also, for a given coordinate k ∈ [d], choosing s elements at random among the c elements ˆxt
i,k with
i ∈ Ωt, with Ωt chosen uniformly at random too, is equivalent to selecting s elements ˆxt
i,k among all
i ∈ [n] uniformly at random in the first place. Thus, for every coordinate k ∈ [d], it is like a subset
(cid:101)Ωt
k ⊂ [n] of size s, which corresponds to the location of the ones in the k-th row of qt, is chosen
uniformly at random and
̄xt
k =
1
s
ˆxt
i,k.
(cid:88)
i∈(cid:101)Ωt
k
Then, as proved in Condat & Richtárik (2022, Proposition 1),
E
(cid:20)(cid:13)
(cid:13) ̄xt − ̄xt♯(cid:13)
(cid:13)
2
(cid:13)
(cid:13)
where
Moreover,
(cid:21)
| F t, θt = 1
= n
E
(cid:101)Ωt
k
d
(cid:88)
k=1
ˆxt
i,k −
1
s
(cid:88)
i∈(cid:101)Ωt
k
1
n
n
(cid:88)
j=1
2
ˆxt
j,k
| F t
= ν (cid:13)
(cid:13)W ˆxt(cid:13)
2 ,
(cid:13)
ν :=
n − s
s(n − 1)
(cid:20)
∈
0,
(cid:19)
.
1
2
(25)
2 = (cid:13)
(cid:13)ˆxt − x⋆(cid:13)
(cid:13)
(cid:13)
= (cid:13)
= (cid:13)
= (cid:13)
= (cid:13)
(cid:13)wt − w⋆(cid:13)
2 + γ2 (cid:13)
(cid:13)
2 − γ2 (cid:13)
(cid:13)wt − w⋆(cid:13)
(cid:13)
(cid:13)wt − w⋆(cid:13)
2 − γ2 (cid:13)
(cid:13)
2 − γ2 (cid:13)
(cid:13)wt − w⋆(cid:13)
(cid:13)
2 − γ2 (cid:13)
(cid:13)wt − w⋆(cid:13)
(cid:13)
(cid:13)ht − h⋆(cid:13)
2 + 2γ⟨wt − w⋆, ht − h⋆⟩
(cid:13)
(cid:13)ht − h⋆(cid:13)
2 + 2γ⟨ˆxt − x⋆, ht − h⋆⟩
(cid:13)
(cid:13)ht − h⋆(cid:13)
2 + 2γ⟨ˆxt − x⋆, ˆht+1 − h⋆⟩ − 2γ⟨ˆxt − x⋆, ˆht+1 − ht⟩
(cid:13)
(cid:13)ht − h⋆(cid:13)
2 + 2γ⟨ˆxt − x⋆, ˆht+1 − h⋆⟩ + 2pχ⟨ˆxt − x⋆, W ˆxt⟩
(cid:13)
2 + 2γ⟨ˆxt − x⋆, ˆht+1 − h⋆⟩ + 2pχ (cid:13)
(cid:13)ht − h⋆(cid:13)
(cid:13)
(cid:13)W ˆxt(cid:13)
2 .
(cid:13)
25
Hence,
E
(cid:104)(cid:13)
(cid:13)xt+1 − x⋆(cid:13)
2
(cid:13)
| F t(cid:105)
= p (cid:13)
= (cid:13)
= (cid:13)
2 + (1 − p) (cid:13)
(cid:13)W ˆxt(cid:13)
(cid:13)
2 + pν (cid:13)
(cid:13)W ˆxt(cid:13)
2 − p (cid:13)
(cid:13)ˆxt − x⋆(cid:13)
(cid:13)
(cid:13)
(cid:13)W ˆxt(cid:13)
2 − p(1 − ν) (cid:13)
(cid:13)ˆxt − x⋆(cid:13)
2
(cid:13)
(cid:13)
(cid:13)ht − h⋆(cid:13)
(cid:13)wt − w⋆(cid:13)
2 − γ2 (cid:13)
2 + 2γ⟨ˆxt − x⋆, ˆht+1 − h⋆⟩
(cid:13)
(cid:13)
(cid:13)W ˆxt(cid:13)
+ (cid:0)2pχ − p(1 − ν)(cid:1) (cid:13)
2 .
(cid:13)
(cid:13)ˆxt − x⋆(cid:13)
2
(cid:13)
On the other hand, using the 3 properties of dt stated above, we have
E
(cid:104)(cid:13)
(cid:13)ht+1 − h⋆(cid:13)
2
(cid:13)
| F t(cid:105)
≤
=
=
=
=
(cid:13)
(cid:13)
ht − h⋆ −
(cid:13)
(cid:13)
(cid:13)
(cid:13)
ht − h⋆ +
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
pχ
γ(1 + ω)
W ˆxt
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)W ˆxt(cid:13)
(cid:13)
2
(cid:13)
+
ωp2χ2
γ2(1 + ω)2
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
+
ˆht+1 − ht(cid:13)
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
ˆht+1 − ht(cid:13)
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
+
1
1 + ω
1
1 + ω
(cid:0)ˆht+1 − ht(cid:1)
(cid:0)ˆht+1 − h⋆(cid:1)
(cid:0)ht − h⋆(cid:1) +
ω
(1 + ω)2
(cid:13)ht − h⋆(cid:13)
(cid:13)
2 +
(cid:13)
ω
(1 + ω)2
(cid:13)
2
ω
(cid:13)
(cid:13)
1 + ω
(cid:13)
ω2
ˆht+1 − h⋆(cid:13)
(cid:13)
1
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(1 + ω)2
(1 + ω)2
ˆht+1 − h⋆(cid:13)
(cid:13)
2ω
2
(1 + ω)2 ⟨ht − h⋆, ˆht+1 − h⋆⟩ +
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)ht − h⋆(cid:13)
(cid:13)
2 −
(cid:13)
ω
(1 + ω)2
(1 + ω)2 ⟨ht − h⋆, ˆht+1 − h⋆⟩
ω
(cid:13)ht − h⋆(cid:13)
(cid:13)
2 .
(cid:13)
1 + ω
ω
(1 + ω)2
ˆht+1 − h⋆(cid:13)
(cid:13)
1
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
1 + ω
2ω
+
+
+
Moreover,
ˆht+1 − h⋆(cid:13)
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
=
(cid:13)
(cid:13)
2
(cid:13)(ht − h⋆) + (ˆht+1 − ht)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
ˆht+1 − ht(cid:13)
2
(cid:13)ht − h⋆(cid:13)
2 +
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)ht − h⋆(cid:13)
2 + 2⟨ˆht+1 − h⋆, ˆht+1 − ht⟩ −
(cid:13)
(cid:13)ht − h⋆(cid:13)
2 −
(cid:13)
− 2
= (cid:13)
= (cid:13)
= (cid:13)
+ 2⟨ht − h⋆, ˆht+1 − ht⟩
ˆht+1 − ht(cid:13)
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
⟨ˆht+1 − h⋆, W (ˆxt − x⋆)⟩
ˆht+1 − ht(cid:13)
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
p2χ2
γ2
p2χ2
γ2
(cid:13)W ˆxt(cid:13)
(cid:13)
2 − 2
(cid:13)
(cid:13)W ˆxt(cid:13)
(cid:13)
2 − 2
(cid:13)
pχ
γ
pχ
γ
pχ
γ
= (cid:13)
(cid:13)ht − h⋆(cid:13)
2 −
(cid:13)
= (cid:13)
(cid:13)ht − h⋆(cid:13)
2 −
(cid:13)
⟨W (ˆht+1 − h⋆), ˆxt − x⋆⟩
⟨ˆht+1 − h⋆, ˆxt − x⋆⟩.
26
(26)
| F t(cid:105)
(cid:13)
(cid:13)ht − h⋆(cid:13)
2 .
(cid:13)
Hence,
E
(cid:104)(cid:13)
(cid:13)xt+1 − x⋆(cid:13)
2
(cid:13)
| F t(cid:105)
+
1
γ
≤
=
E
| F t(cid:105)
(cid:104)(cid:13)
(cid:13)ht+1 − h⋆(cid:13)
2
(cid:13)
γ(1 + ω)
pχ
2 − γ (cid:13)
(cid:13)wt − w⋆(cid:13)
(cid:13)
(cid:13)
1
γ
+ 2⟨ˆxt − x⋆, ˆht+1 − h⋆⟩ +
(cid:13)ht − h⋆(cid:13)
2 +
(cid:13)
γ
pχ
(cid:13)W ˆxt(cid:13)
(cid:13)
2 − 2⟨ˆht+1 − h⋆, ˆxt − x⋆⟩ +
(cid:13)
(cid:13)ht − h⋆(cid:13)
(cid:13)
2
(cid:13)
pχ
γ
(cid:18)
2
−
−
1
γ
+
pχ
γ
(cid:13)wt − w⋆(cid:13)
(cid:13)
2 +
(cid:13)
(cid:18) pχ
γ
p(1 − ν)
γ
−
(cid:19)
− γ
(cid:18) γ(1 + ω)
pχ
(cid:13)W ˆxt(cid:13)
(cid:13)
2 .
(cid:13)
(cid:19)
(cid:19)
(1 − ν)
(cid:13)
(cid:13)W ˆxt(cid:13)
2
(cid:13)
p
γ
(cid:13)ht − h⋆(cid:13)
(cid:13)
2
(cid:13)
γω
pχ
(cid:13)ht − h⋆(cid:13)
(cid:13)
2
(cid:13)
Since we have supposed
0 < χ ≤ 1 − ν =
n(s − 1)
s(n − 1)
∈
(cid:21)
, 1
,
(cid:18) 1
2
we have
Finally,
E
(cid:104)(cid:13)
(cid:13)xt+1 − x⋆(cid:13)
2
(cid:13)
| F t(cid:105)
+
1
γ
≤
1
γ
(cid:13)
(cid:13)wt − w⋆(cid:13)
2 +
(cid:13)
E
γ(1 + ω)
pχ
γ(1 + ω)
pχ
(cid:104)(cid:13)
(cid:13)ht+1 − h⋆(cid:13)
2
(cid:13)
(cid:19)
(cid:18)
1 −
pχ
1 + ω
E
(cid:104)(cid:13)
(cid:13)wt − w⋆(cid:13)
2 | F t
(cid:13)
0
(cid:105)
≤ (cid:13)
(cid:13)(Id − γ∇f )xt − (Id − γ∇f )x⋆(cid:13)
2 + γ2σ2,
(cid:13)
and according to Condat & Richtárik (2023, Lemma 1),
2 ≤ max(1 − γμ, γL − 1)2 (cid:13)
(cid:13)(Id − γ∇f )xt − (Id − γ∇f )x⋆(cid:13)
(cid:13)
(cid:13)
(cid:13)xt − x⋆(cid:13)
2 .
(cid:13)
Therefore,
E(cid:2)Ψt+1 | F t
0
(cid:3) ≤ max
(cid:18)
(1 − γμ)2, (γL − 1)2, 1 −
(cid:19)
pχ
1 + ω
Ψt + γσ2
= max
(cid:18)
(1 − γμ)2, (γL − 1)2, 1 − p2χ
(cid:19)
s − 1
n − 1
Ψt + γσ2.
(27)
Using the tower rule, we can unroll the recursion in (27) to obtain the unconditional expectation of
Ψt+1.
If σ = 0, using classical results on supermartingale convergence (Bertsekas, 2015, Proposition
A.4.5), it follows from (27) that Ψt → 0 almost surely. Almost sure convergence of xt and ht follows.
Finally, by Lipschitz continuity of ∇f , we can upper bound ∥ˆxt − x⋆∥2 by a linear combination of
∥xt − x⋆∥2 and ∥ht − h⋆∥2. It follows that E
→ 0 linearly with the same rate τ and
that ˆxt → x⋆ almost surely, as well.
(cid:104)(cid:13)
(cid:13)ˆxt − x⋆(cid:13)
(cid:13)
2(cid:105)
27
A.1 The random variable dt
We study the random variable dt used in Algorithm 3. If θt = 0, dt = 0. If, on the other hand,
θt = 1, for every coordinate k ∈ [d], a subset (cid:101)Ωt
k ⊂ [n] of size s is chosen uniformly at random. These
sets ((cid:101)Ωt
k=1 are mutually dependent, but this does not matter for the derivations, since we can
reason on the coordinates separately. Then, for every k ∈ [d] and i ∈ [n],
k)d
(cid:40)
dt
i,k :=
(cid:16)
(cid:80)
a
i,k − 1
ˆxt
s
0 otherwise,
j∈(cid:101)Ωt
k
(cid:17)
ˆxt
j,k
if i ∈ (cid:101)Ωt
k,
(28)
for some value a > 0 to determine. We can check that (cid:80)n
depends only on W ˆxt and not on ˆxt; in particular, if ˆxt
E(cid:2)dt
i
this section are conditional to ˆxt). So, let us calculate this expectation.
j, where the expectation is with respect to θt and the (cid:101)Ωt
i=1 dt
1 = * * * = ˆxt
i = 0. We can also note that dt
n, dt
i = 0. We have to set a so that
k (all expectations in
(cid:3) = ˆxt
j=1 ˆxt
i − 1
n
(cid:80)n
Let k ∈ [d]. For every i ∈ [n],
E(cid:2)dt
i,k
(cid:3) = p
aˆxt
i,k −
s
n
a
s
EΩ:i∈Ω
ˆxt
j,k
,
(cid:88)
j∈Ω
where EΩ:i∈Ω denotes the expectation with respect to a subset Ω ⊂ [n] of size s containing i and
chosen uniformly at random. We have
EΩ:i∈Ω
(cid:88)
ˆxt
j,k
j∈Ω
= ˆxt
i,k +
s − 1
n − 1
(cid:88)
j∈[n]\{i}
ˆxt
j,k =
n − s
n − 1
ˆxt
i,k +
s − 1
n − 1
n
(cid:88)
j=1
ˆxt
j,k.
Hence, for every i ∈ [n],
E(cid:2)dt
i,k
(cid:3) = p
(cid:18)
a −
s
n
a
s
n − s
n − 1
(cid:19)
ˆxi,k − p
s
n
a
s
s − 1
n − 1
n
(cid:88)
j=1
ˆxj,k.
Therefore, by setting
we have, for every i ∈ [n],
a :=
n − 1
p(s − 1)
,
(29)
E(cid:2)dt
i,k
(cid:3) = p
(cid:18) 1
p
s
n
n − 1
s − 1
−
1
p
n − s
s(s − 1)
(cid:19)
ˆxi,k −
1
n
n
(cid:88)
j=1
ˆxj,k
= ˆxi,k −
1
n
n
(cid:88)
j=1
ˆxj,k,
as desired.
Now, we want to find the value of ω such that
E
(cid:104)(cid:13)
(cid:13)dt − W ˆxt(cid:13)
(cid:13)
2(cid:105)
≤ ω (cid:13)
(cid:13)W ˆxt(cid:13)
2
(cid:13)
(30)
28
or, equivalently,
(cid:34) n
(cid:88)
E
i=1
(cid:35)
(cid:13)
(cid:13)dt
i
(cid:13)
2
(cid:13)
≤ (1 + ω)
n
(cid:88)
i=1
(cid:13)
(cid:13)
(cid:13)
ˆxt
i −
(cid:13)
(cid:13)
(cid:13)
1
n
n
(cid:88)
j=1
ˆxt
j
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
.
We can reason on the coordinates separately, or all at once to ease the notations. We have
(cid:34) n
(cid:88)
E
i=1
(cid:35)
(cid:13)
(cid:13)dt
i
(cid:13)
2
(cid:13)
= p
s
n
n
(cid:88)
i=1
EΩ:i∈Ω
(cid:13)
(cid:13)
(cid:13)
aˆxt
(cid:13)
(cid:13)
(cid:13)
i −
a
s
(cid:88)
j∈Ω
ˆxt
j
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
.
For every i ∈ [n],
EΩ:i∈Ω
(cid:13)
(cid:13)
(cid:13)
aˆxt
(cid:13)
(cid:13)
(cid:13)
i −
a
s
(cid:88)
j∈Ω
ˆxt
j
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
= EΩ:i∈Ω
(cid:16)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
a −
(cid:17)
a
s
ˆxt
i −
a
s
=
(cid:16)
(cid:13)
(cid:13)
(cid:13)
a −
(cid:17)
ˆxt
i
(cid:13)
2
(cid:13)
(cid:13)
a
s
+ EΩ:i∈Ω
ˆxt
j
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:88)
j∈Ω\{i}
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
a
s
(cid:88)
j∈Ω\{i}
ˆxt
j
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:43)
ˆxt
j
.
(cid:42)
(cid:16)
− 2
a −
(cid:17)
a
s
ˆxt
i,
a
s
EΩ:i∈Ω
(cid:88)
j∈Ω\{i}
We have
and
EΩ:i∈Ω
EΩ:i∈Ω
(cid:88)
j∈Ω\{i}
ˆxt
j =
s − 1
n − 1
(cid:88)
j∈[n]\{i}
ˆxt
j =
s − 1
n − 1
j − ˆxt
ˆxt
i
n
(cid:88)
j=1
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:88)
j∈Ω\{i}
ˆxt
j
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
= EΩ:i∈Ω
(cid:88)
(cid:13)
(cid:13)ˆxt
j
(cid:13)
2 + EΩ:i∈Ω
(cid:13)
(cid:88)
(cid:88)
(cid:10)ˆxt
j, ˆxt
j′
(cid:11)
=
s − 1
n − 1
j∈Ω\{i}
(cid:88)
j∈[n]\{i}
(cid:13)
(cid:13)ˆxt
j
(cid:13)
2 +
(cid:13)
s − 1
n − 1
j∈Ω\{i}
s − 2
n − 2
j′∈Ω\{i,j}
(cid:88)
(cid:88)
(cid:10)ˆxt
j, ˆxt
j′
(cid:11)
j∈[n]\{i}
j′∈[n]\{i,j}
=
s − 1
n − 1
(cid:18)
1 −
=
s − 1
n − 1
n − s
n − 2
s − 2
n − 2
n
(cid:88)
j=1
ˆxt
j
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:88)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
j∈[n]\{i}
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
n
(cid:88)
j=1
j − ˆxt
ˆxt
i
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
.
s − 2
n − 2
(cid:19) (cid:88)
j∈[n]\{i}
(cid:13)
(cid:13)ˆxt
j
(cid:13)
2 +
(cid:13)
s − 1
n − 1
s − 2
n − 2
(cid:13)
(cid:13)ˆxt
j
2 − (cid:13)
(cid:13)
(cid:13)
(cid:13)ˆxt
i
(cid:13)
2
(cid:13)
+
s − 1
n − 1
29
Hence,
(cid:34) n
(cid:88)
E
i=1
(cid:35)
(cid:13)
(cid:13)dt
i
(cid:13)
2
(cid:13)
= p
s
n
n
(cid:88)
i=1
(cid:16)
(cid:13)
(cid:13)
(cid:13)
a −
(cid:17)
ˆxt
i
(cid:13)
2
(cid:13)
(cid:13)
a
s
+ ps
a2
(s)2
s − 1
n − 1
n − s
n − 2
n
(cid:88)
j=1
(cid:13)
(cid:13)ˆxt
j
(cid:13)
2
(cid:13)
− p
s
n
a2
(s)2
s − 1
n − 1
n − s
n − 2
− 2p
s
n
a
s
s − 1
n − 1
(cid:16)
a −
a
s
=
(n − 1)2
psn
n
(cid:88)
i=1
(cid:13)
(cid:13)ˆxt
i
(cid:13)
2 +
(cid:13)
n
(cid:88)
(cid:13)
(cid:13)ˆxt
i
(cid:13)
2 + p
(cid:13)
s
n
a2
(s)2
s − 1
n − 1
s − 2
n − 2
n
(cid:88)
i=1
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
n
(cid:88)
j=1
i=1
(cid:17) n
(cid:88)
(cid:42)
ˆxt
i,
n
(cid:88)
j − ˆxt
ˆxt
i
(cid:43)
j=1
i=1
(n − 1)2
ps(s − 1)n
n − s
n − 2
n
(cid:88)
i=1
(cid:13)
(cid:13)ˆxt
i
(cid:13)
2
(cid:13)
+
1
ps
s − 2
s − 1
n − 1
n − 2
+
1
psn
s − 2
s − 1
n − 1
n − 2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
n
(cid:88)
i=1
n
(cid:88)
i=1
ˆxt
i
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
− 2
1
psn
s − 2
s − 1
n − 1
n − 2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
n
(cid:88)
i=1
ˆxt
i
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)ˆxt
i
(cid:13)
2 + 2
(cid:13)
n − 1
psn
n
(cid:88)
i=1
(cid:13)
(cid:13)ˆxt
i
(cid:13)
2 − 2
(cid:13)
n − 1
psn
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
n
(cid:88)
i=1
j − ˆxt
ˆxt
i
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
ˆxt
i
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
=
(n − 1)(n + 1)
psn
n
(cid:88)
i=1
(cid:13)
(cid:13)ˆxt
i
(cid:13)
2 +
(cid:13)
(n − 1)2
ps(s − 1)n
n − s
n − 2
n
(cid:88)
i=1
(cid:13)
(cid:13)ˆxt
i
(cid:13)
2
(cid:13)
−
n − 1
psn
s
s − 1
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
n
(cid:88)
i=1
ˆxt
i
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
+
1
psn
s − 2
s − 1
n − 1
n − 2
n
(cid:88)
i=1
(cid:13)
(cid:13)ˆxt
i
(cid:13)
2
(cid:13)
=
(n2 − 1)(s − 1)(n − 2) + (n − 1)2(n − s) + (s − 2)(n − 1)
ps(s − 1)n(n − 2)
n
(cid:88)
i=1
(cid:13)
(cid:13)ˆxt
i
(cid:13)
2
(cid:13)
−
n − 1
p(s − 1)n
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
n
(cid:88)
i=1
ˆxt
i
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
=
n − 1
p(s − 1)
=
n − 1
p(s − 1)
n
(cid:88)
i=1
n
(cid:88)
i=1
(cid:13)
(cid:13)ˆxt
i
(cid:13)
2 −
(cid:13)
n − 1
p(s − 1)n
(cid:13)
(cid:13)
(cid:13)
ˆxt
i −
(cid:13)
(cid:13)
(cid:13)
1
n
n
(cid:88)
j=1
ˆxt
j
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
.
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
n
(cid:88)
i=1
ˆxt
i
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
Therefore, (30) holds with
and we have a = 1 + ω.
ω =
n − 1
p(s − 1)
− 1
(31)
A.2 From Algorithm 2 to TAMUNA
TAMUNA is a two-loop version of Algorithm 2, where every sequence of local steps followed by a
communication step is grouped into a round. One crucial observation about Algorithm 2 is the
30
following: for a client i /∈ Ωt, which does not participate in communication at iteration t with θt = 1,
its variable xi gets overwritten by ̄xt anyway (step 12 of Algorithm 2). Therefore, all local steps
it performed since its last participation are useless and can be omitted. But at iteration t with
θt = 0, it is still undecided whether or not a given client will participate in the next communication
step at iteration t′ > t, since Ωt′ has not yet been generated. That is why TAMUNA is written
with two loops, so that it is decided at the beginning of the round which clients will communicate
at the end of the round. Accordingly, at the beginning of round r, a client downloads the current
model estimate (step 6 of TAMUNA) only if it participates (i ∈ Ω(r)), to initialize its sequence of
local steps. Otherwise (i /∈ Ω(r)), the client is completely idle: neither computation nor downlink or
uplink communication is performed in round r. Finally, a round consists of a sequence of successive
iterations with θt = 0 and a last iteration with θt = 1 followed by communication. Thus, the number
of iterations, or local steps, in a round can be determined directly at the beginning of the round,
according to a geometric law. Given these considerations, Algorithm 2 and TAMUNA are equivalent.
In TAMUNA, the round and local step indexing is denoted by parentheses, e.g. (r, l), to differentiate
it clearly from the iteration indexing.
To obtain Theorem 1 from Theorem 3, we first have to reindex the local steps to make the
equivalent iteration index t in Algorithm 2 appear, since the rate is with respect to the number of
iterations, not rounds, whose size is random. The almost sure convergence statement follows directly
from the one in Theorem 3.
Importantly, we want a result related to the variables which are actually computed in TAMUNA,
without including virtual variables by the idle clients, which are computed in Algorithm 2 but
not in TAMUNA. That is why we express the convergence result with respect to ̄xt, which relates
only to the variables of active clients; also, ̄xt is the model estimate known by the server whenever
communication occurs, which matters at the end. Note the bar in Ψ in (6) to differentiate it from Ψ
in (22). Thus, we continue the analysis of Algorithms 2 and 3 in Section A, with same definitions
and notations. Let t ≥ 0. If θt = 0, we choose Ωt ⊂ [n] of size c uniformly at random and a
random binary mask qt = (qt
j) (in Theorem 1, for
simplicity, Ωt and qt are the ones that will be used at the end of the round; this choice is valid as
it does not depend on the past). Ωt, qt and ̄xt are already defined if θt = 1. We want to study
E
, where the expectation is with respect to Ωt and qt, whatever θt. Using the
i)i∈Ωt ∈ Rd×c, and we define ̄xt := 1
s
j∈Ωt Ct
j(ˆxt
(cid:80)
2 | F t(cid:105)
(cid:104)(cid:13)
(cid:13) ̄xt − x⋆(cid:13)
(cid:13)
derivations already obtained,
2 | F t(cid:105)
(cid:104)(cid:13)
(cid:13) ̄xt − x⋆(cid:13)
(cid:13)
nE
= (cid:13)
= (cid:13)
2 − (cid:13)
(cid:13)ˆxt − x⋆(cid:13)
(cid:13)
(cid:13)wt − w⋆(cid:13)
2 − γ2 (cid:13)
(cid:13)
+ (2pχ + ν − 1) (cid:13)
2 − γ2 (cid:13)
(cid:13)wt − w⋆(cid:13)
(cid:13)
+ (cid:0)2pχ − p(1 − ν)(cid:1) (cid:13)
(cid:13)W ˆxt(cid:13)
2 + ν (cid:13)
(cid:13)W ˆxt(cid:13)
2
(cid:13)
(cid:13)
(cid:13)ht − h⋆(cid:13)
2 + 2γ⟨ˆxt − x⋆, ˆht+1 − h⋆⟩
(cid:13)
(cid:13)W ˆxt(cid:13)
2
(cid:13)
(cid:13)ht − h⋆(cid:13)
2 + 2γ⟨ˆxt − x⋆, ˆht+1 − h⋆⟩
(cid:13)
(cid:13)W ˆxt(cid:13)
2 .
(cid:13)
≤ (cid:13)
Hence,
n
γ
E
2 | F t(cid:105)
(cid:104)(cid:13)
(cid:13) ̄xt − x⋆(cid:13)
(cid:13)
+
γ(1 + ω)
pχ
(cid:13)wt − w⋆(cid:13)
(cid:13)
2 +
(cid:13)
E
(cid:104)(cid:13)
(cid:13)ht+1 − h⋆(cid:13)
2
(cid:13)
γ(1 + ω)
pχ
(cid:18)
1 −
pχ
1 + ω
| F t(cid:105)
(cid:19)
(cid:13)ht − h⋆(cid:13)
(cid:13)
2
(cid:13)
≤
1
γ
31
and
E
(cid:104)(cid:13)
(cid:13) ̄xt − x⋆(cid:13)
2 | F t
(cid:13)
0
(cid:105)
+
n
γ
γ(1 + ω)
pχ
E
(cid:104)(cid:13)
(cid:13)ht+1 − h⋆(cid:13)
2
(cid:13)
(cid:18)
≤ max
(1 − γμ)2, (γL − 1)2, 1 − p2χ
Using the tower rule,
(cid:105)
| F t
0
(cid:19)
s − 1
n − 1
Ψt + γσ2.
E
(cid:104)(cid:13)
(cid:13) ̄xt − x⋆(cid:13)
(cid:13)
2(cid:105)
n
γ
+
γ(1 + ω)
pχ
E
(cid:104)(cid:13)
(cid:13)ht+1 − h⋆(cid:13)
(cid:13)
2(cid:105)
≤ τ tΨ0 +
γσ2
1 − τ
.
Since in TAMUNA, x0
1 = * * * = x0
0
n = ̄x0 = ̄x(0), Ψ
= Ψ0. This concludes the proof of Theorem 1.
B Proof of Theorem 2
We suppose that the assumptions in Theorem 2 hold. s is set as the maximum of three values. Let
us consider these three cases.
1) Suppose that s = 2. Since 2 = s ≥ ⌊αc⌋ and 2 = s ≥ ⌊ c
d ⌋, we have α ≤ 3
c and 1 ≤ 3d
c . Hence,
O
(cid:19)(cid:18) sd
c
+
(cid:18)(cid:114) nκ
n
s
s
(cid:18) d
nκ + n(cid:1)
c
√
(cid:19)
n
c
nκ
c
+ d
d
+
= O (cid:0)√
(cid:18)
= O
(cid:19)
+ 1 + αd
d
c
+
(cid:19)
d
c
.
(32)
2) Suppose that s = ⌊ c
c ≤ 1
2 , so that αd ≤ 1 + d
and d
d ⌋. Then sd
c ≤ 1. Since s ≥ ⌊αc⌋ and ⌊ c
d ⌋ = s ≥ 2, we have αc ≤ s+1 ≤ c
d +1
c ≤ 2. Hence,
(cid:18)(cid:114) nκ
s
(cid:18)(cid:114) nκ
s
= O
O
+
+
(cid:19)
+ 1 + αd
(cid:19)(cid:18) sd
c
(cid:19)
.
n
s
n
s
n
s
Since 2s ≥ c
d , we have 1
s ≤ 2d
c and
O
= O
+
(cid:18)(cid:114) nκ
s
(cid:114) nκ
d
c
(cid:18)√
(cid:19)(cid:18) sd
c
(cid:19)
+ d
n
c
(cid:19)
+ 1 + αd
.
(33)
3) Suppose that s = ⌊αc⌋. This implies α > 0. Then s ≤ αc. Also, 2s ≥ αc and 1
d and 1 ≤ αd + d
c . Since s = ⌊αc⌋ ≥ 2, we have 1
d ⌋, we have αc + 1 ≥ c
s = ⌊αc⌋ ≥ ⌊ c
s ≤ 2
αc . Since
c ≤ α
2 and
32
1 ≤ 2αd. Hence,
O
= O
= O
(cid:18)(cid:114) nκ
s
(cid:18)(cid:114) nκ
αc
(cid:18)√
αd
+
n
s
n
αc
(cid:114) nκ
c
+
(cid:19)(cid:18) sd
c
(cid:19)
+ 1 + αd
(cid:19)
(αd + αd + αd)
+ d
(cid:19)
.
n
c
(34)
By adding up the three upper bounds (32), (33), (34), we obtain the upper bound in (15).
C Sublinear convergence in the convex case
In this section only, we remove the hypothesis of strong convexity: the functions fi are only assumed
to be convex and L-smooth, and we suppose that a solution x⋆ ∈ Rd to (1) exists. Also, for simplicity,
we only consider the case of exact gradients (σ = 0). Then we have sublinear ergodic convergence:
Theorem 4 (sublinear convergence). In Algorithm 2 suppose that σ = 0 and that
0 < γ <
2
L
and 0 < χ <
n(s − 1)
s(n − 1)
∈
(cid:21)
, 1
.
(cid:18) 1
2
For every i = 1, . . . , n and T ≥ 0, let
̃xT
i
:=
1
T + 1
T
(cid:88)
t=0
xt
i.
Then
E
(cid:104)(cid:13)
(cid:13)∇f ( ̃xT
i )(cid:13)
(cid:13)
2(cid:105)
= O
(cid:19)
.
(cid:18) 1
T
(35)
(36)
(37)
(cid:80)n
i=1 ∇fi(x⋆) = 0.
Proof. A solution x⋆ ∈ Rd to (1), which is supposed to exist, satisfies ∇f (x⋆) = 1
n
x⋆ is not necessarily unique but h⋆
i := ∇fi(x⋆) is unique.
We define the Bregman divergence of a L-smooth convex function g at points x, x′ ∈ Rd as
2L ∥∇g(x) − ∇g(x′)∥2. We
Dg(x, x′) := g(x) − g(x′) − ⟨∇g(x′), x − x′⟩ ≥ 0. We have Dg(x, x′) ≥ 1
note that for every x ∈ Rd and i = 1, . . . , n, Dfi(x, x⋆) is the same whatever the solution x⋆.
For every t ≥ 0, we define the Lyapunov function
Ψt :=
1
γ
n
(cid:88)
i=1
(cid:13)
(cid:13)xt
i − x⋆(cid:13)
2 +
(cid:13)
γ
p2χ
n − 1
s − 1
n
(cid:88)
i=1
(cid:13)
(cid:13)ht
i − h⋆
i
(cid:13)
2 ,
(cid:13)
(38)
Starting from (26), we have, for every t ≥ 0,
E(cid:2)Ψt+1 | F t(cid:3) =
≤
1
γ
1
γ
n
(cid:88)
i=1
n
(cid:88)
i=1
E
(cid:104)(cid:13)
(cid:13)xt+1
i − x⋆(cid:13)
2
(cid:13)
| F t(cid:105)
+
γ
p2χ
n − 1
s − 1
n
(cid:88)
i=1
E
(cid:104)(cid:13)
(cid:13)ht+1
i − h⋆
i
(cid:13)
2
(cid:13)
| F t(cid:105)
(cid:13)
(cid:0)xt
(cid:13)
i − γ∇fi(xt
i)(cid:1) − (cid:0)x⋆ − γ∇fi(x⋆)(cid:1)(cid:13)
2
(cid:13)
+
(cid:18) γ
p2χ
n − 1
s − 1
(cid:19) n
(cid:88)
− γ
i=1
(cid:13)
(cid:13)ht
i − h⋆
i
(cid:13)
2 +
(cid:13)
p
γ
(χ − 1 + ν)
n
(cid:88)
i=1
(cid:13)
(cid:13)
(cid:13)
ˆxt
i −
(cid:13)
(cid:13)
(cid:13)
1
n
n
(cid:88)
j=1
ˆxt
j
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
,
33
with
(cid:13)
(cid:0)xt
(cid:13)
i − γ∇fi(xt
2 = (cid:13)
i)(cid:1) − (cid:0)x⋆ − γ∇fi(x⋆)(cid:1)(cid:13)
(cid:13)
i) − ∇fi(x⋆), xt
i − x⋆⟩
i − x⋆(cid:13)
2 − 2γ⟨∇fi(xt
(cid:13)
(cid:13)∇fi(xt
i) − ∇fi(x⋆)(cid:13)
2
(cid:13)
(cid:13)xt
+ γ2 (cid:13)
(cid:13)xt
i − x⋆(cid:13)
2 − (2γ − γ2L)⟨∇fi(xt
(cid:13)
where the second inequality follows from cocoercivity of the gradient. Moreover, for every x, x′,
Dfi(x, x′) ≤ ⟨∇fi(x) − ∇fi(x′), x − x′⟩. Therefore,
i) − ∇fi(x⋆), xt
i − x⋆⟩,
≤ (cid:13)
E(cid:2)Ψt+1 | F t(cid:3) ≤ Ψt − (2 − γL)
n
(cid:88)
i=1
Dfi(xt
i, x⋆)
− γ
n
(cid:88)
i=1
(cid:13)
(cid:13)ht
i − h⋆
i
(cid:13)
2 +
(cid:13)
p
γ
(χ − 1 + ν)
n
(cid:88)
i=1
(cid:13)
(cid:13)
(cid:13)
ˆxt
i −
(cid:13)
(cid:13)
(cid:13)
1
n
n
(cid:88)
j=1
ˆxt
j
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
.
Telescopic the sum and using the tower rule of expectations, we get summability over t of the three
negative terms above: for every T ≥ 0, we have
(2 − γL)
n
(cid:88)
T
(cid:88)
i=1
t=0
E(cid:2)Dfi(xt
i, x⋆)(cid:3) ≤ Ψ0 − E(cid:2)ΨT +1(cid:3) ≤ Ψ0,
n
(cid:88)
T
(cid:88)
γ
i=1
t=0
E
(cid:104)(cid:13)
(cid:13)ht
i − h⋆
i
2(cid:105)
(cid:13)
(cid:13)
≤ Ψ0 − E(cid:2)ΨT +1(cid:3) ≤ Ψ0,
p
γ
(1 − ν − χ)
n
(cid:88)
T
(cid:88)
i=1
t=0
E
(cid:13)
(cid:13)
(cid:13)
ˆxt
i −
(cid:13)
(cid:13)
(cid:13)
1
n
n
(cid:88)
j=1
ˆxt
j
2
≤ Ψ0 − E(cid:2)ΨT +1(cid:3) ≤ Ψ0.
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(39)
(40)
(41)
Taking ergodic averages and using convexity of the squared norm and of the Bregman divergence,
we can now get O(1/T ) rates. We use a tilde to denote averages over the iterations so far. That is,
for every i = 1, . . . , n and T ≥ 0, we define
and
̃xT
i
:=
1
T + 1
T
(cid:88)
t=0
xt
i
̃xT :=
1
n
n
(cid:88)
i=1
̃xT
i .
The Bregman divergence is convex in its first argument, so that, for every T ≥ 0,
n
(cid:88)
i=1
Dfi( ̃xT
i , x⋆) ≤
n
(cid:88)
i=1
1
T + 1
T
(cid:88)
t=0
Dfi(xt
i, x⋆).
Combining this inequality with (39) yields, for every T ≥ 0,
(2 − γL)
n
(cid:88)
i=1
E(cid:2)Dfi( ̃xT
i , x⋆)(cid:3) ≤
Ψ0
T + 1
.
34
(42)
Similarly, for every i = 1, . . . , n and T ≥ 0, we define
̃hT
i
:=
1
T + 1
T
(cid:88)
t=0
ht
i
and we have, for every T ≥ 0,
n
(cid:88)
i=1
(cid:13)
̃hT
i − h⋆
(cid:13)
(cid:13)
i
(cid:13)
2
(cid:13)
(cid:13)
≤
n
(cid:88)
i=1
1
T + 1
T
(cid:88)
t=0
(cid:13)
(cid:13)ht
i − h⋆
i
(cid:13)
2 .
(cid:13)
Combining this inequality with (40) yields, for every T ≥ 0,
γ
n
(cid:88)
i=1
E
(cid:20)(cid:13)
̃hT
i − h⋆
(cid:13)
(cid:13)
i
2(cid:21)
(cid:13)
(cid:13)
(cid:13)
≤
Ψ0
T + 1
.
Finally, for every i = 1, . . . , n and T ≥ 0, we define
and
and we have, for every T ≥ 0,
̃ˆxT
i
:=
1
T + 1
T
(cid:88)
t=0
ˆxt
i
̃ˆxT :=
1
n
n
(cid:88)
i=1
̃ˆxT
i ,
n
(cid:88)
i=1
i − ̃ˆxT (cid:13)
(cid:13)
2
̃ˆxT
(cid:13)
(cid:13)
(cid:13)
(cid:13)
≤
n
(cid:88)
i=1
1
T + 1
T
(cid:88)
t=0
(cid:13)
(cid:13)
(cid:13)
ˆxt
i −
(cid:13)
(cid:13)
(cid:13)
1
n
n
(cid:88)
j=1
ˆxt
j
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
.
Combining this inequality with (41) yields, for every T ≥ 0,
(cid:20)(cid:13)
2(cid:21)
i − ̃ˆxT (cid:13)
̃ˆxT
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(1 − ν − χ)
n
(cid:88)
E
p
γ
i=1
≤
Ψ0
T + 1
.
Next, we have, for every i = 1, . . . , n and T ≥ 0,
(cid:13)
(cid:13)∇f ( ̃xT
i )(cid:13)
2
(cid:13)
≤ 2 (cid:13)
≤ 2L2 (cid:13)
(cid:13)∇f ( ̃xT
(cid:13) ̃xT
i ) − ∇f ( ̃xT )(cid:13)
+ 2 (cid:13)
2
(cid:13)
(cid:13)∇f ( ̃xT )(cid:13)
+ 2 (cid:13)
i − ̃xT (cid:13)
2
2
(cid:13)
(cid:13)
(cid:13)∇f ( ̃xT )(cid:13)
2
(cid:13)
.
Moreover, for every T ≥ 0 and solution x⋆ to (1),
= (cid:13)
(cid:13)∇f ( ̃xT )(cid:13)
(cid:13)
2
(cid:13)
(cid:13)∇f ( ̃xT ) − ∇f (x⋆)(cid:13)
2
(cid:13)
1
n
n
(cid:88)
(cid:13)∇fi( ̃xT ) − ∇fi(x⋆)(cid:13)
(cid:13)
2
(cid:13)
i=1
n
(cid:88)
i=1
2
n
≤
≤
≤
(cid:13)
(cid:13)∇fi( ̃xT ) − ∇fi( ̃xT
i )(cid:13)
2
(cid:13)
+
2
n
n
(cid:88)
i=1
(cid:13)
(cid:13)∇fi( ̃xT
i ) − ∇fi(x⋆)(cid:13)
2
(cid:13)
2L2
n
n
(cid:88)
i=1
(cid:13)
(cid:13) ̃xT
i − ̃xT (cid:13)
2
(cid:13)
+
4L
n
n
(cid:88)
i=1
Dfi( ̃xT
i , x⋆).
35
(43)
(44)
(45)
(46)
There remains to control the terms (cid:13)
(cid:13) ̃xT
i − ̃xT (cid:13)
2: we have, for every T ≥ 0,
(cid:13)
n
(cid:88)
i=1
(cid:13)
(cid:13) ̃xT
i − ̃xT (cid:13)
2
(cid:13)
≤ 2
≤ 2
n
(cid:88)
i=1
n
(cid:88)
i=1
For every i = 1, . . . , n and t ≥ 0,
(cid:13)
(cid:13)( ̃xT
(cid:13)
i − ̃xT ) − ( ̃ˆxT
(cid:13)
2
i − ̃ˆxT )
(cid:13)
(cid:13)
+ 2
n
(cid:88)
i=1
i − ̃ˆxT (cid:13)
(cid:13)
2
̃ˆxT
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13) ̃xT
(cid:13)
i − ̃ˆxT
i
(cid:13)
2
(cid:13)
(cid:13)
+ 2
n
(cid:88)
i=1
(cid:13)
i − ̃ˆxT (cid:13)
2
̃ˆxT
(cid:13)
(cid:13)
(cid:13)
(cid:13)
.
(47)
i = xt
ˆxt
i − γ(cid:0)∇fi(xt
i) − ht
i
(cid:1)
so that, for every i = 1, . . . , n and T ≥ 0,
i − ̃ˆxT
̃xT
i = γ
1
T + 1
T
(cid:88)
t=0
∇fi(xt
i) − γ ̃hT
i
and
(cid:13)
(cid:13) ̃xT
(cid:13)
i − ̃ˆxT
i
(cid:13)
2
(cid:13)
(cid:13)
= γ2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
1
T + 1
≤ 2γ2
1
T + 1
t=0
T
(cid:88)
T
(cid:88)
∇fi(xt
i) − ̃hT
i
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)∇fi(xt
2 + 2γ2 (cid:13)
i) − ∇fi(x⋆)(cid:13)
̃hT
i − h⋆
(cid:13)
(cid:13)
(cid:13)
i
(cid:13)
2
(cid:13)
(cid:13)
Dfi(xt
i, x⋆) + 2γ2 (cid:13)
̃hT
i − h⋆
(cid:13)
(cid:13)
i
(cid:13)
2
(cid:13)
(cid:13)
.
(48)
≤ 4Lγ2
t=0
T
(cid:88)
t=0
1
T + 1
Combining (45), (46), (47), (48), we get, for every T ≥ 0,
n
(cid:88)
i=1
(cid:13)
(cid:13)∇f ( ̃xT
i )(cid:13)
2
(cid:13)
≤ 2L2
≤ 2L2
= 4L2
≤ 8L2
n
(cid:88)
i=1
n
(cid:88)
i=1
n
(cid:88)
i=1
n
(cid:88)
i=1
(cid:13)
(cid:13) ̃xT
i − ̃xT (cid:13)
2
(cid:13)
+ 2n (cid:13)
(cid:13)∇f ( ̃xT )(cid:13)
2
(cid:13)
(cid:13)
(cid:13) ̃xT
i − ̃xT (cid:13)
2
(cid:13)
+ 2L2
n
(cid:88)
(cid:13)
(cid:13) ̃xT
i − ̃xT (cid:13)
2
(cid:13)
+ 4L
(cid:13)
(cid:13) ̃xT
i − ̃xT (cid:13)
2
(cid:13)
+ 4L
i=1
n
(cid:88)
Dfi( ̃xT
i , x⋆)
(cid:13)
(cid:13) ̃xT
(cid:13)
i − ̃ˆxT
i
(cid:13)
2
(cid:13)
(cid:13)
i=1
n
(cid:88)
+ 8L2
i=1
i − ̃ˆxT (cid:13)
(cid:13)
2
̃ˆxT
(cid:13)
(cid:13)
(cid:13)
(cid:13)
+ 4L
n
(cid:88)
i=1
n
(cid:88)
i=1
Dfi( ̃xT
i , x⋆)
Dfi( ̃xT
i , x⋆)
≤ 32L3γ2
1
T + 1
n
(cid:88)
T
(cid:88)
i=1
t=0
Dfi(xt
i, x⋆) + 16L2γ2
n
(cid:88)
i=1
(cid:13)
̃hT
i − h⋆
(cid:13)
(cid:13)
i
(cid:13)
2
(cid:13)
(cid:13)
+ 8L2
n
(cid:88)
i=1
i − ̃ˆxT (cid:13)
(cid:13)
2
̃ˆxT
(cid:13)
(cid:13)
(cid:13)
(cid:13)
+ 4L
n
(cid:88)
i=1
Dfi( ̃xT
i , x⋆).
36
Taking the expectation and using (39), (43), (44) and (42), we get, for every T ≥ 0,
E
(cid:104)(cid:13)
(cid:13)∇f ( ̃xT
i )(cid:13)
(cid:13)
2(cid:105)
n
(cid:88)
i=1
≤ 32L3γ2
1
T + 1
+ 16L2γ2
n
(cid:88)
n
(cid:88)
T
(cid:88)
E(cid:2)Dfi(xt
i, x⋆)(cid:3)
t=0
i=1
(cid:20)(cid:13)
̃hT
i − h⋆
(cid:13)
(cid:13)
i
E
(cid:13)
(cid:13)
(cid:13)
2(cid:21)
i=1
2(cid:21)
(cid:20)(cid:13)
i − ̃ˆxT (cid:13)
̃ˆxT
(cid:13)
(cid:13)
(cid:13)
(cid:13)
E
+ 8L2
n
(cid:88)
i=1
+ 4L
n
(cid:88)
i=1
E(cid:2)Dfi( ̃xT
i , x⋆)(cid:3) .
≤
=
32L3γ2
Ψ0
T + 1
2 − γL
(cid:20) 32L3γ2 + 4L
2 − γL
+ 16L2γ
Ψ0
T + 1
+
+ 16L2γ +
8L2γ
p(1 − ν − χ)
(cid:21) Ψ0
T + 1
8L2γ
p(1 − ν − χ)
.
Ψ0
T + 1
+
4L
2 − γL
Ψ0
T + 1
Hence, with γ = Θ (cid:0) p
L
(cid:112) c
n
(cid:1), χ satisfying δ ≤ χ ≤ 1 − ν − δ for some δ > 0, and h0
i = ∇fi(x0),
for every i ∈ [n], then for every ε > 0, we have
E
(cid:104)(cid:13)
(cid:13)∇f ( ̃xT
i )(cid:13)
(cid:13)
2(cid:105)
≤ ε
n
(cid:88)
i=1
after
iterations and
(cid:32)
O
L2
p
(cid:114) n
c
(cid:13)x0 − x⋆(cid:13)
(cid:13)
2
(cid:13)
ε
(cid:33)
(cid:32)
O
L2
(cid:114) n
c
(cid:13)x0 − x⋆(cid:13)
(cid:13)
2
(cid:13)
ε
(cid:33)
(49)
(50)
(51)
communication rounds.
We note that LT does not yield any acceleration: the communication complexity is the same
whatever p. CC is effective, however, since we communicate much less than d floats during every
communication round.
This convergence result applies to Algorithm 2. ̃xT
i
i, including
the ones for clients not participating in the next communication round. The result still applies to
TAMUNA, with, for every i ∈ [n], ̃xT
which are actually computed,
since this is a random subsequence of all xt
i.
i defined as the average of the x(r,l)
in (36) is an average of all xt
i
37
|
|
http://arxiv.org/abs/2302.09831v1 | 2023-02-20T08:37:08 | 2023-02-20T08:37:08 | Escaping limit cycles: Global convergence for constrained
nonconvex-nonconcave minimax problems | This paper introduces a new extragradient-type algorithm for a class of
nonconvex-nonconcave minimax problems. It is well-known that finding a local
solution for general minimax problems is computationally intractable. This
observation has recently motivated the study of structures sufficient for
convergence of first order methods in the more general setting of variational
inequalities when the so-called weak Minty variational inequality (MVI) holds.
This problem class captures non-trivial structures as we demonstrate with
examples, for which a large family of existing algorithms provably converge to
limit cycles. Our results require a less restrictive parameter range in the
weak MVI compared to what is previously known, thus extending the applicability
of our scheme. The proposed algorithm is applicable to constrained and
regularized problems, and involves an adaptive stepsize allowing for
potentially larger stepsizes. Our scheme also converges globally even in
settings where the underlying operator exhibits limit cycles. | [
"Thomas Pethick",
"Puya Latafat",
"Panagiotis Patrinos",
"Olivier Fercoq",
"Volkan Cevher"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09831v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09831v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "math.OC",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"math.OC",
"cs.LG"
] | 3
2
0
2
b
e
F
0
2
]
C
O
.
h
t
a
m
[
1
v
1
3
8
9
0
.
2
0
3
2
:
v
i
X
r
a
Published as a conference paper at ICLR 2022
Escaping limit cycles: Global convergence for con-
strained nonconvex-nonconcave minimax problems
Thomas Pethick ̊ Puya Latafat: Panagiotis Patrinos: Olivier Fercoq; Volkan Cevher ̊
Abstract
This paper
introduces a new extragradient-type algorithm for a class of
nonconvex-nonconcave minimax problems. It is well-known that finding a local
solution for general minimax problems is computationally intractable. This ob-
servation has recently motivated the study of structures sufficient for convergence
of first order methods in the more general setting of variational inequalities when
the so-called weak Minty variational inequality (MVI) holds. This problem class
captures non-trivial structures as we demonstrate with examples, for which a large
family of existing algorithms provably converge to limit cycles. Our results require
a less restrictive parameter range in the weak MVI compared to what is previously
known, thus extending the applicability of our scheme. The proposed algorithm is
applicable to constrained and regularized problems, and involves an adaptive step-
size allowing for potentially larger stepsizes. Our scheme also converges globally
even in settings where the underlying operator exhibits limit cycles.
1
Introduction
Many machine learning applications, from generative adversarial networks (GANs) to robust re-
inforcement learning, result in nonconvex-nonconcave constrained minimax problems, which pose
notorious difficulties to the scalable first order methods. Indeed, there is no shortage of results illus-
trating divergent or cycling behavior when going beyond minimization problems (Benaım & Hirsch,
1999; Hommes & Ochea, 2012; Mertikopoulos et al., 2018b; Hsieh et al., 2021).
Traditionally, minimax problems have been studied for more than half a century under the umbrella
of the variational inequalities (VIs). The extragradient-type algorithms from the VI literature was
recently brought to the awareness of the machine learning community (Mertikopoulos et al., 2018a;
Gidel et al., 2018; Böhm et al., 2020), and have provided a principled way of stabilizing training and
avoiding Poincaré recursions. However, these results mostly concern the convex-concave setting.
In nonconvex-nonconcave minimax problems, or more generally nonmonotone variational inequali-
ties (VIs), even finding a local solution is in general intractable. This has been made precise through
exponential lower bound of the classical optimization type (Hirsch & Vavasis, 1987) and computa-
tional complexity results (Papadimitriou, 1994; Daskalakis et al., 2021b). This is in sharp contrast
to minimization problems, where only finding a global solution is intractable. The recent result of
(Hsieh et al., 2021) provides some intuition behind this difference by showing that the asymptotic
limits of most schemes, including extragradient, can converge to attracting limit cycles.
To make progress in lieu of these negative results, Diakonikolas et al. (2021) proposes a simple
generalization of extragradient, called (EG+), that can converge to a stationary point even for a class
of nonmonotone problems provided that the weak Minty variational inequality (MVI) holds. This
problem class is parametrized by a constant ρ, which controls the degree of nonconvexity. However,
given the range of ρ in Diakonikolas et al. (2021), the new class is still too small to include even the
simplest counterexample of Hsieh et al. (2021) for the general Robbins-Monro schemes.
̊Laboratory for Information and Inference Systems (LIONS), EPFL ([email protected])
:Department of Electrical Engineering (ESAT-STADIUS), KU Leuven
;Laboratoire Traitement et Communication d'Information, Télécom Paris, Institut Polytechnique de Paris
1
Published as a conference paper at ICLR 2022
Figure 1: Forsaken (Hsieh et al., 2021, Example 5.2) provides an example where the weak MVI constant
ρ does not satisfy algorithmic requirements of (EG+) and (EG+) does not converge to a stationary point
but rather the attracting limit cycle (left). In contrast, adaptively choosing the extrapolation stepsize large
enough with our new method, called (CurvatureEG+), is sufficient for avoiding the limit cycles (right).
The repellant limit cycle is indicated in black and the stream plot shows the vectorfield Fz. The blue and
red curves indicate multiple trajectories of the algorithms starting from initializations indicated in black.
See Appendix C.4 for properties of Forsaken.
Contributions Building on the analysis in Diakonikolas et al. (2021), we propose a new adaptive
scheme, called (CurvatureEG+), that converges even in the difficult counter example of Hsieh et al.
(2021) as illustrated in Fig. 1. Our main contributions are summarized below.
1. We propose an adaptive extragradient-type algorithm that converges for a larger range of ρ, the
parameter in the weak MVI assumption (cf. Assumption I(iii)) than previously known.
2. More importantly, we show that convergence is ensured if 2ρ ` γk ą 0, where γk is the extrapola-
tion stepsize. This is crucial since by selecting γk through a backtracking procedure larger stepsizes
are allowed, which in turn implies convergence for more negative values of ρ, thus capturing a larger
class of problems. In addition, we show that the linesearch eventually passes without triggering any
backtrack if initialized based on the Jacobian of F (cf. Section 4).
3. We present a non-adaptive variant of our algorithm (CEG+), and show that for particular pa-
rameter choices (EG+) of Diakonikolas et al. (2021), and when ρ " 0 the celebrated forward-
backward-forward (FBF) algorithm of Tseng (2000) are recovered, thus unifying and generalizing
both methods. We improve upon Diakonikolas et al. (2021) by not only relaxing the problem class
but also the stepsize range. We show that our results are tight by providing a matching lower bound,
thus providing a complete picture of (EG+) under weak MVI.
Related work The community has resorted to various approaches to make progress for
nonconvex-nonconcave minimax problems. One line of work focuses on deriving local convergence
results (Mazumdar et al., 2019; Fiez & Ratliff, 2020; Heusel et al., 2017). For global results, the
two primary approaches have been to either assume a global oracle for the inner problem (Jin et al.,
2019; Davis & Drusvyatskiy, 2018) or assume particular problem structure such as the Polyak-
Łojasiewicz condition (Nouiehed et al., 2019; Yang et al., 2020) or concavity for the inner problem
(Rafique et al., 2019).
We follow the same tradition of assuming structure, but from the general perspective of operator
theory. The idea of studying minimax and related problems through the lens of variational inequality
has a long history (Minty, 1962; Rockafellar, 1976; Polyak, 1987; Bertsekas, 1997), with recent
renewed interest due to its relevance for minimax formulations (Mertikopoulos et al., 2018a; Gidel
et al., 2018; Azizian et al., 2020).
One relaxation of the monotone case for which we have positive results is that of Minty varia-
tional inequalities (MVI) (Mertikopoulos et al., 2018a; Song et al., 2021; Zhou et al., 2017; Liu
et al., 2021), which includes all quasiconvex-concave and starconvex-concave problems. Diakoniko-
las et al. (2021) introduced the relaxed condition of weak MVI. In the unconstrained setting they
showed non-asymptotic convergence results under a restricted problem constant ρ. Similarly to us,
Lee & Kim (2021a) extends the regime but under the stronger condition of cohypomonotonicity.
2
Published as a conference paper at ICLR 2022
They do so by studying a more evolved variant of extragradient building on anchoring techniques.
We instead directly improve upon (EG+) and generalize it to new settings.
In the stochastic setting, usually the stepsize for the extrapolation step is diminishing. This is the
case in Böhm et al. (2020) where they consider a forward-backward-forward type scheme. However,
they remain in the monotone setting, where the limit cycles are non-attracting, as exemplified by a
bilinear game. Hsieh et al. (2021) recently showed that a large family of algorithms, which includes
the extragradient method with diminishing stepsize, can converge to attracting limit cycles. Going
beyond this restriction, prior to Diakonikolas et al. (2021), Hsieh et al. (2020) interestingly considers
two separate and diminishing stepsizes under the stronger assumption of MVI.
2 Problem formulation and preliminaries
In this paper we are interested in finding zeros of an operator (or set-valued mapping) T : (cid:146)n Ñ (cid:146)n
that is written as the sum of a Lipschitz continuous (but possibly nonmonotone) operator F and a
maximally monotone operator A. That is, we wish to find z P (cid:146)n such that the general inclusion
0 P T z (cid:66) Az ` Fz
(2.1)
holds. The set of all such points is denoted by zer T (cid:66) tz P Rn | 0 P T zu. Throughout the paper
problem (2.1) is studied under the following assumptions (definitions can be found in Appendix A).
Assumption I. In problem (2.1),
(i) Operator A : (cid:146)n Ñ (cid:146)n is a maximally monotone operator.
(ii) Operator F : (cid:146)n Ñ (cid:146)n is L-Lipschitz continuous.
(iii) Weak Minty variational inequality (MVI) holds, i.e., there exists a nonempty set S‹ Ď zer T
2L , 8q
such that for all z‹ P S‹ and some ρ P p ́ 1
xv, z ́ z‹y ě ρ}v}2,
for all pz, vq P gph T .
(2.2)
Generally, we do not require the weak Minty assumption to hold at every z‹ P zer T . In fact, as
shown in Theorem 3.1 nonemptiness of S‹ is sufficient for ensuring that the limit points belong to
zer T . Interestingly, despite nonmonotonicity of F, global (as opposed to subsequential) convergence
can be established when S‹ " zer T , an assumption that is still weaker than cohypomonotonicity.
VIs provide a convenient abstraction for a range of problems. We mention some central examples
below but otherwise defer to the overview in Facchinei & Pang (2007). Subsequently, we provide
examples where the weak MVI holds.
Example 1: (minimax optimization). A comprehensive way to capture a wide range of applications
in machine learning is to consider structured minimax problems of the form
Lpx, yq (cid:66) φpx, yq ` gpxq ́ hpyq,
maximize
yP(cid:146)ny
minimize
xP(cid:146)nx
(2.3)
where φ is not necessarily convex in x or concave in y. Functions g and h are proper extended
real-valued lower semicontinuous and convex, with easy to compute proximal maps. Common ex-
amples for g and h involve regularizers such as (cid:96)1, (cid:96)2 norms, or indicator functions of sets al-
lowing us to capture constrained minimax problems. The first order optimality condition asso-
ciated with this problem may be written in the form of the structured inclusion (2.1) by letting
Fz " p∇xφpx, yq, ́∇yφpx, yqq, Az " pBgpxq, Bhpyqq.
As it will become clear in the next section (cf. Algorithm 1), the main computations involved in the
proposed scheme are evaluations of F and resolvent JA " pid ` Aq ́1. Recall that the resolvent of a
maximally monotone operator is firmly nonexpansive with full domain (cf. (Bauschke & Combettes,
2017, Sect. 23)). If A " B f is the subdifferential operator of a convex function f , then its resolvent
is the proximal mapping. For instance when A is as in Example 1, then its resolvent is given by
JApx, yq " pproxgpxq, proxhpyqq.
Example 2: (N-player games). More generally, we can consider a continuous game of N players in
normal form. Denote the decision variables z :" pzi; z ́iq :" pz1, ..., zNq and let the loss incurred by
3
Published as a conference paper at ICLR 2022
the ith player be Lipzi; z ́iq " φipzq ` gipziq where φi is the payoff function and gi typically enforce
constraints on zi. Then we seek a Nash equilibrium, which is any decision which is unilaterally
stable, i.e.,
Lipz‹
i ; z‹
́iq ď Lipzi; z‹
́iq @zi and i P rNs (cid:66) t1, . . . , Nu.
(2.4)
The corresponding first order optimality conditions may be written as Az " pBg1pz1q, . . . , BgNpzNqq
and Fz " p∇z1 φ1pzq, . . . , ∇zN φNpzqq.
A solution to (2.1) thus returns a candidate for which the first order condition of the above problems
is satisfied. In the monotone case these two solution concepts coincide, while in the more general
case of weak MVI, we provide examples where this still holds. In particular, we introduce in Sec-
tion 5 a nonconvex-nonconcave minimax game which additionally exhibits limit cycles for Fz. As
a consequence most schemes including gradient descent ascent, extragradient and optimistic gradi-
ent descent ascent do not converge to a stationary point globally (Hsieh et al., 2021). However, the
global Nash equilibrium satisfies Assumption I(iii) with ρ ą ́1{2L, which we show is sufficient for
global convergence of (CEG+).
The weak MVI condition is satisfied in certain reinforcement learning settings. Specifically, Di-
akonikolas et al. (2021); Daskalakis et al. (2021a) considers a two-player zero-sum game where the
weak MVI holds, while neither MVI nor cohypomonotonicity holds. Interestingly, the formulation
requires constraint-a condition they do not handle. We thus provide the first provable algorithm for
this setting. Weak MVI also contains all quasiconvex-concave and starconvex-concave problems.
For further examples, the literature on cohypomonotonicity (Bauschke et al., 2020) is relevant since
it implies weak MVI, see for instance Lee & Kim (2021b, Example 1).
3 Generalizing Extragradient+
Our starting point is the Extragradient+ (EG+) algorithm of Diakonikolas et al. (2021) which is
identical to extragradient (Korpelevich, 1976) except for the second stepsize being smaller. They
only treat the inclusion (2.1) when A " 0, and in our notation require ρ P p ́1{8L, 0s. Specifically,
̄zk " zk ́ γkFzk,
where they choose γk " 1{L and ̄αk " 1{2 (Diakonikolas et al., 2021, Thm. 3.2).
We generalize (EG+) in Algorithm 1 to take the operator A into account-consequently we capture
constraint and regularized problems as well. In addition, the scheme is adaptive in ̄αk. We will show
that the weaker requirement of ρ P p ́1{2L, 8q suffices even for the more general inclusion (2.1).
zk`1 " zk ́ ̄αkγkF ̄zk
(EG+)
The main convergence results of Algorithm 1 are established in the next theorem. The proof is
largely inspired by recent developments in operator splitting techniques in the framework of mono-
tone inclusions (Latafat & Patrinos, 2017; Giselsson, 2021). The key idea lies in interpreting each
iteration of the algorithm as a projection onto a certain hyperplane, an interpretation that dates back
to Solodov & Tseng (1996); Solodov & Svaiter (1999).
`
‰
Theorem 3.1. Suppose that Assumption I holds, and let λk P p0, 2q, γk P
where
txu` (cid:66) maxt0, xu, δk P p ́γk{2, ρs, lim infkÑ8 λkp2 ́ λkq ą 0, and lim infkÑ8pδk ` γk{2q ą 0.
Consider the sequences pzkqkP(cid:142), p ̄zkqkP(cid:142) generated by Algorithm 1. Then for all z‹ P S‹,
t ́2ρu`, 1{L
min
k"0,1,...,m
1
γ2
k
}H ̄zk ́ Hzk}2 ď 1
κpm`1q }z0 ́ z‹}2,
(3.1)
where κ " lim infkÑ8 λkp2 ́ λkqpδk ` γk{2q2. Moreover, the following holds
(i) p ̄zkqkP(cid:142) is bounded and its limit points belong to zer T ;
(ii) if in addition lim supkÑ8 γk ă 1{L and S‹ " zer T , then pzkqkP(cid:142), p ̄zkqkP(cid:142) both converge to
some z‹ P zer T .
Note that whenever lim supkÑ8 γk ă 1
L , Lemma A.3(ii) may be used to derive a similar inequality
in terms of } ̄zk ́ zk} by lower bounding }H ̄zk ́ Hzk} in (3.1). We also remark that tighter rates may
be obtained in the regime ρ ě 0, however, this will not be pursued in this work.
4
Published as a conference paper at ICLR 2022
Algorithm 1 (AdaptiveEG+) Deterministic algorithm for problem (2.1)
Initialize z0 " zinit P (cid:146)n, λk P p0, 2q, γk P
Repeat for k " 0, 1, . . . until convergence
̆
zk ́ γkFzk
1.1: Let ̄zk "
id ` γkA
1.2: Compute stepsize
, δk P p ́γk{2, ρs,
t ́2ρu`, 1{L
́1
̆
`
`
`
‰
αk " δk
γk
`
x ̄zk ́ zk, H ̄zk ́ Hzky
}H ̄zk ́ Hzk}2
,
where H " id ́ γkF.
1.3: Update the vector zk`1 " zk ` λkαkpH ̄zk ́ Hzkq
Return zk`1
3.1 Non-adaptive stepsize variant
Although we do not incur additional costs for evaluating the adaptive stepsize αk in step 1.2, it
proves instructive to present a variant with constant stepsize. As a result we compare the range of our
stepsizes against Diakonikolas et al. (2021) showing an improvement by a factor of 3{2. Moreover, in
the monotone case (ρ " 0), with a certain choice of stepsizes the algorithm reduces to the celebrated
forward-backward-forward (FBF) algorithm of Tseng (2000). We remark that the relation of FBF to
projection-type algorithms was noted in Tseng (2000), (Giselsson, 2021, Sect. 6.2.1).
`
To this end, in this subsection consider the following non-adaptive variant of Algorithm 1 that gen-
eralizes (EG+). Letting ̄αk P p0, 1 ` 2δk{γkq:
̄zk "
(CEG+)
The convergence of this algorithm is an immediate byproduct of Theorem 3.1. To see this, note
that the zk`1 update in step 1.3 may be written as zk`1 " zk ` 2ηkαkpH ̄zk ́ Hzkq, for ηk P p0, 1q.
Therefore, convergence is still ensured for any ̄αk ă 2αk as the difference may be absorbed by the
relaxation parameter ηk. Note that by 1{2-cocoercivity of H (cf. Lemma A.3(i))
zk`1 " zk ` ̄αkpH ̄zk ́ Hzkq.
zk ́ γkFzk
id ` γkA
́1
̆
`
̆
,
̄αk ă 2δk
γk
` 1 ď 2δk
γk
`
2xH ̄zk ́ Hzk, ̄zk ́ zky
}H ̄zk ́ Hzk}2
" 2αk,
(3.2)
establishing the validity of the prescribed stepsize range. The convergence of the non-adaptive vari-
ant is summarized in the next corollary that for simplicity is stated with constant parameters (drop-
ping subscripts k).
`
‰
Corollary 3.2 (Constant stepsize). Suppose that Assumption I holds, and let γ P
,
t ́2ρu`, 1{L
δ P p ́γ{2, ρs, and ̄α P p0, 1 ` 2δ{γq. Consider the sequences pzkqkP(cid:142), p ̄zkqkP(cid:142) generated according to
the update rule (CEG+). Then,
min
k"0,1,...,m
}H ̄zk ́ Hzk}2 ď
}z0 ́ z‹}2
κpm ` 1q
,
(3.3)
where κ " ̄αp1 ` 2δ
γ ́ ̄αq. Moreover, the claims of Theorems 3.1(i) and 3.1(ii) hold true.
The setting of Diakonikolas et al. (2021) in (EG+) involves the stepsizes γk " 1{L, αk " 1{2. Note
that when restricting to A " 0, the iterates (CEG+) simplify to this form owing to the fact that
H ̄zk ́ Hzk " ̄zk ́ γF ̄zk ́ Hzk " ́γF ̄zk. In comparison, in our setting if δ " ρ " ́1{8L (the smallest
ρ permitted in Diakonikolas et al. (2021)) is selected, then based on our analysis in Corollary 3.2 we
may select γk " 1{L, and ̄αk P p0, 3{4q, thus the upper bound for the second stepsize is 3{2 times that
of Diakonikolas et al. (2021).
`
̆
t ́2ρu`, 1{L
Remark 3.3 (relation to FBF). In Corollary 3.2 the range of stepsizes γ, ̄α may alternatively be set
, ̄α P p0, 1`2δ{γs. This is due to the fact that if γ ă 1{L (strictly), then H is strictly
as γ P
1{2-cocoercive. Therefore, in (3.2), 1` 2δ
γ is permitted.
Although this may appear to be of little practical significance, by setting γ P p0, 1{Lq, δ " ρ " 0,
and ̄α " 1 in (CEG+), we obtain zk`1 " ̄zk ` γFzk ́ γF ̄zk, which is the forward-backward-forward
(FBF) algorithm of Tseng (2000), (Bauschke & Combettes, 2017, Thm. 26.17)).
γ ă 2αk holds, and thus the stepsize ̄α " 1` 2δ
5
Published as a conference paper at ICLR 2022
Figure 2: The grey region indicates where convergence provably cannot be guaranteed by Theorem 3.4.
The dashed line indicates where ρ " ́1{8L. This is the condition under which (Diakonikolas et al., 2021,
Thm. 3.2) shows the first convergence result p ̨q. Corollary 3.2 improves their result by matching the lower
bound for any ̄α, in particular for ̄α " 3{4 p
q. The adaptive scheme in Theorem 3.1 matches the smallest
possible ρ for any (EG+) scheme with fixed stepsize p(cid:4)q.
(cid:32)
3.2 Lower bounds
We show that the result in Corollary 3.2 is tight by providing a matching lower bound when A " 0.
We do so by fixing ̄αk and showing a stepsize dependent lower bound. In particular, note that if
̄αk " 1{2 as in Diakonikolas et al. (2021, Thm. 3.2), then Theorem 3.4 implies a lower bound of
ρ ą ́1{4L for the (EG+) scheme. The lower bound is contextualized in Fig. 2 by relating it to our
convergence results and existing results in the literature.
Theorem 3.4. Consider a sequence pzkqkPN generated according to (EG+) fixing γk " γ " 1{L
and ̄αk " ̄α P p0, 1q. Let ́ρL ě 1 ́ ̄α
2 . Then, there exists an F : (cid:146)n Ñ (cid:146)n, n ą 1, satisfying
Assumption I(ii) and Assumption I(iii) for which the sequence will not converge.
4 Adaptively taking larger stepsizes using local curvature
As made apparent in the analysis in Section 3 (cf. Appendix B.1) the bound on the smallest weak
MVI constant ρ in Assumption I(iii) may be replaced with the requirement that ρ ą ́γk{2 for all
k P (cid:142). Therefore, larger stepsizes γk would guarantee global convergence for an even larger class
of problems. Since a global Lipschitz constant is inherently pessimistic the natural question then
becomes how to locally choose a maximal stepsize without diverging.
The proposed scheme involves a backtracking linesearch that uses the local curvature for its initial
guess. The reason being that this will immediately pass, close enough to the solution z‹, by argu-
ment of continuity. More precisely, we will set the initial guess to something slightly smaller than
}JFpzkq} ́1, where JFpzq denotes the Jacobian of F at z and } ̈ } is the spectral norm. Note that, de-
spite the use of second order information, the scheme remains efficient since }JFpzq} only requires
one eigenvalue computation performed through Jacobian-vector product (Pearlmutter, 1994).
Given an initial point z0 " zinit and ν P p0, 1q, the final scheme which we denote (CurvatureEG+)
proceeds for k " 0, 1, . . . as follows:
1. Obtain γk and ̄zk according to Algorithm 2 with γinit " ν}JFpzkq} ́1
2. Compute zk`1 according to steps 1.2 and 1.3 of Algorithm 1
(CurvatureEG+)
The above intuitive reasoning is made precise in the next lemma where it is shown that backtracking
linesearch will terminate in finite time and that γinit will be immediately accepted asymptotically.
Algorithm 2 Lipschitz constant backtracking
Initialize zk P (cid:146)n, τ P p0, 1q, ν P p0, 1q
2.1:
Set initial guess γ " γinit, and let Gγpzkq (cid:66)
while γ}FpGγpzkqq ́ Fzk} ą ν}Gγpzkq ́ zk} do γ Ð τγ
`
̆
id ` γA
`
́1
zk ́ γFzk
̆
Return γk " γ and ̄zk " Gγpzkq
6
Published as a conference paper at ICLR 2022
Lemma 4.1 (Lipschitz constant backtracking). Suppose that F : (cid:146)n Ñ (cid:146)n is a L-Lipschitz contin-
uous operator. Consider the linesearch procedure in Algorithm 2. Then,
(i) The linesearch terminates in finite time with γ ě mintγinit, ντ{Lu;
(ii) Suppose that pzkqkP(cid:142) converges to z‹ P zer T . If F is continuously differentiable, and γinit P
p0, ν}JFpzkq} ́1q with ν P p0, 1q, then eventually the backtrack will never be invoked (γinit
would be accepted).
The convergence results for (CurvatureEG+) are deduced based of the above lemma and The-
orem 3.1 and are provided in Corollary B.1 in Appendix B.2. We illustrate the behavior of
(CurvatureEG+) in Fig. 1 and in Section 6.
5 Constructing toy examples
When Assumption I(iii) holds for negative ρ, limit cycles of the underlying operator Fz can emerge.
We illustrate this with simple polynomial examples for which all the properties of interest can be
computed in closed form.
Definition 1 (PolarGame). A PolarGame denotes a two-player game whose associated operator F
has limit cycles at }z}2 " ci for all i P rks where ci ‰ 0.
This turns out to be particularly easy to construct in polar coordinates as the name suggests (see
Appendix C.1). Apart from introducing arbitrary number of limit cycles it also gives us control over
ρ. This is illustrated in the following instantiations capturing three important cases.
Example 3: (PolarGame). Consider Fz " pψpx, yq ́ y, ψpy, xq ` xq where }z}8 ď 11{10 and
ψpx, yq " 1
16 axp ́1 ` x2 ` y2qp ́9 ` 16x2 ` 16y2q. We have the following three cases:
4 then ρ P p ́ 1
where L denotes the Lipschitz constant of F restricted to the constraint set. For all cases F exhibits
limit cycles at }z} " 1 and }z} " 3{4. Proof is deferred to Appendix C.2.
(i) a " 1 then ρ P p ́ 1
3 then ρ P p ́ 1
3L q (iii) a " 1
2L q (ii) a " 3
8L , ́ 1
2L , ́ 1
L , ́ 1
10L q
Example 4: (minimax).
following polynomial game:
In the particular case of constrained minimax problem we introduce the
minimize
|x|ď4{3
maximize
|y|ď4{3
φpx, yq :" xy ` ψpxq ́ ψpyq,
(GlobalForsaken)
where ψpzq " 2z6
21 ́ z4
3 ` z2
3 . We provide proof of the following properties in Appendix C.3:
(i) There exists a repellant limit cycle and an attracting limit cycle of F.
(ii) z‹ " p0, 0q is a global Nash equilibrium for which Assumption I(iii) holds inside the constraint
with ρ ą ́1{2L, where L denotes the Lipschitz constant of F restricted to the constraint set.
6 Experiments
The algorithms considered in the experiments include the adaptive Algorithm 1, (CurvatureEG+),
and constant stepsize methods that can be seen as instances of (CEG+) for various choices of γk
and ̄αk. When γk " 1{L and ̄αk " 1 we recover a constrained variant of extragradient, which we
denote CEG. When ̄αk " 1{2 we denote the scheme CEG+, which is the direct generalization to the
constraint setting of the (EG+) scheme studied in Diakonikolas et al. (2021, Thm. 3.2). Note that this
choice of ̄αk restricts the problem class for which we otherwise can have guaranteed convergence
according to Corollary 3.2. When ̄αk is chosen adaptively according to Algorithm 1 we refer to it as
AdaptiveEG+. Finally, when γk is additionally chosen adaptively we use the name (CurvatureEG+).
In the stochastic setting, when γk " 1{k and αk " 1, effectively both stepsizes diminish, and we
recover a constrained variant of the popular stochastic extragradient scheme (see e.g. Hsieh et al.
7
Published as a conference paper at ICLR 2022
(a) Example 3 (a " 1)
(b) Example 5 (ρ " ́1{3L)
Figure 3: Deterministic setting. In (a) we have an instance of Example 3 with ρ ă ́1{2L for which
Theorem 3.4 provides lower bound for extrapolation stepsize γk " 1{L. However, adaptively choosing
γk larger can converge as illustrated with (CurvatureEG+). In addition, (b) confirms with Example 5,
that (CEG+) for ̄αk " 1{2 and CEG may indeed not converge even when ρ " ́1{3L. In contrast, both
AdaptiveEG+ and (CurvatureEG+) converges to the stationary point. Note that picking ̄αk ă 1{3 would
lead to convergence of (CEG+) by Corollary 3.2. See Fig. 6 and Fig. 7 for supplementary experiments.
(a) Example 4
(b) Example 5 (ρ " ́1{3L)
Figure 4: Stochastic setting. In (a) we test the stochastic algorithms on our nonconvex-nonconcave con-
strained minimax example. The cycling behavior of SEG is inline with Hsieh et al. (2021), who shows that
the sequence generated by SEG can converge to limit cycles of the underlying operator F. On the other
hand, we observe that SEG+ escapes the attracting limit cycle. In (b) we also provide a more challenging
example motivated by our lower bound.
(2021, Algorithm 3)), which we refer to as SEG. We also consider a heuristic variant where γk " 1{L
and only αk is decreasing, which we refer to as SEG+.
We test the algorithms on the constructed examples and confirm their convergence guarantees.
Specifically, we apply the algorithms to the minimax problem in Example 4, the PolarGames in
Example 3, and a worst case construction, Example 5, from the proof of the lower bound (cf. Ap-
pendix B.3). For Example 5 we choose the problem parameters such that ρ " ́1{3L according to
(B.13), and additionally add an (cid:96)8-ball constraint to keep the iterates bounded. To simulate the
stochastic setting we add Gaussian noise to calls of F. Results for the deterministic setting and
stochastic setting can be found in Fig. 3 and Fig. 4 respectively.
7 Conclusion
This paper introduced an EG-type algorithm for a class of nonconvex-nonconcave minimax prob-
lems that satisfy the weak Minty variational inequality (MVI). The range of parameter in the weak
8
Published as a conference paper at ICLR 2022
MVI was extended compared to EG+ of Diakonikolas et al. (2021), and tightness of our results were
demonstrated through construction of a counter example. In addition, EG+ (Diakonikolas et al.,
2021), as well as the forward-backward-forward algorithm (Tseng, 2000) were all shown to be spe-
cial cases of our scheme. Furthermore, (CurvatureEG+) was proposed that performs a backtracking
linesearch on the extrapolation stepsize γk allowing for larger stepsizes and relaxes the condition
ρ ą 1
2L to ρ ą ́γk{2 which is often a much weaker condition. More importantly, it is shown that
asymptotically the linesearch always passes with γk " ν}JFpzkq} ́1 for any ν P p0, 1q, thus rat-
ifying the name (CurvatureEG+). Future direction include exploring applications of the proposed
algorithm in particular in the setting of GANs. It is also interesting to develope a variance reduced
variant of the algorithm for finite sum minimax problems.
8 Acknowledgments and disclosure of funding
We would like to especially thank Yu-Guan Hsieh for providing valuable feedback and discussion.
This project has received funding from the European Research Council (ERC) under the European
Union's Horizon 2020 research and innovation programme (grant agreement n° 725594 - time-data).
This work was supported by the Swiss National Science Foundation (SNSF) under grant number
200021_205011. The work of the second and third author was supported by the Research Founda-
tion Flanders (FWO) postdoctoral grant 12Y7622N and research projects G081222N, G0A0920N,
G086518N, and G086318N; Research Council KU Leuven C1 project No. C14/18/068; Fonds de
la Recherche Scientifique – FNRS and the Fonds Wetenschappelijk Onderzoek – Vlaanderen un-
der EOS project no 30468160 (SeLMA); European Union's Horizon 2020 research and innovation
programme under the Marie Skłodowska-Curie grant agreement No. 953348. The work of Olivier
Fercoq was supported by the Agence National de la Recherche grant ANR-20-CE40-0027, Optimal
Primal-Dual Algorithms (APDO).
References
Waïss Azizian, Ioannis Mitliagkas, Simon Lacoste-Julien, and Gauthier Gidel. A tight and unified
analysis of gradient-based methods for a whole spectrum of differentiable games. In International
Conference on Artificial Intelligence and Statistics, pp. 2863–2873. PMLR, 2020.
Heinz H. Bauschke and Patrick L. Combettes. Convex analysis and monotone operator theory in
Hilbert spaces. CMS Books in Mathematics. Springer, 2017. ISBN 978-3-319-48310-8.
Heinz H Bauschke, Walaa M Moursi, and Xianfu Wang. Generalized monotone operators and their
averaged resolvents. Mathematical Programming, pp. 1–20, 2020.
Michel Benaım and Morris W Hirsch. Mixed equilibria and dynamical systems arising from ficti-
tious play in perturbed games. Games and Economic Behavior, 29(1-2):36–72, 1999.
Dimitri P Bertsekas. Nonlinear programming. Journal of the Operational Research Society, 48(3):
334–334, 1997.
Axel Böhm, Michael Sedlmayer, Ernö Robert Csetnek, and Radu Ioan Bo ̧t. Two steps at a time–
taking gan training in stride with tseng's method. arXiv preprint arXiv:2006.09033, 2020.
Constantinos Daskalakis, Dylan J Foster, and Noah Golowich. Independent policy gradient methods
for competitive reinforcement learning. arXiv preprint arXiv:2101.04233, 2021a.
Constantinos Daskalakis, Stratis Skoulakis, and Manolis Zampetakis. The complexity of constrained
min-max optimization. In Proceedings of the 53rd Annual ACM SIGACT Symposium on Theory
of Computing, pp. 1466–1478, 2021b.
Damek Davis and Dmitriy Drusvyatskiy. Stochastic subgradient method converges at the rate $O(kˆ{-
1/4})$ on weakly convex functions. arXiv:1802.02988 [cs, math], February 2018.
Jelena Diakonikolas, Constantinos Daskalakis, and Michael Jordan. Efficient methods for struc-
In International Conference on Artificial
tured nonconvex-nonconcave min-max optimization.
Intelligence and Statistics, pp. 2746–2754. PMLR, 2021.
9
Published as a conference paper at ICLR 2022
Francisco Facchinei and Jong-Shi Pang. Finite-dimensional variational inequalities and comple-
mentarity problems. Springer Science & Business Media, 2007.
Tanner Fiez and Lillian Ratliff. Gradient descent-ascent provably converges to strict local minmax
equilibria with a finite timescale separation. arXiv preprint arXiv:2009.14820, 2020.
Gauthier Gidel, Hugo Berard, Gaëtan Vignoud, Pascal Vincent, and Simon Lacoste-Julien.
arXiv preprint
inequality perspective on generative adversarial networks.
A variational
arXiv:1802.10551, 2018.
Pontus Giselsson. Nonlinear forward-backward splitting with projection correction. SIAM Journal
on Optimization, 31(3):2199–2226, 2021. doi: 10.1137/20M1345062.
Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter.
Gans trained by a two time-scale update rule converge to a local nash equilibrium. Advances
in neural information processing systems, 30, 2017.
M Hirsch and S Vavasis. Exponential lower bounds for finding Brouwer fixed points. In Proceedings
of the 28th Symposium on Foundations of Computer Science, pp. 401–410, 1987.
Cars H Hommes and Marius I Ochea. Multiple equilibria and limit cycles in evolutionary games
with logit dynamics. Games and Economic Behavior, 74(1):434–441, 2012.
Ya-Ping Hsieh, Panayotis Mertikopoulos, and Volkan Cevher. The limits of min-max optimization
algorithms: Convergence to spurious non-critical sets. In International Conference on Machine
Learning, pp. 4337–4348. PMLR, 2021.
Yu-Guan Hsieh, Franck Iutzeler, Jérôme Malick, and Panayotis Mertikopoulos. Explore aggres-
sively, update conservatively: Stochastic extragradient methods with variable stepsize scaling.
arXiv preprint arXiv:2003.10162, 2020.
Chi Jin, Praneeth Netrapalli, and Michael I. Jordan. What is local optimality in nonconvex-
nonconcave minimax optimization? arXiv:1902.00618 [cs, math, stat], June 2019.
Galina M Korpelevich. The extragradient method for finding saddle points and other problems.
Matecon, 12:747–756, 1976.
Puya Latafat and Panagiotis Patrinos. Asymmetric forward–backward–adjoint splitting for solving
monotone inclusions involving three operators. Computational Optimization and Applications,
68(1):57–93, Sep 2017.
Sucheol Lee and Donghwan Kim. Fast extra gradient methods for smooth structured nonconvex-
nonconcave minimax problems. arXiv preprint arXiv:2106.02326, 2021a.
Sucheol Lee and Donghwan Kim.
Semi-anchored multi-step gradient descent ascent
method for structured nonconvex-nonconcave composite minimax problems. arXiv preprint
arXiv:2105.15042, 2021b.
Mingrui Liu, Hassan Rafique, Qihang Lin, and Tianbao Yang. First-order convergence theory for
weakly-convex-weakly-concave min-max problems. Journal of Machine Learning Research, 22
(169):1–34, 2021.
Eric V. Mazumdar, Michael I. Jordan, and S. Shankar Sastry. On finding local Nash equilibria (and
only local Nash equilibria) in zero-sum games. arXiv:1901.00838 [cs, math, stat], January 2019.
Panayotis Mertikopoulos, Bruno Lecouat, Houssam Zenati, Chuan-Sheng Foo, Vijay Chan-
drasekhar, and Georgios Piliouras. Optimistic mirror descent in saddle-point problems: Going
the extra (gradient) mile. arXiv preprint arXiv:1807.02629, 2018a.
Panayotis Mertikopoulos, Christos Papadimitriou, and Georgios Piliouras. Cycles in adversarial
In Proceedings of the Twenty-Ninth Annual ACM-SIAM Symposium on
regularized learning.
Discrete Algorithms, pp. 2703–2717. SIAM, 2018b.
George J Minty. Monotone (nonlinear) operators in hilbert space. Duke Mathematical Journal, 29
(3):341–346, 1962.
10
Published as a conference paper at ICLR 2022
Maher Nouiehed, Maziar Sanjabi, Tianjian Huang, Jason D Lee, and Meisam Razaviyayn. Solv-
ing a class of non-convex min-max games using iterative first order methods. arXiv preprint
arXiv:1902.08297, 2019.
Christos H Papadimitriou. On the complexity of the parity argument and other inefficient proofs of
existence. Journal of Computer and system Sciences, 48(3):498–532, 1994.
Barak A Pearlmutter. Fast exact multiplication by the hessian. Neural computation, 6(1):147–160,
1994.
Boris T Polyak. Introduction to optimization. Optimization Software New York, 1987.
Hassan Rafique, Mingrui Liu, Qihang Lin, and Tianbao Yang. Non-convex min-max optimization:
Provable algorithms and applications in machine learning. arXiv:1810.02060 [cs, math], January
2019.
R. T. Rockafellar and R. J.-B. Wets. Variational analysis, volume 317. Springer Science & Business
Media, 2009.
R Tyrrell Rockafellar. Monotone operators and the proximal point algorithm. SIAM journal on
control and optimization, 14(5):877–898, 1976.
Ralph Tyrell Rockafellar. Convex analysis. Princeton University Press, 1970.
M. V. Solodov and P. Tseng. Modified projection-type methods for monotone variational inequali-
ties. SIAM Journal on Control and Optimization, 34(5):1814–1830, 1996.
Mikhail V Solodov and Benar F Svaiter. A hybrid projection-proximal point algorithm. Journal of
convex analysis, 6(1):59–70, 1999.
Chaobing Song, Zhengyuan Zhou, Yichao Zhou, Yong Jiang, and Yi Ma. Optimistic dual extrap-
olation for coherent non-monotone variational inequalities. arXiv preprint arXiv:2103.04410,
2021.
Gerald Teschl. Ordinary differential equations and dynamical systems, volume 140. American
Mathematical Soc., 2012.
P. Tseng. A modified forward-backward splitting method for maximal monotone mappings. SIAM
Journal on Control and Optimization, 38(2):431–446, 2000.
Junchi Yang, Negar Kiyavash, and Niao He. Global convergence and variance-reduced optimization
for a class of nonconvex-nonconcave minimax problems. arXiv preprint arXiv:2002.09621, 2020.
Zhengyuan Zhou, Panayotis Mertikopoulos, Nicholas Bambos, Stephen Boyd, and Peter W Glynn.
In I. Guyon, U. V.
Stochastic mirror descent in variationally coherent optimization problems.
Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (eds.), Advances in
Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017.
11
Published as a conference paper at ICLR 2022
A Preliminary definitions
Notationally we will use txu` (cid:66) maxt0, xu throughout. We additionally recall some standard defini-
tions and results and refer to Bauschke & Combettes (2017); Rockafellar (1970)) for further details.
An operator or set-valued mapping A : (cid:146)n Ñ (cid:146)d maps each point x P (cid:146)n to a subset Ax of (cid:146)d. We
will use the notation Apxq and Ax interchangably. We denote the domain of A by
dom A (cid:66) tx P (cid:146)n | Ax ‰ Hu,
its graph by
gph A (cid:66) tpx, yq P (cid:146)n ˆ (cid:146)d | y P Axu,
and the set of its zeros by zer A (cid:66) tx P (cid:146)n | 0 P Axu. The inverse of A is defined through its graph:
gph A ́1 (cid:66) tpy, xq | px, yq P gph Au. The resolvent of A is defined by JA (cid:66) pid ` Aq ́1, where id
denotes the identity operator.
Definition A.1 ((co)monotonicity Bauschke et al. (2020)). An Operator A : (cid:146)n Ñ (cid:146)n is said to be
ρ-monotone for some ρ P (cid:146), if for all px, yq, px1, y1q P gph A
ρ}x ́ x1}2 ď xx ́ x1, y ́ y1y,
and it is said to be ρ-comonotone if for all px, yq, px1, y1q P gph A
ρ}y ́ y1}2 ď xx ́ x1, y ́ y1y.
The operator A is said to be maximally (co)monotone if its graph is not strictly contained in the
graph of another (co)monotone operator.
We say that A is monotone if it is 0-monotone. When ρ ă 0, ρ-comonotonicity is also referred to as
|ρ|-cohypomonotonicity.
Definition A.2 (Lipschitz continuity and cocoercivity). Let D Ď (cid:146)n be a nonempty subset of (cid:146)n. A
single-valued operator A : D Ñ (cid:146)n is said to be L-Lipschitz continuous if for any x, x1 P D
and β-cocoercive if
}Ax ́ Ax1} ď L}x ́ x1},
β}Ax ́ Ax1}2 ď xx ́ x1, Ax ́ Ax1y.
Moreover, A is said to be nonexpansive if it is 1-Lipschitz continuous, and firmly nonexpansive if it
is 1-cocoercive.
The resolvent operator JA is firmly nonexpansive (with dom JA " (cid:146)n) if and only if A is (maximally)
monotone.
The following lemma plays an important role in our convergence analysis.
Lemma A.3. Let A : (cid:146)n Ñ (cid:146)n denote a single valued operator. Then,
(i) A is 1-Lipschitz if and only if T " id ́ A is 1{2-cocoercive.
(ii) If A is L-Lipschitz, then T " id ́ ηA, η P p0, 1{Lq, is p1 ́ ηLq-monotone, and in particular
}T u ́ T v} ě p1 ́ ηLq}u ́ v} for all u, v P (cid:146)n.
Proof. The first claim follows directly from (Bauschke & Combettes, 2017, Prop.4.11). That T is
strongly monotone is a consequence of the Cauchy Schwarz inequality and Lipschitz continuity of
A:
xT v ́ T u, v ́ uy " }v ́ u}2 ́ ηxAv ́ Au, v ́ uy ě p1 ́ ηLq}v ́ u}2.
In turn, the last claim follows from the Cauchy-Schwarz inequality.
B Proofs and further results
B.1 Proofs of Section 3
12
Published as a conference paper at ICLR 2022
Proof of Theorem 3.1. Let H " id ́ γkF. By Step 1.1 Hzk P ̄zk ` γkA ̄zk. Therefore,
pHzk ́ H ̄zkq P A ̄zk ` F ̄zk
(B.1)
In what follows we will show that Algorithm 1 is equivalent to taking a forward-backward step
followed by a correction step. Consider the updates
1
γk
̄zk (cid:66) pid ` γkAq ́1
zk ́ γkFzk
,
`
̆
zk`1 " p1 ́ λkqzk ` λk ΠDk pzkq, where Dk (cid:66)
Note that
!
w | xHzk ́ H ̄zk, ̄zk ́ wy ě δk
γk
(B.2)
)
.
}Hzk ́ H ̄zk}2
xH ̄zk ́ Hzk, ̄zk ́ zky ` δk
γk
(B.3)
where in the inequality Lemma A.3(i) was used. Hence, by (B.3) the stepsize αk is positive and
bounded away from zero. Moreover, if zk P Dk, then from (B.3) we may conclude that }H ̄zk ́Hzk} ď
0 which implies that the generated sequence remains constant and ̄zk P zer T (cf. (B.1)).
}H ̄zk ́ Hzk}2 ě p 1
q}H ̄zk ́ Hzk}2
2 ` δk
γk
The projection onto Dk for any v R Dk is given by
ΠDk pvq " v `
x ̄zk ́ v, Hzk ́ H ̄zky ́ δk
γk
}Hzk ́ H ̄zk}2
}Hzk ́ H ̄zk}2
pHzk ́ H ̄zkq
Moreover, (B.1) together with Assumption I(iii) at ̄zk yields
1
γk
}Hzk ́ H ̄zk}2 ě δk
γ2
k
xHzk ́ H ̄zk, ̄zk ́ z‹y ě ρ
γ2
k
(B.4)
thus ensuring z‹ P S‹ Ď Dk. The projection onto Dk is then given by ΠDk pzkq " zk `αkpH ̄zk ́Hzkq,
where αk is as in step 1.2.
Finally, since the projection ΠDk is firmly nonexpansive, it follows from (Bauschke & Combettes,
2017, Cor. 4.41) that the mapping p1 ́ λkqid ` λk ΠDk is λk{2-averaged. Consequently, we may con-
clude that pzkqkP(cid:142) is Fejér monotone relative to S‹ (Bauschke & Combettes, 2017, Prop. 4.35(iii)).
That is for all z‹ P S‹
}Hzk ́ H ̄zk}2,
}zk`1 ́ z‹}2 ď }zk ́ z‹}2 ́ λkp2 ́ λkqα2
k}H ̄zk ́ Hzk}2.
(B.3) ď }zk ́ z‹}2 ́ εk
γ2
k
}H ̄zk ́ Hzk}2,
(B.5)
where εk (cid:66) λkp2 ́λkqp γk
2 `δkq2. The convergence rate in (3.1) is obtained by telescoping (B.5). Since
lim infkÑ8 εk ą 0, p 1
}H ̄zk ́ Hzk}2qkP(cid:142) converges to zero. Moreover, p}zk ́ z‹}2qkP(cid:142) converges
γ2
k
and the sequence pzkqkP(cid:142) is bounded. Since γk is bounded, and F and the resolvents pid ` γkAq ́1 are
Lipschitz continuous (cf. (Bauschke & Combettes, 2017, Cor. 23.9)), so is their composition. Hence,
p ̄zkqkP(cid:142) is also bounded. Let p ̄zkqkPK be a subsequence converging to some ̄z P (cid:146)n. Combined with the
fact that p 1
}H ̄zk ́ Hzk}2qkP(cid:142) converges to zero, we may conclude from (B.1) along with (Bauschke
γ2
k
& Combettes, 2017, Prop. 20.38) and Lipschitz continuity of F that ̄z P zer T . Finally, if in addition
γ " lim supkÑ8 γk ă 1{L, then p1 ́ γLq} ̄zk ́ zk} ď }H ̄zk ́ Hzk} (invoke Lemma A.3(ii)). There-
fore, p} ̄zk ́ zk}qkP(cid:142) converges to zero, which in turn implies that a subsequence pzkqkPK1 converges
to a point z1 iff so does the subsequence p ̄zkqkPK1. Hence, pzkqkPK also converges to ̄z P zer T . Conse-
quently, if Assumption I(iii) holds at all of the zeros of T , i.e., if S‹ " zer T , then the second claim
follows by invoking (Bauschke & Combettes, 2017, Thm. 5.5).
Proof of Corollary 3.2 (Constant stepsize). The proof of convergence was already given prior to
the statement of the corollary. It remains to derive (3.3). By Assumption I(iii) and owing to 1{2-
cocoercivity of H (cf. Lemma A.3(i))
xzk ́ z‹, H ̄zk ́ Hzky " x ̄zk ́ z‹, H ̄zk ́ Hzky ` xzk ́ ̄zk, H ̄zk ́ Hzky
(B.4) ď ́ p 1
2 ` δk
γk
q}H ̄zk ́ Hzk}2.
(B.6)
Therefore, provided that ̄α ą 0 we have
}zk`1 ́ z‹}2 " }zk ́ z‹}2 ` ̄α2}H ̄zk ́ Hzk}2 ` 2 ̄αxzk ́ z‹, H ̄zk ́ Hzky
2 ` δ
(B.6) ď }zk ́ z‹}2 ́ ̄αp2p 1
γ q ́ ̄αq}H ̄zk ́ Hzk}2.
Telescoping the above inequality yields the claimed inequality.
13
Published as a conference paper at ICLR 2022
B.2 Convergence results and proofs of Section 4
The convergence results for (CurvatureEG+) are provided in the next corollary where ρ in Assump-
tion I(iii) is allowed to take potentially larger values provided that ρ ą ́γk{2. Note that owing to the
lower bound on γk (cf. Lemma 4.1(i)), the weak MVI assumption in the corollary is always satisfied
if ρ P p ́ντ{2L, 8q, however, in practice γk may take larger values.
Corollary B.1. Suppose that Assumptions I(i) and I(ii) hold, and consider the sequences pzkqkP(cid:142),
p ̄zkqkP(cid:142) generated by (CurvatureEG+). Suppose that Assumption I(iii) holds for some ρ P (cid:146)
satisfying γk ` 2ρ ą 0, and let δk P p ́γk{2, ρs, λk P p0, 2q, lim infkÑ8 λkp2 ́ λkq ą 0, and
lim infkÑ8pδk ` γk{2q ą 0. Then,
(i) The sequence p} ̄zk ́ zk}2qkP(cid:142) vanishes;
(ii) p ̄zkqkP(cid:142), pzkqkP(cid:142) are bounded, and have the same limit points belonging to zer T ;
(iii) if in addition S‹ " zer T , then pzkqkP(cid:142), p ̄zkqkP(cid:142) both converge to some z‹ P zer T .
Moreover, if zk, ̄zk Ñ z‹ P zer T (as is the case in B.1(iii)), and F is continuously differentiable, then
eventually the backtrack will never be invoked.
Proof. Observe that in the proof of Theorem 3.1 1-Lipschitz continuity of γkF is only used at the
generated points ̄zk and zk (see (B.3)), and is thus ensured by the linesearch Algorithm 2. Therefore,
it is easy to see that αk is positive and bounded away from zero provided that ρ ą ́γk{2 , see (B.3).
Moreover, since γk}F ̄zk ́ Fzk} ď ν} ̄zk ́ zk}, arguing as in Lemma A.3(ii) we obtain }H ̄zk ́ Hzk} ě
p1 ́ νq} ̄zk ́ zk}. Hence, it follows from (B.5) that
}zk`1 ́ z‹}2 ď }zk ́ z‹}2 ́ εkp1 ́νq
γ2
k
} ̄zk ́ zk}2,
ř
kP(cid:142) } ̄zk ́ zk}2 ă 8,
By telescoping the inequality and noting that γk is bounded, we obtain
implying B.1(i). Noting this and arguing as in the last part of the proof of Theorem 3.1 establishes
B.1(ii), B.1(iii). The last claim is the direct consequence of Lemma 4.1(ii).
Proof of Lemma 4.1 (Lipschitz constant backtracking). 4.1(i): Since F is L-Lipschitz continuous
the linesearch would terminate in finite steps. Either γinit satisfies the condition, or else the back-
track procedure is invoked, which in turn implies the previous candidate γ{τ should have violated
the condition leading the the claimed lower bound.
4.1(ii): Since the resolvent pid`γAq ́1 and F are Lipschitz continous, so is their composition. Hence,
Gγpzkq Ñ Gγpz‹q. Furthermore, by definition z‹ ́ γFz‹ P Gγpz‹q ` γApGγpz‹qq. Consequently,
using monotonicity of A at Gγpz‹q and z‹, and that ́Fz‹ P Az‹ yields 0 ď xz‹ ́ γFz‹ ́ Gγpz‹q `
Fz‹, Gγpz‹q ́ z‹y " ́ }z‹ ́ Gγpz‹q}2. Thus Gγpz‹q " z‹. Using the fact that both pGγpzkqqkP(cid:142) and
pzkqkP(cid:142) converges to z‹ P zer T :
lim
kÑ8
}FpGγpzkqq ́ Fzk}
}Gγpzkq ́ zk}
ď lim sup
z,z1Ñz‹
}Fz1 ́ Fz}
}z1 ́ z}
" lip Fpz‹q " }JFpz‹q},
where (Rockafellar & Wets, 2009, Thm. 9.7) was used. The claim follows from continuity of JF
and the fact that pzkqkP(cid:142) converges to z‹.
B.3 Proofs of Section 3.2
To prove the lower bound we introduce the following unconstrained bilinear minimax problem with
an unstable critical point.
Example 5: Consider the following minimax problem:
minimize
xPR
maximize
yPR
f px, yq :" axy `
b
2
px2 ́ y2q,
(B.7)
where b ă 0 and a ą 0.
14
Published as a conference paper at ICLR 2022
Proof of Theorem 3.4. The associated operator of Example 5 can easily be computed,
Fz " pay ` bx, by ́ axq,
(B.8)
where z " px, yq. In this particular case, both L and ρ turn out to be constants. By simple calculation
we have,
a
}JFpzq} "
a2 ` b2,
ρ "
b
a2 ` b2
(B.9)
where } ̈ } is the spectral norm. Since the norm of the Jacobian is constant it equates the global
Lipschitz constant, L " }JFpzq}.
By linearity of F, one step of (EG+) is conveniently also a linear operator. Specifically,
̨
́
̈
̄
̄
?
p1 ́ ̄αqa2`b
́ ̄α
́ ?
a2`b2
a2`b2 ́2b
a ̄α
a2`b2` ̄αb`b
̄
́ ?
a ̄α
́
́
a2`b2 ́2b
?
a2`b2
p1 ́ ̄αqa2`b
́ ̄α
a2`b2` ̄αb`b
̄
‹
‚.
(B.10)
zk`1 " T zk with T :"
̊
̋
We know that a linear dynamical system is globally asymptotically stable if and only if the spectral
radius of the linear mapping is strictly less than 1.
a2`b2
a2`b2
Let λ1, λ2 be the eigenvalues of T . Then the spectral radius is the largest absolute value of the
eigenvalues. For T this becomes,
d
p2p ̄α ́ 1q ̄α ` 1qa2 ́ 2 ̄αp ̄α ` 1qb
a2 ` b2 ́ b
` ?
̆
` b2
.
(B.11)
a2 ` b2
|λi| "
max
iPt1,2u
So we can ask what c in ρ " ́ c
this equality with maxi |λi| ă 1, we obtain,
L needs to be for the sequence pzkqkPN to converge. Solving for c in
provided that we pick
c ă
1 ́ ̄α
2
,
?
1 ́ c2
c
" ́
a
b
.
(B.12)
(B.13)
Equation (B.13) provides a specification for Example 5. As long as (B.12) is satisfied, (EG+) is
guaranteed to converge for γk " 1{L. On the other hand, since (B.10) is a linear system, we simulta-
neously learn that picking c any larger would imply non-convergence through maxi |λi| ě 1 (given
z0 ‰ 0). We can trivially embed problem (B.10) into a higher dimension to generalize the result.
Noting that c " ́ρL completes the proof.
We provide Mathematica code to verify each step of the above proof.1
C Toy examples
In the following appendix, L denotes the Lipschitz constant of F restricted to the constraint set and
ρ is the parameter of the weak MVI (Assumption I(iii)) when restricted to the constraint set. This
restriction of the definitions is warranted, since zk remains within the constraint set in all simulations,
while ̄zk is guaranteed to stay within by definition of Step 1.1 in Algorithm 1 (and likewise for all
other considered method treating problem (2.1)).
All computer-assisted calculations can be found in the supplementary code.1
C.1 Constructing a PolarGame (Definition 1)
Recall Definition 1 which considers a vectorfield F : Rn Ñ Rn with limit cycles at r P tc1, ..., cku
where ci ‰ 0 for all i P rks. Such a vectorfield can be constructed for n " 2 by departing from the
1The supplementary code can be found at https://github.com/LIONS-EPFL/weak-minty-code/.
15
Published as a conference paper at ICLR 2022
ùñ
Figure 5: We can construct the desired properties in polar coordinates pr, θq and subsequently transform
it into a vectorfield in cartesian coordinates px, yq. This is illustrated by a PolarGame with attracting limit
cycles at radius }z} " 1 and repellant limit cycle at }z} " 3{4 for the associated operator Fz as indicated
in red and blue respectively.
(a) a " 1
(b) a " 3{4
(c) a " 1{3
Figure 6: Example 3 for different values of a (and thereby different values of ρ). Note that even extragra-
dient may escape the limit cycles even though ρ ă 0. This is not in conflict with the negative results of
Hsieh et al. (2021) since the stepsize is not diminishing. However, in the general case even extragradient
with fixed stepsize will not converge as shown by the lower bound in Theorem 3.4.
following dynamics in polar coordinates,
kź
" ́a ̈ rptq
prptq ` ciq ̈ prptq ́ ciq
i"1
" ́b ̈ rptq,
Br
Bt
Bθ
Bt
(C.1)
with a, b ‰ 0. Transforming this dynamics into cartesian coordinates yields the desired vectorfield,
F, while subsequently integrating with respect to x and y yields the two potentials associated with the
two players. Note that the roots t ́ciuk
i"1 for the polynomial defining 9r are not strictly necessary for
showing existence of limit cycles, but leads to a simpler form for Fz. We illustrate the construction
in Fig. 5.
Proposition 1. Let Fz " p 9x, 9yq be the evolution in cartesian coordinates of the associated vectorfield
in polar coordinates defined by (C.1). Then the only stationary point of F is at the origin p0, 0q and
there exists a limit cycle at r " ci for all i P rks.
a
x2 ` y2. It is easy to see from (C.1) that the only stationary point is at r " 0. By
Proof. Let r "
construction, 9r is a polynomial with roots ci for all i P rks, so any trajectory starting on the circle
defined by r " ci remains in that set. However, 9θ is strictly nonzero. As a consequence Fz is nonzero,
so r " ci must define a limit cycle, which proofs the claim.
16
Published as a conference paper at ICLR 2022
(a) Example 4
(b) Example 5 (ρ " 1{3L)
Figure 7: In (a) we observe that all algorithms converge, despite F having an attracting limit cycle in
Example 4. However, note that in the stochastic setting, where diminishing stepsize is required, SEG does
not converge to the critical point (see Fig. 4a). In (b) we demonstrate that when ρ " ́1{3L, picking
̄αk ă 1{3 for (CEG+) is necessary for convergence in general. See Section 6 for the experimental setup.
C.2 Proof for properties of Example 3
The operator F : R2 Ñ R2 defined in Example 3 is obtained by constructing the associated dynamics
in polar coordinates,
Br
Bt
Bθ
Bt
" ́a ̈ rptq ̈ prptq ` 1q ̈ prptq ́ 1q ̈ prptq ` 3{4q ̈ prptq ́ 3{4q
" ́rptq.
(C.2)
This can easily be verified by a change of variables. From Proposition 1 it then follows, that there
must exist a limit cycle at }z} " 1 and }z} " 3{4. To verify the conditions on ρ we compute the
closed form solution to ρ and L in Mathematica:
(i) For a " 1 we have ρ " ́ 50176
1050977 and L "
(ii) For a " 3{4 we have ρ " ́ 602112
16798825 and L "
(iii) For a " 1{3 we have ρ " ́ 150528
9439585 and L "
?
?
2538096
704424929`70246989617
?
?
7614288
?
?
2538096
20000
6383574361`635022906553
80000
754424929`73446989617
60000
It can easily be verified that the stated conditions for ρ in Example 3 are met for the values above.
This completes the proof.
We provide Mathematica code verifying the construction of F and the closed form solutions to L
and ρ.
C.3 Proof for properties of Example 4
Under the definitions of ρ and L in Appendix C, we claim that the origin p0, 0q in (GlobalForsaken)
is a global Nash equilibrium and satisfies Assumption I(iii) with ρ ą ́1{2L.
To verify that p0, 0q is indeed a global Nash equilibrium we need to check that the solution cannot
be unilaterally improved. In other words, the solution should coincide with px‹, y‹q where
x‹ " arg min
φpx, 0q
x
y‹ " arg max
φp0, yq.
y
17
(C.3)
Published as a conference paper at ICLR 2022
We can easily verify this with Minimize in Mathematica, since the functions are polynomial for
which a closed form solutions to the global optimization problem will be returned.
To find ρ for z‹ " p0, 0q we solve the global minimization problem,
minimize
z
xFz, z ́ z‹y
}Fz}2
,
(C.4)
for which a closed form solution can be found with Mathematica, which when numerically evaluated
is approximately ́0.119732.
1
?
b
2 p9409
59721901`74125591q{2835. So ́ 1
We need to compute L to ensure ρ ą ́1{2L. In our case of convex constraints, C, we have that
L " supzPC }JFpzq} where } ̈ } denotes the spectral norm (Rockafellar & Wets, 2009, Thm. 9.2
and 9.7). Under our constraint }z}8 ď 4{3, this can similarly be computed in closed form, yielding
2L « ́0.165432 which satisfy the condition ρ ą ́ 1
L "
2L .
This completes the proof.
Proposition 2. Let F be the associated operator of φ in (GlobalForsaken) defined as Fz "
p∇xφpx, yq, ́∇yφpx, yqq. Define the radius as r " }z}. Then, Fz has a stable critical point at the
3{2 ă r ă 2 and at least
origin p0, 0q, at least one attracting limit cycle in the region defined by
one repellant limit cycle within r ď
3{2.
a
a
Proof. We follow a similar argument as in Hsieh et al. (2021, D.2). We can compute the associated
operator F,
̧
ˆ
̇
̃
9x
9y
"
7 ́ 4x3
4x5
́x ` 4y5
3 ` 2x
7 ́ 4y3
3 ` y
3 ` 2y
3
.
a
(C.5)
With a change of variables into polar coordinates pr, θq we get that r "
x2 ` y2 evolves as,
`
̆
9r4 cosp4θq ́ 14r2 cosp4θq ` 15r4 ́ 42r2 ` 28
.
(C.6)
9r " ́
1
42
r
a
56
!
?
6
3{2 this reduces to 9r " 3 cosp4θq`5
and we observe that 9r ą 0 for any θ. Likewise for
When r "
r " 2, we have that 9r " ́ 4
21 p22 cosp4θq`25q which implies 9r ă 0. Since there is no stationary point
in the region S "
pr, θq :
it then follows from the Poincaré-Bendixson theorem
(Teschl, 2012, Thm. 7.16) that there must exist at least one attracting limit cycle in S. Further, it
is easy to see that p0, 0q is a critical point and that it is stable by inspection of the Jacobian JFpzq.
Since S is trapping, it follows from Poincaré–Hopf index theorem, that there must exist a repellant
limit cycles in the region defined by r ă
3{2. This completes the proof.
3{2 ă r ă 2
a
a
)
C.4 Proof of properties for (Hsieh et al., 2021, Example 5.2)
This section considers (Hsieh et al., 2021, Example 5.2) on the constraint domain D " tz P (cid:146)n |
}z}8 ď 3{2u. We show that the unique critical point z‹ does not satisfies the weak MVI for ρ ą ́1{2L
even when restricted to the constraint set z P D. We restate the example with the additional constraint
for convenience.
Example 6: (Hsieh et al., 2021, Example 5.2)
where ψpzq " 1
minimize
|x|ď3{2
4 z2 ́ 1
maximize
|y|ď3{2
6 z6.
2 z4 ` 1
φpx, yq :" xpy ́ 0.45q ` ψpxq ́ ψpyq,
(Forsaken)
By using Mathematica, we can obtain a closed form solution of the Lipschitz constant L of F re-
stricted to the constraint set, which we find to be L " 1
. Math-
80
ematica can solve approximately for the critical point, yielding z‹ " p0.0780267, 0.411934q. To
find ρ we want to globally minimize ρpzq :" xFz,z ́z‹y
for z P D. Mathematica finds the candi-
date z1 " p ́1.01236, ́0.104749q for which ρpz1q " ́0.477761. So ρ must be at least this small,
i.e. ρ ă ́0.477761. Since ́1{2L « ́0.04, this implies that ρ ă ́1{2L. See Forsaken.nb for
Mathematica-assisted computations.
801761 ` 993841
1089
}Fz}2
b
?
1
2
`
̆
18
Published as a conference paper at ICLR 2022
Figure 8: Demonstration of algorithms on (Hsieh et al., 2021, Example 5.2). Only (CurvatureEG+) con-
verges to the critical point, while the remaining methods, CEG, (CEG+) with ̄αk " 1{2, and AdaptiveEG+
converges to an attracting limit cycle. See Section 6 for further specification of the algorithms.
This rules out convergence guarantees for both (CEG+) and AdaptiveEG+ (Algorithm 1), which is
supported by the simulation in Figure 8. However, as observed, (CurvatureEG+) converges in the
simulations.
19
|
|
http://arxiv.org/abs/2302.09826v2 | 2023-06-05T07:08:21 | 2023-02-20T08:19:19 | On the Expressivity of Persistent Homology in Graph Learning | Persistent homology, a technique from computational topology, has recently
shown strong empirical performance in the context of graph classification.
Being able to capture long range graph properties via higher-order topological
features, such as cycles of arbitrary length, in combination with multi-scale
topological descriptors, has improved predictive performance for data sets with
prominent topological structures, such as molecules. At the same time, the
theoretical properties of persistent homology have not been formally assessed
in this context. This paper intends to bridge the gap between computational
topology and graph machine learning by providing a brief introduction to
persistent homology in the context of graphs, as well as a theoretical
discussion and empirical analysis of its expressivity for graph learning tasks. | [
"Bastian Rieck"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09826v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09826v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"math.AT",
"stat.ML",
"55N31 (Primary) 62R40, 68T09 (Secondary)"
] | 3
2
0
2
n
u
J
5
]
G
L
.
s
c
[
2
v
6
2
8
9
0
.
2
0
3
2
:
v
i
X
r
a
On the Expressivity of Persistent Homology in Graph
Learning
Bastian Rieck1, 2
1Helmholtz Munich
2Technical University of Munich
Abstract
Persistent homology, a technique from computational topology, has recently shown strong
empirical performance in the context of graph classification. Being able to capture long range
graph properties via higher-order topological features, such as cycles of arbitrary length, in
combination with multi-scale topological descriptors, has improved predictive performance
for data sets with prominent topological structures, such as molecules. At the same time, the
theoretical properties of persistent homology have not been formally assessed in this context.
This paper intends to bridge the gap between computational topology and graph machine learning
by providing a brief introduction to persistent homology in the context of graphs, as well as a
theoretical discussion and empirical analysis of its expressivity for graph learning tasks.
1
Introduction
Graph learning is a highly-active research domain in machine learning, fuelled in large parts by
the geometric deep learning [11, 12] paradigm as well as the resurgence of new neural network
architectures for handling graph data. Methods from computational topology, by contrast, have not
yet been applied in this domain at large scales. Even though a large amount of prior work employs
topological features to solve graph learning tasks [14, 17, 31, 32, 33, 35, 53, 64, 65, 66, 67], a formal
investigation relating expressivity in graph learning and topological machine learning is still lacking.
We believe that this is largely driven by an issue of communication between the communities. This
paper serves to provide an introduction to topological methods for graph learning, while also proving
new results about the expressivity of topological methods in this domain. Here, we understand
expressivity as a general concept to signify which graph properties can be captured by a method.
This includes being aware of certain substructures in graphs [18], for instance, but also being able to
distinguish large classes of non-isomorphic graphs [10, 36, 56]. While graph neural networks have
demonstrated substantial gains in this area, our paper focuses on topology-based algorithms, aiming
to provide a better understanding of their theoretical and empirical properties.
Contributions. Our main contribution is to provide a full characterisation of the expressivity of
persistent homology in terms of the Weisfeiler–Leman hierarchy [45, 63]. We prove that persistent
homology is at least as expressive as a corresponding Weisfeiler–Leman test for graph isomorphism.
Moreover, we show that there exist graphs that cannot be distinguished using k-FWL, the folklore
Weisfeiler–Leman algorithm [44], for a specific number of iterations k but that can be distinguished
by persistent homology (with or without access to k-cliques in the graph). Along the way, we also
prove new properties of filtrations, i.e. descriptor functions that are commonly employed to obtain
topological representations of graphs, hinting at their ability to capture information about graph
substructures. We complement our theoretical expressivity discussions by an experimental suite that
highlights the capabilities of different filtrations for (i) distinguishing certain types of graphs, and
(ii) predicting characteristic properties such as the diameter.
Guide for readers. Section 2 briefly summarises the main concepts in graph learning. It should
be accessible and informative to all readers. Section 2.1 and Section 2.2, by contrast, may be safely
skipped by readers that are already well versed in computational topology. Throughout the paper, all
Preprint. Under review.
new theoretical results are marked by '(∗).' Section 3 outlines advantageous properties of filtrations in
the context of graph learning, while Section 4 discusses the expressivity of persistent homology with
respect to the Weisfeiler–Leman hierarchy of graph isomorphism tests, extending previous work [35].
2 Background & Notation
(a)
(b)
FIGURE 1: Two isomorphic graphs. The
isomorphism can be understood as a
relabelling, a shift of node identities, or, most
intuitively, as being able to draw both graphs
using a single line.
We deal with undirected graphs in this paper. An undirec-
ted graph G is a pair G = (V, E) of finite sets of n vertices
and m edges, with E ⊆ {{u, v} | u, v ∈ V, u ̸= v}. As
is common practice, we will also refer to an edge using
tuple notation, with the understanding that (u, v) and (v, u)
refer to the same edge. Moreover, we assume our graphs
to be simple:1 they must not contain any multi-edges or
loops, i.e. edges of the form (v, v). We denote the space
of all such graphs by G. Two graphs G = (V, E) and
G′ = (V ′, E′) are isomorphic, denoted by G ≃ G′, if
there is a bijective function φ : V → V ′ that preserves ad-
jacency, i.e. (u, v) ∈ E if and only if (φ(u), φ(v)) ∈ E′.
The isomorphism φ is thus preserving edges and connectiv-
ity. Since φ is bijective, it has an inverse function, which
we will denote by φ−1. Fig. 1 depicts two isomorphic graphs. The problem of figuring out whether
two graphs are isomorphic or not is referred to as the graph isomorphism problem. Presently, there is
no known algorithm that solves this problem in polynomial time-efficient algorithms exist only for
special families of graphs [21, 37]. Hence, all subsequently-discussed graph isomorphism tests are
perforce limited with respect to their expressivity, i.e. there exist classes of non-isomorphic graphs
that they cannot distinguish. In the context of graph isomorphism tests, we will often require the
definition of a multiset, which is a set whose elements are included with multiplicities. We will denote
such a multiset by {{}}.
Equivariance. Given two graphs G and G′ with n nodes, let Sn refer to the permutation group on n
letters. An element σ ∈ Sn acts on a graph by permuting the order of vertices, and, by transitivity, the
edges. If G ≃ G′, there is a permutation σ ∈ Sn such that σ(G) = G′. Under the assumption that all
graphs have the same number of vertices n, we call a function f : V → Rn permutation-equivariant
if f (σ(G)) = σ(f (G)) for a permutation σ, with the understanding that σ acts on Rn by permuting
the order of coordinates of the vector.2 The output of a permutation-equivariant function thus changes
with the permutation in a predictable manner.
2.1 Topological Features of Graphs
The simplest kind of topological features to prescribe to graphs are connected components and cycles.
For planar input graphs, i.e. for graphs that can be embedded in the plane such that there are no
overlaps between edges, Euler's formula captures structural properties via
V − E + F = 2,
(1)
where F counts the number of faces (including the unbounded one) of the planar embedding. While
this formula can be used to comment on the feasibility of some problems in graph theory (see
Appendix A), its practical utility is limited. However, it turns out that a similar identity relates
connected components and cycles in a graph. Formally, referring to the number of connected
components as β0 and the number of cycles as β1, we have
β1 = m + β0 − n,
where n and m denote the number of vertices and edges, respectively. The two quantities in
this formula are also known as the first two Betti numbers of a graph, with β1 also known
as the cyclomatic number or the circuit rank [7, pp. 27–30]. While the expressive power of
these two numbers is limited, it can be improved by evaluating them alongside a filtration,
i.e. a sequence of nested subgraphs of the form ∅ ⊆ G0 ⊆ G1 . . . ⊆ Gk−1 ⊆ Gk = G.
1This is primarily an assumption for notational convenience. The concepts described in this paper can also be
extended to more complex scenarios.
2We only consider functions operating on vertices, but the concept can extended to edges as well.
(2)
2
(a) Example graph
(b) f −1((−∞, 0])
(c) f −1((−∞, 1])
(d) f −1((−∞, 2])
(e) f −1((−∞, 3])
FIGURE 2: An example graph and three different steps of a degree-based filtration. The respective caption
indicates the pre-image of the corresponding filtration function.
3
0
0
1
3
2
1
2
0
0
∞
∞
n
o
i
t
c
u
r
t
s
e
D
n
o
i
t
c
u
r
t
s
e
D
1
3
2
Creation
1
3
2
Creation
(a) D0
(b) D1
FIGURE 3: Persistence diagrams of the
filtration depicted in Fig. 2. Points can have
different multiplicities; we show essential
features, i.e. topological features that persist
over the full filtration using an ∞ symbol.
Filtrations typically arise from scalar-valued functions of
the form f : G → R, which assign vertices and edges a
value. Changes in the Betti numbers can then be tracked
over the course of the filtration: given a threshold a ∈ R,
one analyses the subgraph arising from the pre-image of
(−∞, a] of f , denoted f −1((−∞, a]). This leads to per-
sistent Betti numbers, which are typically summarised in
a persistence diagram, i.e. a topological descriptor, con-
sisting of tuples (ai, aj) ∈ R2, with ai referring to the
value at which a topological feature was created, and aj
referring to the value at which a topological feature was
destroyed (for instance, because two connected compon-
ents are being merged). The absolute difference in function
values |aj − ai| is called the persistence of a topological feature; it indicates the prominence or
relevance of said feature. Fig. 2 depicts an example filtration for a simple graph, where we use the
degree of each vertex to filter the graph. The calculation of persistent homology along this filtration
involves counting the connected components and cycles. We note that these features can only change
whenever the filtration function changes. The critical points of the degree filtration are thus the
unique degrees of vertices occurring in the graph. Fig. 3 shows the persistence diagrams arising from
the filtration. The more complex structure of persistence diagrams (in comparison to the simple Betti
numbers) already hints at their capabilities in providing expressive graph descriptors.
2.2 Topological Features of Simplicial Complexes
The concepts discussed in Section 2.1 generalise to higher dimensions as well, with the understanding
that the connectivity of higher-order structures of a graph-cliques-is being modelled. The resulting
framework is referred to as persistent homology; it encompasses the calculations on graphs, extending
them to simplicial complexes or other types of combinatorial complexes. The nomenclature is used
to reflect the idea that the underlying graphs are originating from manifolds, of which the filtration
function f measures certain features. A feature of high persistence is thus to be understood as a
feature with that occurs over a large range of values of f . In the context of graphs, there are different
constructions for obtaining simplicial complexes; we will subsequently use clique complexes (in
which a k-clique is represented by a (k − 1)-simplex) because it is (i) straightforward to implement,
and (ii) cliques are known to be characteristic graph structures [10]. Persistent homology is typically
calculated using matrix reduction reduction algorithms, whose optimisation is still an ongoing topic
of research [5]. We refer readers to Otter et al. [49] for a comprehensive introduction of computational
strategies. In the general point cloud setting, a paper by Bauer [4] provides a highly-efficient reference
implementation while also stating details on combinatorial optimisation strategies. Readers are invited
to read Appendix C for a more detailed exposition of concepts in computational topology.
3 Properties of Filtrations
Before we discuss how to create specific filtrations that are useful for graph learning tasks, we first
discuss some of their general properties. We briefly expand on the stability properties of filtrations.
Given two filtrations f, g of the same graph, a seminal result by Cohen-Steiner, Edelsbrunner, and
Harer [19] proves the following bound.
3
Theorem 1 (Bottleneck stability). Let f, g refer to filtrations of a graph G, and let Df and Dg
denote their respective persistence diagrams. The bottleneck distance distance is upper-bounded by
dB(Df , Dg) ≤ ||f − g||∞, where ∥ * ∥∞ refers to the Hausdorff distance between the two functions.
An extension of this theorem, with dB being replaced by the Wasserstein distance, shows that
persistence diagrams are also stable in the Lipschitz sense [20]. These stability properties are
remarkable because they link a topological quantity with a geometrical one, thus underscoring
how persistent homology itself incorporates both geometrical and topological aspects of input data.
Stability theorems are a crucial aspect of research in computational topology; readers are invited to
read a recent work that provides a concise exposition and deposes of some erroneous assumptions in
this context [58].
We continue our enumeration of filtration properties by proving that any filtration induced by an
equivariant function is well-behaved under graph isomorphism.
Theorem 2. (∗) Let G ≃ G′ be two isomorphic graphs, and φ be the respective isomorphism. For
any equivariant filtration f , the corresponding persistence diagrams are equal.
Theorem 2 is a consequence of a more general principle, viz. functoriality. It also shows that
it is impossible to 'adversarially' pick an equivariant filtration function that leads to a non-zero
topological dissimilarity between two non-isomorphic graphs. Furthermore, the theorem guarantees
that persistent homology is fundamentally compatible with equivariant function learning, pointing
towards the utility of hybrid models that leverage different types of structural properties of graphs.
To finish this discussion of general properties, we remark that all filtrations carry information about
the diameter (the length of the longest shortest path) and girth (the length of the shortest cycle) of a
graph.
Theorem 3. (∗) Given any vertex-based filtration f of a graph G with a single connected component,
we can upper-bound diam(G), the diameter of G, based on D0, the resulting persistence diagram in
dimension 0.
Theorem 4. (∗) Given any vertex-based filtration f of a graph G, we can upper-bound the girth of G
using the persistence diagrams in dimension 0 and 1.
Theorem 3 and Theorem 4 indicate that persistent homology captures more than 'just' topological
information about a graph. Similar to Vietoris–Rips filtrations, a topological construction for general
metric spaces such as point clouds, persistence diagrams permit inferring additional properties about
the input data [13, 41, 60]. This indicates that a topological perspective can complement and enrich
graph learning tasks. We note that the respective upper bounds can always be made tighter with
task-specific filtrations.
4 The Weisfeiler–Leman Hierarchy
Having discussed the properties of specific filtrations, we now analyse the expressivity of persistent
homology in the context of the Weisfeiler–Leman hierarchy of graph isomorphism tests. 1-WL,
also known as colour refinement, constitutes a simple method for addressing the graph isomorphism
problem. It is the backbone of graph expressivity research; readers are referred to Morris et al.
[44] for a comprehensive survey of 1-WL, its higher-order variants, and their relation to machine
learning research. We follow the terminology of this article and briefly introduce all relevant concepts.
Formally, 1-WL proceeds by iteratively calculating a node colouring function C (1)
: V → N. The
output of this function depends on the neighbours of a given node. For a vertex v at iteration i > 0,
we have
i
C (1)
i
(v) := RELABEL
(cid:16)(cid:16)
C (1)
i−1(v),
(cid:110)(cid:110)
C (1)
i
(u) | u ∈ N (v)
(cid:111)(cid:111)(cid:17)(cid:17)
,
(3)
where RELABEL refers to an injective function that maps the tuple of colours to a unique colour,
i.e. a unique number. The algorithm is initialised by either using existing labels or the degree of
vertices.3 After a finite number of steps, the colour assignments generated using Eq. (3) stabilise. If
two graphs give rise to different colour sequences, the graphs are guaranteed to be non-isomorphic.
3Note that Eq. (3) does not recognise an ordering of labels. Initialising 1-WL with a constant value thus leads to
the same colouring-up to renaming-after the first iteration.
4
The 1-WL test is computationally easy and constitutes an upper bound for the expressivity of many
graph neural network (GNN) architectures [45, 63]. In other words, if 1-WL cannot distinguish
two non-isomorphic graphs, GNNs will also not be able to distinguish them. It is already a known
result that any 1-WL colouring can be reproduced by creating a special filtration [35]; we restate
this result as Theorem 6 in the appendix. The implication is that persistent homology is at least as
expressive as 1-WL because there is a filtration that distinguishes all the graphs 1-WL can distinguish.
Appendix E shows examples of graphs that can only be distinguished via their topological features,
thus proving that a topological perspective is strictly more expressive than 1-WL. Since 1-WL is also
unable to distinguish between graphs with different triangle counts or graphs with cycle information,
it was generalised to include information about labelling tuples of k nodes (as opposed to only
labelling a single node), leading to a hierarchy of algorithms. The variant we shall subsequently
describe is also known as the folklore Weisfeiler–Leman algorithm [44]. It can be shown that there
are non-isomorphic graphs that cannot be distinguished by k-FWL, but that can be distinguished
by (k + 1)-FWL.4 Following Morris et al. [44], k-FWL is based on the idea of assigning colours to
subgraphs as opposed to assigning colours to vertices. To achieve this, k-FWL operates on k-tuples
of vertices; for iteration i = 0, two tuples v = (v1, . . . , vk) and w = (w1, . . . , wk) are assigned the
same colour if the map vj (cid:55)→ wj induces a homomorphism between the subgraphs induced by v
and w, respectively. For subsequent iterations with i > 0, we relabel the tuples similar to 1-WL, i.e.
C (k)
i
(v) := RELABEL
(cid:16)(cid:16)
C (k)
i−1(v),
(cid:110)(cid:110)
C (k)
i
(φ1(v, u)), . . . , C (k)
i
(φk(v, u)) | u ∈ N (v)
(cid:111)(cid:111)(cid:17)(cid:17)
,
(4)
where φj(v, u) := (v1, . . . , vj−1, u, vj+1, . . . , vk) refers to the function that replaces the jth element
of the k-tuple v with u. This induces a neighbourhood relation between tuples and just as in the case
of 1-WL, we run the algorithm until the assigned colours of tuples stabilise for one graph. Similarly,
if the colour sequences of two graphs differ, the graphs are non-isomorphic. As a generalisation
of previous work [35], we can show that any k-FWL colouring can be reproduced with a specific
filtration, thus proving that persistent homology is at least as expressive as k-FWL.
Theorem 5. (∗) Given k-FWL colourings of two graphs G and G′ that are different, there exists
a filtration of G and G′ such that the corresponding persistence diagrams in dimension k − 1 or
dimension k are different.
We remark that the argumentation of Theorem 5 does not lend itself to a constructive proof since the
higher-order setting is more complex. In contrast to the result for 1-WL, we also see that Theorem 5
needs to make use of two types of persistence diagrams. Moreover, while the filtration used in the
proof does not necessarily lead to differentiable persistence diagrams (because of non-unique function
values), it is possible to rectify this (see Lemma 2 in the Appendix), we can rectify this in practice.
Both Theorem 6 and Theorem 5 may not be completely satisfactory because they only show the
existence of such a filtration, but make no claims about the expressivity of existing filtrations. We
aim to provide a more learning-theoretic approach of this issue in future work.
On strictly higher expressivity.
Ideally, we would want to extend Theorem 5 to state that persistent
homology is strictly more expressive than k-FWL. This is not as straightforward as for k = 1,
since we would have to construct families of non-isomorphic graphs that require (k + 1)-FWL to
be distinguished but that can be distinguished already with lower-dimensional persistent homology.
Currently, we can provide one such counterexample, described in Table 2, consisting of the 4 × 4
rook's graph and the Shrikhande graph. With an appropriate filtration, persistent homology can
distinguish these two graphs without requiring more than vertices and edges, whereas 2-FWL is
unable to distinguish them. We leave a more general result for future work.
4There are also other variants, for instance the oblivious Weisfeiler–Leman algorithm. It slightly differs in the
way tuples are being relabelled, but a paper by Grohe [29] shows that the variant is essentially as powerful as
k-FWL (with a minor shift in indices). The reader is referred to Morris et al. [44] and the references therein for
an extended discussion of these aspects.
5
5 Experiments
The previous sections discussed the theoretical properties of filtrations. Here, we want to briefly
comment on their empirical performance. We thus analyse to what extent two different filtrations
are capable of distinguishing between different non-isomorphic graphs. Notice that we refrain from
performing experiments that require training an additional classifier since such results would be
inherently harder to interpret.
Experimental setup. We use different data sets of connected cubic graphs [22] and strongly-regular
graphs [43]. The latter type of graph is known to be challenging for graph isomorphism tests; we
know for instance that 2-FWL cannot distinguish between any such instances [44]. In the following,
we will use three different filtrations for each graph:
1. A degree filtration, i.e. v (cid:55)→ deg(v). The degree filtration is the most basic non-trivial filtration of
a graph, showing nevertheless surprising empirical performance in graph classification tasks [32,
47, 55].
2. A filtration based on the eigenvalues of the undirected graph Laplacian, i.e. v (cid:55)→ λv, where λv
indicates the eigenvalue of the undirected graph Laplacian corresponding to vertex v. The graph
Laplacian is known to capture characteristic properties of a graph; in the context of persistent
homology it is often used in the form of a heat kernel signature [14].
3. A filtration based on the Ollivier–Ricci curvature [48] in the graph, setting v (cid:55)→ −1 and (u, v) (cid:55)→
κ(u, v), with κ denoting the Ollivier–Ricci curvature
κ(u, v) := 1 − W1(μα
where W1 denotes the first Wasserstein distance,5 and μα
on lazy random walk in the graph:
u, μα
v ),
u, μα
v denote probability measures based
(5)
μα
u(v) :=
α
(1 − α)
0
1
deg(u)
u = v
(u, v) ∈ E
otherwise
(6)
Notice that Eq. (5) can be generalised to arbitrary pairs of vertices, which entails a slightly different
weighting factor. Moreover, the probability measures μα
u may be adjusted; recent work investigates
the utility of this perspective [23, 59]. We set α = 0 for our subsequent experiments, thus obtaining
a non-lazy random walk; the investigation of additional parameters impacts is left for future work.
After picking a filtration, we expand the graph by filling in all (k + 1)-cliques and calculating
persistent homology up to dimension k. Hence, for k = 1, we leave the graph 'as-is,' making use
of connected components and cycles only.6 Our persistent homology calculations result in a set of
persistence diagrams for each graph, which we compare in a pairwise manner using the bottleneck
distance described by Eq. (15). We consider two graphs to be different whenever the distance between
their persistence diagrams is > 1 × 10−8. This setup has the advantage that no additional classifier is
required; when dealing with data sets of pairs of non-isomorphic graphs, we may thus simple count
the number of non-zero distance pairs.
5.1 Connected Cubic Graphs
We start our investigation by distinguishing connected cubic graphs, i.e. 3-regular graphs. These
graphs cannot be distinguished by 1-WL, but they can be distinguished by 2-FWL [9, 44]. As such,
they provide a good example of how different filtrations harness different types of graph information.
Table 1 shows the results. We first observe that the degree filtration is incapable of distinguishing
graphs for k = 1. This is a direct consequence of the regularity-since the function is constant
on the graph, persistent homology cannot capture any variability. This changes, however, when
higher-order structures-triangles-are included for k = 2. We also observe that the Laplacian-based
filtration exhibits strong empirical performance; in the absence of additional information, the spectral
5This metric is also known as the Earth Mover's Distance [40]. The Wasserstein distance is a fundamental
concept in optimal transport; the monograph by Villani [62] contains a comprehensive introduction to this topic.
6Notice the shift in dimension: a k-simplex has k + 1 vertices, meaning that persistent homology in dimension k
contains information about (k + 1)-cliques.
6
TABLE 1: Success rate (↑) of distinguishing pairs of connected cubic graphs when using three different
filtrations (D: degree filtration, L: Laplacian filtration, C: Ollivier–Ricci curvature filtration) at varying expansion
levels of the graph (denoted by k). Due to the regularity of each graph, k = 3 is omitted since the clique complex
of the graph is exactly the same as for k = 2. These graphs can be distinguished by 2-FWL but not by 1-WL.
k = 1
k = 2
Filtration
D
L
C
D
L
C
0.000
0.000
0.000
0.000
0.000
1.000
1.000
1.000
1.000
1.000
1.000
0.900
0.994
0.996
0.998
1.000
0.900
0.813
0.801
0.793
1.000
1.000
1.000
1.000
1.000
1.000
0.900
0.994
0.996
0.998
Data
cub06
cub08
cub10
cub12
cub14
TABLE 2: Success rate (↑) for distinguishing pairs of strongly-regular graphs when using three different
filtrations (D: degree filtration, L: Laplacian filtration, C: Ollivier–Ricci curvature filtration) at varying expansion
levels of the graph (denoted by k). None of these pairs of graphs can be distinguished by 2-FWL [8].
Data
k = 1
k = 2
Filtration
k = 3
D
L
C
D
L
C
D
L
C
sr16622
sr251256
sr261034
sr291467
sr281264
sr351899
sr361446
sr401224
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.733
0.000
0.667
0.461
0.494
0.000
1.000
0.000
0.000
0.000
1.000
0.000
0.000
0.000
1.000
0.000
0.200
0.000
0.000
0.000
0.022
0.931
1.000
0.829
0.844
0.752
0.833
0.499
0.961
0.992
1.000
0.000
0.200
0.000
1.000
0.000
0.022
0.931
1.000
0.905
0.933
0.801
1.000
0.984
0.919
0.944
1.000
0.952
0.978
0.893
1.000
0.989
0.994
0.989
1.000
0.905
0.933
0.801
1.000
0.984
0.919
0.944
properties captured by the Laplacian help in distinguishing graphs. The Ollivier–Ricci curvature
filtration is performing similarly well; in contrast to the Laplacian-based filtration, it does not require
the calculation of eigenvalues, which may be prohibitive for larger graphs.7
5.2 Strongly-Regular Graphs
The second class of graphs we will be analysing consists of strongly-regular graphs. Such graphs
are known to be extremely challenging to distinguish; 2-FWL is unable to distinguish any of these
graphs, for instance. Our goal is again to highlight the utility of different filtration function choices.
Table 2 summarises the performance.
We first observe that for k = 1, i.e. for the original graph without any cliques, few pairs of graphs can
be distinguished. Notably, a curvature-based filtration is sufficient to distinguish the two graphs in
the sr16622 data set, colloquially also known as the 4 × 4 rook's graph and the Shrikhande graph.
Distinguishing between these two graphs is usually said to require knowledge about cliques [8], but it
turns out that a suitable filtration is sufficient. However, the empirical expressivity of the curvature-
based filtration appears limited for k = 1, improving only for higher-order clique complexes. The
Laplacian filtration, by contrast, exhibits strong empirical performance for k = 2, increasing to
near-perfect performance for k = 3 in almost all data sets. It is clear that knowledge about higher-
order cliques helps in driving performance here. Notice that in contrast to other algorithms [8], no
additional embedding of the graphs is required; we are comparing 'raw' persistence diagrams directly.
7
TABLE 3: Success rate (↑) for distinguishing pairs of minimal Cayley graphs when using three different
filtrations (D: degree filtration, L: Laplacian filtration, C: Ollivier–Ricci curvature filtration) at varying expansion
levels of the graph (denoted by k). Again, k = 3 is omitted because of the regularity. Values for 1-WL are
shown as a baseline.
k = 1
k = 2
Data
cay12
cay16
cay20
cay24
cay32
cay36
cay60
cay63
1-WL
D
0.67
0.83
0.61
0.65
0.76
0.69
0.69
0.49
0.67
0.83
0.61
0.66
0.77
0.69
0.69
0.49
L
1.00
1.00
1.00
1.00
1.00
1.00
1.00
1.00
Filtration
C
0.95
0.92
0.79
0.93
0.94
0.95
0.95
0.93
D
0.95
0.83
0.61
0.83
0.77
0.84
0.77
0.73
L
1.00
1.00
1.00
1.00
1.00
1.00
1.00
1.00
C
0.95
0.92
0.79
0.93
0.94
0.95
0.95
0.93
5.3 Minimal Cayley Graphs
As an additional class of complex graphs, we analyse minimal Cayley graphs, i.e. Cayley graphs
that encode a group with a minimal generating set. Minimal Cayley graphs are still a topic of active
research in graph theory, with several conjectures yet to be proven [2, 3]. We follow the same
experimental setup as described above but also show the performance of 1-WL, calculated via a
subtree Weisfeiler–Leman graph kernel [57]. For this baseline calculation, we report all pairs for
which the kernel dissimilarity is < 1.0 (given the calculation as normalised histograms, the kernel
will exhibit a self-similarity of 1.0). Table 3 shows the results. We observe that the Laplacian filtration
is trivially able to distinguish between all these graphs; this is not surprising since spectra of the
graphs are known to be characteristic [42]. The performance of the Ollivier–Ricci curvature also
points towards the utility of this formulation in practice. Interestingly, the degree filtration is the only
filtration that benefits from the availability of higher-order (i.e. clique) information.
5.4 Predicting Graph Properties
As our final experiment, we provide an empirical assessment of Theorem 3 and use topological
features to predict the diameter of graphs. Specifically, we generate N = 100 Erd ̋os–Rényi graphs
with n = 100 vertices and p = 0.1. This edge probability corresponds to the critical connectivity
regime, for which closed-form solutions of the diameter distribution are not readily available [30].
We assess the utility of persistent homology by specifying a regression task;8 to this end, we vectorise
the persistence diagrams for each filtration using Betti curves [47, 55], a simple technique that creates
a curve representation by counting the number of active topological features per threshold ε. While
this representation is technically a function, we represent it as a histogram of 10 bins and train a ridge
regression classifier via leave-one-out cross-validation to predict the diameter of each graph. We
deliberately focus only on zero-dimensional and one-dimensional persistent homology, i.e. we leave
k = 1. Using the mean absolute error (MAE) for evaluation, we find that Ollivier–Ricci curvature
performs best (0.057), followed by the Laplacian spectrum (0.061), and the degree filtration (0.065).
We observe similar things when calculating N = 100 Watts–Strogatz graphs of type (100, 5, 0.1), i.e.
we keep the same number of vertices and the same edge rewiring probability p, but connect each node
with its 5 nearest neighbours in a ring neighbourhood. Using the same classifier, we again find that
Ollivier–Ricci curvature achieves the lowest MAE (0.851), followed by the degree filtration (0.865),
and the Laplacian spectrum (1.072).
7Ollivier–Ricci curvature requires solving optimal transport problems, for which highly efficient approximative
solvers are available [24].
8Following Hartmann and Mézard [30], we take the diameter of an Erd ̋os–Rényi graph, which might consist of
different connected components, to be the largest diameter of all connected components of the graph.
8
6 Discussion
This paper provided an introduction to persistent homology for graph learning. We discussed various
aspects of the computation process and provided theoretical evidence of advantageous properties
of persistent homology. Our primary insight is that persistent homology is at least as expressive as
a corresponding 1-WL or k-FWL test, while in some cases surpassing their discriminative power.9
Our experiments underscore the theoretical expressivity properties, while also demonstrating that
persistent homology is able to capture additional properties of a graph. The utility of this method
crucially hinges on the choice of a filtration, i.e. a function that is used to assess topological features
of the graph. In light of the performance differences in our experiments, we suggest that future work
should focus on elucidating properties of classes of such functions. We give an overview of emerging
research directions before concluding this work.
Beyond Expressivity of Filtrations. Expressivity in terms of distinguishing between special
families of graphs is not the be-all and end-all of graph learning research. Considering recent
work [10, 18], an investigation of which other properties are being captured by persistent homology
would be worthwhile. Theorem 3 and Theorem 4 as well as our experiments provide a first glimpse
here. Any such research research can either focus on the overall properties of the persistent homology
calculations, i.e. provide results that are independent of the respective filtration, or focus on the
expressive power of special classes of filtrations. Along these lines, Southern et al. [59] provide a
first empirical analysis of the substructures that are being captured by curvature-based filtrations.
Any further results are strongly contingent on the respective filtration, making a learning-theoretical
investigation of which filtrations can be learnt in practice an interesting direction for future work [32].
The success of the Laplacian filtration at the experimental tasks may hint at new filtrations based
on spectral graph theory that provide a trade-off between utility and computational efficiency. We
find that this research direction is overlooked by the computational topology research community,
with most of the expressivity/stability results focusing on describing the stability of distance-based
filtrations under perturbations [15, 16], with few works focusing on graphs [4]. This paper is but
a first attempt at elucidating the theoretical utility of computational topology in a graph learning
context; advancing the field will require many more insights.
Topology-Driven Baselines & Hybrid Models. While not explicitly assessed in our experimental
setup, we envision that persistent homology may well provide a strong baseline for graph learning
applications. As previous work shows, even topology-inspired approaches, making use of concepts
such as filtrations, can approximate the performance of highly-parametrised models at a fraction of
the computational cost [47]. All insights obtained using such topological methods hint at the overall
utility of graph structural information for graph learning tasks, but it is not clear whether current
graph benchmark data actually exhibit such structures [50]. We thus hope that persistent homology
and related techniques will also find more applications in hybrid models, which are able to incorporate
geometrical–topological information about graphs. This is an emerging research topic of crucial
relevance since there are now numerous graph data sets that combine geometrical information (node
coordinates) with topological information.
Open Questions. We would like to pose the following questions to the community:
1. Is k-dimensional persistent homology strictly more expressive than k-FWL?
2. Are there classes of continuous filtration functions that are e.g. homotopy-equivalent to the
Weisfeiler–Leman set of colours?
3. Which graph properties other than the diameter and girth can be bounded or even decided by
persistent homology?
Conclusion. Our theoretical analysis of the properties of persistent homology for graph learning
tasks show the potential and benefits of a topology-based perspective. We are confident that additional
computational topology concepts will enrich and augment machine learning models, leading to new
insights about their theoretical and empirical capabilities.
9More specifically, previous work [35] showed that persistent homology is strictly more expressive than 1-WL.
In this article, when tackling k ≥ 2, we only provide counterexamples that show that there are graphs that can
be distinguished by some filtration but not by 2-FWL, for instance.
9
References
[1] V. Arvind, J. Köbler, G. Rattan, and O. Verbitsky. 'On the Power of Color Refinement'.
In: Fundamentals of Computation Theory. Ed. by A. Kosowski and I. Walukiewicz. Cham,
Switzerland: Springer, 2015, pp. 339–350.
[2] L. Babai. 'Automorphism Groups, Isomorphism, Reconstruction'. In: Handbook of Combinat-
orics. MIT Press, 1996, pp. 1447–1540.
[3] L. Babai. 'Chromatic number and subgraphs of Cayley graphs'. In: Theory and Applications
of Graphs. Ed. by Y. Alavi and D. R. Lick. 1978, pp. 10–22.
[4] U. Bauer. 'Ripser: efficient computation of Vietoris–Rips persistence barcodes'. In:
Journal of Applied and Computational Topology 5.3 (2021), pp. 391–423. DOI:
10.1007/s41468-021-00071-5.
[5] U. Bauer, T. B. Masood, B. Giunti, G. Houry, M. Kerber, and A. Rathod. 'Keeping it sparse:
Computing Persistent Homology revisited'. 2022. arXiv: 2211.09075 [cs.CG].
[6] P. Bendich, J. S. Marron, E. Miller, A. Pieloch, and S. Skwerer. 'Persistent homology analysis
of brain artery trees'. In: The Annals of Applied Statistics 10.1 (2016), pp. 198–218. DOI:
10.1214/15-AOAS886.
[7] C. Berge. The Theory of Graphs. Dover Publications, 2001.
[8] C. Bodnar, F. Frasca, Y. Wang, N. Otter, G. F. Montufar, P. Lió, and M. Bronstein. 'Weisfeiler
and Lehman Go Topological: Message Passing Simplicial Networks'. In: International Confer-
ence on Machine Learning (ICML). Ed. by M. Meila and T. Zhang. Proceedings of Machine
Learning Research 139. PMLR, 2021, pp. 1026–1037.
[9] B. Bollobás. 'Distinguishing Vertices of Random Graphs'. In: Graph Theory. Ed. by B.
Bollobás. North–Holland Mathematics Studies 62. Amsterdam, Netherlands: North–Holland,
1982, pp. 33–49. DOI: 10.1016/S0304-0208(08)73545-X.
[10] G. Bouritsas, F. Frasca, S. Zafeiriou, and M. M. Bronstein. 'Improving Graph Neural Network
Expressivity via Subgraph Isomorphism Counting'. In: IEEE Transactions on Pattern Analysis
and Machine Intelligence 45.1 (2023), pp. 657–668. DOI: 10.1109/TPAMI.2022.3154319.
[11] M. M. Bronstein, J. Bruna, T. Cohen, and P. Veliˇckovi ́c. 'Geometric Deep Learning: Grids,
Groups, Graphs, Geodesics, and Gauges'. 2021. arXiv: 2104.13478 [cs.LG].
[12] M. M. Bronstein, J. Bruna, Y. LeCun, A. Szlam, and P. Vandergheynst. 'Geometric Deep
Learning: Going beyond Euclidean data'. In: IEEE Signal Processing Magazine 34.4 (2017),
pp. 18–42. DOI: 10.1109/MSP.2017.2693418.
[13] P. Bubenik, M. Hull, D. Patel, and B. Whittle. 'Persistent homology detects curvature'. In:
Inverse Problems 36.2 (2020), p. 025008. DOI: 10.1088/1361-6420/ab4ac0.
[14] M. Carrière, F. Chazal, Y. Ike, T. Lacombe, M. Royer, and Y. Umeda. 'PersLay: A Neural
Network Layer for Persistence Diagrams and New Graph Topological Signatures'. In: Interna-
tional Conference on Artificial Intelligence and Statistics (AISTATS). Ed. by S. Chiappa and
R. Calandra. Proceedings of Machine Learning Research 108. PMLR, 2020, pp. 2786–2796.
[15] F. Chazal, V. De Silva, M. Glisse, and S. Oudot. The structure and stability of persistence
modules. Vol. 10. SpringerBriefs in Mathematics. Cham, Switzerland: Springer, 2016. DOI:
10.1007/978-3-319-42545-0.
[16] F. Chazal, V. de Silva, and S. Oudot. 'Persistence stability for geometric complexes'. In:
Geometriae Dedicata 173.1 (2014), pp. 193–214. DOI: 10.1007/s10711-013-9937-z.
[17] Y. Chen, B. Coskunuzer, and Y. Gel. 'Topological Relational Learning on Graphs'. In: Ad-
vances in Neural Information Processing Systems. Ed. by M. Ranzato, A. Beygelzimer, Y.
Dauphin, P. Liang, and J. W. Vaughan. Vol. 34. Curran Associates, Inc., 2021, pp. 27029–
27042.
[18] Z. Chen, L. Chen, S. Villar, and J. Bruna. 'Can Graph Neural Networks Count Substructures?'
In: Advances in Neural Information Processing Systems. Ed. by H. Larochelle, M. Ranzato,
R. Hadsell, M. Balcan, and H. Lin. Vol. 33. Curran Associates, Inc., 2020, pp. 10383–10395.
'Stability of persistence dia-
In: Discrete & Computational Geometry 37.1 (2007), pp. 103–120. DOI:
[19] D. Cohen-Steiner, H. Edelsbrunner, and J. Harer.
grams'.
10.1007/s00454-006-1276-5.
[20] D. Cohen-Steiner, H. Edelsbrunner, J. Harer, and Y. Mileyko. 'Lipschitz functions have Lp-
stable persistence'. In: Foundations of Computational Mathematics 10.2 (2010), pp. 127–139.
DOI: 10.1007/s10208-010-9060-6.
10
[21] C. J. Colbourn. 'On testing isomorphism of permutation graphs'. In: Networks 11.1 (1981),
pp. 13–21. DOI: 10.1002/net.3230110103.
[22] K. Coolsaet, S. D'hondt, and J. Goedgebeur. 'House of Graphs 2.0: A database of inter-
esting graphs and more'. In: Discrete Applied Mathematics 325 (2023), pp. 97–107. DOI:
10.1016/j.dam.2022.10.013. URL: https://houseofgraphs.org.
[23] C. Coupette, S. Dalleiger, and B. Rieck. 'Ollivier–Ricci Curvature for Hypergraphs: A Unified
Framework'. In: International Conference on Learning Representations (ICLR). 2023. arXiv:
2210.12048 [cs.LG]. In press.
[24] M. Cuturi. 'Sinkhorn Distances: Lightspeed Computation of Optimal Transport'. In: Advances
in Neural Information Processing Systems. Ed. by C. Burges, L. Bottou, M. Welling, Z.
Ghahramani, and K. Weinberger. Vol. 26. 2013.
[25] T. K. Dey and Y. Wang. Computational Topology for Data Analysis. Cambridge, United
Kingdom: Cambridge University Press, 2022. DOI: 10.1017/9781009099950.
[26] H. Edelsbrunner and J. Harer. 'Persistent homology-a survey'. In: Surveys on discrete and
computational geometry: Twenty years later. Ed. by J. E. Goodman, J. Pach, and R. Pollack.
Contemporary Mathematics 453. Providence, RI, USA: American Mathematical Society, 2008,
pp. 257–282.
[27] H. Edelsbrunner, D. Letscher, and A. J. Zomorodian. 'Topological persistence and sim-
plification'. In: Discrete & Computational Geometry 28.4 (2002), pp. 511–533. DOI:
10.1007/s00454-002-2885-2.
[28] R. J. Gardner, E. Hermansen, M. Pachitariu, Y. Burak, N. A. Baas, B. A. Dunn, M.-B. Moser,
and E. I. Moser. 'Toroidal topology of population activity in grid cells'. In: Nature 602.7895
(2022), pp. 123–128. DOI: 10.1038/s41586-021-04268-7.
[29] M. Grohe. 'The Logic of Graph Neural Networks'. In: Annual ACM/IEEE Symposium on Logic
in Computer Science (LICS). 2021, pp. 1–17. DOI: 10.1109/LICS52264.2021.9470677.
[30] A. K. Hartmann and M. Mézard. 'Distribution of diameters for Erd ̋os–Rényi random graphs'.
In: Physical Review E 97 (3 2018), p. 032128. DOI: 10.1103/PhysRevE.97.032128.
[31] C. Hofer, R. Kwitt, M. Niethammer, and A. Uhl. 'Deep Learning with Topological Signatures'.
In: Advances in Neural Information Processing Systems. Ed. by I. Guyon, U. V. Luxburg,
S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett. Vol. 30. 2017, pp. 1634–
1644.
[32] C. D. Hofer, F. Graf, B. Rieck, M. Niethammer, and R. Kwitt. 'Graph Filtration Learning'.
In: International Conference on Machine Learning (ICML). Ed. by H. Daumé III and A.
Singh. Proceedings of Machine Learning Research 119. PMLR, 2020, pp. 4314–4323. arXiv:
1905.10996 [cs.LG].
[33] C. D. Hofer, R. Kwitt, and M. Niethammer. 'Learning Representations of Persistence Bar-
codes'. In: Journal of Machine Learning Research 20.126 (2019), pp. 1–45.
[34] D. Horak, S. Maleti ́c, and M. Rajkovi ́c. 'Persistent homology of complex networks'. In:
Journal of Statistical Mechanics: Theory and Experiment 2009.3 (2009), P03034. DOI:
10.1088/1742-5468/2009/03/P03034.
[35] M. Horn, E. De Brouwer, M. Moor, Y. Moreau, B. Rieck, and K. Borgwardt. 'Topological
Graph Neural Networks'. In: International Conference on Learning Representations (ICLR).
2022. URL: https://openreview.net/forum?id=oxxUMeFwEHd.
[36] C. K. Joshi, C. Bodnar, S. V. Mathis, T. Cohen, and P. Liò. 'On the Expressive Power of
Geometric Graph Neural Networks'. 2023. arXiv: 2301.09308 [cs.LG].
[37] P. J. Kelly. 'A congruence theorem for trees'. In: Pacific Journal of Mathematics 7.1 (1957),
pp. 961–968. DOI: pjm/1103043674.
[38] R. Kwitt, S. Huber, M. Niethammer, W. Lin, and U. Bauer. 'Statistical Topological Data
Analysis - A Kernel Perspective'. In: Advances in Neural Information Processing Systems.
Ed. by C. Cortes, N. Lawrence, D. Lee, M. Sugiyama, and R. Garnett. Vol. 28. 2015.
[39] T. Leinster. 'The Euler characteristic of a category'. In: Documenta Mathematica 13 (2008),
pp. 21–49.
[40] E. Levina and P. Bickel. 'The Earth Mover's distance is the Mallows distance: some insights
from statistics'. In: IEEE International Conference on Computer Vision (ICCV). Vol. 2. 2001,
pp. 251–256. DOI: 10.1109/ICCV.2001.937632.
11
[41] S. Lim, F. Memoli, and O. B. Okutan. Vietoris–Rips Persistent Homology, Injective Metric
Spaces, and The Filling Radius. 2020. arXiv: 2001.07588 [math.AT].
[42] L. Lovász. 'Spectra of graphs with transitive groups'. In: Periodica Mathematica Hungarica
6.2 (1975), pp. 191–195.
McKay.
[43] B.
strongly-regular
https://users.cecs.anu.edu.au/~bdm/data/graphs.html.
Collection
of
graphs.
URL:
[44] C. Morris, Y. Lipman, H. Maron, B. Rieck, N. M. Kriege, M. Grohe, M. Fey, and K. Borgwardt.
'Weisfeiler and Leman go Machine Learning: The Story so far'. 2021. arXiv: 2112.09992
[cs.LG].
[45] C. Morris, M. Ritzert, M. Fey, W. L. Hamilton, J. E. Lenssen, G. Rattan, and M. Grohe.
'Weisfeiler and Leman Go Neural: Higher-Order Graph Neural Networks'. In: AAAI Conference
on Artificial Intelligence. 2019. DOI: 10.1609/aaai.v33i01.33014602.
J. R. Munkres. Elements of Algebraic Topology. Menlo Park, California, USA: Addison–Wesley
Publishing Company, 1984.
[46]
[47] L. O'Bray, B. Rieck, and K. Borgwardt. 'Filtration Curves for Graph Representation'.
In: International Conference on Knowledge Discovery & Data Mining (KDD). New
York, NY, USA: Association for Computing Machinery, 2021, pp. 1267–1275. DOI:
10.1145/3447548.3467442.
[48] Y. Ollivier. 'Ricci curvature of metric spaces'. In: Comptes Rendus Mathematique 345.11
(2007), pp. 643–646. DOI: 10.1016/j.crma.2007.10.041.
[50]
[49] N. Otter, M. A. Porter, U. Tillmann, P. Grindrod, and H. A. Harrington. 'A roadmap for the
computation of persistent homology'. In: EPJ Data Science 6.1 (2017), 17:1–17:38. DOI:
10.1140/epjds/s13688-017-0109-5.
J. Palowitch, A. Tsitsulin, B. Mayer, and B. Perozzi. 'GraphWorld: Fake Graphs Bring Real
Insights for GNNs'. In: Proceedings of the 28th ACM SIGKDD Conference on Knowledge
Discovery and Data Mining. 2022, pp. 3691–3701. DOI: 10.1145/3534678.3539203.
J. Reininghaus, S. Huber, U. Bauer, and R. Kwitt. 'A stable multi-scale kernel for topological
machine learning'. In: IEEE Conference on Computer Vision and Pattern Recognition (CVPR).
2015, pp. 4741–4748. DOI: 10.1109/CVPR.2015.7299106.
[51]
[52] B. Rieck. 'Persistent Homology in Multivariate Data Visualization'. PhD thesis. Heidelberg
University, 2017. DOI: 10.11588/heidok.00022914.
[53] B. Rieck, C. Bock, and K. Borgwardt. 'A Persistent Weisfeiler–Lehman Procedure for
Graph Classification'. In: International Conference on Machine Learning (ICML). Ed. by
K. Chaudhuri and R. Salakhutdinov. Proceedings of Machine Learning Research 97. PMLR,
2019, pp. 5448–5458.
[54] B. Rieck, U. Fugacci, J. Lukasczyk, and H. Leitte. 'Clique Community Persistence: A Topolo-
gical Visual Analysis Approach for Complex Networks'. In: IEEE Transactions on Visualiza-
tion and Computer Graphics 24.1 (2018), pp. 822–831. DOI: 10.1109/TVCG.2017.2744321.
[55] B. Rieck, F. Sadlo, and H. Leitte. 'Topological Machine Learning with Persistence Indicator
Functions'. In: Topological Methods in Data Analysis and Visualization V. Ed. by H. Carr,
I. Fujishiro, F. Sadlo, and S. Takahashi. Cham, Switzerland: Springer, 2020, pp. 87–101. DOI:
10.1007/978-3-030-43036-8_6. arXiv: 1907.13496 [math.AT].
[56] R. Sato. 'A Survey on The Expressive Power of Graph Neural Networks'. 2020. arXiv:
2003.04078 [cs.LG].
[57] N. Shervashidze, P. Schweitzer, E. J. van Leeuwen, K. Mehlhorn, and K. M. Borgwardt.
'Weisfeiler–Lehman Graph Kernels'. In: Journal of Machine Learning Research 12.77 (2011),
pp. 2539–2561.
[58] P. Škraba and K. Turner. 'Wasserstein Stability for Persistence Diagrams'. 2020. arXiv:
[59]
2006.16824 [math.AT].
J. Southern, J. Wayland, M. Bronstein, and B. Rieck. 'Curvature Filtrations for Graph Generat-
ive Model Evaluation'. 2023. arXiv: 2301.12906 [cs.LG].
[60] R. Turkeš, G. Montúfar, and N. Otter. 'On the Effectiveness of Persistent Homology'. In:
Advances in Neural Information Processing Systems. Ed. by A. H. Oh, A. Agarwal, D. Belgrave,
and K. Cho. 2022. URL: https://openreview.net/forum?id=DRjUkfExCix.
12
[61] K. Turner, Y. Mileyko, S. Mukherjee, and J. Harer. 'Fréchet Means for Distributions of
Persistence Diagrams'. In: Discrete & Computational Geometry 52.1 (2014), pp. 44–70. DOI:
10.1007/s00454-014-9604-7.
[62] C. Villani. Optimal Transport. Old and New. Grundlehren der mathematischen Wissenschaften
338. Springer, 2009.
[63] K. Xu, W. Hu, J. Leskovec, and S. Jegelka. 'How Powerful are Graph Neural Net-
works?' In: International Conference on Learning Representations (ICLR). 2019. URL:
https://openreview.net/forum?id=ryGs6iA5Km.
[64] Z. Yan, T. Ma, L. Gao, Z. Tang, Y. Wang, and C. Chen.
'Neural Approxima-
tion of Graph Topological Features'. In: Advances in Neural Information Processing
Systems. Ed. by A. H. Oh, A. Agarwal, D. Belgrave, and K. Cho. 2022. URL:
https://openreview.net/forum?id=qwjrO7Rewqy.
[65] X. Ye, F. Sun, and S. Xiang. 'TREPH: A Plug-In Topological Layer for Graph Neural Net-
works'. In: Entropy 25.2 (2023). ISSN: 1099-4300. DOI: 10.3390/e25020331.
[66] Q. Zhao and Y. Wang. 'Learning metrics for persistence-based summaries and applications
for graph classification'. In: Advances in Neural Information Processing Systems. Ed. by H.
Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett. Vol. 32.
2019, pp. 9855–9866.
[67] Q. Zhao, Z. Ye, C. Chen, and Y. Wang. 'Persistence Enhanced Graph Neural Network'. In:
International Conference on Artificial Intelligence and Statistics (AISTATS). Ed. by S. Chiappa
and R. Calandra. Proceedings of Machine Learning Research 108. PMLR, 2020, pp. 2896–
2906.
13
FIGURE 4: A depiction of the utilities problem. Three houses (top row) are supposed to be connected to three
different utilities (bottom row; commonly referred to as water, gas, and electricity) without the connection lines
crossing one another. The figure shows an incorrect solution in which crossings occur. Using Eq. (1), we can
prove that no such solution can exist in the plane. To see this, we set V = 3 and E = 9, as required by the
utilities problem. Eq. (1) now states that F = 8. However, we can see that F can be at most half the number of
edges, i.e. F ≤ 4. This is true because the edges of any face generated by a planar embedding have to alternate
between the houses and utilities, respectively, meaning that every face has at least 4 edges, and each edge belongs
to exactly 2 faces.
A Using Euler's Formula
Euler's formula is typically used to solve certain problems in graph theory, such as the utilities
problem described in Fig. 4. While arguably a contrived example in the context of machine learning,
it nevertheless proves the point that a fundamental perspective of structural properties of a graph can
well be used to reason about them. The expressive power of such simple computational invariants
should not be underestimated, with recent work showing how to assign invariants like the Euler
characteristic in a more abstract context [39].
B Counting Connected Components
Since the main text deals with higher-order topological features, and such features afford a substan-
tially less intuitive grasp, we want to briefly comment on how to obtain β0, the number of connected
components. As with many problems in computer science, this procedure turns out to be simple if
we pick our data structures correctly. Here, we need a union–find data structure, also known as a
disjoint set forest. This data structure is built on the vertices of a graph and affords two operations,
viz. union (or merge) and find. The merge operation assigns two vertices to the same connected
component, while the find operation returns the current connected component of a vertex. Building
such a data structure is reasonably easy in programming languages like Python, which offer associ-
ative arrays. Algorithm 1 shows one particular pseudo-code implementation of a simple union–find
data structure. The pseudo-code assumes that all operations are changing objects 'in place.' Notice
that the find operation is implemented implicitly via a lookup in the merge function. A proper
object-oriented implementation of a union–find data structure should have these two operations in its
public interface.
UF ← {}
for v ∈ V do
UF[v] ← v
end for
for e = (v, w) ∈ E do
merge(UF, v, w)
ALGORITHM 1 Using associative arrays to find connected components
1: function get_connected_components(V, E)
2:
3:
4:
5:
6:
7:
8:
9:
10: end function
11: function merge(UF, v, w)
if UF[v] ̸= UF[w] then
12:
13:
14:
15: end function
end for
return {v | UF[v] = v}
UF[v] ← w
end if
14
C A Primer in Computational Topology
With the understanding that our readers have different backgrounds, the following section provides a
primer of the most relevant concepts in computational topology.
C.1 Simplicial Homology
The Betti numbers of a graph are actually a special instance of a more generic concept, known as
simplicial homology. We will see that under this framework, the Betti numbers are the ranks of
the zeroth and first homology group, respectively. Simplicial homology is not required in order to
understand most of the results of this paper, but an appreciation for some of the concepts will be
helpful in understanding connections to other concepts. We try to provide a self-contained introduction
to the most relevant concepts and refer to the textbook by Munkres [46] for a more in-depth exposition
of these concepts. We start by introducing the central object of algebraic topology-the simplicial
complex.10
Definition 1 (Simplicial complex). A simplicial complex K is a system of sets that is closed under
the subset operation. Thus, for any σ ∈ K and τ ⊆ σ, we have τ ∈ K. An element σ ∈ K with
|σ| = k + 1 is also referred to as a k-simplex. We also express this by writing dim σ = k. Moreover,
if k is maximal among all the simplices of K, we say that the K is a k-dimensional simplicial complex.
Note that there is an unfortunate shift in dimensions: a k-simplex has indeed k + 1 elements. This
convention makes sense when we relate it to the concept of dimension. A 0-simplex, i.e. a point or a
vertex, should be assigned a dimension of 0. The reader should thus mentally equate the dimension
of a simplex with its dimension. The text will aim to quell any confusion about such shifts. The
quintessential example of a simplicial complex is a graph G = (V, E). Setting K := V ∪E, we obtain
a 1-dimensional simplicial complex. We may calculate additional types of simplicial complexes from
a graph, for instance by expanding each (k + 1)-clique into a k-simplex [34, 54].
The simplicial complex on its own is only a set system; to perform calculations with this type of
data structure, we need to imbue it with additional operations. One of the most common operations
involves defining homomorphisms between the subsets of a simplicial complex K.
Definition 2 (Chain group of a simplicial complex). Given a simplicial complex K, the vector space
generated over Z2 coefficients whose elements are the k-simplices of K is called the kth chain group,
denoted by Ck(K). The elements of a chain group are also referred to as simplicial chains.
Elements of the chain group are thus sums of simplices of a compatible dimension. For instance,
we may write the sum of all edges of a graph to obtain a valid simplicial chain. Operating over Z2
coefficients means that σ + σ = 0, the empty chain, for all σ ∈ K.11 Simplicial chains permit us to
define homomorphisms between chain groups, which will ultimately permit us to treat topological
questions with tools of linear algebra.
Definition 3 (Boundary homomorphism). Given σ = (v0, . . . , vk) ∈ K, we define the kth boundary
homomorphism ∂k : Ck(K) → Ck−1(K) as
∂k(σ) :=
k
(cid:88)
(v0, . . . , vi−1, vi+1, . . . , vk),
i=0
(7)
i.e. a sum of simplices with the ith entry-vertex-of the simplex missing, respectively.
It is sufficient to define ∂k on individual simplices; since it is a homomorphism, it extends to arbitrary
simplicial chains. Fig. 5 shows an example of this calculation. The boundary operator already assigns
some algebraic structure to K, but it turns out that we can use it to assign a set of groups to the
simplicial complex.
10Technically, we will be working with abstract simplicial complexes. A definition of a simplicial complex in
terms of convex subsets is also possible, but this necessitates understanding certain nuances that are irrelevant
to this paper.
11Readers familiar with algebraic topology will recognise Z2 as a deliberate choice of coefficient field for the
subsequent calculations. Other choices are possible, but the computational topology community predominantly
uses Z2 coefficients in practice, with very few exceptions [28]. However, all the proofs and concepts introduced
in this paper apply, mutatis mutandis, for other coefficient sets as well.
15
c
b
a
The triangle is a simple simplicial complex, consisting of one 2-simplex,
three 1-simplices and three 0-simplices, respectively. The boundary of the
2-simplex is non-zero: we have ∂2{a, b, c} = {b, c} + {a, c} + {a, b}.
The set of edges, on the other hand, does not have a boundary,
i.e.
∂1 ({b, c} + {a, c} + {a, b}) = {c} + {b} + {c} + {a} + {b} + {a} = 0,
because the simplices cancel each other out.
FIGURE 5: Calculating the boundaries of a 2-simplex and the boundary of a simplicial chain consisting of
1-simplices. Notice that the boundary of a boundary is always zero. This is a fundamental property of persistent
homology. The figure is slightly adapted from Rieck [52].
Definition 4 (Homology group). We define the kth homology group of a simplicial complex K as
Hk(K) := ker ∂k/ im ∂k+1,
(8)
i.e. a quotient group that we obtain from the two subgroups ker ∂k and im ∂k+1 of Ck.
The kth homology group of a simplicial complex contains its k-dimensional topological features in
the form of equivalence classes of simplicial chains, also known as homology classes. This rather
abstract definition is best understood by an additional simplification step that involves calculating the
rank of a homology group.
Definition 5 (Betti number). The rank of the kth homology group Hk(K) is known as the kth Betti
number, denoted by βk.
Despite the rank being a rather coarse summary, Betti numbers turn out to be of immense utility in
comparing different simplicial complexes. We may even reproduce Eq. (2) by noting that the Euler
characteristic χ(K) := (cid:80)
i(−1)i |{σ | dim σ = i}| can also be expressed as a sum of alternating
Betti numbers, i.e. χ(K) := (cid:80)
i(−1)iβi. For a proof of this surprising fact, see e.g. Munkres [46, p.
124]. Using this equivalence, we see that we can calculate β1 by reshuffling some of the terms, thus
also explaining why Eq. (2) exhibits alternating signs.
At this point, we have introduced a large amount of algebraic machinery. Changing our focus back to
graphs, we may reap some advantageous properties by noting that homology groups are somewhat
preserved under graph isomorphism.12
Lemma 1. Let G, G′ be two isomorphic graphs with φ : G → G′ their corresponding isomorphism.
Then the homology groups of G and G′ are isomorphic, i.e. Hp(G) ≃ Hp(G′) for all p.
Proof. This is a consequence of the functoriality of homology, which implies that any function
f : G → G′ induces a function fp : Hp(G) → Hp(G′) on the homology level. This function has
the property that it composes in a natural manner with any other function g : G → G′, namely
(f ◦ g)p = fp ◦ gp. In other words, functoriality implies that the evaluation order does not matter, or,
intuitively, that the induced function commutes with function evaluation. In our case, setting f = φ
and g = φ−1, this implies that (φ ◦ φ−1)p = φp ◦ φ−1
p , with idp representing
the identity function induced on the homology groups. The same calculations with f, g swapped
show that the homology groups are isomorphic, with the isomorphism induced by φ, the isomorphism
■
between G and G′.
p , i.e. idp = φp ◦ φ−1
As a direct corollary, the Betti numbers of G and G′ do not change, and in fact, a similar property
holds for isomorphic simplicial complexes. This may be seen as a hint about the popularity of
simplicial homology in algebraic topology: the framework leads directly to characteristic descriptions
that remain invariant under (graph) isomorphism.
C.2 Persistent Homology
Because of their conceptual simplicity-their calculation in low dimensions only involves knowledge
about the connected components of a graph-Betti numbers are somewhat limited in their expressivity.
Taking any graph G = (V, E), even the addition of a single edge to G will change its Betti numbers,
12The reader well-versed in algebraic topology may be aware of this property directly, but we find it useful to
mention this fact briefly.
16
either by merging two connected components (thus decreasing β0) or by creating an additional
cycle (thus increasing β1). This is a direct consequence of Eq. (2), which, effectively, states that the
insertion of a new edge e = (u, v) with u, v ∈ V either causes β1 to increase by 1 because m changes,
or remain the same in case the number of connected components β0 changes. However, a single
edge may only merge two connected components into one, so β0 may also at most decrease by 1.
This indicates that Betti numbers are too coarse to be practically useful in large-scale graph analysis.
It is possible to turn Betti numbers into a multi-scale descriptor of a graph. This requires certain
modifications to the previously-introduced concepts. Similar to Appendix C.1, we will formulate
everything in terms of simplicial complexes, again pointing out that this results in a more general
description.
Definition 6 (Filtration). Given a simplicial complex K, we call a sequence of simplicial complexes
filtration if it affords a nesting property of the form
∅ = K0 ⊆ K1 ⊆ * * * ⊆ Km−1 ⊆ Km = K.
(9)
Since each element of this sequence is a valid simplicial complex, we can also think of this construction
as 'growing' K by adding simplices one after the other.
Filtrations arise naturally when building simplicial complexes from point cloud data, but even in
the context of graphs, we can imagine filtrations as filtering a graph based on some type of data, or
function, assigned to its vertices. For instance, we may build a filtration of a graph based on the
degree of its vertices, defining Ki to be the subgraph consisting of all vertices satisfying the degree
condition, plus all edges whose endpoints satisfy it, i.e.
Ki := {v ∈ V | deg(v) ≤ i} ∪ {{u, v} ∈ E | deg(u) ≤ i ∧ deg(v) ≤ i}.
(10)
Notice that we could also express the second condition more compactly by assigning to each
1-simplex (each edge) the maximum of the weight of its vertices. This construction is sometimes
also referred to as a lower-star filtration since it extends a node-level function to higher-order
simplices [25]. Not all filtrations have to be defined on the vertex level; as long as each edge in
the filtration is preceded by its vertices, we can also build valid filtrations from functions that are
primarily defined on edges.13
Setting aside further discussions about how to obtain filtrations for now, filtrations are compatible with
the simplicial homology framework introduced above. The boundary operators ∂(*), together with
the inclusion homomorphism between consecutive simplicial complexes, induce a homomorphism
between corresponding homology groups of any filtration of m simplicial complexes. Given i ≤ j,
we write ιi,j : Hk(Ki) → Hk(Kj) to denote this homomorphism. This construction yields a sequence
of homology groups
0 = Hk(K0)
ι0,1
k−−→ Hk(K1)
ι1,2
k−−→ . . .
ιm−2,m−1
k−−−−−−→ Hk(Km−1)
ιm−1,m
k−−−−−→ Hk(Km) = Hk(K)
(11)
for every dimension k. We then define the kth persistent homology group as
Hi,j
d := ker ∂k(Ki)/(im ∂k+1(Kj) ∩ ker ∂k(Ki)),
containing all topological features-homology classes-created in Ki that still exist in Kj. Following
the definition of the ordinary Betti number, we then define the kth persistent Betti number to be the
rank of this group, leading to βi,j
k . It should be noted that this type of construction
k
makes use of numerous deep mathematical concepts; for the sake of an expository article, we heavily
summarise and compress everything to the most pertinent results.
:= rank Hi,j
(12)
The appeal of persistent homology can be seen when we start to make use of the features it captures.
If we assume that our filtration is associated with a set of values a0 ≤ a1 ≤ * * * ≤ am−1 ≤ am, such
as the function values on the vertices, we can calculate persistence diagrams, i.e. simple topological
feature descriptors.
Definition 7 (Persistence diagram). The k-dimensional persistence diagram of a filtration is the
multiset of points in R2 that, for each pair i, j with i ≤ j, stores the tuple (ai, aj) with multiplicity
(cid:17)
(cid:16)
(cid:16)
(cid:17)
μ(k)
i,j :=
βi,j−1
k
− βi,j
k
−
βi−1,j−1
k
− βi−1,j
k
.
(13)
13In Section 5, we will make use of a filtration defined on edge-based curvature values.
17
We will also assign a multiplicity to essential topological features of the simplicial complex, setting
(14)
which denotes all features that are still present in the last simplicial complex of the filtration, i.e. in
Km = K. The persistence diagram thus contain all the information carried by Betti numbers.
μ(k)
i,∞ := βi,m
k − βi−1,m
k
,
Persistence diagrams summarise the topological activity of a filtration. Given a persistence diagram D,
for any tuple (ai, aj), the quantity ∥aj − ai∥ is called the persistence of the respective topological
feature. Persistence indicates whether a feature, created in some simplicial complex during the
filtration, is prominent or not. This notion was originally introduced by Edelsbrunner, Letscher,
and Zomorodian [27] to analyse the relevance of topological features of a distance function; the
terminology is supposed to indicate the prominence of a topological feature. Features with a high
persistence are commonly taken to be relevant, whereas features with a low persistence used to be
considered as noise; this assumption is changing as, depending on the filtration, low persistence may
also just imply 'low reliability.' [6]
Persistence diagrams can be endowed with different metrics and kernels [38, 51], and it is known that
the space of persistence diagrams is an Alexandrov space with curvature bounded from below [61].
The most common metric to compare two persistence diagrams is the bottleneck distance, defined as
(15)
dB(D, D′) := inf
∥x − η(x)∥∞,
η : D→D′
sup
x∈DD
where η ranges over all bijections between the two persistence diagrams. Eq. (15) is solved using
optimal transport; different cardinalities are handled by permitting points in one diagram to be
transported to their corresponding projection on the diagonal. Another metric is the Wasserstein
distance, in which the sup calculation is replaced by a weighted sum over all distances between
points in a diagram.
D Proofs
For the convenience of the reader, we restate all results again before providing their proof.
When working with filtrations in the subsequent proofs, it would be ideal to have filtrations that
satisfy injectivity on the level of vertices, i.e. f (v) ̸= f (v′) if v ̸= v′. Such injective filtrations have
the advantage of permitting gradient-based optimisation schemes [32]. The following lemma, first
proved in Horn et al. [35], demonstrates that injectivity is not a strict requirement, though, as it is
always possible to find an injective filtration function that is arbitrarily close (in the Hausdorff sense)
to a non-injective filtration function.
Lemma 2. For all ε > 0 and a filtration function f defined on the vertices, i.e. f : V → Rd, there is
an injective function ̃f : V → Rd such that ∥f − ̃f ∥∞ < ε.
Proof. Let V = {v1, . . . , vn} be the vertices of a graph and im f = {u1, . . . , um} be their images
under f . Since f is not injective, we have m < n. We resolve non-injective vertex pairs iteratively.
For u ∈ im f , let V ′ := {v ∈ V | f (v) = u}. If V ′ only contains a single element, we do not have to
do anything. Otherwise, for each v′ ∈ V ′, pick a new value from Bε(u) \ im f , where Br(x) ⊂ Rd
refers to the open ball of radius r around a point x (for d = 1, this becomes an open interval in R,
but the same reasoning applies in higher dimensions). Since we only ever remove a finite number of
points, such a new value always exists, and we can modify im f accordingly. The number of vertex
pairs for which f is non-injective decreases by at least one in every iteration, hence after a finite
number of iterations, we have modified f to obtain ̃f , an injective approximation to f . By always
picking new values from balls of radius ε, we ensure that ∥f − ̃f ∥∞ < ε, as required.
■
Theorem 2. (∗) Let G ≃ G′ be two isomorphic graphs, and φ be the respective isomorphism. For
any equivariant filtration f , the corresponding persistence diagrams are equal.
Proof. Since G ≃ G′, there exists a permutation σ such that σ(G) = G′. Moreover, since f is
equivariant, the image of G under f will just be permutation of vectorial coordinates. This, in turn,
implies that all weights of vertices and edges of G are permuted. This does not change the calculation
of persistent homology, though, because the ordering given by the filtration does not change. The
■
persistence diagrams of G and G′ thus coincide.
18
Theorem 3. (∗) Given any vertex-based filtration f of a graph G with a single connected component,
we can upper-bound diam(G), the diameter of G, based on D0, the resulting persistence diagram in
dimension 0.
Proof. We can provide a procedure to obtain an upper bound d of diam(G) alongside the calculation
of D0. To this end, we set d = 0. While calculating D0 with Algorithm 1, we check for each edge
whether it is a creator or destroyer. If the edge is a destroyer, we stop. Else, we increase d by one.
This procedure works because diam(G) is the diameter of the minimum spanning tree of G. Our
estimate d counts the number of edges in such a tree. We thus have diam(G) ≤ d. The bound is tight
■
for some graphs, such as line graphs.
Theorem 4. (∗) Given any vertex-based filtration f of a graph G, we can upper-bound the girth of G
using the persistence diagrams in dimension 0 and 1.
Proof. Similar to Theorem 3, we can use the calculation of D0, the persistence diagram in dimen-
sion 0, of the filtration function to obtain an upper bound of the girth of the graph. We calculate D0
with Algorithm 1, checking once again for each edge whether it is a creator or destroyer. If the edge
is a destroyer, we stop and set our upper bound of the girth g to be the number of vertices in the
two connected components that are being merged by the destroyer edge. Since the addition of the
respective edge is guaranteed to create a cycle-the edge is a destroyer-the cycle has to make use
of at least two vertices of the respective connected components. Our estimate g thus constitutes an
■
upper bound of the girth of the graph.
Theorem 6. Given 1-WL colourings of two graphs G and G′ that are different, there exists a filtration
of G and G′ such that their persistence diagrams in dimension 0 are also different.
Proof. Since the colourings are different, there is an iteration h of 1-WL such that the label sequences
of G and G′ are different. We thus have at least one colour-equivalently, one label-whose count
is different. Let L(h) := {l1, l2, . . . } be an enumeration of the finitely many hashed labels at
iteration h. We can build a filtration function f by assigning a vertex v with label li to its index, i.e.
f (v) := i, and setting f (v, w) := max {f (v), f (w)} for an edge (v, w). The resulting 0-dimensional
persistence diagrams for G and G′, denoted by D0 and D′
0, respectively, now contain tuples of the
form (i, j). Moreover, each vertex is guaranteed to give rise to exactly one such pair since each vertex
creates a connected component in 0-dimensional persistent homology. Letting μ(i,j)(D0) refer to the
multiplicity of a tuple in D0, we know that, since the label count is different, there is at least one
■
0). Hence, D0 ̸= D′
tuple (k, l) with μ(k,l)(D0) ̸= μ(k,l)(D′
0.
Theorem 5. (∗) Given k-FWL colourings of two graphs G and G′ that are different, there exists
a filtration of G and G′ such that the corresponding persistence diagrams in dimension k − 1 or
dimension k are different.
Proof. The main idea involves harnessing the colours of k-tuples. We first identify all colours
c1, c2, . . . with natural numbers 1, 2, . . . We then expand G and G′ to a simplicial complex that
contains all k-tuples as its faces.14 Moreover, we assign all simplices in dimensions less than or equal
to k − 2 a weight of 0. Each (k − 1)-simplex is assigned its colour according to the respective k-FWL
colouring. As a consequence of the pairing lemma of persistent homology, every (k − 1)-simplex is
either a creator simplex or a destroyer simplex [26].
We handle the case of creator simplices first. Each creator simplex gives rise to an essential persistence
pair in the (k − 1)-dimensional persistence diagram. Each such pair is of the form (i, ∞), where ci
is a colour according to k-FWL.
Each destroyer simplex, by contrast, destroys a topological feature created by a (k − 2)-simplex, i.e.
a (k − 1)-tuples, resulting in a pair of the form (*, j), with again cj being the corresponding k-FWL
colour. This pair is part of a (k − 2)-dimensional persistence diagram.
14When dealing with tuples or simplices, there is always the risk of an off-by-one error. In this theorem, despite
dealing with k-FWL, only the (k − 1)-simplices, which have k vertices, will be relevant.
19
By assumption, the k-FWL colours of G and G′ are different, so there must exist a colour c whose
count is different in G and G′, respectively. Since the sum of all colours arising in the two types of
persistence pairs above is the number of colours of k-tuples, there is either a difference in colour
counts in the (k − 1)-dimensional or the (k − 2)-dimensional persistence diagrams of G and G′,
■
showing that they are not equal.
E Topology and the Weisfeiler–Leman Hierarchy
In the following, we want to briefly extend the argumentation of the expressivity of persistent
homology with respect to the Weisfeiler–Leman hierarchy. Since 1-WL is oblivious to certain
topological structures such as cycles [1], the existence of graphs with different Betti number counts
proves that persistent homology is strictly more expressive than 1-WL. For example, consider a graph
. This graph has β0 = β1 = 2 since it consists of two
consisting of the union of two triangles, i.e.
connected components and two cycles. If we change the connectivity slightly to obtain a hexagon, i.e.
, we obtain a graph with β0 = β1 = 1. 1-WL is not able to distinguish between these graphs, but
persistent homology can, since the Betti numbers of the graph are still encoded in the persistence
diagram as essential features. Note that Theorem 6 does not apply to arbitrary filtrations since the
theorem requires knowing the correct labels assigned by 1-WL. Finding filtration functions that
are able to split graphs in a manner that is provably equivalent to 1-WL remains an open research
question.
20
|
|
http://arxiv.org/abs/2302.09818v1 | 2023-02-20T07:46:14 | 2023-02-20T07:46:14 | FormerTime: Hierarchical Multi-Scale Representations for Multivariate
Time Series Classification | Deep learning-based algorithms, e.g., convolutional networks, have
significantly facilitated multivariate time series classification (MTSC) task.
Nevertheless, they suffer from the limitation in modeling long-range dependence
due to the nature of convolution operations. Recent advancements have shown the
potential of transformers to capture long-range dependence. However, it would
incur severe issues, such as fixed scale representations, temporal-invariant
and quadratic time complexity, with transformers directly applicable to the
MTSC task because of the distinct properties of time series data. To tackle
these issues, we propose FormerTime, an hierarchical representation model for
improving the classification capacity for the MTSC task. In the proposed
FormerTime, we employ a hierarchical network architecture to perform
multi-scale feature maps. Besides, a novel transformer encoder is further
designed, in which an efficient temporal reduction attention layer and a
well-informed contextual positional encoding generating strategy are developed.
To sum up, FormerTime exhibits three aspects of merits: (1) learning
hierarchical multi-scale representations from time series data, (2) inheriting
the strength of both transformers and convolutional networks, and (3) tacking
the efficiency challenges incurred by the self-attention mechanism. Extensive
experiments performed on $10$ publicly available datasets from UEA archive
verify the superiorities of the FormerTime compared to previous competitive
baselines. | [
"Mingyue Cheng",
"Qi Liu",
"Zhiding Liu",
"Zhi Li",
"Yucong Luo",
"Enhong Chen"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09818v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09818v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.AI"
] | FormerTime: Hierarchical Multi-Scale Representations for
Multivariate Time Series Classification
Mingyue Cheng1, Qi Liu1∗, Zhiding Liu1, Zhi Li2, Yucong Luo1, Enhong Chen1
1Anhui Province Key Laboratory of Big Data Analysis and Application, University of Science and Technology of China
& State Key Laboratory of Cognitive Intelligence, Hefei, China,
2 Shenzhen International Graduate School, Tsinghua University, Shenzhen, China
{mycheng,doge,prime666}@mail.ustc.edu.cn,{qiliuql,cheneh}@ustc.edu.cn,[email protected]
3
2
0
2
b
e
F
0
2
]
G
L
.
s
c
[
1
v
8
1
8
9
0
.
2
0
3
2
:
v
i
X
r
a
ABSTRACT
Deep learning-based algorithms, e.g., convolutional networks, have
significantly facilitated multivariate time series classification (MTSC)
task. Nevertheless, they suffer from the limitation in modeling long-
range dependence due to the nature of convolution operations.
Recent advancements have shown the potential of transformers to
capture long-range dependence. However, it would incur severe
issues, such as fixed scale representations, temporal-invariant and
quadratic time complexity, with transformers directly applicable to
the MTSC task because of the distinct properties of time series data.
To tackle these issues, we propose FormerTime, an hierarchical
representation model for improving the classification capacity for
the MTSC task. In the proposed FormerTime, we employ a hierar-
chical network architecture to perform multi-scale feature maps.
Besides, a novel transformer encoder is further designed, in which
an efficient temporal reduction attention layer and a well-informed
contextual positional encoding generating strategy are developed.
To sum up, FormerTime exhibits three aspects of merits: (1) learn-
ing hierarchical multi-scale representations from time series data,
(2) inheriting the strength of both transformers and convolutional
networks, and (3) tacking the efficiency challenges incurred by the
self-attention mechanism. Extensive experiments performed on 10
publicly available datasets from UEA archive verify the superiorities
of the FormerTime compared to previous competitive baselines.
CCS CONCEPTS
• Computing methodologies → Neural networks; • Mathe-
matics of computing → Time series analysis.
KEYWORDS
Multivariate time series classification, Time series representations,
Self-attention mdoels
Qi Liu is corresponding author. Our experiment codes are available at
https://github.com/Mingyue-Cheng/FormerTime.
Permission to make digital or hard copies of all or part of this work for personal or
classroom use is granted without fee provided that copies are not made or distributed
for profit or commercial advantage and that copies bear this notice and the full citation
on the first page. Copyrights for components of this work owned by others than the
author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or
republish, to post on servers or to redistribute to lists, requires prior specific permission
and/or a fee. Request permissions from [email protected].
WWW '23, May 1–5, 2023, Austin, TX, USA
© 2023 Copyright held by the owner/author(s). Publication rights licensed to ACM.
ACM ISBN 978-1-4503-9416-1/23/04. . . $15.00
https://doi.org/10.1145/3543507.3583205
1 INTRODUCTION
Multivariate time series [16, 20, 50] are ubiquitous for many web
applications [35, 47], which are sequences of events acquired longi-
tudinally and each event is constituted by observations recorded
over multiple attributes. For example, the electrocardiogram (ECG)
signals [33] in electronic health records (EHRs) can be formulated
as multivariate time series data since they can be obtained over
time and multiple sensors. Comprehensive analysis of such data
can facilitate decision-making in real applications [27, 30], such
as human activity recognition, healthcare monitoring, and indus-
try detection. Particularly, multivariate time series classification
(MTSC) tasks, as one fundamental problem of time series analysis,
received significant attention in both academia and industry.
Accordingly, numerous efforts [36, 49] have been devoted to
the MTSC problem over the last decades. In general, most of these
current works can be divided into two categories: pattern-based
and feature-based models. The former type usually extracts useful
bag-of-patterns or shapelet patterns from the whole time series,
and then transforms these extracted patterns into features to be
used as inputs for the classifier. Since they are generated in raw
time series, the corresponding patterns are often interpretable. The
main concern is the often-incurred expensive computation cost
during the process of pattern extraction. In contrast, feature-based
methods can be very efficient and can be scaled to large-scale time
series data but their classification capacity greatly depends on the
effectiveness of labor-intensive features based on domain experts.
Hence, researchers begin to explore more expressive feature
maps for improving classification capacity. Deep learning-based
models [6, 17, 22, 24, 39, 49, 50] have achieved remarkable success
and have become ever-increasingly prevalent over past advance-
ments. The main reason is that discriminative features related to
time series can be learned in an end-to-end manner, which sig-
nificantly saves manual feature engineering efforts. Among them,
convolutional-based methods nearly have become the dominant ap-
proach due to the strong representation capacity of convolution op-
erations [6, 31]. In general, the strengths of convolutional models in
performing time series classification can be summarized as follows:
(1) convolutional networks can easily learn multi-scale representa-
tions by controlling the strides of convolutional kernels [42], and
preserve the capacity of temporal-invariant via the weight-sharing
mechanism, which are of great significance for MTSC tasks; (2)
Very deep convolutional networks can be stacked by employing
residual connections, enabling larger receptive fields for capturing
the sequence dependence; (3) Convolution operations can be effi-
ciently computed without suffering from limitations of sequence
WWW '23, May 1–5, 2023, Austin, TX, USA
Mingyue Cheng et al.
length or instance number, and thus can be easily scaled to massive
datasets. Despite their effectiveness, we argue that the classification
performance is still restricted in failing to capture global contexts
in convolution operation.
Recently proposed transformer architecture [40, 44] have shown
promising capacity in capturing global contexts for language mod-
eling tasks. Motivated by this, we seek to transfer the powerful
capacity of transformers from language domain to time series. How-
ever, it would easily incur severe issues in applying the transformer
to the MTSC problem. First, in language transformers, only fixed-
scale representations can be learned since word tokens serve as
the basic elements. By contrast, the information density of a single
object in time series is too small to reflect helpful patterns related
to class labels. Taking an example in ECG classification, informa-
tive patterns are typically characterized by a series of continuous
points or various sub-series instead of a single point. As such, multi-
scale feature maps [37] are necessary and can take a significant
influence on the classification capacity. Second, the capacity of
temporal-invariant is largely weakened in vanilla transformers
since self-attention is permutation-variant, which may also restrict
the final performance [29]. Last, the sequence length of time se-
ries usually can be much longer than language sentences, which
inevitably incurs an expensive computation burden since the time
and memory complexity of the self-attention mechanism in the
transformer architecture is quadratic to the sequence length input.
Though some pioneering efforts [26, 38, 48] based on transformers
have been devoted before, the problems discussed above are still
under exploration in the MTSC task.
To tackle these severe issues, in this work, we present Former-
Time, a hierarchical transformer network for the MTSC task. Specif-
ically, we design a hierarchical structure by dividing the whole net-
work into several different stages, with different levels of scales as
input. We also develop a novel transformer encoder to perform hid-
den transformation with two distinct characteristics: (1) we replace
the standard self-attention mechanism with our newly designed
temporal reduction version to save computation cost; (2) we design
a context-aware positional encoding generator, which is designed
to not only preserve the order of sequence input but also enhance
the capacity of temporal-invariant of the whole model. In general,
our FormerTime exhibits the following merits. First, in contrast to
convolutional-based classifiers, FormerTime always yields a global
reception field, which is useful for capturing the long-range depen-
dence and interaction of the whole time series. Second, FormerTime
can conveniently learn time series representations on various scales
via its hierarchical architecture. Third, in the FormerTime, the in-
ductive bias of temporal-invariant is well enhanced by leveraging
the contextual positional generators. More importantly, the compu-
tation consumption of FormerTime is largely saved, and could be
acceptable even for very long sequences.
To evaluate the effectiveness of the FormerTime, we conduct
extensive empirical studies on 10 public datasets from the UEA
archive [2]. The experimental results clearly show that FormerTime
can yield strong classification performance in average. It signifi-
cantly outperforms compared strong baselines. In summary, we
initially demonstrate the potential of transformers in the MTSC
problem. To the best of our knowledge, we first the few attempts of
transformer-based models in breaking the efficiency bottleneck and
achieving great performance improvements. We hope our work can
facilitate the study of applying transformers to the MTSC problem.
2 RELATED WORK
2.1 Time Series Classification
Tremendous efforts have been devoted to time series classification.
Generally speaking, previous works can be roughly divided into
two types: pattern-based and feature-based methods. Pattern-based
methods typically first extract bag-of-patterns [34] or shapelet
patterns [46], and then feed them into a classifier. For example,
shapelet-based methods usually extract some useful subsequence,
which is distinctive for different classes. Then, distance metrics are
employed to generate features for classification. DTW has been
proved as an effective distance measurement in time series classifi-
cation. Recently proposed work [34] uses symbolic Fourier approx-
imation to generate discrete units for classification. The strength
of these methods is that the generative patterns are usually in-
terpretable [10] while the largest weakness [3, 49] is inevitablely
incurring expensive computation in producing discriminative pat-
ter features. A series of methods have been proposed to overcome
this weakness by either speeding up the computation of distance
or constructing the dictionary [46]. In contrast to pattern-based
methods, feature-based methods can be more efficient by depending
on hand-crafted static features based on domain experts. However,
it is difficult to design good features to capture intrinsic proper-
ties embedded in various time series data. Therefore, the accuracy
of feature-based methods is usually worse than that of sequence
distance-based ones. Recently, extracting time series feature with
deep neural networks [22, 24, 50] gradually become prevalent in
time series classification tasks. As a pioneering attempt, multi-
channel convolutional networks [50] have been proposed to deal to
capacity of classification for the MTSC problem. Later, a series of
convolutional-based methods, like ResNet [19], InceptionTime [23]
have also proposed to achieve remarkable success due to their
powerful representation ability in extracting time series features.
ROCKET [12] employs random convolution kernels to train linear
classifiers and has been recognized as a powerful method in recent
empirical studies [31]. Other than pure convolutional based meth-
ods, [24] perform time series classification by designing a hybrid
network, in which both the LSTM layer and stacked convolutional
layer along with a squeeze-and-excitation block are simultaneously
used to extract features. Besides, mining graph structure among
time series with graph convolutional networks for comprehensive
analysis have also attracted some researchers [15, 45].
2.2 Transformers in Time Series.
Designed for sequence modeling, the transformer network [40] re-
cently achieves great success in nature language processing (NLP).
Among multiple advantages of transformers, the ability to capture
long-range dependencies and interactions is especially attractive
for time series modeling. Hence, a large body of transformer-based
methods [43, 51] has been proposed by attempting leveraging trans-
formers for time series forecasting or regression. For time series
classification, recent advancements still lie in the early stage and
mainly focus on multivariate time series classification. [32] studies
the transformer for raw optical satellite time series classification
FormerTime: Hierarchical Multi-Scale Representations for Multivariate Time Series Classification
WWW '23, May 1–5, 2023, Austin, TX, USA
and obtains the latest results comparing with convolution-based so-
lutions. GTN [26] explores an extension of the transformer network
by modeling both channel-wise and step-wise correlations, simulta-
neously. Besides, pre-trained transformers are also investigated in
time series classification tasks. For example, TST [48] employs the
transformer network to learn unsupervised representations of time
series so as to alleviate the data sparsity issue. Despite their effec-
tiveness, both the efficiency issues incurred by the self-attention
and the properties of time series classification task are largely ig-
nored in these current works. Although some prior works focusing
on improving the efficiency of self-attention were developed [38],
these works mainly use heuristic strategies to perform sparse at-
tention computation without global context modeling. In this work,
we aim to tackle the efficiency bottleneck and achieve performance
improvements in the proposed FormerTime.
3 THE FORMERTIME MODEL
In this section, we first formally introduce the definition of multi-
variate time series classification (MTSC) problem. Then, we intro-
duce the overall architecture of our designed FormerTime. After
that, we elaborate the FormerTime via respectively introducing two
aspects of key designs, i.e., the hierarchical architecture and the de-
signed transformer encoder. Finally, we demonstrate the difference
between the FormerTime and other relative methods.
3.1 Problem Definitions
We introduce the definitions and notations used in the following.
D = (X 1, y1), (X 2, y2), ..., (X n, yn) is a dataset containing a collec-
tion of pairs (X i, yi ), in which n denotes the number of examples
and X i denote a multivariate time series with its corresponding la-
bel denoted by yi . Each multivariate time series X = [x1, x2, ..., xl ]
contains l ordered elements with m dimensions in each time step.
The task of multivariate time series classification is to learn a clas-
sifier on D so as to map from the space of inputs X to a probability
distribution over the class y.
3.2 Model Architecture Overview
An overview of the FormerTime is depicted in Figure 1. The input
of the whole model is a set of multivariate time series, involv-
ing multiple dimensions (a.k.a. channels). For each dimension, the
time series share the same sequence length. To produce multi-scale
representations for time series data, we adopt a hierarchical archi-
tecture. Specifically, we divide the whole deep network architecture
into multiple different stages so as to generate feature maps on
various time scales. For simplicity, all stages share a similar archi-
tecture, which is composed of a temporal slice partition processing
operation and successive Li our designed transformer encoder lay-
ers. Relying upon such hierarchical architecture, the time series
representation on various scales can be effectively extracted. Mean-
while, we use the mean pooling operation over the representation
of each temporal point to denote the time series representations.
The model's output is the predicted distribution of each possible
label class for the given input time series. The FormerTime model
can be trained end-to-end by minimizing the cross-entropy loss [7],
and the loss is propagated back from the prediction output across
the entire network. The following sections would mainly introduce
several key designs in the FormerTime.
3.3 Multi-scale Time Series Representations
Integrating information on different time scales [5] is essential to
the classification capacity in the MTSC task. However, the vanilla
transformer model only can produce fixed-scale representations
of the sequence input. Thus, we devise a hierarchical architecture
for learning time series representations on various time scales. The
key idea is that the whole model is divided into several stages so
as to hierarchically performing feature maps. Here, we vary the
time scale input for different stages by leveraging a temporal slice
partition strategy, i.e., aggregating successive neighborhood points
with a window slicing operation.
Specifically, suppose that we have sequence input X = {x1, x2, ...xl }
in stage j, and the window slicing size is s j , which denotes the scale
size of the processed time series. Every s j successive points will
be grouped into a new temporal slice. Considering the semantic
gap issue, we then feed these temporal slices to a trainable linear
projection layer to project this raw feature to a new dimension C j .
Notably, the weights of this linear projection layer is weight-shared,
in which we use d j to denote the stride of projection operations. To
some extent, these temporal slices can be regarded as the "tokens"
of new time series, analogous to the relationship between word and
whole speech input. Assume that the whole model is divided into
three stages, and the fine-grained raw time series can be processed
into a new granularity version, which contains l
slices and each
s1
size is s1 × m. Then, the linear projection layer project it into a new
×C1 .
dimension C1, and the output is reshaped to size of F1 ∈ R
After that, the normalized embeddings of each temporal slice along
with its positional embeddings are fed into the transformer encoder
with L1 layers. In the same manner, by using the feature maps of
the previous stage's output as the input of the next stage, differ-
ent scales of time series representations, denoted by Fj , can be
effectively learned by stage-wise propagation.
l
s1
The primary motivation is the information density difference
between time series and language domain. Unlike the tokens in
language data, which are human-generated signals and highly se-
mantic and information-intensive, the time series are naturally
redundant, e.g., a missing point can be easily recovered from its
neighbors. The benefits of adopting temporal slice operation are
two-fold. First, the time scales of sequence data can be flexibly
transformed, naturally forcing the network to generate hierarchical
feature maps. Second, with this partitioning strategy, the sequence
length of the whole time series can be largely reduced before sent
into the encoder, saving an amount of computation consumption.
3.4 The Transformer Encoder Network
In this subsection, we will introduce our designed encoder to extract
the robust global contexts of the whole sequence input.
3.4.1 Temporal Reduction Attention. To capture the global contexts
of the whole time series, we would like to benefit from regarding
the transformer network as the encoder to perform non-linear
hidden representation transformation. One of the core designs of
WWW '23, May 1–5, 2023, Austin, TX, USA
Mingyue Cheng et al.
Figure 1: Illustration of the FormerTime, i.e., a efficient hierarchical transformer architecture for the MTSC task.
the vanilla transformer network is to employ a multi-head self-
attention mechanism. Each temporal point needs to be computed
the attention scores among all other sequence points with the inner
product so as to capture the long-range dependence. However, the
computation complexity incurred by the attention operation can
be very heavy, growing quadratically in the sequence length of
the input sequence. Unlike language data, the sequence length of
time series data regularly can be very long to uncover the event
of classification tasks. Directly leveraging the standard attention
computation strategy is memory-expensive, making it hard for
transformers to be applicable in time series.
To solve this dilemma, inspired by recent works [41], we present
a novel attention computation strategy named temporal reduction
attention (TRA) mechanism to replace the vanilla self-attention
strategy. The core idea of TRA is to compute the attention with a
sub-sampled version of all input points. To be more specific, similar
to standard self-attention, our TRA receives a query Q, a key K,
and a value V as input, and outputs a refined feature. Details of
TRA operation in stage j can be formulated as follows:
TRA(Q, K, V) = Concat(head0, ..., headNj )WO,
in which the Concat denotes the concatenation operation, and Ni
is the number of heads in the attention layer.
(1)
headj = Attention(QWQ
j
, TR(K)WK
j
, TR(V)WV
j ),
(2)
∈ RCj×dhead, WK
where WQ
j ∈ RCj×dhead are
j
linear projection parameters. In this way, the dimension of each
head is equal to Cj
. Here, TR indicates the temporal reduction on
N j
K and V , which can be written as
j ∈ RCj×dhead, WV
TR(x) = Norm(Reshape(x, Rj)WT),
where x ∈ Rl j ×C j represents a input sequence, and Ri denotes the
reduction ratio of the attention layers in stage j. Reshape(x, Rj)
is an operation of reshaping the input sequence x to a sequence of
size Lj
and WT is a linear projection that reduces the dimension
R j
of the input sequence to C j . Here, we employ layer normalization
operation [40] to implement Norm. Like the original attention
(3)
computation mechanism, our Attention(*) can be represented as
Attention(q, k, v) = softmax(
√
qk⊺
dhead
)v.
(4)
In this way, the computational cost of our attention operation is
1
of standard self-attention, so our TRA can handle longer input
Ri
feature maps/sequences without requiring too many resources. The
main difference between our TRA and the prior version is that
our TRA reduces the temporal scale of K and value V before the
attention operation, largely reducing the computational/memory
overhead. Note that the capacity of global context modeling is still
well-remained in our attention layer.
3.4.2 Contextual Positional Encoding. As claimed in [9, 40], posi-
tional information is a key operation in the success of the trans-
former network. The main reason is that the self-attention operation
can be used to preserve the order of the sequence property of in-
put data. Two types of position information in transformers have
been widely adopted, including absolute and relative encodings,
which respectively denote static and learnable embeddings. For
the former type, absolute temporal information provides helpful
cues for whenever the object would appear in the whole time se-
ries. Despite its effectiveness, it severely weakens the capacity of
temporal-invariant since each temporal slice is added with a unique
positional encoding. In fact, the temporal invariance plays a sig-
nificant role in time series classification tasks since we hope the
model to release the same response whenever the discriminative
pattern appears in the time series. Though relative positional en-
codings can greatly alleviate the aforementioned issues, the relative
encodings lack absolute position information, which is important in
classification tasks [9, 21]. Previous works have uncovered that one
of the main merits of such positional information is that absolute
information can be added for enhancing classification performance.
Besides, we also argue that these two types of positional infor-
mation actually model each temporal slice individually and only
achieve sub-optimal performance because that extracted patterns
from time series evolve in time and highly depend on their sur-
rounding points.
QKVFFNTemporalSliceNormTemporalReductionContextualPositionalInformationLinearProjectionLayerMultivariateTimeSeriesTemporalSliceTransformerEncoderNetworkStage1Multi-HeadSelf-AttentionTemporalSliceTransformerEncoderNetworkStage2TemporalSliceTransformerEncoderNetworkStage3Element-wiseAddContextualPositionalInformationMeanPoolingLossTransformerEncoderNetworkFormerTime: Hierarchical Multi-Scale Representations for Multivariate Time Series Classification
WWW '23, May 1–5, 2023, Austin, TX, USA
Based on the above analysis, we hold that the well-informed po-
sitional information should possess two aspects of characteristics.
First, making the input sequence permutation-variant but temporal-
invariant is a necessity for time series classification. Second, having
the ability to provide absolute information also matters. To fulfill
the two demands, we find that characterizing the contextual infor-
mation among neighboring temporal slices can be sufficient. As
shown in Figure 1, we use 1-D convolutional kernel size k along
with k
zero paddings to extract the localized contextual informa-
2
tion as positional encodings. Note that the zero padding is vital to
make the model aware of the absolute position information.
3.4.3 Entire Transformer Encoder Network. Based on the designed
temporal reduction attention mechanism and context positional
encodings, we organize them together to form a novel transformer
encoder block for learning the time series representations. We give
a sketch of the newly designed encoder at the bottom of Figure 1.
On the basis of the design of standard transformer encoder [40],
the entire encoder is composed of successive layers of the TRA
layer and followed by a feed-forward neural network (FFN) layer.
These two layers are further wrapped with a residual connection
to avoid the the vanishing gradient problem. Particularly, we set a
trainable parameter α, initialized with zero, according to the previ-
ous work [1]. Such a simple trick can further help the FormerTime
converge more stable.
3.5 Summary and Remarks
In the following, we summarize the characteristics of FormerTime
and discuss its relations to transformer-based and convolutional-
based approaches in the multivariate time series classification.
Relation to Transformer-based Models. Transformer architecture
has shown its superiority in global sequence modeling tasks. How-
ever, the dot-product computation in self-attention easily incurs
quadratic computation and memory consumption on sequence in-
put. Hence, the efficiency of the transformer architecture becomes
the bottleneck of applying them to time series classification tasks.
Besides, the vanilla transformer model lacks some key designs of
inductive bias, such as multi-scale representation and temporal in-
variance, which can greatly benefit the time series classification task.
Although some prior works of efficient transformer variants [38]
have been proposed, they fail to solve these two aspects of limita-
tions, simultaneously. In contrast, the proposed FormerTime not
only breaks the bottleneck of efficiency but also achieves perfor-
mance improvements in the MTSC task.
Relation to Convolutional-based Models. Recently, researchers
have demonstrated the extremely expressive capacity of convolu-
tional models in MTSC tasks. In fact, convolutional networks can
yield several aspects of strength: 1) their memory and time complex-
ity in feature extraction are not constrained by the sequence length
of the sequence input, 2) they can easily learn time series with
various scales of feature maps with varying strides and preserve
the prior capacity of temporal-invariant with the weight-sharing
mechanism for the classification task. However, convolution opera-
tion cannot achieve a global receptive field of whole sequence input
while the global context information is vital for the classification
capacity. Our proposed FormerTime not only absorbs the strength
Table 1: Statics of datasets in the experiments.
Dataset Train Size Test Size Dimensions Length Classes
AWR
AF
CT
CR
FD
FM
MI
SRS1
SRS2
UWG
144
640
182
1,197
62
50
3,000
896
1,152
315
300
15
1,436
72
3,524
100
100
293
180
320
275
15
1,422
108
5,890
316
278
268
200
120
9
2
3
6
144
28
64
6
7
3
25
3
20
12
2
2
2
2
2
8
of convolutional models but also meets the demands of long-range
dependence modeling.
4 EXPERIMENTS
4.1 Experimental Setup
4.1.1 Datasets. We perform all experiments by conducting exper-
iments on ten public datasets, which are selected from the well-
known UEA multivariate time series classification (MTSC) archive.
In reality, the UEA archive has become nearly the most widely
used multivariate time series benchmarks. We select a set of 10
multivariate datasets from the UEA archive [2] with diverse char-
acteristics in terms of the number, and the length of time series
samples, as well as the number of classes. Specifically, we choose:
ArticularyWordRecognition (AWR), Atrial Fibrillation (AF), Charac-
terTrajectories (CT), Cricket, FaceDetection (FD), FingerMovements
(FM), MotorImagery(MI), SelfRegulationSCP1 (SRS1), SelfRegula-
tionSCP2 (SRS2), UWaveGestureLibrary (UW). In these original
dataset, training and testing set have been well processed. We do
not take any processing for these datasets for a fair comparison.
We summarize the main characteristics of dataset in Table 1.
4.1.2 Compared Baselines. For comprehensive evaluation, we choose
the following prevalent baseline methods for evaluation: Shapelet
Transformation (ST) [25], Learning Shapelet (LS) [18], TST [48],
GTN [26], Informer [51], MCDCNN [50], MCNN [11], ResNet [19],
TCN [4], InceptionTime (IT) [23], MiniROCKET (MR) [13]. Among
them, ST and LS are two shapelet-based methods. TST and GTN
are two transformer-based models proposed for time series clas-
sification. Though Informer is originally proposed for time series
forecasting, we also treat it as a competitive baseline to verify the ef-
fectiveness of our FormerTime. In addition, the remaining compared
baselines are convolutional-based models applied to the MTSC prob-
lem. Note that some traditional classifiers [28] are not considered
here, since it is difficult to construct hand-crafted features for all
time series. Also, we do not choose well-known distance-based
methods, like HIVE-COTE [28], as baseline due to their expensive
computation consumption. We adopt accuracy as the metric.
Implement Details. For learning shapelet (LS), we adopt the
4.1.3
codes in 1 while adopting the publicly available codes 2 to run
shapelet transformation (ST). To implement GTN, we use the source
code provided by the corresponding authors 3. We implement TST
by strictly following the network architecture settings of original
1https://tslearn.readthedocs.io/
2https://pyts.readthedocs.io/
3https://github.com/ZZUFaceBookDL/GTN
WWW '23, May 1–5, 2023, Austin, TX, USA
Mingyue Cheng et al.
Table 2: Detailed Hyper-parameter settings of the proposed FormerTime.
Datasets
AWR
AF
CT
CR
FD
FM
MI
SRS1
SRS2
UWG
Stage 1
Temporal Slice
s_1=2,C_1=64,d_1=2
s_1=16,C_1=64,d_1=8
s_1=16,C_1=64,d_1=8
s_1=8,C_1=64,d_1=8
s_1=2,C_1=64,d_1=2
s_1=4,C_1=64,d_1=4
s_1=8,C_1=64,d_1=8
s_1=2,C_1=64,d_1=2
s_1=16,C_1=64,d_1=8
s_1=8,C_1=64,d_1=8
Encoder
L_1=6
R_1=2
N_1=4
Stage 2
Temporal Slice
s_2=2,C_2=64,d_2=2
s_2=2,C_2=64,d_2=2
s_2=2,C_2=64,d_2=2
s_2=2,C_2=64,d_2=2
s_2=2,C_2=64,d_2=2
s_2=2,C_2=64,d_2=2
s_2=2,C_2=64,d_2=2
s_2=2,C_2=64,d_2=2
s_2=2,C_2=64,d_2=2
s_2=2,C_2=64,d_2=2
Encoder
L_2=6
R_2=2
N_2=4
Stage 3
Temporal Slice
s_3=2,C_3=64,d_3=2
s_3=2,C_3=64,d_3=2
s_3=2,C_3=64,d_3=2
s_3=2,C_3=64,d_3=2
s_3=2,C_3=64,d_3=2
s_3=2,C_3=64,d_3=2
s_3=2,C_3=64,d_3=2
s_3=2,C_3=64,d_3=2
s_3=2,C_3=64,d_3=2
s_3=2,C_3=64,d_3=2
Encoder
L_3=6
R_3=1
N_3=4
Table 3: Classification performance of compared methods in ten datasets. Bold numbers represent the best results.
Datasets
IT
LS
ST
MCDCNN
TCN MCNN ResNet
MR
TST
GTN Informer
Ours
AWR
AF
CT
CR
FD
FM
MI
SRS1
SRS2
UWG
Average
MACs (M)
0.9827
0.4400
0.9983
0.9889
0.6820
0.6000
0.5860
0.8942
0.5689
0.8869
0.7628
89
0.9127
0.2533
0.9866
0.9639
0.5129
0.4840
0.5180
0.7038
0.5111
0.8031
0.6649
-
0.8700
0.2667
0.7224
0.9722
0.5085
0.4940
0.6100
0.6724
0.5300
0.7769
0.6423
-
0.7800
0.3733
0.8826
0.6278
0.5000
0.5920
0.5000
0.9079
0.5256
0.8438
0.6533
263
0.9467
0.4933
0.9915
0.9083
0.6801
0.5880
0.6040
0.9031
0.5978
0.7981
0.7511
283
0.8200
0.3467
0.9238
0.9167
0.6747
0.5920
0.5980
0.8949
0.5989
0.8044
0.7170
929
0.9827
0.4000
0.9965
0.9972
0.5760
0.6080
0.5780
0.8730
0.5622
0.7994
0.7373
132
0.9720
0.3333
0.9876
0.9806
0.6065
0.6380
0.5640
0.9352
0.5411
0.9075
0.7466
-
0.9789
0.4000
0.9882
0.9583
0.6005
0.5900
N/A
0.8771
0.5796
0.8271
0.7555
408
0.9767
0.4000
0.9783
0.7917
0.5542
0.5350
N/A
0.8019
0.5611
0.8406
0.7155
1,565
0.9820
0.4267
0.9862
0.9778
0.5265
0.6120
0.6240
0.9188
0.5767
0.8363
0.7467
141
0.9847
0.6000
0.9914
0.9806
0.6872
0.6180
0.6320
0.8867
0.5922
0.8881
0.7861
98
works using PyTorch. We replace the decoder in Informer4 with a
linear classifier layer so as to adapt it for MTSC tasks. The remain-
ing baselines' code consistently leverages the codes in 5. For full
reproducibility of the experiments, we release our codes and make
it available 6. The specific hyper-parameters of our FormerTime
are listed as follows:
• s j : the temporal slice size of stage j;
• C j : the hidden size of the output in stage j;
• d j : the stride size of window slicing operation of stage j;
• Lj : the number of transformer encoders in stage j;
• R j : the temporal reduction rate in stage j;
• N j : the number of attention heads of temporal reduction
attention in stage j.
More details of hyper-parameter settings in FormerTime for specific
datasets can be found in Table 2. For common hyper-parameters
of all models, we set the embedding size as 64. The initialized
learning rate is set to 1 × 10−3 without additional processing, and
we employ Adam optimizer to guide all model training. All other
hyper-parameters and initialization strategies either follow the
suggestions from the original works' authors or are tuned on testing
datasets. We report the results of each baseline under its optimal
hyper-parameter settings. For a fair comparison, all models are
trained on the training set and report the accuracy score on the
4https://github.com/zhouhaoyi/Informer2020
5https://timeseriesai.github.io/tsai/
6https://anonymous.4open.science/r/FormerTime-A17E/
Figure 2: Critical difference diagram over the mean ranks of
FormerTime, baseline methods.
testing set. All models are trained until achieving the best results.
All experiments in our work are repeated for 5 times with 5
different seeds, and we reported the mean value score.
4.2 Experimental Results
4.2.1 Classification Performance Evaluation. Table 3 summarizes
the classification accuracy of all compared methods while Figure 2
reports the critical difference diagram as presented in [14]. The
results of "N/A" indicates that the corresponding results cannot
be run due to the out-of-memory issue. Overall, the accuracy of
our proposed FormerTime could outperform previous classifiers
on average. Such results demonstrate the success of FormerTime
in enhancing the classification capacity in the MTSC problem. For
each dataset, the classification performance of FormerTime is either
the most accurate one or very close to the best one. These existing
proposed models typically cannot always achieve the most distinct
results. One may wonder whether the FormerTime can be effective
enough. However, the experimental results are largely consistent
FormerTime: Hierarchical Multi-Scale Representations for Multivariate Time Series Classification
WWW '23, May 1–5, 2023, Austin, TX, USA
Table 4: Experimental results w.r.t. studying the hyper-
parameter sensitivity with varying stages.
Table 5: Experimental results w.r.t. studying the hyper-
parameter sensitivity w.r.t. temporal slice size.
Datasets
AWR
AF
CT
CR
FD
FM
MI
SRS1
SRS2
UWG
Averge
1
0.9811
0.4222
0.9907
0.9861
0.6750
0.6200
0.6200
0.8760
0.5722
0.9021
0.7645
2
0.9811
0.4667
0.9909
0.9815
0.6793
0.6033
0.6267
0.8692
0.5815
0.8948
0.7675
3
0.9720
0.6000
0.9914
0.9806
0.6776
0.6140
0.6280
0.8771
0.5922
0.8844
0.7817
4
0.9767
0.5778
0.9902
0.9769
0.6748
0.6067
0.6133
0.8840
0.5889
0.8844
0.7774
Datasets
AWR
AF
CT
CR
FD
FM
MI
SRS1
SRS2
UWG
Averge
[16,32,64]
0.9720
0.6000
0.9914
0.9806
0.6776
0.6140
0.6280
0.8771
0.5922
0.8844
0.7817
[8,16,32]
0.9740
0.5600
0.9886
0.9806
0.6794
0.6080
0.6280
0.8826
0.5811
0.8881
0.7770
[4,8,16]
0.9820
0.4267
0.9868
0.9778
0.6823
0.6180
0.6160
0.8710
0.5856
0.8781
0.7624
[2,4,8]
0.9847
0.4400
0.9873
0.9667
0.6872
0.6040
0.6180
0.8867
0.5600
0.8775
0.7612
with previous empirical studies [3, 31], i.e., one single model cannot
always achieve superior performances in all scenarios. In particular,
we observe that FormerTime could surpass other baselines to a large
margin in datasets of AF and MI, in which the sequence length of
these two datasets is very long. We guess that our temporal slice
setting can be very robust for these two datasets.
For these baseline approaches, we observe that convolutional-
based methods, like MR, exhibit strong classification performances
in some datasets, which is analogous to the experimental results of
recent empirical studies [31]. We hold the characteristics of multi-
scale representation and temporal invariance of the convolution
operations make a great contribution. Besides, in MR, the feature of
PPV, denoting the proportion of positive values of extracted deep
representations, also matters. However, for transformer-based clas-
sifiers, it seems that the performance cannot always outperform
convolutional algorithms. We guess the main reason behind the per-
formance is that: (1) the plain transformer architecture fails to learn
hierarchical feature maps from time series data, and (2) the naive po-
sitional information might not be suitable for modeling time series
since the semantic information of one single temporal point indi-
vidually modeled. Besides, compared to these deep learning-based
methods, shapelet-based methods exhibit the worst classification
performance due to a lack of poor representation capacity. However,
in shapelet-based approaches, interpretable sub-sequence patterns
can be extracted to make the model more understandable, which is
vital in some applications.
In time series classification tasks, model efficiency has always
been an important concern. Here, we also show the computation
cost by recording MACs7 of compared methods. Note that only
methods trained with end-to-end manner are reported. Though
we adopt a self-attention operation, the computation cost of our
methods can be very economical. Particularly, compared to the
standard transformer network, our proposed FormerTime could
significantly save computation costs. The main reason could be
attributed to two aspects: 1) we model the raw time series with
hierarchical architecture, which significantly shorten the sequence
length, and 2) we develop a temporal reduction layer to ensure each
input point can attend to all other data points.
7https://github.com/Lyken17/pytorch-OpCounter
Table 6: Experimental results w.r.t. studying the effective-
ness of contextual positional embeddings.
None
0.9433
0.4667
0.9821
0.9815
0.6740
0.5900
0.6233
0.8635
0.5704
0.8479
0.7543
Learnable
0.9811
0.5556
0.9863
0.9769
0.6774
0.6200
0.6167
0.8749
0.6018
0.8677
0.7758
Datasets
AWR
AF
CT
CR
FD
FM
MI
SRS1
SRS2
UWG
Averge
Static
0.9822
0.5111
0.9902
0.9676
0.6804
0.5867
0.5833
0.8817
0.5759
0.8729
0.7632
Ours
0.9720
0.6000
0.9914
0.9806
0.6776
0.6140
0.6280
0.8771
0.5922
0.8844
0.7817
Study of Multi-scale Representations. In this part, we decide
4.2.2
to study the effectiveness of hierarchical feature maps in Former-
Time by setting different types of model variants w.r.t. the different
number of stages. Specifically, we report the average classification
experimental results of ten datasets in Table 4, varying the num-
ber of stages from 1 to 4. Note that the total number of layers is
consistent in these model variants to eliminate the other influence
factors. From the reported results, we observe that feature maps at
various scales can indeed perform much better than the single-scale
representation versions. Such results demonstrate the importance
of multi-scale representation in time series classification tasks. Fur-
thermore, we also empirically analyze the effectiveness of hierarchi-
cal structure by performing hyper-parameter sensitivity analysis on
the size of window slicing in temporal slice partition. The average
accuracy of ten datasets is recorded in Table 5. An attractive ex-
perimental phenomenon is that FormerTime equipped with a large
slice size yields more promising results. We guess that the semantic
information of a smaller temporal slice is too small to characterize
discriminative patterns of distinguishing other examples.
Study of Positional Information Encoding. In the following,
4.2.3
we would like to empirically verify the effectiveness of contextual
positional information. A natural choice is to replace the contex-
tual embedding with static or learnable version [40], respectively.
Moreover, we also evaluate the results of FormerTime without lever-
aging any forms of positional embedding information. The average
experimental results conducted on ten datasets are shown in Ta-
ble 6. From these results, we notice that FormerTime equipped with
WWW '23, May 1–5, 2023, Austin, TX, USA
Mingyue Cheng et al.
Figure 3: Normalized attention score from the first encoder block of the first stage in FormerTime: (1) without taking positional
information into account, (2) using static embeddings, (3) using learnable vectors, (4) using our contextual embeddings.
Figure 4: Left plot: Visualization of the t-SNE result of the
embedding layer output on the AF dataset. Right plot: visu-
alization of sub-sequences on raw time series data.
contextual positional information could surpass all other model
variants, verifying the effectiveness of extracting contextual infor-
mation as positional encodings. Also, FormerTime's performance
dramatically degrades while absolutely discarding the positional
information. We believe this is reasonable because self-attention
computation is permutation-variant, whose performance would
dramatically degrade if discarding the positional information. To
further deeply understand the scheme of several types of positional
encoding, we choose one sample from SRS1 data to visualize the
attention weights of corresponding model variants. As shown in
Figure 3, unlike the widely adopted static and learnable positional
embeddings, more specific attention map patterns could be well
learned by our contextual positional information generating strate-
gies. Also, it seems that most of the temporal slices would produce
uniform attention weights if we remove the positional informa-
tion. We believe these visualized cases further demonstrate the
effectiveness of our contextual information-generating strategies.
4.2.4 Analyzing Semantic of Time Series Slice Representations. In
this part, we aim to analyze the semantic descriptions of constructed
temporal slices encoded by the embedding layer. To achieve this
goal, we apply t-SNE to reduce the embedding of each temporal slice
on an example selected from AF datasets. For better understanding,
we further map each temporal slice to the raw time series. As shown
in Figure 4, we find that the similarity of raw time series data is
well-maintained in projected vector space. Such results reflect that
the semantics of time series can be accurately represented by their
corresponding latent representations. We also observe that the
temporal slice nearby in the vector space forms some successive sub-
sequences (a.k.a. shapelets) in raw time series. This phenomenon
indicates that the embedding learned by the FormerTime retains
the potential of preserving the strength of shapelet-based methods.
Figure 5: Visualization of the representation of whole time
series on the SRS1 (left plot) and UW (right plot) datasets,
extracted by pooling operation from the last hidden layer.
4.2.5 Visualization of the Extracted Embeddings. As shown in Fig-
ure 5, we visualize the extracted feature vector from FormerTime by
applying t-SNE to reduce the dimension. Here, we randomly choose
examples from SRS1 and UWG datasets. In this figure, each point
denotes an example and the same color denotes the corresponding
original class labels. This figure suggests that the proposed Former-
Time is able to project the data into an easily separable space to
ensure good classification results.
5 CONCLUSION
In this work, instead of employing the prevalent convolutional
architecture as the main backbones, we proposed FormerTime, a
hierarchical transformer network for MTSC tasks. In FormerTime,
both the strengths of transformers and CNNs were well absorbed
in a unified model for further improving the classification capacity.
Specifically, two aspects of vital inductive bias, including multi-
scale time series representations and temporal-invariant capacity,
are incorporated for enhancing the classification capacity in the
MTSC task. Moreover, the terrible computation dilemma incurred
by the self-attention mechanism was largely overcome in the pro-
posed FormerTime, whose computation costs are acceptable for
very long-sequence time series and large-scale data. Extensive ex-
periments conducted on 10 publicly available datasets from the
UEA archive demonstrated that FormerTime could surpass previ-
ous strong baseline methods. In the future, we hope to empower
the transferability of FormerTime [8].
ACKNOWLEDGMENTS
This research was partially supported by grants from the National
Key Research and Development Program of China (No. 2021YFF0901003)
w/opositionalembeddingsw/staticembeddingsw/learnableembeddingsw/contextualembeddingsFormerTime: Hierarchical Multi-Scale Representations for Multivariate Time Series Classification
WWW '23, May 1–5, 2023, Austin, TX, USA
REFERENCES
[1] Thomas Bachlechner, Bodhisattwa Prasad Majumder, Henry Mao, Gary Cottrell,
and Julian McAuley. 2021. Rezero is all you need: Fast convergence at large depth.
In Uncertainty in Artificial Intelligence. PMLR, 1352–1361.
[2] Anthony Bagnall, Hoang Anh Dau, Jason Lines, Michael Flynn, James Large,
Aaron Bostrom, Paul Southam, and Eamonn Keogh. 2018. The UEA multivariate
time series classification archive, 2018. arXiv preprint arXiv:1811.00075 (2018).
[3] Anthony Bagnall, Jason Lines, Aaron Bostrom, James Large, and Eamonn Keogh.
2017. The great time series classification bake off: a review and experimental
evaluation of recent algorithmic advances. Data mining and knowledge discovery
31, 3 (2017), 606–660.
[4] Shaojie Bai, J Zico Kolter, and Vladlen Koltun. 2018. An empirical evaluation
of generic convolutional and recurrent networks for sequence modeling. arXiv
preprint arXiv:1803.01271 (2018).
[5] Wei Chen and Ke Shi. 2021. Multi-scale Attention Convolutional Neural Network
for time series classification. Neural Networks 136 (2021), 126–140.
[6] Mingyue Cheng, Zhiding Liu, Qi Liu, Shenyang Ge, and Enhong Chen. 2022.
Towards Automatic Discovering of Deep Hybrid Network Architecture for Se-
quential Recommendation. In Proceedings of the ACM Web Conference 2022. 1923–
1932.
[7] Mingyue Cheng, Fajie Yuan, Qi Liu, Shenyang Ge, Zhi Li, Runlong Yu, Defu
Lian, Senchao Yuan, and Enhong Chen. 2021. Learning Recommender Systems
with Implicit Feedback via Soft Target Enhancement. Proceedings of the 44th
International ACM SIGIR Conference on Research and Development in Information
Retrieval (2021).
[8] Mingyue Cheng, Fajie Yuan, Qi Liu, Xin Xin, and Enhong Chen. 2021. Learning
transferable user representations with sequential behaviors via contrastive pre-
training. In 2021 IEEE International Conference on Data Mining (ICDM). IEEE,
51–60.
[9] Xiangxiang Chu, Zhi Tian, Bo Zhang, Xinlong Wang, Xiaolin Wei, Huaxia Xia, and
Chunhua Shen. 2021. Conditional positional encodings for vision transformers.
arXiv preprint arXiv:2102.10882 (2021).
[10] Jonathan Crabbé and Mihaela Van Der Schaar. 2021. Explaining time series
predictions with dynamic masks. In ICML. PMLR, 2166–2177.
[11] Zhicheng Cui, Wenlin Chen, and Yixin Chen. 2016. Multi-scale convolutional
neural networks for time series classification. arXiv preprint arXiv:1603.06995
(2016).
[12] Angus Dempster, François Petitjean, and Geoffrey I Webb. 2020. ROCKET: excep-
tionally fast and accurate time series classification using random convolutional
kernels. Data Mining and Knowledge Discovery 34, 5 (2020), 1454–1495.
[13] Angus Dempster, Daniel F Schmidt, and Geoffrey I Webb. 2021. Minirocket: A
very fast (almost) deterministic transform for time series classification. In ACM
SIGKDD. 248–257.
[14] Janez Demšar. 2006. Statistical comparisons of classifiers over multiple data sets.
The Journal of Machine learning research 7 (2006), 1–30.
[15] Ziheng Duan, Haoyan Xu, Yueyang Wang, Yida Huang, Anni Ren, Zhongbin Xu,
Yizhou Sun, and Wei Wang. 2022. Multivariate time-series classification with
hierarchical variational graph pooling. Neural Networks 154 (2022), 481–490.
[16] Ge Gao, Qitong Gao, Xi Yang, Miroslav Pajic, and Min Chi. [n. d.]. A Reinforce-
ment Learning-Informed Pattern Mining Framework for Multivariate Time Series
Classification. ([n. d.]).
[17] Hardik Goel, Igor Melnyk, and Arindam Banerjee. 2017. R2n2: Residual recur-
rent neural networks for multivariate time series forecasting. arXiv preprint
arXiv:1709.03159 (2017).
[18] Josif Grabocka, Nicolas Schilling, Martin Wistuba, and Lars Schmidt-Thieme.
2014. Learning time-series shapelets. In Proceedings of the 20th ACM SIGKDD
international conference on Knowledge discovery and data mining. 392–401.
[19] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2016. Deep residual
learning for image recognition. In IEEE CVPR. 770–778.
[20] Min Hou, Chang Xu, Zhi Li, Yang Liu, Weiqing Liu, Enhong Chen, and Jiang
Bian. 2022. Multi-Granularity Residual Learning with Confidence Estimation for
Time Series Prediction. In Proceedings of the ACM Web Conference 2022. 112–121.
[21] Md Amirul Islam, Sen Jia, and Neil DB Bruce. 2020. How much position informa-
tion do convolutional neural networks encode? arXiv preprint arXiv:2001.08248
(2020).
[22] Hassan Ismail Fawaz, Germain Forestier, Jonathan Weber, Lhassane Idoumghar,
and Pierre-Alain Muller. 2019. Deep learning for time series classification: a
review. Data mining and knowledge discovery 33, 4 (2019), 917–963.
[23] Hassan Ismail Fawaz, Benjamin Lucas, Germain Forestier, Charlotte Pelletier,
Daniel F Schmidt, Jonathan Weber, Geoffrey I Webb, Lhassane Idoumghar, Pierre-
Alain Muller, and François Petitjean. 2020. Inceptiontime: Finding alexnet for
time series classification. DMKD 34, 6 (2020), 1936–1962.
[24] Fazle Karim, Somshubra Majumdar, Houshang Darabi, and Samuel Harford. 2019.
Multivariate LSTM-FCNs for time series classification. Neural Networks 116
(2019), 237–245.
[25] Jason Lines, Luke M Davis, Jon Hills, and Anthony Bagnall. 2012. A shapelet
transform for time series classification. In Proceedings of the 18th ACM SIGKDD
international conference on Knowledge discovery and data mining. 289–297.
[26] Minghao Liu, Shengqi Ren, Siyuan Ma, Jiahui Jiao, Yizhou Chen, Zhiguang Wang,
and Wei Song. 2021. Gated transformer networks for multivariate time series
classification. arXiv preprint arXiv:2103.14438 (2021).
[27] Zhiding Liu, Mingyue Cheng, Zhi Li, Qi Liu, and Enhong Chen. 2022. One Person,
One Model-Learning Compound Router for Sequential Recommendation. 2022
IEEE International Conference on Data Mining (ICDM) (2022), 289–298.
[28] Matthew Middlehurst, James Large, Michael Flynn, Jason Lines, Aaron Bostrom,
and Anthony Bagnall. 2021. HIVE-COTE 2.0: a new meta ensemble for time
series classification. Machine Learning 110, 11 (2021), 3211–3243.
[29] Jeeheh Oh, Jiaxuan Wang, and Jenna Wiens. 2018. Learning to exploit invariances
in clinical time-series data using sequence transformer networks. In Machine
Learning for Healthcare Conference. PMLR, 332–347.
[30] Beanbonyka Rim, Nak-Jun Sung, Sedong Min, and Min Hong. 2020. Deep learning
in physiological signal data: A survey. Sensors 20, 4 (2020), 969.
[31] Alejandro Pasos Ruiz, Michael Flynn, James Large, Matthew Middlehurst, and
Anthony Bagnall. 2021. The great multivariate time series classification bake off:
a review and experimental evaluation of recent algorithmic advances. DMKD 35,
2 (2021), 401–449.
[32] Marc Russwurm and Marco Körner. 2020. Self-attention for raw optical satellite
time series classification. ISPRS journal of photogrammetry and remote sensing
169 (2020), 421–435.
[33] Pritam Sarkar and Ali Etemad. 2020. Self-supervised ECG representation learning
for emotion recognition. IEEE Transactions on Affective Computing (2020).
[34] Patrick Schäfer and Ulf Leser. 2017. Multivariate time series classification with
WEASEL+ MUSE. arXiv preprint arXiv:1711.11343 (2017).
[35] Omer Berat Sezer, Mehmet Ugur Gudelek, and Ahmet Murat Ozbayoglu. 2020.
Financial time series forecasting with deep learning: A systematic literature
review: 2005–2019. Applied soft computing 90 (2020), 106181.
[36] Chang Wei Tan, Angus Dempster, Christoph Bergmeir, and Geoffrey I Webb.
2022. MultiRocket: multiple pooling operators and transformations for fast and
effective time series classification. DMKD (2022), 1–24.
[37] Wensi Tang, Guodong Long, Lu Liu, Tianyi Zhou, Michael Blumenstein, and Jing
Jiang. 2021. Omni-Scale CNNs: a simple and effective kernel size configuration for
time series classification. In International Conference on Learning Representations.
[38] Yi Tay, Mostafa Dehghani, Dara Bahri, and Donald Metzler. 2020. Efficient
transformers: A survey. ACM Computing Surveys (CSUR) (2020).
[39] Alasdair Tran, Alexander Mathews, Cheng Soon Ong, and Lexing Xie. 2021.
Radflow: A recurrent, aggregated, and decomposable model for networks of time
series. In Proceedings of the Web Conference 2021. 730–742.
[40] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones,
Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is all
you need. Advances in neural information processing systems 30 (2017).
[41] Sinong Wang, Belinda Z Li, Madian Khabsa, Han Fang, and Hao Ma. 2020. Lin-
former: Self-attention with linear complexity. arXiv preprint arXiv:2006.04768
(2020).
[42] Wenhai Wang and Enze at al Xie. 2021. Pyramid vision transformer: A versatile
backbone for dense prediction without convolutions. In IEEE/CVF ICCV. 568–578.
[43] Qingsong Wen, Tian Zhou, Chaoli Zhang, Weiqi Chen, Ziqing Ma, Junchi Yan,
and Liang Sun. 2022. Transformers in time series: A survey. arXiv preprint
arXiv:2202.07125 (2022).
[44] Haixu Wu, Jialong Wu, Jiehui Xu, Jianmin Wang, and Mingsheng Long. 2022.
Flowformer: Linearizing Transformers with Conservation Flows. In International
Conference on Machine Learning.
[45] Zonghan Wu, Shirui Pan, Guodong Long, Jing Jiang, Xiaojun Chang, and Chengqi
Zhang. 2020. Connecting the dots: Multivariate time series forecasting with graph
neural networks. In Proceedings of the 26th ACM SIGKDD international conference
on knowledge discovery & data mining. 753–763.
[46] Lexiang Ye and Eamonn Keogh. 2009. Time series shapelets: a new primitive for
data mining. In Proceedings of the 15th ACM SIGKDD international conference on
Knowledge discovery and data mining. 947–956.
[47] Yi Yin and Pengjian Shang. 2016. Forecasting traffic time series with multivariate
predicting method. Appl. Math. Comput. 291 (2016), 266–278.
[48] George Zerveas, Srideepika Jayaraman, Dhaval Patel, Anuradha Bhamidipaty,
and Carsten Eickhoff. 2021. A transformer-based framework for multivariate
time series representation learning. In Proceedings of the 27th ACM SIGKDD
Conference on Knowledge Discovery & Data Mining. 2114–2124.
[49] Xuchao Zhang, Yifeng Gao, Jessica Lin, and Chang-Tien Lu. 2020. Tapnet: Multi-
variate time series classification with attentional prototypical network. In Pro-
ceedings of the AAAI Conference on Artificial Intelligence, Vol. 34. 6845–6852.
[50] Yi Zheng, Qi Liu, Enhong Chen, Yong Ge, and J Leon Zhao. 2014. Time se-
ries classification using multi-channels deep convolutional neural networks. In
International conference on web-age information management. Springer, 298–310.
[51] Haoyi Zhou, Shanghang Zhang, Jieqi Peng, Shuai Zhang, Jianxin Li, Hui Xiong,
and Wancai Zhang. 2021. Informer: Beyond efficient transformer for long se-
quence time-series forecasting. In Proceedings of the AAAI, Vol. 35. 11106–11115.
|
|
http://arxiv.org/abs/2302.09817v2 | 2023-02-23T15:46:35 | 2023-02-20T07:45:25 | Explainable Human-centered Traits from Head Motion and Facial Expression
Dynamics | We explore the efficacy of multimodal behavioral cues for explainable
prediction of personality and interview-specific traits. We utilize elementary
head-motion units named kinemes, atomic facial movements termed action units
and speech features to estimate these human-centered traits. Empirical results
confirm that kinemes and action units enable discovery of multiple
trait-specific behaviors while also enabling explainability in support of the
predictions. For fusing cues, we explore decision and feature-level fusion, and
an additive attention-based fusion strategy which quantifies the relative
importance of the three modalities for trait prediction. Examining various
long-short term memory (LSTM) architectures for classification and regression
on the MIT Interview and First Impressions Candidate Screening (FICS) datasets,
we note that: (1) Multimodal approaches outperform unimodal counterparts; (2)
Efficient trait predictions and plausible explanations are achieved with both
unimodal and multimodal approaches, and (3) Following the thin-slice approach,
effective trait prediction is achieved even from two-second behavioral
snippets. | [
"Surbhi Madan",
"Monika Gahalawat",
"Tanaya Guha",
"Roland Goecke",
"Ramanathan Subramanian"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09817v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09817v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.CV"
] | 3
2
0
2
b
e
F
3
2
]
G
L
.
s
c
[
2
v
7
1
8
9
0
.
2
0
3
2
:
v
i
X
r
a
1
Explainable Human-centered Traits from Head
Motion and Facial Expression Dynamics
Surbhi Madan, Monika Gahalawat, Student Member, IEEE, Tanaya Guha, Member, IEEE, Roland
Goecke, Senior Member, IEEE and Ramanathan Subramanian, Senior Member, IEEE
Abstract-We explore the efficacy of multimodal behavioral cues for explainable prediction of personality and interview-specific traits.
We utilize elementary head-motion units named kinemes, atomic facial movements termed action units and speech features to
estimate these human-centered traits. Empirical results confirm that kinemes and action units enable discovery of multiple trait-specific
behaviors while also enabling explainability in support of the predictions. For fusing cues, we explore decision and feature-level fusion,
and an additive attention-based fusion strategy which quantifies the relative importance of the three modalities for trait prediction.
Examining various long-short term memory (LSTM) architectures for classification and regression on the MIT Interview and First
Impressions Candidate Screening (FICS) datasets, we note that: (1) Multimodal approaches outperform unimodal counterparts; (2)
Efficient trait predictions and plausible explanations are achieved with both unimodal and multimodal approaches, and (3) Following the
thin-slice approach, effective trait prediction is achieved even from two-second behavioral snippets.
Index Terms-Kinemes, Head-motion Units, Action Units, Behavioral Analytics, Explainable Prediction, Personality and Interview
Traits, Unimodal vs Multimodal
(cid:70)
1 INTRODUCTION
Personality is a psychological construct that describes hu-
man behavior in terms of habitual and fairly stable patterns
of emotions, thoughts, and attributes [1], [2]. Personality
is typically characterized by the OCEAN traits typified by
the big-five model [3]: Openness (creative vs conservative),
Conscientiousness (diligent vs disorganized), Extraversion
(social vs aloof), Agreeableness (empathetic vs distant) and
Neuroticism (anxious vs emotionally stable). Other popu-
lar personality models include the big-two model which
categorizes these five traits into the Plasticity and Stability
dimensions [4], and the 16 personality factors model [5].
Personality plays a crucial role in shaping an individ-
ual's behavioral and communication traits, and how one
conducts themselves in different social situations. To this
end, multimodal non-verbal cues are critical in exhibiting
an individual's inter-personal skills in the context of 'multi-
media CVs' [6], [7]. Subjective impressions of interviewee's
personality traits can influence hiring decisions [8], and
even one behavioral modality can explain personality attri-
butions [9]. E.g., Conscientiousness characterizing diligence
and honesty is reflected in an upright posture and minimal
head movements, while Neuroticism indicating anxiety and
stress is revealed through fidgeting and camera aversion in
self-presentation videos [7].
This paper builds on the above findings, and explores
the efficacy of multimodal behavioral cues to explainably
•
Surbhi Madan is with Department of Computer Science, Indian Institute
of Technology Ropar, India.
• Monika Gahalawat, Roland Goecke and Ramanathan Subramanian are
with the Human-Centred Technology Research Centre, Faculty of Science
and Technology, University of Canberra, ACT, Australia.
• Tanaya Guha is with the School of Computing Science, University of
Glasgow, UK.
Fig. 1. Overview of the proposed framework: Kinemes (elementary head
motions), action units (atomic facial movements) and speech features
employed for explainable trait prediction.
predict personality and job interview traits. In particular,
we examine (i) elementary head motions termed kinemes, (ii)
atomic facial movements called action units (AUs), and (iii)
prosodic and acoustic speech features for traits prediction
(see Fig. 1 for an overview). We first evaluate the efficacy of
unimodal temporal characteristics of individual behavioral
channel in predicting these traits using long-short term
memory (LSTM) architectures. Next, we explore different
multimodal fusion strategies (feature fusion, decision fu-
sion, and additive soft attention) to enhance each channel's
predictive power and explainability. Recent studies have
already shown the effectiveness of kineme patterns for
emotional trait prediction [10], [11], while acoustic features
Head motion time seriesAction Unit RepresentationKineme RepresentationSpeech RepresentationExtract speech featuresLSTMExplainable Personality and Interview TraitsLow Level Descriptors (LLDs)Sequence of kinemes....Decompose into head motion units (kinemes)Facial featuresAction units (AU) detectionInput video+audio
and facial expressions have been successfully employed for
estimating personality attributes [1], [12], [13] and candidate
hireability (i.e., suitability to hire/interview later) [14], [15].
Examining various LSTM architectures for classification
and regression on the diverse FICS [16] and MIT inter-
view [17] datasets, we make the following observations: (i)
Both kinemes and AUs achieve explanative trait prediction.
(ii) Multimodal approaches leverage cue-complementarity
to better predict interview and personality attributes than
unimodal ones. (iii) Trimodal fusion-based attention scores
enable behavioral explanations, and provide insights into
the relative contribution of each modality over time. (iv)
Adequate predictive power is achieved even with 2 seconds-
long behavioral episodes or slices. Overall, we make the
following research contributions:
• Building upon our initial results [18], we novelly em-
ploy kinemes, action units and speech features for the
estimation of personality and interview traits. Given the
strong correlations among personality and interview
traits [16], [19], we show that the three behavioral
modalities are both predictive and explanative of these
traits. We explore distinct strategies for temporally fus-
ing behavioral features. Fusion approaches outperform
unimodal ones by a large margin owing to the comple-
mentary nature of the cues and modalities.
• Our experiments reveal that speech features are highly
predictive of interview traits on the MIT dataset [17],
and achieve performance comparable to kinemes and
AUs for OCEAN trait prediction on the FICS dataset.
• Kineme and AU features enable behavioral explana-
tions to support their predictions. We employ scores
obtained from the additive attention fusion model to
assess the relative importance of our three modalities
per trait.
• We perform ablative studies presenting unimodal and
multimodal results over thin-slices of varying lengths.
We show that satisfactory continuous and discrete trait
prediction performance can be achieved even with 2s
slices, with more accurate predictions possible over
longer slices in line with expectation.
2 LITERATURE REVIEW
This section reviews research on (a) personality and inter-
view trait prediction, and (b) multimodal behavior analytics
to position our work with respect to the literature.
2.1 Trait Prediction
Human thoughts, emotions and behavioral patterns are
influenced by their personality, typically characterized via
the OCEAN model [3] characterizing human personality in
terms of Openness, Conscientiousness, Extraversion, Agree-
ableness and Neuroticism. Various non-verbal behavioral
cues such as eye movements [20], [21], head motion [22],
[23], and facial features [13], [24] have been employed for
personality trait prediction.
Numerous studies have examined the relationship be-
tween a candidate's personality traits and their
job-
interview performance [14], [17]; For instance, Conscien-
tiousness is positively correlated with job and organiza-
2
tional performance [25], [26]. Conscientiousness and Ex-
traversion impact interview success [27], [28] and job rat-
ings [29]. While Mount et al. [30] observed that Emo-
tional stability, Conscientiousness and Agreeableness are
positively related to job performance, Rothmannet al. [31]
associated Conscientiousness, Extraversion, Emotional sta-
bility and Openness with job performance and creativity.
While these correlations among personality and interview
traits have been discovered via statistical analyses, very few
studies have explored the relationships between non-verbal
behavioral cues and personality-cum-interview traits in a
predictive (regression/classification) setting.
Explainable trait prediction: Despite achieving excel-
lent performance on multiple prediction problems, deep
learning models fall short in terms of explainability and
interpretability due to their 'black-box' nature [32]. Recent
studies alleviate this issue by interpreting the results of
deep learning models, e.g., Wicaksana and Liem [33] predict
OCEAN personality traits explicitly focusing on human-
explainable features and a transparent decision-making
process. Wei et al. [34] propose a deep bimodal regres-
sion framework, in which Convolutional Neural Networks
(CNNs) are modified to aggregate descriptors for improving
regression performance on apparent personality analysis. A
CNN-based approach for interpretability is explored, where
the authors observe a correlation between AUs and CNN-
learned features [35]. Another work [36] trains a deep resid-
ual network with audiovisual descriptors for personality
trait prediction, where predictions are elucidated via face
image visualization and occlusion analysis.
2.2 Multimodal Behavior Analytics
Low-level behavioral features have been largely employed
for human-centred trait prediction. E.g., head-motion has
been modeled with descriptors such as amplitude of Fourier
components [37], Euler rotation angles and velocity. Head
motion is often restricted to nods and shakes [38]. Yang
and Narayanan [39] extract arbitrary head motion patterns,
which do not have a physical interpretation. Subramanian et
al. [23] predict Extraversion and Neuroticism employing
positional and head pose patterns.
Audio-visual features are typically combined to achieve
effective trait prediction. Low-level speech descriptors such
as pitch, intensity, spectral, cepstral coefficients and pause
duration are commonly used for personality [40], [41] and
affect recognition [42], [43], [44]. Other works use acous-
tic, prosodic and linguistic features for personality predic-
tion [13], [45].
Many trait prediction studies focus solely on visual cues,
with facial cues playing a crucial role. E.g., multivariate
regression is employed to infer user personality impressions
from Twitter profile images [46], while eigenfaces are com-
bined with Support Vector Machines are used to predict
if a depicted person scores above/below the median for
each of the big-five traits [47]. Meng et al. [48] investigate
the connection between gratification-sought (e.g., escape,
fashion, entertainment) and personality traits, and find that
extroverts are more active in contributing to, and participat-
ing in engaging behaviors. Short-term facial dynamics are
learned from short videos via an emotion-guided, encoder-
based approach for personality analysis in [49].
2.3 Summary
Our literature review reveals the following research gaps:
(1) Personality and interview traits are known to be highly
correlated based on statistical observations, but few
works have explored learning of features that can ef-
fectively predict as well as explain these traits.
(2) While personality and interview traits have been pre-
dicted via machine/deep learning approaches, the ma-
jority employs statistics of low-level audiovisual fea-
tures (statistics relating to head motion, eye-gaze, fa-
cial expression, speech and prosodic), which limits
explanations to support the predictions. While head
motion patterns have been identified as critical non-
verbal behavioral cues, they have not been employed
for personality or interview trait prediction. We show
how kineme and AU features can intuitively explain
trait-specific behaviors.
(3) Multimodal behavioral analytics have been largely re-
stricted to feature and decision fusion, treating all be-
havioral channels equally. Differently, we utilize addi-
tive soft attention [50]-based fusion that learns relative
contribution of each channel from data. This allows for
quantifying and explaining the relative contribution of
the different modalities towards the prediction result.
3 METHODOLOGY
3.1 Feature Extraction
We now present feature extraction for the three employed
modalities: (i) 3D head motions denoted via a sequence of
kinemes, (ii) facial action units describing muscle move-
ments, and (iii) low-level descriptors for speech represen-
tation. As in [18], we encode these features into 2s temporal
segments with a 50% overlap to obtain feature vectors.
Kineme Representation: A compact approach to model-
ing head motion is by representing it in terms of a small
number of fundamental and interpretable units termed
kinemes [10]; they are analogous to phonemes in human
speech [51]. We extract the 3D Euler rotation angles pitch
(θp), yaw (θy) and roll (θr) per frame to represent head pose
using the Openface toolkit [52]. Head motion for a time pe-
riod T can be represented as a time-series of 3D angles: θ =
{θ1:T
r }. This multivariate time-series θ of length
p
T is divided into l-overlapping segments, where the ith
segment is denoted by a vector h(i) = [θi:i+(cid:96)
]T .
These overlapping segments enable shift-invariance and
generate better representations of the head motion [11].
, θi:i+(cid:96)
r
, θi:i+(cid:96)
y
, θ1:T
y
, θ1:T
p
Further, we define the characterization matrix as Hθ =
[h(1), h(2), * * * , h(s)] with s denoting the number of seg-
ments in the training sample. All N training samples
are combined to form the head motion matrix H =
[Hθ1|Hθ2| * * * |HθN ], where each column in the matrix H
represents a single head motion time-series segment. Non-
negative Matrix Factorization is performed on the matrix
H to obtain basis and coefficient matrices B and C re-
spectively. We then employ Gaussian Mixture modeling to
cluster coefficient vectors in a low dimensional space to
obtain a k column matrix C∗ (k << N s). The matrix C∗ is
transformed as H∗ = BC∗, to obtain kinemes in the original
space. Columns of H∗ yield the k kinemes {Ki}K
i=1.
3
On learning the kineme representation, any head motion
time-series is represented via K by mapping each time series
segment to an individual kineme. To obtain the correspond-
ing kineme, we compute the characterization matrix h(i)
for the ith segment. Lastly, we project h(i) onto the learned
subspace spanned by B to get c(i):
ˆc = arg min
c(i)≥0
(cid:107)h(i) − Bc(i)(cid:107)2
F
We maximize the posterior probability P (Ki|ˆc) to associate
the ith segment to its corresponding kineme Ki. Thus, we
can map a head motion time-series to a kineme sequence.
Selected kinemes are extracted from the MIT and FICS
datasets are visualized in Figs. 5 and 6.
Action Unit Detection: We extract 17 facial action units
(AUs) per video frame using Openface. These 17 AUs are
described in terms of a value specifying the visibility of
an AU, and an intensity score representing AU sharpness
on a 5-point scale (minimal to maximal). We employ mean
intensity as a threshold to identify the dominant AUs over
all 2s frames with 1s overlap as above. We present common
AUs from the two datasets in Fig. 7.
Speech Feature Extraction: We extracted low-level audio
descriptors (LLDs) via the Librosa library [53] following
the Interspeech2009 emotion challenge [54]: Fundamental
frequency (F0), voice probability, zero-crossing rate (ZCR)
and Mel-frequency cepstral coefficients (MFCCs). A local
feature vector is created by extracting the LLDs over a
sliding window of 93ms with an overlap of 23ms over
the entire video duration. These local features are averaged
and concatenated to obtain a 23-dimensional feature vector
for each 2s segment. For each dataset, these features are
normalized to have zero mean and unit variance.
3.2 Models
Long short-term memory (LSTM) models for regression
and classification: We trained LSTMs with the kineme
(LSTM Kin), AU (LSTM AU) and speech sequences (LSTM
Aud). We also performed bimodal feature fusion (FF) and
decision fusion (DF) with all combinations (LSTM Kin+AU,
LSTM Kin+Aud and LSTM AU+Aud), and trimodal LSTM
fusion (LSTM Kin+AU+Aud). The kineme sequences are
one-hot encoded, where the kineme denoting a given time-
window is coded to 1 and the rest to 0. AU sequences
are encoded by setting the dominant AUs to 1 and rest
to 0 for the time-window, creating a binary 17-element
AU vector. Speech sequences are created by z-normalizing
LLDs averaged over the time-window. For a behavioral slice
involving L time windows with N training samples, the
kineme, AU and speech features form 3D matrices of size
16×N × L, 17 ×N × L, and 23 ×N × L respectively.
Unimodal and feature fusion (FF): A single hidden LSTM
layer is employed for unimodal prediction followed by a
dense layer involving one neuron with sigmoidal/linear
activation for classification/regression. For bimodal and tri-
modal feature fusion, unimodal descriptors are fused by ap-
plying a single LSTM layer to each feature. The subsequent
outputs are merged followed by a dense layer comprising
a single neuron as above (see Fig. 3). The hyperparameters
4
Fig. 2. (a) Additive attention fusion architecture overview, and (b) Attention score computation process (FC layer comprises twelve neurons). N
denotes the number of neurons per layer. Linear/sigmoid activation is applied on the dense layer output for regression/classification.
such as number of neurons, activation function and dropout
rate are tuned via the validation set. An Adam optimizer is
utilized for training with learning rate of 0.01. We employ
binary cross entropy and mean absolute error as loss func-
tions for classification and regression respectively.
Attention fusion (LSTM AF): To achieve multimodal ex-
planations, we employ attention-based trimodal fusion as
in [50] to assign importance weights to the three modalities
at each time window (Fig. 2). Dense layers are employed
for each cue in [50], while we use one LSTM layer per
modality to quantify an importance weight. Also, while we
compute weights based on softmax scores generated per
time step, [50] focuses only on the channel with maxi-
mum attention weight discarding others. As in Fig. 2(a),
an LSTM layer is employed for each modality to learn
temporal dynamics, resulting in a fixed-length feature vec-
tor per modality. Unimodal descriptors are concatenated
and passed through a fully connected layer, and a soft-
max layer composed of three neurons (Fig. 2(b)). Attention
scores generated via the softmax layer are deemed as the
relative contribution of each modality per time window.
Layer normalization is applied over each unimodal feature
vector. To fuse normalized features, we employ an addi-
tive layer to sum the weighted unimodal features. This is
followed by a dense layer comprising a single neuron with
sigmoidal/linear activation for classification/regression. We
aggregate weights to compute modality contributions over
behavioral slices spanning multiple time windows.
Decision fusion (DF): We adopt the fusion weight estima-
tion approach [55] outlined below. Assuming the unimodal
classifier/regressor scores are p1 and p2 for the bimodal fu-
sion, the test sample score is defined as αp1 + (1 − α)p2, α ∈
[0, 1]. We perform grid search with a step-size of 0.05 to
identify the optimal α∗ maximizing F1-score and Pearson
correlation coefficient (PCC) respectively for classification
and regression (the same is extended to trimodal fusion).
Fig. 3. Trimodal feature fusion architecture. Linear activation is applied
on the dense layer output for regression. N denotes the number of
neurons per layer. The dense layer output involves linear activation and
32 neurons in the LSTM layer for regression model.
Data3D Data MatrixKineme Vector (16)Chunk SizeN = 12LSTM layerFC layerMerge layerPredictionSigmoidN = 1N = 36N = 12Data3D Data MatrixAUVector (17)Chunk SizeN = 12Data3D Data MatrixSpeechVector (23)Chunk Size5
scores denoting emotional stability instead of Neuroticism.
This MIT dataset [17] comprises audio-visual recordings of
138 mock job interviews with 69 undergraduate students,
with videos being 4.7 minutes long on average. All videos
are annotated with 16 interviewee-specific traits. We focus
on the following traits: recommended hiring score (RH)
denoting the candidate's hireability, level of excitement (Ex),
friendliness (Fr) and eye-contact (EC). We also examine
the Overall (Ov) interview score in prediction experiments.
Examples from the two datasets are presented in Figure 4.
4.2 Quantitative Experiments
Prediction Settings: We consider both continuous and dis-
crete prediction of personality and interview traits. For
(binary) classification, we dichotomize trait scores by thresh-
olding them at their median value. Tables 1 and 2 present
regression results, while Tables 3 and 4 present classification
results. Our models are fine-tuned on the FICS dataset via
the pre-defined validation set, while hyperparameter tuning
is achieved via 10-fold cross-validation (cv) on the smaller
MIT Interview dataset. Results reported on the MIT dataset
are μ ± σ statistics noted over 50 runs (5 repeated runs of
10-fold cv). Early stopping with a patience value of 4 epochs
is employed to prevent model degradation.
Chunk vs video-level prediction: To examine trait predic-
tion over tiny behavioral episodes (or slices), we segment
the original videos into smaller chunks of 2-7s for FICS, and
2-60s for the MIT dataset. All video chunks are assigned
the source video label. We then compute metrics over a) all
chunks (chunk-level performance), and b) over all videos
by assigning the majority label/mean value over all chunks
(video-level performance) for classification/regression. A
comparison of chunk vs video-level predictions for the three
modalities is presented in Figs. 8- 10
Performance Metrics: Due to the imbalanced class dis-
tribution in classification, we use two metrics: Accuracy
(Acc) and F1-Score. For regression, accuracy (Acc) defined
as 1-MAE (Mean Absolute Error) [24] and PCC (Pearson
Correlation Coefficient) are considered.
4.3 Results and Discussion
Based on Tables 1–4, we make the following observations:
• For regression benchmarking (Tables 1, 2), PCC is a
more stringent measure than Acc, as very low PCC
values are observed with relatively high Acc values
for the FICS dataset (Table 2). Tables 1 and 3 show
that regression and classification results are comparable
for the (smaller) MIT dataset. For FICS, the regression
scores are considerably higher than the classification
scores, which can be attributed to Gaussian-distributed
FICS traits with means around 0.5 [16].
• Speech features achieve optimal interview trait predic-
tion (Table 1), while Kineme and AU features perform
comparably. Optimal personality trait regression is also
achieved with audio features (Table 2), even as AUs
significantly outperform kinemes on the FICS dataset.
• Higher PCC scores are achieved with multimodal as
compared to unimodal methods on both the MIT and
FICS datasets. Bimodal and trimodal fusion perform
very similarly for both interview and personality trait
Fig. 4. FICS (top) and MIT (bottom) exemplars.
Fig. 5. Plots of 16 kinemes extracted for the FICS dataset following raster
ordering (left to right, top to bottom.)
Fig. 6. Selected kineme plots for the MIT dataset.
Fig. 7. Common AUs in the FICS and MIT datasets.
4 EXPERIMENTAL RESULTS
4.1 Datasets
The FICS dataset [16] contains 10K self-presentation snip-
pets derived from YouTube videos of people talking into
the camera. Averaging 15s in length, these videos are split
into a 3:1:1 proportion for train, validation and test. All
videos are annotated with OCEAN trait scores with 'N'
6
TABLE 1
Unimodal and multimodal regression results on the MIT dataset. Accuracy and PCC values are tabulated, with highest PCC achieved per trait
denoted in bold.
Trait
LSTM Kin
Unimodal
LSTM AU
LSTM Audio
LSTM FF
Trimodal
LSTM DF
Acc
0.93±0.04
0.95±0.03
0.94±0.04
0.94±0.04
0.95±0.03
PCC
0.84±0.26
0.93±0.10
0.89±0.20
0.89±0.13
0.93±0.10
Acc
0.93±0.04
0.95±0.03
0.94±0.04
0.94±0.04
0.95±0.03
PCC
0.84±0.26
0.93±0.10
0.89±0.20
0.89±0.22
0.93±0.10
Acc
0.96±0.03
0.96±0.03
0.95±0.02
0.95±0.03
0.96±0.03
PCC
0.94±0.10
0.93±0.09
0.95±0.06
0.94±0.08
0.96±0.06
Acc
0.97±0.03
0.97±0.03
0.97±0.02
0.96±0.03
0.97±0.02
PCC
0.96±0.08
0.96±0.08
0.98±0.05
0.96±0.08
0.98±0.03
Acc
0.97±0.01
0.98±0.01
0.95±0.03
0.96±0.03
0.98±0.01
PCC
0.97±0.04
0.97±0.03
0.97±0.06
0.96±0.06
0.98±0.02
Ov
RH
Ex
EC
Fr
LSTM AF
Acc
0.98±0.03
0.97±0.03
0.98±0.02
0.97±0.03
0.98±0.03
PCC
0.95±0.16
0.96±0.07
0.98±0.05
0.96±0.08
0.97±0.05
Bimodal
Trait
Kin + AU FF
Kin + AU DF
Kin + Aud FF
Kin + Aud DF
AU + Aud FF
AU + Aud DF
Acc
0.97±0.03
0.96±0.04
0.96±0.04
0.96±0.04
0.97±0.03
PCC
0.93±0.15
0.92±0.16
0.93±0.15
0.94±0.13
0.96±0.08
Acc
0.95±0.04
0.94±0.04
0.93±0.04
0.95±0.04
0.95±0.03
PCC
0.89±0.21
0.90±0.19
0.91±0.14
0.91±0.16
0.94±0.09
Acc
0.97±0.02
0.97±0.03
0.97±0.02
0.97±0.03
0.97±0.03
PCC
0.96±0.07
0.96±0.07
0.98±0.04
0.95±0.07
0.97±0.07
Acc
0.96±0.03
0.96±0.03
0.96±0.02
0.95±0.03
0.96±0.03
PCC
0.95±0.06
0.95±0.07
0.97±0.05
0.94±0.10
0.96±0.05
Acc
0.97±0.03
0.97±0.03
0.97±0.02
0.97±0.02
0.97±0.02
PCC
0.97±0.07
0.96±0.07
0.98±0.04
0.96±0.06
0.98±0.04
Acc
0.96±0.03
0.96±0.03
0.97±0.02
0.96±0.03
0.96±0.03
PCC
0.95±0.09
0.95±0.08
0.97±0.05
0.95±0.09
0.96±0.05
Ov
RH
Ex
EC
Fr
TABLE 2
Unimodal and multimodal regression results on the FICS dataset. Accuracy and PCC values for different methods are tabulated, with highest PCC
achieved per trait denoted in bold.
Trait
LSTM Kin
Open
Con
Extra
Agree
Neuro
Acc
0.872
0.864
0.869
0.885
0.867
PCC
0.060
0.027
0.048
0.046
0.051
Unimodal
LSTM AU
Acc
0.889
0.882
0.891
0.897
0.885
PCC
0.370
0.317
0.491
0.251
0.370
LSTM Audio
LSTM FF
Trimodal
LSTM DF
Acc
0.896
0.888
0.895
0.894
0.887
PCC
0.436
0.418
0.445
0.291
0.465
Acc
0.895
0.891
0.894
0.895
0.890
PCC
0.464
0.434
0.540
0.304
0.484
Acc
0.900
0.894
0.900
0.901
0.895
PCC
0.501
0.504
0.566
0.377
0.517
LSTM AF
Acc
0.895
0.888
0.896
0.899
0.891
PCC
0.483
0.428
0.534
0.300
0.481
Bimodal
Trait
Kin + AU FF
Kin + AU DF
Kin + Aud FF
Kin + Aud DF
AU + Aud FF
AU + Aud DF
Open
Con
Extra
Agree
Neuro
Acc
0.892
0.880
0.893
0.892
0.884
PCC
0.368
0.304
0.474
0.253
0.365
Acc
0.893
0.881
0.891
0.896
0.887
PCC
0.382
0.282
0.485
0.275
0.387
Acc
0.892
0.883
0.888
0.891
0.880
PCC
0.418
0.387
0.415
0.265
0.410
Acc
0.898
0.890
0.892
0.896
0.890
PCC
0.456
0.446
0.450
0.324
0.472
Acc
0.893
0.887
0.895
0.895
0.888
PCC
0.459
0.450
0.531
0.311
0.455
Acc
0.898
0.895
0.900
0.900
0.897
PCC
0.484
0.510
0.550
0.378
0.533
TABLE 3
Unimodal and multimodal classification results on the MIT dataset. Accuracy and F1-score are tabulated, with highest F1 achieved per trait
denoted in bold.
Trait
LSTM Kin
Unimodal
LSTM AU
LSTM Audio
LSTM FF
Trimodal
LSTM DF
Acc
0.83±0.11
0.79±0.12
0.82±0.13
0.79±0.13
0.80±0.15
F1
0.82±0.13
0.79±0.12
0.82±0.13
0.79±0.13
0.80±0.16
Acc
0.82±0.14
0.82±0.12
0.83±0.13
0.81±0.12
0.86±0.09
F1
0.81±0.15
0.82±0.13
0.83±0.14
0.80±0.13
0.85±0.09
Acc
0.94±0.08
0.95±0.07
0.95±0.07
0.93±0.08
0.94±0.07
F1
0.93±0.10
0.95±0.07
0.95±0.08
0.91±0.10
0.94±0.08
Acc
0.97±0.07
0.95±0.09
0.97±0.06
0.95±0.07
0.96±0.06
F1
0.96±0.10
0.95±0.10
0.96±0.06
0.94±0.10
0.95±0.06
Acc
0.97±0.05
0.98±0.06
0.97±0.04
0.95±0.07
0.97±0.05
F1
0.97±0.06
0.98±0.06
0.97±0.05
0.95±0.08
0.96±0.05
Ov
RH
Ex
EC
Fr
LSTM AF
Acc
0.97±0.06
0.95±0.08
0.96±0.06
0.94±0.09
0.95±0.06
F1
0.97±0.07
0.95±0.10
0.96±0.06
0.93±0.10
0.94±0.07
Trait
Kin + AU FF
Kin + AU DF
Kin + Aud FF
Kin + Aud DF
AU + Aud FF
AU + Aud DF
Acc
0.80±0.14
0.79±0.12
0.81±0.12
0.78±0.12
0.84±0.10
F1
0.80±0.14
0.79±0.13
0.80±0.12
0.76±0.13
0.84±0.11
Acc
0.85±0.13
0.83±0.13
0.84±0.11
0.84±0.13
0.87±0.11
F1
0.85±0.14
0.83±0.14
0.83±0.12
0.83±0.14
0.86±0.12
Acc
0.96±0.08
0.95±0.08
0.95±0.06
0.93±0.09
0.95±0.06
F1
0.96±0.09
0.94±0.10
0.95±0.07
0.92±0.12
0.94±0.07
Acc
0.96±0.07
0.96±0.07
0.96±0.07
0.94±0.08
0.96±0.07
F1
0.96±0.08
0.96±0.08
0.95±0.08
0.94±0.08
0.95±0.07
Acc
0.97±0.07
0.95±0.07
0.97±0.05
0.93±0.07
0.95±0.07
F1
0.96±0.07
0.95±0.08
0.97±0.05
0.92±0.08
0.95±0.07
Acc
0.96±0.06
0.95±0.07
0.97±0.05
0.94±0.08
0.97±0.06
F1
0.96±0.07
0.95±0.08
0.96±0.05
0.93±0.10
0.96±0.06
Ov
RH
Ex
EC
Fr
Bimodal
TABLE 4
Unimodal and multimodal classification results on the FICS dataset. Accuracy and F1-score for different methods are tabulated, with highest F1
achieved per trait denoted in bold.
7
Trait
Open
Con
Extra
Agree
Neuro
Trait
Open
Con
Extra
Agree
Neuro
LSTM Kin
F1
Acc
0.516
0.519
0.513
0.513
0.505
0.505
0.479
0.481
0.518
0.523
Unimodal
LSTM AU
F1
Acc
0.634
0.635
0.618
0.618
0.651
0.651
0.580
0.580
0.624
0.627
Kin + AU FF
F1
Acc
0.628
0.629
0.604
0.604
0.648
0.648
0.586
0.593
0.623
0.626
Kin + AU DF
Acc
0.632
0.599
0.657
0.584
0.620
F1
0.632
0.598
0.653
0.583
0.616
LSTM Audio
Acc
0.595
0.599
0.624
0.551
0.578
F1
0.590
0.592
0.623
0.545
0.547
LSTM FF
F1
0.638
0.623
0.665
0.585
0.611
Acc
0.638
0.623
0.667
0.588
0.618
Bimodal
Kin + Aud FF
Acc
0.612
0.564
0.649
0.544
0.617
F1
0.598
0.564
0.649
0.450
0.615
Kin + Aud DF
Acc
0.641
0.609
0.639
0.592
0.637
F1
0.638
0.607
0.636
0.592
0.635
Trimodal
LSTM DF
F1
0.672
0.638
0.695
0.598
0.665
Acc
0.676
0.640
0.695
0.599
0.665
AU + Aud FF
Acc
0.667
0.620
0.668
0.601
0.652
F1
0.664
0.619
0.667
0.594
0.651
LSTM AF
F1
0.633
0.582
0.669
0.560
0.638
Acc
0.633
0.594
0.671
0.565
0.639
AU + Aud DF
Acc
0.677
0.637
0.682
0.603
0.656
F1
0.672
0.637
0.682
0.596
0.651
TABLE 5
Soft Additive Attention Fusion Results over the 2s behavioral slice: MIT Dataset (left) and FICS Dataset (right)
Trait
Ov
RH
Ex
EC
Fr
Classification
F1
0.89±0.10
0.90±0.12
0.91±0.10
0.82±0.14
0.91±0.10
Acc
0.91±0.09
091±0.12
0.92±0.09
0.84±0.12
0.92±0.10
Regression
Trait
Acc
0.93±0.03
0.92±0.03
0.93±0.02
0.91±0.02
0.93±0.02
PCC
0.92±0.09
0.92±0.08
0.94±0.08
0.90±0.10
0.94±0.05
O
C
E
A
N
Classification
Acc
0.632
0.605
0.656
0.561
0.625
F1
0.619
0.604
0.656
0.556
0.625
Regression
PCC
Acc
0.475
0.896
0.428
0.888
0.501
0.893
0.326
0.899
0.479
0.887
prediction, with maximum PCC values of 0.98 achieved
for the Excited and Friendliness interview traits, and
a peak PCC of 0.566 achieved for the Extraversion
personality trait on FICS obtained with trimodal fusion.
• Focusing on multimodal methods, bimodal combina-
tions involving audio outperform others for interview
trait prediction. Also, feature fusion is more effective
than decision fusion in this case. Slightly different
trends are noted for the FICS dataset with decision
fusion slightly outperforming feature fusion; optimal
PCC values are noted for the AU+Aud combination
with decision fusion, implying that speech features in-
dividually and in combination with others acquire high
predictive power, mirroring findings in [17]. Bimodal
predictions improving over unimodal ones conveys
that kinemes and AUs provide complementary infor-
mation concerning interview and personality traits.
• Among trimodal
fusion methods, decision fusion
slightly outperforms attention and feature fusion on
the MIT dataset, while decision, attention and feature
fusion approaches perform first, second and third best
on the FICS dataset. These results again reveal the
complementary utility of the kineme, AU and speech
features; optimal performance achieved with trimodal
decision fusion conveys that the AU and kineme clas-
sifiers improve prediction performance in instances
where speech descriptors are ineffective.
• Focusing on classification (Tables 3 and 4), considering
unimodal results, audio features achieve optimal F1-
scores on Interview traits (highest F1 of 0.95 for Rec-
ommended Hiring and Excited), while AUs achieve the
best classification on personality traits (maximum F1
of 0.651 for Extraversion). AUs and kinemes perform
similarly on the MIT dataset, while speech descriptors
achieve much higher F1-scores than kinemes on FICS.
• Multimodal approaches again outperform unimodal
methods in categorizing both interview and personality
traits. With respect to bimodal methods, combinations
involving speech tend to perform well for both inter-
view and personality prediction. There is little to choose
between feature and decision fusion for interview trait
prediction, while decision fusion slightly outperforms
feature fusion for predicting personality traits.
• Trimodal
fusion performs best producing peak F1
scores of 0.98 and 0.695 for the RH interview, and Ex-
traversion personality traits. Decision fusion produces
optimal trait classification on both datasets, with feature
and attention fusion performing comparably.
The above results represent trait prediction at the video
level, on examining 15s FICS videos or upon collating clas-
sification/regression results over 5–60s chunks/segments
on the MIT dataset (the best results obtained by averaging
chunk-level values, or computing the majority label over all
chunks are listed in Tables 1 and 3).
4.3.1 Thin-slice predictions:
We explore trait prediction over short behavioral episodes
known as thin slices and present the multimodal results for
classification and regression using soft additive attention-
fusion over 2s behavioral slice in Table 5. The results convey
that reasonable prediction performance can be achieved
even with 2s-long slices expressing the efficacy of these
small behavioral slices for predicting different traits.
Further, we visualize the comparison of chunk and video-
level prediction performance for varying time-lengths over
all three modalities in Figures 8–10. It can be noted that bet-
ter prediction performance has been achieved with video-
implying that while
level as compared to chunk-level
episodic behaviors may be inconsistent with one another,
8
Fig. 8. Chunk vs video-level predictions with kinemes for FICS (left) and MIT (right). dataset.
Fig. 9. Chunk vs video-level predictions with AUs for FICS (left) and MIT (right). dataset.
Fig. 10. Chunk vs video-level predictions with speech features for FICS (left) and MIT (right). dataset.
trait specific behaviors tend to be homogeneous over longer
time-span. For the OCEAN traits, kineme-based chunk and
video-level PCC values deteriorate over larger time-slices
(Fig. 8 (left)) while remaining stable in the case of AU
features. The speech features are mostly consistent with
different time-slices in case of chunk-level while decreasing
slightly for video-level prediction. Conversely, chunk and
video-level PCC values increase for all three modalities with
increasing time-slice length for the MIT dataset (Fig. 8–10
(right)). This trend highlights that AUs, describing facial
behavior, encode more trait specific information, specifically
for personality traits as compared to kinemes characterizing
head movement and speech features. The better predic-
tion with larger time-slices for all modalities over the MIT
dataset suggests that interview behavior can be captured
better over longer time-span.
5 EXPLAINABILITY & INTERPRETABILITY
5.1 Interpretation via kinemes and AUs
Along with their predictive power, kinemes and AUs also
enable facile trait-specific behavioral explanations. To this
end, we considered the top and bottom 10-percentile videos
for each trait, and computed the most frequently occurring
AUs and kinemes for the same. The most frequently occur-
ring four kinemes, and five dominant AUs for these high (H)
and low (L)-rated videos are presented in Table 6. Analysing
the table, we make the following remarks:
• The presence of kineme 16 (denoting head nodding and
shaking) in all OCEAN traits conveys the significance
of head motion for the characterization of personal-
ity traits. Combination of head nodding and shaking
with other kineme representations highlights the sub-
9
TABLE 6
Explaining OCEAN and interview traits via kinemes and AUs. MIT kinemes in bold font are visualized in Figure 6.
Dataset
Trait
Dominant Kin
Dominant AUs
Inferences
O (H)
C (H)
E (H)
A (H)
N (H)
O (L)
C (L)
E (L)
A (L)
N (L)
RH (H)
Ex (H)
EC (H)
Fr (H)
RH (L)
Ex (L)
EC (L)
Fr (L)
2, 8, 10, 16
1, 8, 10, 16
2, 10, 14, 16
3, 8, 10, 16
2, 8, 10, 16
1, 6, 11, 16
2, 4, 8, 16
1, 4, 10, 16
1, 8, 9, 16
1, 5, 12, 16
16, 14, 3, 4
14, 3, 4, 9
14, 12, 4, 5
16, 3, 11, 14
11, 1, 2, 5
11, 16, 2, 3
13, 7, 16, 11
3, 11, 4, 9
Persistent head movements (as noted in [56]) with nodding and smiling.
7, 12, 14, 25, 26
7, 12, 17, 25, 26
Upward head-tilt indicative of upright demeanor and head nodding.
10, 12, 17, 25, 26 Head tilt-down with nodding, and facial gestures related to speaking.
7, 12, 14, 25, 26
7, 12, 17, 25, 26
4, 10, 14, 17, 26
4, 7, 10, 14, 25
4, 7, 10, 14, 17
4, 14, 17, 25, 26
4, 7, 10, 14, 25
Frequent head nodding and smiling (associated with courteous behavior [57], [58]).
Frequent head movements with nodding and smiling.
Relatively fewer head movements and frowning.
Head tilt-down avoiding eye-contact, head shaking and frowning.
Tilt-up, head shaking and frowning.
Frequent head movements and frowning.
Few head movements, head shaking and frowning.
5, 10, 12, 14, 25
5, 10, 12, 14, 25
6, 7, 10, 14, 25
5, 10, 12, 14, 25
6, 7, 12, 14, 25
4, 6, 7, 14, 25
6, 7, 10, 12, 25
1, 4, 6, 7, 25
Head nodding and smiling, and being expressive.
Head nodding and exhibiting persistent head motion. Smiling and expressive.
Head up, nodding and showing limited facial emotions.
Frequent head movements and smiling.
Head shaking and exhibiting minimal facial expressions.
Head shaking and nodding. Frowning and showing minimal facial expressions.
Frequent nodding is perceived as avoiding eye-contact.
Head shaking, frowning and otherwise being minimally expressive.
FICS
MIT
tle difference between high and low-rated personality
impressions. Also, note that AUs 25 and 26 signifying
talking behavior are present in all videos.
• Focusing on other kinemes, high Openness is character-
ized by kinemes 2 and 8, which signify persistent head
movements. This finding is echoed in [56], where large
motion variations are found to associate with high O
impressions. Presence of AUs 12 and 14 indicates that
a smiling demeanor characterizes high O. Conversely,
kineme 6 denoting minimal head motion and AUs 4
and 17 typical of frowning and diffident behavior are
commonly noted for low O videos.
• Kineme 1 denoting an upward head tilt is associated
with high C, while kinemes 2 and 4 depicting tilt-
down and head-shaking are associated with low C.
This indicates that attempting to maintain eye-contact
conveys diligence and honesty, while avoiding eye-
contact conveys insincerity.
• Extraversion appears to be conveyed better by AUs
than kinemes; Dominant AUs for high E include 10,
12 and 17 indicating a friendly and talkative nature,
while dominant kinemes 2 and 14 convey significant
head movements. Conversely, low E is associated with
kineme 4 denoting head-shaking and AUs 4, 7 and
17 indicating frowning, overall conveying a socially
distant nature.
• High Agreeableness is characterized by kineme 3 (head-
nod), and AUs 12 and 14 which constitute a smile.
Conversely, kinemes 1, 8 and 9 dominate low A, and
they collectively convey persistent head motion. Also,
AUs dominant for low A are 4, 14 and 17, cumulatively
describing a frown; overall, nodding and smiling is
viewed as courteous, while frequent head movements
and frowning convey hostility.
• Emotional stability (high N) is associated with kinemes
2 and 8, and AUs 7, 12 and 17, indicating persistent
head motion and facial expressiveness. On the other
hand, a neurotic trait is conveyed via limited head mo-
tion and head-shaking (kinemes 1, 5, 12) and frowning
(described by AUs 4, 7, 10).
• While kinemes for the MIT videos are less discernible,
due to smaller face size (Fig. 4) and the fact that
they capture an interactional setting, some patterns are
nevertheless evident as seen in Fig. 6; these kinemes
are highlighted in Table 6. As with FICS, Kineme 14
denoting a head-nod is commonly observed for all high
trait videos, while kineme 11 depicting a head-shake is
common for all low-trait videos.
• High RH scores are elicited with expressive facial
behavior involving head-nodding and smiling. Con-
versely,
low RH scores are associated with head-
shaking and exhibiting limited facial expressions.
Highly excited behavior is associated with identical
AUs as high RH, and persistent head motion. Inversely,
low excitement scores are connected with head shaking,
and limited facial emotions.
• Identical AUs are observed for both high and low
eye-contact, implying that head movements primarily
impact eye-contact impressions. Head nodding (kineme
14) is associated with high EC, while kinemes 11 and
16 depicting head shaking and frequent head-nodding
elicit low EC scores. Therefore interestingly, while head
nodding is beneficial, frequent nodding is perceived as
avoiding eye-contact.
• High friendliness is characterized by kinemes 11, 14
and 16, signifying persistent head motion along with
expressive and smiling facial movements (AUs 5, 12
and 14). Conversely, low friendliness is associated with
head-shaking (kineme 11) and frowning (AUs 4, 6, 7).
5.2 Attention Score-based Interpretations
While Table 6 presents unimodal behavioral explanations
via kinemes and AUs, behaviors are expressed and best
modeled multimodally as seen from our empirical results
(Section 4.3). For multimodal explanations, we explore the
10
Fig. 11. Mean modality-specific attention weights for personality traits (left) and interview traits (right). Error bars denote standard error.
attention-fusion network (Fig. 2) to estimate the relative con-
tribution of each modality towards trait regression. We visu-
alize softmax scores learned by the attention-fusion network
as follows. For the FICS dataset, we present mean attention
scores obtained over 10 runs on 15s test videos (Fig. 11(left)),
while we present softmax scores averaged over 15s chunks
for MIT videos across 50 runs (Fig. 11(right)). Our remarks
from the weight plots are as follows:
head movement [66]. On the surprising finding of
AUs and speech features impacting eye-contact, prior
studies [67] have revealed a low-yet-meaningful cor-
relation between eye contact impressions and vocal
acoustic features. Friendliness is best characterized by
head movement and voice features, showing that the
integration of visual and auditory modalities can be
crucial in discerning interviewee friendliness [68].
• Cumulatively, Fig. 11 conveys that while the relative
contribution of speech features towards weighted fu-
sion is not high for personality trait prediction, they
tend to play a significant role in predicting interview
traits on the MIT dataset. These observations mirror
prior findings; the criticality of visual features such as
head movements and facial movements for personality
trait recognition has been noted in [14], [59] while the
impact of prosodic speech features on interview trait
impressions is discussed in [17].
• Fig. 11(left) conveys that either kineme or AU features
are most critical for personality trait prediction. Specifi-
cally, kinemes maximally contribute to the prediction of
Openness and Extraversion, while AUs are most critical
for predicting Agreeableness and Neuroticism. Both
kinemes and AUs are found to be equally critical for
estimating Conscientiousness, in line with the findings
in [60]. Extraversion and Openness are conveyed by
exaggerated physical and head movements [56], [61],
with different head movement patterns representing
high and low Extraversion [62]. While Agreeableness
is also positively correlated with head movements [61],
[62], empathetic behavior is accurately conveyed via
facial expressions as denoted by the higher AU weights.
Facial movements (e.g., unconcerned or anxious) better
convey emotional stability [63].
• From Fig. 11(right), it can be seen that facial movements
have relatively less impact on interview trait prediction
with the exception of eye contact. This can partly be at-
tributed to the smaller face size in MIT videos, limiting
the efficacy of AU detection. Conversely, speech fea-
tures significantly impact trait prediction with the ex-
ception of recommended hiring and eye contact traits.
While prosodic speech behavior has been found to
considerably influence interview trait impressions [17],
[64], other forms of non-verbal behavior such as pos-
itive facial expressions and frequent postural changes
are known to impact hierabilty [65].
• For the Excited trait, speech plays a prominent role
with a high correlation to continuous or restricted
6 CONCLUSION
This work demonstrates the efficacy of multimodal (kineme,
AU and speech) behavioral cues to achieve explainable pre-
diction of OCEAN and interview traits. Our results confirm
that efficient trait prediction can be achieved with both
unimodal and multimodal approaches. Also, multimodal
approaches outperform their unimodal counterparts owing
to complementary information provided by trait-specific
behavioral cues. In addition, frequently occurring kineme
and AU patterns enable behavioral explanations associated
with each trait.
In terms of limitations, this work extracts all behav-
ioral features over a fixed time window (same time-scale);
however, behaviors associated with human personality may
manifest over different time scales; e.g., facial expression or
head motion patterns could be affected by speaking behav-
ior (talkative: drastic variation in speaking behavior over
video frames, or reserved: lingering silence over most video
frames). Investigating the effect of temporal scales will be a
future research direction. Trait-specific behavioral patterns
can also be utilized to create virtual agents to train users
in interviewing or public speaking settings. The authors do
not advise using the proposed methodologies for complex
processes like job recruitment per se; however, explanatory
technologies can be utilized as a complementary tool in
decision-making processes.
ACKNOWLEDGMENTS
We would like to thank A. Samanta, IIT Kanpur for sharing
the kineme implementation.
REFERENCES
[1]
J. C. S. J. Junior, Y. G ̈uc ̧l ̈ut ̈urk, M. P ́erez, U. G ̈uc ̧l ̈u, C. Andujar,
X. Bar ́o, H. J. Escalante, I. Guyon, M. A. Van Gerven, R. Van Lier
et al., "First impressions: A survey on vision-based apparent per-
sonality trait analysis," IEEE Transactions on Affective Computing,
2019.
11
[2] A. Vinciarelli and G. Mohammadi, "A survey of personality com-
puting," IEEE Transactions on Affective Computing, vol. 5, no. 3, pp.
273–291, 2014.
[25] S. Hassan, N. Akhtar, and A. K. Yılmaz, "Impact of the consci-
entiousness as personality trait on both job and organizational
performance." Journal of Managerial Sciences, vol. 10, no. 1, 2016.
[3] R. R. McCrae and P. T. Costa, "Validation of the five-factor model
of personality across instruments and observers." Journal of person-
ality and social psychology, vol. 52, no. 1, p. 81, 1987.
J. M. Digman, "Higher-order factors of the big five." Journal of
personality and social psychology, vol. 73, no. 6, p. 1246, 1997.
[5] H. E. Cattell and A. D. Mead, "The sixteen personality factor
[4]
[6]
questionnaire (16pf)." 2008.
S. Raza and B. Carpenter, "A model of hiring decisions in real
employment interviews." Journal of Applied Psychology, vol. 72, pp.
596–603, 1987.
[7] L. Batrinca, N. Mana, B. Lepri, F. Pianesi, and N. Sebe, "Please, tell
me about yourself: Automatic personality assessment using short
self-presentations," 11 2011, pp. 255–262.
[8] K. Van Dam, "Trait perception in the employment interview: A
five–factor model perspective," International Journal of Selection and
Assessment, vol. 11, no. 1, pp. 43–55, 2003.
[9] T. DeGroot and J. Gooty, "Trait perception in the employment
interview: A five–factor model perspective," Journal of Business and
Psychology, vol. 24, no. 2, 2009.
[10] A. Samanta and T. Guha, "On the role of head motion in affective
expression," in IEEE International Conference on Acoustics, Speech
and Signal Processing (ICASSP).
IEEE, 2017, pp. 2886–2890.
[11] --, "Emotion sensing from head motion capture," IEEE Sensors
Journal, vol. 21, no. 4, pp. 5035–5043, 2020.
[12] M. Sidorov, S. Ultes, and A. Schmitt, "Automatic recognition of
personality traits: A multimodal approach," in Proceedings of the
2014 Workshop on Mapping Personality Traits Challenge and Workshop,
2014, pp. 11–15.
[13] O. Kampman, E. J. Barezi, D. Bertero, and P. Fung, "Investigating
audio, visual, and text fusion methods for end-to-end automatic
personality prediction," arXiv preprint arXiv:1805.00705, 2018.
[14] H. Malik, H. Dhillon, R. Goecke, and R. Subramanian, "I am
empathetic and dutiful, and so will make a good salesman: Char-
acterizing hirability via personality and behavior," 2020.
[15] S. Eddine Bekhouche, F. Dornaika, A. Ouafi, and A. Taleb-Ahmed,
"Personality traits and job candidate screening via analyzing facial
videos," in Proceedings of the IEEE conference on computer vision and
pattern recognition workshops, 2017, pp. 10–13.
[16] H. J. Escalante, H. Kaya, A. A. Salah, S. Escalera, Y. G ̈uc ̧, U. G ̈uc ̧l ̈u,
X. Bar ́o, I. Guyon, J. C. Jacques, M. Madadi et al., "Modeling,
recognizing, and explaining apparent personality from videos,"
IEEE Transactions on Affective Computing, 2020.
[17] I. Naim, M. I. Tanveer, D. Gildea, and M. E. Hoque, "Automated
analysis and prediction of job interview performance," IEEE Trans-
actions on Affective Computing, vol. 9, no. 2, pp. 191–204, 2016.
[18] S. Madan, M. Gahalawat, T. Guha, and R. Subramanian, "Head
matters: Explainable human-centered trait prediction from head
motion dynamics," in Proceedings of the 2021 International Confer-
ence on Multimodal Interaction, 2021, pp. 435–443.
[19] Y. Gucluturk, U. Guclu, X. Baro, H. J. Escalante, I. Guyon,
S. Escalera, M. A. J. van Gerven, and R. van Lier, "Multimodal
first impression analysis with deep residual networks," IEEE
Trans. Affect. Comput., vol. 9, no. 3, p. 316–329, Jul. 2018. [Online].
Available: https://doi.org/10.1109/TAFFC.2017.2751469
[20] S. Hoppe, T. Loetscher, S. A. Morey, and A. Bulling, "Eye move-
ments during everyday behavior predict personality traits," Fron-
tiers in human neuroscience, p. 105, 2018.
[21] J. F. Rauthmann, C. T. Seubert, P. Sachse, and M. R. Furtner, "Eyes
as windows to the soul: Gazing behavior is related to personality,"
Journal of Research in Personality, vol. 46, no. 2, pp. 147–156, 2012.
[22] D. B. Jayagopi, H. Hung, C. Yeo, and D. Gatica-Perez, "Modeling
dominance in group conversations using nonverbal activity cues,"
IEEE Transactions on Audio, Speech, and Language Processing, vol. 17,
no. 3, pp. 501–513, 2009.
[23] R. Subramanian, Y. Yan, J. Staiano, O. Lanz, and N. Sebe, "On the
relationship between head pose, social attention and personality
prediction for unstructured and dynamic group interactions," in
Proceedings of the 15th ACM on International conference on multimodal
interaction, 2013, pp. 3–10.
[24] Y. G ̈uc ̧l ̈ut ̈urk, U. G ̈uc ̧l ̈u, X. Baro, H. J. Escalante, I. Guyon, S. Es-
calera, M. A. Van Gerven, and R. Van Lier, "Multimodal first im-
pression analysis with deep residual networks," IEEE Transactions
on Affective Computing, vol. 9, no. 3, pp. 316–329, 2017.
[26] J. W. Moy and K. F. Lam, "Selection criteria and the impact of
personality on getting hired," Personnel Review, 2004.
[27] C. Tay, S. Ang, and L. Van Dyne, "Personality, biographical char-
acteristics, and job interview success: a longitudinal study of the
mediating effects of interviewing self-efficacy and the moderating
effects of internal locus of causality." Journal of Applied Psychology,
vol. 91, no. 2, p. 446, 2006.
[28] M. R. Barrick and M. K. Mount, "The big five personality dimen-
sions and job performance: a meta-analysis," Personnel psychology,
vol. 44, no. 1, pp. 1–26, 1991.
[29] L. Witt, L. A. Burke, M. R. Barrick, and M. K. Mount, "The
interactive effects of conscientiousness and agreeableness on job
performance." Journal of applied psychology, vol. 87, no. 1, p. 164,
2002.
[30] M. K. Mount, M. R. Barrick, and G. L. Stewart, "Five-factor model
of personality and performance in jobs involving interpersonal
interactions," Human performance, vol. 11, no. 2-3, pp. 145–165,
1998.
[31] S. Rothmann and E. P. Coetzer, "The big five personality dimen-
sions and job performance," SA Journal of industrial psychology,
vol. 29, no. 1, pp. 68–74, 2003.
[32] W. Samek and K.-R. M ̈uller, "Towards explainable artificial intelli-
gence," in Explainable AI: interpreting, explaining and visualizing deep
learning. Springer, 2019, pp. 5–22.
[33] A. S. Wicaksana and C. C. Liem, "Human-explainable features
for job candidate screening prediction," in 2017 IEEE Conference on
Computer Vision and Pattern Recognition Workshops (CVPRW). IEEE,
2017, pp. 1664–1669.
[34] X.-S. Wei, C.-L. Zhang, H. Zhang, and J. Wu, "Deep bimodal
regression of apparent personality traits from short video se-
quences," IEEE Transactions on Affective Computing, vol. 9, no. 3,
pp. 303–315, 2017.
[35] C. Ventura, D. Masip, and A. Lapedriza, "Interpreting cnn models
for apparent personality trait regression," in Proceedings of the IEEE
conference on computer vision and pattern recognition workshops, 2017,
pp. 55–63.
[36] Y. Gucluturk, U. Guclu, M. Perez, H. Jair Escalante, X. Baro,
I. Guyon, C. Andujar, J. Jacques Junior, M. Madadi, S. Escalera
et al., "Visualizing apparent personality analysis with deep resid-
ual networks," in Proceedings of the IEEE International Conference on
Computer Vision Workshops, 2017, pp. 3101–3109.
[37] Y. Ding, L. Shi, and Z. Deng, "Low-level characterization of ex-
pressive head motion through frequency domain analysis," IEEE
Transactions on Affective Computing, 2018.
[38] H. Gunes and M. Pantic, "Dimensional emotion prediction from
spontaneous head gestures for interaction with sensitive artificial
listeners," in International conference on intelligent virtual agents.
Springer, 2010, pp. 371–377.
[39] Z. Yang and S. S. Narayanan, "Modeling dynamics of expressive
body gestures in dyadic interactions," IEEE Transactions on Affec-
tive Computing, vol. 8, no. 3, pp. 369–381, 2016.
[40] G. An and R. Levitan, "Lexical and acoustic deep learning model
for personality recognition." in INTERSPEECH, 2018, pp. 1761–
1765.
[41] F. Valente, S. Kim, and P. Motlicek, "Annotation and recognition of
personality traits in spoken conversations from the ami meetings
corpus," in Thirteenth annual conference of the international speech
communication association, 2012.
[42] K. Mangalam and T. Guha, "Learning spontaneity to improve
emotion recognition in speech," arXiv preprint arXiv:1712.04753,
2017.
[43] A. Tawari and M. M. Trivedi, "Speech emotion analysis: Exploring
the role of context," IEEE Transactions on multimedia, vol. 12, no. 6,
pp. 502–509, 2010.
[44] L. Abdel-Hamid, "Egyptian arabic speech emotion recognition
using prosodic, spectral and wavelet features," Speech Communi-
cation, vol. 122, pp. 19–30, 2020.
[45] S. I. Levitan, Y. Levitan, G. An, M. Levine, R. Levitan, A. Rosen-
berg, and J. Hirschberg, "Identifying individual differences in
gender, ethnicity, and personality from dialogue for deception
detection," in Proceedings of the second workshop on computational
approaches to deception detection, 2016, pp. 40–44.
[46] A. Dhall and J. Hoey, "First impressions-predicting user person-
ality from twitter profile images," in International Workshop on
Human Behavior Understanding. Springer, 2016, pp. 148–158.
[47] N. Al Moubayed, Y. Vazquez-Alvarez, A. McKay, and A. Vincia-
relli, "Face-based automatic personality perception," in Proceedings
of the 22nd ACM international conference on Multimedia, 2014, pp.
1153–1156.
[48] K. S. Meng and L. Leung, "Factors influencing tiktok engagement
behaviors in china: An examination of gratifications sought, nar-
cissism, and the big five personality traits," Telecommunications
Policy, vol. 45, no. 7, p. 102172, 2021.
[49] S. Song, S. Jaiswal, E. Sanchez, G. Tzimiropoulos, L. Shen, and
M. Valstar, "Self-supervised learning of person-specific facial dy-
namics for automatic personality recognition," IEEE Transactions
on Affective Computing, 2021.
[50] R. Sharma, T. Guha, and G. Sharma, "Multichannel attention
network for analyzing visual behavior in public speaking," in 2018
IEEE Winter Conference on Applications of Computer Vision (WACV).
IEEE, 2018, pp. 476–484.
[51] R. L. Birdwhistell, Kinesics and context: Essays on body motion
communication. University of Pennsylvania press, 2010.
[52] T. Baltruˇsaitis, P. Robinson, and L.-P. Morency, "Openface: an
open source facial behavior analysis toolkit," in 2016 IEEE Winter
Conference on Applications of Computer Vision (WACV).
IEEE, 2016,
pp. 1–10.
[53] B. McFee, C. Raffel, D. Liang, D. P. Ellis, M. McVicar, E. Batten-
berg, and O. Nieto, "librosa: Audio and music signal analysis in
python."
[54] B. Schuller, S. Steidl, and A. Batliner, "The interspeech 2009 emo-
tion challenge," 2009.
[55] S. Koelstra and I. Patras, "Fusion of facial expressions and eeg
for implicit affective tagging," Image and Vision Computing, vol. 31,
no. 2, pp. 164–174, 2013.
[56] M. Koppensteiner, "Motion cues that make an impression:
Predicting perceived personality by minimal motion information,"
Journal of Experimental Social Psychology, vol. 49, no. 6, pp. 1137–
1143, 2013. [Online]. Available: https://www.sciencedirect.com/
science/article/pii/S0022103113001467
[57] R. Ishii, C. Ahuja, Y. I. Nakano, and L.-P. Morency, "Impact of per-
sonality on nonverbal behavior generation," in ACM International
Conference on Intelligent Virtual Agents, 2020.
[58] T. Osugi and J. I. Kawahara, "Effects of head nodding and shaking
motions on perceptions of likeability and approachability," Percep-
tion, vol. 47, no. 1, pp. 16–29, 2018.
[59] B. Lepri, R. Subramanian, K. Kalimeri, J. Staiano, F. Pianesi,
and N. Sebe, "Connecting meeting behavior with extraversion-a
systematic study," IEEE Transactions on Affective Computing, vol. 3,
no. 4, pp. 443–455, 2012.
[60] O. Celiktutan and H. Gunes, "Automatic prediction of impressions
in time and across varying context: Personality, attractiveness and
likeability," IEEE transactions on affective computing, vol. 8, no. 1,
pp. 29–42, 2015.
[61] E. Oberzaucher and K. Grammer, "Everything is movement: on
the nature of embodied communication," Embodied communication
in humans and machines, pp. 151–177, 2008.
[62] K. Ruhland, K. Zibrek, and R. McDonnell, "Perception of person-
ality through eye gaze of realistic and cartoon models," in Proceed-
ings of the ACM SIGGRAPH Symposium on Applied Perception, 2015,
pp. 19–23.
[63] S. M. Breil, S. Osterholz, S. Nestler, and M. D. Back, "13 contri-
butions of nonverbal cues to the accurate judgment of personality
traits," The Oxford handbook of accurate personality judgment, p. 195,
2021.
[64] T. DeGroot and D. Kluemper, "Evidence of predictive and incre-
mental validity of personality factors, vocal attractiveness and
interview," International Journal of Selection and
the situational
Assessment, vol. 15, no. 1, pp. 30–39, 2007.
[65] S. P. Levine and R. S. Feldman, "Women and men's nonverbal
behavior and self-monitoring in a job interview setting," Applied
HRM Research, vol. 7, no. 1, pp. 1–14, 2002.
[66] S. Walther, F. Ramseyer, H. Horn, W. Strik, and W. Tschacher,
"Less structured movement patterns predict severity of positive
syndrome, excitement, and disorganization," Schizophrenia bulletin,
vol. 40, no. 3, pp. 585–591, 2014.
[67] F. Eyben, F. Weninger, L. Paletta, and B. W. Schuller, "The acoustics
of eye contact: detecting visual attention from conversational au-
dio cues," in Proceedings of the 6th workshop on Eye gaze in intelligent
human machine interaction: gaze in multimodal interaction, 2013, pp.
7–12.
[68] D. House, "Integrating audio and visual cues for speaker friendli-
ness in multimodal speech synthesis," in Eighth Annual Conference
of the International Speech Communication Association, 2007.
12
Surbhi Madan is currently pursuing her PhD
at the Indian Institute of Technology Ropar, In-
dia. She received an M.Tech degree in Com-
puter Science and Engineering from the National
Institute of Technology, Hamirpur (India). She
received her B.Tech. in Information Technology
from Uttar Pradesh Technical University, Luc-
know (India). Her research interests include af-
fective computing, computer vision, and Human-
Computer Interaction.
Monika Gahalawat received her Master's de-
gree in Computer Science and Engineering from
the Indian Institute of Technology Roorkee and
Bachelor of Engineering degree from Chandi-
garh College of Engineering and Technology
affiliated with Punjab University in Chandigarh.
She's currently a PhD student at the University
of Canberra, Australia. Her research interests
include computer vision, affective computing, be-
havior analysis and human-computer interac-
tion.
Tanaya Guha received her Ph.D. degree in Elec-
trical & Computer Engineering from the Univer-
sity of British Columbia, Vancouver,
in 2013.
She is a Senior Lecturer of Computing Science
at University of Glasgow. Her research focuses
on developing machine intelligence capabilities
to understand human behavior combining ma-
chine learning, speech/signal processing and
computer vision. She is an elected member of
IEEE MSA TC, IEEE MMSP TC and an execu-
tive committee member of AAAC.
Roland Goecke received his Ph.D. degree in
computer science from The Australian National
University, Canberra, in 2004. He is Professor
of Affective Computing with the University of
Canberra, where he is serves as Director of the
Human-Centred Technology Research Centre.
His research interests include affective comput-
ing, pattern recognition, computer vision, hu-
man–computer interaction and multimodal signal
processing. He is a senior member of the IEEE,
and an ACM and AAAC member.
Ramanathan Subramanian received his Ph.D.
in Electrical and Computer Engg. from NUS in
2008. He is Associate Professor in the School of
IT & Systems, University of Canberra. His past
affiliations include IIT Ropar, IHPC (Singapore),
IIIT Hyderabad and
U Glasgow (Singapore),
UIUC-ADSC (Singapore). His research focuses
on Human-centered computing, especially on
modeling non-verbal behavioral cues for interac-
tive analytics. He is an IEEE Senior Member, and
an ACM and AAAC member.
|
|
http://arxiv.org/abs/2302.11571v1 | 2023-02-20T07:37:03 | 2023-02-20T07:37:03 | Personalized and privacy-preserving federated heterogeneous medical
image analysis with PPPML-HMI | Heterogeneous data is endemic due to the use of diverse models and settings
of devices by hospitals in the field of medical imaging. However, there are few
open-source frameworks for federated heterogeneous medical image analysis with
personalization and privacy protection simultaneously without the demand to
modify the existing model structures or to share any private data. In this
paper, we proposed PPPML-HMI, an open-source learning paradigm for personalized
and privacy-preserving federated heterogeneous medical image analysis. To our
best knowledge, personalization and privacy protection were achieved
simultaneously for the first time under the federated scenario by integrating
the PerFedAvg algorithm and designing our novel cyclic secure aggregation with
the homomorphic encryption algorithm. To show the utility of PPPML-HMI, we
applied it to a simulated classification task namely the classification of
healthy people and patients from the RAD-ChestCT Dataset, and one real-world
segmentation task namely the segmentation of lung infections from COVID-19 CT
scans. For the real-world task, PPPML-HMI achieved $\sim$5\% higher Dice score
on average compared to conventional FL under the heterogeneous scenario.
Meanwhile, we applied the improved deep leakage from gradients to simulate
adversarial attacks and showed the solid privacy-preserving capability of
PPPML-HMI. By applying PPPML-HMI to both tasks with different neural networks,
a varied number of users, and sample sizes, we further demonstrated the strong
robustness of PPPML-HMI. | [
"Juexiao Zhou",
"Longxi Zhou",
"Di Wang",
"Xiaopeng Xu",
"Haoyang Li",
"Yuetan Chu",
"Wenkai Han",
"Xin Gao"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.11571v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.11571v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "eess.IV",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"eess.IV",
"cs.CV",
"cs.LG"
] | IEEE TRANSACTIONS ON MEDICAL IMAGING, VOL. XX, NO. XX, XXXX 2023
1
Personalized and privacy-preserving federated
heterogeneous medical image analysis with
PPPML-HMI
Juexiao Zhou, Longxi Zhou, Di Wang, Member, IEEE, Xiaopeng Xu, Haoyang Li, Yuetan Chu, Wenkai
Han, Xin Gao, Member, IEEE
3
2
0
2
b
e
F
0
2
]
V
I
.
s
s
e
e
[
1
v
1
7
5
1
1
.
2
0
3
2
:
v
i
X
r
a
Abstract- Heterogeneous data is endemic due to the
use of diverse models and settings of devices by hospi-
tals in the field of medical imaging. However, there are
few open-source frameworks for federated heterogeneous
medical image analysis with personalization and privacy
protection simultaneously without the demand to modify
the existing model structures or to share any private data.
In this paper, we proposed PPPML-HMI, an open-source
learning paradigm for personalized and privacy-preserving
federated heterogeneous medical image analysis. To our
best knowledge, personalization and privacy protection
were achieved simultaneously for the first time under the
federated scenario by integrating the PerFedAvg algorithm
and designing our novel cyclic secure aggregation with the
homomorphic encryption algorithm. To show the utility of
PPPML-HMI, we applied it to a simulated classification task
namely the classification of healthy people and patients
from the RAD-ChestCT Dataset, and one real-world seg-
mentation task namely the segmentation of lung infections
from COVID-19 CT scans. For the real-world task, PPPML-
HMI achieved ∼5% higher Dice score on average com-
pared to conventional FL under the heterogeneous sce-
nario. Meanwhile, we applied the improved deep leakage
from gradients to simulate adversarial attacks and showed
the solid privacy-preserving capability of PPPML-HMI. By
applying PPPML-HMI to both tasks with different neural
networks, a varied number of users, and sample sizes, we
further demonstrated the strong robustness of PPPML-HMI.
Index Terms- Medical imaging, Personalization, Feder-
ated learning, Privacy, COVID-19
I. INTRODUCTION
The research reported in this publication was supported by
the King Abdullah University of Science and Technology (KAUST)
with grants from the Office of Research Administration (ORA) at
KAUST under award numbers FCC/1/1976-44-01, FCC/1/1976-45-01,
URF/1/4352-01-01, REI/1/4742-01-01 REI/1/4473-01-01, URF/1/4663-
01-01, BAS/1/1689-01-01 and funding from the AI Initiative REI/1/4811-
10-01. Corresponding author: Xin Gao. Juexiao Zhou and Longxi Zhou
are co-first authors.
J. Zhou, L. Zhou, D. Wang, X. Xu, H. Li, Y. Chu, W. Han, and
X. Gao are with the Computer Science Program, Computer, Electrical
and Mathematical Sciences and Engineering Division, King Abdullah
University of Science and Technology (KAUST), Thuwal 23955-6900,
Kingdom of Saudi Arabia and Computational Bioscience Research
Center, King Abdullah University of Science and Technology, Thuwal
23955-6900, Kingdom of Saudi Arabia. (e-mail: [email protected]).
D ATA-HUNGRY artificial intelligence (AI), including var-
ious machine learning (ML) and deep learning (DL)
methods [1], is increasingly being applied to solve miscel-
laneous tasks in medical image analysis (MIA) and has led
to disruptive innovations in pathology, radiology, and other
fields [2]–[8]. However, since modern DL models typically
have millions or even more parameters [9], a mass of curated
data is usually required to train such data-hungry models to
achieve clinical-grade performance [10]–[12]. In contrast, even
with modern advanced data science, generating a huge amount
of data to train models independently is still challenging for
most hospitals and clinics. Therefore, seeking the cooperation
of institutions to jointly generate data and train a joint model
becomes an ideal solution [13]. In centralized training, the
server needs to collect data from all collaborators. Then the
model will be trained on the server. Nevertheless, such a
strategy leads to concerns related to data security and privacy.
For example,
training an AI-based lung infection detector
[14]–[17] required a large amount of high-quality comput-
erized tomography (CT) scans and human-labelled metadata.
However, such data is difficult to be obtained and shared in
reality because health data is usually highly sensitive and
tightly regulated [5], [18]. Hence, federated learning (FL)
[19]–[22] was proposed as a learning paradigm that aims to
address data governance and privacy issues by collaboratively
training models without the need to share the data itself.
Federated learning In FL, it is assumed that a set of
n (n ≥ 2) users are connected to a server, where each user
can only access its own data [19]. Upon that, the users' goal
is to acquire a model that captures the features of all users'
data without sharing their local data with any other user or
server. Though each user can solely train a model with its
own data, the independently trained model of each user may
not generalize well to other users' data or new samples. Thus
the following FL procedure was proposed to learn a more
generalized server model. Firstly, all users will receive a copy
of the current server model and update the local model using
its own data. After that, users send the updated model to the
server. Finally, the server aggregates received local models
to update the server model for the next broadcasting. This
process continues until a generalized server model could be
generated [20], [23]. To be more specific, McMahan et al. [20]
proposed the federated averaging (FedAvg) algorithm, which
2
IEEE TRANSACTIONS ON MEDICAL IMAGING, VOL. XX, NO. XX, XXXX 2023
is the most famous aggregation method in the community, to
aggregate local models collected by the server.
However, previous studies showed that the FedAvg algo-
rithm might not converge or could be slowed down when local
models drift significantly from each other due to the hetero-
geneity of local non-independent and identically distributed
(non-IID) data [24]. Therefore, in the presence of heterogene-
ity, the server model trained by FL may not generalize well
to each user's data [25], which is a significant obstacle to
applying FL in practice. Taking the infection segmentation on
CT scans as an example, different hospitals may have diverse
CT scanners and scanning settings, thus the CT scans will
have heterogeneity. With that, the server model trained with
FL would be unable to achieve clinical-grade performance on
each user's data.
the server model
Personalized federated learning To apply the FL
paradigm with the heterogeneous data as in the case of CT
diagnosis, personalized federated learning (PFL) was devised
as an enhanced version of FL [26]–[31]. To address person-
alization in FL, a two-step approach namely 'FL training
+ local adaptation' was regarded as the most commonly
acknowledged strategy by the FL community [29], [32]. With
is firstly trained using FL
this strategy,
on heterogeneous users' CT data. Unexpectedly, the server
model may perform poorly on each user's data due to data
heterogeneity. Therefore, a few additional training steps are
required to adapt this server model locally and realize the
personalization. Depending on the specific strategies used
in training, different personalized variants of the FedAvg
algorithm were proposed, such as pFedMe [28], Per-FedAvg
[27] and APFL [33]. However, all the aforementioned methods
were theoretical research, and a little applied attempt has been
conducted, especially in the medical analysis field. In addition
to optimizing the training strategies for heterogeneous data,
FedAVG+Share [34] improves performance on non-IID data
by sharing a small amount of data among users. However, the
strategy could not be adopted when the user's data is required
to be strictly private. FedReplay [35] needs to train a universal
and auxiliary encoder network, which encodes each user's
data into latent variables that will be used to train the server
model for classification. Therefore, given an existing neural
network model, e.g. a segmentation model, it needs to be
disassembled and restructured to work with FedReplay in FL.
Thus FedReplay could not be simply and directly combined
with the existing models and also might not be easily used by
new users as a closed-source method, which might limit its
wide usage. As the latest work, FedPerGNN [36] was specially
designed for graph neural networks and thus was limited to
the application of graph data, which is usually different from
medical imaging data.
Privacy in FL and PFL Privacy is a hot and significant
topic in the age of medical big data [37]. Nevertheless,
previous studies showed that FL is still vulnerable to attacks,
such as data poisoning attack [38], membership inference
attack [39]–[41], source inference attack (SIA) [42], attribute
reconstruction attack [43], and inversion attack [44]–[47], thus
compromising data privacy.
Similar to FL, PFL is also facing the threat of privacy
attacks. Diverse strategies could be used to protect data privacy
with FL and PFL. As the latest research, differential privacy
(DP) [48] was used to add noise to the gradient transmitted
in PFL [36], [49] as same as in FL [50] to protect the privacy
of users' data. However, DP adopts the mechanism of adding
noise to enhance privacy protection while sacrificing model
accuracy [51], resulting in difficulty to achieve clinical-grade
performance in practice. Besides, cryptographic approaches,
including secure aggregation (SA) [52], [53], homomorphic
encryption (HE) [54], multi-party computation (MPC) [55] and
etc., realize privacy preservation by sacrificing time and space
without affecting the accuracy much. Among these techniques,
MPC requires the involvement of multiple servers, which is
different from the case with only one server. Conventional SA
requires heavy communications between users and the server,
which will cause overhead for users with limited resources,
while the latest decentralized version of SA [56] transferred
the process of aggregation from the server to users, reduced the
need for high communication between all users and the server,
and further strengthened the privacy protection as the server
is usually an un-trusted third party. However, the protocol
used in [56] required a three-step process as 'decryption-
summation-encryption' to aggregate the local gradients into
the transmitted gradients in the loop, which could be further
simplified into a two-step process as 'encryption-summation'
with the help of HE as in PPPML-HMI.
To strengthen privacy protection in FL, several open-source
methods, such as FATE [57], PySyft [58], and NVFlare
[59], have already been developed to secure gradients during
training using techniques like SA and HE. However, these
methods are mainly based on the conventional FL and thus
could not address the challenges with heterogeneous data
while still allowing privacy protection, because personalization
and privacy protection are still not addressed simultaneously
under the federated scenario.
Heterogeneity and privacy in MIA As a representa-
tive of many medical tasks that would strongly benefit from
personalization and privacy protection, especially in medical
imaging,
the accurate detection and segmentation of lung
infection caused by the severe acute respiratory syndrome
coronavirus 2 (SARS-CoV-2, COVID-19) have been such an
important task since 2020 [60]. To diagnose lung diseases,
imaging is the major source of data and the most com-
monly used imaging technologies are X-rays and CT scans
[61]. Meanwhile, DL has been widely applied in developing
the computer-aided diagnosis (CAD) systems for COVID-
19 [8], [15], [62]–[66]. Most aforementioned works require
centralized training, where the research institution acts as a
coordinator/server to collect raw CT scans from users like
hospitals to train a model centrally. Several problems exist in
this process. Firstly, all users need to strictly trust each other
and the server in order to share the raw CT scans, which
might limit the number of users and available data involved,
leading to insufficient training data. Secondly, users have to
deliver the private raw CT scans to the server, leading to
potential privacy breaches. Therefore, a proper FL approach
is necessary to allow users to keep their data private, thus
more data providers could participate in the co-training of
JUEXIAO ZHOU et al.: PPPML-HMI
3
from COVID-19 CT scans by extending our previous method
for the task [8], [15], which was also a general method for
segmentation of lung,
tracheal, vascular, etc. By applying
PPPML-HMI to both tasks with different neural networks,
a varied number of users, and sample sizes, we further
demonstrated the robustness of PPPML-HMI. Finally, we also
applied the improved deep leakage from gradients to simulate
adversarial attacks and showed the strong privacy-preserving
capability of PPPML-HMI.
A. Design of PPPML-HMI
II. METHODS
PPPML-HMI is built up with two major modules as a train-
ing framework: the PFL (Section II − D) and the CSAHE
modules (Figure 1, Algorithm 1 and Section II − E).
During each round of the global training, the server broadcasts
the server model to each user for initialization. Then, each
user trains the local model using the local private data. After
finishing the local training, each user calculates the gradient
between the local model and the server model. To avoid
sending users' gradients directly to the server, which could
lead to potential privacy leakage, PPPML-HMI transfers the
gradient aggregation process that is originally performed on
the server to a loop composed of all users through the CSAHE
mechanism in a decentralized manner. At the end of each
global training, the CSAHE mechanism is executed. A user
in the loop will be randomly selected as the initiator, who
will protect its own gradient by summing a random mask
as noise to the gradient and encrypting the noised gradient
with HE, and will transmit the noised gradient into the loop
for further aggregation. The noise in the aggregated gradients
is kept till the end of the execution of the CSAHE mech-
anism. PPPML-HMI achieves decentralized secure gradient
aggregation with homomorphic encryption (Section II − E),
thus each user could confidently aggregate their own gradients
to the transmitted gradient without worrying about privacy
issues. The code of PPPML-HMI is publicly available at
https://github.com/JoshuaChou2018/PPPML-HMI.
B. Dataset processing
For the classification task, we simulated and constructed
our heterogeneous data from the RAD-ChestCT Dataset [73],
[74], which includes 35,747 chest CT scans from 19,661
adult patients. For the segmentation task, we collected 180
anonymized CT scans generated by diverse CT scanners and
scanning parameters from five hospitals labelled as A ∼ E. All
patients were confirmed to be COVID-19 positive by either the
nucleic acid test or antibody test. For the classification task, we
used the publicly available RAD-ChestCT Dataset [73], [74].
For the segmentation task, the data from partner hospitals are
available upon request.
To perform the segmentation of lung infections from the
3D CT scans, we need to find a mapping F : RH×W ×S (cid:55)→
{0, 1}H×W ×S, where H × W is the height and width of
each 2D CT image and S is the number of images. Since
the data generated by different CT scanners owned various
volume sizes, spatial normalization was adopted to re-scale
Fig. 1. Scheme of PPPML-HMI. In our real-world case, hospitals use
devices from different manufacturers with various models and settings
for the detection of lung infection by COVID-19. The use of diverse de-
vices generates data with inherent differences, namely heterogeneous
data. With FL, the goal is to jointly train a consensus model with the data
from each hospital without sharing the data itself. With homogeneous
data across hospitals, FL could efficiently train a server model that works
well for all hospitals. However, when hospitals have heterogeneous
data, the server model trained by FL could not perform well when
applied to each hospital. Thus, PPPML-HMI allows models to adapt to
heterogeneous data. To strengthen the privacy protection of PPPML-
HMI, we designed the cyclic secure aggregation with homomorphic
encryption.
the model and more diverse data could be used to train
a model with better generalization power. Though FL has
been widely applied in tasks related to COVID-19 in the
latest research [67]–[72], the heterogeneous data and privacy
breaches are still problems as there is currently no such
open-source solution for personalized and privacy-preserving
federated heterogeneous medical image analysis, especially for
the heterogeneous COVID-19 CT analysis.
Here, we proposed PPPML-HMI, a novel open-source,
robust, user-friendly and plug-and-play method for personal-
ized and privacy-preserving federated heterogeneous medical
image analysis (Figure1). PPPML-HMI specifically targets
the scenario where no raw data should be shared with any
third party, no structural modification should be conducted to
existing DL models, and in a context of heterogeneous data.
To our best knowledge, personalization and privacy protection
were achieved simultaneously for the first
time under the
federated scenario by integrating the PerFedAvg algorithm and
designing the novel cyclic secure aggregation algorithm with
homomorphic encryption (CSAHE). To demonstrate the utility
of PPPML-HMI, we applied it to a simulated classification
task namely the classification of healthy people and patients
from the RAD-ChestCT Dataset [73], and one real-world
segmentation task namely the segmentation of lung infections
4
IEEE TRANSACTIONS ON MEDICAL IMAGING, VOL. XX, NO. XX, XXXX 2023
raw CT data into a machine-agnostic standard space with fixed
shape (512 × 512 × 512). As in [15], we decomposed the 3D
segmentation of each 3D CT scan into three 2D segmentation
problems along the x-y, y-z, and x-z views (axial, sagittal,
and coronal). The training along each plane was performed
independently. All prediction and visualization of samples
were performed with models trained with data excluding the
corresponding sample itself.
D. Personalized federated learning
To accomplish personalized FL, the personalized FedAvg
(Per-FedAvg) [27] algorithm was adopted to acquire the op-
timal initial model (meta-model) as the server model, which
could be easily adapted to the local heterogeneous data by
performing just a few steps of gradient descent. Per-FedAvg
was inspired by the fundamental idea of the Model-Agnostic
Meta-Learning (MAML) framework [76]. Given a set of tasks
from different underlying distributions, instead of finding the
model that generalizes on all tasks as FL, MAML tends to
find a meta-model that could perform better in different tasks
after a few steps of local gradient descent.
(cid:80)n
In FL,
(cid:80)n
i=1 fi(w), where fi
the goal of optimization is minw∈Rd f (w) =
1
is the loss function to user ui.
n
With the concept of MAML, the goal of the optimization
becomes finding a good initialization as minw∈Rd F (w) =
i=1 fi(w − α(cid:79)fi(w)), where α (α ≥ 0) is the step size.
1
n
As shown in Algorithm1, at each epoch k, the server
will broadcast the server model to all users. Then, all users
train their local model with τ local epochs. After τ
will
local epochs, a list of {wi
t=0 will be generated with
k+1,t =
respect
k+1,t−1 − β (cid:101)(cid:79)Fi(wi
wi
k+1,t−1), β is the local learning rate and
(cid:101)(cid:79)Fi(wi
k+1,t−1) is an estimate of (cid:79)Fi(wi
to the user ui, where wi
k+1,0 = wk, wi
k+1,t−1).
k+1,t}τ
Fig. 2.
A) Illustration of two tasks. We applied PPPML-HMI to the
classification of healthy people and patients with 3D DenseNet on the
RAD-ChestCT Dataset, and the segmentation of the lung infections
of COVID-19 with a 2.5D U-Net method [8], [15]. Illustration of the
communication network and attackers of FL (B) and PPPML-HMI (C).
Two types of attackers exist in our setting: 1) Attackers who can intercept
messages sent from any users to the server or between users (type
I), and 2) Honest-but-curious attackers who are part of the users of
PPPML-HMI (type II).
C. Neural network for the segmentation of lung infections
For the classification task, we adopted the 3D DenseNet
[75] as the backbone DL model.
For each segmentation task along the three views, we trained
an independent U-Net that took five adjacent images with
dimension: R5×512×512 as inputs, and output the probability
map of infection regions for the central image with dimension:
R512×512. The U-Net for 2D segmentation consisted of four
encoding layers, one bottleneck layer, and four decoding layers
as shown in Figure2A.
Given a 3D CT scan, we applied three 2D U-Net models
and generated three segmentation results pxy, pyz, pxz along
the x-y, y-z, and x-z views. The final segmentation result in
3D space was calculated by summing up three intermediate
predictions followed by taking a threshold of 2 as pf inal =
(pxy + pyz + pxz) ≥ 2.
E. Cyclic secure aggregation with homomorphic
encryption
We designed the cyclic secure aggregation with homomor-
phic encryption (CSAHE) algorithm to transfer the secure
aggregation from the server to a loop composed of all users in
a decentralized manner with a two-step process as 'encryption-
summation' for all non-initiator users. To protect the gradi-
ents transmitted in CSAHE, we encrypted all gradients with
homomorphic encryption (MHE) based on the Cheon-Kim-
Kim-Song (CKKS) cryptographic scheme [77] that provides
approximate arithmetic over vectors of complex numbers and
performed the aggregation homomorphically with TenSEAL
[78], which is a python library for performing homomorphic
encryption operations on tensors, built on top of Microsoft
SEAL.
We integrated the CSAHE into PPPML-HMI to protect the
gradients of users. As shown in Algorithm1, in each epoch,
all users form a loop and an initiator is selected randomly from
all users, while the remaining users are called non-initiator
users. The initiator generates a random mask using a Gaussian
distribution with a self-defined large σ. After that, the random
mask will be summed to the initiator's gradient to protect its
actual value. Then, the noised gradient will be homomorphi-
cally encrypted and transmitted to the next user in the loop,
who can also safely aggregate its gradient to this transmitted
gradient homomorphically, and transmit the newly aggregated
gradient to the next user. The aforementioned process keeps
working till the aggregated gradient is transmitted back to the
initiator. Then, the initiator eliminates the random mask from
the aggregated gradient and decrypts it to recover the actual
JUEXIAO ZHOU et al.: PPPML-HMI
5
Algorithm 1 PPPML-HMI
Require: K is the number of global epochs; τ is the number of local epochs; N is the
number of users; γ is the number of final adaptation epochs; wk is the parameters
of the server model at global epoch k; wi
k,t is the parameters of the model of user
ui at local epoch t and global epoch k; γ is the number of epochs for the final
adaptation.
for k = 0, . . . , K − 1 (Global epoch) do
1: procedure SYSTEM STARTS
2:
3:
4:
5:
6:
7:
Server sends wk to all users;
for each user ui with i = 0, .., N − 1 do
Set wi
for t = 0, ..., τ − 1 (Local epoch) do
k+1,0 = wk
Compute the stochastic gradient ̃(cid:53)fi(wi
k+1,t−1, Di) using dataset
Di
2
α ̃(cid:53)
server
8:
9:
10:
11:
12:
13:
Set ̃wi
Set
k+1,t = wi
wi
k+1,t
k+1,t−1 − α ̃(cid:53)fi(wi
k+1,t−1, Di)
=
wi
k+1,t−1 − β(I −
fi(wi
(cid:48)(cid:48)i)) ̃(cid:53)fi( ̃wi
(cid:48)i)
k+1,t−1, D
Each user ui with i = 0, .., N − 1 calculates the gradient compared
k+1,t, D
to the server ∆wi
k+1,τ = (wi
k+1,τ − wk)
Execute cyclic secure aggregation with CSAHE(u0, ..., uN −1)
Initiator uI sends securely aggregated update ∆wCSA
k+1,τ back to the
wk + 1
Server updates its model by averaging over the received gradients wk+1 =
N (∆wCSA
k+1,τ )
for t = 0, ..., γ − 1 (Final local adaptation) do
Server broadcasts the meta-model to all users
for each user ui with i = 0, .., N − 1 do
14:
15:
16:
17:
18:
19: function CSAHE(u0, ..., uN −1)
20:
User ui adapts the meta-model with local private data
Organize all users in a loop. Randomly select a user uI with I ∈ {0, ..., N −
1} as the initiator, generate a random mask R with the same shape as the gradient
∆wI
k+1,τ hold by uI from Gaussian Noise with a large σ.
User ur adds the R to the gradient as ∆wCSA
k+1,τ = ∆wI
encrypt it with homomorphic encryption (HE) as HE(∆wCSA
k+1,τ )
for each user uj in the circular chain, until j = I do
HE(∆wCSA
k+1,τ ) = HE(∆wCSA
User uj transfers the HE(∆wCSA
k+1,τ ) + HE(∆wj
k+1,τ ) to the next user in the loop
k+1,τ + R and
k+1,τ )
The initiator uI removes the random mask from the final aggregated gradient
k+1,τ )−HE(R) and decrypts the encrypted
k+1,τ ) = HE(∆wCSA
with HE(∆wCSA
aggregated gradient HE(∆wCSA
k+1,τ ) into ∆wCSA
k+1,τ .
Return the securely aggregated gradient ∆wCSA
k+1,τ
21:
22:
23:
24:
25:
26:
Algorithm 2 iDLG
Require: Differentiable model M, model parameters W, private training data and
labels (x, c), gradients produced by the private data ∇W ,dummy data and labels
(x(cid:48), c(cid:48)), number of iterations N , learning rate η and loss function l
1: Extract the target ground-truth label to initialize the dummy label c(cid:48)
2: Initialize the dummy data x(cid:48) ← N (0, 1)
3: for i ← 1 to N do
4:
5:
6:
Calculate the dummy gradients: ∇W ← ∂l(M(x(cid:48), W), c(cid:48))/∂W
Calculate the loss: LG = (cid:107)∇W(cid:48) − ∇W(cid:107)2
F
Update the dummy data: x(cid:48) ← x(cid:48) − η∇x(cid:48) LG
value. Finally, the initiator sends the aggregated gradient to
the server for updating the server model.
With CSAHE, each user except the initiator only needs to
interact with two users located before and after in the loop
and does not need to have any interaction with the server.
The secure aggregation in PPPML-HMI is conducted in a
decentralized manner, which is different from the conventional
SA that happens at the server. HE in CSAHE allows all non-
initiator users to aggregate their gradients homomorphically
the need to decrypt. As shown in Algorithm1,
without
once the wi
k+1,τ of each user ui is calculated, user ui will
calculate the difference between the wi
k+1,τ and the server
model wk as (cid:52)wi
k+1,τ
with i = 0, ..., N − 1 will be securely aggregated through the
k+1,τ − wk. Then, all (cid:52)wi
k+1,τ = wi
CSAHE algorithm. Finally, the server will collect the securely
aggregated gradient ∆wCSA
k+1,τ from the initiator for updating
the server model with wk+1 = wk + 1
N ∆wCSA
k+1,τ .
The public key encryption scheme is used by CSAHE,
where a public key and a secret key are generated
(Figure2C). The public key is shared by all users to allow the
encryption of gradients before the homomorphic aggregation
and the private key is held only by the initiator to allow the
decryption of the aggregated gradient before sending it to the
server. Although a non-initiator cannot obtain the private key
by default, we still need to discuss the vulnerability of CSAHE
in practice where the private key could be leaked, thus a non-
initiator could also decrypt the homomorphically encrypted
gradient when the attack happens.
F. iDLG reconstruction attack
Previous research has shown that the gradients transmitted
from the user to the server in FL may still compromise data
privacy [44]–[46]. Among those studies, the improved deep
leakage from gradient (iDLG) is a state-of-the-art approach
to obtain private training data from the gradients transmitted
between users and the server as shown in Algorithm2.
G. Performance evaluation
To evaluate the performance on the classification task, we
T P +T N
used the accuracy as defined: Accuracy =
T P +T N +F P +F N ,
where TP, TN, FP, and FN stand for true positive, true negative,
false positive and false negative.
To evaluate the performance of lung infection segmentation
with different methods, we used the Dice score and the recall
as defined: Dice = 2|Y ∩Y (cid:48)|
, where Y is
the actual infection region annotated by radiologists, Y (cid:48) is the
predicted infection region, and |Y | represents the cardinality
of Y .
|Y |+|Y (cid:48)| , Recall = |Y ∩Y (cid:48)|
|Y |
H. Hyper-parameter selection and training settings
To ensure a fair comparison, we tested the number of global
epochs from {10, 20, 50, 100} and the number of local epochs
from {1, 5, 10, 20}. From our pre-experiments, we noticed that
the number of global epochs K = 20 and the number of local
epochs τ = 10 enabled the model to converge and provided
a good trade-off between the computation time and model
performance. The batch size and learning rate were set to
be 64 and 10−4 respectively. For CSAHE, the random noise
was generated from a Gaussian distribution with mean = 0
and a randomly chosen large standard deviation (> 100) to
avoid the potential inversion attack. During the training, 32
workers were used for data loading and processing on one
machine with 120GB RAM and one NVIDIA V100 GPU.
Five-fold cross-validation was adopted for data splitting and
model training.
III. RESULTS
We applied PPPML-HMI to a simulated heterogeneous
dataset from the RAD-ChestCT dataset, where users' data
were grouped according to the slice thickness from 2 mm,
6
IEEE TRANSACTIONS ON MEDICAL IMAGING, VOL. XX, NO. XX, XXXX 2023
5 mm, 10 mm, to train a classification model and show the
robustness of PPPML-HMI when varying the number of users
and the sample sizes. We also applied PPPML-HMI to a real-
world case, where heterogeneous data were generated by five
hospitals with different CT scanners, to train a segmentation
model for COVID-19 lung infections. To demonstrate the
effectiveness of PPPML-HMI, we compared three methods,
including training independently using only each user's own
data, training in a centralized training manner using complete
data, and training with one of the most classical and famous
algorithms in FL namely FedAvg [20]. With both tasks to-
gether with different neural networks, the number of users, and
sample sizes, we further gave evidence of the robustness and
robustness of PPPML-HMI to these parameters. Meanwhile,
we applied the improved deep leakage from gradients to
simulate adversarial attacks on the segmentation task and
showed the strong privacy-preserving capability of PPPML-
HMI.
TABLE I
DESCRIPTION OF THE RAD-CHESTCT DATASET AND AVERAGED
PREDICTED ACCURACY OF METHODS.
Split
ID
User
ID
1
2
3
A
A
B
A
B
C
Slice
thickness
(mm)
2
2
5
2
5
10
No. of
Patients
Centralized
training
Federated
learning
PPPML-HMI
392
196
196
174
68
150
0.97
0.95
0.92
/
0.68
0.77
/
0.94
0.89
A. PPPML-HMI is generalizable with various numbers of
users and samples on the classification task.
To show the robustness of PPPML-HMI when varying the
number of users and the sample sizes, we simulated three
sets of data partitions on the RAD-ChestCT dataset [73], [74]
according to the slice thickness of CT scans and labeled them
as Split 1, Split 2, and Split 3 as shown in TableI. Split 1
had only one user with 392 CT scans, which represented the
centralized training scenario. Split 2 had two users with an
equal number of CT scans (196 and 196) but with different
slice thicknesses (2 mm and 5 mm). Split 3 had three users
with a varied number of CT scans (174, 68, and 150) and
slice thicknesses (2 mm, 5 mm, and 10 mm) simultaneously.
For each split, the goal was to train models for classifying
healthy people and patients based on CT scans. Compared
to centralized training, FL led to a drastic reduction in the
averaged accuracy at Split 2 and Split 3, where PPPML-HMI
showed less reduction and better performance compared to FL.
These results provided evidence of the robustness of PPPML-
HMI when varying the number of users and the sample sizes.
B. PPPML-HMI achieved personalization for federated
heterogeneous segmentation of lung infections by
COVID-19
Since the classification task was relatively easy, we further
applied PPPML-HMI to a real-world case, namely the seg-
mentation of lung infections by COVID-19. There were five
hospitals in the real-world case, labeled as A ∼ E, each of
which used CT scanners of different models (Brilliance 16,
iCT 256, Ingenuity CT, BrightSpeed, Optima CT520, Optima
CT540, Discovery CT750 HD, SOMATOM Definition Edge,
and SOMATOM Scope) from three manufacturers (Philips,
GE medical systems, and SIEMENS). Hospitals also used
different settings, such as slice thickness (1.00 nm, 1.25 nm,
2.00 nm, 3.30 nm, 5.00 nm, and 7.50 nm), and provided
various numbers of data ranging from 9 to 119 as shown
in Table II. Different CT scanners and settings used by
five hospitals led to inherent differences in the generated CT
scans. As shown in Figure 3A, we performed the dimension
reduction and clustering on the original CT scan data provided
by the hospital with the uniform manifold approximation
and projection (UMAP) [79] and assigned different colors to
visualize the inherent differences between data according to
the manufacturer. Based on the results, CT scans generated by
the CT scanners manufactured by GE medical system showed
significant differences from that of other manufacturers, in-
cluding Philips and SIEMENS, and indicated that inherent
differences existed in CT scans generated by different hospitals
with diverse CT scanners.
To show the effectiveness of PPPML-HMI on federated
heterogeneous medical image analysis, we compared different
approaches, including the centralized training using complete
data from all hospitals, the independent training using data
from each hospital respectively, and the most classical and
famous FL algorithm namely FedAvg as shown in Figure 3.
Without taking the data privacy issues into consideration, the
centralized training worked best when we collected complete
data from all users A ∼ E to train the server model and
performed the prediction on each user's data (ADice =
0.64, BDice = 0.62, CDice = 0.51, DDice = 0.51, EDice =
0.69,) as shown in Figure 3B. However, when the privacy
issue matters, the server could not collect data from users,
thus centralized training could not be performed. Moreover,
since data exists in a distributed manner, the heterogeneous
data might cause problems in the FL scenario. To train
models with heterogeneous data in FL, as one solution,
using each user's own data to train independent models
resulted in a significant performance reduction ((cid:52)Dice =
−0.08, −0.01, −0.07, −0.05, −0.03 for users A ∼ E respec-
tively). Meanwhile, transferring a model trained on one user's
data to another user showed even worse performance and
indicated poor generalization ability of models trained with
such a method, e.g. applying the model trained on user C
to user D only yielded a Dice score of 0.28. These results
provided further evidence of the strong heterogeneity in data
across users in the real-world case.
Since training a model with each user's own data did
not meet the need for clinical-grade performance, training
a model using the information in all users' data but with-
out sharing the raw data was necessary. With that, FL was
the most intuitive solution. However, because of the strong
heterogeneity of users' data, the server model trained by FL
(ADice = 0.51, DDice = 0.39, EDice = 0.63) performed even
worse on users A, D, and E than the independently trained
model using only the users' own data (ADice = 0.56, DDice =
JUEXIAO ZHOU et al.: PPPML-HMI
7
TABLE II
DESCRIPTION OF THE COVID-19 DATASET. THERE ARE 5 HOSPITALS (A∼E) AND EACH OF THEM OWNS DATA GENERATED BY DIFFERENT CT
SCANNERS AND SETTINGS.
User ID
A
B
C
D
E
System label
P B16 2.0
P B16 3.3
P B16 7.5
P I256 1.0
P I256 5.0
P I 1.0
G B 1.25
G B 5.0
G CT520 1.25
G CT540 1.25
G CT750 5.0
S SDE 1.0
S SS 2.0
Manufacturer
Philips
Philips
Philips
Philips
Philips
Philips
GE medical systems
GE medical systems
GE medical systems
GE medical systems
GE medical systems
SIEMENS
SIEMENS
Model
Brilliance 16
Brilliance 16
Brilliance 16
iCT 256
iCT 256
Ingenuity CT
BrightSpeed
BrightSpeed
Optima CT520
Optima CT540
Discovery CT750 HD
SOMATOM Definition Edge
SOMATOM Scope
Slice thickness (mm)
2.00
3.30
7.50
1.00
5.00
1.00
1.25
5.00
1.25
1.25
5.00
1.00
2.00
No. of Patients
5
1
6
114
5
9
1
4
11
7
1
10
6
No. of Total
12
119
9
24
16
Fig. 3. A) Dimension reduction and clustering with UMAP according to the manufacturer indicated that CT scans generated by different CT
scanners had significant inherent differences. B) Heatmap showed the Dice score of segmentation when applying models trained centrally on the
data of each hospital. C) Barplot showed the Dice score of models trained centrally, with federated learning, and with PPPML-HMI.
0.46, EDice = 0.66) as shown in Figure 3C. Meanwhile,
user C had only 9 samples and the data heterogeneity was not
as significant as those between other users' data (Figure 3A),
thus the server model trained with FL could achieve similar
performance as the centralized training with complete data
only at user C (Figure 3B, C).
In contrast to FL, similar to MAML, the server model
generated by PPPML-HMI was a good initialization, which
could learn the common features in heterogeneous data and
could be easily adapted to local user's data by a few local
training steps. As shown in Figure 3C, with the server model
generated by PPPML-HMI as an initialization, only γ (γ < 5)
steps of local training on the user's data could adapt the
server model to local user's data (ADice = 0.62, BDice =
0.61, CDice = 0.51, DDice = 0.51, EDice = 0.68) and
achieve a similar performance as the centralized training with
complete data and better performance than FL under the same
total number of epochs. Additionally,
the improvement of
PPPML-HMI compared to FL was most significant for users
A and D, as the data of both users showed the most significant
data heterogeneity from the data of other users as shown in
Figure 3A.
To further understand the differences in performance be-
tween methods, we visualized the predicted segmentation of
the lung infections on a high-quality sample (A000069) and a
low-quality sample (A000075), respectively. The low-quality
sample had significantly worse clarity and resolution of CT
images than the high-quality sample as shown in Figure 4A.
Orange, green, and yellow were used to represent true posi-
tives, false positives, and false negatives respectively compared
to the ground truth. For A000069, the independently trained
model on the associated user's data gave enormous false
positives, while the model trained with FL predicted a large
number of false negatives. In contrast, the personalized model
from PPPML-HMI provided competitive performance as the
centrally trained model with complete data. For A000075, the
personalized model from PPPML-HMI predicted more true
positives compared to the centrally trained model with the
complete data and rescued more false negatives compared
to the model
trained with FL. In summary, PPPML-HMI
allowed model personalization to each user with heterogeneous
data and achieved competitive performance as the centralized
training with complete data.
C. PPPML-HMI protects privacy of CT scans
There are two types of attackers in our setting: 1) attackers
who can intercept messages sent from any users to the server
and between any users (type I), and 2) honest-but-curious
(HBC) attackers that are part of the users of PPPML-HMI
(type II) as in Definition 1.
Definition 1. The HBC attacker is a legitimate participant
in a communication protocol who will not deviate from
the defined protocol but will attempt to learn all possible
information from legitimately received messages [80].
Sensitive information could be deciphered from medical
images, such as tissue patterns and lesions, which could
8
IEEE TRANSACTIONS ON MEDICAL IMAGING, VOL. XX, NO. XX, XXXX 2023
user due to curiosity. As the key for HE is shared by all users
in the loop, the HBC user could decrypt the gradient from
the previous user and see the plaintext. However, the plaintext
deciphered by any non-initiator users is always protected by
the Gaussian noise added by the initiator, thus type II attackers
could be resisted as shown in Figure 4B.
To demonstrate the results of gradient inversion, we applied
iDLG to the associated segmentation model. As shown in
Figure 4B, in terms of visual results, the iDLG attack on
FL could effectively reconstruct the CT images in the training
data, while the iDLG attack on PPPML-HMI was effectively
blocked. Overall, PPPML-HMI protected privacy by blocking
the reconstruction of sensitive medical images.
IV. DISCUSSION
In this paper, we present a novel, robust and open-source
method for personalized and privacy-preserving federated
heterogeneous medical imaging analysis. PPPML-HMI is a
training paradigm similar to FL, which has no task-specific
requirements and does not require any modifications to the
existing DL models. With the nature of open-source, users
of PPPML-HMI only need to apply PPPML-HMI as a plug-
in to their neural network models as how they work with
FL to achieve personalized and privacy-preserving federated
learning. Based on the results of the simulated classification
task on the RAD-ChestCT dataset and the real-word seg-
mentation task based on the COVID-19 dataset, we believe
that PPPML-HMI could be applied to any potential medical
imaging problem with different DL methods, especially for
those with heterogeneous data and the need for federation and
privacy protection, as the segmentation method we adopted in
the real-world case was also a general method for segmentation
of lung, tracheal, vascular and so on.
Though we applied PPPML-HMI in both simulated and
real-world COVID-19 cases, all experiments were conducted
in a laboratory environment, meaning all practical conditions
were in the ideal state, including the computing power of the
users' machines and the communication consumption between
machines. As shown in TableIII, PPPML-HMI showed
slightly higher requirements for the training time and similar
memory and GPU compared to FL, meaning that PPPML-
HMI could still work in the case that FL works. Meanwhile,
integrating personalization and HE-based privacy protection in
PPPML-HMI brought an additional 35.5% computation time
compared to FL, thus finding new solutions to accelerate could
be one of the main research directions in the future.
TABLE III
COMPARISON OF COMPUTATION RESOURCE REQUIREMENTS ON THE
COVID-19 TASK. n IS THE NUMBER OF USERS.
Method
Centralized
training
Federated
learning
(n = 5)
PPPML-HMI
(n = 5)
Training
Time (hours)
Virtual
Memory (GB)
Physical
Memory (GB)
GPU (GB)
320.21
110.37
149.55
70.26
54.91
54.97
3.34
3.36
3.43
26.80
26.80
26.80
Fig. 4. A) Visualization of predicted segmentation mask on the high-
quality sample A000069 and low-quality sample A000075 (Orange: true
positives, Green: false positives, Yellow: false negatives). B) Visualiza-
tion of the dummy data from the iDLG attack on FL and PPPML-HMI
against both types of attackers.
compromise patients' privacy [81]. CT scans of COVID-19
patients require even stronger privacy protection. To show
that PPPML-HMI protected privacy from the CT scans of
COVID-19 patients and resisted both types of attackers, we
applied the iDLG (Method) method to simulate an attacker
reconstructing the training images by stealing the gradients
transmitted between users and the server. During each attack,
we initialized dummy data and used the gradient transmitted
between the user and server to update the dummy data. We
performed the iDLG attack for FL, where type I attackers
exist and PPPML-HMI, where both types of attackers exist,
respectively. Then, we visualized the dummy data every 1000
iterations, as shown in Figure 4B.
the users could not completely trust
In practice, since the server is usually controlled by a third
party,
the server. As
shown in Figure 2B, in FL, type I attackers could intercept
the gradients sent between users and the server to learn the
sensitive information of the corresponding users. With the
CSAHE, only the initiator could communicate with the server
and send the securely aggregated gradient. Though type I
attackers could intercept the gradient between the initiator
and the server, they only get the averaged gradient over all
users. When type I attackers incept the information transmitted
between users in CSAHE, they only get the ciphertext instead
of the plaintext as all gradients transmitted in the loop are
encrypted with HE. Hence, type I attackers could be resisted
by PPPML-HMI.
Type II attackers may exist in PPPML-HMI as gradients
are transmitted between users as shown in Figure 2B. For
example, an HBC user in the loop may try to recover sensitive
information using the gradient transmitted from the previous
JUEXIAO ZHOU et al.: PPPML-HMI
9
Due to the special design of PPPML-HMI, it can only
be applied when the number of clients ≥ 3, meaning that
PPPML-HMI is vulnerable when the number of clients equals
2. Suppose that the initiator is the type II attacker and there are
two clients, then the initiator could decode the exact gradient
of the other client and thus do the gradient inversion attack as
shown in the classic FL setting. Though PPPML-HMI is not
exactly private for the case where there are only two clients,
it could work as designed when the number of clients ≥ 3
Regardless of the issue in computing resources and vulner-
ability, we need to take more practical problems into consid-
eration, such as the imbalance of computing power among
hospitals, the deviation of data quality of different hospitals,
the latency in network communication between hospitals and
the server, and so on. Those practical problems have not been
addressed in this work as we were focusing on a learning
paradigm. Still, we will solve those realistic obstacles and
further improve PPPML-HMI in future work.
REFERENCES
[1] Y. LeCun, Y. Bengio, and G. Hinton, "Deep learning," nature, vol. 521,
no. 7553, pp. 436–444, 2015.
[2] H. Greenspan, B. Van Ginneken, and R. M. Summers, "Guest editorial
deep learning in medical imaging: Overview and future promise of an
exciting new technique," IEEE transactions on medical imaging, vol. 35,
no. 5, pp. 1153–1159, 2016.
[3] D. S. Ting, Y. Liu, P. Burlina, X. Xu, N. M. Bressler, and T. Y. Wong,
"Ai for medical imaging goes deep," Nature medicine, vol. 24, no. 5,
pp. 539–540, 2018.
[4] A. S. Lundervold and A. Lundervold, "An overview of deep learning in
medical imaging focusing on mri," Zeitschrift f ̈ur Medizinische Physik,
vol. 29, no. 2, pp. 102–127, 2019.
[5] N. Rieke, J. Hancox, W. Li, F. Milletari, H. R. Roth, S. Albarqouni,
S. Bakas, M. N. Galtier, B. A. Landman, K. Maier-Hein et al., "The
future of digital health with federated learning," NPJ digital medicine,
vol. 3, no. 1, pp. 1–7, 2020.
[6] S. K. Zhou, H. Greenspan, C. Davatzikos, J. S. Duncan, B. Van Gin-
neken, A. Madabhushi, J. L. Prince, D. Rueckert, and R. M. Summers,
"A review of deep learning in medical imaging: Imaging traits, technol-
ogy trends, case studies with progress highlights, and future promises,"
Proceedings of the IEEE, vol. 109, no. 5, pp. 820–838, 2021.
[7] R. Aggarwal, V. Sounderajah, G. Martin, D. S. Ting, A. Karthike-
salingam, D. King, H. Ashrafian, and A. Darzi, "Diagnostic accuracy
of deep learning in medical imaging: A systematic review and meta-
analysis," NPJ digital medicine, vol. 4, no. 1, pp. 1–23, 2021.
[8] L. Zhou, X. Meng, Y. Huang, K. Kang, J. Zhou, Y. Chu, H. Li, D. Xie,
J. Zhang, W. Yang et al., "An interpretable deep learning workflow for
discovering subvisual abnormalities in ct scans of covid-19 inpatients
and survivors," Nature Machine Intelligence, vol. 4, no. 5, pp. 494–503,
2022.
[9] J. Rasley, S. Rajbhandari, O. Ruwase, and Y. He, "Deepspeed: System
optimizations enable training deep learning models with over 100 billion
parameters," in Proceedings of the 26th ACM SIGKDD International
Conference on Knowledge Discovery & Data Mining, 2020, pp. 3505–
3506.
[10] C. Sun, A. Shrivastava, S. Singh, and A. Gupta, "Revisiting unreasonable
effectiveness of data in deep learning era," in Proceedings of the IEEE
international conference on computer vision, 2017, pp. 843–852.
[11] C. C. Aggarwal et al., "Neural networks and deep learning," Springer,
vol. 10, pp. 978–3, 2018.
[12] F. Wang, L. P. Casalino, and D. Khullar, "Deep learning in
medicine-promise, progress, and challenges," JAMA internal medicine,
vol. 179, no. 3, pp. 293–294, 2019.
[15] L. Zhou, Z. Li, J. Zhou, H. Li, Y. Chen, Y. Huang, D. Xie, L. Zhao,
M. Fan, S. Hashmi et al., "A rapid, accurate and machine-agnostic seg-
mentation and quantification method for ct-based covid-19 diagnosis,"
IEEE transactions on medical imaging, vol. 39, no. 8, pp. 2638–2652,
2020.
[16] S. Serte and H. Demirel, "Deep learning for diagnosis of covid-19 using
3d ct scans," Computers in biology and medicine, vol. 132, p. 104306,
2021.
[17] A. Saood and I. Hatem, "Covid-19 lung ct image segmentation using
deep learning methods: U-net versus segnet," BMC Medical Imaging,
vol. 21, no. 1, pp. 1–10, 2021.
[18] W. G. Van Panhuis, P. Paul, C. Emerson, J. Grefenstette, R. Wilder, A. J.
Herbst, D. Heymann, and D. S. Burke, "A systematic review of barriers
to data sharing in public health," BMC public health, vol. 14, no. 1, pp.
1–9, 2014.
[19] J. Koneˇcn`y, H. B. McMahan, F. X. Yu, P. Richt ́arik, A. T. Suresh, and
D. Bacon, "Federated learning: Strategies for improving communication
efficiency," arXiv preprint arXiv:1610.05492, 2016.
[20] B. McMahan, E. Moore, D. Ramage, S. Hampson, and B. A. y Arcas,
"Communication-efficient learning of deep networks from decentralized
data," in Artificial intelligence and statistics. PMLR, 2017, pp. 1273–
1282.
[21] Q. Yang, Y. Liu, T. Chen, and Y. Tong, "Federated machine learning:
Concept and applications," ACM Transactions on Intelligent Systems and
Technology (TIST), vol. 10, no. 2, pp. 1–19, 2019.
[22] T. Li, A. K. Sahu, A. Talwalkar, and V. Smith, "Federated learning:
Challenges, methods, and future directions," IEEE Signal Processing
Magazine, vol. 37, no. 3, pp. 50–60, 2020.
[23] M. Mohri, G. Sivek, and A. T. Suresh, "Agnostic federated learning,"
in International Conference on Machine Learning. PMLR, 2019, pp.
4615–4625.
[24] S. P. Karimireddy, S. Kale, M. Mohri, S. J. Reddi, S. U. Stich, and
A. T. Suresh, "Scaffold: Stochastic controlled averaging for on-device
federated learning." 2019.
[25] Y. Jiang, J. Koneˇcn`y, K. Rush, and S. Kannan, "Improving feder-
ated learning personalization via model agnostic meta learning," arXiv
preprint arXiv:1909.12488, 2019.
[26] F. Hanzely, S. Hanzely, S. Horv ́ath, and P. Richt ́arik, "Lower bounds
and optimal algorithms for personalized federated learning," Advances in
Neural Information Processing Systems, vol. 33, pp. 2304–2315, 2020.
[27] A. Fallah, A. Mokhtari, and A. Ozdaglar, "Personalized federated
learning: A meta-learning approach," arXiv preprint arXiv:2002.07948,
2020.
[28] C. T Dinh, N. Tran, and J. Nguyen, "Personalized federated learning
with moreau envelopes," Advances in Neural Information Processing
Systems, vol. 33, pp. 21 394–21 405, 2020.
[29] Y. Mansour, M. Mohri, J. Ro, and A. T. Suresh, "Three approaches for
personalization with applications to federated learning," arXiv preprint
arXiv:2002.10619, 2020.
[30] P. Sun, H. Che, Z. Wang, Y. Wang, T. Wang, L. Wu, and H. Shao, "Pain-
fl: Personalized privacy-preserving incentive for federated learning,"
IEEE Journal on Selected Areas in Communications, vol. 39, no. 12,
pp. 3805–3820, 2021.
[31] T. Li, S. Hu, A. Beirami, and V. Smith, "Ditto: Fair and robust
federated learning through personalization," in International Conference
on Machine Learning. PMLR, 2021, pp. 6357–6368.
[32] P. Kairouz, H. B. McMahan, B. Avent, A. Bellet, M. Bennis, A. N.
Bhagoji, K. Bonawitz, Z. Charles, G. Cormode, R. Cummings et al.,
"Advances and open problems in federated learning," Foundations and
Trends® in Machine Learning, vol. 14, no. 1–2, pp. 1–210, 2021.
[33] Y. Deng, M. M. Kamani, and M. Mahdavi, "Adaptive personalized
federated learning," arXiv preprint arXiv:2003.13461, 2020.
[34] Y. Zhao, M. Li, L. Lai, N. Suda, D. Civin, and V. Chandra, "Federated
learning with non-iid data," arXiv preprint arXiv:1806.00582, 2018.
[35] L. Qu, N. Balachandar, M. Zhang, and D. Rubin, "Handling data het-
erogeneity with generative replay in collaborative learning for medical
imaging," Medical Image Analysis, vol. 78, p. 102424, 2022.
[36] C. Wu, F. Wu, L. Lyu, T. Qi, Y. Huang, and X. Xie, "A federated
graph neural network framework for privacy-preserving personalization,"
Nature Communications, vol. 13, no. 1, pp. 1–10, 2022.
[13] P. M. Mammen, "Federated learning: opportunities and challenges,"
[37] W. N. Price and I. G. Cohen, "Privacy in the age of medical big data,"
arXiv preprint arXiv:2101.05428, 2021.
Nature medicine, vol. 25, no. 1, pp. 37–43, 2019.
[14] F. Shan, Y. Gao, J. Wang, W. Shi, N. Shi, M. Han, Z. Xue, D. Shen,
and Y. Shi, "Lung infection quantification of covid-19 in ct images with
deep learning," arXiv preprint arXiv:2003.04655, 2020.
[38] V. Tolpegin, S. Truex, M. E. Gursoy, and L. Liu, "Data poisoning
attacks against federated learning systems," in European Symposium on
Research in Computer Security. Springer, 2020, pp. 480–501.
10
IEEE TRANSACTIONS ON MEDICAL IMAGING, VOL. XX, NO. XX, XXXX 2023
[63] M. Jamshidi, A. Lalbakhsh, J. Talla, Z. Peroutka, F. Hadjilooei, P. Lal-
bakhsh, M. Jamshidi, L. La Spada, M. Mirmozafari, M. Dehghani
et al., "Artificial intelligence and covid-19: deep learning approaches
for diagnosis and treatment," Ieee Access, vol. 8, pp. 109 581–109 595,
2020.
[64] C. Shorten, T. M. Khoshgoftaar, and B. Furht, "Deep learning applica-
tions for covid-19," Journal of big Data, vol. 8, no. 1, pp. 1–54, 2021.
[65] A. M. Ismael and A. S ̧ eng ̈ur, "Deep learning approaches for covid-19
detection based on chest x-ray images," Expert Systems with Applica-
tions, vol. 164, p. 114054, 2021.
[66] N. Subramanian, O. Elharrouss, S. Al-Maadeed, and M. Chowdhury,
"A review of deep learning-based detection methods for covid-19,"
Computers in Biology and Medicine, p. 105233, 2022.
[67] I. Dayan, H. R. Roth, A. Zhong, A. Harouni, A. Gentili, A. Z. Abidin,
A. Liu, A. B. Costa, B. J. Wood, C.-S. Tsai et al., "Federated learning for
predicting clinical outcomes in patients with covid-19," Nature medicine,
vol. 27, no. 10, pp. 1735–1743, 2021.
[68] R. Durga and E. Poovammal, "Fled-block: Federated learning ensembled
deep learning blockchain model for covid-19 prediction," Frontiers in
Public Health, vol. 10, 2022.
[69] O. Samuel, A. Omojo, A. Onuja, Y. Sunday, P. Tiwari, D. Gupta,
G. Hafeez, A. Yahaya, O. Fatoba, and S. Shamshirband, "Iomt: A covid-
19 healthcare system driven by federated learning and blockchain," IEEE
Journal of Biomedical and Health Informatics, 2022.
[70] L. M. Florescu, C. T. Streba, M.-S. S ̧ erb ̆anescu, M. M ̆amuleanu, D. N.
Florescu, R. V. Teic ̆a, R. E. Nica, and I. A. Gheonea, "Federated learning
approach with pre-trained deep learning models for covid-19 detection
from unsegmented ct images," Life, vol. 12, no. 7, p. 958, 2022.
[71] Z. Li, X. Xu, X. Cao, W. Liu, Y. Zhang, D. Chen, and H. Dai, "Integrated
cnn and federated learning for covid-19 detection on chest x-ray images,"
IEEE/ACM Transactions on Computational Biology and Bioinformatics,
2022.
[72] F. Wibawa, F. O. Catak, S. Sarp, M. Kuzlu, and U. Cali, "Homomorphic
encryption and federated learning based privacy-preserving cnn training:
Covid-19 detection use-case," arXiv preprint arXiv:2204.07752, 2022.
[73] R. L. Draelos, D. Dov, M. A. Mazurowski, J. Y. Lo, R. Henao, G. D.
Rubin, and L. Carin, "Machine-learning-based multiple abnormality pre-
diction with large-scale chest computed tomography volumes," Medical
image analysis, vol. 67, p. 101857, 2021.
[74] --,
"Rad-chestct
dataset," Oct.
https://doi.org/10.5281/zenodo.6406114
2020.
[Online]. Available:
[75] T. D. Bui,
J. Shin, and T. Moon, "3d densely convolutional
[Online]. Available:
networks for volumetric segmentation," 2017.
https://arxiv.org/abs/1709.03199
[76] C. Finn, P. Abbeel, and S. Levine, "Model-agnostic meta-learning
for fast adaptation of deep networks," in International conference on
machine learning. PMLR, 2017, pp. 1126–1135.
[77] J. H. Cheon, A. Kim, M. Kim, and Y. Song, "Homomorphic encryption
for arithmetic of approximate numbers," in International Conference on
the Theory and Application of Cryptology and Information Security.
Springer, 2017, pp. 409–437.
[78] A. Benaissa, B. Retiat, B. Cebere, and A. E. Belfedhal, "Tenseal: A
library for encrypted tensor operations using homomorphic encryption,"
arXiv preprint arXiv:2104.03152, 2021.
[79] L. McInnes, J. Healy, and J. Melville, "Umap: Uniform manifold
approximation and projection for dimension reduction," arXiv preprint
arXiv:1802.03426, 2018.
[80] A. Paverd, A. Martin, and I. Brown, "Modelling and automatically
analysing privacy properties for honest-but-curious adversaries," Tech.
Rep, 2014.
[81] G. A. Kaissis, M. R. Makowski, D. R ̈uckert, and R. F. Braren, "Secure,
privacy-preserving and federated machine learning in medical imaging,"
Nature Machine Intelligence, vol. 2, no. 6, pp. 305–311, 2020.
[39] M. A. Rahman, T. Rahman, R. Lagani`ere, N. Mohammed, and Y. Wang,
"Membership inference attack against differentially private deep learning
model." Trans. Data Priv., vol. 11, no. 1, pp. 61–79, 2018.
[40] H. Lu, C. Liu, T. He, S. Wang, and K. S. Chan, "Sharing models or
coresets: A study based on membership inference attack," arXiv preprint
arXiv:2007.02977, 2020.
[41] A. Salem, Y. Zhang, M. Humbert, P. Berrang, M. Fritz, and M. Backes,
"Ml-leaks: Model and data independent membership inference at-
tacks and defenses on machine learning models," arXiv preprint
arXiv:1806.01246, 2018.
[42] H. Hu, Z. Salcic, L. Sun, G. Dobbie, and X. Zhang, "Source inference
attacks in federated learning," in 2021 IEEE International Conference
on Data Mining (ICDM).
IEEE, 2021, pp. 1102–1107.
[43] L. Lyu and C. Chen, "A novel attribute reconstruction attack in federated
learning," arXiv preprint arXiv:2108.06910, 2021.
[44] J. Geiping, H. Bauermeister, H. Dr ̈oge, and M. Moeller, "Inverting
gradients-how easy is it to break privacy in federated learning?" Ad-
vances in Neural Information Processing Systems, vol. 33, pp. 16 937–
16 947, 2020.
[45] B. Zhao, K. R. Mopuri, and H. Bilen, "idlg: Improved deep leakage
from gradients," arXiv preprint arXiv:2001.02610, 2020.
[46] H. Yin, A. Mallya, A. Vahdat, J. M. Alvarez, J. Kautz, and P. Molchanov,
"See through gradients: Image batch recovery via gradinversion," in
Proceedings of the IEEE/CVF Conference on Computer Vision and
Pattern Recognition, 2021, pp. 16 337–16 346.
[47] A. Hatamizadeh, H. Yin, P. Molchanov, A. Myronenko, W. Li, P. Do-
gra, A. Feng, M. G. Flores, J. Kautz, D. Xu et al., "Do gradi-
ent inversion attacks make federated learning unsafe?" arXiv preprint
arXiv:2202.06924, 2022.
[48] C. Dwork, "Differential privacy: A survey of results," in International
conference on theory and applications of models of computation.
Springer, 2008, pp. 1–19.
[49] R. Hu, Y. Guo, H. Li, Q. Pei, and Y. Gong, "Personalized federated
learning with differential privacy," IEEE Internet of Things Journal,
vol. 7, no. 10, pp. 9530–9539, 2020.
[50] J. Zhou, S. Chen, Y. Wu, H. Li, B. Zhang, L. Zhou, Y. Hu, Z. Xiang,
Z. Li, N. Chen et al., "Ppml-omics: a privacy-preserving federated
machine learning system protects patients' privacy from omic data,"
bioRxiv, 2022.
[51] E. Bagdasaryan, O. Poursaeed, and V. Shmatikov, "Differential privacy
has disparate impact on model accuracy," Advances in neural informa-
tion processing systems, vol. 32, 2019.
[52] A. Shamir, "How to share a secret," Communications of the ACM,
vol. 22, no. 11, pp. 612–613, 1979.
[53] K. Bonawitz, V. Ivanov, B. Kreuter, A. Marcedone, H. B. McMahan,
S. Patel, D. Ramage, A. Segal, and K. Seth, "Practical secure aggregation
for privacy-preserving machine learning," in proceedings of the 2017
ACM SIGSAC Conference on Computer and Communications Security,
2017, pp. 1175–1191.
[54] C. Gentry, "Fully homomorphic encryption using ideal
lattices," in
Proceedings of the forty-first annual ACM symposium on Theory of
computing, 2009, pp. 169–178.
[55] O. Goldreich, "Secure multi-party computation," in Manuscript. Prelim-
inary version 78.110, 1998.
[56] T. Sandholm, S. Mukherjee, and B. A. Huberman, "Safe: Secure aggre-
gation with failover and encryption," arXiv preprint arXiv:2108.05475,
2021.
[57] Y. Liu, T. Fan, T. Chen, Q. Xu, and Q. Yang, "Fate: An industrial grade
platform for collaborative learning with data protection," J. Mach. Learn.
Res., vol. 22, no. 1, jul 2022.
[58] A. Ziller, A. Trask, A. Lopardo, B. Szymkow, B. Wagner, E. Bluemke,
J.-M. Nounahon, J. Passerat-Palmbach, K. Prakash, N. Rose, T. Ryffel,
Z. N. Reza, and G. Kaissis, PySyft: A Library for Easy Federated
Learning. Cham: Springer International Publishing, 2021, pp. 111–139.
[Online]. Available: https://doi.org/10.1007/978-3-030-70604-3 5
[59] H. R. Roth, Y. Cheng, Y. Wen, I. Yang, Z. Xu, Y.-T. Hsieh, K. Kersten,
A. Harouni, C. Zhao, K. Lu et al., "Nvidia flare: Federated learning
from simulation to real-world," arXiv preprint arXiv:2210.13291, 2022.
[60] A. S. Fauci, H. C. Lane, and R. R. Redfield, "Covid-19-navigating the
uncharted," pp. 1268–1269, 2020.
[61] T. Franquet, "Imaging of pneumonia: trends and algorithms," European
Respiratory Journal, vol. 18, no. 1, pp. 196–208, 2001.
[62] S. Wang, Y. Zha, W. Li, Q. Wu, X. Li, M. Niu, M. Wang, X. Qiu,
H. Li, H. Yu et al., "A fully automatic deep learning system for covid-
19 diagnostic and prognostic analysis," European Respiratory Journal,
vol. 56, no. 2, 2020.
|
|
http://arxiv.org/abs/2302.09815v1 | 2023-02-20T07:32:50 | 2023-02-20T07:32:50 | On the Stability and Generalization of Triplet Learning | Triplet learning, i.e. learning from triplet data, has attracted much
attention in computer vision tasks with an extremely large number of
categories, e.g., face recognition and person re-identification. Albeit with
rapid progress in designing and applying triplet learning algorithms, there is
a lacking study on the theoretical understanding of their generalization
performance. To fill this gap, this paper investigates the generalization
guarantees of triplet learning by leveraging the stability analysis.
Specifically, we establish the first general high-probability generalization
bound for the triplet learning algorithm satisfying the uniform stability, and
then obtain the excess risk bounds of the order $O(n^{-\frac{1}{2}}
\mathrm{log}n)$ for both stochastic gradient descent (SGD) and regularized risk
minimization (RRM), where $2n$ is approximately equal to the number of training
samples. Moreover, an optimistic generalization bound in expectation as fast as
$O(n^{-1})$ is derived for RRM in a low noise case via the on-average stability
analysis. Finally, our results are applied to triplet metric learning to
characterize its theoretical underpinning. | [
"Jun Chen",
"Hong Chen",
"Xue Jiang",
"Bin Gu",
"Weifu Li",
"Tieliang Gong",
"Feng Zheng"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09815v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09815v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "stat.ML",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"stat.ML",
"cs.LG"
] | 3
2
0
2
b
e
F
0
2
]
L
M
.
t
a
t
s
[
1
v
5
1
8
9
0
.
2
0
3
2
:
v
i
X
r
a
On the Stability and Generalization of Triplet Learning
Jun Chen1, Hong Chen2, 3, 4,*, Xue Jiang5, Bin Gu6, Weifu Li2, 3, 4, Tieliang Gong7, 8, Feng Zheng5
1College of Informatics, Huazhong Agricultural University, Wuhan 430070, China
2College of Science, Huazhong Agricultural University, Wuhan 430070, China
3Engineering Research Center of Intelligent Technology for Agriculture, Ministry of Education, Wuhan 430070, China
4Key Laboratory of Smart Farming for Agricultural Animals, Wuhan 430070, China
5Department of Computer Science and Engineering, Southern University of Science and Technology, Shenzhen 518055, China
6Mohamed bin Zayed University of Artificial Intelligence, Abu Dhabi, United Arab Emirates
7School of Computer Science and Technology, Xi'an Jiaotong University, Xi'an 710049, China
8Shaanxi Provincial Key Laboratory of Big Data Knowledge Engineering, Ministry of Education, Xi'an 710049, China
[email protected]
Abstract
Triplet learning, i.e. learning from triplet data, has attracted
much attention in computer vision tasks with an extremely
large number of categories, e.g., face recognition and per-
son re-identification. Albeit with rapid progress in design-
ing and applying triplet learning algorithms, there is a lack-
ing study on the theoretical understanding of their general-
ization performance. To fill this gap, this paper investigates
the generalization guarantees of triplet learning by leverag-
ing the stability analysis. Specifically, we establish the first
general high-probability generalization bound for the triplet
learning algorithm satisfying the uniform stability, and then
obtain the excess risk bounds of the order O(n− 1
2 logn) for
both stochastic gradient descent (SGD) and regularized risk
minimization (RRM), where 2n is approximately equal to the
number of training samples. Moreover, an optimistic general-
ization bound in expectation as fast as O(n−1) is derived for
RRM in a low noise case via the on-average stability analy-
sis. Finally, our results are applied to triplet metric learning
to characterize its theoretical underpinning.
Introduction
As two popular paradigms of machine learning, data-driven
algorithms with pointwise loss and pairwise loss have been
widely used to find the intrinsic relations from empirical
observations. In the algorithmic implementation, the for-
mer (called pointwise learning) often aims to minimize the
empirical risk characterized by the divergence between the
predicted output and the observed response of each input
(Vapnik 1998; Cucker and Smale 2001; Poggio et al. 2004),
while the latter (called pairwise learning) usually concerns
the model performance associated with pairs of training in-
stances, see e.g., ranking (Agarwal and Niyogi 2009) and
metric learning (Xing et al. 2002; Ying and Li 2012).
Despite enjoying the advantages of feasible implemen-
tations and solid foundations, pointwise learning and pair-
wise learning may face a crucial challenge for learn-
ing tasks with an extremely large number of categories.
*Corresponding author.
Copyright © 2023, Association for the Advancement of Artificial
Intelligence (www.aaai.org). All rights reserved.
Such learning scenarios appear in face recognition (Schroff,
Kalenichenko, and Philbin 2015; Ding and Tao 2018), per-
son re-identification (Ustinova and Lempitsky 2016; Cheng
et al. 2016; Xiao et al. 2016), image retrieval (Lai et al. 2015;
Huang et al. 2015) and other individual level fine-grained
tasks (Wohlhart and Lepetit 2015; Simo-Serra et al. 2015).
As illustrated in Yu et al. (2018), the traditional learning
model is difficult to achieve good performance in the set-
ting of an extremely large number of categories since its
parameters will increase linearly with the number of cate-
gories. To surmount this barrier, many triplet learning algo-
rithms are formulated by injecting triplet loss function into
the metric learning framework (Schroff, Kalenichenko, and
Philbin 2015; Ustinova and Lempitsky 2016; Cheng et al.
2016; Xiao et al. 2016; Ding and Tao 2018). For triplet met-
ric learning (Schroff, Kalenichenko, and Philbin 2015; Ge
et al. 2018), the implementation procedures mainly include:
1) Constructing triplets associated with anchor sample, posi-
tive sample and negative sample; 2) Designing margin-based
empirical risk associated with triplet loss; 3) Learning met-
ric space transformation rule via empirical risk minimiza-
tion (ERM), which aims to minimize intra-class distance
and maximize inter-class distance simultaneously. However,
the triplet characteristic often leads to a heavy computa-
tional burden for large-scale data. Recently, stochastic gra-
dient descent (SGD) is employed for deploying triplet learn-
ing algorithms due to its low time complexity (Schroff,
Kalenichenko, and Philbin 2015; Ge et al. 2018). Although
there has been significant progress in designing and apply-
ing triplet learning algorithms, little work has been done to
recover their generalization guarantees from the lens of sta-
tistical learning theory (SLT) (Vapnik 1998).
The generalization guarantee of learning algorithm is the
core of SLT, which evaluates the prediction ability in the
unseen inputs (Vapnik 1998; Cucker and Zhou 2007). In
a nutshell, there are three branches of generalization anal-
ysis including uniform convergence approaches associated
with hypothesis space capacity (e.g., VC dimension (Vap-
nik 1998), covering numbers (Cucker and Zhou 2007; Chen
et al. 2017), Rademacher complexity (Bartlett and Mendel-
son 2001)), operator approximation technique (Smale and
Zhou 2007; Rosasco, Belkin, and Vito 2010), and algorith-
mic stability analysis (Bousquet and Elisseeff 2002; Elisse-
eff, Evgeniou, and Pontil 2005; Shalev-Shwartz et al. 2010).
It is well known that the stability analysis enjoys nice prop-
erties on flexibility (independent of the capacity of hypoth-
esis function space) and adaptivity (suiting for rich learning
scenarios, e.g., classification and regression (Hardt, Recht,
and Singer 2016), ranking (Agarwal and Niyogi 2009), and
adversarial training (Xing, Song, and Cheng 2021)). Re-
cently, besides learning algorithms based on ERM and reg-
ularized risk minimization (RRM), generalization and sta-
bility have been understood for SGD of pointwise learning
(Hardt, Recht, and Singer 2016; Roux, Schmidt, and Bach
2012; Fehrman, Gess, and Jentzen 2020; Lei, Hu, and Tang
2021) and pairwise learning (Lei, Ledent, and Kloft 2020;
Arous, Gheissari, and Jagannath 2021; Lei, Liu, and Ying
2021). While the existing extensive works on stability anal-
ysis, to our best knowledge, there is no related result of SGD
and RRM for triplet learning.
To fill the above gap, this paper aims to provide stability-
based generalization analysis for a variety of triplet learning
algorithms. We establish generalization bounds for SGD and
RRM with triplet loss, which yield comparable convergence
rates as pointwise learning (Feldman and Vondr ́ak 2019) and
pairwise learning (Lei, Ledent, and Kloft 2020) under mild
conditions. The main contributions of this paper are summa-
rized as follows.
• Generalization by algorithmic stability for triplet learn-
ing. After introducing a new definition of triplet uniform
stability, we establish the first general high-probability
generalization bound for triplet learning algorithms sat-
isfying uniform stability, motivated by the recent analy-
sis for pairwise learning (Lei, Ledent, and Kloft 2020).
Especially, the current analysis just requires the uniform
stability of the triplet learning algorithm and the bound-
edness of loss function in expectation.
• Generalization bounds for triplet SGD and triplet RRM.
Generalization properties are characterized for SGD
and RRM of triplet learning when the loss function is
(strongly) convex, L-Lipschitz and α-smooth. Particu-
larly, the derived excess risk bounds are with the decay
rate O(n− 1
2 logn) as n+ (cid:16) n− (cid:16) n, where n+ and n−
are the numbers of positive samples and negative sam-
ples, respectively. Moreover, for the strongly convex loss
function, the refined generalization bound with the order
O(n−1) is derived for RRM by leveraging the triplet on-
average stability. To the best of our knowledge, these re-
sults are the first generalization bounds of SGD and RRM
for triplet learning.
Related Work
In this section, we briefly review the related works on triplet
learning and algorithmic stability.
Triplet learning. The main purpose of deep metric learn-
ing is to directly learn a feature representation vector from
input data with the help of deep neural networks. Brom-
ley et al. (1993) found that the relationship between sam-
ples can be measured by the difference between the corre-
sponding embedded vectors, and some deep metric learning
models have been subsequently proposed (Chopra, Hadsell,
and LeCun 2005; Hadsell, Chopra, and LeCun 2006). Later,
Schroff, Kalenichenko, and Philbin (2015) proposed the
FaceNet by integrating the idea of triplet learning (Schultz
and Joachims 2003; Weinberger, Blitzer, and Saul 2005) and
deep metric learning together. In contrast to the previous
approaches, FaceNet directly trains its output to be a com-
pact 128-D embedding vector using a triplet loss function
based on large margin nearest neighbor (Weinberger, Blitzer,
and Saul 2005), and it is implemented by employing the
SGD strategy. Encouraged by the impressive performance
of FaceNet, lots of learning algorithms with triplet loss have
been formulated in the computer version field (Cheng et al.
2016; Xiao et al. 2016; Ustinova and Lempitsky 2016; Liu
et al. 2016; Ramanathan et al. 2015; Ding and Tao 2018). Al-
though there have been significant works on designing triplet
metric learning algorithms, our theoretical understanding of
their generalization ability falls far below the experimental
validations.
Generalization and algorithmic stability. In SLT, uni-
form convergence analysis focuses on bounding the uni-
form deviation between training error and testing error over
hypothesis space (Vapnik 1998; Cucker and Smale 2001;
Bartlett and Mendelson 2001; Wang et al. 2020; Chen et al.
2021), and operator approximation approach is inspired by
functional analysis theory (Smale and Zhou 2007; Rosasco,
Belkin, and Vito 2010). Indeed, the former depends on the
capacity of hypothesis space (e.g., VC dimension (Vap-
nik 1998), covering numbers (Cucker and Zhou 2007),
Rademacher complexity (Bartlett and Mendelson 2001)),
and the latter is limited to some special models enjoying op-
erator representation (e.g., regularized least squares regres-
sion (Smale and Zhou 2007), regularized least squares rank-
ing (Chen 2012)). Different from the above routes, algorith-
mic stability is described by the gap among training errors
of different training sets, which is dimension-independent
and enjoys adaptivity for wide learning models. The con-
cept of algorithmic stability can be put forward as early as
the 1970s (Rogers and Wagner 1978), and its learning theo-
retical framework was established in Bousquet and Elisseeff
(2002) and Elisseeff, Evgeniou, and Pontil (2005). In essen-
tial, the algorithmic uniform stability is closely related to
the learnability (Poggio et al. 2004; Shalev-Shwartz et al.
2010). For the pointwise learning setting, the stability-based
generalization guarantees have been stated in terms of uni-
form stability (Hardt, Recht, and Singer 2016; Foster et al.
2019), on-average stability (Kuzborskij and Lampert 2018;
Lei and Ying 2021), local elastic stability (Deng, He, and
Su 2021) and argument stability (Bassily et al. 2020; Lei
and Ying 2020; Liu et al. 2017). For the pairwise learning
setting, there are fine-grained analyses on the generaliza-
tion and stability of SGD and RRM (Shen et al. 2019; Lei,
Ledent, and Kloft 2020; Lei, Liu, and Ying 2021). Due to the
space limitation, we further summarize different definitions
and properties of algorithmic stability in Supplementary Ma-
terial C. Along this line of the above corpus, it is natural to
investigate the generalization bounds of triplet learning by
algorithmic stability analysis.
Preliminaries
This section introduces the necessary backgrounds on triplet
learning and algorithmic stability. The main notations used
in this paper are stated in Supplementary Material A.
:= (x+
i , y+
+ ∪ Z n−
Triplet learning
Let X+, X− ⊂ Rd are two d-dimensional input spaces
and Y ⊂ R is an output space. We give the training set
i )}n+
i=1 ∪ {z−
S := {z+
j=1 ∈ Z
i
with Z := Z n+
− , where each positive sample z+
i and
negative sample z−
j are drawn independently from Z+ :=
X+ ×Y and Z− := X− ×Y, respectively. Note that there are
likely more than two classes in positive and negative sample
spaces. Given empirical observation S, triplet learning algo-
rithms usually aim to find a model hw : X+ ×X+ ×X− → R
such that the expectation risk
j )}n−
:= (x−
j , y−
j
R(w) := Ez+, ̃z+,z− (cid:96)(w; z+, ̃z+, z−)
(1)
is as small as possible. Here the model parameter w ∈ W
with d(cid:48)-dimensional parameter space W ⊆ Rd(cid:48)
, Ez denotes
the conditional expectation with respect to (w.r.t.) z, and the
triplet loss function (cid:96) : W × Z+ × Z+ × Z− → R+ is
used to measure the difference between model's prediction
and corresponding real observation. Since the intrinsic dis-
tributions generating z+ and z− are same and unknown, it
is impossible to implement triplet learning by minimizing
the objective R(w) directly. Naturally, we consider the cor-
responding empirical risk of (1) defined as
RS(w) :=
1
n+(n+ − 1)n−
(cid:88)
i,j∈[n+],i(cid:54)=j,
k∈[n− ]
(cid:96)(w; z+
i , z+
j , z−
k )
(2)
:= {1, ..., n}. Clearly,
for algorithmic design, where [n]
the triplet learning algorithms, built from RS(w) in (2),
are much more complicated than the corresponding ones in
pointwise learning and pairwise learning.
In the sequel, for the given algorithm A and the training
data S, we denote the corresponding output model param-
eter as A(S) for feasibility. In triplet learning, we usually
build predictors by optimizing the models measured by the
empirical risk RS(A(S)) or its variants. However, the nice
empirical performance of learning model does not guaran-
tee its effectiveness in unseen observations. In SLT, it is mo-
mentous and fundamental to bound generalization error, i.e.
R(w) − RS(w), since it characterizes the gap between the
population risk R(w) and its empirical estimator RS(w).
Despite the existing rich studies for pointwise learning and
pairwise learning, the generalization bound of triplet learn-
ing is rarely touched in the machine learning community. In
this paper, we pioneer the generalization analysis of triplet
SGD and RRM to understand their learnability.
Triplet algorithmic stability
An algorithm A : Z n+
+ ∪ Z n−
− → W is stable if the model
parameter A(S) is insensitive to the slight change of training
set S. Various definitions of algorithmic stability have been
introduced from different motivations (see Supplementary
Material C), where uniform stability and on-average sta-
bility are popular for studying the generalization bounds of
SGD and RRM (Hardt, Recht, and Singer 2016; Lin, Camo-
riano, and Rosasco 2016; Kuzborskij and Lampert 2018; Lei
and Ying 2021; Lei, Ledent, and Kloft 2020). Following this
line, we extend the previous definitions of uniform stability
and on-average stability to the triplet learning setting.
Definition 1.
datasets S = {z+
̄z−
1 , ..., ̄z−
n−
sample. A deterministic algorithm A : Z n+
called γ-uniformly stable if
(Uniform Stability). Assume any training
}, ̄S = { ̄z+
, z−
1 , ..., z+
,
n+
+ ∪ Z n−
− are differ by at most a single
− → W is
+ ∪ Z n−
1 , ..., z−
n−
1 , ..., ̄z+
n+
} ∈ Z n+
|(cid:96)(A(S); z+, ̃z+, z−) − (cid:96)(A( ̄S); z+, ̃z+, z−)| ≤ γ
sup
z+ , ̃z+ ∈Z+ ,
z− ∈Z−
for any training datasets S, ̄S ∈ Z n+
at most a single sample.
+ ∪ Z n−
− that differ by
Definition 1 coincides with the uniform stability defini-
tions for pointwise learning (Hardt, Recht, and Singer 2016)
and pairwise learning (Lei, Ledent, and Kloft 2020), except
for the triplet loss involving two sample spaces Z+ and Z−.
(On-average Stability). Let Si,j,k =
Definition 2.
j , z+
i , z+
i−1, ̄z+
1 , ..., z+
{z+
i+1, ..., z+
z−
k , z−
k−1, ̄z−
k+1, ..., z−
n−
deterministic algorithm A : Z n+
γ-on-average stable if
}, i, j ∈ [n+], i (cid:54)= j, k ∈ [n−]. A
− → W is called
+ ∪ Z n−
j+1, ..., z+
n+
j−1, ̄z+
1 , ...,
, z−
1
n+(n+ − 1)n−
(cid:88)
E
S, ̄S
i,j∈[n+ ],i(cid:54)=j,
k∈[n−]
(cid:2)(cid:96)(A(Si,j,k); z+
i , z+
j , z−
k )
i , z+
j , z−
− (cid:96)(A(S); z+
k )(cid:3) ≤ γ.
Compared with the existing ones for pointwise learning
(Kuzborskij and Lampert 2018) and pairwise learning (Lei,
Ledent, and Kloft 2020; Lei, Liu, and Ying 2021), Definition
2 considers much more complicated perturbations of train-
ing set S involving three samples. Definition 2 takes the ex-
pectation over S and ̄S, and takes the average over perturba-
tions, which is weaker than the uniform stability described
in Definition 1.
Main Results
This section states our main results on generalization bounds
for triplet learning by stability analysis. We show a gen-
eral high-probability generalization bound of triplet learn-
ing algorithms firstly, and then apply it to two specific algo-
rithms, i.e. SGD and RRM. Finally, the on-average stability
is employed for getting an optimistic generalization bound
of RRM in expectation. All the proofs are provided in Sup-
plementary Material B due to the space limitation.
Similar with the previous analyses (Hardt, Recht, and
Singer 2016; Lei, Ledent, and Kloft 2020), our results are
closely related to the following properties of triplet loss
function.
Definition 3. For a triplet loss function (cid:96) : W × Z+ ×
Z+ × Z− → R+, denote by ∇(cid:96)(w) := ∇(cid:96)(w; z+, ̃z+, z−)
its gradient w.r.t. the model parameter w ∈ W and denote
by (cid:107) * (cid:107) a norm on an inner product space which satisfies
(cid:107) * (cid:107)2 = (cid:104)*, *(cid:105). Let σ ≥ 0 and L, α > 0.
1) The triplet loss (cid:96) is σ-strongly convex if, for all w, w(cid:48) ∈
W,
(cid:96)(w) ≥ (cid:96)(w(cid:48)) + (cid:104)∇(cid:96)(w(cid:48)), w − w(cid:48)(cid:105) +
σ
2
(cid:107)w − w(cid:48)(cid:107)2.
2) The triplet loss (cid:96) is L-Lipschitz if
|(cid:96)(w) − (cid:96)(w(cid:48))| ≤ L(cid:107)w − w(cid:48)(cid:107), ∀w, w(cid:48) ∈ W.
3) The triplet loss (cid:96) is α-smooth if
(cid:107)∇(cid:96)(w) − ∇(cid:96)(w(cid:48))(cid:107) ≤ α(cid:107)w − w(cid:48)(cid:107), ∀w, w(cid:48) ∈ W.
When σ = 0, (cid:96) is convex which also implies that
∇2(cid:96)(w; z+, ̃z+, z−) > 0. It is easy to verify that logistic
loss, least square loss and Huber loss are convex and smooth.
Meanwhile, we observe that hinge loss, logistic loss and Hu-
ber loss are convex and Lipschitz (Hardt, Recht, and Singer
2016; Lei, Ledent, and Kloft 2020; Lei, Liu, and Ying 2021).
Stability-based generalization bounds
This subsection establishes the connection between uniform
stability and generalization with high probability for triplet
learning. Although rich results on the relationship between
stability and generalization, the previous results do not hold
directly for triplet learning due to its complicated loss struc-
ture. This difficulty is tackled by implementing much more
detailed error decomposition and developing the analysis
technique of Lei, Ledent, and Kloft (2020).
Lemma 1. If A : Z n+
for any S, ̄S, we have
− → W is γ-uniformly stable,
+ ∪ Z n−
|(cid:96)(A(S); z+, ̃z+, z−) − (cid:96)(A(Si,j,k); z+, ̃z+, z−)| ≤ 3γ
for all z+, ̃z+ ∈ Z+, z− ∈ Z−, where S, ̄S, Si,j,k is defined
in Definition 2 for any i, j ∈ [n+], i (cid:54)= j, k ∈ [n−].
Lemma 1 illustrates that an upper bound of the change
of the loss function still exists even after changing multiple
samples of the training set. Here, the upper bound 3γ re-
flects the sensitivity of triplet learning w.r.t. the perturbation
of training data.
It is a position to state our first general generalization
bound with high probability for the uniformly stable triplet
learning algorithm A. Detailed proof can be found in Sup-
plementary Material B.1.
Theorem 1. Assume that A : Z n+
− → W is γ-
uniformly stable. Let constant M > 0 and, for all z+, ̃z+ ∈
Z+ and z− ∈ Z−, let |ES(cid:96)(A(S); z+, ̃z+, z−)| ≤ M . Then,
for all δ ∈ (0, 1/e), we have
+ ∪ Z n−
|RS(A(S)) − R(A(S))|
(cid:32)
≤ 6γ + e
8M
(cid:16) 1
√
n−
+
√
2
n+ − 1
(cid:17)(cid:112)log(e/δ)
√
+24
(cid:16)
2γ
(cid:100)log2(n−(n+ − 1)2)(cid:101) + 2
(cid:17)
(cid:33)
log(e/δ)
with probability 1 − δ, where (cid:100)n(cid:101) denotes the minimum inte-
ger no smaller than n and e denotes the base of the natural
logarithm.
Remark 1. Theorem 1 demonstrates the generalization per-
formance of triplet learning depends heavily on the sam-
ple numbers n+, n− and the stability parameter γ, which
extends the Theorem 1 of Lei, Ledent, and Kloft (2020)
for pairwise learning to the triplet learning setting. Denote
x (cid:16) y as ay < x ≤ by for some constants a, b > 0. In
particular, when n+ (cid:16) n− (cid:16) n, the high-probability bound
in Theorem 1 can be rewritten as O(n− 1
2 + γlogn), which
is comparable with the previous analyses (Lei, Ledent, and
Kloft 2020; Lei, Liu, and Ying 2021).
Generalization bounds for SGD
Let w1 ∈ W and let ∇(cid:96)(w) be the subgradient of triplet loss
(cid:96) w.r.t. the argument w. For triplet learning by SGD, at the
t-th iteration, we draw (it, jt, kt) randomly and uniformly
over {(it, jt, kt) : it, jt ∈ [n+], it (cid:54)= jt, kt ∈ [n−]}, and
update the model parameter wt by
wt+1 = wt − ηt∇(cid:96)(wt; z+
it
, z+
jt
, z−
kt
),
(3)
where {ηt}t is a sequence of step sizes.
To apply Theorem 1, we need to bound the uniform sta-
bility parameter of (3). Denote by I[*] the indicator function
which takes 1 if the situation in the brackets is satisfied and
takes 0 otherwise.
Lemma 2. Assume that S, ̄S ∈ Z n+
− are different
only in the last positive sample (or negative sample). Sup-
pose (cid:96)(w; z+, ̃z+, z−) is convex, α-smooth and L-Lipschitz
w.r.t. (cid:107) * (cid:107), ∀z+, ̃z+ ∈ Z+, z− ∈ Z−. If ηt ≤ 2/α, then SGD
in (3) with t-th iteration is γ-uniformly stable, where
+ ∪ Z n−
γ ≤2L2
t
(cid:88)
l=1
ηlI
(cid:104)
(il = n+ or jl = n+, il (cid:54)= jl, kl ∈ [n−], z+
n+
(cid:54)= ̄z+
n+
) or (il, jl ∈ [n+], il (cid:54)= jl, kl = n−, z−
n−
(cid:54)= ̄z−
n−
(cid:105)
)
.
In Lemma 2, we just consider the perturbation on the last
positive (or negative) sample without loss of generality. The
above uniform stability bound of SGD involves an indicator
function associated with S and ̄S, which is nonzero only
when different triplets are used.
Now we state the generalization bounds for SGD (3). The
proof is present in Supplementary Material B.2.
Theorem 2. Let the loss function (cid:96)(w; z+, ̃z+, z−) is con-
vex, α-smooth and L-Lipschitz for all z+, ̃z+ ∈ Z+, z− ∈
Z− and |ES(cid:96)(wT ; z+, ̃z+, z−)| ≤ M , where wT is pro-
T and constant c ≤ 2/α.
duced by SGD (3) with ηt ≡ c/
For any δ ∈ (0, 1/e), with probability 1 − δ we have
√
|RS(wT ) − R(wT )|
(cid:32)
(cid:16)
=O
(cid:100)log(n−(n+ − 1)2)(cid:101) + 2
(cid:17)
log(1/δ)
(cid:115)
(cid:16)
(cid:17)(cid:16)
+ 1
√
T
n+
√
T
n−
+
(cid:17)
+
(cid:16) 1
√
n−
+
√
1
n+ − 1
max{ T
n+
log(1/δ)
, T
}
n−
(cid:33)
.
(cid:17)(cid:112)log(1/δ)
Remark 2. Theorem 2 demonstrates that the generalization
error of (3) relies on the numbers of positive and negative
Algorithm
Reference
Assumptions
Convex Lipschitz
SGD ((cid:78))
Hardt, Recht, and Singer (2016)
Lei and Ying (2020)
Lei, Ledent, and Kloft (2020)
SGD ((cid:78)(cid:78))
Lei, Liu, and Ying (2021)
Lei, Liu, and Ying (2021)
Yang et al. (2021)
Yang et al. (2021)
SGD ((cid:78)(cid:78)(cid:72))
Ours (n+ (cid:16) n− (cid:16) n)
√
√
√
√
√
√
√
√
√
×
√
×
√
√
√
√
Smooth
√
√
√
√
×
×
√
√
Tool
Uniform
stability
On-average
model stability
Uniform
stability
On-average
model stability
On-average
model stability
Uniform
stability
Uniform
stability
Uniform
stability
Convergence
rate
O(n− 1
2 )
O(n−1)
∗O(n− 1
2 logn)
O(n−1)
O(n− 1
2 )
O(n− 1
2 )
O(n− 1
2 )
∗O(n− 1
2 logn)
Table 1: Summary of stability-based generalization analyses of SGD in the setting of convexity ((cid:78)-pointwise; (cid:78)(cid:78)-pairwise;
(cid:78)(cid:78)(cid:72)-triplet;
-the reference has such a property; ×-the reference hasn't such a property; ∗-high-probability bound).
√
training samples (i.e. n+, n−) and the iterative steps T . Our
result also uncovers that the balance of positive and nega-
tive training samples is crucial to guarantee the generaliza-
tion of triplet learning algorithms. When n+ (cid:16) n− (cid:16) n,
we get the high-probability bound |RS(wT ) − R(wT )| =
O(n− 1
2 logn), which is consistent with Theorem 4 in Lei,
Ledent, and Kloft (2020) for pariwise SGD.
Remark 3. Let w∗
R(w). We can deduce that
R = arg min
w∈W
R(wT ) − R(w∗
R) = (cid:0)R(wT ) − RS(wT )(cid:1) + (cid:0)RS(wT )
R)(cid:1).
R)(cid:1) + (cid:0)RS(w∗
R) − R(w∗
−RS(w∗
(4)
As illustrated in previous studies (Bottou and Bousquet
2007; Lei, Ledent, and Kloft 2020; Lei and Ying 2020), the
first two terms in (4) are called the estimation error and op-
timization error, respectively. Theorem 2 guarantees the up-
per bound of estimation error with O(n− 1
2 logn) and Harvey
et al. (2019) states the upper bound of the optimization er-
ror with O(T − 1
2 logT ). The third term on the right side of
(4) can be bounded by Bernstein's inequality for U-statistics
(Pitcan 2017), which is present in the following Lemma 3.
Lemma 3. Let b = supz+, ̃z+,z− |(cid:96)(w; z+, ̃z+, z−)| and τ be
the variance of (cid:96)(w; z+, ̃z+, z−). Then, for any δ ∈ (0, 1),
with probability at least 1 − δ we have
|RS(w) − R(w)| ≤
2blog(1/δ)
3(cid:98)n+/2(cid:99)
+
(cid:115)
2τ log(1/δ)
(cid:98)n+/2(cid:99)
+
2blog(1/δ)
3(cid:98)n−(cid:99)
+
(cid:115)
2τ log(1/δ)
(cid:98)n−(cid:99)
,
√
where (cid:98)n(cid:99) denotes the maximum integer no larger than n.
√
2 logn) as T (cid:16) n.
R) = O(n− 1
Under mild conditions, i.e., b = O(
R) − R(w∗
n) and n+ (cid:16) n− (cid:16)
(cid:113) τ log(1/δ)
R) = O(cid:0) log(1/δ)
(cid:1) =
n, we get RS(w∗
n +
n
O(n− 1
2 ). Combining this with the bounds of estimation er-
ror and optimization error in Remark 3, we deduce that the
excess risk R(wT ) − R(w∗
Remark 4. To better highlight the characteristics of The-
orem 2, we compare it with the generalization analyses in
the setting of convexity (Hardt, Recht, and Singer 2016; Lei
and Ying 2020; Lei, Ledent, and Kloft 2020; Lei, Liu, and
Ying 2021; Yang et al. 2021) in Table 1. Clearly, our learn-
ing theory analysis is novel since it is the first touch for SGD
under the triplet learning setting. When n+ (cid:16) n− (cid:16) n, the
derived result is comparable with the previous convergence
rates (Hardt, Recht, and Singer 2016; Lei, Ledent, and Kloft
2020; Lei, Liu, and Ying 2021).
Generalization bounds for RRM
We now turn to study the generalization properties of RRM
for triplet learning. Detailed proofs are stated in Supplemen-
tary Material B.3. Let r : W → R+ be a regularization
penalty for increasing the data-fitting ability of ERM. For
any datatset S ∈ Z n+
− and RS(w) defined in (2), the
derived model parameter of RRM is the minimizer of
+ ∪ Z n−
FS(w) := RS(w) + r(w)
(5)
over w ∈ W and F (w) := R(w) + r(w).
To apply Theorem 1, we also need to verify the stable
parameter of RRM (5).
Lemma 4. Assume that FS(w) is σ-strongly convex w.r.t.
(cid:107) * (cid:107) and (cid:96)(w; z+, ̃z+, z−) is convex and L-Lipschitz. Then,
the RRM algorithm A defined as A(S) = arg min
FS(w)
w∈W
(cid:111) L2
σ .
is γ-uniformly stable with γ = min
(cid:110) 8
n+
, 4
n−
When n+ (cid:16) n− (cid:16) n, the uniform stability parameter
is O( L2
nσ ), which coincides with the previous analysis for
pariwise learning (Lei, Ledent, and Kloft 2020). To tackle
the triplet structure, the current analysis involves elaborate
error decomposition and the deduce strategy of Lemma B.2
in Lei, Ledent, and Kloft (2020).
It is required in Theorem 1 that we assume the triplet loss
for a uniformly stable algorithm is bounded in expectation.
To get the necessary guarantee, we introduce the follow-
ing Lemma 5, which can be proved coherently by utilizing
Lemma 2 (Lei, Ledent, and Kloft 2020) and the Lipschitz
continuity of the loss function (cid:96).
Lemma 5. Let FS(w) be σ-strongly convex w.r.t. (cid:107) * (cid:107),
w∗ = arg min
F (w), and, for all z+, ̃z+ ∈ Z+, z− ∈
w∈W
Z−, let ̃(cid:96)(A(S); z+, ̃z+, z−) = (cid:96)(A(S); z+, ̃z+, z−) −
(cid:96)(w∗; z+, ̃z+, z−). If the RRM algorithm A measured by
loss function (cid:96) is γ-uniformly stable, then A measured by
loss function ̃(cid:96) is also γ-uniformly stable and
√
√
|ES
̃(cid:96)(A(S); z+, ̃z+, z−)| ≤ M := min
(cid:110) 4
√
6
n+
,
4
√
3
n−
(cid:111) L2
σ
.
Theorem 3. Assume that FS(w) is σ-strongly convex w.r.t.
(cid:107) * (cid:107), and (cid:96)(w; z+, ̃z+, z−) is convex and L-Lipschitz and
supz+, ̃z+,z− |(cid:96)(w∗; z+, ̃z+, z−)| ≤ O(
n). Let the vari-
ance of (cid:96)(w∗; z+, ̃z+, z−) is less than a positive constant τ .
For the RRM algorithm A defined as and any δ ∈ (0, 1/e),
we have
√
|RS(A(S)) − R(A(S))|
(cid:32)
σ−1(cid:16)
(cid:110)
min
=O
√
√
2
n+
,
1
√
n−
(cid:111)(cid:16) 1
√
n−
+
1
√
n+
(cid:17)(cid:114)
log
1
δ
(cid:115)
+ min
(cid:110) 2
n+
,
1
n−
(cid:111)
log(cid:0)n−n2
+
(cid:1)log
(cid:17)
1
δ
+
(cid:115)
log 1
δ
n+
+
log 1
δ
n−
with probability 1 − δ.
Remark 5. If n+ (cid:16) n− (cid:16) n, the above bound is equivalent
2 + (nσ)−1logn(cid:1). Due to the definitions of FS(w)
to O(cid:0)n− 1
and A(S) and r(A(S)) ≥ 0, we deduce that the excess risk
R(A(S)) − R(w∗) ≤ R(A(S)) − RS(A(S)) + RS(w∗) −
R(w∗) + r(w∗). Analogous to the third term to the right of
(cid:113) τ log(1/δ)
(4), we have RS(w∗) − R(w∗) = O( log(1/δ)
)
n
with probability 1 − δ. Therefore, the excess risk bound is
O(n− 1
2 logn) when r(w∗) = O(σ(cid:107)w∗(cid:107)2) and σ (cid:16) n− 1
2 .
Note that the reason for r(w∗) = O(σ(cid:107)w∗(cid:107)2) can be found
in the last part of Supplementary Material B.3.
n +
√
Optimistic generalization bounds for RRM
In this part, we use the on-average stability in Definition
2 and some properties of smoothness to establish the opti-
mistic generalization bounds of RRM in the low noise case.
Different from the above theorems, we do not require the
Lipschitz continuity condition for the triplet loss function.
The following lemma establishes the relationship between
the estimation error and the model perturbation induced by
the change at a single point of the training set.
Lemma 6. Assume that for all z+, ̃z+ ∈ Z+, z− ∈ Z− and
w ∈ W, the loss function (cid:96)(w; z+, ̃z+, z−) is convex and
α-smooth w.r.t. (cid:107) * (cid:107). Then, for all (cid:15) > 0,
ES[R(A(S)) − RS(A(S))]
(cid:16)
(cid:88)
2E
S, ̄S(cid:107)A(Si) − A(S)(cid:107)2
≤
3((cid:15) + α)
2n+(n+ − 1)n−
i∈[n+ ],
k∈[n−]
,
}
+
+ E
i , z+
k−1, ̄z−
1 , ..., z−
n−
}.
where Si = {z+
and Sk = {z+
αESRS(A(S))
(cid:15)
, z−
i+1, ..., z+
n+
k , z−
k+1, ..., z−
n−
S, ̄S(cid:107)A(Sk) − A(S)(cid:107)2(cid:17)
i−1, ̄z+
1 , ..., z+
1 , ..., z−
, z−
1 , ..., z+
n+
From the proof of Lemma 6 (see Supplementary Material
B.4) and Definition 2, we know the upper bound in Lemma
6 provides the selection of on-average stability parameter
γ. After establishing the connection between E
S, ̄S(cid:107)A(Si) −
A(S)(cid:107)2 (or E
S, ̄S(cid:107)A(Sk) − A(S)(cid:107)2) and ESRS(A(S)), we
get the following error bound of RRM.
Theorem 4. Assume that the loss function (cid:96)(w; z+, ̃z+, z−)
is convex and α-smooth for all z+, ̃z+ ∈ Z+, z− ∈ Z− and
w ∈ W, and FS(w) is σ-strongly convex w.r.t. (cid:107) * (cid:107) with
S ∈ Z n+
− . Let σmin{n+, n−} ≥ 8α and A(S) =
arg min
w∈W
FS(w). Then, for all (cid:15) > 0,
+ ∪ Z n−
(cid:33)
ES[F (A(S)) − FS(w∗)] ≤ ES[R(A(S)) − RS(A(S))]
(cid:18) α
(cid:15)
1536α((cid:15) + α)
+(n+ − 1)σ2 +
n2
3(n+ − 1)n2
256α((cid:15) + α)
−σ2
ESRS(A(S)).
+
(cid:19)
≤
n− (cid:16) n, r(w∗) = O(σ(cid:107)w∗(cid:107)2) and (cid:15) =
Remark 6. The upper bounds in Theorem 4 are closely
related to the empirical risk ESRS(A(S)). It is reason-
able to assume that the empirical risk of A(S) is small
enough with the increasing of training samples. When n+ (cid:16)
−σ2
,
−+256n2
+
(cid:19)
+ (cid:0)n− 3
2 + σ(cid:1)(cid:107)w∗(cid:107)2
.
4 (cid:107)w∗(cid:107)−1(cid:112)R(w∗) and R(w∗) =
(cid:2)R(A(S)) − R(w∗)(cid:3) = O(n−1(cid:107)w∗(cid:107)2).
less than n− 1
2 (cid:107)w∗(cid:107)2 due to
When σ = n− 3
n− 1
2 (cid:107)w∗(cid:107)2, ES
Note that R(w∗) can not
σmin{n+, n−} ≥ 8α.
(cid:2)R(A(S)) − R(w∗)(cid:3) = O
3n2
4608n2
R(w∗)
3
2 σ
+(n+−1)n2
ES
(cid:114)
(cid:18)
n
The above excess risk bound assures the convergence rate
O(n−1(cid:107)w∗(cid:107)2) in expectation under proper conditions of w∗
and RS(A(S)), which extends the previous optimistic gen-
eralization bounds of pointwise learning (Srebro, Sridharan,
and Tewari 2010; Zhang, Yang, and Jin 2017) and pairwise
learning (Lei, Ledent, and Kloft 2020) to the triplet setting.
Remark 7. As summarized in Table 2, the convergence
guarantees in Theorems 3 and 4 are comparable with the
existing results in the setting of strong convexity even involv-
ing the complicated triplet structure in error decomposition.
Algorithm
Reference
Full-batch
SGD ((cid:78))
RRM ((cid:78))
RRM ((cid:78)(cid:78))
RRM ((cid:78)(cid:78)(cid:72))
Klochkov and Zhivotovskiy (2021)
Feldman and Vondr ́ak (2019)
Lei, Ledent, and Kloft (2020)
Lei, Ledent, and Kloft (2020)
Ours (n+ (cid:16) n− (cid:16) n)
Ours (n+ (cid:16) n− (cid:16) n)
Strongly
Convex
√
√
√
√
√
√
Assumptions
Lipschitz
Smooth
Tool
Convergence
rate
√
√
√
×
√
×
×
×
×
√
×
√
Uniform
stability
Uniform
stability
Uniform
stability
On-average
stability
Uniform
stability
On-average
stability
∗O(n−1logn)
∗O(n− 1
2 logn)
∗O(n− 1
2 logn)
O(n−1)
∗O(n− 1
2 logn)
O(n−1)
Table 2: Summary of stability-based generalization analyses for algorithms in the setting of strong convexity ((cid:78)-pointwise;
(cid:78)(cid:78)-pairwise; (cid:78)(cid:78)(cid:72)-triplet;
-the reference has such a property; ×-the reference hasn't such a property; ∗-high-probability
bound).
√
Applied to Triplet Metric Learning
This section applies our generalization analysis to triplet
metric learning, which focuses on learning a metric to min-
imize the intra-class distance and maximize inter-class dis-
tance simultaneously. Let t(y, y(cid:48)) be the symbolic function,
i.e., t(y, y(cid:48)) = 1 if y = y(cid:48) and −1 otherwise. Inspired by
the 0-1 loss in pairwise metric learning (cid:96)0−1(w; z, z(cid:48)) =
I[t(y, y(cid:48))(1 − hw(x, x(cid:48))) ≤ 0] (Lei, Liu, and Ying 2021),
loss (cid:96)0−1(w; z+, ̃z+, z−) =
we consider a 0-1 triplet
I[hw(x+, ̃x+) − hw(x+, x−) + ζ ≥ 0], where the train-
ing model hw is considered as hw(x+, ̃x+) = (cid:10)w, (x+ −
̃x+)(x+ − ̃x+)(cid:62)(cid:11), and ζ denotes the margin that requires
the distance of negative pairs to excess the one of positive
pairs. We introduce the triplet loss
(cid:96)φ(w; z+, ̃z+, z−) = φ(hw(x+, ̃x+) − hw(x+, x−) + ζ)
(6)
associated with the logistic function φ(u) = log(1 +
exp(−u)), which is consistent with the error metric used
in Schroff, Kalenichenko, and Philbin (2015) and Ge et al.
(2018).
T , c ≤ 1/(32B4) and (cid:12)
When max{supx+∈X+(cid:107)x+(cid:107), supx−∈X− (cid:107)x−(cid:107)} ≤ B,
Theorems 2-3 yield the following convergence rates for
SGD and RRM with the triplet loss (6), respectively.
Corollary 1. Let wT is produced by SGD (3) with
√
(cid:12)ES[φ(hwT (x+, ̃x+) −
ηt ≡ c/
hwT (x+, x−) + ζ)](cid:12)
(cid:12) ≤ M . For any δ ∈ (0, 1/e),
with probability 1 − δ, we have |RS(wT ) − R(wT )| =
O(cid:0)n− 1
Corollary 2. Consider FS(w) in (5) with the triplet loss
(6) and r(w∗) = O(σ(cid:107)w∗(cid:107)2) with σ (cid:16) n− 1
2 . Assume that
supz+, ̃z+,z− |(cid:96)(w∗; z+, ̃z+, z−)| ≤ O(
n) and the vari-
ance of (cid:96)(w∗; z+, ̃z+, z−) is bounded. Then for A(S) =
2 (1/δ) + n− 1
2 (1/δ)(cid:1).
2 lognlog
2 log
√
3
1
arg min
w∈W
FS(w) and any δ ∈ (0, 1/e), we have R(A(S)) −
R(w∗) = O(n− 1
2 lognlog(1/δ)) with probability 1 − δ.
Moreover, we get the refined result of RRM from Theo-
rem 4 with the help of the strong-convexity of (6).
Corollary 3. Under the basic assumptions and notations
4 (cid:107)w∗(cid:107)−1(cid:112)R(w∗) and
of Corollary 2, assume σ = n− 3
(cid:2)R(A(S)) −
R(w∗) = n− 1
2 (cid:107)w∗(cid:107)2,
R(w∗)(cid:3) = O(n−1(cid:107)w∗(cid:107)2).
then we have ES
Conclusion
This paper fills the theoretical gap in the generalization
bounds of SGD and RRM for triplet learning by developing
algorithmic stability analysis techniques, which are valuable
to understanding their intrinsic statistical foundations of out-
standing empirical performance. We firstly derive the gen-
eral high-probability generalization bound O(γlogn + n− 1
2 )
for triplet uniformly stable algorithms, and then apply it to
get the explicit result O(n− 1
2 logn) for SGD and RRM under
mild conditions of loss function. For RRM with triplet loss,
the optimistic bound O(n−1) in expectation is also provided
by leveraging the on-average stability. Even for the compli-
cated triplet structure, our results also enjoy similar conver-
gence rates as the previous related works of pointwise learn-
ing (Hardt, Recht, and Singer 2016; Feldman and Vondr ́ak
2019) and pairwise learning (Lei, Ledent, and Kloft 2020).
Some potential directions are discussed in Supplementary
Material D for future research.
Acknowledgments
This work was supported in part by National Natural Sci-
ence Foundation of China under Grant Nos. 12071166,
62106191, 61972188, 62122035.
References
Agarwal, A.; and Zhang, T. 2022. Minimax regret optimiza-
tion for robust machine learning under distribution shift. In
Conference on Learning Theory (COLT), 2704–2729.
Agarwal, S.; and Niyogi, P. 2009. Generalization bounds
for ranking algorithms via algorithmic stability. Journal of
Machine Learning Research, 10: 441–474.
Arous, G. B.; Gheissari, R.; and Jagannath, A. 2021. On-
line stochastic gradient descent on non-convex losses from
high-dimensional inference. Journal of Machine Learning
Research, 22: 106:1–106:51.
Bartlett, P. L.; and Mendelson, S. 2001. Rademacher and
Gaussian complexities: Risk bounds and structural results.
In Conference on Computational Learning Theory, 224–
240.
Bassily, R.; Feldman, V.; Guzm ́an, C.; and Talwar, K. 2020.
Stability of stochastic gradient descent on nonsmooth con-
vex losses. In Advances in Neural Information Processing
Systems (NeurIPS), 4381–4391.
Bottou, L.; and Bousquet, O. 2007. The tradeoffs of large
scale learning. In Advances in Neural Information Process-
ing Systems (NeurIPS), 161–168.
Boucheron, S.; Lugosi, G.; and Massart, P. 2013. Concentra-
tion inequalities - A nonasymptotic theory of independence.
Oxford University Press.
Bousquet, O.; and Elisseeff, A. 2002. Stability and general-
ization. Journal of Machine Learning Research, 2: 499–526.
Bousquet, O.; Klochkov, Y.; and Zhivotovskiy, N. 2020.
In Con-
Sharper bounds for uniformly stable algorithms.
ference on Learning Theory (COLT), 610–626.
Bromley, J.; Guyon, I.; LeCun, Y.; S ̈ackinger, E.; and Shah,
R. 1993. Signature verification using a Siamese time delay
neural network. In Advances in Neural Information Process-
ing Systems (NeurIPS), 737–744.
Cai, T.; Gao, R.; Lee, J. D.; and Lei, Q. 2021. A theory of
label propagation for subpopulation shift. In International
Conference on Machine Learning (ICML), 1170–1182.
Charles, Z.; and Papailiopoulos, D. S. 2018. Stability and
generalization of learning algorithms that converge to global
optima. In International Conference on Machine Learning
(ICML), 744–753.
Chen, H. 2012. The convergence rate of a regularized rank-
ing algorithm. Journal of Approximation Theory, 164(12):
1513–1519.
Chen, H.; Wang, X.; Deng, C.; and Huang, H. 2017. Group
sparse additive machine. In Advances in Neural Information
Processing Systems (NeurIPS), 198–208.
Chen, H.; Wang, Y.; Zheng, F.; Deng, C.; and Huang, H.
2021. Sparse modal additive model. IEEE Transactions on
Neural Networks and Learning Systems, 32(6): 2373–2387.
Chen, Y.; Jin, C.; and Yu, B. 2018. Stability and con-
vergence trade-off of iterative optimization algorithms.
arXiv:1804.01619.
Cheng, D.; Gong, Y.; Zhou, S.; Wang, J.; and Zheng, N.
2016. Person re-identification by multi-channel parts-based
CNN with improved triplet loss function. In Conference on
Computer Vision and Pattern Recognition (CVPR), 1335–
1344.
Chopra, S.; Hadsell, R.; and LeCun, Y. 2005. Learning a
similarity metric discriminatively, with application to face
verification. In Conference on Computer Vision and Pattern
Recognition (CVPR), 539–546.
Cucker, F.; and Smale, S. 2001. On the mathematical foun-
dations of learning. Bulletin of the American Mathematical
Society, 39: 1–49.
Cucker, F.; and Zhou, D. X. 2007. Learning theory: An ap-
proximation theory viewpoint. Cambridge University Press.
Deng, Z.; He, H.; and Su, W. J. 2021. Toward better general-
ization bounds with locally elastic stability. In International
Conference on Machine Learning (ICML), 2590–2600.
Ding, C.; and Tao, D. 2018. Trunk-Branch ensemble convo-
lutional neural networks for video-based face recognition.
IEEE Transactions on Pattern Analysis and Machine Intelli-
gence, 40(4): 1002–1014.
Elisseeff, A.; Evgeniou, T.; and Pontil, M. 2005. Stability of
randomized learning algorithms. Journal of Machine Learn-
ing Research, 6: 55–79.
Fehrman, B. J.; Gess, B.; and Jentzen, A. 2020. Conver-
gence rates for the stochastic gradient descent method for
non-convex objective functions. Journal of Machine Learn-
ing Research, 21: 136:1–136:48.
Feldman, V.; and Vondr ́ak, J. 2018. Generalization bounds
for uniformly stable algorithms. In Advances in Neural In-
formation Processing Systems (NeurIPS), 9770–9780.
Feldman, V.; and Vondr ́ak, J. 2019. High probability gener-
alization bounds for uniformly stable algorithms with nearly
In Conference on Learning Theory (COLT),
optimal rate.
1270–1279.
Foster, D. J.; Greenberg, S.; Kale, S.; Luo, H.; Mohri, M.;
and Sridharan, K. 2019. Hypothesis set stability and gen-
eralization. In Advances in Neural Information Processing
Systems (NeurIPS), 6726–6736.
Gao, W.; and Zhou, Z. 2013. Uniform convergence, stability
and learnability for ranking problems. In International Joint
Conference on Artificial Intelligence (IJCAI), 1337–1343.
Ge, W.; Huang, W.; Dong, D.; and Scott, M. R. 2018. Deep
metric learning with hierarchical triplet loss. In European
Conference on Computer Vision (ECCV), 272–288.
Gizewski, E.; Mayer, L.; Moser, B.; Nguyen, D.;
Pereverzyev, S.; Pereverzyev, S.; Shepeleva, N.; and
Zellinger, W. 2022. On a regularization of unsupervised
domain adaptation in RKHS. Applied and Computational
Harmonic Analysis, 57: 201–227.
Hadsell, R.; Chopra, S.; and LeCun, Y. 2006. Dimensional-
ity reduction by learning an invariant mapping. In Confer-
ence on Computer Vision and Pattern Recognition (CVPR),
1735–1742.
Hardt, M.; Recht, B.; and Singer, Y. 2016. Train faster,
generalize better: Stability of stochastic gradient descent.
In International Conference on Machine Learning (ICML),
1225–1234.
Harvey, N. J. A.; Liaw, C.; Plan, Y.; and Randhawa, S. 2019.
Tight analyses for non-smooth stochastic gradient descent.
In Conference on Learning Theory (COLT), 1579–1613.
Huang, J.; Feris, R. S.; Chen, Q.; and Yan, S. 2015. Cross-
domain image retrieval with a dual attribute-aware ranking
network. In International Conference on Computer Vision
(ICCV), 1062–1070.
Jin, R.; Wang, S.; and Zhou, Y. 2009. Regularized distance
metric learning: Theory and algorithm. In Advances in Neu-
ral Information Processing Systems (NeurIPS), 862–870.
Klochkov, Y.; and Zhivotovskiy, N. 2021. Stability and de-
viation optimal risk bounds with convergence rate O(1/n).
In Advances in Neural Information Processing Systems
(NeurIPS), 5065–5076.
Kuzborskij, I.; and Lampert, C. H. 2018. Data-dependent
In International
stability of stochastic gradient descent.
Conference on Machine Learning (ICML), 2820–2829.
Lai, H.; Pan, Y.; Liu, Y.; and Yan, S. 2015. Simultaneous
feature learning and hash coding with deep neural networks.
In Conference on Computer Vision and Pattern Recognition
(CVPR), 3270–3278.
Lei, Y.; Hu, T.; and Tang, K. 2021. Generalization perfor-
mance of multi-pass stochastic gradient descent with convex
loss functions. Journal of Machine Learning Research, 22:
25:1–25:41.
Lei, Y.; Ledent, A.; and Kloft, M. 2020. Sharper general-
ization bounds for pairwise learning. In Advances in Neural
Information Processing Systems (NeurIPS), 21236–21246.
Lei, Y.; Liu, M.; and Ying, Y. 2021. Generalization guar-
antee of SGD for pairwise learning. In Advances in Neural
Information Processing Systems (NeurIPS), 21216–21228.
Lei, Y.; Yang, Z.; Yang, T.; and Ying, Y. 2021. Stability and
generalization of stochastic gradient methods for minimax
problems. In International Conference on Machine Learn-
ing (ICML), 6175–6186.
Lei, Y.; and Ying, Y. 2020. Fine-grained analysis of stability
and generalization for stochastic gradient descent. In Inter-
national Conference on Machine Learning (ICML), 5809–
5819.
Lei, Y.; and Ying, Y. 2021. Sharper generalization bounds
for learning with gradient-dominated objective functions.
In International Conference on Learning Representations
(ICLR), 1–23.
Lin, J.; Camoriano, R.; and Rosasco, L. 2016. Gener-
alization properties and implicit regularization for multi-
ple passes SGM. In International Conference on Machine
Learning (ICML), 2340–2348.
Liu, H.; Tian, Y.; Wang, Y.; Pang, L.; and Huang, T. 2016.
Deep relative distance learning: Tell the difference between
similar vehicles. In Conference on Computer Vision and Pat-
tern Recognition (CVPR), 2167–2175.
Liu, T.; Lugosi, G.; Neu, G.; and Tao, D. 2017. Algorithmic
stability and hypothesis complexity. In International Con-
ference on Machine Learning (ICML), 2159–2167.
Maurer, A. 2017. A second-order look at stability and gener-
alization. In Conference on Learning Theory (COLT), 1461–
1475.
Miller, J.; Taori, R.; Raghunathan, A.; Sagawa, S.; Koh,
P. W.; Shankar, V.; Liang, P.; Carmon, Y.; and Schmidt, L.
2021. Accuracy on the line: On the strong correlation be-
tween out-of-distribution and in-distribution generalization.
In International Conference on Machine Learning (ICML),
7721–7735.
Pitcan, Y. 2017. A note on concentration inequalities for
U-statistics. arXiv:1712.06160.
Poggio, T. A.; Rifkin, R. M.; Mukherjee, S.; and Niyogi, P.
2004. General conditions for predictivity in learning theory.
Nature, 428: 419–422.
Ramanathan, V.; Li, C.; Deng, J.; Han, W.; Li, Z.; Gu, K.;
Song, Y.; Bengio, S.; Rosenberg, C.; and Fei-Fei, L. 2015.
Learning semantic relationships for better action retrieval
in images. In Conference on Computer Vision and Pattern
Recognition (CVPR), 1100–1109.
A finite sample
Rogers, W.; and Wagner, T. 1978.
distribution-free performance bound for local discrimination
rules. The Annals of Statistics, 6: 506–514.
Rosasco, L.; Belkin, M.; and Vito, E. D. 2010. On learn-
ing with integral operators. Journal of Machine Learning
Research, 11: 905–934.
Roux, N. L.; Schmidt, M.; and Bach, F. R. 2012. A stochas-
tic gradient method with an exponential convergence rate for
finite training sets. In Advances in Neural Information Pro-
cessing Systems (NeurIPS), 2672–2680.
Schroff, F.; Kalenichenko, D.; and Philbin, J. 2015. FaceNet:
A unified embedding for face recognition and clustering.
In Conference on Computer Vision and Pattern Recognition
(CVPR), 815–823.
Schultz, M.; and Joachims, T. 2003. Learning a distance
In Advances in Neural
metric from relative comparisons.
Information Processing Systems (NeurIPS), 41–48.
Shalev-Shwartz, S.; Shamir, O.; Srebro, N.; and Sridharan,
K. 2010. Learnability, stability and uniform convergence.
Journal of Machine Learning Research, 11: 2635–2670.
Shen, W.; Yang, Z.; Ying, Y.; and Yuan, X. 2019. Stabil-
ity and optimization error of stochastic gradient descent for
pairwise learning. arXiv:1904.11316.
Shen, Z.; Liu, J.; He, Y.; Zhang, X.; Xu, R.; Yu, H.; and
Cui, P. 2021. Towards out-of-distribution generalization: A
survey. arXiv:2108.13624.
Simo-Serra, E.; Trulls, E.; Ferraz, L.; Kokkinos, I.; Fua, P.;
and Moreno-Noguer, F. 2015. Discriminative learning of
In Interna-
deep convolutional feature point descriptors.
tional Conference on Computer Vision (ICCV), 118–126.
Smale, S.; and Zhou, D.-X. 2007. Learning theory estimates
via integral operators and their approximations. Construc-
tive Approximation, 26: 153–172.
Srebro, N.; Sridharan, K.; and Tewari, A. 2010. Smoothness,
low noise and fast rates. In Advances in Neural Information
Processing Systems (NeurIPS), 2199–2207.
O(1/n2)-type of risk bounds. In Conference on Learning
Theory (COLT), 1954–1979.
Zhang, Y. 2015. Multi-task learning and algorithmic sta-
bility. In AAAI Conference on Artificial Intelligence, 3181–
3187.
Sun, T.; Li, D.; and Wang, B. 2021. Stability and general-
ization of decentralized stochastic gradient descent. In AAAI
Conference on Artificial Intelligence, 9756–9764.
Ustinova, E.; and Lempitsky, V. S. 2016. Learning deep em-
beddings with histogram Loss. In Advances in Neural Infor-
mation Processing Systems (NeurIPS), 4170–4178.
Vapnik, V. N. 1998. Statistical learning theory. Encyclope-
dia of the Sciences of Learning, 41(4): 3185–3185.
Wang, B.; Zhang, H.; Liu, P.; Shen, Z.; and Pineau, J. 2019.
Multitask metric learning: Theory and algorithm. In Inter-
national Conference on Artificial Intelligence and Statistics
(AISTATS), 3362–3371.
Wang, J.; Lan, C.; Liu, C.; Ouyang, Y.; and Qin, T. 2021.
Generalizing to unseen domains: A survey on domain gen-
eralization. In International Joint Conference on Artificial
Intelligence (IJCAI), 4627–4635.
Wang, Y.; Chen, H.; Zheng, F.; Xu, C.; Gong, T.; and Chen,
Y. 2020. Multi-task additive models for robust estimation
In Advances in Neural
and automatic structure discovery.
Information Processing Systems (NeurIPS).
Weinberger, K. Q.; Blitzer, J.; and Saul, L. K. 2005. Distance
metric learning for large margin nearest neighbor classifica-
tion. In Advances in Neural Information Processing Systems
(NeurIPS), 1473–1480.
Wohlhart, P.; and Lepetit, V. 2015. Learning descriptors for
object recognition and 3D pose estimation. In Conference on
Computer Vision and Pattern Recognition (CVPR), 3109–
3118.
Xiao, T.; Li, H.; Ouyang, W.; and Wang, X. 2016. Learning
deep feature representations with domain guided dropout for
person re-identification. In Conference on Computer Vision
and Pattern Recognition (CVPR), 1249–1258.
Xing, E. P.; Ng, A. Y.; Jordan, M. I.; and Russell, S. 2002.
Distance metric learning with application to clustering with
side-information. In Advances in Neural Information Pro-
cessing Systems (NeurIPS), 505–512.
Xing, Y.; Song, Q.; and Cheng, G. 2021. On the algorith-
mic stability of adversarial training. In Advances in Neural
Information Processing Systems (NeurIPS), 26523–26535.
Yang, Z.; Lei, Y.; Wang, P.; Yang, T.; and Ying, Y. 2021.
Simple stochastic and online gradient descent algorithms for
pairwise learning. In Advances in Neural Information Pro-
cessing Systems (NeurIPS), 20160–20171.
Ye, H.; Xie, C.; Cai, T.; Li, R.; Li, Z.; and Wang, L. 2021.
Towards a theoretical framework of out-of-distribution gen-
eralization. In Advances in Neural Information Processing
Systems (NeurIPS), 23519–23531.
Ying, Y.; and Li, P. 2012. Distance metric learning with
eigenvalue optimization. Journal of Machine Learning Re-
search, 13: 1–26.
Yu, B.; Liu, T.; Gong, M.; Ding, C.; and Tao, D. 2018. Cor-
recting the triplet selection bias for triplet loss. In European
Conference on Computer Vision (ECCV), 71–86.
Zhang, L.; Yang, T.; and Jin, R. 2017. Empirical risk min-
imization for stochastic convex optimization: O(1/n)-and
The main notations of this paper are summarized in Table 3.
A. Notations
Notations
Descriptions
SGD
RRM
ERM
SLT
Z+(Z−)
z+ = (x+, y+)
z− = (x−, y−)
Stochastic gradient descent
Regularized risk minimization
Empirical risk minimization
Statistical learning theory
the compact positive (negative) sample space associated with input space X+ (X− ) and output set Y
the random sample sampling from Z+
the random sample sampling from Z−
n+, n−
the numbers of samples sampling from Z+ and Z−, respectively
hw
w, W
S
d, d(cid:48)
(cid:96)(w)
∇(cid:96)
R, RS
T
wT
ηT
A, A(S)
γ, σ, L, α
τ
r(w)
FS(w)
w∗
R
w∗
t(y, y(cid:48))
φ
(cid:62)
(cid:16)
[*]
the training model
the parameter of training model and model parameter space, respectively
i = (x+
the training dataset defined as {z+
i=1 ∪ {z−
j = (x−
i )}n+
j , y−
i , y+
j )}n−
j=1 ∈ Z := Z n+
+ ∪ Z n−
−
the dimensions of X+(X−) and W, respectively
the triplet loss function defined as (cid:96)(w; z+, ̃z+, z−)
the gradient of (cid:96)(w; z+, ̃z+, z−) to the first argument w
the population risk and empirical risk based on training dataset S, respectively
the number of iterative steps for SGD
the model parameter derived by SGD after T -th update
the step size at the T -th update
the given algorithm and its output model parameter based on training dataset S, respectively
the parameters of stability, strong convexity, Lipschitz continuity and smoothness, respectively
the variance of triplet loss (cid:96)(w; z+, ̃z+, z−)
the regularization term
the regularized empirical risk defined as RS(w) + r(w)
the optimal model based on the expected risk, w∗
R = arg min
w∈W
R(w)
the optimal model based on the regularized empirical risk, w∗ = arg min
w∈W
FS(w)
the symbolic function, i.e., t(y, y(cid:48)) = 1 if y = y(cid:48) and −1 otherwise
the logistic function φ(u) = log(1 + exp(−u))
the transpose of a vector or a matrix
n+ (cid:16) n− if there exist positive constants c1, c2 such that c1n+ ≤ n− ≤ c2n+
[n] := {1, ..., n}
(cid:98)*(cid:99), (cid:100)*(cid:101)
(cid:98)n(cid:99): the maximum integer no larger than n, (cid:100)n(cid:101): the minimum integer no smaller than n
e
I[*]
ζ
the base of the natural logarithm
the indicator function
the margin that requires the distance of negative pairs to excess one of the positive pairs
Table 3: Summary of main notations involved in this paper.
B. Proofs of Main Results
We start with the sketching of the relations among theorems and lemmas in Figure 1, and then progress to the detailed proofs.
Figure 1: The proof diagram for Theorems 1-4.
Note that our framework is similar with Lei, Ledent, and Kloft (2020), which mainly includes three parts: stability definition,
the quantitative relationship between stability and generalization error, and the upper bound of stability parameter. Our theo-
retical results cannot be established directly from the current framework due to the complex triplet loss. To fill this theoretical
gap on the generalization guarantees of triplet learning, we develop stability analysis technique by constructing new defini-
tions of stability(see Definitions 1, 2), introducing detailed error decomposition(see Theorems 1), and considering fine-grained
sampling situations for bounding stability parameter(see proofs of Lemmas 2, 4 and Theorems 2, 4).
B.1 Proof of Theorem 1
Lemma 1 can be proved with the help of the triangular inequality and Definition 1.
Proof of Lemma 1: Recall that, S and ̄S involved in Definition 1, differ by at most a single example. To relate S with
Si,j,k = {z+
i+1, ..., z+
(also see Definition 2), we introduce the following stepping-stone sets
j+1, ..., z+
n+
1 , ..., z+
j−1, ̄z+
i−1, ̄z+
j , z+
i , z+
, z−
1 , ..., z−
k−1, ̄z−
k , z−
k+1, ..., z−
n−
}, i, j ∈ [n+], i (cid:54)= j, k ∈ [n−]
and
Si,j = {z+
1 , ..., z+
i−1, ̄z+
i , z+
i+1, ..., z+
j−1, ̄z+
j , z+
j+1, ..., z+
n+, z−
1 , ..., z−
n−
Si = {z+
1 , ..., z+
i−1, ̄z+
i , z+
i+1, ..., z+
n+, z−
1 , ..., z−
n−
}
}, ∀i, j ∈ [n+], i (cid:54)= j.
It is easy to verify that
|(cid:96)(A(S); z+, ̃z+, z−) − (cid:96)(A(Si,j,k); z+, ̃z+, z−)|
sup
z+ , ̃z+ ∈Z+ ,
z− ∈Z−
≤ sup
|(cid:96)(A(S); z+, ̃z+, z−) − (cid:96)(A(Si); z+, ̃z+, z−)| + sup
|(cid:96)(A(Si); z+, ̃z+, z−) − (cid:96)(A(Si,j); z+, ̃z+, z−)|
|(cid:96)(A(Si,j); z+, ̃z+, z−) − (cid:96)(A(Si,j,k); z+, ̃z+, z−)|
z+ , ̃z+ ∈Z+ ,
z− ∈Z−
z+ , ̃z+ ∈Z+ ,
z− ∈Z−
+ sup
z+ , ̃z+ ∈Z+ ,
z− ∈Z−
≤3γ.
(cid:3)
This completes the proof.
Now we introduce the concentration inequalities for the moment of the sum of functions of independent variables (Bousquet,
Klochkov, and Zhivotovskiy 2020), which also has been employed for stability analysis in (Lei, Ledent, and Kloft 2020; Lei,
Liu, and Ying 2021).
Lemma 7. (Bousquet, Klochkov, and Zhivotovskiy 2020) For independent random variables with zi ∈ Z, i ∈ [n], denote
S = {z1, ..., zn}, S\{zi} = {z1, ..., zi−1, zi+1, ..., zn} and functions gi : Z n → R, i ∈ [n]. Suppose that for any i ∈ [n]:
• |ES\{zi}gi(S)| ≤ M almost surely (a.s.) with M > 0,
• Ezigi(S) = 0 a.s.,
• the difference of function gi can be bounded by β, i.e., |gi(z1, ..., zn) − gi(z1, ..., zj−1, ̄zj, zj+1, ..., zn)| ≤ β, where j ∈ [n]
with i (cid:54)= j, and ̄zj ∈ Z.
Then,
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
n
(cid:88)
i=1
gi(S)
√
≤ 12
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)p
2pnβ(cid:100)log2n(cid:101) + 4M
√
pn, ∀p ≥ 2.
Lemma 8. (Bousquet, Klochkov, and Zhivotovskiy 2020) If (cid:107)Z(cid:107)p ≤
a, b ∈ R+. Then, for any δ ∈ (0, 1/e), we have
√
pa + pb, where Z is a random variable, p ≥ 2 and
|Z| ≤ e
(cid:16)
(cid:17)
a(cid:112)log(e/δ) + blog(e/δ)
with probability at least 1 − δ, where e denotes the base of the natural logarithm.
The proof of Theorem 1 is obtained by integrating Lemmas 1, 7, 8 with the fine-grained error decomposition.
Proof of Theorem 1: According to the definitions of RS(A(S)) and R(A(S)), we know
|R(A(S)) − RS(A(S))| =
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
Ez+, ̃z+,z− (cid:96)(A(S); z+, ̃z+, z−) −
1
n+(n+ − 1)n−
(cid:88)
i,j∈[n+ ],i(cid:54)=j,
k∈[n−]
For convenience, we multiply this equation by n+(n+ − 1)n− and then decompose it as follows
(cid:96)(A(S); z+
i , z+
(cid:12)
(cid:12)
j , z−
(cid:12)
k )
(cid:12)
(cid:12)
.
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
=
=
≤
(cid:88)
i,j∈[n+ ],i(cid:54)=j,
k∈[n−]
(cid:88)
i,j∈[n+ ],i(cid:54)=j,
k∈[n−]
n+(n+ − 1)n−Ez+, ̃z+,z− (cid:96)(A(S); z+, ̃z+, z−) −
(cid:88)
i,j∈[n+ ],i(cid:54)=j,
k∈[n−]
(cid:96)(A(S); z+
i , z+
(cid:12)
(cid:12)
j , z−
(cid:12)
k )
(cid:12)
(cid:12)
(cid:104)
Ez+, ̃z+,z− (cid:96)(A(S); z+, ̃z+, z−) − (cid:96)(A(S); z+
i , z+
(cid:12)
(cid:12)
(cid:105)
j , z−
(cid:12)
k )
(cid:12)
(cid:12)
(cid:104)
Ez+, ̃z+,z− (cid:96)(A(S); z+, ̃z+, z−) − E
i , ̄z+
̄z+
j , ̄z−
k
(cid:88)
Ez+, ̃z+,z−
i,j∈[n+ ],i(cid:54)=j,
k∈[n−]
(cid:104)
(cid:96)(A(S); z+, ̃z+, z−) − E
i , ̄z+
̄z+
j , ̄z−
k
(cid:96)(A(S); z+
i , z+
j , z−
k )
(cid:12)
(cid:12)
(cid:105)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:105)
(cid:96)(A(Si,j,k); z+, ̃z+, z−)
(cid:12)
(cid:12)
(cid:12)
+
+
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:88)
i,j∈[n+],i(cid:54)=j,
k∈[n− ]
(cid:88)
i,j∈[n+ ],i(cid:54)=j,
k∈[n− ]
(cid:104)
E
i , ̄z+
̄z+
j , ̄z−
k
Ez+, ̃z+,z−(cid:96)(A(Si,j,k); z+, ̃z+, z−) − (cid:96)(A(Si,j,k); z+
i , z+
(cid:12)
(cid:12)
(cid:105)
j , z−
(cid:12)
k )
(cid:12)
(cid:12)
E
i , ̄z+
̄z+
j , ̄z−
k
[(cid:96)(A(Si,j,k); z+
i , z+
j , z−
k ) − (cid:96)(A(S); z+
i , z+
j , z−
(cid:12)
(cid:12)
(cid:12)
k )]
(cid:12)
(cid:12)
,
where the definition of Si,j,k is given in Definition 2 (also see the proof of Lemma 1).
Now we try to bound the three parts of the above decomposition. For the first and third parts, according to Lemma 1, we
deduce that
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:88)
Ez+, ̃z+,z−
(cid:104)
i,j∈[n+],i(cid:54)=j,
k∈[n− ]
(cid:96)(A(S); z+, ̃z+, z−) − E
i , ̄z+
̄z+
j , ̄z−
k
(cid:96)(A(Si,j,k); z+, ̃z+, z−)
(cid:12)
(cid:12)
(cid:105)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
n+(n+ − 1)n−
(cid:12)
(cid:12)
≤
sup
z+ , ̃z+ ∈Z+ ,
z−∈Z−
≤3n+(n+ − 1)n−γ
(cid:104)
(cid:96)(A(S); z+, ̃z+, z−) − E
i , ̄z+
̄z+
j , ̄z−
k
(cid:105)
(cid:96)(A(Si,j,k); z+, ̃z+, z−)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
and
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤
(cid:88)
i,j∈[n+ ],i(cid:54)=j,
k∈[n− ]
E
i , ̄z+
̄z+
j , ̄z−
k
[(cid:96)(A(Si,j,k); z+
i , z+
j , z−
k ) − (cid:96)(A(S); z+
i , z+
j , z−
(cid:12)
(cid:12)
(cid:12)
k )]
(cid:12)
(cid:12)
n+(n+ − 1)n−
+
̄z
i
sup
+
, ̄z
j
−
∈Z−
k
̄z
∈Z+ ,
(cid:0)(cid:96)(A(Si,j,k); z+
i , z+
j , z−
k ) − (cid:96)(A(S); z+
i , z+
j , z−
k )(cid:1)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
Turn to the bound of the second part, let
≤3n+(n+ − 1)n−γ.
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:88)
i,j∈[n+ ],i(cid:54)=j,
k∈[n−]
where
E
i , ̄z+
̄z+
j , ̄z−
k
(cid:104)
Ez+, ̃z+,z− (cid:96)(A(Si,j,k); z+, ̃z+, z−) − (cid:96)(A(Si,j,k); z+
i , z+
(cid:105)
j , z−
k )
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
=
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:88)
gi,j,k(S)
i,j∈[n+ ],i(cid:54)=j,
k∈[n− ]
(cid:12)
(cid:12)
(cid:12)
,
(cid:12)
(cid:12)
(cid:104)
gi,j,k(S) =E
i , ̄z+
̄z+
j , ̄z−
k
=E
i , ̄z+
̄z+
j , ̄z−
k
Ez+, ̃z+,z− (cid:96)(A(Si,j,k); z+, ̃z+, z−) − (cid:96)(A(Si,j,k); z+
(cid:104)
Ez+, ̃z+,z− (cid:96)(A(Si,j,k); z+, ̃z+, z−) − Ez+, ̃z+(cid:96)(A(Si,j,k); z+, ̃z+, z−
k )
i , z+
(cid:105)
j , z−
k )
+ Ez+, ̃z+(cid:96)(A(Si,j,k); z+, ̃z+, z−
k ) − (cid:96)(A(Si,j,k); z+
i , z+
(cid:105)
j , z−
k )
=E
k
j , ̄z−
̄z+
i , ̄z+
+ Ez+, ̃z+(cid:96)(A(Si,j,k); z+, ̃z+, z−
+ Ez+(cid:96)(A(Si,j,k); z+, z+
(cid:104)
Ez+, ̃z+,z− (cid:96)(A(Si,j,k); z+, ̃z+, z−) − Ez+, ̃z+(cid:96)(A(Si,j,k); z+, ̃z+, z−
k )
k ) − Ez+(cid:96)(A(Si,j,k); z+, z+
j , z−
k )
(cid:105)
j , z−
k )
k ) − (cid:96)(A(Si,j,k); z+
i , z+
:=g(i,j)
k
(S) + g(i,k)
j
j , z−
(S) + g(j,k)
i
(S)
with
g(i,j)
k
(S) := E
i , ̄z+
̄z+
(S) := E
g(i,k)
j
g(j,k)
i
j , ̄z−
k
(cid:104)
(cid:105)
(cid:104)
Ez+, ̃z+,z− (cid:96)(A(Si,j,k); z+, ̃z+, z−) − Ez+, ̃z+(cid:96)(A(Si,j,k); z+, ̃z+, z−
k )
(cid:105)
j , z−
k )
(cid:105)
j , z−
k )
k ) − Ez+(cid:96)(A(Si,j,k); z+, z+
Ez+, ̃z+(cid:96)(A(Si,j,k); z+, ̃z+, z−
Ez+(cid:96)(A(Si,j,k); z+, z+
k ) − (cid:96)(A(Si,j,k); z+
i , z+
(cid:104)
j , ̄z−
i , ̄z+
̄z+
(S) := E
k
,
,
.
i , ̄z+
̄z+
j , ̄z−
k
j , z−
, ..., g(i,j)
For any fixed i, j ∈ [n+], i (cid:54)= j, and consider n− random functions g(i,j)
1
n− . In terms of |ES(cid:96)(A(S); z+, ̃z+, z−)| ≤
M, ∀z+, ̃z+ ∈ Z+, z− ∈ Z−, we know
|E
S\{z−
k }g(i,j)
k
(S)| =
S\{z−
k }
(cid:34)
E
i , ̄z+
̄z+
j , ̄z−
k
(cid:104)
Ez+, ̃z+,z− (cid:96)(A(Si,j,k); z+, ̃z+, z−) − Ez+, ̃z+(cid:96)(A(Si,j,k); z+, ̃z+, z−
k )
(cid:35)(cid:12)
(cid:12)
(cid:105)
(cid:12)
(cid:12)
(cid:12)
(cid:34)
ESi,j,k
(cid:104)
Ez+, ̃z+,z− (cid:96)(A(Si,j,k); z+, ̃z+, z−) − Ez+, ̃z+(cid:96)(A(Si,j,k); z+, ̃z+, z−
k )
(cid:35)(cid:12)
(cid:12)
(cid:105)
(cid:12)
(cid:12)
(cid:12)
i ,z+
z+
j
Since z−
k is independent of Si,j,k, we have
|E
z−
k
g(i,j)
k
(S)| =
(cid:34)
E
i , ̄z+
̄z+
j , ̄z−
k
(cid:104)
Ez+, ̃z+,z− (cid:96)(A(Si,j,k); z+, ̃z+, z−) − Ez+, ̃z+(cid:96)(A(Si,j,k); z+, ̃z+, z−
k )
z−
k
i , ̄z+
̄z+
j , ̄z−
k
i , ̄z+
̄z+
j , ̄z−
k
(cid:34)
E
z−
k
(cid:104)
Ez+, ̃z+,z− (cid:96)(A(Si,j,k); z+, ̃z+, z−) − Ez+, ̃z+(cid:96)(A(Si,j,k); z+, ̃z+, z−
k )
(cid:104)
Ez+, ̃z+,z−(cid:96)(A(Si,j,k); z+, ̃z+, z−) − E
z+, ̃z+,z−
k
(cid:105)
(cid:96)(A(Si,j,k); z+, ̃z+, z−
k )
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:35)(cid:12)
(cid:12)
(cid:105)
(cid:12)
(cid:12)
(cid:12)
(cid:35)(cid:12)
(cid:12)
(cid:105)
(cid:12)
(cid:12)
(cid:12)
E
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤ 2M.
=
E
E
=
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
E
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
E
(cid:12)
(cid:12)
(cid:12)
= 0.
=
For any m ∈ [n−] and ̄z−
|g(i,j)
k
(cid:12)
(cid:12)
E
(cid:12)
(cid:12)
(cid:12)
=
i , ̄z+
̄z+
j , ̄z−
k
m ∈ Z−, we can easily check that
(S) − g(i,j)
k
(S(m))|
(cid:104)
(cid:105)
Ez+, ̃z+,z−(cid:96)(A(Si,j,k); z+, ̃z+, z−) − Ez+, ̃z+(cid:96)(A(Si,j,k); z+, ̃z+, z−
k )
(cid:104)
Ez+, ̃z+,z− (cid:96)(A(S(m)
i,j,k); z+, ̃z+, z−) − Ez+, ̃z+(cid:96)(A(S(m)
(cid:12)
(cid:12)
(cid:105)
i,j,k); z+, ̃z+, z−
(cid:12)
k )
(cid:12)
(cid:12)
− E
i , ̄z+
̄z+
j , ̄z−
k
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤
(cid:104)
E
i , ̄z+
̄z+
j , ̄z−
k
Ez+, ̃z+,z− [(cid:96)(A(Si,j,k); z+, ̃z+, z−) − (cid:96)(A(S(m)
E
+
j , ̄z−
i , ̄z+
̄z+
(cid:104)
Ez+, ̃z+[(cid:96)(A(Si,j,k); z+, ̃z+, z−
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤2γ,
i,j,k are respect to S and Si,j,k after replacing z−
k
k ) − (cid:96)(A(S(m)
(cid:12)
(cid:12)
(cid:105)
i,j,k); z+, ̃z+, z−)]
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
i,j,k); z+, ̃z+, z−
(cid:105)
k )]
where S(m) and S(m)
g(i,j)
, ..., g(i,j)
1
i, j ∈ [n+], i (cid:54)= j, we get
m, respectively. Therefore, we prove that, for
n− , all the assumptions of Lemma 7 hold with n replaced by n− and β = 2γ. Based on Lemma 7, for any
m with ̄z−
(cid:88)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
k∈[n−]
g(i,j)
k
(S)
√
≤ 24
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)p
(cid:12)
2pn−γ(cid:100)log2n−(cid:101) + 8M
√
pn−.
(S)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)p
(cid:12)
√
≤ 24
2p(n+ − 1)γ(cid:100)log2(n+ − 1)(cid:101) + 8M (cid:112)p(n+ − 1),
∀i ∈ [n+], k ∈ [n−]
Similarly, we also have
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:88)
g(i,k)
j
j∈[n+],i(cid:54)=j
and
(cid:88)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
i∈[n+],i(cid:54)=j
g(j,k)
i
(cid:12)
(cid:12)
(S)
(cid:12)
(cid:12)
(cid:12)
(cid:12)p
√
≤ 24
2p(n+ − 1)γ(cid:100)log2(n+ − 1)(cid:101) + 8M (cid:112)p(n+ − 1),
∀j ∈ [n+], k ∈ [n−].
Then, by direct computation, we derive that
(cid:88)
gi,j,k(S)
i,j∈[n+ ],i(cid:54)=j,
k∈[n− ]
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)p
(cid:12)
=
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:88)
(cid:16)
i,j∈[n+ ],i(cid:54)=j,
k∈[n− ]
g(i,j)
k
(S) + g(i,k)
j
(S) + g(j,k)
i
(S)
(cid:12)
(cid:12)
(cid:17)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)p
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)p
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)p
+
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:88)
g(i,k)
j
(S)
i,j∈[n+ ],i(cid:54)=j,
k∈[n−]
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)p
+
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
g(i,j)
k
(S)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)p
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:88)
+
i∈[n+ ],
k∈[n−]
(cid:88)
g(i,k)
j
j∈[n+],i(cid:54)=j
i,j∈[n+ ],i(cid:54)=j,
k∈[n−]
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)p
(cid:12)
(cid:12)
(cid:12)
(S)
(cid:12)
(cid:12)
+
(cid:88)
j∈[n+ ],
k∈[n− ]
(cid:88)
g(j,k)
i
(S)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:88)
g(j,k)
i
i∈[n+],i(cid:54)=j
(cid:12)
(cid:12)
(cid:12)
(S)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)p
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤
(cid:88)
g(i,j)
k
(S)
i,j∈[n+ ],i(cid:54)=j,
k∈[n− ]
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:88)
(cid:88)
k∈[n−]
i,j∈[n+ ],
i(cid:54)=j
√
√
≤24
2pn+(n+ − 1)n−γ(cid:100)log2n−(cid:101) + 8M n+(n+ − 1)
+ (cid:0)24
√
2pn+(n+ − 1)n−γ(cid:100)log2(n+ − 1)(cid:101) + 8M n+n−
(cid:112)p(n+ − 1)(cid:1) × 2
(cid:0)(n+ − 1)
2pn+(n+ − 1)n−γ[(cid:100)log2n−(cid:101) + 2(cid:100)log2(n+ − 1)(cid:101)] + 8M n+
(cid:16)
√
(cid:16)
(cid:17)
√
(cid:0)n−(n+ − 1)2(cid:1)(cid:101) + 2
+ 8M n+
p
(n+ − 1)
2pn+(n+ − 1)n−γ
(cid:100)log2
=24
√
≤24
√
pn−
pn− + 2n−
√
n− + 2n−
(cid:112)p(n+ − 1)(cid:1)
(cid:17)
(cid:112)n+ − 1
,
where the first and second inequalities are built with the subadditivity of (cid:107) * (cid:107)p. Hence, according to Lemma 8, the third error
term
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:88)
i,j∈[n+ ],i(cid:54)=j,
k∈[n− ]
(cid:12)
(cid:12)
(cid:12)
gi,j,k(S)
(cid:12)
(cid:12)
(cid:32)
≤e
8M n+
(cid:16)
√
(n+ − 1)
n− + 2n−
(cid:112)n+ − 1
(cid:17)(cid:112)log(e/δ)
The desired result follows by combining the estimations of the three error terms.
(cid:3)
√
+ 24
2n+(n+ − 1)n−γ
(cid:16)
(cid:100)log2
(cid:0)n−(n+ − 1)2(cid:1)(cid:101) + 2
(cid:17)
(cid:33)
.
log(e/δ)
B.2 Proof of Theorem 2
Following the analysis in (Hardt, Recht, and Singer 2016), we can verify the following property for the gradient update.
Lemma 9. Assume that the loss function w → (cid:96)(w; z+, ̃z+, z−) is convex and α-smooth, where z+, ̃z+ ∈ Z+, z− ∈ Z−.
Then, for any η ≤ 2/α, the optimization process of SGD is 1-expansive, that is
(cid:107)w − η∇(cid:96)(w; z+, ̃z+, z−) − w(cid:48) + η∇(cid:96)(w(cid:48); z+, ̃z+, z−)(cid:107) ≤ (cid:107)w − w(cid:48)(cid:107).
Proof of Lemma 2: Assume S and S(cid:48) are two datasets that differ only by the last example among the former n+ samples. If
it, jt ∈ [n+ − 1], it (cid:54)= jt and kt ∈ [n−], according to (3) and Lemma 9, we know that
(cid:107)wt+1 − w(cid:48)
t+1(cid:107) = (cid:107)wt − ηt∇(cid:96)(wt; z+
it
= (cid:107)wt − ηt∇(cid:96)(wt; z+
it
≤ (cid:107)wt − w(cid:48)
t(cid:107).
, z+
jt
, z+
jt
, z−
kt
, z−
kt
) − w(cid:48)
) − w(cid:48)
t + ηt∇(cid:96)(w(cid:48)
t + ηt∇(cid:96)(w(cid:48)
t; ̄z+
it
t; z+
it
, ̄z+
jt
, z+
jt
, ̄z−
kt
, z−
kt
)(cid:107)
)(cid:107)
If it = n+ or jt = n+, it (cid:54)= jt, kt ∈ [n−], we get that
(cid:107)wt+1 − w(cid:48)
t+1(cid:107) = (cid:107)wt − ηt∇(cid:96)(wt; z+
, z−
it
kt
t(cid:107) + (cid:107)ηt∇(cid:96)(wt; ̄z+
it
t(cid:107) + 2ηtL.
≤ (cid:107)wt − w(cid:48)
≤ (cid:107)wt − w(cid:48)
, z+
jt
) − w(cid:48)
, ̄z−
, ̄z+
jt
kt
t + ηt∇(cid:96)(w(cid:48)
t; ̄z+
, ̄z+
jt
it
, z+
t; z+
) − ηt∇(cid:96)(w(cid:48)
jt
it
, ̄z−
)(cid:107)
kt
, z−
kt
)(cid:107)
Assume S and S(cid:48) are two datasets that differ only by the last example among the later n− samples. If it, jt ∈ [n+], it (cid:54)= jt and
kt ∈ [n− − 1], we have
(cid:107)wt+1 − w(cid:48)
t+1(cid:107) = (cid:107)wt − ηt∇(cid:96)(wt; z+
it
= (cid:107)wt − ηt∇(cid:96)(wt; z+
it
≤ (cid:107)wt − w(cid:48)
t(cid:107).
, z+
jt
, z+
jt
, z−
kt
, z−
kt
) − w(cid:48)
) − w(cid:48)
t + ηt∇(cid:96)(w(cid:48)
t + ηt∇(cid:96)(w(cid:48)
t; ̄z+
it
t; z+
it
, ̄z+
jt
, z+
jt
, ̄z−
kt
, z−
kt
)(cid:107)
)(cid:107)
Similarly, for it, jt ∈ [n+], it (cid:54)= jt and kt = n−, there holds
(cid:107)wt+1 − w(cid:48)
, z−
t+1(cid:107) = (cid:107)wt − ηt∇(cid:96)(wt; z+
it
kt
t(cid:107) + (cid:107)ηt∇(cid:96)(wt; z+
it
t(cid:107) + 2ηtL.
≤ (cid:107)wt − w(cid:48)
≤ (cid:107)wt − w(cid:48)
, z+
jt
As a combination of the above four cases, we derive that
(cid:107)wt+1 − w(cid:48)
≤(cid:107)wt − w(cid:48)
t+1(cid:107)
(cid:104)
t(cid:107) + 2ηtLI
(it = n+ or jt = n+, it (cid:54)= jt, kt ∈ [n−], z+
n+
) − w(cid:48)
, ̄z−
, z+
jt
kt
t + ηt∇(cid:96)(w(cid:48)
, z+
t; z+
jt
it
, z+
t; z+
) − ηt∇(cid:96)(w(cid:48)
jt
it
, ̄z−
)(cid:107)
kt
, z−
kt
)(cid:107)
(cid:54)= ̄z+
n+
) or (it, jt ∈ [n+], it (cid:54)= jt, kt = n−, z−
n−
(cid:54)= ̄z−
n−
(cid:105)
)
≤2L
t
(cid:88)
l=1
ηlI
(cid:104)
(il = n+ or jl = n+, il (cid:54)= jl, kl ∈ [n−], z+
n+
(cid:54)= ̄z+
n+
) or (il, jl ∈ [n+], il (cid:54)= jl, kl = n−, z−
n−
(cid:54)= ̄z−
n−
(cid:105)
)
.
Finally, according to the L-Lipschitz of the loss function (cid:96)(w; z+, ̃z+, z−), we deduce that
|(cid:96)(wt+1; z+, ̃z+, z−) − (cid:96)(w(cid:48)
t+1; z+, ̃z+, z−)|
≤ sup
z+ , ̃z+ ∈Z+ ,
z−∈Z−
|(cid:96)(wt+1; z+, ̃z+, z−) − (cid:96)(w(cid:48)
t+1; z+, ̃z+, z−)| ≤ L(cid:107)wt+1 − w(cid:48)
t+1(cid:107)
≤2L2
t
(cid:88)
l=1
ηlI
(cid:104)
(il = n+ or jl = n+, il (cid:54)= jl, kl ∈ [n−], z+
n+
(cid:54)= ̄z+
n+
) or (il, jl ∈ [n+], il (cid:54)= jl, kl = n−, z−
n−
(cid:54)= ̄z−
n−
(cid:105)
)
.
(cid:3)
This completes the desired result.
Lemma 2 implies that the difference between two model sequences will not increase with the number of iteration under
proper conditions. Usually, a sufficiently small iteration step size also plays an important role on further limiting its change and
guaranteeing the stability.
The Chernoff's bound described as below is used in our proof.
Lemma 10. (Boucheron, Lugosi, and Massart 2013) Let X =
T
(cid:80)
t=1
Xt and μ = EX, where X1, ..., XT be independent Bernoulli
random variables. Then, for any δ ∈ (0, 1),
X ≤ (1 + (cid:112)3log(1/δ)/μ)μ
with probability at least 1 − δ.
Proof of Theorem 2: Lemma 2 assures that SGD with t-iterations is γ-uniformly stable with
γ ≤ 2L2
(cid:104)
ηlI
t
(cid:88)
l=1
(il = n+ or jl = n+, il (cid:54)= jl, kl ∈ [n−], z+
n+
(cid:54)= ̄z+
n+
) or (il, jl ∈ [n+], il (cid:54)= jl, kl = n−, z−
n−
(cid:54)= ̄z−
n−
(cid:105)
)
.
Let A(S) = wT . From Theorem 1, we know the following inequality holds with probability 1 − δ
|RS(wT ) − R(wT )| ≤ 6γ + e
8M (
(cid:32)
1
√
n−
+
√
2
n+ − 1
)(cid:112)log(e/δ) + 24
√
(cid:16)
2γ
(cid:100)log2
(cid:0)n−(n+ − 1)2(cid:1)(cid:101) + 2
(cid:17)
(cid:33)
.
log(e/δ)
Thus,
|RS(wT ) − R(wT )| = O
(cid:32)
(cid:16)
(cid:100)log(cid:0)n−(n+ − 1)2(cid:1)(cid:101) + 2
(cid:17)
log(1/δ)
(cid:104)
ηI
T
(cid:88)
t=1
(it = n+ or jt = n+, it (cid:54)= jt, kt ∈ [n−], z+
n+
(cid:54)= ̄z+
n+
)
or (it, jt ∈ [n+], it (cid:54)= jt, kt = n−, z−
n−
(cid:54)= ̄z−
n−
(cid:105)
)
+
(cid:16) 1
√
n−
+
√
2
n+ − 1
(cid:33)
(cid:17)(cid:112)log(1/δ)
,
where η = ηt ≡ c/
√
T , c ≤ 2/α.
Let
Xt = I
(cid:104)
(it = n+ or jt = n+, it (cid:54)= jt, kt ∈ [n−], z+
n+
(cid:54)= ̄z+
n+
) or (it, jt ∈ [n+], it (cid:54)= jt, kt = n−, z−
n−
(cid:54)= ̄z−
n−
(cid:105)
)
(8)
and μ =
T
(cid:80)
t=1
EXt. It is easy to verify that
EXt = Prob
(cid:104)
(cid:110)
I
(it = n+ or jt = n+, it (cid:54)= jt, kt ∈ [n−], z+
n+
(cid:110)
≤ Prob
it = n+ or jt = n+, it (cid:54)= jt, kt ∈ [n−], z+
n+
(cid:54)= ̄z+
n+
+ Prob
(cid:54)= ̄z+
n+
(cid:111)
) or (it, jt ∈ [n+], it (cid:54)= jt, kt = n−, z−
n−
(cid:54)= ̄z−
n−
)
(cid:105)(cid:111)
(cid:110)
it, jt ∈ [n+], it (cid:54)= jt, kt = n−, z−
n−
(cid:111)
(cid:54)= ̄z−
n−
=
1
n+
+
1
2n−
.
Meanwhile,
and
that is,
It follows that
Applying Lemma 10 with
EXt ≥ Prob
it = n+ or jt = n+, it (cid:54)= jt, kt ∈ [n−], z+
n+
(cid:110)
(cid:111)
(cid:54)= ̄z+
n+
EXt ≥ Prob
it, jt ∈ [n+], it (cid:54)= jt, kt = n−, z−
n−
(cid:110)
(cid:54)= ̄z−
n−
(cid:111)
,
EXt ≥ max
(cid:110) 1
n+
,
1
2n−
(cid:111)
.
max
(cid:110) T
n+
(cid:111)
,
T
2n−
≤ μ =
T
(cid:88)
t=1
EXt ≤
T
n+
+
T
2n−
.
(cid:104)
Xt = I
we have
(it = n+ or jt = n+, it (cid:54)= jt, kt ∈ [n−], z+
n+
(cid:54)= ̄z+
n+
) or (it, jt ∈ [n+], it (cid:54)= jt, kt = n−, z−
n−
(cid:54)= ̄z−
n−
X =
T
(cid:88)
t=1
(cid:32)
Xt ≤
1 +
(cid:114) 3
μ
(cid:33)
(cid:32)
(cid:115)
log(1/δ)
μ ≤
1 +
3log(1/δ)
, T
2n−
max{ T
n+
}
(cid:33)
(cid:16) T
n+
+
(cid:17)
T
2n−
(cid:105)
)
,
(9)
with probability 1 − δ. Combining (8) and (9), with probability 1 − δ, we have
|RS(wT ) − R(wT )|
(cid:32)
(cid:16)
=O
(cid:100)log(cid:0)n−(n+ − 1)2(cid:1)(cid:101) + 2
(cid:17)
log(1/δ)
T
(cid:88)
t=1
ηI
(cid:104)
(it = n+ or jt = n+, it (cid:54)= jt, kt ∈ [n−], z+
n+
(cid:54)= ̄z+
n+
)
or (it, jt ∈ [n+], it (cid:54)= jt, kt = n−, z−
n−
(cid:54)= ̄z−
n−
(cid:105)
)
+
(cid:16) 1
√
n−
+
√
2
n+ − 1
(cid:33)
(cid:17)(cid:112)log(1/δ)
(cid:32)
(cid:16)
(cid:32)
(cid:16)
=O
≤O
(cid:100)log(cid:0)n−(n+ − 1)2(cid:1)(cid:101) + 2
(cid:100)log(cid:0)n−(n+ − 1)2(cid:1)(cid:101) + 2
(cid:17)
(cid:17)
log(1/δ)η
T
(cid:88)
t=1
Xt +
(cid:16) 1
√
n−
+
√
2
n+ − 1
(cid:33)
(cid:17)(cid:112)log(1/δ)
log(1/δ)η
(cid:115)
(cid:16)
1 +
3log(1/δ)
, T
2n−
max{ T
n+
(cid:17)(cid:16) T
n+
}
+
(cid:17)
T
2n−
+
(cid:16) 1
√
n−
+
√
2
n+ − 1
(cid:33)
(cid:17)(cid:112)log(1/δ)
(cid:32)
(cid:16)
=O
(cid:100)log(cid:0)n−(n+ − 1)2(cid:1)(cid:101) + 2
(cid:17)
log(1/δ)
(cid:16)
1 +
+
(cid:16) 1
√
n−
+
√
1
n+ − 1
(cid:33)
(cid:17)(cid:112)log(1/δ)
.
(cid:115)
log(1/δ)
, T
n−
max{ T
n+
}
(cid:17)(cid:16)
√
T
n+
(cid:17)
√
T
n−
+
This proves the desired statement.
(cid:3)
Proof of Lemma 3: Because the triplet learning involves two different sample spaces, some related works (Lei, Ledent, and
Kloft 2020; Pitcan 2017) can not be used here directly. Fortunately, by detailed decomposition, we have
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤
≤
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤
1
n+(n+ − 1)n−
2
n+(n+ − 1)n−
(cid:88)
i,j∈[n+ ],i(cid:54)=j,
k∈[n− ]
(cid:88)
i,j∈[n+ ],i(cid:54)=j,
k∈[n− ]
(cid:96)(w∗; z+
i , z+
j , z−
k ) − Ez+, ̃z+,z− (cid:96)(w∗; z+, ̃z+, z−)
(cid:96)(w∗; z+
i , z+
j , z−
(cid:12)
(cid:12)
k ) − 2Ez+, ̃z+,z−(cid:96)(w∗; z+, ̃z+, z−)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
1
n+(n+ − 1)n−
(cid:88)
(cid:88)
k∈[n−]
i,j∈[n+],i(cid:54)=j
(cid:96)(w∗; z+
i , z+
j , z−
k ) − Ez−Ez+, ̃z+(cid:96)(w∗; z+, ̃z+, z−)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
+
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
1
n+(n+ − 1)n−
(cid:88)
(cid:88)
i,j∈[n+],i(cid:54)=j
k∈[n−]
(cid:96)(w∗; z+
i , z+
j , z−
(cid:12)
(cid:12)
k ) − Ez+, ̃z+Ez− (cid:96)(w∗; z+, ̃z+, z−)
(cid:12)
(cid:12)
(cid:12)
(cid:32)
1
n+(n+ − 1)
(cid:88)
i,j∈[n+],i(cid:54)=j
(cid:96)(w∗; z+
i , z+
j ) − Ez+, ̃z+(cid:96)(w∗; z+, ̃z+)
(cid:33)(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
sup
k∈[n−]
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
+
sup
i,j∈[n+],i(cid:54)=j
(cid:32)
1
n−
(cid:88)
k∈[n−]
(cid:96)(w∗; z−
k ) − Ez− (cid:96)(w∗; z−)
(cid:33)(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:115)
≤
2blog(1/δ)
3(cid:98)n+/2(cid:99)
+
2τ log(1/δ)
(cid:98)n+/2(cid:99)
+
2blog(1/δ)
3(cid:98)n−(cid:99)
+
(cid:115)
2τ log(1/δ)
(cid:98)n−(cid:99)
,
where the second inequality follows from triangular inequality and and the last inequality is derived by combining Lemma B.3
(Lei, Ledent, and Kloft 2020) and Theorem 2.4 (Pitcan 2017).
This completes the proof.
B.3 Proof of Theorem 3 and Supplement to Remark 5
Proof of Lemma 4: Let
Sm = {z+
1 , ..., z+
m−1, ̄z+
m, z+
m+1, ..., z+
n+, z−
1 , ..., z−
n−
} or {z+
1 , ..., z+
n+, z−
1 , ..., z−
m−1, ̄z−
m, z−
m+1, ..., z−
n−
}.
(cid:3)
Due to the generality of m, we can firstly assume Sm = Sn+ = {z+
of FSn+
(w), we know
1 , ..., z+
n+−1, ̄z+
n+
, z−
1 , ..., z−
n−
}. Since A(Sn+) is a minimizer
FS(A(Sn+)) − FS(A(S)) = FS(A(Sn+)) − FSn+
≤ FS(A(Sn+)) − FSn+
, we further get
By the definitions of FS and FSn+
(A(Sn+)) + FSn+
(A(Sn+)) + FSn+
(A(Sn+)) − FSn+
(A(S)) − FS(A(S)).
(A(S)) + FSn+
(A(S)) − FS(A(S))
n+(n+ − 1)n−
(cid:16)
FS(A(Sn+)) − FSn+
(cid:17)
(A(Sn+))
(cid:32)
(cid:88)
(cid:88)
=
i,j∈[n+ ],i(cid:54)=j,
k∈[n− ]
(cid:88)
+
f (A(Sn+); z+
i , z+
j , z−
k ) −
i,j∈[n+−1],i(cid:54)=j,
k∈[n− ]
(cid:33)
f (A(Sn+); ̄z+
n+
, z+
j , z−
k )
f (A(Sn+); z+
i , z+
j , z−
k ) +
f (A(Sn+); z+
i , ̄z+
n+
, z−
k )
(cid:88)
i∈[n+−1],
k∈[n− ]
j∈[n+−1],
k∈[n− ]
(cid:16)
(cid:88)
f (A(Sn+); z+
i , z+
n+
=
, z−
k ) + f (A(Sn+); z+
n+
, z+
i , z−
k ) − f (A(Sn+); z+
i , ̄z+
n+
, z−
k ) − f (A(Sn+ ); ̄z+
n+
, z+
(cid:17)
i , z−
k )
,
i∈[n+−1],
k∈[n− ]
where
Similarly,
f (w; z+, ̃z+, z−) = (cid:96)(w; z+, ̃z+, z−) + r(w).
n+(n+ − 1)n−
(cid:16)
FSn+
(A(S)) − FS(A(S))
(cid:17)
(cid:88)
(cid:16)
=
i∈[n+−1],
k∈[n− ]
f (A(S); z+
i , ̄z+
n+
, z−
k ) + f (A(S); ̄z+
n+
, z+
i , z−
k ) − f (A(S); z+
i , z+
n+
, z−
k ) − f (A(S); z+
n+
, z+
i , z−
k )
(cid:17)
.
Based on the above quantitative relations, we get
FS(A(Sn+)) − FS(A(S)) ≤
1
n+(n+ − 1)n−
(cid:88)
(cid:16)(cid:0)(cid:96)(A(Sn+); z+
i , z+
n+
i∈[n+−1],
k∈[n− ]
, z−
k ) − (cid:96)(A(S); z+
i , z+
n+
, z−
k )(cid:1)
+ (cid:0)(cid:96)(A(Sn+); z+
n+
+ (cid:0)(cid:96)(A(S); z+
i , ̄z+
n+
+ (cid:0)(cid:96)(A(S); ̄z+
i , z−
, z+
n+
i , z−
, z+
, z+
k ) − (cid:96)(A(S); z+
n+
k ) − (cid:96)(A(Sn+); z+
, z−
i , ̄z+
n+
i , z−
, z+
k ) − (cid:96)(A(Sn+); ̄z+
n+
k )(cid:1)
i , z−
k )(cid:1)
, z−
k )(cid:1)(cid:17)
.
With the same analysis as above, we also can obtain that
FS(A(Sn− )) − FS(A(S)) ≤
1
n+(n+ − 1)n−
(cid:88)
i,j∈[n+],i(cid:54)=j
(cid:16)(cid:0)(cid:96)(A(Sn− ); z+
i , z+
j , z−
n−
) − (cid:96)(A(S); z+
i , z+
j , z−
n−
)(cid:1)
when Sm = Sn− = {z+
1 , ..., z+
n+
Moreover, for A(S) = arg min
w∈W
, z−
1 , ..., z−
FS(w),
n−−1, ̄z−
n−
+ (cid:0)(cid:96)(A(S); z+
i , z+
j , ̄z−
n−
) − (cid:96)(A(Sn− ); z+
i , z+
j , ̄z−
n−
)(cid:1)(cid:17)
}.
FS(A(Sm)) − FS(A(S)) ≤
1
n+(n+ − 1)n−
(cid:88)
i∈[n+ ],i(cid:54)=m,
k∈[n− ]
(cid:16)(cid:0)(cid:96)(A(Sm); z+
i , z+
m, z−
k ) − (cid:96)(A(S); z+
i , z+
m, z−
k )(cid:1)
m, z+
+ (cid:0)(cid:96)(A(Sm); z+
+ (cid:0)(cid:96)(A(S); z+
+ (cid:0)(cid:96)(A(S); ̄z+
i , ̄z+
m, z+
i , z−
m, z−
i , z−
k ) − (cid:96)(A(S); z+
k ) − (cid:96)(A(Sm); z+
k ) − (cid:96)(A(Sm); ̄z+
m, z+
i , ̄z+
m, z+
i , z−
m, z−
i , z−
k )(cid:1)
k )(cid:1)
k )(cid:1)(cid:17)
as Sm = {z+
1 , ..., z+
m−1, ̄z+
m, z+
m+1, ..., z+
n+
FS(A(Sm)) − FS(A(S)) ≤
, z−
1 , ..., z−
n−
1
n+(n+ − 1)n−
} and
(cid:88)
(cid:16)(cid:0)(cid:96)(A(Sm); z+
i , z+
j , z−
m) − (cid:96)(A(S); z+
i , z+
j , z−
m)(cid:1)
i,j∈[n+],i(cid:54)=j
+ (cid:0)(cid:96)(A(S); z+
i , z+
j , ̄z−
m) − (cid:96)(A(Sm); z+
i , z+
j , ̄z−
m)(cid:1)(cid:17)
as Sm = {z+
1 , ..., z+
n+
, z−
1 , ..., z−
m−1, ̄z−
m, z−
m+1, ..., z−
n−
}.
Following the similar proof steps of Lemma B.2 (Lei, Ledent, and Kloft 2020), we can get the desired result with the help of
(cid:3)
the σ-strong convexity of FS(w) and the L-Lipschitz continuity of (cid:96)(w).
Proof of Lemma 5: Lemma 4 tells us that A is γ-uniformly stable with γ = min
Ledent, and Kloft (2020), there holds
(cid:110) 8
n+
, 4
n−
(cid:111) L2
σ . Similar with Lemma 2 in Lei,
ES(cid:107)A(S) − w∗(cid:107)2 ≤ 12γ/σ = min
(cid:110) 96
n+
,
48
n−
(cid:111) L2
σ2 .
Based on the Cauchy-Schwartz inequality, we further have
ES(cid:107)A(S) − w∗(cid:107) ≤ (cid:112)ES(cid:107)A(S) − w∗(cid:107)2 ≤ min
It is easy to verify that
sup
z+ , ̃z+ ∈Z+ ,
z−∈Z−
|(cid:96)(A(S); z+, ̃z+, z−) − (cid:96)(A( ̄S); z+, ̃z+, z−)|
(cid:110) 4
√
√
6
n+
√
4
√
3
n−
,
(cid:111) L
σ
.
(10)
= sup
|(cid:96)(A(S); z+, ̃z+, z−) − (cid:96)(w∗; z+, ̃z+, z−) − (cid:96)(A( ̄S); z+, ̃z+, z−) + (cid:96)(w∗; z+, ̃z+, z−)|
z+ , ̃z+ ∈Z+ ,
z−∈Z−
(cid:110) 8
n+
,
≤min
4
n−
(cid:111) L2
σ
.
Let ̃(cid:96)(w; z+, ̃z+, z−) = (cid:96)(w; z+, ̃z+, z−) − (cid:96)(w∗; z+, ̃z+, z−), ∀z+, ̃z+ ∈ Z+, z− ∈ Z−, w ∈ W. Then, the algorithm A
measured by the loss function ̃(cid:96) is also min
(cid:110) 8
n+
, 4
n−
(cid:111) L2
σ -uniformly stable. Besides,
|ES
̃(cid:96)(A(S); z+, ̃z+, z−)| = |ES[(cid:96)(A(S); z+, ̃z+, z−) − (cid:96)(w∗; z+, ̃z+, z−)]|
≤ ES|(cid:96)(A(S); z+, ̃z+, z−) − (cid:96)(w∗; z+, ̃z+, z−)|
≤ LES(cid:107)A(S) − w∗(cid:107)
√
3
n−
(cid:111) L2
σ
√
4
√
6
n+
(cid:110) 4
√
≤ min
,
,
where the last two inequalities are built from the L-Lipschitz continuity and (10), respectively.
Proof of Theorem 3: Recall
that A measured by the loss function ̃(cid:96) is min
(cid:110) 8
n+
, 4
n−
(cid:111) L2
σ -uniformly stable and
(cid:3)
|ES
̃(cid:96)(A(S); z+, ̃z+, z−)| ≤ M = min
(cid:110) 4
√
6√
n+
√
, 4
3√
n−
(cid:111) L2
σ . According to Theorem 1, we have with probability 1 − δ
|RS(A(S)) − R(A(S))|
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
1
n+(n+ − 1)n−
(cid:88)
i,j∈[n+ ],i(cid:54)=j,
k∈[n− ]
≤
(cid:96)(w∗; z+
i , z+
j , z−
k ) − Ez+, ̃z+,z− (cid:96)(w∗; z+, ̃z+, z−)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
+
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
1
n+(n+ − 1)n−
(cid:88)
i,j∈[n+ ],i(cid:54)=j,
k∈[n− ]
̃(cid:96)(A(S); z+
i , z+
j , z−
(cid:12)
(cid:12)
k ) − Ez+, ̃z+,z− ̃(cid:96)(A(S); z+, ̃z+, z−)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤
1
n+(n+ − 1)n−
i,j∈[n+ ],i(cid:54)=j,
k∈[n− ]
(cid:88)
(cid:96)(w∗; z+
i , z+
j , z−
k ) − Ez+, ̃z+,z− (cid:96)(w∗; z+, ̃z+, z−)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
+ min
(cid:110) 48
n+
,
24
n−
(cid:111) L2
σ
+
eL2
σ
(cid:32)
(cid:110) 32
√
min
√
6
n+
32
√
,
√
3
n−
(cid:111)(cid:16) 1
√
n−
+
√
2
n+ − 1
(cid:17)(cid:112)log(e/δ) + min
√
(cid:110) 192
n+
2
,
2
√
96
n−
(cid:111)(cid:16)
(cid:100)log2
(cid:0)n−(n+ − 1)2(cid:1)(cid:101) + 2
(cid:17)
(cid:33)
.
log(e/δ)
Lemma 3 assures that, with probability at least 1 − δ,
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
1
n+(n+ − 1)n−
(cid:88)
i,j∈[n+ ],i(cid:54)=j,
k∈[n−]
(cid:96)(w∗; Z +
i , Z +
j , Z −
(cid:12)
(cid:12)
k ) − Ez+, ̃z+,z− (cid:96)(w∗; z+, ̃z+, z−)
(cid:12)
(cid:12)
(cid:12)
(cid:115)
≤
2blog(1/δ)
3(cid:98)n+/2(cid:99)
+
2τ log(1/δ)
(cid:98)n+/2(cid:99)
+
2blog(1/δ)
3(cid:98)n−(cid:99)
+
(cid:115)
2τ log(1/δ)
(cid:98)n−(cid:99)
.
Then,
|RS(A(S)) − R(A(S))|
≤
2blog(1/δ)
3(cid:98)n+/2(cid:99)
(cid:32)
(cid:115)
+
2τ log(1/δ)
(cid:98)n+/2(cid:99)
√
√
(cid:115)
+
2blog(1/δ)
3(cid:98)n−(cid:99)
+
(cid:110) 32
√
min
,
32
√
3
n−
(cid:111)(cid:16) 1
√
n−
+
√
+
eL2
σ
(cid:32)(cid:115)
6
n+
(cid:115)
2
n+ − 1
√
(cid:110) 48
n+
+ min
2τ log(1/δ)
(cid:98)n−(cid:99)
(cid:17)(cid:112)log(e/δ) + min
,
24
n−
√
(cid:110) 192
n+
(cid:111) L2
σ
2
,
2
√
96
n−
(cid:111)(cid:16)
(cid:100)log2
(cid:0)n−(n+ − 1)2(cid:1)(cid:101) + 2
(cid:17)
(cid:33)
log(e/δ)
=O
log(1/δ)
n+
+
log(1/δ)
n−
+ σ−1(cid:16)
(cid:110)
min
√
2
n+
,
1
√
n−
(cid:111)(cid:16) 1
√
n−
+
1
√
n+
(cid:17)(cid:112)log(1/δ)
+ min
(cid:110) 2
n+
,
1
n−
(cid:111)
log(cid:0)n−n2
+
(cid:17)
(cid:1)log(1/δ)
(cid:33)
.
(cid:3)
Supplement to Remark 5: When letting r(w∗) = λ(cid:107)w∗(cid:107)2 = O(σ(cid:107)w∗(cid:107)2), we can verify the strong convexity of FS as follows.
Due to the convexity of (cid:96), we know that RS(w) ≥ RS(w(cid:48)) + (cid:104)∇RS(w(cid:48)), w − w(cid:48)(cid:105). Besides,
λ(cid:107)w(cid:107)2 = λ(cid:107)w(cid:107)2 + 2λ(cid:107)w(cid:48)(cid:107)2 − 2λ(cid:107)w(cid:48)(cid:107)2 + 2λ(cid:104)w, w(cid:48)(cid:105) − 2λ(cid:104)w, w(cid:48)(cid:105)
= λ(cid:107)w(cid:48)(cid:107)2 + (cid:104)2λ(cid:107)w(cid:48)(cid:107), w − w(cid:48)(cid:105) + λ((cid:107)w(cid:107)2 + (cid:107)w(cid:48)(cid:107)2 − 2(cid:104)w, w(cid:48)(cid:105))
= λ(cid:107)w(cid:48)(cid:107)2 + (cid:104)2λ(cid:107)w(cid:48)(cid:107), w − w(cid:48)(cid:105) + λ(cid:107)w − w(cid:48)(cid:107)2.
Combining the above inequality and identity, we derive that
RS(w) + λ(cid:107)w(cid:107)2 ≥ RS(w(cid:48)) + λ(cid:107)w(cid:48)(cid:107)2 + (cid:104)∇RS(w(cid:48)) + ∇λ(cid:107)w(cid:48)(cid:107)2, w − w(cid:48)(cid:105) + λ(cid:107)w − w(cid:48)(cid:107)2,
that is,
FS(w) ≥ FS(w(cid:48)) + (cid:104)∇FS(w(cid:48)), w − w(cid:48)(cid:105) + λ(cid:107)w − w(cid:48)(cid:107)2.
Thus, FS is 2λ-strongly convex, i.e. σ = 2λ.
(11)
(cid:3)
B.4 Proof of Theorem 4 and Supplement to Remark 6
Proof of Lemma 6: As illustrated in Srebro, Sridharan, and Tewari (2010), the α-smooth and non-negative function (cid:96) satisfies
(cid:107)(cid:96)(cid:48)(w)(cid:107)2 ≤ 2α(cid:96)(w).
(12)
In addition, from the convexity and α-smoothness of (cid:96), we can also derive that
(cid:96)(w) ≤ (cid:96)(w(cid:48)) + (cid:104)∇(cid:96)(w(cid:48)), w − w(cid:48)(cid:105) +
α(cid:107)w − w(cid:48)(cid:107)2
2
, ∀w, w(cid:48) ∈ W,
(13)
(cid:96)(A(Si,j,k); z+
≤(cid:104)∇(cid:96)(A(S); z+
i , z+
i , z+
where ∇(cid:96) denotes subgradient of (cid:96). Based on (12), (13) and the Cauchy-Schwartz inequality, we deduce that
j , z−
k ) − (cid:96)(A(S); z+
k )
α
k ), A(Si,j,k) − A(S)(cid:105) +
2
k )(cid:107)(cid:107)A(Si,j,k) − A(S)(cid:107) +
(cid:15)
2
(cid:107)A(Si,j,k) − A(S)(cid:107)2.
(cid:107)A(Si,j,k) − A(S)(cid:107)2
α
2
(cid:107)A(Si,j,k) − A(S)(cid:107)2 +
(cid:107)A(Si,j,k) − A(S)(cid:107)2
(cid:107)A(Si,j,k) − A(S)(cid:107)2
j , z−
j , z−
≤(cid:107)∇(cid:96)(A(S); z+
(cid:107)∇(cid:96)(A(S); z+
(cid:96)(A(S); z+
j , z−
j , z−
i , z+
i , z+
i , z+
α
2
≤
≤
i , z+
j , z−
k ) +
k )(cid:107)2 +
(cid:15) + α
2
1
2(cid:15)
α
(cid:15)
Moreover, according to the definition of triplet on-average stability in Definition 2 and the symmetry of A(Si,j,k) w.r.t.
i , z+
z+
k , we have
j , z−
ES[R(A(S)) − RS(A(S))]
=
1
n+(n+ − 1)n−
=
1
n+(n+ − 1)n−
≤
1
n+(n+ − 1)n−
(cid:88)
i,j∈[n+ ],i(cid:54)=j,
k∈[n−]
(cid:88)
i,j∈[n+ ],i(cid:54)=j,
k∈[n−]
(cid:88)
i,j∈[n+ ],i(cid:54)=j,
k∈[n−]
E
S, ̄S[R(A(Si,j,k)) − RS(A(S))]
E
S, ̄S[(cid:96)(A(Si,j,k); z+
i , z+
j , z−
k ) − (cid:96)(A(S); z+
i , z+
j , z−
k )]
E
S, ̄S
(cid:104) α
(cid:15)
(cid:96)(A(S); z+
i , z+
j , z−
k ) +
(cid:15) + α
2
(cid:107)A(Si,j,k) − A(S)(cid:107)2(cid:105)
=
=
≤
α
(cid:15)
α
(cid:15)
α
(cid:15)
ESRS(A(S)) +
(cid:15) + α
2n+(n+ − 1)n−
ESRS(A(S)) +
(cid:15) + α
2n+(n+ − 1)n−
ESRS(A(S)) +
(cid:15) + α
2n+(n+ − 1)n−
+ 3E
S, ̄S(cid:107)A(Si) − A(S)(cid:107)2(cid:17)
=
α
(cid:15)
ESRS(A(S)) +
3((cid:15) + α)
2n+(n+ − 1)n−
The desired result is proved.
(cid:88)
i,j∈[n+ ],i(cid:54)=j,
k∈[n−]
(cid:88)
E
S, ̄S(cid:107)A(Si,j,k) − A(S)(cid:107)2
E
S, ̄S(cid:107)A(Si,j,k) − A(Si,j) + A(Si,j) − A(Si) + A(Si) − A(S)(cid:107)2
i,j∈[n+ ],i(cid:54)=j,
k∈[n−]
(cid:88)
(cid:16)
i,j∈[n+ ],i(cid:54)=j,
k∈[n−]
3E
S, ̄S(cid:107)A(Si,j,k) − A(Si,j)(cid:107)2 + 3E
S, ̄S(cid:107)A(Si,j) − A(Si)(cid:107)2
S, ̄S(cid:107)A(Sk) − A(S)(cid:107)2 + 2E
E
S, ̄S(cid:107)A(Si) − A(S)(cid:107)2(cid:17)
.
(cid:88)
(cid:16)
i∈[n+ ],
k∈[n−]
Proof of Theorem 4: Similar with the proof of Lemma 4, when Sm = {z+
1 , ..., z+
m−1, ̄z+
m, z+
m+1, ..., z+
n+
(cid:3)
, z−
1 , ..., z−
n−
}, we have
n+(n+ − 1)n−
(cid:16)
FS(A(Sm)) − FS(A(S))
(cid:17)
(cid:16)(cid:0)(cid:96)(A(Sm); z+
i , z+
m, z−
k ) − (cid:96)(A(S); z+
i , z+
m, z−
k )(cid:1) + (cid:0)(cid:96)(A(Sm); z+
m, z+
i , z−
k ) − (cid:96)(A(S); z+
m, z+
i , z−
k )(cid:1)
(cid:88)
≤
i∈[n+ ],i(cid:54)=m,
k∈[n− ]
+ (cid:0)(cid:96)(A(S); z+
k ) − (cid:96)(A(Sm); z+
i , ̄z+
m, z−
i , ̄z+
m, z−
(cid:16)(cid:10)∇(cid:96)(A(S); z+
k )(cid:1) + (cid:0)(cid:96)(A(S); ̄z+
i , z−
m, z+
i , z+
m, z−
k ) + ∇(cid:96)(A(S); z+
k ) − ∇(cid:96)(A(Sm); z+
i , ̄z+
m, z−
k ) − ∇(cid:96)(A(Sm); ̄z+
m, z+
i , z−
k ),
m, z+
i , z−
k ) − (cid:96)(A(Sm); ̄z+
m, z+
i , z−
k )(cid:1)(cid:17)
(cid:88)
≤
i∈[n+ ],i(cid:54)=m,
k∈[n− ]
A(Sm) − A(S)(cid:11) + 2α(cid:107)A(Sm) − A(S)(cid:107)2(cid:17)
(cid:88)
(cid:16)
≤
i∈[n+],i(cid:54)=m,
k∈[n− ]
(cid:107)∇(cid:96)(A(S); z+
i , z+
m, z−
k )(cid:107) + (cid:107)∇(cid:96)(A(S); z+
m, z+
i , z−
k )(cid:107) + (cid:107)∇(cid:96)(A(Sm); z+
i , ̄z+
m, z−
k )(cid:107) + (cid:107)∇(cid:96)(A(Sm); ̄z+
m, z+
i , z−
k )(cid:107)
(cid:17)
(cid:107)A(Sm) − A(S)(cid:107) + 2α(n+ − 1)n−(cid:107)A(Sm) − A(S)(cid:107)2,
where the second inequality is due to (13).
Moreover, considering the definition of A(S) and the σ-strong convexity of F , we can derive
σn+(n+ − 1)n−
2
(cid:16)
(cid:107)A(Sm) − A(S)(cid:107)2
≤n+(n+ − 1)n−
FS(A(Sm)) − FS(A(S))
(cid:17)
≤
≤
≤
≤
(cid:107)∇(cid:96)(A(S); z+
i , z+
m, z−
k )(cid:107) + (cid:107)∇(cid:96)(A(S); z+
m, z+
i , z−
k )(cid:107) + (cid:107)∇(cid:96)(A(Sm); z+
i , ̄z+
m, z−
k )(cid:107) + (cid:107)∇(cid:96)(A(Sm); ̄z+
m, z+
i , z−
k )(cid:107)
(cid:17)
(cid:88)
(cid:16)
i∈[n+ ],i(cid:54)=m,
k∈[n− ]
(cid:107)A(Sm) − A(S)(cid:107) + 2α(n+ − 1)n−(cid:107)A(Sm) − A(S)(cid:107)2
√
(cid:113)
(cid:16)(cid:113)
(cid:88)
(cid:96)(A(S); z+
i , z+
m, z−
k ) +
(cid:96)(A(S); z+
m, z+
i , z−
k ) +
2α
i∈[n+ ],i(cid:54)=m,
k∈[n−]
(cid:107)A(Sm) − A(S)(cid:107) + 2α(n+ − 1)n−(cid:107)A(Sm) − A(S)(cid:107)2.
Then, as 8α ≤ σmin{n+, n−} ≤ σn+, it follows that
σn+(n+ − 1)n−
2
(cid:88)
√
2α
(cid:107)A(Sm) − A(S)(cid:107)
(cid:16)(cid:113)
(cid:96)(A(S); z+
i , z+
m, z−
k ) +
(cid:113)
(cid:96)(A(S); z+
m, z+
i , z−
k ) +
i∈[n+ ],i(cid:54)=m,
k∈[n−]
+ 2α(n+ − 1)n−(cid:107)A(Sm) − A(S)(cid:107)
√
(cid:16)(cid:113)
(cid:88)
2α
(cid:96)(A(S); z+
i , z+
m, z−
k ) +
(cid:113)
(cid:96)(A(S); z+
m, z+
i , z−
k ) +
i∈[n+ ],i(cid:54)=m,
k∈[n−]
σn+(n+ − 1)n−
4
+
That is to say
(cid:107)A(Sm) − A(S)(cid:107).
σn+(n+ − 1)n−
4
(cid:88)
√
≤
2α
(cid:107)A(Sm) − A(S)(cid:107)
(cid:16)(cid:113)
(cid:96)(A(S); z+
i , z+
m, z−
k ) +
(cid:113)
(cid:96)(A(S); z+
m, z+
i , z−
k ) +
i∈[n+ ],i(cid:54)=m,
k∈[n−]
After squaring the both sides of the above inequality, we derive
σ2n2
+(n+ − 1)2n2
−
(cid:107)A(Sm) − A(S)(cid:107)2
(cid:16)(cid:113)
(cid:96)(A(S); z+
i , z+
m, z−
k ) +
(cid:113)
(cid:96)(A(S); z+
m, z+
i , z−
k ) +
(cid:113)
(cid:113)
(cid:113)
(cid:113)
(cid:96)(A(Sm); z+
i , ̄z+
m, z−
k ) +
(cid:96)(A(Sm); z+
i , ̄z+
m, z−
k ) +
(cid:96)(A(Sm); z+
i , ̄z+
m, z−
k ) +
(cid:96)(A(Sm); z+
i , ̄z+
m, z−
k ) +
(cid:113)
(cid:96)(A(Sm); z+
i , ̄z+
m, z−
k ) +
(cid:113)
(cid:96)(A(Sm); ̄z+
m, z+
(cid:17)
i , z−
k )
(cid:113)
(cid:96)(A(Sm); ̄z+
m, z+
(cid:17)
i , z−
k )
(cid:113)
(cid:96)(A(Sm); ̄z+
m, z+
(cid:17)
i , z−
k )
(cid:113)
(cid:96)(A(Sm); ̄z+
m, z+
(cid:17)
i , z−
k )
.
(cid:113)
(cid:96)(A(Sm); ̄z+
m, z+
(cid:17)
i , z−
k )
(cid:33)2
(cid:88)
(cid:16)(cid:113)
i∈[n+ ],i(cid:54)=m,
k∈[n−]
(cid:96)(A(S); z+
i , z+
m, z−
k ) +
(cid:113)
(cid:96)(A(S); z+
m, z+
i , z−
k ) +
(cid:113)
(cid:96)(A(Sm); z+
i , ̄z+
m, z−
k )
(cid:113)
+
(cid:96)(A(Sm); ̄z+
(cid:17)2
m, z+
(cid:88)
i , z−
k )
(cid:16)
≤8α(n+ − 1)n−
(cid:96)(A(S); z+
i , z+
m, z−
k ) + (cid:96)(A(S); z+
m, z+
i , z−
k ) + (cid:96)(A(Sm); z+
i , ̄z+
m, z−
k ) + (cid:96)(A(Sm); ̄z+
m, z+
(cid:17)
i , z−
k )
,
i∈[n+ ],i(cid:54)=m,
k∈[n−]
where the second and third inequalities hold since
(cid:16) n
(cid:80)
i=1
(cid:17)2
ai
≤ n
n
(cid:80)
i=1
a2
i .
16
(cid:88)
(cid:32)
≤2α
i∈[n+],i(cid:54)=m,
k∈[n− ]
≤2α(n+ − 1)n−
For all m ∈ [n+], we sum them together to get
n+
(cid:88)
(cid:107)A(Sm) − A(S)(cid:107)2
σ2n2
+(n+ − 1)n−
m=1
(cid:16)
≤128α
(cid:88)
i,m∈[n+ ],i(cid:54)=m,
k∈[n−]
(cid:96)(A(S); z+
i , z+
m, z−
k ) + (cid:96)(A(S); z+
m, z+
i , z−
k ) + (cid:96)(A(Sm); z+
i , ̄z+
m, z−
k ) + (cid:96)(A(Sm); ̄z+
m, z+
(cid:17)
i , z−
k )
.
By taking expectations on both sides of the above inequality, we obtain
σ2n2
+(n+ − 1)n−
n+
(cid:88)
E
S, ̄S(cid:107)A(Sm) − A(S)(cid:107)2
≤128α
(cid:88)
i,m∈[n+],i(cid:54)=m,
k∈[n− ]
m=1
E
S, ̄S[(cid:96)(A(S); z+
i , z+
m, z−
k ) + (cid:96)(A(S); z+
m, z+
i , z−
k ) + (cid:96)(A(Sm); z+
i , ̄z+
m, z−
k ) + (cid:96)(A(Sm); ̄z+
m, z+
i , z−
k )]
≤512αn+(n+ − 1)n−ESRS(A(S)).
(14)
(15)
(cid:3)
Similarly, when Sm = {z+
1 , ..., z+
n+
m−1, ̄z−
m, z−
m+1, ..., z−
n−
}, we get
, z−
1 , ..., z−
n−
(cid:88)
σ2n−
E
S, ̄S(cid:107)A(Sm) − A(S)(cid:107)2 ≤
512
9
αESRS(A(S)).
Based on the definitions of A(S) and w∗, there holds
m=1
ES[F (A(S)) − FS(w∗)] = ES[F (A(S)) − FS(A(S))] + ES[FS(A(S)) − FS(w∗)]
≤ ES[F (A(S)) − FS(A(S))] = ES[R(A(S)) − RS(A(S))].
Hence, the desired result
ESRS(A(S)) +
ES[R(A(S)) − RS(A(S))]
α
(cid:15)
(cid:18) α
(cid:15)
1536α((cid:15) + α)
+(n+ − 1)σ2 +
n2
+
≤
=
3((cid:15) + α)
2n+(n+ − 1)n−
256α((cid:15) + α)
3(n+ − 1)n2
−σ2
(cid:18) 1024αn−
σ2n+
(cid:19)
ESRS(A(S)) +
512αn+
9σ2n−
(cid:19)
ESRS(A(S))
ESRS(A(S)), ∀(cid:15) > 0
follows from Lemma 6, (14), and (15).
Supplement to Remark 6: Considering (6) and letting r(w∗) = O(σ(cid:107)w∗(cid:107)2), we know
ES[R(A(S)) − R(w∗)] ≤ ES[R(A(S)) − RS(A(S)) + RS(w∗) − R(w∗) + r(w∗)]
≤ ES[R(A(S)) − RS(A(S)) + r(w∗)]
≤ ES[R(A(S)) − RS(A(S))] + O(σ(cid:107)w∗(cid:107)2).
If n+ (cid:16) n− (cid:16) n and (cid:15) =
(cid:114)
3n2
4608n2
+(n+−1)n2
−σ2
−+256n2
+
, then
ES[R(A(S)) − R(w∗)] ≤ ES[R(A(S)) − RS(A(S))] + O(σ(cid:107)w∗(cid:107)2) = O
(cid:18) 1
n 3
2 σ
ESRS(A(S)) + σ(cid:107)w∗(cid:107)2
(cid:19)
.
By applying the non-negativity of r, the definitions of A(S) and w∗, we get
ESRS(A(S)) ≤ ES[RS(A(S)) + r(A(S))] ≤ ES[RS(w∗) + r(w∗)] = O(R(w∗) + σ(cid:107)w∗(cid:107)2).
Combining the above two inequalities together, we derive
ES[R(A(S)) − R(w∗)] = O
(cid:18) 1
n 3
2 σ
R(w∗) + (cid:0)n− 3
2 + σ(cid:1)(cid:107)w∗(cid:107)2
(cid:19)
.
To minimize ES[R(A(S))−R(w∗)], σ should be n− 3
the order of n− 3
4 (cid:107)w∗(cid:107)−1(cid:112)R(w∗) is same as 8α/n. Thus, we derive
4 (cid:107)w∗(cid:107)−1(cid:112)R(w∗), however, σ ≥ 8α/n. When R(w∗) = O(n− 1
2 (cid:107)w∗(cid:107)2),
ES[R(A(S)) − R(w∗)] = O
(cid:18)
n− 3
4 (cid:107)w∗(cid:107)(cid:112)R(w∗) + n− 3
2 (cid:107)w∗(cid:107)2
(cid:19)
= O(n−1(cid:107)w∗(cid:107)2).
(cid:3)
B.5 Proofs of Corollaries 1-3
Proof of Corollary 1: To apply Theorem 2, we just need to verify the loss function in triplet metric learning satisfies convex,
α-smooth and L-Lipschitz.
Convexity. For all w, z+, ̃z+, z−,
∇2(cid:96)φ(w; z+, ̃z+, z−) =
(cid:16)
(x+ − ̃x+)(x+ − ̃x+)(cid:62) − (x+ − x−)(x+ − x−)(cid:62)(cid:17)2
φ(cid:48)(cid:48)(cid:0)hw(x+, ̃x+) − hw(x+, x−) + ζ(cid:1).
(16)
It is easy to verify that ∇2(cid:96)φ(w; z+, ̃z+, z−) ≥ 0 since the second derivative φ(cid:48)(cid:48) of logistic function always is non-negative.
Lipschitz continuity. For all w, w(cid:48), z+, ̃z+, z−,
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)(cid:96)φ(w; z+, ̃z+, z−) − (cid:96)φ(w(cid:48); z+, ̃z+, z−)
(cid:12)
(cid:12)
(cid:12)log(cid:0)1 + exp(hw(x+, x−) − hw(x+, ̃x+) − ζ)(cid:1) − log(cid:0)1 + exp(hw(cid:48)(x+, x−) − hw(cid:48)(x+, ̃x+) − ζ)(cid:1)(cid:12)
(cid:12)
(cid:12)
(cid:12)hw(x+, x−) − hw(x+, ̃x+) − ζ − hw(cid:48)(x+, x−) + hw(cid:48)(x+, ̃x+) + ζ
(cid:12)
(cid:10)w − w(cid:48), (x+ − x−)(x+ − x−)(cid:62)(cid:11) − (cid:10)w − w(cid:48), (x+ − ̃x+)(x+ − ̃x+)(cid:62)(cid:11)(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:10)w − w(cid:48), (x+ − ̃x+)(x+ − ̃x+)(cid:62)(cid:11)(cid:12)
(cid:10)w − w(cid:48), (x+ − x−)(x+ − x−)(cid:62)(cid:11)(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12) +
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
=
≤
=
≤
(17)
≤8B2(cid:107)w − w(cid:48)(cid:107),
where the first inequality is due to the 1-smoothness of the logistic function, and the last two inequalities are obtained with the
Cauchy-Schwartz inequality and the boundedness assumption of sample space.
Smoothness. With the similar fashion as above, we deduce that
≤
≤
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)∇(cid:96)φ(w; z+, ̃z+, z−) − ∇(cid:96)φ(w(cid:48); z+, ̃z+, z−)
(cid:12)
(cid:12)
(cid:12)(x+ − ̃x+)(x+ − ̃x+)(cid:62) − (x+ − x−)(x+ − x−)(cid:62)(cid:12)
(cid:12)
(cid:12)φ(cid:48)(cid:0)hw(x+, ̃x+) − hw(x+, x−) + ζ(cid:1) − φ(cid:48)(cid:0)hw(cid:48)(x+, ̃x+) − hw(cid:48)(x+, x−) + ζ(cid:1)(cid:12)
(cid:12)
(cid:12)
(cid:12)2
(cid:12)
(cid:12)
(cid:12)2
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
*
(cid:12)
(cid:12)
(cid:32)
(cid:12)(x+ − ̃x+)(x+ − ̃x+)(cid:62)(cid:12)
(cid:12)
(cid:12)
(cid:12)
− φ(cid:48)(cid:0)hw(cid:48)(x+, ̃x+) − hw(cid:48)(x+, x−) + ζ(cid:1)(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)2
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
+
(cid:12)
(cid:12)
(cid:12)(x+ − x−)(x+ − x−)(cid:62)(cid:12)
(cid:12)
(cid:12)
(cid:33)
(cid:12)
(cid:12)φ(cid:48)(cid:0)hw(x+, ̃x+) − hw(x+, x−) + ζ(cid:1)
(cid:12)
(cid:12)
(cid:12)
(cid:12)2
=8B2(cid:12)
(cid:12)φ(cid:48)(cid:0)hw(x+, ̃x+) − hw(x+, x−) + ζ(cid:1) − φ(cid:48)(cid:0)hw(cid:48)(x+, ̃x+) − hw(cid:48)(x+, x−) + ζ(cid:1)(cid:12)
(cid:12)
≤8B2(cid:12)
(cid:12)hw(x+, x−) − hw(x+, ̃x+) − ζ − hw(cid:48)(x+, x−) + hw(cid:48)(x+, ̃x+) + ζ
(cid:12)
≤64B4(cid:107)w − w(cid:48)(cid:107).
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
Therefore, the desired result is obtained by Theorem 2, where loss function satisfies the convexity, 8B2-Lipschitz continuity
(cid:3)
and 64B4-smoothness.
Proof of Corollary 2: To apply Theorem 3, we need to prove the σ-strong convexity of FS and L-Lipschitz continuity of (cid:96).
They can be verified by (11) and (17). Thus, we get the stated result from Theorem 3.
(cid:3)
Proof of Corollary 3: From the proofs of Corollaries 1 and 2, we know that the σ-strong convexity of FS and the α-smoothness
(cid:3)
of (cid:96). Hence, we can directly apply Theorem 4 to get the desired result.
C. Review on the Definitions of Algorithmic Stability
In machine learning literature, there are various definitions of algorithmic stability for pointwise/pairwise learning, including
hypothesis stability (Bousquet and Elisseeff 2002; Elisseeff, Evgeniou, and Pontil 2005), error stability (Bousquet and Elisseeff
2002; Shalev-Shwartz et al. 2010), uniform stability (Agarwal and Niyogi 2009; Hardt, Recht, and Singer 2016; Foster et al.
2019; Feldman and Vondr ́ak 2018, 2019; Bousquet, Klochkov, and Zhivotovskiy 2020; Klochkov and Zhivotovskiy 2021; Sun,
Li, and Wang 2021; Shen et al. 2019; Maurer 2017; Gao and Zhou 2013; Jin, Wang, and Zhou 2009; Wang et al. 2019; Chen,
Jin, and Yu 2018), uniform augment stability (Liu et al. 2017; Bassily et al. 2020; Xing, Song, and Cheng 2021; Yang et al.
2021; Lei et al. 2021), on-average stability (Lei, Ledent, and Kloft 2020; Lei and Ying 2021; Kuzborskij and Lampert 2018),
on-average augment stability (Lei and Ying 2020; Lei, Liu, and Ying 2021) and locally elastic stability (Deng, He, and Su
2021).
It is well known the above stability definitions for pointwise/pairwise learning is the building block for triplet algorith-
mic stability. Therefore, to better understand our Definitions 1 and 2 for triplet learning, we summarize the previous def-
initions of algorithmic stability in Table 4, where their properties are illustrated from the aspects of the measure of per-
turbation (Loss (cid:96) Vs. Model A(S)) and the dependence of stability parameter (data dependence Vs. data independence).
Here, let S = {z1, ..., zn}, ̄S = { ̄z1, ..., ̄zn} be drawn independently from the same data generating distribution, and let
Si = {z1, ..., zi−1, ̄zi, zi+1, ..., zn}.
Stability
Definitions
Hypothesis stability
Error stability
Uniform stability
Uniform augment stability
On-average stability
On-average augment stability
Locally elastic stability
E
S, ̄S,z[|(cid:96)(A(S), z) − (cid:96)(A(Si), z)|] ≤ γ, ∀i ∈ [n]
|Ez[(cid:96)(A(S), z) − (cid:96)(A(Si), z)]| ≤ γ, ∀S, ̄S ∈ Z n, ∀i ∈ [n]
(cid:107)(cid:96)(A(S), *) − (cid:96)(A(Si), *)(cid:107)∞ ≤ γ, ∀S, ̄S ∈ Z n, ∀i ∈ [n]
(cid:107)A(S) − A(Si)(cid:107)∞ ≤ γ, ∀S, ̄S ∈ Z n, ∀i ∈ [n]
1
n
S, ̄S[(cid:96)(A(S), zi) − (cid:96)(A(Si), zi)] ≤ γ, ∀S, ̄S ∈ Z n
E
S, ̄S[(cid:107)A(S) − A(Si)(cid:107)] ≤ γ, ∀S, ̄S ∈ Z n
E
1
n
|(cid:96)(A(S), z) − (cid:96)(A(Si), z)| ≤ γ(zi, z), ∀S, ̄S ∈ Z n, ∀i ∈ [n]
n
(cid:80)
i=1
n
(cid:80)
i=1
Loss Model
Data
dependence
√
√
√
×
√
×
√
×
×
×
√
×
√
×
×
×
×
×
×
×
√
Table 4: Summary of definitions and properties of algorithmic stability (
√
-has such a property; ×-hasn't such a property)
From Table 4, we know that the uniform stability (uniform augment stability) is stronger than the on-average stability (on-
average augment stability). As demonstrated in Deng, He, and Su (2021), the locally elastic stability is a more fine-grained
stability than the others due to its data dependence of stability parameter γ.
From the other side, the uniform (on-average) augment stability implies the uniform (on-average) stability when the loss
function satisfies L-Lipschitz continuous. That is to say, the model-based stability characterization is stronger than the loss-
based stability measure usually. In addition, the average augment stability has various versions when employing different norms.
Table 4 just shows the definitions in the case of changes of one point. It has been extended to the setting of changes of two
points (Lei, Ledent, and Kloft 2020; Lei, Liu, and Ying 2021) and the setting of multitask learning (Wang et al. 2019; Zhang
2015). These developments pave the way to motivate our Definitions 1 and 2.
D. Discussion
There are still many interesting research topics related to the current work, which we will discuss below:
Non-convex loss functions: As shown in Tables 1-2, our stability-based generalization analysis requires the convexity of
triplet loss function. However, there also involve various non-convex loss functions in some triplet learning algorithms. Hence,
it is important to investigate the generalization and stability for general non-convex triplet losses. In addition, some restrictions
on the non-convex loss functions may be necessary, e.g., the Polyak-Łojasiewicz (PL) condition and the quadratic growth (QG)
condition (Charles and Papailiopoulos 2018).
Distribution Shift: To the best of our knowledge, the existing stability-based generalization bounds are all under the as-
sumption that the testing data and the training data are drawn independently from an identity distribution. Motivated by the
widespread practical deployment of learning algorithms, there often faces complicated data environment where the unknown
test distribution potentially differs from the training distribution, i.e., distribution shift (Wang et al. 2021; Shen et al. 2021;
Agarwal and Zhang 2022). For a wide range of models and distribution shifts, Miller et al. (2021) shows the strong empirical
correlation between out-of-distribution performance and in-distribution performance. In particular, there is rapid theoretical
progress on the generalization guarantees under distribution shift by leveraging the expansion assumption (Ye et al. 2021; Cai
et al. 2021), the uniformly convergence analysis (Agarwal and Zhang 2022), and the operator approximation (Gizewski et al.
2022). Therefore, it is natural and crucial to further investigate the stability-based generalization theory (Hardt, Recht, and
Singer 2016; Charles and Papailiopoulos 2018; Lei and Ying 2020) for the distribution shift setting.
|
|
http://arxiv.org/abs/2302.09814v1 | 2023-02-20T07:29:34 | 2023-02-20T07:29:34 | Pseudo Label-Guided Model Inversion Attack via Conditional Generative
Adversarial Network | Model inversion (MI) attacks have raised increasing concerns about privacy,
which can reconstruct training data from public models. Indeed, MI attacks can
be formalized as an optimization problem that seeks private data in a certain
space. Recent MI attacks leverage a generative adversarial network (GAN) as an
image prior to narrow the search space, and can successfully reconstruct even
the high-dimensional data (e.g., face images). However, these generative MI
attacks do not fully exploit the potential capabilities of the target model,
still leading to a vague and coupled search space, i.e., different classes of
images are coupled in the search space. Besides, the widely used cross-entropy
loss in these attacks suffers from gradient vanishing. To address these
problems, we propose Pseudo Label-Guided MI (PLG-MI) attack via conditional GAN
(cGAN). At first, a top-n selection strategy is proposed to provide
pseudo-labels for public data, and use pseudo-labels to guide the training of
the cGAN. In this way, the search space is decoupled for different classes of
images. Then a max-margin loss is introduced to improve the search process on
the subspace of a target class. Extensive experiments demonstrate that our
PLG-MI attack significantly improves the attack success rate and visual quality
for various datasets and models, notably, 2~3 $\times$ better than
state-of-the-art attacks under large distributional shifts. Our code is
available at: https://github.com/LetheSec/PLG-MI-Attack. | [
"Xiaojian Yuan",
"Kejiang Chen",
"Jie Zhang",
"Weiming Zhang",
"Nenghai Yu",
"Yang Zhang"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09814v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09814v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.CV",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.CV",
"cs.CR",
"cs.LG"
] | Pseudo Label-Guided Model Inversion Attack via Conditional Generative
Adversarial Network
Xiaojian Yuan1, Kejiang Chen*1, Jie Zhang1,2, Weiming Zhang1,
Nenghai Yu1, Yang Zhang3
1University of Science and Technology of China, 2University of Waterloo,
3CISPA Helmholtz Center for Information Security
[email protected], [email protected], [email protected],
[email protected], [email protected], [email protected]
3
2
0
2
b
e
F
0
2
]
V
C
.
s
c
[
1
v
4
1
8
9
0
.
2
0
3
2
:
v
i
X
r
a
Abstract
Model inversion (MI) attacks have raised increasing concerns
about privacy, which can reconstruct training data from pub-
lic models. Indeed, MI attacks can be formalized as an opti-
mization problem that seeks private data in a certain space.
Recent MI attacks leverage a generative adversarial network
(GAN) as an image prior to narrow the search space, and
can successfully reconstruct even the high-dimensional data
(e.g., face images). However, these generative MI attacks do
not fully exploit the potential capabilities of the target model,
still leading to a vague and coupled search space, i.e., dif-
ferent classes of images are coupled in the search space. Be-
sides, the widely used cross-entropy loss in these attacks suf-
fers from gradient vanishing. To address these problems, we
propose Pseudo Label-Guided MI (PLG-MI) attack via con-
ditional GAN (cGAN). At first, a top-n selection strategy is
proposed to provide pseudo-labels for public data, and use
pseudo-labels to guide the training of the cGAN. In this way,
the search space is decoupled for different classes of images.
Then a max-margin loss is introduced to improve the search
process on the subspace of a target class. Extensive experi-
ments demonstrate that our PLG-MI attack significantly im-
proves the attack success rate and visual quality for various
datasets and models, notably, 2 ∼ 3× better than state-of-
the-art attacks under large distributional shifts. Our code is
available at: https://github.com/LetheSec/PLG-MI-Attack.
1
Introduction
Deep neural networks (DNNs) have revolutionized a wide
variety of tasks, including computer vision, natural language
processing, and healthcare. However, many practical appli-
cations of DNNs require training on private or sensitive
datasets, such as facial recognition (Taigman et al. 2014)
and medical diagnosis (Rajpurkar et al. 2017), which may
pose some privacy threats. Indeed, the prior study of privacy
attacks has demonstrated the possibility of exposing unau-
thorized information from access to a model (Shokri et al.
2017; Gopinath et al. 2019; Tram`er et al. 2016; Fredrikson,
Jha, and Ristenpart 2015). In this paper, we mainly focus on
model inversion (MI) attacks, a type of privacy attack that
aims to recover the training data given a trained model.
*Corresponding authors.
Copyright © 2023, Association for the Advancement of Artificial
Intelligence (www.aaai.org). All rights reserved.
Figure 1: Latent search space for different MI attacks.
The blue area represents the latent space that needs to be
searched to reconstruct a certain class of images. That is, the
adversary should find an optimal latent point in the blue area,
so that the generator outputs the private image of a specified
class.
Typically, MI attacks can be formalized as an optimiza-
tion problem with the goal of searching the input space for
the sensitive feature value that achieves the highest like-
lihood under the target model. However, when attacking
DNNs trained on more complex data (e.g., RGB images),
directly solving the optimization problem via gradient de-
scent tends to stuck in local minima, resulting in recon-
structed images lacking clear semantic information. Recent
work (Zhang et al. 2020) proposed generative MI attacks
(GMI), which used a generative adversarial network (GAN)
to learn a generic prior of natural images, avoiding recon-
structing private data directly from the unconstrained space.
Generally, generative MI attacks can be summarized as the
following two search stages:
• stage-1: Generator Parameter Space Search. The adver-
sary trains a generative model (i.e., searches for the op-
timal parameters) on a public dataset that only shares
structural similarity with the private dataset.
• stage-2: Latent Vector Search. The adversary keeps
searching the latent space of the generator trained in
stage-1, until the output is close to the images in the pri-
vate dataset.
Notably, GMI totally ignored the potential capability of
the target model for the training process. Inspired by semi-
supervised GAN (Salimans et al. 2016), KED-MI (Chen
et al. 2021) adopted a classifier as the GAN discriminator
and utilized the target model to provide soft labels for public
GANLatentSpacePublicDataPublicDataGMIKED-MIOursGANLatentSpaceAllclassesintheprivatedataPublicDataGANLatentSpaceClass1Class2Class4Class3Class5***
data during the training process in stage-1, which achieved
the state-of-the-art MI attack performance. Even so, the at-
tack performance is still underwhelming, especially when
public and private data have a large distributional shift. We
infer possible limitations of existing work as follows:
1) Class-Coupled Latent Space. The generator obtained
by existing work in stage-1 is class-coupled. When the
adversary reconstructs a specified class of target in stage-
2, it needs to search in the latent space of all classes,
which easily causes confusion of feature information be-
tween different classes (see Fig. 1).
2) Indirectly Constrains on the Generator. The KED-
MI attack adopts the semi-supervised GAN framework,
which indirectly constrains the generator with class infor-
mation through the discriminator. However, this implicit
constraint relies too much on the discriminator and lacks
task specificity for MI.
3) Gradient Vanishing Problem. Previous MI attacks have
commonly adopted cross-entropy (CE) loss as the opti-
mization goal in stage-2. However, the cross-entropy loss
will cause the gradient to decrease and tend to vanish as
the number of iterations increases, resulting in the search
process to slow down or even stop early.
To address the above limitations, we propose a novel
pseudo label-guided MI (PLG-MI) attack. Specifically, we
first propose a simple but effective top-n selection strategy,
which can provide pseudo-labels for public data. Then we
introduce the conditional GAN (cGAN) to MI attacks and
use the pseudo-labels to guide the training process, enabling
it to learn more specific and independent image distributions
for each class. In addition, we also impose a task-specific
explicit constraint directly on the generator so that class in-
formation can be embedded into the latent space. This con-
straint can force images to be generated towards specific
classes in the private data. As shown in Fig. 1, it can be
considered as an approximate division of the GAN latent
space into separate class subspaces. When reconstructing the
private data of an arbitrary class in stage-2, only the corre-
sponding subspace needs to be searched, which avoids con-
fusion between different classes.
Our contributions can be summarized as follows:
• We propose Pseudo Label-Guided MI (PLG-MI) attack,
which can make full use of the target model and leverage
pseudo-labels to guide the output of the generator during
the training process.
• We propose a simple but effective strategy to provide
public data with pseudo-labels, which can provide cor-
responding features according to specific classes in the
private dataset.
• We demonstrate the gradient vanishing problem of cross-
entropy loss commonly adopted in previous MI attacks
and use max-margin loss to mitigate it.
• Extensive experiments demonstrate that the PLG-MI at-
tack greatly boosts the MI attack and achieves state-of-
the-art attack performance, especially in the presence of a
large distributional shift between public and private data.
Figure 2: Top-n selection strategy. Input the images of public
data into the target model and select the top n images with
the highest confidence for each class. The right half shows
images of the corresponding class in the private dataset.
2 Related Work
Inversion Attacks. Fredrikson et al.
Basic Model
(Fredrikson et al. 2014) first studied MI attacks in the con-
text of genomic privacy and demonstrated that access to
linear regression models for personalized medicine can be
abused to recover private genomic properties of individuals
in the training dataset. Fredrikson et al.
(Fredrikson, Jha,
and Ristenpart 2015) later proposed an optimization algo-
rithm based on gradient descent for MI attacks, which can
recover grayscale face images from shallow networks. How-
ever, these basic MI attacks that reconstruct private data di-
rectly from the pixel space failed when the target models are
DNNs.
Generative Model Inversion Attacks. To make it possi-
ble to launch MI attacks against DNNs, Zhang et al. (Zhang
et al. 2020) proposed generative model inversion (GMI) at-
tacks, which trained a GAN on public data as an image
prior and then restricted the optimization problem in the la-
tent space of the generator. Wang et al. (Wang et al. 2021)
proposed viewing MI attacks as a variational inference (VI)
problem and provided a framework using deep normalizing
flows in the extended latent space of a StyleGAN (Karras
et al. 2020). Chen et al. (Chen et al. 2021) adopted the semi-
supervised GAN framework to improve the training process
by including soft labels produced by the target model. Kahla
et al. (Kahla et al. 2022) extended generative MI attacks to
black-box scenarios where only hard labels are available.
3 Method
In this section, we will first discuss the threat model and then
present our attack method in detail.
3.1 Threat Model
Adversary's Goal. Given a target model T : [0, 1]d →
R|C| and an arbitrary class c∗ ∈ C, the adversary aims to
reconstruct a representative sample x∗ of the training data
of the class c∗; d represents the dimension of the model in-
put; C denotes the set of all class labels of the training data
and |C| is the size of the label set. It should be emphasized
that the reconstructed data need to have good semantic in-
formation for human recognition. In this paper, we focus on
Target modelClass 1...Top-n Selection StrategyTPublic Data0.93020.7669Class 0...0.91230.8805Top nClass 0Class 1......Private DataFigure 3: The overall pipeline of the proposed two-stage model inversion attack algorithm. Stage 1: Train a conditional GAN
on the public data with guidance provided by pseudo-labels and knowledge of the target model. Stage 2: Leverage the trained
generator to reconstruct the specific class of private images using Linv.
the attack against face recognition models, that is, the ad-
versary's goal is to reconstruct its corresponding face image
from the target model according to the specified identity.
Adversary's Knowledge.
In this paper, we focus on
white-box MI attacks, which means that the adversary can
have access to all parameters of the target model. In addi-
tion, following the settings in previous work (Zhang et al.
2020; Chen et al. 2021; Kahla et al. 2022), the adversary can
gain a public dataset of the target task that only shares struc-
tural similarity with the private dataset without any inter-
secting classes. For example, the adversary knows the target
model is for face recognition, he can easily leverage an ex-
isting open-sourced face dataset or crawl face images from
the Internet as the public data.
3.2 Pseudo-Labels Generation
Top-n Selection Strategy.
In order to make the public data
have pseudo-labels to guide the training of the generator, we
propose a top-n selection strategy, as shown in Fig. 2. This
strategy aims to select the best matching n images for each
pseudo-label from public data. These pseudo-labels corre-
spond to classes in the private dataset. Specifically, we feed
all images in public data into the target model and get the
corresponding prediction vectors. Then for a certain class k,
we sort all images in descending order of kth value in their
prediction vectors and select the top n images to assign the
pseudo-label k.
Generally, if the target model has high confidence in the
kth class for a certain image, this image can be considered
to contain discriminative features of the kth class. We define
F k
pri and F k
pub as the distributions of discriminative features
contained in the kth class of private data and pseudo-labeled
public data. It can be inferred that F k
pri have in-
tersection, which means that the adversary can obtain the
required information by sufficiently searching F k
pub, making
the private information in F k
pri leaked more easily and accu-
rately.
pub and F k
Narrow the Search Space via Pseudo-Labels. This strat-
egy can narrow the search space of latent vectors in stage-2.
Specifically, after reclassifying the public data, we can di-
rectly learn the feature distribution of images for each class.
When reconstructing images of the kth class in the private
dataset, it is only necessary to search for required features in
F k
pub, while reducing the interference of irrelevant features
from F i(cid:54)=k
pub . Taking face recognition as an example, suppose
that the kth class of the private dataset is a young white man
with blond hair, then the kth class of the pseudo-labeled pub-
lic data is also mostly white people with blond hair, as shown
in Fig. 2. Consequently, the key features can be preserved
and the useless features (e.g., other skin tones or hair colors,
etc.) are eliminated, thereby narrowing the search space.
3.3 Pseudo Label-Guided MI Attack
An overview of our attack is illustrated in Fig. 3, which con-
sists of two stages. In stage-1, we train a conditional GAN
on public data under the guidance of pseudo-labels. In stage-
2, we use the trained generator to reconstruct private images
of specified classes.
Problem Formulation. At first, we formulate the MI
problem in the context of image classification (i.e., face
recognition) with DNNs. We use Ds to denote the private
dataset with sensitive information and Dp to denote the pub-
lic dataset available to the adversary. Then using the top-n
selection strategy to obtain a pseudo-labeled public dataset
Dr. We denote a sample image as x ∈ Ds, and its corre-
sponding label as y ∈ {1, . . . , K}, where K denotes the
number of classes. Note that the original Dp does not have
any class intersection with Ds, while the Dr has the pseudo-
labels ̃y ∈ {1, . . . , K}. In the typical case, the target model
T will be trained on Ds to learn the mapping from the input
space to the probability vectors.
In generative MI attacks, the adversary uses Dp to train
a GAN and then optimizes the input to the generator, in-
stead of directly optimizing from the pixel space. Denote
the trained generator by G(z), where z ∼ N (0, 1) is the la-
tent vector. The optimization problem can be formulated as
follows:
z∗ = arg min
ˆz
Linv(T (G(ˆz)), c),
(1)
z∼N(0,1)Latent vectorFake imageGTargetlabeltL!"#TGradientImage ReconstructiontTargetlabelEmbeddingPseudolabelcGFake imageReal imageDEmbeddingLatent vectorTL$L!"#L%Pseudo Label-Guided cGANRandomAugmentationRandomAugmentationRandomAugmentationz∼N(0,1)Figure 4: Visual comparison for attacking VGG16 trained on CelebA. The first row shows ground truth images of target identity
in the private data. The second row shows the images from the public data with the highest confidence in the target identity.
The third and last rows demonstrate the reconstructed images of the target identity using KED-MI and our attack, respectively.
where c is the target class in Ds, and Linv is a classification
loss (e.g., cross-entropy). Then the reconstructed images can
be obtained by x∗ = G(z∗).
where T is the target model being attacked, A is a set of
random augmentations, Linv is the max-margin loss which
we will introduce later, and α is a regularization coefficient.
Pseudo Label-Guided cGAN. Although existing genera-
tive MI attacks (Zhang et al. 2020; Chen et al. 2021) can
learn a prior of natural images, they do not take into account
the possible effects of class labels, thus causing all classes
to be coupled together in the latent space. This makes it dif-
ficult to directly search for private images of the specified
class. As mentioned before, in order to narrow the search
space and conduct a more independent latent search process.
We propose to train a conditional GAN (Miyato and Koyama
2018) to model the feature distribution of each class and use
pseudo-labels to guide the direction of the generated images.
Formally, for training the discriminator in the cGAN, we
use a hinge version of the standard adversarial loss:
LD =Eq( ̃y)
Eq( ̃y)
(cid:2)Eq(x| ̃y)[max(0, 1 − D(x, ̃y)]]+
(cid:2)Ep(z)[max(0, 1 + D(G(z, ̃y), ̃y))],
(2)
where q( ̃y) and q(x| ̃y) are the pseudo-label distribution of
Dr and the image distribution in the corresponding class,
respectively. p(z) is standard Gaussian distribution and
G(z, ̃y) is the conditional generator.
To make the generated image more accurate, we use the
pseudo-labels ̃y of Dr to impose an explicit constraint on
the generator. The constraint, in principle, guides the gener-
ated images to belong to a certain class in the private dataset.
Besides, we add a stochastic data augmentation module that
performs random transformations on the generated images,
including resizing, cropping, horizontal flipping, rotation,
and color jittering. This module provides more stable con-
vergence to realistic images while constraining. Then the
loss function for the generator can be defined as:
Image Reconstruction. After getting the GAN trained on
the public data, we can use it to reconstruct images of a spec-
ified class in the private dataset, as shown in the right half
of Fig. 3. Specifically, given a target class c, we aim to search
for appropriate latent vectors, so that the generated images
constantly approach the images in c. Since we use a con-
ditional generator, only the subspace of the specified class
needs to be searched. In order to ensure that reconstructed
images are not deceptive (e.g., adversarial example) or just
stuck in a local minimum, we transform generated images
randomly resulting in multiple correlated views. Intuitively,
if the reconstructed image truly reveals key discriminative
features of the target class, its class should remain consistent
across these views. The objective can be defined as follows:
z∗ = arg min
ˆz
m
(cid:88)
i=1
Linv(T (Ai(G(ˆz, c))), c),
(4)
where ˆz is the latent vector to be optimized, Linv is the max-
margin loss, Ai is a set of random data augmentations, and
m is the number of augmented views. Then we can obtain
the reconstructed images by x∗ = G(z∗, c).
3.4 A Better Loss for MI Attacks
Gradient Vanishing Problem. Existing MI attacks have
commonly adopted the cross-entropy (CE) loss as Linv.
During attack optimization, the CE loss will cause the gradi-
ent to decrease and tend to vanish as the number of iterations
is increased. For the target class c, the derivative of cross-
entropy loss LCE with respect to the output logits o can be
derived as (see Appendix for derivation):
∂LCE
∂o
= p − yc.
(5)
LG = − Eq( ̃y)
(cid:2)Ep(z) [D(G(z, ̃y), ̃y))](cid:3) +
αLinv(T (A(G(z, ̃y))), ̃y),
(3)
Here, p is the probability vector of the softmax output, that
is p = [p1, p2, . . . , pK], pc ∈ [0, 1] denotes the predicted
KED-MIPrivateOursPublicAttack Acc ↑
Top-5 Attack Acc ↑
KNN Dist ↓
FID ↓
GMI
.21±.0028
.42±.0021
1712.57
42.86
VGG16
KED-MI
.63±.0018
.87±.0015
1391.52
30.92
Ours
GMI
ResNet-152
KED-MI
Ours
GMI
Face.evoLVe
KED-MI
.97±.0001
1.±.0000
1120.61
18.63
.31±.0035
.55±.0045
1630.25
42.50
.74±.0028
.93±.0006
1323.16
26.23
1.±.0000
1.±.0000
1026.71
23.22
.29±.0030
.54±.0040
1638.94
41.53
.74±.0013
.94±.0009
1310.15
27.92
Ours
.99±.0001
1.±.0000
1103.03
26.75
Table 1: Attack performance comparison on various models trained on CelebA. ↑ and ↓ respectively symbolize that higher and
lower scores give better attack performance.
Attack Acc ↑ Attack Acc 5 ↑ KNN Dist ↓ FID↓ Attack Acc ↑ Attack Acc 5 ↑ KNN Dist↓
FID↓
FFHQ → CelebA
FaceScrub → CelebA
VGG16
Face.evoLVe
ResNet-152
GMI
KED-MI
Ours
GMI
KED-MI
Ours
GMI
KED-MI
Ours
.11±.0009
.34±.0026
.89±.0006
.13±.0009
.47±.0021
.95±.0004
.17±.0026
.74±.0028
1.±.0000
.27±.0048
.62±.0015
.97±.0002
.31±.0028
.74±.0013
.99±.0001
.37±.0030
.93±.0006
1.±.0000
1771.34
1555.57
1284.16
1739.88
1489.67
1241.41
1687.82
1323.16
1026.71
57.05
49.51
27.32
56.66
44.48
25.57
47.11
26.23
23.22
.02±.0004
.05±.0008
.55±.0020
.03±.0004
.09±.0006
.57±.0013
.04±.0011
.15±.0011
.68±.0020
.07±.0008
.14±.0006
.77±.0012
.10±.0012
.24±.0019
.78±.0012
.14±.0020
.36±.0020
.87±.0011
1997.16
1772.85
1474.22
1918.40
1712.31
1502.82
1865.44
1636.81
1360.67
150.19
97.56
27.99
112.96
99.78
34.10
109.16
72.72
27.49
Table 2: Attack performance comparison in the presence of a large distributional shift between public and private data. A → B
represents the GAN and target model trained on datasets A and B, respectively.
probability of class c. yc is the one-hot encoded vector of
class c, that is, yc = [01, . . . , 1c, . . . , 0K]. Then, Eq. (5) can
be rewritten as:
∂LCE
∂o
= [p1, . . . , pc − 1, . . . pK] .
(6)
According to Eq. (6), as the generated image gradually ap-
proaches the target class during optimization, pc will quickly
reach 1 while pi(cid:54)=c will continue to decrease to 0. Eventually,
this changing trend will cause the gradient of LCE to vanish,
making it difficult to search the latent vector of the generator.
Max-Margin Loss. To address this problem, we propose
to replace the CE loss with the max-margin loss, which
has been used in adversarial attacks to produce stronger at-
tacks (Carlini and Wagner 2017; Sriramanan et al. 2020). In
addition, we eliminate the softmax function and optimize the
loss directly on the logits. The max-margin loss LMM we use
as Linv is as follows:
LMM = −lc(x) + max
j(cid:54)=c
lj(x),
(7)
where lc denotes the logit with respect to the target class c.
For the target class c, the derivative of LMM with respect to
the logits can be derived as (see Appendix for derivation):
∂LMM
∂o
= yj − yt,
(8)
where yj and yt represent one-hot encoded vectors, so the
elements of the gradient consist of constants, thus avoiding
gradient vanishing problem. Moreover, max-margin loss en-
courages the algorithm to find the most representative sam-
ple in the target class while also distinguishing it from other
classes. Compared with the cross-entropy loss, max-margin
loss is more in line with the goal of MI attacks (further com-
parisons are given in the Appendix).
4 Experiments
In this section, we first provide a detailed introduction of
the experimental settings. To demonstrate the effectiveness
of our methods, we evaluate the proposed PLG-MI attack
from several perspectives. The baselines that we will com-
pare against are GMI proposed in (Zhang et al. 2020) and
KED-MI proposed in (Chen et al. 2021), the latter achieved
the state-of-the-art result for attacking DNNs.
4.1 Experimental Setting
Datasets. For face recognition, we select three widely
used datasets for experiments: CelebA (Liu et al. 2015),
FFHQ (Karras, Laine, and Aila 2019) and FaceScrub (Ng
and Winkler 2014). CelebA contains 202,599 face images
of 10,177 identities with coarse alignment. FFHQ consists
of 70,000 high-quality PNG images and contains consid-
erable variation in terms of age, ethnicity and image back-
ground. FaceScrub is a dataset of URLs for 100,000 images
of 530 individuals. Similar to previous work (Zhang et al.
2020; Chen et al. 2021; Kahla et al. 2022), we crop the im-
ages of all datasets at the center and resize them to 64 × 64.
More experiments on MNIST (LeCun et al. 1998), CIFAR-
10 (Krizhevsky, Hinton et al. 2009) and ChestX-Ray (Wang
et al. 2017) can be found in the Appendix.
Models. Following the setting of the state-of-the-art MI at-
tack (Chen et al. 2021), we evaluate our attack on three deep
models with various architectures: (1) VGG16 (Simonyan
and Zisserman 2014); (2) Face.evoLVe (Cheng et al. 2017);
and (3) ResNet-152 (He et al. 2016).
Implementation Details.
In the standard setting, previous
MI attacks usually split the dataset into two disjoint parts:
FaceScrub → CelebA
VGG16
Face.evoLVe
ResNet-152
Attack Acc ↑ KNN Dist ↓
FID ↓ Attack Acc ↑ KNN Dist ↓ FID ↓ Attack Acc ↑ KNN Dist ↓ FID ↓
VGG16
Face.evoLVe
ResNet-152
KED-MI
Ours
KED-MI
Ours
KED-MI
Ours
.05±.0008
.55±.0020
.05±.0006
.54±.0019
.06±.0004
.57±.0019
1772.85
1474.22
1773.14
1472.86
1776.78
1427.91
97.56
27.99
103.00
31.16
107.75
28.35
.10±.0006
.76±.0017
.09±.0006
.57±.0013
.12±.0012
.68±.0026
1694.13
1356.23
1712.31
1502.82
1697.37
1385.99
87.79
25.57
99.78
34.10
88.28
27.30
.12±.0009
.81±.0016
.13±.0018
.71±.0015
.15±.0011
.68±.0020
1638.34
1282.36
1646.85
1390.84
1636.81
1360.67
87.24
23.74
96.04
27.84
72.72
27.49
Table 3: Attack performance comparison when using models with different architectures in the GAN training stage and the
image reconstruction stage. The public dataset is FaceScrub which has a larger distributional shift with CelebA.
one part used as the private dataset to train the target model
and the other as the public dataset. For training the tar-
get model, we use 30,027 images of 1,000 identities from
CelebA as the private dataset. The disjoint part of CelebA
is used to train the generator. However, this setting is too
easy under our stronger PLG-MI attack. Therefore we focus
on the scenario where the public dataset has a larger distri-
butional shift with the private dataset, i.e., using two com-
pletely different datasets. Specifically, we use FFHQ and
FaceScrub as public datasets respectively to train the gen-
erator. We set n = 30 for the top-n selection strategy, that
is, each public dataset consists of 30,000 selected images
that are reclassified into 1,000 classes by pseudo-labels. In
stage-1, the GAN architecture we use is based on (Miyato
and Koyama 2018). We apply spectral normalization (Miy-
ato et al. 2018) to the all of the weights of the discriminator
to regularize the Lipschitz constant. To train the GAN, we
used Adam optimizer with a learning rate of 0.0002, a batch
size of 64 and β = (0, 0.9). The hyperparameter α in Eq. (3)
is set to 0.2. In stage-2, we use the Adam optimizer with a
learning rate of 0.1 and β = (0.9, 0.999). The input vector
z of the generator is drawn from a zero-mean unit-variance
Gaussian distribution. We randomly initialize z for 5 times
and optimize each round for 600 iterations.
4.2 Evaluation Metrics
The evaluation of the MI attack is based on the similarity
of the reconstructed image and the target class image in the
human-recognizable features. In line with previous work, we
conducted both qualitative evaluation through visual inspec-
tion as well as quantitative evaluation. Specifically, the eval-
uation metrics we used are as follows.
Attack Accuracy (Attack Acc). We first build an evalua-
tion model, which has a different architecture from the tar-
get model. We then use the evaluation model to compute the
top-1 and top-5 accuracy of the reconstructed image on the
target class. Actually, the evaluation model can be viewed
as a proxy for a human observer to judge whether a recon-
struction captures sensitive information. We use the model
in (Cheng et al. 2017) for evaluation, which is pretrained on
MS-Celeb1M (Guo et al. 2016) and then fine-tuned on train-
ing data of the target model.
K-Nearest Neighbor Distance (KNN Dist). Given a tar-
get class, we computed the shortest feature distance from a
reconstructed image to the private images. The distance is
measured by the (cid:96)2 distance between two images in the fea-
ture space, i.e., the output of the penultimate layer of the
evaluation model. A lower value indicates that the recon-
structed image is closer to the private data.
Fr ́echet Inception Distance (FID). FID (Heusel et al.
2017) is commonly used in the work of GAN to evaluate the
generated images. Lower FID values indicate that the recon-
structed images have better quality and diversity, making it
easier for humans to identify sensitive features in them. Fol-
lowing the baseline setting, we only compute FID values on
images where the attack is successful.
4.3 Experimental Results
Standard Setting. We first study the standard setting, i.e.,,
dividing the CelebA dataset into a private dataset and a pub-
lic dataset. As shown in Table 1, our method outperforms the
baselines on all three models. The reconstructed images pro-
duced by our PLG-MI attack can achieve almost 100% accu-
racy on the evaluation model (i.e., Attack Acc), which out-
performs the state-of-the-art method on average by approxi-
mately 30%. Our method is also vastly superior in FID and
KNN Dist, significantly improving the visual quality and the
similarity of reconstructed images to private datasets.
Fig. 4 shows the visual comparison of different methods.
Compared with KED-MI, for different identities in the pri-
vate dataset, our reconstructed images not only have more
similar semantic features to the ground truth images, but are
also more realistic. The second row shows the images of the
public data with the highest confidence in the corresponding
identity of the target model. We use the confidence as the
basis for providing pseudo-labels in the top-n selection strat-
egy. In most cases, the images selected by the strategy can
provide some of the characteristic features needed to recon-
struct the identity, such as gender, hair color and skin tone.
But in terms of details, it can still be easily distinguished that
they are not the same identity. Therefore, the optimization
process of stage-2 is also very critical, and these candidate
features will be further filtered and reorganized to increas-
ingly resemble the target identity.
Larger Distributional Shifts. To further explore scenar-
ios where the baselines performed poorly, we conducted ex-
periments in the setting with larger distributional shifts. As
shown in Table 2, GMI and KED-MI achieve the Attack Acc
of 17% and 74% when exploiting FFHQ to attack ResNet-
152, respectively. Since they do not fully explore the capa-
Figure 5: (a)-(b) Attack performance with different Linv and top-n selection strategy, respectively. (c) Attack Acc and FID with
constraints of various strengths in Eq. (3). (d) Attack Acc and FID with various numbers of augmentations in Eq. (4). (c) and
(d) use FaceScrub as the public dataset.
bility in the target model, the performance is poor in this
more difficult setting. Compared with them, our PLG-MI at-
tack achieves 89% Attack Acc when attacking VGG16 us-
ing FFHQ as public data, which is about 2.5 times higher
than KED-MI. And the Attack Acc reaches more than 95%
when attacking both Face.evoLVe and ResNet-152. In addi-
tion, there is a significant improvement in the FID for eval-
uating visual quality (e.g., a reduction from 49.51 to 27.32).
It should be emphasized that in the case of using Face-
Scrub as the public dataset, both GMI and KED-MI only
obtain an almost failed attack performance. However, our
method still maintains a high attack success rate, on average
50% higher than KED-MI on Attack Acc. As for the FID,
our method maintains a low value in all cases, with an av-
erage reduction of about 3 times relative to KED-MI. The
lower KNN Dist also shows that our method can reconstruct
more accurate private images.
The results of FFHQ as public data are generally better
than those of FaceScrub. The possible reason is that Face-
Scrub consists of face images crawled from the Internet,
which is more different from the distribution of CelebA. Fur-
thermore, we find that the degree of privacy leakage under
MI attacks varies between model architectures. In our ex-
periments, ResNet-152 is more likely to leak information in
private datasets compared to VGG16 and Face.evoLVe. This
phenomenon deserves further study in future work.
Generality of the GAN. The adversary may simultane-
ously perform MI attacks against multiple available target
models to verify the correctness of the reconstructed im-
age for the target identity. However, it will be very time-
consuming to train a GAN separately for a specific tar-
get model each time. Therefore, we explore a new scenario
where the architecture of the classifier used to help train the
GAN is different from that of the target model.
Table 3 compares the results of our method with those
of the baselines. Our method yields clearly superior results
for all three models under various evaluation metrics. When
using VGG16 to provide prior information to train a gener-
ator in stage-1, and using it to attack ResNet-152 in stage-2,
our method achieves 81% Attack Acc, while KED-MI only
achieves 12%. In addition, the FID of KED-MI is approxi-
mately 3 times higher on average than ours.
The experimental results of this scenario illustrate that re-
gardless of the architecture of the models, our method is able
to extract general knowledge to help recover sensitive infor-
mation. Specifically, the generality of our cGAN can greatly
improve the efficiency of attacks when there are multiple
target models to be attacked.
Ablation study. We further investigate the effects of the
various components and hyperparameters in PLG-MI and
conduct attacks against VGG16 trained on CelebA using
FaceScrub or FFHQ as the public dataset. As shown in Fig. 5
(a), we compare the impact of different Linv used in MI at-
tacks. Using the max-margin loss brings a significant im-
provement on Attack Acc, especially when the distributional
shift is larger (i.e., the public dataset is FaceScrub). Fig. 5 (b)
presents the results of using different n in the top-n selection
strategy, its value has no significant impact on the attack per-
formance, indicating that the strategy is not sensitive to n.
Fig. 5 (c) shows the attack performance and visual quality
when imposing explicit constraints of various strengths on
the generator and α = 0.2 is optimal among them. Fig. 5 (d)
shows that the data augmentation module in stage-2 has a
great influence on improving the Attack Acc and the visual
quality of reconstructed images. However, when the number
of augmentations is greater than 2, the improvement in at-
tack performance is small, but the attack efficiency will be
reduced. Thus we finally force the reconstructed images to
maintain identity consistency after 2 random augmentations.
5 Conclusion
In this paper, we propose a novel MI attack method, namely
PLG-MI attack. We introduce the conditional GAN and
use pseudo-labels provided by the proposed top-n selection
strategy to guide the training process. In this way, the search
space in the stage of image reconstruction can be limited to
the subspace of the target class, avoiding the interference of
other irrelevant features. Moreover, we propose to use max-
margin loss to overcome the problem of gradient vanishing.
Experiments show that our method achieves the state-of-the-
art attack performance on different scenarios with various
model architectures. For future work, the black-box MI at-
tack is still in its infancy, and the idea of our method can be
transferred to the black-box scenario to further improve its
performance.
0.00.10.20.30.4AE0.10.20.30.40.50.60.70.8AttackaccAttackAcc203040506070FIDFID10203040Top-n0.20.40.60.81.0AttackAccFFHQFaceScrubFaceScrubFFHQ0.00.20.40.60.8AttackAccCross-EntropyLossMax-MarginLoss(a)(c)(d)(b)01234NumberofAugmentations0.20.30.40.50.60.70.8AttackaccAttackAcc2025303540455055FIDFIDAcknowledgements
This work was supported in part by the Natural Science
Foundation of China under Grant U20B2047, 62102386,
62072421, 62002334 and 62121002.
References
Carlini, N.; and Wagner, D. 2017. Towards evaluating the
robustness of neural networks. In IEEE Symposium on Se-
curity and Privacy, 39–57.
Chen, S.; Kahla, M.; Jia, R.; and Qi, G.-J. 2021. Knowledge-
In Pro-
Enriched Distributional Model Inversion Attacks.
ceedings of the IEEE/CVF International Conference on
Computer Vision, 16178–16187.
Cheng, Y.; Zhao, J.; Wang, Z.; Xu, Y.; Jayashree, K.; Shen,
S.; and Feng, J. 2017. Know you at one glance: A compact
vector representation for low-shot learning. In Proceedings
of the IEEE/CVF International Conference on Computer Vi-
sion Workshops, 1924–1932.
Cohen, J. P.; Morrison, P.; and Dao, L. 2020. COVID-19
image data collection. arXiv preprint arXiv:2003.11597.
Dai, Z.; Yang, Z.; Yang, F.; Cohen, W. W.; and Salakhut-
dinov, R. R. 2017. Good semi-supervised learning that re-
quires a bad gan. Advances in Neural Information Process-
ing Systems, 30.
Fredrikson, M.; Jha, S.; and Ristenpart, T. 2015. Model
inversion attacks that exploit confidence information and
In Proceedings of the 22nd ACM
basic countermeasures.
SIGSAC Conference on Computer and Communications Se-
curity, 1322–1333.
Fredrikson, M.; Lantz, E.; Jha, S.; Lin, S.; Page, D.; and Ris-
tenpart, T. 2014. Privacy in Pharmacogenetics: An {End-to-
End} Case Study of Personalized Warfarin Dosing. In 23rd
USENIX Security Symposium, 17–32.
Gopinath, D.; Converse, H.; Pasareanu, C.; and Taly, A.
2019. Property inference for deep neural networks. In 34th
IEEE/ACM International Conference on Automated Soft-
ware Engineering, 797–809.
Guo, Y.; Zhang, L.; Hu, Y.; He, X.; and Gao, J. 2016. Ms-
celeb-1m: A dataset and benchmark for large-scale face
recognition. In European Conference on Computer Vision,
87–102.
He, K.; Zhang, X.; Ren, S.; and Sun, J. 2016. Deep resid-
In Proceedings of the
ual learning for image recognition.
IEEE/CVF Conference on Computer Vision and Pattern
Recognition, 770–778.
Heusel, M.; Ramsauer, H.; Unterthiner, T.; Nessler, B.; and
Hochreiter, S. 2017. Gans trained by a two time-scale up-
date rule converge to a local nash equilibrium. Advances in
Neural Information Processing Systems, 30.
Kahla, M.; Chen, S.; Just, H. A.; and Jia, R. 2022. Label-
Only Model Inversion Attacks via Boundary Repulsion. In
Proceedings of the IEEE/CVF Conference on Computer Vi-
sion and Pattern Recognition, 15045–15053.
Karras, T.; Laine, S.; and Aila, T. 2019. A style-based gen-
In
erator architecture for generative adversarial networks.
Proceedings of the IEEE/CVF Conference on Computer Vi-
sion and Pattern Recognition, 4401–4410.
Karras, T.; Laine, S.; Aittala, M.; Hellsten, J.; Lehtinen, J.;
and Aila, T. 2020. Analyzing and improving the image qual-
ity of stylegan. In Proceedings of the IEEE/CVF Conference
on Computer Vision and Pattern Recognition, 8110–8119.
Krizhevsky, A.; Hinton, G.; et al. 2009. Learning multiple
layers of features from tiny images. Tech Report.
LeCun, Y.; Bottou, L.; Bengio, Y.; and Haffner, P. 1998.
Gradient-based learning applied to document recognition.
Proceedings of the IEEE, 86(11): 2278–2324.
Li, M.; Deng, C.; Li, T.; Yan, J.; Gao, X.; and Huang, H.
2020. Towards transferable targeted attack. In Proceedings
of the IEEE/CVF Conference on Computer Vision and Pat-
tern Recognition, 641–649.
Liu, Z.; Luo, P.; Wang, X.; and Tang, X. 2015. Deep learning
face attributes in the wild. In Proceedings of the IEEE/CVF
International Conference on Computer Vision, 3730–3738.
Miyato, T.; Kataoka, T.; Koyama, M.; and Yoshida, Y. 2018.
Spectral normalization for generative adversarial networks.
arXiv preprint arXiv:1802.05957.
Miyato, T.; and Koyama, M. 2018. cGANs with projection
discriminator. arXiv preprint arXiv:1802.05637.
Ng, H.-W.; and Winkler, S. 2014. A data-driven approach to
cleaning large face datasets. In IEEE International Confer-
ence on Image Processing, 343–347.
Rajpurkar, P.; Irvin, J.; Zhu, K.; Yang, B.; Mehta, H.; Duan,
T.; Ding, D.; Bagul, A.; Langlotz, C.; Shpanskaya, K.;
et al. 2017. Chexnet: Radiologist-level pneumonia detec-
arXiv preprint
tion on chest x-rays with deep learning.
arXiv:1711.05225.
Salimans, T.; Goodfellow, I.; Zaremba, W.; Cheung, V.; Rad-
ford, A.; and Chen, X. 2016. Improved techniques for train-
ing gans. Advances in Neural Information Processing Sys-
tems, 29.
Shokri, R.; Stronati, M.; Song, C.; and Shmatikov, V. 2017.
Membership inference attacks against machine learning
In IEEE Symposium on Security and Srivacy, 3–
models.
18.
Simonyan, K.; and Zisserman, A. 2014. Very deep convo-
lutional networks for large-scale image recognition. arXiv
preprint arXiv:1409.1556.
Sriramanan, G.; Addepalli, S.; Baburaj, A.; et al. 2020.
Guided adversarial attack for evaluating and enhancing ad-
versarial defenses. Advances in Neural Information Process-
ing Systems, 33: 20297–20308.
Struppek, L.; Hintersdorf, D.; Correia, A. D. A.; Adler, A.;
and Kersting, K. 2022. Plug & Play Attacks: Towards Ro-
bust and Flexible Model Inversion Attacks. In Proceedings
of the 39th International Conference on Machine Learn-
ing (ICML), Proceedings of Machine Learning Research,
20522–20545. PMLR.
Taigman, Y.; Yang, M.; Ranzato, M.; and Wolf, L. 2014.
Deepface: Closing the gap to human-level performance in
face verification. In Proceedings of the IEEE/CVF Confer-
ence on Computer Vision and Pattern Recognition, 1701–
1708.
Tram`er, F.; Zhang, F.; Juels, A.; Reiter, M. K.; and Risten-
part, T. 2016. Stealing Machine Learning Models via Pre-
diction {APIs}. In 25th USENIX Security Symposium, 601–
618.
Wang, K.-C.; Fu, Y.; Li, K.; Khisti, A.; Zemel, R.; and
Makhzani, A. 2021. Variational Model Inversion Attacks.
Advances in Neural Information Processing Systems, 34:
9706–9719.
Wang, X.; Peng, Y.; Lu, L.; Lu, Z.; Bagheri, M.; and Sum-
mers, R. M. 2017. Chestx-ray8: Hospital-scale chest x-ray
database and benchmarks on weakly-supervised classifica-
In Pro-
tion and localization of common thorax diseases.
ceedings of the IEEE/CVF Conference on Computer Vision
and Pattern Recognition, 2097–2106.
Zhang, Y.; Jia, R.; Pei, H.; Wang, W.; Li, B.; and Song,
D. 2020. The secret revealer: Generative model-inversion
In Proceedings of
attacks against deep neural networks.
the IEEE/CVF Conference on Computer Vision and Pattern
Recognition, 253–261.
A Appendix
A.1 The Derivatives of Cross-Entropy Loss and
Max-Margin Loss
Cross-Entropy Loss We define the CE loss for the K-
classification task as follows:
L = −
K
(cid:88)
i=1
yi log (pi) ,
(9)
where yi denotes the one-hot encoded vector of class i, in
which only the ith element yi is 1, and the rest are 0. (i.e.,
yi = [01, . . . , 1i, . . . , 0K]). Thus, for the specified target
class t, Eq. (9) can be rewritten as:
L = − log(pt).
(10)
Here, we denote the logits of the model output as o =
[o1, . . . , ot, . . . , oK], and denote the softmax output (i.e.,
probability vector) as p = [p1, . . . , pt, . . . , pK]. Then, the
derivative of the CE Loss (L) with respect to the logits (o) is
as follow:
∂L
∂o
=
∂L
∂p
∂p
∂o
.
(11)
It can be seen from Eq. (10) that L is only related to pt, so
we can get:
∂L
∂p
(cid:20)
01, . . . , −
=
(cid:21)
, . . . , 0K
.
1
pt
And ∂p
∂o of Eq. (11) is a Jacobian matrix, as follows:
∂p
∂o
=
∂p1
∂o1
...
∂pj
∂o1
...
∂pK
∂o1
∂p1
∂o2
...
∂pj
∂o2
...
∂pK
∂o2
.
* * * ∂p1
∂oK
. . .
* * * ∂pj
∂oK
. . .
* * * ∂pK
∂oK
(12)
(13)
As only the element in row t is not 0 in Eq. (13), we arrive
at:
∂LCE
∂o
=
∂LCE
∂p
where pt =
(cid:80)K
= −
∂p
∂o
eoj
i=1 eoi
.
1
pt
∂pt
∂o
(14)
With Eq. (14), for the case where i (cid:54)= t, the derivative of CE
loss is as follows:
∂L
∂oi
=
=
∂L
∂pt
∂L
∂pt
∂pt
∂oi
0 − eoteoi
(cid:16)(cid:80)K
i=1 eoi
(cid:17)2
)(−ptpi)
1
pt
= (−
= pi.
(15)
And for the case where i = t, the derivative of CE loss is as
follows:
∂L
∂oi
=
=
∂L
∂pt
∂L
∂pt
∂pt
∂oi
eot (cid:80)K
i=1 eoi − eoteot
(cid:16)(cid:80)K
i=1 eoi
(cid:17)2
= (−
1
pt
) (cid:0)pt − p2
t
(cid:1)
= pt − 1.
(16)
From Eq. (15) and Eq. (16), we derive the final derivative of
CE loss as:
∂L
∂o
= [p1, . . . , pt − 1, . . . pK]
(17)
= [p1, . . . , pt, . . . pK] − [01, . . . , 1t, . . . , 0K]
= p − yt.
Max-Margin Loss. Without loss of generality, we can de-
fine the max-margin loss for a target class t as follows:
L = oj − ot,
(18)
where j = arg maxi(cid:54)=t oi indicates the highest class except
for the target class t. We denote the derivative of L to the
logits o as ∂L
∂o . It can be deduced that ∂L
= 0 when i (cid:54)= j
∂oi
and i (cid:54)= t, and ∂L
is 1 and −1 when i = j and i = t,
∂oi
respectively. Thus, we finally derive at:
∂L
∂o
= yj − yt.
(19)
A.2 Experiments on Other Datasets
We also perform MI attacks on the digit recognition task, the
object classification task, and the disease prediction task, us-
ing the MNIST (LeCun et al. 1998), CIFAR-10 (Krizhevsky,
Hinton et al. 2009), and ChestX-Ray (Wang et al. 2017)
datasets for experiments, respectively.
Experimental Details. For MNIST and CIFAR-10, we
use the images in the training data with labels 0, 1, 2, 3,
and 4 as the private data, containing 30,596 and 25,000 im-
ages, respectively. The rest images with labels 5, 6, 7, 8, and
9 are used as the public data, containing 29,404 and 25,000
images, respectively. We adopt ResNet-18 trained on the pri-
vate data as the target model. As for the evaluation model,
we train VGG16 on the original training data instead of the
private data to better distinguish deceptive reconstructed im-
ages. For ChestX-Ray, we use 14 classes of images with dis-
eases as the private data to train the target model ResNet-
18. Then, we randomly select 20,000 images from the class
with the label "NoFinding" (i.e., no disease) as the public
data to train the evaluation model ResNet-34. Furthermore,
we also use a different COVID19 dataset (Cohen, Morrison,
and Dao 2020) with 21,165 images as the public data. All
images from above datasets are resized to 64 × 64. n for
the top-n selection strategy is set to 4,000 for MNIST and
CIFAR-10, and 1,000 for ChestX-Ray. The learning rates in
stage-2 are set to 0.1 and 0.001, respectively, for 300 itera-
tions. We reconstruct 100 images per class for MNIST and
CIFAR-10, and 10 images per class for Chest-X-ray.
NoFinding → ChestX-Ray COVID19 → ChestX-Ray
KED-MI
Attack Acc ↑ .71±.0034
KNN Dist ↓
FID ↓
Ours
.80±.0020
84.56
47.51
Ours
.82±.0048
82.71
64.33
KED-MI
.68±.0026
113.18
109.41
97.26
97.35
Figure 6: The digit "3" samples of MNIST reconstructed by
the baseline and our method.
Experimental Results. As shown in Table 4, our method
comprehensively outperforms the baselines by a large mar-
gin on MINST and CIFAR-10 datasets. When attacking the
digit recognition model trained on MNIST, GMI performs
very poorly. Although KED-MI can slightly improve the at-
tack accuracy, it cannot reconstruct the private images of the
digit "3" well, as shown in Fig. 6. In contrast, our method re-
duces interference between different classes, thus allowing
private images to be reconstructed with good visual quality
on each class. Similar visual comparisons on CIFAR-10 are
also shown in Fig. 7. Our method not only significantly out-
performs GMI and KED-MI in terms of image realism, but
also recovers more accurate semantic information of private
classes. It is difficult for GMI to reconstruct accurate private
images, while KED-MI tends to reconstruct deceptive im-
ages that can be classified by the target model but have few
human-recognizable features.
The results of ChestX-Ray are shown in Table 5. Com-
pared to KED-MI, our method improves the attack accu-
racy by an average of 12% under the two different public
datasets. Meanwhile, the FID is even reduced from 109.41
to 47.51 when the public data is COVID19. We also provide
the visual comparison of the private data reconstructed by
KED-MI and our method, as shown in Fig. 8.
MNIST
CIFAR10
GMI
KED-MI
Ours
GMI
KED-MI
Ours
Attack Acc ↑ KNN Dist ↓ FID ↓
137.53
116.47
77.68
198.18
141.18
83.43
.03±.0054
.29±.0228
.60±.0465
.11±.0173
.50±.0392
.76±.0318
171.18
78.67
38.33
38.50
15.49
5.11
Table 4: Attack performance comparison on MNIST and CI-
FAR10.
Table 5: Attack performance comparison with KED-MI on
ChestX-Ray.
Figure 7: CIFAR-10 samples reconstructed by the baselines
and our method.
quality of the generated images. Moreover, Dai et al. (Dai
et al. 2017) theoretically analyzes that there is a trade-off
between the quality of the discriminator and the generator.
Obviously, this framework is not suitable for generative MI
attacks, since what we need in stage-2 is a good and accurate
generator, contrary to the goal of semi-supervised GAN.
Rather than searching the latent vector of each recon-
structed image as GMI and our method, KED-MI proposed
to search for a distribution N (μ, σ2) with two learnable pa-
rameters μ and σ2 for each target class, and the latent vectors
can be obtained by randomly sampling from the learned dis-
tribution. However, it is very difficult to learn an accurate
class distribution by N (μ, σ2) when the inner-class distri-
bution of the private dataset varies greatly (e.g., CIFAR-10).
As a result, latent vectors sampled from such a distribution
are far from the manifold of natural images, although the
produced images may be close to private classes in feature
space. Whereas we use a more powerful conditional GAN to
model the distribution of each private class, making it pos-
sible to handle more diverse datasets. In addition, we also
perform random transformations on the generated images
during the search process to further filter deceptive or ad-
versarial samples.
Analysis on the Failure of KED-MI. As mentioned in the
main manuscript, the KED-MI adopts the semi-supervised
GAN framework and uses the feature-matching loss to train
the generator. However, as demonstrated in (Salimans et al.
2016), the feature-matching loss works better if the goal is
to obtain a strong classifier (i.e., the discriminator) using
the semi-supervised GAN, otherwise it reduces the visual
A.3 Empirical Comparisons of Different Linv
We note that a concurrent work (Struppek et al. 2022) also
has a similar observation of the gradient vanishing problem
when using cross-entropy loss in MI attacks. Inspired by (Li
et al. 2020), they adopt a more complex poincar ́e loss as
TargetKED-MIOursOursairplaneautomobilebirdcatdeerKED-MIGMIFigure 8: ChestX-Ray samples reconstructed by the baseline (KED-MI) and our method when using COVID19 as the public
dataset. Each column represents one category of the 14 diseases.
follows:
LPoincar ́e = d(u, v)
(cid:18)
= arcosh
1 +
2(cid:107)u − v(cid:107)2
2
2) (1 − (cid:107)v(cid:107)2
2)
(1 − (cid:107)u(cid:107)2
(cid:19)
,
(20)
u =
u
(cid:107)u(cid:107)1
, v = max{v − ξ, 0},
where u is the logits normalized by the (cid:96)1 distance, and v
is the one-hot encoded target vector with respect to the tar-
get class. ξ = 10−5 is a small constant to ensure numerical
stability.
In the main manuscript, we theoretically compare the
cross-entropy loss and the proposed max-margin loss. Here,
we further empirically compare them with the additional
poincar ́e loss mentioned in Eq. (20). Specifically, we take
these three losses as Linv respectively in the iterative pro-
cess of stage-2, and plot the trend curves of gradient values,
loss values, and target logit values. Since the gradient values
of different losses have a gap, we rescale the gradient val-
ues by dividing (cid:107)g0(cid:107)1, where g0 is the gradient of the first
iteration. The (cid:96)1 norm of the gradient (cid:107)gi(cid:107)1 represents its
gradient value. Similarly, the loss values are also rescaled
by dividing its value of the first iteration. We use FFHQ and
CelebA as the public and private dataset, respectively. Then,
we use VGG16 as the target model to attack the first 100
classes of CelebA and take their average results for plotting.
From Fig. 9 (a), we can see that the gradient of the cross-
entropy loss quickly decreases to 0 as the number of it-
erations increases, indicating the existence of the gradient
vanishing problem. Meanwhile, the max-margin loss main-
tains a more stable gradient magnitude than the poincar ́e
loss over the iterations, i.e., the degradation is more slight.
In Fig. 9 (b), the value of the cross-entropy loss also quickly
decreases to 0 due to the gradient vanishing, while the value
of poincar ́e loss keeps almost unchanged, which may make
it difficult to judge the optimization situation. In contrast,
the max-margin loss can be minimized continuously over
the iterations with relatively stable gradients. As shown in
Fig. 9 (c), the max-margin loss can make the logit value of
the target class steadily increase over the iterations to reach
a higher value, while the cross-entropy loss and poincar ́e
loss gradually tend to a relatively constant value in the later
iterations. In addition, Fig. 10 shows the attack perfor-
mance when using these three losses separately in stage-2 of
our method, demonstrating that the max-margin loss outper-
forms the other two losses, especially when there is a larger
distributional shift between public and private data.
A.4 More Discussions on the Concurrent Work
Apart from the loss function, the other differences between
our method and the concurrent work (Struppek et al. 2022)
are three-fold. First, the motivations are different: we pro-
pose to design a more powerful general MI attack frame-
work, while they aim to omit the training process of stage-
1 to achieve plug-and-play. Second, based on the different
goals, the technical contributions are different: we propose a
Private DataKED-MIOursFigure 9: (a)-(c) are the trend curves of the rescaled gradient values, the rescaled loss values, and the target logit values for
different losses over the iterations, respectively.
Figure 10: Comparison of attack performance when using
different losses in the image reconstruction stage.
top-n selection strategy and aim to train a class-independent
generator to search private images more accurately, while
they focus on extending the reconstruction process in stage-
2 to reduce the dependence on the trained generator. Third,
the application scenarios are different: what we propose is
a general attack method that can be applied to tasks trained
on various sensitive data (e.g, disease diagnosis), while their
method relies on the task of the publicly available pre-
trained GAN and can not applicable for some unique tasks.
Overall, our method differs from (Struppek et al. 2022) in
terms of motivation, technical contributions, and application
scenarios.
(a)(b)(c)FaceScrubFFHQ0.00.20.40.60.8AttackAccLCELPoincar ́eLMax-Margin |
|
http://arxiv.org/abs/2302.09813v1 | 2023-02-20T07:29:22 | 2023-02-20T07:29:22 | Audit to Forget: A Unified Method to Revoke Patients' Private Data in
Intelligent Healthcare | Revoking personal private data is one of the basic human rights, which has
already been sheltered by several privacy-preserving laws in many countries.
However, with the development of data science, machine learning and deep
learning techniques, this right is usually neglected or violated as more and
more patients' data are being collected and used for model training, especially
in intelligent healthcare, thus making intelligent healthcare a sector where
technology must meet the law, regulations, and privacy principles to ensure
that the innovation is for the common good. In order to secure patients' right
to be forgotten, we proposed a novel solution by using auditing to guide the
forgetting process, where auditing means determining whether a dataset has been
used to train the model and forgetting requires the information of a query
dataset to be forgotten from the target model. We unified these two tasks by
introducing a new approach called knowledge purification. To implement our
solution, we developed AFS, a unified open-source software, which is able to
evaluate and revoke patients' private data from pre-trained deep learning
models. We demonstrated the generality of AFS by applying it to four tasks on
different datasets with various data sizes and architectures of deep learning
networks. The software is publicly available at
\url{https://github.com/JoshuaChou2018/AFS}. | [
"Juexiao Zhou",
"Haoyang Li",
"Xingyu Liao",
"Bin Zhang",
"Wenjia He",
"Zhongxiao Li",
"Longxi Zhou",
"Xin Gao"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09813v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09813v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.CR"
] | 3
2
0
2
b
e
F
0
2
]
G
L
.
s
c
[
1
v
3
1
8
9
0
.
2
0
3
2
:
v
i
X
r
a
AFS
1
Audit to Forget: A Unified Method to Revoke
Patients' Private Data in Intelligent Healthcare
Juexiao Zhou1,2,#, Haoyang Li1,2,#, Xingyu Liao1,2, Bin Zhang1,2, Wenjia He1,2, Zhongxiao Li1,2, Longxi
Zhou1,2, Xin Gao1,2,∗
Abstract-Revoking personal private data is one of the basic human rights, which has already been sheltered by several
privacy-preserving laws in many countries. However, with the development of data science, machine learning and deep learning
techniques, this right is usually neglected or violated as more and more patients' data are being collected and used for model training,
especially in intelligent healthcare, thus making intelligent healthcare a sector where technology must meet the law, regulations, and
privacy principles to ensure that the innovation is for the common good. In order to secure patients' right to be forgotten, we proposed a
novel solution by using auditing to guide the forgetting process, where auditing means determining whether a dataset has been used to
train the model and forgetting requires the information of a query dataset to be forgotten from the target model. We unified these two
tasks by introducing a new approach called knowledge purification. To implement our solution, we developed AFS, a unified
open-source software, which is able to evaluate and revoke patients' private data from pre-trained deep learning models. We
demonstrated the generality of AFS by applying it to four tasks on different datasets with various data sizes and architectures of deep
learning networks. The software is publicly available at https://github.com/JoshuaChou2018/AFS.
Index Terms-Healthcare, Privacy, Deep learning, Machine unlearning, Knowledge purification.
(cid:70)
1 INTRODUCTION
R EVOKING personal private data is one of the basic
human rights, which has already been sheltered by
privacy-preserving regulations like The General Data Pro-
tection Regulation (GDPR) [1], The Health Insurance Porta-
bility and Accountability Act of 1996 (HIPAA) [2], and the
California Consumer Privacy Act [3] since 20th century.
With those regulations, users are allowed to request the
deletion of their own data for privacy concerns and to secure
their own 'right to be forgotten'. However, with the develop-
ment of data science, machine learning (ML) and deep learn-
ing (DL) techniques, this basic right is usually neglected or
violated. For example, it has been observed that patients'
genetic markers were leaked from ML methods for genetic
data processing [4], [5] while the patients were unaware of
that. When users realize the existence of such risks, they
may request their own data to be deleted to protect their
privacy [6]. Meanwhile, those aforementioned regulations
will force involved third parties to take actions immediately.
According to the requirements of those regulations, not only
the previously authorized data by individuals need to be
deleted immediately from hosts' storage systems but also
1Computer Science Program, Computer, Electrical and Mathematical Sciences
and Engineering Division, King Abdullah University of Science and Technol-
ogy (KAUST), Thuwal 23955-6900, Kingdom of Saudi Arabia
2Computational Bioscience Research Center, King Abdullah University of
Science and Technology, Thuwal 23955-6900, Kingdom of Saudi Arabia
∗Corresponding author
#Equal contribution
the associated information should be removed from DL
models trained with those data, because DL models could
memorize sensitive information of training data and thus
expose individual's privacy under risk [7], [8], [9], [10], [11].
Nowadays, healthcare is one of the most promising areas
for the deployment of artificial intelligent (AI) systems as so-
called intelligent healthcare. ML and DL-based computer-
aided diagnosis (CAD) systems in intelligent healthcare
accelerate the diagnosis of various diseases and achieve
even better results than doctors, such as tumour detection
[12], [13], retinal fundus imaging [14], detection and seg-
mentation of COVID-19 lung infections [15], [16] and so on.
However, as more and more patients' data are being col-
lected and used for model training in intelligent healthcare,
their privacy is exposed to high risk. Therefore, intelligent
healthcare is a sector where technology must meet the
law, regulations, and privacy principles to ensure that the
innovation is for the common good [17]. To obey those
privacy-preserving regulations, methods to revoke personal
private data from pre-trained DL models are necessary.
Deleting the stored personal data is simple, whereas
forgetting individuals' private information from pre-trained
DL models could be difficult as we could not fully measure
the contribution of individual data on the training process of
DL models due to the stochasticity of training [18]. Besides,
due to the incremental nature of training, the model update
brought by one sample would affect the model performance
AFS
2
on samples followed, thus making it difficult to unlearn
[18]. Finally, catastrophic unlearning might happen and
the unlearned model will perform worse than the model
retrained on the remaining dataset [19].
In general, the process to forget data from a pre-trained
DL model could be divided into two steps. Firstly, the
unlearning process (forgetting) is performed on a given pre-
trained DL model to forget the target data with different
techniques and a new DL model will be generated. Secondly,
an evaluation of the new model (auditing) against different
metrics will be performed to prove that the model has
forgotten the target data. These two processes should be
repeated until the new model passes the evaluation. In sim-
ple terms, there are two commonly acknowledged sub-tasks,
which could also be stated in the reverse order: auditing and
forgetting, as a two-player game. Auditing requires auditors
to precisely evaluate whether the data of certain patients
were used to train the target DL model. Once the data of
certain patients is confirmed to be used to train the target
DL model by auditing, forgetting requires the removal of
learnt information of certain patients' data from the target
DL model, which is also called machine unlearning, while
auditing could act as the verification of machine unlearning
[18]
In order to achieve forgetting, existing unlearning meth-
ods could be classified into three major classes, includ-
ing model-agnostic methods, model-intrinsic methods and
data-driven methods [20]. Model-agnostic methods refer to
algorithms or frameworks that can be used for different DL
models, including differential privacy [18], [21], [22], certi-
fied removal [23], [24], [25], statistical query learning [6],
decremental learning [26], knowledge adaptation [27], [28]
and parameter sampling [29]. Model-intrinsic approaches
are those methods designed for specific types of models,
such as for softmax classifiers [30], linear models [31], tree-
based models [32] and Bayesian models [19]. Data-driven
approaches focus on the data itself, including data parti-
tioning [18], data augmentation [33], [34], [35] and other
unlearning strategies based on data influence [36]. All meth-
ods have their specific application scenarios and limitations.
Among the three methods, model-agnostic methods might
have the strongest application prospects, as they can be
applied to different models. Still, more mechanisms and
theoretical concepts are being proposed to explore different
solutions to the forgetting task but few of them focused on
the application in real-world intelligent healthcare.
When forgetting is accomplished, auditing is the next
necessary step to verify it. Different metrics have been
proposed to audit the membership of the query dataset,
including accuracy, completeness [6], unlearn time, relearn
time, retrain time, layer-wise distance, activation distance,
JS-divergence, membership inference [37], [38], ZRF score
[27], epistemic uncertainty [39] and model inversion attack
[7]. In recent studies, membership inference-based metrics
were frequently utilized to determine whether or not any
information about the samples to be forgotten was retained
in the model in intelligent healthcare [38]. A black-box set-
ting was shared by the membership inference attack (MIA)
to calculate the probability of a single datapoint being a
member of the training dataset D. Based on this individual
level MIA, Liu et al. [37] and Yangsibo et al. [38] focused
on a more challenging task: audit the membership of a set
of data points. The ensembled membership auditing (EMA)
[38] was proposed as the state-of-the-art method to verify
whether a query dataset is memorized by a pre-trained
DL model, which is also a benchmark metric in machine
unlearning. However, due to the black box property of DL
models, efficient and accurate auditing is still challenging
and an under-studied topic. Moreover, researchers have
tended to treat auditing and forgetting as separate tasks,
ignoring the fact that the two can be linked up associatively
to work as a self-consistent mechanism.
Here, we proposed a novel solution by using auditing to
guide the forgetting process in a negative feedback man-
ner. We unified the two tasks by introducing knowledge
purification (KP), a new approach to selectively transfer the
needed knowledge to forget the target information instead
of simply transferring all information like knowledge distil-
lation (KD) [40]. On the basis of KP, we have developed a
user-friendly and open-source method called AFS, which
can be easily used to revoke patients' private data from
DL models in intelligent healthcare. To demonstrate the
generality of AFS, we applied it to four tasks based on
four datasets, including the MNIST dataset, the PathMNIST
dataset, the COVIDx dataset and the ASD dataset, with dif-
ferent data sizes and various architectures of deep learning
networks. Our results demonstrate the usability of AFS and
its application potential in real-world intelligent healthcare.
2 METHODS
2.1 The overall framework of AFS
AFS is a novel and unified method to revoke patients' pri-
vate data by using auditing to guide the forgetting process
in a negative feedback manner (Figure 1).
To audit the membership of the query dataset, AFS takes
a pre-trained DL model and the query dataset as inputs,
and determines whether the query dataset has been used
for training the target DL model. This function was re-
implemented based on EMA [38], a published MIA-based
method to evaluate the membership of a query dataset.
AFS
3
Fig. 1. AFS is a unified method to revoke patients' private data in intelligent healthcare. Given a pre-trained DL model and a query dataset, AFS
could audit and provide confidence whether the query dataset has been used to train the target DL model. When a dataset has been used to train
the target DL model, AFS could effectively remove the information about the dataset from the target DL model with the guidance of auditing. To
achieve that, we proposed a novel method called knowledge purification, which utilizes results from auditing as feedback to forget information.
is to transfer the information of the remaining dataset except
for the query dataset from the pre-trained model to a new
model. Therefore, we designed a novel mechanism called
knowledge purification (KP) by using auditing to guide
the forgetting process to exclude the information of the
query dataset while transferring the remaining information
by incorporating the auditing loss into the training process
(Figure 2). With KP integrated, AFS could generate a new
model, in which the information of the target dataset should
be forgotten under the guidance of auditing (Section 2.5).
To provide an applicable solution, we implemented AFS
as open-source software that provides a user-friendly entry
point allowing users to use both functions with only one
command. To demonstrate the generality of AFS, we applied
it to four tasks based on four datasets, including the MNIST
dataset, the PathMNIST dataset, the COVIDx dataset and
the ASD dataset, which have different data sizes (Figure 3
and Section 2.2) and various architectures of deep learning
networks (Section 2.3).
2.2 Dataset preparation
We used four public datasets that were commonly acknowl-
edged in the machine learning and intelligent healthcare
field to demonstrate the versatility of AFS. For the bench-
mark experiment, we applied AFS on MNIST [41] and
PathMNIST [42] from the MedMNIST [43] dataset. The
MNIST dataset contains 60,000 training images and 10,000
testing images of handwritten digits with size 28×28 and
labelled from 0 to 9. PathMNIST contains 100,000 nonover-
lapping image patches from hematoxylin & eosin stained
histological images and 7,180 image patches from different
clinical centres. In total, 9 types of tissues are involved
in the PathMNIST dataset, including adipose, background,
debris, lymphocytes, mucus, smooth muscle, normal colon
mucosa, cancer-associated stroma, and COAD epithelium.
Fig. 2. Illustration of knowledge distillation and knowledge purification.
Knowledge purification requires the selective transfer of the needed
knowledge in the process of knowledge distillation to forget the target
information instead of simply transferring all information.
Fig. 3. Illustration of four datasets and DL models used to show the
versatility of AFS.
Our re-implementation allows quicker and easier usage of
auditing (Section 2.4).
To forget the query dataset from a DL model, AFS takes
the pre-trained DL model and the query dataset to be for-
gotten as inputs, in which the query dataset has been used
to train the DL model. To effectively forget the information
of the query dataset from the pre-trained DL model, an idea
AFS
4
All images in PathMNIST were 224 × 224 (0.5 μm/px) and
were normalized with the Macenko method [44]. For the
application of AFS in intelligent healthcare, we used the
COVIDx [45] dataset, which contains 13,975 chest X-ray
(CXR) images across 13,870 patient cases, and the Autism
spectrum disorder (ASD) dataset for toddlers [46], which
contains 20 features of 1,054 samples to be utilized for
determining influential autistic traits and improving the
classification of ASD cases.
For each dataset, we further sampled partial data as
the training dataset, the testing dataset, and the calibration
dataset as below:
MNIST. We randomly sampled 10,000 images as the
training dataset and 10,000 images as the testing dataset. We
also randomly sampled 100, 1,000, 2,000, and 5,000 images
that are disjoint with the training dataset as four calibration
datasets to illustrate the effect of the calibration dataset of
varied sizes on auditing and forgetting.
PathMNIST. We randomly sampled 10,000 images as the
training dataset and 5,000 images as the testing dataset. We
also randomly sampled 1,000 images that are disjoint with
the training dataset as the calibration dataset.
COVIDx. We randomly sampled 5,000 images as the
training dataset and 1,000 images as the testing dataset. We
also randomly sampled 1,000 images that are disjoint with
the training dataset as the calibration dataset.
ASD. We randomly sampled 500 images as the training
dataset and 100 images as the testing dataset. We also
randomly sampled 100 images that are disjoint with the
training dataset as the calibration dataset.
For all four datasets, we randomly sampled partial data
from the training dataset with percentage k from {0.25, 0.5,
0.75} as the training dataset for knowledge distillation (KD)
and AFS.
In addition, we prepared query datasets with different
sizes N from {1, 10, 100, 500, 1000, 2000}. A query dataset
that completely overlapped with the training dataset is
labelled as QO, while the query dataset that is completely
disjoint with the training dataset is labelled QNO. To further
understand the effect of the purity of the query dataset,
we also prepared the query dataset called QM with a k
percentage of the query dataset to be overlapped with the
training dataset. Finally, for the query dataset designed to
be forgotten, we labelled it as QF.
2.3 Deep learning models and experiment setup
To present the generalizability of AFS towards various DL
models, we adopted different architectures for each of the
four tasks, including the multilayer perception [47] (MLP),
the convolutional neural network (CNN) [48] and ResNet
[49]. There were a large DL model and a small DL model
for each task, where the large model refers to the original
pre-trained model and the small model is the new model
generated by AFS.
For the MNIST dataset, we used MLP with 671,754
parameters as the teacher model and 155,658 parameters as
the student model to achieve the 10-class classification task.
For the PathMNIST dataset, we adopted CNN with
21,285,698 parameters as the teacher model and 11,177,538
parameters as the student network for the 9-class classifica-
tion task.
For the COVIDx dataset, we took ResNet34 with
21,285,698 parameters as the teacher model and ResNet18
with 11,177,538 parameters as the student network to
achieve the binary classification of healthy people and pa-
tients.
For the ASD dataset, we used the MLP with 3,586 param-
eters as the teacher model and the MLP with 898 parameters
as the student model for the binary classification of autism
in toddlers.
During model training, the number of epochs was fixed
to 50, the learning rate was set to 1e–5 and the Adam
optimizer was used. A workstation with 252 GB RAM, 112
CPU cores and 2 Nvidia V100 GPUs were adopted for all
experiments. The AFS method was developed based on
Python3.7, PyTorch1.9.1 and CUDA11.4. A detailed list of
dependencies could be found in our code availability.
2.4 Audit the membership of query dataset
EMA [35] is designed as a 2-step process. In the first step,
the best threshold for each metric is selected to optimize
(T P R(t) + T N R(t))/2 based on the calibration dataset as
shown in Algorithm 1. Once the thresholds for all metrics
are selected, the membership of each sample in the query
dataset will be confirmed as at least one metric is larger
than the corresponding threshold. In total, three metrics, in-
cluding correctness [50], confidence [51], [52], and negative
entropy [53], [54], were adopted in AFS as proposed in the
previous work [38], [55].
Once the membership of all samples in the query dataset
is confirmed in the previous step, the query dataset will be
further evaluated to determine whether the query dataset
has been used to train the target pre-trained DL model. A
two-sample statistical test is adopted to evaluate the query
dataset based on the sample-wise membership and an all-
one vector. The p-value of the two-sample statistical test
is used as the output of auditing. Given a user-defined
threshold α, if p < α, then users could conclude that the
query dataset was not used for training the target DL model.
EMA was re-implemented and integrated into AFS to allow
easy and fast auditing.
AFS
5
Algorithm 1. Infer thresholds
Require: The calibration dataset Dcal, the pre-trained DL
model A and n different metrics (m1, ..., mn) for mem-
bership testing.
1: procedure
Algorithm 2. AFS
Require: The calibration dataset Dcal, the query dataset to
forget Df orget, the sampled training dataset Dtrain for
KP, the pre-trained DL model F , the new model f , and
number of epochs T .
Split Dcal
dataset Dtest
cal
into training dataset Dtrain
cal
and test
1: procedure
2:
3:
4:
5:
6:
7:
The calibration model
is trained as fDcal ←
)
A(Dtrain
cal
for mi ∈ {m1, ..., mn} do
Compute metrics
Mtrain ← {mi(fDcal,s|s ∈ Dtrain
for
cal
training dataset
)}
as
Compute metrics for test dataset as Mtest ←
{mi(fDcal,s|s ∈ Dtest
cal )}
Find ti ∈ argmaxt∈[Mtrain,Mtest]( T P R(t)+T N R(t)
),
| and
where T P R(t) = (cid:80)
T N R(t) = (cid:80)
return The thresholds t1, ..., tn for n metrics
1{mi(s) ≥ t}/|Dtrain
s∈Dtrain
cal
1{mi(s) ≥ t}/|Dtest
cal |
s∈Dtest
cal
cal
2
2.5 Audit-guided forgetting of query dataset with AFS
Forgetting aims to remove the remembered information of
the query dataset from the target DL model. Similar to
knowledge distillation (KD), a teacher-student paradigm
was also adopted in AFS, but with an additional require-
ment to selectively forget information associated with the
data we want to forget. Thus, we designed a novel approach
called knowledge purification (KP), meaning purifying the
knowledge in the teacher model (the original pre-trained
model), discarding the information related to the data that
needed to be forgotten and transferring the purified infor-
mation into the student model (the new model). AFS unified
auditing and forgetting into a circular process to effectively
enhance the unlearning in a negative feedback manner.
As shown in Figure 1, during each epoch of training, the
training data will be fed into both the teacher model and
the student model, while the data to be forgotten will be
audited on the student model. Our main goal is to transfer
the knowledge from the teacher model to the student model
while forcing the student model to reject the information
associated with data to be forgotten. In order to achieve that,
we added the audit loss into the total loss, thus allowing the
student model to accept partial knowledge from the teacher
model and achieve KP as shown in Algorithm 2.
2.6 Evaluation metrices
Since all four tasks are either multi-classes classification
tasks or binary classification tasks, we adopted the accuracy
and F1-score as the evaluation metrics as below,
2:
3:
4:
5:
6:
7:
for epoch ∈ {1, ..., T } do
Forward Dtrain with F
Forward Dtrain with f
Infer threshold with Dcal on f and audit Df orget
on f to get lossaudit
Calculate lossAF S = lossclassif ication+lossKD +
lossaudit
Update f based on lossAF S
return The new student model f with information about
Df orget forgotten.
F 1 − score =
2T P
2T P + F P + F N
(2)
where TP represents true positives, TN stands for true
negatives, FN represents false negatives and FP stands for
false positives.
To evaluate the membership of the query dataset, the
p-value of the two-sample statistical test was used as men-
tioned previously.
3 RESULTS
3.1 AFS audits private datasets stably and robustly
To evaluate the robustness of auditing by AFS, we used it
to audit query datasets with different sizes, various purity
(k percent of the query dataset was overlapped with the
training dataset) and the different sizes of calibration dataset
(the size ranged from 100 to 5000) (Method and Figure 4A).
For each sample in the query dataset, AFS calculates three
metrics for the membership inference, including correctness,
confidence and negative entropy (Method). As shown in
Figure 4B, all three metrics showed different distributions
for QO (query dataset overlapped with the training dataset)
and QNO (query dataset disjoint with the training dataset),
indicating the dataset-wise divergence of metrics between
samples in the training dataset and samples disjoint with the
training dataset. Finally, by integrating these three metrics,
AFS predicts a p-value to evaluate whether or not a query
dataset has been used to train the target DL model. The
large p-values indicate the higher probability that the query
dataset was used in training.
Accuracy =
T P + T N
T P + T N + F P + F N
When the size of the query dataset and the calibration
dataset varied, AFS could still efficiently distinguish QO
(1)
AFS
6
Fig. 4. Performance of auditing using AFS on the four datasets. A. Demonstration of the training dataset, the test dataset, the calibration dataset,
and the query dataset overlapped with the training dataset (QO) and the query dataset disjointed with the training dataset (QNO). B. Distribution
of three metrics for samples in QO and QNO. C. The performance of auditing when varying the size of the calibration dataset and the size of the
query dataset. D. The p-value of auditing on QO and QNO of four datasets. E. The p-value of auditing when varying k of the query dataset of four
datasets.
and QNO (Figure 4C and D). Compared to QO, AFS re-
ported a much smaller p-value for QNO, indicating a weak
membership (a small probability that the query dataset has
been used to train the target DL model), thus allowing users
to judge whether the query dataset was used to train the
target DL model. Meanwhile, when the size of the dataset
increased from 1 to 2000, AFS discriminated QO and QNO
more confidently as there was a more significant divergence
of the p-values, which was not affected by the size of the
calibration dataset. To further understand the effect of the
purity of the query dataset in auditing, we mixed some
samples from the training dataset to QNO, thus the new
query dataset was labelled as QM (partial data overlapped
with the training dataset). The percentage of data over-
lapped with the training dataset in QM was denoted by
size of QM
k = number of data overlapped with training dataset
. As shown
in Figure 4E, AFS showed a decreasing p-value trend when
k decreased, meaning that the query dataset was less likely
to be used to train the target DL model. In conclusion,
these results indicate the robustness of AFS in determining
whether the query data has been used to train the target DL
model.
3.2 AFS forgets the information of query dataset, main-
tains perfect usability and generates smaller model
Once the prior knowledge that a dataset has been used to
train the target DL model is confirmed with auditing, AFS
could be used for forgetting, to remove the information
of the dataset from the pre-trained DL model. To com-
prehensively show the ability of AFS in removing infor-
AFS
7
TABLE 1
Comparison of AFS with other methods on auditing QO and QNO from the MNIST dataset with a varied number of samples in the query dataset.
The data in the table shows the results of auditing QO and QNO on models trained by different methods. A larger value indicates stronger
membership.
Methods
Independent teacher
Independent student
Independent student (k=0.75)
AFS w/o Audit (k=0.75)
AFS (k=0.75)
Independent student (k=0.5)
AFS w/o Audit (k=0.5)
AFS (k=0.5)
Independent student (k=0.25)
AFS w/o Audit (k=0.25)
AFS (k=0.25)
1
1
1
1
1
1
1
1
1
1
1
1
10
100
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
8.64e-01
8.64e-01
1
1
1
1
1
QO
500
1
3.43e-01
6.80e-01
8.64e-01
1
5.59e-01
8.64e-01
8.64e-01
8.64e-01
1
1
1000
2000
1
4.22e-01
1.67e-01
5.91e-01
8.64e-01
2.39e-01
8.64e-01
1
8.64e-01
1
1
1
8.61e-02
7.87e-02
5.26e-01
4.54e-01
2.49e-02
8.64e-01
7.27e-01
3.17e-01
1
1
1
1
1
1
1
1
1
1
1
1
1
1
10
100
7.32e-01
6.96e-01
5.27e-01
5.98e-01
6.96e-01
8.13e-01
5.98e-01
6.68e-01
5.98e-01
5.27e-01
6.96e-01
7.39e-02
4.50e-02
2.28e-02
1.02e-01
2.94e-02
7.75e-02
1.32e-01
2.88e-02
1.04e-02
4.47e-02
8.52e-03
QNO
500
2.43e-05
2.74e-06
7.50e-07
6.49e-06
1.45e-06
6.44e-08
5.94e-06
9.25e-07
6.40e-10
7.49e-07
3.85e-10
1000
2000
1.06e-08
4.51e-11
4.61e-14
4.15e-11
9.06e-13
1.63e-15
2.43e-12
3.70e-13
3.05e-20
2.18e-13
1.98e-20
4.68e-18
8.58e-22
3.10e-27
1.28e-20
3.79e-24
4.15e-30
5.73e-23
3.10e-27
1.22e-38
5.96e-28
1.29e-41
TABLE 2
Comparison of AFS with other methods on forgetting QF and model performance with the MNIST dataset. QF100 is the small query dataset
containing 100 samples and QF1000 is the large query dataset containing 1000 samples. We present the p-values of auditing models trained with
different methods on QF100 and QF1000 and the model performance including the accuracy and F1-score.
Methods
QF100
QF1000
Accuracy
F1-score
Independent teacher
Independent student
Independent student (k=0.75)
AFS w/o Audit (k=0.75)
AFS (k=0.75)
Independent student (k=0.5)
AFS w/o Audit (k=0.5)
AFS (k=0.5)
Independent student (k=0.25)
AFS w/o Audit (k=0.25)
AFS (k=0.25)
1
1
4.36e-02
3.19e-01
1.08e-03
6.91e-03
1.57e-01
1.27e-02
6.91e-03
1.57e-01
5.79e-04
1
1
5.26e-12
1.33e-06
5.22e-23
2.34e-15
7.79e-07
9.44e-22
2.90e-19
7.04e-10
6.84e-33
0.9622
0.9504
0.9458
0.9582
0.9470
0.9282
0.9526
0.9380
0.9067
0.9388
0.9174
0.9911
0.9911
0.9880
0.9884
0.9889
0.9848
0.9884
0.9866
0.9875
0.9875
0.9853
mation against the model performance, we compared five
methods, including 1) training the teacher model with a
complete training dataset (Independent teacher), 2) retrain-
ing the student model with a complete training dataset
(Independent student), 3) retraining the student model with
k ∈ {0.25, 0.5, 0.75} percentage of the complete training
dataset excluding the data to be forgotten (Independent Stu-
dent with k ∈ {0.25, 0.5, 0.75}), 4) AFS, and 5) training the
student model with AFS without the guidance of auditing
(AFS w/o Audit), as an ablation study of AFS (Section 2.5).
Both AFS w/o Audit and AFS were also conducted with
varied k ∈ {0.25, 0.5, 0.75}. For both Independent teacher
and Independent student methods trained with the com-
plete training dataset, QF100 and QF1000 were included in
the training dataset, while these two query datasets were ex-
cluded from the training dataset when k ∈ {0.25, 0.5, 0.75}.
Taking the MNIST dataset as an example, for models
trained with each method, except for auditing on QO and
QNO, we further audited the membership of two datasets
designed to be forgotten (a small query dataset QF100
and a large query dataset QF1000) to assess the ability of
different methods in forgetting the query dataset. As shown
in Table 1, regardless of the model trained based on which
method, AFS could effectively distinguish between QO and
QNO, and the divergence in auditing two query datasets
was enlarged as the size of the query dataset increased.
As shown in Table 2, AFS perfectly predicted the mem-
bership of QF100 and QF1000 on both models from In-
dependent teacher and Independent student methods as
both query datasets were included in the training dataset.
Since both query datasets were disjoint with the partial
training dataset when k ∈ {0.25, 0.5, 0.75}, thus audit-
ing on the model trained with Independent student with
k ∈ {0.25, 0.5, 0.75} weakly denied the membership of
QF100 (PQF 100,k=0.75 = 4.36E–2, PQF 100,k=0.5 = 6.91E–3,
PQF 100,k=0.25 = 6.91E–3) and QF1000 (PQF 1000,k=0.75 =
5.26E–12, PQF 1000,k=0.5 = 2.34E–15, PQF 1000,k=0.25 =
2.90E–19). However, since only the partial training dataset
AFS
8
TABLE 3
Comparison of AFS with other methods on auditing QO and QNO from the PathMNIST dataset with a varied number of samples in the query
dataset. The data in the table shows the results of auditing QO and QNO on models trained by different methods. A larger value indicates stronger
membership.
Methods
Independent teacher
Independent student
Independent student (k=0.75)
AFS w/o Audit (k=0.75)
AFS (k=0.75)
Independent student (k=0.5)
AFS w/o Audit (k=0.5)
AFS (k=0.5)
Independent student (k=0.25)
AFS w/o Audit (k=0.25)
AFS (k=0.25)
1
1
1
1
1
1
1
1
1
1
1
1
10
100
1
1
1
1
1
8.66e-01
1
1
1
8.66e-01
8.66e-01
1
1
1
5.26e-01
3.90e-01
1
5.11e-01
1.59e-01
8.64e-01
2.39e-01
1.40e-01
QO
500
1
1
1
1.78e-01
3.21e-02
8.64e-01
2.48e-01
3.45e-04
6.95e-01
3.37e-03
2.71e-03
1000
2000
1
1
1
2.54e-02
6.13e-04
8.64e-01
1.24e-02
4.06e-06
1.60e-01
1.01e-05
1.07e-06
1
1
1
1.17e-03
7.19e-06
5.58e-01
9.59e-04
1.85e-10
4.54e-02
9.15e-10
1.63e-12
1
1
1
1
1
1
1
1
1
1
1
1
10
100
4.29e-01
5.27e-01
7.32e-01
2.95e-01
4.98e-01
5.62e-01
6.26e-01
2.69e-01
1.26e-01
2.42e-01
4.37e-01
6.29e-03
5.11e-03
1.89e-02
2.26e-02
2.34e-04
4.02e-03
1.18e-02
9.17e-05
1.24e-06
3.64e-05
7.07e-06
QNO
500
1.40e-13
1.29e-10
1.55e-08
9.23e-11
4.25e-16
3.01e-10
2.99e-11
2.98e-16
2.30e-31
2.55e-24
2.01e-27
1000
2000
4.91e-28
3.38e-20
5.74e-16
1.04e-19
3.95e-31
1.91e-21
4.03e-21
3.84e-30
2.88e-60
3.01e-43
4.45e-53
1.88e-60
7.24e-42
1.92e-30
8.21e-41
4.89e-65
7.85e-40
2.51e-40
1.04e-62
4.73e-109
1.37e-90
1.71e-101
TABLE 4
Comparison of AFS with other methods on forgetting QF and model performance with the PathMNIST dataset. QF100 is the small query dataset
containing 100 samples and QF1000 is the large query dataset containing 1000 samples. We present the p-values of auditing models trained with
different methods on QF100 and QF1000 and the model performance including the accuracy and F1-score.
Methods
QF100
QF1000
Accuracy
F1-score
Independent teacher
Independent student
Independent student (k=0.75)
AFS w/o Audit (k=0.75)
AFS (k=0.75)
Independent student (k=0.5)
AFS w/o Audit (k=0.5)
AFS (k=0.5)
Independent student (k=0.25)
AFS w/o Audit (k=0.25)
AFS (k=0.25)
1
1
2.35e-02
1.08e-03
2.25e-05
6.91e-03
3.74e-03
2.87e-06
1.58e-07
3.32e-07
3.32e-07
1
1
4.08e-15
1.67e-22
2.05e-41
2.99e-21
4.93e-18
4.75e-35
9.05e-57
2.05e-41
1.84e-56
0.8538
0.8446
0.8396
0.8682
0.8560
0.7934
0.8494
0.8242
0.7582
0.7842
0.7810
0.9885
0.9836
0.9555
0.9777
0.9605
0.9533
0.9697
0.9575
0.9287
0.9406
0.9385
was used when k ∈ {0.25, 0.5, 0.75}, the retrained models
with Independent student only learnt the information of the
partial training dataset and lost the information from the re-
maining data in the complete training dataset, thus resulting
in the significant drop of model performance compared to
either the Independent student or the Independent teacher
trained with the complete training dataset.
To rescue the information lost due to the usage of
partial training samples and further increase the model
performance, AFS could use only a partial training dataset
(k ∈ {0.25, 0.5, 0.75}) to transfer the knowledge from the
Independent teacher pre-trained with the complete training
dataset. As shown in Table 2, the model trained with AFS
provided higher accuracy and F1-score compared to the
Independent student trained with partial training dataset
(k ∈ {0.25, 0.5, 0.75}) and together with a better forgetting
performance (much smaller auditing score on QF100 and
QF1000), as AFS used auditing as feedback for forgetting
and could forget not only the query samples but also other
samples with similar features.
We also applied AFS on the 9-classes classification of
hematoxylin & eosin-stained histological images from the
PathMNIST dataset with CNN. As shown in Table 3, AFS
could still distinguish QO and QNO from the PathMNIST
dataset. The divergence of auditing between QO and QNO
was more significant than that on the MNIST dataset.
With the requirement to forget both query datasets (QF100
and QF1000), the model trained with AFS outperformed
on forgetting information (PQF 100,k=0.75 = 2.25E–5,
PQF 100,k=0.5 = 2.87E–6, PQF 100,k=0.25 = 3.32E–7),
PQF 1000,k=0.75 = 2.05E–41, PQF 1000,k=0.5 = 4.75E–35,
PQF 1000,k=0.25 = 1.84E–56) while learnt more information
from the Independent teacher model trained with a com-
plete training dataset.
In summary, AFS could effectively forget the information
of the query dataset from the target DL model. Since KP
was integrated into AFS, it could generate a smaller DL
model, which masters knowledge from the larger teacher
AFS
9
Fig. 5. Performance of forgetting using AFS on four datasets. A. The p-value of auditing on a small query dataset and a large query dataset (QF)
and the accuracy of models trained with different methods, including Original (Independent teacher trained with the complete training dataset),
Data Deletion (the Independent student model trained with partial training dataset and k = 0.5), AFS (w/o Audit) and AFS. B. The number of
parameters for the original large model and the new small model generated by AFS. C. The qualitative evaluation of three methods, including
Original (Independent teacher trained with the complete training dataset), Data Deletion (the Independent student model trained with partial training
dataset and k = 0.5), and AFS on five dimensions (Ability to forget, accuracy, size of dataset needed for training, size of the generated model and
the efficiency of training). A larger value means a stronger ability to forget, higher model accuracy, a smaller size of dataset needed for training, a
smaller size of the generated model, and better efficiency of training.
model by using only a partial training dataset (k = 0.5
could achieve a good balance between forgetting and model
performance), without the need to retrain the larger model
with the complete training dataset. Compared to retraining
the student model, the model trained with AFS showed
even better performance in forgetting the information while
maintaining better model performance (accuracy and F1-
score) as it learnt the knowledge from the model trained
with the complete training dataset. As shown by the abla-
tion study in Tables 2 and 4, compared to AFS w/o Audit,
the audit-guided AFS could forget the information more
significantly but with an acceptable cost in decreasing the
model performance (accuracy and f1-score).
medical image analysis. As shown in Figure 5A, on both
query datasets (QF100 and QF1000), AFS could effectively
forget the information of the query dataset, while generating
the new model with much less number of parameters as
shown in Figure 5B. Surprisingly, the model generated by
AFS showed even better accuracy than the Independent
teacher trained with the complete dataset and the Indepen-
dent student trained with the partial training dataset. This
result not only indicated that AFS could effectively transfer
the knowledge from the teacher model to the student model
but also suggested that the student model with simpler ar-
chitecture could even perform better than the teacher model
with KP in AFS due to the reduction of model parameters
and purification of knowledge in some real-world cases.
3.3 Apply AFS to forget medical images
To show the versatility of AFS, we applied it to the classifica-
tion of pneumonia and normal with chest X-ray images from
the COVIDx dataset with ResNet, which is a classic task in
3.4 Apply AFS to forget electrical health records
To further prove the generalizability of AFS in both the
auditing and forgetting, we applied AFS to predicting
AFS
10
early autism spectrum disorder (ASD) traits of toddlers,
which contains sensitive information about patients, such
as the age, gender and the family gene trait. That infor-
mation was stored as electrical health records (EHR). As
shown in Figure 5A, similar to previous results on other
datasets, AFS effectively removed the information of both
query datasets from the pre-trained DL model. Since the
size of the ASD dataset was quite small, we adopted two
smaller query datasets (QF50 and QF100) to be forgotten.
Compared to the models trained with other methods, the
model trained with AFS successfully forgot the information
of both QF50 (PQF50,k=0.75 = 0.08, PQF50,k=0.55 = 0.08,
PQF50,k=0.25 = 0.156) and QF100 (PQF100,k=0.75 = 0.004,
PQF100,k=0.55 = 0.007, PQF100,k=0.25 = 0.007) without
affecting the model utility significantly (AccAF S,k=0.75 =
0.98, AccAF S,k=0.5 = 0.98, AccAF S,k=0.25 = 0.98).
TABLE 5
Time for inferring 100 samples with the original model and the model
generated by AFS.
Dataset
Original model
New model generated by AFS
MNIST
PathMNIST
COVIDx
Autism
439 μs ± 1.54 μs
5.13 ms ± 22 μs
1.27 s ± 500 ms
126 μs ± 177 ns
284 μs ± 447 ns
4.99 ms ± 14.1 μs
661 ms ± 9.98 ms
87.3 μs ± 120 ns
TABLE 6
GPU memory (MB) for inferring 100 samples with the original model
and the model generated by AFS.
Dataset
Original model New model generated by AFS
MNIST
PathMNIST
COVIDx
Autism
258
173
17,805
2
61
129
10,600
1
4 DISCUSSION
To our knowledge, AFS is the first unified method of
auditing and forgetting that could effectively forget the
information of the target query dataset from the pre-trained
DL model with the guidance of auditing. We designed
AFS as a model-agnostic and open-source method that is
applicable to different models. As shown in Figure 5C,
AFS could generate a smaller model, which requires much
less time and GPU memory during the inference (Tables 5
and 6), by training with a partial training dataset (∼50%)
with our novel KP approach. Moreover, AFS could forget
the information of the query dataset at the expense of an
acceptable reduction in the model performance.
Our experiments on four datasets showed that AFS
was generalized for datasets of different sizes and forms,
including medical images and EHR. Since deep learning
models with different architectures were applied to four
tasks, we further demonstrated the broad applicability of
AFS to common deep learning models. In addition, our
tasks include both binary classification and multiclassifica-
tion tasks, which also suggested that AFS was applicable for
tasks with multiple labels.
With current laws that guarantee people the right to
revoke their own data, AFS could help institutions and
companies to efficiently iterate their models to forget indi-
vidual information at the model level. However, there are
still some shortcomings in the application of the current
version of AFS in the production environment, which could
be the main potential direction of research in the future.
Firstly, the models and data we tested in this study were
still not large enough compared to the data in the real
production environment. Therefore, it is unknown whether
scaling AFS to larger models and more data will cause
new problems. Secondly, there are different approaches to
audit, and thus we could add more metrics of auditing to
AFS to guide the forgetting process in the future version.
Finally, due to the limitation of auditing, it is still difficult to
perform individual-level forgetting, as we need to compare
the difference in statistical distribution based on a fraction of
data points, which could be the major possible improvement
for the future version of AFS. Despite these limitations,
we believe that AFS will make a valuable contribution
towards better protection of people's privacy and the right
to revoke the data with the rapid development of intelligent
healthcare.
5 DATA AVAILABILITY
All four datasets used in this work are publicly avail-
able. The MNIST dataset
could be found at http:
//yann.lecun.com/exdb/mnist/. The PathMNIST dataset
is available at https://medmnist.com/. The COVIDx
dataset
is stored at https://www.kaggle.com/datasets/
andyczhao/covidx-cxr2?select=competition test. The ASD
dataset can be accessed at https://www.kaggle.com/
datasets/fabdelja/autism-screening-for-toddlers.
6 CODE AVAILABILITY
The AFS software is publicly available at https://github.
com/JoshuaChou2018/AFS
7 CREDIT AUTHOR STATEMENT
Conceptualization: J.Z. and X.G. Design: J.Z. and X.G.
Data analysis and interpretation: J.Z., H.L. and W.H. Code
implementation: J.Z. and H.L. Application: J.Z, H.L, X.L,
AFS
11
B.Z. Code improvement: Z.L and L.Z. Drafting of the
manuscript: J.Z and H.L. Critical revision of the manuscript
for important intellectual content: J.Z., X.L and B.Z. Super-
vision: J.Z. and X.G. Funding acquisition: X.G.
8 ACKNOWLEDGEMENTS
Juexiao Zhou, Haoyang Li, Xingyu Liao, Bin Zhang, Wen-
jia He, Zhongxiao Li, Longxi Zhou and Xin Gao were
supported in part by grants from the Office of Research
Administration (ORA) at King Abdullah University of
Science and Technology (KAUST) under award number
FCC/1/1976-44-01, FCC/1/1976-45-01, REI/1/5202-01-01,
REI/1/5234-01-01, REI/1/4940-01-01, RGC/3/4816-01-01,
and REI/1/0018-01-01.
Xingyu Liao was also supported in part by grants from
the National Natural Science Foundation of China under
grant number No.62002388.
9 COMPETING INTERESTS
The authors have declared no competing interests.
REFERENCES
[1] P. Voigt and A. Von dem Bussche, "The eu general data protec-
tion regulation (gdpr)," A Practical Guide, 1st Ed., Cham: Springer
International Publishing, vol. 10, no. 3152676, pp. 10–5555, 2017.
[2] A. Act, "Health insurance portability and accountability act of
[3]
1996," Public law, vol. 104, p. 191, 1996.
S. L. Pardau, "The california consumer privacy act: Towards a
european-style privacy regime in the united states," J. Tech. L. &
Pol'y, vol. 23, p. 68, 2018.
[4] R. Wang, Y. F. Li, X. Wang, H. Tang, and X. Zhou, "Learning your
identity and disease from research papers: information leaks in
genome wide association study," in Proceedings of the 16th ACM
conference on Computer and communications security, 2009, pp. 534–
544.
[5] M. Fredrikson, E. Lantz, S. Jha, S. Lin, D. Page, and T. Ristenpart,
"Privacy in pharmacogenetics: An {End-to-End} case study of
personalized warfarin dosing," in 23rd USENIX Security Sympo-
sium (USENIX Security 14), 2014, pp. 17–32.
[6] Y. Cao and J. Yang, "Towards making systems forget with machine
unlearning," in 2015 IEEE Symposium on Security and Privacy.
IEEE, 2015, pp. 463–480.
[7] M. Fredrikson, S. Jha, and T. Ristenpart, "Model inversion attacks
that exploit confidence information and basic countermeasures,"
in Proceedings of the 22nd ACM SIGSAC conference on computer and
communications security, 2015, pp. 1322–1333.
[8] C. Song, T. Ristenpart, and V. Shmatikov, "Machine learning
models that remember too much," in Proceedings of the 2017 ACM
SIGSAC Conference on computer and communications security, 2017,
pp. 587–601.
[9] K. Ganju, Q. Wang, W. Yang, C. A. Gunter, and N. Borisov,
"Property inference attacks on fully connected neural networks
using permutation invariant representations," in Proceedings of
the 2018 ACM SIGSAC conference on computer and communications
security, 2018, pp. 619–633.
[10] N. Carlini, C. Liu, ́U. Erlingsson, J. Kos, and D. Song, "The secret
sharer: Evaluating and testing unintended memorization in neural
networks," in 28th USENIX Security Symposium (USENIX Security
19), 2019, pp. 267–284.
[11] J. Zhou, S. Chen, Y. Wu, H. Li, B. Zhang, L. Zhou, Y. Hu, Z. Xiang,
Z. Li, N. Chen et al., "Ppml-omics: a privacy-preserving federated
machine learning system protects patients' privacy from omic
data," bioRxiv, 2022.
[12] S. M. McKinney, M. Sieniek, V. Godbole, J. Godwin, N. Antropova,
H. Ashrafian, T. Back, M. Chesus, G. S. Corrado, A. Darzi et al., "In-
ternational evaluation of an ai system for breast cancer screening,"
Nature, vol. 577, no. 7788, pp. 89–94, 2020.
[13] D. Ardila, A. P. Kiraly, S. Bharadwaj, B. Choi, J. J. Reicher, L. Peng,
D. Tse, M. Etemadi, W. Ye, G. Corrado et al., "End-to-end lung
cancer screening with three-dimensional deep learning on low-
dose chest computed tomography," Nature medicine, vol. 25, no. 6,
pp. 954–961, 2019.
[14] R. Poplin, A. V. Varadarajan, K. Blumer, Y. Liu, M. V. McConnell,
G. S. Corrado, L. Peng, and D. R. Webster, "Prediction of cardio-
vascular risk factors from retinal fundus photographs via deep
learning," Nature Biomedical Engineering, vol. 2, no. 3, pp. 158–164,
2018.
[15] L. Zhou, Z. Li, J. Zhou, H. Li, Y. Chen, Y. Huang, D. Xie, L. Zhao,
M. Fan, S. Hashmi et al., "A rapid, accurate and machine-agnostic
segmentation and quantification method for ct-based covid-19
diagnosis," IEEE transactions on medical imaging, vol. 39, no. 8, pp.
2638–2652, 2020.
[16] L. Zhou, X. Meng, Y. Huang, K. Kang, J. Zhou, Y. Chu, H. Li, D. Xie,
J. Zhang, W. Yang et al., "An interpretable deep learning workflow
for discovering subvisual abnormalities in ct scans of covid-19
inpatients and survivors," Nature Machine Intelligence, vol. 4, no. 5,
pp. 494–503, 2022.
[17] I. Bartoletti, "Ai in healthcare: Ethical and privacy challenges," in
Conference on Artificial Intelligence in Medicine in Europe. Springer,
2019, pp. 7–10.
[18] L. Bourtoule, V. Chandrasekaran, C. A. Choquette-Choo, H. Jia,
A. Travers, B. Zhang, D. Lie, and N. Papernot, "Machine unlearn-
ing," in 2021 IEEE Symposium on Security and Privacy (SP).
IEEE,
2021, pp. 141–159.
[19] Q. P. Nguyen, B. K. H. Low, and P. Jaillet, "Variational bayesian
unlearning," Advances in Neural Information Processing Systems,
vol. 33, pp. 16 025–16 036, 2020.
[20] T. T. Nguyen, T. T. Huynh, P. L. Nguyen, A. W.-C. Liew, H. Yin,
and Q. V. H. Nguyen, "A survey of machine unlearning," arXiv
preprint arXiv:2209.02299, 2022.
[21] V. Gupta, C. Jung, S. Neel, A. Roth, S. Sharifi-Malvajerdi, and
C. Waites, "Adaptive machine unlearning," Advances in Neural
Information Processing Systems, vol. 34, pp. 16 319–16 330, 2021.
[22] A. Thudi, G. Deza, V. Chandrasekaran, and N. Papernot, "Un-
rolling sgd: Understanding factors influencing machine unlearn-
ing," in 2022 IEEE 7th European Symposium on Security and Privacy
(EuroS&P).
IEEE, 2022, pp. 303–319.
[23] C. Guo, T. Goldstein, A. Hannun, and L. Van Der Maaten, "Certi-
fied data removal from machine learning models," arXiv preprint
arXiv:1911.03030, 2019.
[24] A. Golatkar, A. Achille, and S. Soatto, "Eternal sunshine of the
spotless net: Selective forgetting in deep networks," in Proceedings
of the IEEE/CVF Conference on Computer Vision and Pattern Recogni-
tion, 2020, pp. 9304–9312.
[25] S. Neel, A. Roth, and S. Sharifi-Malvajerdi, "Descent-to-delete:
Gradient-based methods for machine unlearning," in Algorithmic
Learning Theory. PMLR, 2021, pp. 931–962.
[26] A. Ginart, M. Guan, G. Valiant, and J. Y. Zou, "Making ai forget
you: Data deletion in machine learning," Advances in neural infor-
mation processing systems, vol. 32, 2019.
AFS
12
[27] V. S. Chundawat, A. K. Tarun, M. Mandal, and M. Kankan-
halli, "Can bad teaching induce forgetting? unlearning in
deep networks using an incompetent teacher," arXiv preprint
arXiv:2205.08096, 2022.
[45] L. Wang, Z. Q. Lin, and A. Wong, "Covid-net: A tailored deep
convolutional neural network design for detection of covid-19
cases from chest x-ray images," Scientific Reports, vol. 10, no. 1,
pp. 1–12, 2020.
[28] J. Kim and S. S. Woo, "Efficient two-stage model retraining for
machine unlearning," in Proceedings of the IEEE/CVF Conference on
Computer Vision and Pattern Recognition, 2022, pp. 4361–4369.
[29] Q. P. Nguyen, R. Oikawa, D. M. Divakaran, M. C. Chan, and
B. K. H. Low, "Markov chain monte carlo-based machine un-
learning: Unlearning what needs to be forgotten," arXiv preprint
arXiv:2202.13585, 2022.
[30] T. Baumhauer, P. Sch ̈ottle, and M. Zeppelzauer, "Machine unlearn-
ing: Linear filtration for logit-based classifiers," Machine Learning,
vol. 111, no. 9, pp. 3203–3226, 2022.
[31] Z. Izzo, M. A. Smart, K. Chaudhuri, and J. Zou, "Approximate
data deletion from machine learning models," in International
Conference on Artificial Intelligence and Statistics. PMLR, 2021, pp.
2008–2016.
[32] S. Schelter, S. Grafberger, and T. Dunning, "Hedgecut: Maintaining
randomised trees for low-latency machine unlearning," in Proceed-
ings of the 2021 International Conference on Management of Data, 2021,
pp. 1545–1557.
[33] S. Shan, E. Wenger, J. Zhang, H. Li, H. Zheng, and B. Zhao,
"Protecting personal privacy against una uthorized deep learning
models," in Proceedings of USENIX Security Symposium, 2020, pp.
1–16.
[34] A. K. Tarun, V. S. Chundawat, M. Mandal, and M. Kankan-
halli, "Fast yet effective machine unlearning," arXiv preprint
arXiv:2111.08947, 2021.
[46] F. Thabtah, "Autism spectrum disorder screening: machine learn-
ing adaptation and dsm-5 fulfillment," in Proceedings of the 1st
International Conference on Medical and health Informatics 2017, 2017,
pp. 1–6.
[47] M. W. Gardner and S. Dorling, "Artificial neural networks (the
multilayer perceptron)-a review of applications in the atmo-
spheric sciences," Atmospheric environment, vol. 32, no. 14-15, pp.
2627–2636, 1998.
[48] K. O'Shea and R. Nash, "An introduction to convolutional neural
networks," arXiv preprint arXiv:1511.08458, 2015.
[49] K. He, X. Zhang, S. Ren, and J. Sun, "Deep residual learning for
image recognition," in Proceedings of the IEEE conference on computer
vision and pattern recognition, 2016, pp. 770–778.
[50] K. Leino and M. Fredrikson, "Stolen memories: Leveraging model
memorization for calibrated {White-Box} membership inference,"
in 29th USENIX security symposium (USENIX Security 20), 2020, pp.
1605–1622.
[51] S. Yeom, I. Giacomelli, M. Fredrikson, and S. Jha, "Privacy risk
in machine learning: Analyzing the connection to overfitting,"
in 2018 IEEE 31st computer security foundations symposium (CSF).
IEEE, 2018, pp. 268–282.
[52] L. Song, R. Shokri, and P. Mittal, "Privacy risks of securing
machine learning models against adversarial examples," in Pro-
ceedings of the 2019 ACM SIGSAC Conference on Computer and
Communications Security, 2019, pp. 241–257.
[35] H. Huang, X. Ma, S. M. Erfani, J. Bailey, and Y. Wang, "Unlearnable
examples: Making personal data unexploitable," arXiv preprint
arXiv:2101.04898, 2021.
[53] R. Shokri, M. Stronati, C. Song, and V. Shmatikov, "Membership
inference attacks against machine learning models," in 2017 IEEE
symposium on security and privacy (SP).
IEEE, 2017, pp. 3–18.
[54] A. Salem, Y. Zhang, M. Humbert, P. Berrang, M. Fritz, and
M. Backes, "Ml-leaks: Model and data independent membership
inference attacks and defenses on machine learning models," arXiv
preprint arXiv:1806.01246, 2018.
[55] L. Song and P. Mittal, "Systematic evaluation of privacy risks of
machine learning models," arXiv preprint arXiv:2003.10595, 2020.
[36] A. Peste, D. Alistarh, and C. H. Lampert, "Ssse: Efficiently erasing
samples from trained machine learning models," arXiv preprint
arXiv:2107.03860, 2021.
[37] X. Liu and S. A. Tsaftaris, "Have you forgotten? a method to assess
if machine learning models have forgotten data," in International
Conference on Medical Image Computing and Computer-Assisted Inter-
vention. Springer, 2020, pp. 95–105.
[38] Y. Huang, X. Li, and K. Li, "Ema: Auditing data removal from
trained models," in International Conference on Medical Image Com-
puting and Computer-Assisted Intervention. Springer, 2021, pp. 793–
803.
[39] E. H ̈ullermeier and W. Waegeman, "Aleatoric and epistemic un-
certainty in machine learning: An introduction to concepts and
methods," Machine Learning, vol. 110, no. 3, pp. 457–506, 2021.
[40] G. Hinton, O. Vinyals, J. Dean et al., "Distilling the knowledge in
a neural network," arXiv preprint arXiv:1503.02531, vol. 2, no. 7,
2015.
[41] Y. LeCun, "The mnist database of handwritten digits," http://yann.
lecun. com/exdb/mnist/, 1998.
[42] J. N. Kather, J. Krisam, P. Charoentong, T. Luedde, E. Herpel,
C.-A. Weis, T. Gaiser, A. Marx, N. A. Valous, D. Ferber et al.,
"Predicting survival from colorectal cancer histology slides using
deep learning: A retrospective multicenter study," PLoS medicine,
vol. 16, no. 1, p. e1002730, 2019.
[43] J. Yang, R. Shi, D. Wei, Z. Liu, L. Zhao, B. Ke, H. Pfister, and B. Ni,
"Medmnist v2: A large-scale lightweight benchmark for 2d and 3d
biomedical image classification," arXiv preprint arXiv:2110.14795,
2021.
[44] M. Macenko, M. Niethammer, J. S. Marron, D. Borland, J. T.
Woosley, X. Guan, C. Schmitt, and N. E. Thomas, "A method for
normalizing histology slides for quantitative analysis," in 2009
IEEE international symposium on biomedical imaging: from nano to
macro.
IEEE, 2009, pp. 1107–1110.
|
|
http://arxiv.org/abs/2302.09810v1 | 2023-02-20T07:20:53 | 2023-02-20T07:20:53 | Toward Asymptotic Optimality: Sequential Unsupervised Regression of
Density Ratio for Early Classification | Theoretically-inspired sequential density ratio estimation (SDRE) algorithms
are proposed for the early classification of time series. Conventional SDRE
algorithms can fail to estimate DRs precisely due to the internal
overnormalization problem, which prevents the DR-based sequential algorithm,
Sequential Probability Ratio Test (SPRT), from reaching its asymptotic Bayes
optimality. Two novel SPRT-based algorithms, B2Bsqrt-TANDEM and TANDEMformer,
are designed to avoid the overnormalization problem for precise unsupervised
regression of SDRs. The two algorithms statistically significantly reduce DR
estimation errors and classification errors on an artificial sequential
Gaussian dataset and real datasets (SiW, UCF101, and HMDB51), respectively. The
code is available at:
https://github.com/Akinori-F-Ebihara/LLR_saturation_problem. | [
"Akinori F. Ebihara",
"Taiki Miyagawa",
"Kazuyuki Sakurai",
"Hitoshi Imaoka"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09810v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09810v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG"
] | TOWARD ASYMPTOTIC OPTIMALITY: SEQUENTIAL UNSUPERVISED
REGRESSION OF DENSITY RATIO FOR EARLY CLASSIFICATION
Akinori F. Ebihara, Taiki Miyagawa, Kazuyuki Sakurai, Hitoshi Imaoka
NEC Corporation, Japan
[email protected]
3
2
0
2
b
e
F
0
2
]
G
L
.
s
c
[
1
v
0
1
8
9
0
.
2
0
3
2
:
v
i
X
r
a
ABSTRACT
Theoretically-inspired sequential density ratio estimation
(SDRE) algorithms are proposed for the early classification
of time series. Conventional SDRE algorithms can fail to
estimate DRs precisely due to the internal overnormalization
problem, which prevents the DR-based sequential algorithm,
Sequential Probability Ratio Test (SPRT), from reaching
its asymptotic Bayes optimality. Two novel SPRT-based
algorithms, B2Bsqrt-TANDEM and TANDEMformer, are
designed to avoid the overnormalization problem for pre-
cise unsupervised regression of SDRs. The two algorithms
statistically significantly reduce DR estimation errors and
classification errors on an artificial sequential Gaussian dataset
and real datasets (SiW, UCF101, and HMDB51), respec-
tively. The code is available at: https://github.com/
Akinori-F-Ebihara/LLR_saturation_problem.
Index Terms- Sequential Probability Ratio Test, Density
ratio estimation, Early classification, Time series
1. INTRODUCTION
Early classification of time series [1, 2, 3, 4] is a pivotal al-
gorithm, especially when sampling cost is high, e.g., medical
early diagnosis [5], autonomous driving [6], and action recog-
nition [7]. Under these applications, the early classifier seeks
to optimize both speed and accuracy at the same time. Among
the existing early classification methods, the log-likelihood
ratio (LLR, i.e., log-density ratio) based algorithm, Sequential
Probability Ratio Test (SPRT), is theoretically proven to reach
asymptotic Bayes optimality under realistic non-independent
and identically distributed (i.i.d.) datasets with more than two
classes [8, 9]. The asymptotic optimality implies that the SPRT
algorithm arrives at optimality where the number of samples
is minimized under a certain error rate as data is collected.
Theoretical study proves that the requirement ensuring the
asymptotic optimality is that the absolute values of the LLRs
must be increasing [10] as more samples are acquired.
The challenge of applying the SPRT is that the true LLRs
of time series are often unknown and must be estimated [11,
12, 13] with a sequential density ratio estimation (SDRE) al-
gorithm. We find that the existing SDRE algorithms fail to
Fig. 1. Log-likelihood ratios (LLR) and sequential density
ratio estimation (SDRE) results. The LLRs contrast classes
y = 1 and y = 0: positive and negative LLRs indicate a higher
likelihood for class 1 and 0, respectively. Conventional SDRE
algorithms show the LLR saturation problem if the LLR's
absolute values are large (a) but not if they are small (b).
estimate LLRs when the absolute values of LLRs are large,
violating the indispensable condition for the optimality. Specif-
ically, the estimated LLRs saturate at their upper limits, ac-
cumulating estimation errors as more samples are collected.
We define this problem as the LLR saturation problem (Fig.
1a) and point out that excessive regularization and normaliza-
tion of internal variables, or overnormalization, is the problem
source. The commonly used Long short-term memory (LSTM,
[14]) and Transformer [15] can cause the LLR saturation prob-
lem because of the overnormalization. Moreover, conventional
training tricks such as weight decay [16], Layer Normalization
[17], and Global Average Pooling [18] can also deteriorate the
LLR saturation problem. Note that the LLR saturation prob-
lem essentially differs from the known density chasm problem
[19]: although both problems are phenomenologically similar,
the density chasm problem is mitigated in proportion to the
(a)(b)The LLR saturation problemProposed modelsy=1 Oblivion-LSEL [21]y=1 Ground truth LLRy=1 B2Bsqrt-TANDEM [ours]y=1 TANDEMformer [ours]y=1 TANDEM-LLLR [20]y=0 B2Bsqrt-TANDEM [ours]y=0 TANDEMformer [ours]y=0 Ground truth LLRy=0 Oblivion-LSEL [21]y=0 TANDEM-LLLR [20]
Fig. 2. LLR estimation errors of SDRE algorithms with different weight decay, loss function, normalization, dataset size, and
pooling. Each experiment is repeated 10 times to evaluate its standard error of the mean (SEM), plotted as an error bar. Gray
shaded areas with asterisks highlights the conditions where the errors are statistically significantly reduced (Tukey-Kramer test,
p < 0.001) by the proposed algorithms. Estimation results with LLRs of large (a) and small (b) absolute values are shown.
dataset size, while the LLR saturation problem is not (Fig. 2a).
Based on the classification-based SDRE algorithm SPRT-
TANDEM [20, 21], we avoid the overnormalization to solve
the LLR saturation problem with the two proposed architec-
tures, B2Bsqrt-TANDEM and TANDEMformer. The for-
mer has an LSTM backbone equipped with a novel activation
function, B2Bsqrt, which is designed to achieve both sta-
ble training and precise SDRE. The latter has a streamable
Transformer backbone equipped with a novel pooling layer,
Normalized Summation Pooling (NSP), to accumulate tokens
that are mixed with self-attention blocks. Note that this is the
first paper that applies the Transformer backbone to the early
classification problem to the best of our knowledge.
SDRE and early classification experiments are conducted
on an artificial sequential Gaussian dataset (i.e., with known
ground-truth LLRs) and real datasets (SiW [22], UCF101 [23],
and HMDB51 [24]), respectively. Tukey-Kramer test confirms
that our proposed algorithms outperform baselines with sta-
tistically significantly better performance metrics. This result
indicates that our proposed algorithm approaches the theoreti-
cally guaranteed optimality, given the assumption that the true
LLRs of the real data increase as more samples are collected.
2. METHOD
2.1. Problem setting and notations
i
and y ∈ [K]
:= {x(t)
i }T
Let X (1,T )
:= {1, 2, . . . K} be sequential
i
data (X (1,T )
t=1) and a class label, respectively.
i ∈ [M ] and M ∈ N is the dataset size. T ∈ N is the
maximum length of the time series, and x(t) ∈ Rdfeat
is a feature vector with length dfeat. LLR contrasting
class k and l is defined as λkl(T ) := λkl(X (1,T )
) :=
log(p(X (1,T )
|y = l)). Given trainable
parameters θ ∈ Rdθ (dθ ∈ N), the estimated LLR is denoted
as ˆλ(X (1,T )
; θ). The goal of the early classification is to
find the correct label y with the smallest possible subset of
sequential data X (1,τ ), (1 ≤ τ ≤ T, τ ∈ N).
|y = k)/p(X (1,T )
i
i
i
i
2.2. Decision rule
In order to halt data sampling to make an early decision, an
early classification algorithm needs to have a stopping rule or
a decision rule δ. We select the SPRT, δ∗, as the stopping rule
because the SPRT is theoretically proven to be Bayes optimal
under i.i.d. data X (1,T )
with binary classes y ∈ [0, 1], or
asymptotically optimal under non-i.i.d. data with multi-class.
i
Definition 2.1 SPRT [8]. Let d∗ and τ ∗ be the decision rule
and stopping time, respectively. Given the decision threshold,
akl ∈ R, (k, l ∈ [K]) SPRT δ∗ is defined as δ∗ := (d∗, τ ∗),
where d∗ := k if τ ∗ = τk (k ∈ [K]). Here, τ ∗ := min
{τk(cid:48)},
k(cid:48)∈[K]
) − ak(cid:48)l ≥ 0}.
and τk(cid:48) := inf{t ≥ 1| min
{λk(cid:48)l(X (1,t)
i
l((cid:54)=k(cid:48))∈[K]
Intuitively, the SPRT updates the LLR every time a new
sample is acquired until the stopping time when the minimum
LLR contrasting a class and others reaches the class threshold.
2.3. Asymptotic optimality
Theorem 2.1 Asymptotic optimality of the SPRT under a
multi-class, non-i.i.d. case [9]. Assume that a non-negative
increasing function ψ(t) (ψ(t) t→∞−−−→ ∞) and positive finite
constants Ikl (k, l ∈ [K], k (cid:54)= l) exist, such that for some
r > 0, λkl(t)/ψ(t)
Ikl. Then for all m ∈ (0, r]
and k ∈ [K], inf
δ
Ek[τ ]m ≈ Ek[τ ∗]m as max
k,l
Pk-r-quickly
−−−−−−−−→
t→∞
akl → ∞.
The precise definition of r-quick convergence and a more
detailed discussion can be found, e.g., in [9]. Intuitively, Thm.
2.1 tells the following: assuming that the LLRs λkl increase
as samples are accumulated, the SPRT algorithm reaches the
asymptotic optimality where the moments of the stopping time
are minimized up to order r, given a classification error rate.
The experiments with real datasets are performed under the
assumption that the unknown true LLRs satisfy Thm. 2.1. This
is a natural assumption, given that the features of real scenes
continuously bring new information for the classification task.
LLR estimation (LLRe) loss onlyLayerNormTransformerpoolingWeight decayw/ow/Multiplet cross-entropy(mCE) loss onlymCE+LLRe lossmCE loss onlymCE+LLRe loss(a)(b)0.010.0010.00.00.00.0001NSP [ours]GAP1tokenLayerNormWeight decayw/ow/0.010.0010.00.00.00.0001TransformerpoolingLLRe loss onlyNSP [ours]GAP1tokenB2Bsqrt-TANDEM [ours]TANDEMformer [ours]TANDEM-LLLR [20]Oblivion-LSEL [21]***Dataset size103104105106102Dataset size103104105106102Fig. 3. The design of LSTM-based B2Bsqrt-TANDEM (a) and Transformer-based TANDEMformer (b) temporal integrator
(TI) for SDRE. A subset of feature vectors of time series is extracted with a sliding window, whose size is defined with
SPRT-TANDEM's Markov order N (Thm. 2.2). In the above example, N = 4. The extracted subset is then processed with the
TI to compute posterior probabilities, with which the estimated LLR is computed according to the TANDEM formula (Thm. 2.2).
2.4. Sequential Density Ratio Estimation
The following TANDEM formula (Thm. 2.2) is computed
using posterior probabilities which are outputs from a temporal
integrator network (Fig. 3). The network is optimized with
the LLR estimation (LLRe) loss, log-sum exponential loss
(LSEL, Def. 2.2) function, often linearly combined with the
multiplet cross-entropy (mCE) loss [20]. In the experiments,
the expected value of LSEL is calculated as an empirical mean
across timestamps t, classwise examples i, and classes k.
Theorem 2.2 TANDEM formula [20]. Assuming that X (1,T )
are N th order Markov series, λkl(t)can be approximated as:
i
(cid:32)
ˆλkl(X (1,t)
i
) = log
(cid:33)
i
|y = k)
, ..., x(t)
, ..., x(t)
p(x(1)
i
p(x(1)
|y = l)
i
i
(cid:32)
p(y = k|x(s−N )
p(y = l|x(s−N )
i
log
(cid:33)
, ..., x(s)
i )
, ..., x(s)
i )
(cid:32)
log
p(y = k|x(s−N )
p(y = l|x(s−N )
i
)
, ..., x(s−1)
i
, ..., x(s−1)
)
i
(cid:33)
(1)
i
i
=
−
t
(cid:88)
s=N +1
t
(cid:88)
s=N +2
Definition 2.2 LSEL [21].
ˆLLSEL(θ; S) := E
log
1 +
(cid:88)
e−ˆλkl(X (1,t)
i
;θ)
.
(2)
l((cid:54)=k)
√
The B2Bsqrt has an unsaturated range [− inf, inf] and
a finite gradient 1/(2
α) at the origin to achieve both stable
optimization and effective SDRE. We find that α = 1 is the
best value achieving both stability and accuracy, and thus fix
the value hereafter. Note that although the B2Bsqrt shares
the spirit with the logarithmic activation function [25], we
find that the logarithmic activation can cause unstable training
results: thus, we focus on the B2Bsqrt to explore its effect.
TANDEMformer (Fig. 3b) is a streamable transformer
with a novel NSP layer. Tokens are first extracted with a slid-
ing window and mixed with self-attention. The NSP then takes
a sum of the tokens and divides them with a constant, which is
the maximum size of the sliding window. The sliding window
size is determined with the order of Markov assumption, N
(Thm. 2.2). While GAP and one-token Transformer (e.g., ViT
[26]) generate one summarized token of similar range irrespec-
tive of sample history, NSP can allow evidence accumulation
to let LLRs grow without overnormalization (Fig. 2).
Definition 2.4. NSP. Let X (t,t+w)
i
with a sliding window of size w ∈ [N ], and let Z (t,t+w)
{z(s)
the Markov order N , the NSP layer is defined as:
be subtokens sampled
:=
s=t be the subtokens mixed with self-attention. Given
i }t+w
i
N SP (Z (t,t+w)
i
) :=
t+w
(cid:88)
s=t
z(s)
i
N + 1
.
(4)
2.5. B2Bsqrt-TANDEM and TANDEMformer
3. EXPERIMENTS AND RESULTS
To prevent the overnormalization problem, each of the two
proposed networks has a simple but effective trick. The
B2Bsqrt-TANDEM (Fig. 3a) uses a novel B2Bsqrt func-
tion (Def. 2.3) in place of the default tanh activation function.
Definition 2.3. Back-to-back (B2B) sqrt. Let α ≥ 0 as a
hyperparameter. The B2Bsqrt function is defined as:
fB2Bsqrt(x) := sign(x)((cid:112)α + |x| −
(3)
α)
√
The primary purpose of this experiment is to have a fair com-
parison to outperform the baselines with our algorithms: as
long as the comparison is fair, we do not try all the available
options because it will not affect our conclusion. To achieve
this goal, we set a common batch size, feature extractor, fea-
ture vector size dfeat, Markov order N , and LSTM's hidden
layer size for all the models. All other hyperparameters are
optimized with Optuna [27]. We make our GitHub project
TITIMarkovorderEstimated log-likelihood ratioTemporalintegrator (TI)Feature vectors of time seriesSliding windowTimePositional encodingPosteriorprobabilities(b)(a)NSPoolingMultihead attentionLayerNormLayerNormMLPMLPTransformer blockTITILSTM cellB2BsqrtB2BsqrtFig. 4. Speed-accuracy tradeoff (SAT) curves to evaluate the early classification performance on the three real databases, SiW,
UCF101, and HMDB51. The gray shaded areas show the region where at least one of the proposed models achieves statistically
significantly better per-class error rate than all the baselines. Maximum p-values calculated with the dominant model are shown
(Tukey-Kramer test). One, two, and three asterisks show p < 0.05, p < 0.01, and p < 0.001, respectively. Error bars are SEMs.
page publicly available for reproducibility: the code and all
the detailed experimental setups can be found there.
3.1. Compared models
Two state-of-the-art SDRE algorithms are used as baselines:
SPRT-TANDEM with LLLR [20] and TANDEM with Obliv-
ion and LSEL [21]. Both adopt the LSTM and TANDEM
formula (Thm. 2.2), but the former applies the LLLR loss func-
tion [20] for SDRE, while the latter uses LSEL (Def. 2.2). The
latter also uses a simplified LLR estimation formula, Obliv-
ion: ˆλkl(X (t−N,t); θ) ≈ log (p(k|X (t−N,t))/p(l|X (t−N,t)))
Hereafter the two baselines are abbreviated as TANDEM-
LLLR and Oblivion-LSEL, respectively.
3.2. Simulated Gaussian datasets with known LLRs
Let p0(x) and p1(x) be the 128-dimensional Gaussian den-
sities with covariance identity and mean (a, 0, 0, ..., 0) and
(0, a, 0, ..., 0). a ∈ {1.0, 2.0} is the density offset for simu-
lating LLRs with small and large absolute values. Samples
of length T = 50 are randomly taken from the two sepa-
rated Gaussians to create training, validation, and test datasets
with 80K, 10K, and 10K data, respectively. Additional 920K
training data are used only for the large-dataset experiment.
SDRE evaluation metric is the mean absolute error between
the ground-truth and estimated LLRs. The Markov order is set
to the maximum 49. No mCE loss is used for optimization.
Fig. (2) shows that all the models increase errors as weight
decay increases. With small weight decay parameters, the pro-
posed models show statistically significantly smaller estima-
tion errors when α=2.0. Layer Normalization also deteriorates
the results, except for the TANDEMformer. A larger database
size does not mitigate the error, highlighting the challenge of
solving the LLR saturation problem. The pooling layer of the
Transformer also affects the performance: with the proposed
NSP layer, the estimation error is statistically significantly
reduced compared to the GAP or one-token approach.
3.3. Real-world datasets for the early classification
Experiments are repeated 50 times to evaluate the Speed-
Accuracy tradeoff (SAT) curve (Fig. 4). Markov order N
is fixed to 10. mCE loss is used with LLRe loss weighted with
a hyperparameter, LLRe loss ratio. ResNet-152 is trained as
a feature extractor for the Spoofing in the Wild (SiW, [22])
dataset to generate 512-dim feature vectors. Training, valida-
tion, and test datasets contain 46729, 4968, and 43878 videos,
and class labels are binary. Pretrained Microsoft Vision Model
ResNet50 [28] without fine-tuning is used to extract 2048-
dim feature vectors from UCF101 [23] and HMDB51 [24]
action recognition datasets. Training/validation/test datasets
are 35996/4454/15807, and 1026/106/105 for UCF101 and
HMDB51, respectively. Sample lengths are T = 50 and 79.
In Fig. 4, the algorithm that is as far to the left and as far
down in the graph as possible is the better one (i.e., the earlier
decision with better accuracy). The gray shaded areas show
the regions where at least one of the proposed models shows
statistically significantly better mean per-class error rates than
the baselines. Our models show superior performance at the
late phase with larger samples, reminiscent of the asymptotic
optimality. Interestingly, some of our algorithms show pre-
dominance even at the very early phase, where only a few
samples are collected: it probably be a by-product of the pre-
cise estimation of the LLRs. The SAT curves of the proposed
models mostly show a monotonic decrease as more data are
accumulated, indicating that the models successfully accumu-
late evidence without the LLR saturation problem. Given the
increasing LLR assumption, our algorithms are expected to
approach the asymptotic optimality (Thm. 2.1).
4. CONCLUSION
The LLR saturation problem is formulated and solved with
highly effective yet simple solutions. They prevent the over-
normalization for precise unsupervised regression of the LLRs,
providing an essential step toward the asymptotic optimality.
UCF101Averaged per-class error rate (%)0.110.130.15SiWHMDB51***********************B2Bsqrt-TANDEM [ours]TANDEMformer [ours]TANDEM-LLLR [20]Oblivion-LSEL [21]30405060*****5. REFERENCES
[1] Z. Xing, J. Pei, and P. S. Yu, "Early prediction on time
series: A nearest neighbor approach," in IJCAI, 2009, p.
1297–1302.
[2] U. Mori, A. Mendiburu, E. J. Keogh, and J. A. Lozano,
"Reliable early classification of time series based on dis-
criminating the classes over time," DMKD, vol. 31, pp.
233–263, 2016.
[3] A. Gupta, H. P. Gupta, B. Biswas, and T. Dutta, "Ap-
proaches and applications of early classification of time
series: A review," IEEE TAI, vol. 1, no. 1, pp. 47–61,
2020.
[14] S. Hochreiter and J. Schmidhuber, "Long short-term
memory," Neural Comput., vol. 9, no. 8, pp. 1735–1780,
1997.
[15] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit,
L. Jones, A. N. Gomez, L. u. Kaiser, and I. Polosukhin,
"Attention is all you need," in NeurIPS, 2017, vol. 30, pp.
5998–6008.
[16] A. Krogh and J. Hertz, "A simple weight decay can
improve generalization," in NeurIPS, 1991, vol. 4.
[17] J. Ba, J. R. Kiros, and G. E. Hinton, "Layer normaliza-
tion," ArXiv, vol. abs/1607.06450, 2016.
[18] M. Lin, Q. Chen, and S. Yan, "Network in network,"
ICLR, vol. abs/1312.4400, 2014.
[4] T. Hartvigsen, W. Gerych, J. Thadajarassiri, X. Kong, and
E. A. Rundensteiner, "Stop&hop: Early classification of
irregular time series," in CIKM, 2021.
[19] B. Rhodes, K. Xu, and M. U. Gutmann, "Telescoping
density-ratio estimation," in NeurIPS, 2020, vol. 33, pp.
4905–4916.
[5] E. Vats and C. S. Chan, "Early detection of human
actions-a hybrid approach," Appl. Soft Comput. J., vol.
46, pp. 953 – 966, 2016.
[20] A. F. Ebihara, T. Miyagawa, K. Sakurai, and H. Imaoka,
"Sequential density ratio estimation for simultaneous op-
timization of speed and accuracy," in ICLR, 2021.
[6] R. Doná, G. P. R. Papini, and G. Valenti, "MSPRT action
selection model for bio-inspired autonomous driving and
intention prediction," in IROS, 2019.
[7] J. Weng, X. Jiang, W.-L. Zheng, and J. Yuan, "Early
action recognition with category exclusion using policy-
based reinforcement learning," IEEE TCSVT, vol. 30, pp.
4626–4638, 2020.
[8] A. Wald, Sequential Analysis, John Wiley and Sons, 1st
edition, 1947.
[9] A. Tartakovsky, I. Nikiforov, and M. Basseville, Se-
quential Analysis: Hypothesis Testing and Changepoint
Detection, Chapman & Hall/CRC, 1st edition, 2014.
[10] A. Tartakovsky, "Asymptotic optimality of certain multi-
hypothesis sequential tests: Non-i.i.d. case," Stat. Infer-
ence Stoch. Process., vol. 1, pp. 265–295, 1998.
[21] T. Miyagawa and A. F. Ebihara, "The power of log-
sum-exp: Sequential density ratio matrix estimation for
speed-accuracy optimization," in ICML, 2021, pp. 7792–
7804.
[22] Y. Liu, A. Jourabloo, and X. Liu, "Learning deep models
for face anti-spoofing: Binary or auxiliary supervision,"
in CVPR, June 2018.
[23] K. Soomro, A. R. Zamir, and M. Shah, "UCF101: A
dataset of 101 human actions classes from videos in the
wild," ArXiv, vol. abs/1212.0402, 2012.
[24] H. Kuehne, H. Jhuang, E. Garrote, T. Poggio, and
T. Serre, "HMDB: a large video database for human
motion recognition," in ICCV, 2011.
[25] A. Farzad, H. Mashayekhi, and H. Hassanpour, "A com-
parative performance analysis of different activation func-
tions in LSTM networks for classification," Neural Com-
put. Appl., vol. 31, no. 7, pp. 2507–2521, 2019.
[11] M. Sugiyama, T. Suzuki, S. Nakajima, H. Kashima,
P. von Bünau, and M. Kawanabe, "Direct importance
estimation for covariate shift adaptation," Annals of the
Institute of Statistical Mathematics, vol. 60, no. 4, pp.
699–746, 2008.
[26] A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn,
X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer,
G. Heigold, S. Gelly, J. Uszkoreit, and N. Houlsby, "An
image is worth 16x16 words: Transformers for image
recognition at scale," in ICLR, 2021.
[12] M. Sugiyama, T. Suzuki, and T. Kanamori, Density Ratio
Estimation in Machine Learning, Cambridge University
Press, 2012.
[27] T. Akiba, S. Sano, T. Yanase, T. Ohta, and M. Koyama,
"Optuna: A next-generation hyperparameter optimization
framework," in KDD, 2019, p. 2623–2631.
[13] G. V. Moustakides and K. Basioti, "Training neural
networks for likelihood/density ratio estimation," ArXiv,
vol. abs/1911.00405, 2019.
[28] "Microsoft Vision Model ResNet-50," https://
pypi.org/project/microsoftvision/, Ac-
cessed: May 14, 2021.
Appendix
A. THREE-CLASS SDRE
We could only provide SDRE results with two classes due to
the strict page limit of the ICASSP format. As a supplementary
experiment, Fig. 5 shows example results of three-class SDRE.
Even with a larger number of classes, the proposed algorithms
successfully estimate the LLRs. Thus, our two proposed al-
gorithms, B2Bsqrt-TANDEM and TANDEMformer, effec-
tively estimate the ground-truth density ratio with high pre-
cision and can also be used as effective early-classification
algorithms on multiclass datasets.
B. FREQUENTLY ASKED QUESTIONS
[How are T and N values selected?] Both of them can be
found empirically with ease. While changing these values may
lead to slight variations in the outcome, our algorithms are
robust to these hyperparameter changes.
In our previous works [20, 21], we extensively tested vari-
ous T from 20 to 100 to find that our algorithm outperformed
others. We also deploy commercial products using the pro-
posed algorithms with even shorter T (due to limited compu-
tational resources) without problems. Thus, T can be chosen
conveniently depending on their application and hardware re-
quirement without sacrificing the performance of our models.
However, it is worth noting that the appropriate T should be at
least longer than the specific time scale described below.
In the prior works, we also extensively discussed choosing
N ([20], Sections 3 and D) and would like to refer interested
reviewers to the paper for additional information. In brief, an
optimal N can be found either based on the specific time scale
or hyperparameter tuning. The specific time scale character-
izes the data class, e.g., long temporal action such as UCF101
has a long specific time scale, while a spoofing attack such as
SiW has a short specific time scale (because one frame can
have sufficient information of the attack). Setting N equal
to the specific time scale works most of the time. Alterna-
tively, N can be objectively chosen with a hyperparameter
tuning algorithm such as Optuna, just as we choose other
hyperparameters. Because N is only related to the temporal
integrator after feature extraction, the optimization of N is
not computationally expensive (3 (N = 0) to 9 (N = 49)
mins/epoch, B2Bsqrt-TANDEM on SiW with RTX2080Ti).
[Provided comparisons are mainly with the author's prior
work.] The choice of the baseline algorithms is based on two
criteria: (1) they are capable of SDRE, and (2) they can be
applied to early classification. The state-of-the-art methods
that meet these criteria are our prior algorithms. It is worth
mentioning that in our two previous papers, we extensively
compared our algorithms with existing works by others, includ-
ing the reinforcement learning algorithm EARLIEST, early
classification algorithms LSTM-m and LSTM-s, DRE algo-
rithms LSIF, KLIEP, DSKL, and BARR. Since then, few major
SDRE algorithms (if any) for solving early classification have
been presented. Thus, our prior algorithms are the most proper
ones for the baseline; using them for comparison does not
degrade our paper value or affect our conclusion.
C. SUPPLEMENTARY DISCUSSION
Our work provides a critical step toward the theoretical asymp-
totic optimality (Theorem 2.1) of the SPRT algorithm, which
requires precise estimation of LLRs. The asymptotic optimal-
ity guarantees reaching the best speed-accuracy tradeoff as
more samples are accumulated. As mentioned in Section 2,
the increasing LLR assumption is natural, given that the real
scenes continuously bring new information one after another,
aiding the classification task. Furthermore, even under viola-
tion of the assumption, the SPRT algorithm will often perform
at least as equivalent as existing algorithms, if not outperforms.
Empirical observations on our in-house data, which contains
videos with almost unchanging frames, confirm that our pro-
posed algorithms are on par with the score average of CNN
outputs. Thus, our work is expected to benefit the community
of DRE and early classification significantly.
The general challenge of DRE resides in the large vari-
ance of the estimated density ratio p1/p0; i.e., when p1 or p0
is close to zero, the density ratio is almost zero or infinity,
respectively. In addition to the variance problem, a seminal
paper [19] found and formulated the density chasm problem,
where DRE fails counterintuitively even when classification
accuracy is perfect. The underlying reason for the density
chasm problem remains elusive. Our study uncovered an ad-
ditional fundamental challenge of DRE: the LLR saturation
problem. Our thorough experiments narrowed down the prob-
lem to the overnormalization (see Introduction and Fig.2), and
we proposed simple but effective solutions to the problem:
B2Bsqrt-TANDEM and TANDEMformer. Both are simple
and thus easy to implement.
We expect that our work inspires future works that focus
on, e.g., theoretical analysis of the LLR saturation problem and
potential relationships between the LLR saturation problem
and the density chasm problem.
D. AUTHOR CONTRIBUTION
A.F.E. conceived the study, conducted the experiments, and
wrote the paper. T.M., K.S., and H.I. supervised the study.
E. ACKNOWLEDGMENTS
The authors thank anonymous reviewers for their careful read-
ing to improve the manuscript. We also thank Hiroshi Fukui
for inspiring discussions on Transformer architecture and self-
attention.
Fig. 5. SDRE on a 3-class dataset. "Class a vs. b at y = a" indicates that the plotted LLR shows log p(X|y = a)/p(X|y = b),
when the ground truth label is y = a. The new 3rd class is sampled from a 128-dim Gaussian with mean (0, 0, 2, ..., 0). All other
experimental conditions are the same as Fig. 1.
Ground truth LLRTANDEMformer [ours]TANDEM-LLLR [20]B2Bsqrt-TANDEM [ours]Oblivion-LSEL [21] |
|
http://arxiv.org/abs/2302.09807v1 | 2023-02-20T07:15:28 | 2023-02-20T07:15:28 | A Novel Collaborative Self-Supervised Learning Method for Radiomic Data | The computer-aided disease diagnosis from radiomic data is important in many
medical applications. However, developing such a technique relies on annotating
radiological images, which is a time-consuming, labor-intensive, and expensive
process. In this work, we present the first novel collaborative self-supervised
learning method to solve the challenge of insufficient labeled radiomic data,
whose characteristics are different from text and image data. To achieve this,
we present two collaborative pretext tasks that explore the latent pathological
or biological relationships between regions of interest and the similarity and
dissimilarity information between subjects. Our method collaboratively learns
the robust latent feature representations from radiomic data in a
self-supervised manner to reduce human annotation efforts, which benefits the
disease diagnosis. We compared our proposed method with other state-of-the-art
self-supervised learning methods on a simulation study and two independent
datasets. Extensive experimental results demonstrated that our method
outperforms other self-supervised learning methods on both classification and
regression tasks. With further refinement, our method shows the potential
advantage in automatic disease diagnosis with large-scale unlabeled data
available. | [
"Zhiyuan Li",
"Hailong Li",
"Anca L. Ralescu",
"Jonathan R. Dillman",
"Nehal A. Parikh",
"Lili He"
] | 10.1016/j.neuroimage.2023.120229 | [
{
"@title": "doi",
"@href": "http://dx.doi.org/10.1016/j.neuroimage.2023.120229",
"@rel": "related",
"@type": null
},
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09807v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09807v1",
"@rel": "related",
"@type": "application/pdf"
}
] | [
"Neuroimage. 2023;120229"
] | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "eess.IV",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"eess.IV",
"cs.AI",
"cs.CV",
"cs.LG",
"stat.ML"
] | A Novel Collaborative Self-Supervised Learning
Method for Radiomic Data
Zhiyuan Li, Hailong Li, Anca L. Ralescu, Senior Member, IEEE, Jonathan R. Dillman,
Nehal A. Parikh, and Lili He
1
3
2
0
2
b
e
F
0
2
]
V
I
.
s
s
e
e
[
1
v
7
0
8
9
0
.
2
0
3
2
:
v
i
X
r
a
Abstract-The computer-aided disease diagnosis from radiomic
data is important
in many medical applications. However,
developing such a technique relies on annotating radiological
images, which is a time-consuming, labor-intensive, and expensive
process. In this work, we present the first novel collaborative self-
supervised learning method to solve the challenge of insufficient
labeled radiomic data, whose characteristics are different from
text and image data. To achieve this, we present two collaborative
pretext tasks that explore the latent pathological or biological
relationships between regions of interest and the similarity and
dissimilarity information between subjects. Our method collab-
oratively learns the robust latent feature representations from
radiomic data in a self-supervised manner to reduce human anno-
tation efforts, which benefits the disease diagnosis. We compared
our proposed method with other state-of-the-art self-supervised
learning methods on a simulation study and two independent
datasets. Extensive experimental results demonstrated that our
method outperforms other self-supervised learning methods on
both classification and regression tasks. With further refinement,
our method shows the potential advantage in automatic disease
diagnosis with large-scale unlabeled data available.
Index Terms-Self-supervised learning, collaborative learning,
radiomic data, disease diagnosis.
I. INTRODUCTION
R ADIOMICS is a process that extracts and analyzes
high-throughput quantitative features from digital radio-
graphic images acquired by modern medical imaging tech-
niques, such as magnetic resonance imaging (MRI), computed
This work was supported by the National Institutes of Health [R01-
EB029944, R01-EB030582, R01-NS094200 and R01-NS096037]; Academic
and Research Committee (ARC) Awards of Cincinnati Children's Hospital
Medical Center. Corresponding author: Lili He (emails: [email protected])
Z. Li is with the Imaging Research Center, Department of Radiology,
Cincinnati Children's Hospital Medical Center, and also with the Department
of Electronic Engineering and Computer Science, University of Cincinnati,
Cincinnati, OH, USA (email: [email protected]).
H. Li and L. He are with the Imaging Research Center, Department of
Radiology, Artificial Intelligence Imaging Research Center, and Center for
Prevention of Neurodevelopmental Disorders, Perinatal Institute, Cincinnati
Children's Hospital Medical Center, and also the Department of Radiology,
University of Cincinnati College of Medicine, Cincinnati, OH, USA (emails:
[email protected]; [email protected]).
A. Ralescu is with the Department of Electronic Engineering and Com-
puter Science, University of Cincinnati, Cincinnati, OH, USA (email:
[email protected]).
J. Dillman is with the Imaging Research Center, Department of Ra-
diology, and Artificial Intelligence Imaging Research Center, Cincinnati
Children's Hospital Medical Center, and also the Department of Radiology,
University of Cincinnati College of Medicine, Cincinnati, OH, USA (email:
[email protected]).
N. Parikh is with the Center for Prevention of Neurodevelopmental Disor-
ders, Perinatal Institute, Cincinnati Children's Hospital Medical Center, and
also with the Department of Pediatrics, University of Cincinnati College of
Medicine, Cincinnati, OH, USA (email: [email protected]).
tomography (CT), and positron emission tomography (PET)
[1]. Even though it was derived from the oncology field,
radiomics has been applied to various medical image studies
[2]. Extracted features (referred to as radiomic data/features)
are often defined as shape-based, first-, second-, and higher-
order statistical descriptors of radiological images, such as
signal intensity distribution, tissue/organ morphology/shape,
volumetry, and inter-voxel patterns and texture [3]. These
interpretable radiomic data change with alterations in tissue
histology and morphology, thereby, being capable of quanti-
fying phenotypic characteristics in radiological images to aid
diagnosis, prognosis, and assessment of response to treatment.
The practice of radiomics involves multiple discrete steps,
including image acquisition, image segmentation, feature ex-
traction, radiomic data management, and data analysis [1],
[2]. Although each of these complex steps has its own chal-
lenges, radiomics continues to rapidly expand as knowledge
and tools in each domain have been constantly evolving
[2]. Particularly, tools to standardize feature extraction, an-
alytic tools, and open-source platforms (e.g., PyRadiomics [4]
and MIRP [5]) are available for the research community to
automatically extract a large panel of engineered radiomic
features from medical images. This largely facilitates the sub-
sequent radiomic data analysis by addressing reproducibility
and comparability issues [4]. Earlier studies applied radiomic
data for radiological phenotyping to investigate cancer di-
agnosis [6], survival prediction [7], malignancy prediction
[8], recurrence prediction [9], and cancer staging [10]. In
recent years, radiomic features were also utilized in other
medical applications, such as Alzheimer's disease [11], [12],
schizophrenia [13], [14], and hepatic diseases [15]. Many prior
studies have used supervised machine learning models to learn
the representations of radiomic features for clinical decision
support and to reveal underlying pathophysiology [16]–[19].
Despite the success of those works, some challenges remain
in the existing radiomics studies. Supervised learning models
typically require a large number of labeled data to achieve
reliable and robust performance. However, annotating medical
images is a time-consuming, labor-intensive, and expensive
process, and it may also involve invasive procedures or long-
term follow-up with subjects [20], thereby limiting the sample
size.
Recently, self-supervised learning (SSL), a feature rep-
resentation learning paradigm, was developed to solve the
challenges posed by the over-dependence of labeled data.
SSL emerged from the fields of natural language processing
(NLP) and computer vision [21]–[23]. In the SSL paradigm,
2
Fig. 1. Schematic diagram of the proposed method. For each selected pair of subjects xi and xj , we randomly masked k out of N ROIs on radiomic feature
maps. This process was repeated K times to enlarge the training samples. We then pretrained a Transformer via a joint loss function to solve two pretext
tasks i.e., a radiomic feature reconstruction and a subject-similarity discrimination using augmented training samples. Finally, we fine-tuned the pretrained a
Transformer to perform downstream tasks. N: Number of Transformer blocks; Add & Norm: Residual connection and layer normalization; MLP: Multilayer
perceptron.
we typically pre-train the model by solving pretext
tasks
in an unsupervised manner, where the data itself provides
supervision, and then fine-tune the model by solving real
tasks (referred to as downstream tasks) in a supervised manner
[24]. SSL has been gaining popularity in the medical domains
of clinical diagnosis [25], segmentation [26], and medical
text mining [27]. Previous SSL studies have developed a
series of pretext tasks with supervisory signals to train the
models for learning the latent feature representation, such as
the rotation-oriented approach [28], BERT-based model [29],
Rubik's cube recovery [30], anatomical position prediction
[31], and modality-invariant method [25]. Although these SSL
methods achieved excellent performance for various NLP and
computer vision tasks, they have not been adapted to radiomic
features, whose characteristics are different from text and
image data. Applying existing SSL approaches to radiomic
data may lead to sub-optimal model performance.
In this study, our objective was to develop a novel SSL
technique explicitly for radiomic data. As noted, radiomic data
has its own unique characteristics. In practice, in radiomics
studies, one would automatically or manually delineate one
or more regions of interest (ROIs) on radiological images
and then extract high-throughput (e.g., often one-hundreds
or more) quantitative features from each ROI, resulting in a
radiomic feature map for each subject [3]. Such radiomic data
(i.e., feature maps) have neither a strong spatial relationship as
image data nor a sequential relationship as in NLP language
data. The spatial relationship specifies how an object is located
in space in relation to other objects in an image, while the
sequential relationship specifies how a word is dependent on
those that come before or after it in language data. Different
from image/language data, ROIs, and quantitative features in
radiomic feature maps do not need to follow any specific order,
and their positions are invariant to the radiological phenotypes
(e.g., tumors, lesions, medical conditions, etc.). In contrast,
there exist implicit biological or pathological relationships
among different ROIs in radiomic data, which reflect how
a ROI is related to other ROIs or pathology [32]–[34]. For
example, in a long-term follow-up brain development study,
volumes (i.e., one of the most common radiomic features)
of regional brain ROIs have been observed to follow typical
and atypical growth patterns in children [35]. In another
study, simultaneously reduced volume in five ROIs of the
gyrus rectus, medial frontal cortex, superior frontal gyrus,
inferior frontal gyrus, and subcallosal area were observed
and associated with neuropsychiatric symptom scores in a
cohort with various neurodegenerative diseases [36]. Using the
abdominal MRI image as another example, volume ratio of
liver and spleen gradually decreased with worsening hepatic
fibrosis [34].
In this work, by taking advantage of latent biological or
pathological relationships in radiomic data, we formulated a
pretext task, Radiomic Features Reconstruction, by randomly
masking or hiding radiomic features from ROIs, and then
reconstructing the masked/hidden radiomic features using the
visible ones. (Figure 1) Instead of grid masks for image data,
we explicitly designed row-wise masks by considering the
characteristic of radiomic data to hide radiomic features from
Multi-Head AttentionMLPMLPAdd & NormAdd & NormTransformer F(*; θ) T×Pretext Task #1: Radiomic Features ReconstructionCollaborative Self-Supervised LearningPre-trainedTransformer MLPFine-TuneMSubjectssubject xisubjectxjRandom SelectingPretext Task #2: Subject-Similarity discriminationDownstream TaskReconstructed feature mapssubject igroupsubjectj groupFeature Representation (fi)MLPFeature Representation (fi)Radiomic Feature ExtractionMasking ROIsData AugmentationL2Normsubject xisubjectxjRegressionClassificationCollaborative Learningrandomly selected ROIs. In this way, learning to reconstruct
the masked radiomic features helps the model understand
latent relations among ROIs. The learned radiomic feature
representation using such a pretext SSL task may benefit
the downstream tasks (e.g., disease classification or outcome
regression), in which sufficient annotated data are lacking.
Nevertheless, these feature representations learned by the
Radiomic Features Reconstruction pretext task may be sen-
sitive to the position of the masks, i.e., masking different ROIs
may produce different mask-dependent feature representations
from the same radiomic data. Because our downstream tasks
are independent of any pretext task, we formulated another
pretext task, Subject-Similarity Discrimination, to force the
model
to learn mask-invariant feature representations. The
Subject-Similarity Discrimination task aims to discover the
similarity and dissimilarity information from the masked ra-
diomic feature maps and to cluster those from the same
subject into one group. In this way, the Subject-Similarity
Discrimination task collaboratively aids the Radiomic Features
Reconstruction task to learn robust latent feature representa-
tions from radiomic data in a self-supervised manner.
As such, we proposed a novel collaborative SSL approach
to solve the challenge of insufficient labeled data for radiomic
data by developing a Radiomic Features Reconstruction task
and a Subject-Similarity Discrimination task to collabora-
tively learn the representative radiomic features from the data
itself without any human labeling. A collaborative learning
objective was presented for feature representation learning
by combining reconstruction and contrastive learning loss
functions to collaboratively learn the radiomic features. We
further analyzed the proposed objective function using the
Bregman divergence in a statistical divergence view. Our pro-
posed collaborative SSL method was specifically designed for
radiomic features by considering its unique data characteristic.
Then, the SSL-learned feature representation can be used in
downstream tasks to fine-tune task-specific supervised learning
models. To evaluate the effectiveness of our method, we
first propose a simulation study to theoretically compare our
methods with other state-of-the-art SSL approaches. We then
employed two independent real datasets to test our model for
early prediction of abnormal neurodevelopmental outcomes in
very preterm infants (VPIs). Our contributions in this paper
are outlined as follows:
1) We proposed a novel collaborative SSL approach for
radiomic features to address the challenge of insufficient
labeled data. By explicitly considering the unique data
characteristic of radiomic features, we designed two
collaborative pretext tasks, Radiomic Features Recon-
struction and Subject-Similarity Discrimination. Our
work is the first to apply SSL techniques to radiomic
features.
2) With the proposed approach, an integrated learning
objective was presented by combining reconstruction
and contrastive learning loss functions to collaboratively
learn radiomic features. We also provide mathematical
derivation to show the properties and advantages of our
objective function from a statistical divergence view.
3) A simulation study was first conducted to show
3
the effectiveness of our method. Substantial experi-
ments on two independent real datasets further demon-
strated the superior performance of our proposed
model to other state-of-the-art SSL benchmark mod-
els for downstream classification/regression tasks. The
code of our proposed method is publicly available at
https://github.com/leonzyzy/collaborative.
II. RELATED WORKS
In this section, we first review the previous works on
medical image-based diagnosis from radiomic features and
then discuss some related works on the most recent SSL
methods.
A. Automatic Disease Diagnosis from Radiomic Data
Radiomic features have been applied to many medical
applications,
including neurological disorders and tumors,
Alzheimer's disease [11], [12], schizophrenia [13], [37], breast
cancer [6], and liver disease [38], [39]. Those works [17],
[40], [41] typically involved three main steps: 1) delineate
relevant ROIs in MRI images, 2) extract quantitative radiomic
features for each ROI, and 3) develop a predictive model
with the selected radiomic features for disease diagnosis. For
example, Yue et al [40] used logistic regression and random
forest to predict hospital stay in patients with SARS Cov-
2 using CT radiomic features. He et al [17] stratified the
severity of liver stiffness for children and adolescent patients
using radiomic features from T2-weighted MRI liver images
by developing support vector machine (SVM) models. Brunese
et al [42] developed an ensemble supervised learning model
to detect brain cancer using radiomic features. Peng et al [41]
combined the SVM model and Isomap (IsoSVM) on brain
radiomic features to predict treatment effects after stereotactic
radiosurgery. Most prior studies only focused on one or a
few ROIs based on prior knowledge to simplify the training
procedure of supervised learning models. This was mainly due
to the limited sample size of the dataset. Otherwise, supervised
learning models can be easily overfitted. In this work, our
SSL-based strategy is able to generalize the radiomics to
investigate the arbitrary number of ROIs on medical images
without substantial prior knowledge. This is achieved by
largely improving the issue of supervised learning models'
over-dependence on labeled data.
B. Self-Supervised Learning
Recently, SSL has been widely recognized in computer
vision and pattern recognition, due to its ability to handle
a massive amount of unlabeled data. Various types of self-
supervised methods have been developed by designing differ-
ent pretext tasks with supervisory signals to learn the latent
feature representation directly from the data itself. In this sec-
tion, we discuss some state-of-art SSL models in the domain of
computer vision. SSL methods for images can be summarized
into three categories, including predictive, reconstructive, and
contrastive learning methods. Predictive methods usually apply
models to learn the latent features by predicting the pseudo
labels, such as rotation prediction [43], puzzles solving [44],
anatomical position prediction [31], and 3D distance prediction
[45]. Reconstructive methods aim to learn an encoder mapping
input images into latent features and a corresponding decoder
to reconstruct the input images from the latent features [46].
These reconstructive pretext tasks include image denoising
with auto-encoders [47], [48], context restoration [49], and
Rubik's cube [30]. The Contrastive learning method [22], [23]
propose tasks to discriminate the subject/instance. The main
idea of contrastive learning methods is to train an encoder
that embeds the input images into latent representations, and
then clusters the representation of the different views from
the same images and spread the representation of the views
from different images based on a distance estimation (e.g.,
mutual information). Some representative works are MoCo v1
[23], Invariant [50], SimCLR [22], and BYOL [51]. As noted
earlier, radiomic features have different data characteristics
from images. Although some of these SSL methods for images
can be applied to radiomic feature maps, it is very difficult to
achieve superior model performance. This was illustrated in
our experiments, where we compared the proposed approach
with multiple state-of-the-art SSL approaches in this section.
III. METHODOLOGY
A. Overview
An overview of the framework is shown in Figure 1.
Assume that we have a total of M subjects. For each set
of MRI images, we can apply MRI preprocessing tools to
parcellate the whole MRI images into N different ROIs. Next,
we extracted the radiomic features from each ROI using the
radiomics pipelines (e.g., PyRadiomics [4]), thus resulting in
a 2D feature map for each subject. Our collaborative SSL
approach is an iterative learning procedure. In each iteration,
we randomly selected a pair of subjects xi and xj from the
training dataset i.e., S = {xi}M
i=1, and masked k random
ROIs on individual radiomic feature maps. We repeated this
augmentation K times to generate many pretext pseudo-
training samples ̃xi. After that, we adapted a Transformer
[52] as a network encoder F (*; θ) to map the input ̃xi to
a set of latent feature representation ̃fi = { ̃fi1, ̃fi2, . . . , ̃fiK}.
These feature representations are collaboratively optimized via
a joint loss function by a radiomic features reconstruction
task and a subject-similarity discrimination task. Then, we
layers
connected multilayer perceptron (MLP) and output
to the pretrained Transformer as the model for downstream
tasks. Finally, we fine-tuned the whole model on our real
downstream task, i.e., cognitive deficits prediction, using the
original radiomic features as input to solve the real down-
stream classification or regression tasks in a supervised fashion
using the subjects with the labels. Below, we will elaborate
on the radiomic features reconstruction and subject similarity
discrimination.
B. Network Encoder
We applied a Transformer without position encoding as
a network encoder in our framework to learn two pretext
tasks for embedding the radiomic features. We selected the
4
transformer as the encoder according to the data characteristic
of radiomic data. Particularly, radiomic data (i.e., feature
maps) are statistical descriptions of individual regions of
interest (ROIs) on the images. Though the radiomic data
appear to be 2D maps, they have no strong spatial relationship
on the feature maps. Thus, different from most of the other
existing SSL methods, convolutional neural networks (CNNs)-
based models are inappropriate to work as feature encoder for
radiomic data. Actually, radiomic data are a set of vectors.
In this sense, radiomic feature maps are similar to natural
language data, where each word is commonly represented by
a vector (a.k.a., word embeddings) and the whole sentence
becomes a set of vectors. There exist implicit pathological or
biological relationships among the different brain regions (i.e.,
ROIs) in the radiomic feature map, which is presented by how
one a ROI is related to all other ROIs [33], [34]. As such,
Transformer [52], more precisely, the built-in self-attention
mechanism, can efficiently capture how individual ROI is
related to all other ROIs. Thus, we believe that Transformer
as the encoder network can learn better feature embeddings
compared to other encoders (e.g., CNNs). Furthermore, ra-
diomic data does not have a strong sequential relationship as
in language data. That is, the order of brain regions (i.e.,
ROIs positions) is invariant to the radiological phenotypes
(e.g., tumors, lesions, medical conditions, etc.). Accordingly,
we removed the position encoding module in the typical
Transformer to avoid the model to learn/remember the order
of the ROIs that are invariant to downstream tasks.
C. Radiomic Features Reconstruction Task
To discover the latent relation among radiomic features from
different ROIs, we designed the radiomic features reconstruc-
tion task. The reconstruction pretext task is similar to the
masked autoencoder (MAE) [53], which masks out a large
random subset of image patches and pretrains a network to
reconstruct the masked patches. The major difference is that,
for the MRI radiomic data, we designed to mask several ROIs
from the input radiomic feature maps and conduct a radiomic
feature reconstruction task to help the model understand the
latent relations among ROIs. To reach that, the input ̃xi is first
fed to a Transformer to produce the high-level features ̃fi, and
then ̃fi is fed into a multi-layer perceptron (MLP) to produce
the reconstructed radiomic feature map ˆxi with the same
feature dimension size as ̃xi. We defined our reconstruction
loss for the first pretext task as a convex linear combination of
distance metrics of square error and JS-Divergence. The square
error measures the Euclidean distance between reconstructed
radiomic feature map ˆxi and ground-truth radiomic feature
map ̃xi. However, the square error only considers the distance
metrics within the Euclidean space, while the probabilistic
distance measure between the probability density function of
ˆxi and ̃xi the was ignored. This may lead to an inaccurate
distance measure for radiomic features that are high dimension
[54]–[56]. To better learn the probability distribution between
ˆxi and ̃xii, we designed a convex linear combination of square
error and JS-Divergence using a weighting factor β ∈ [0, 1] to
control each loss importance, such that
(cid:88)
(cid:88)
Lr =
β(cid:107)xi − ˆxij(k,N )(cid:107)2
i∈M
j∈K
+ (1 − β)dJS
(cid:0)p(xi)(cid:107)p(ˆxij(k,N ))(cid:1)
(1)
where ˆxij(k,N ) ∈ ˆxi represents the jth, j ∈ K, reconstructed
radiomic feature map of ˆxi. dJS indicates the Jensen Shannon
(JS) divergence [57] between two probability distributions of
xi and z, which is defined as:
dJS(p(xi)(cid:107)p(ˆxij(k,N ))) =
+
1
2
1
2
dKL (p(xi)(cid:107)p(z))
dKL
(cid:0)p(ˆxij(k,N ))(cid:107)p(z)(cid:1)
(2)
(cid:2)p(xi) + p(ˆxij(k,N ))(cid:3) and dKL indicates the
where p(z) = 1
2
Kullback–Leibler (KL) divergence [58]. In practice, we used
a SoftMax to generate the probabilities. β ∈ [0, 1] of Eq (1)
denotes a weighting factor to leverage the square error loss
and JS-Divergence as a convex linear combination. We also
analyzed effects of β in our ablation study section.
D. Subject-Similarity Discrimination Task
To learn the subject-similarity information, we designed
the subject-similarity discrimination task to learn the mask-
invariant features by clustering the similar augmented samples
and separating the dissimilar ones. As shown in Figure 1,
̃fi = { ̃fi1, ̃fi2, . . . , ̃fiK} denotes a set of embedding of masked
maps, which is obtained by the Transformer F (*; θ) for ̃xi.
We first apply L2 norm to normalize each ̃fij ∈ ̃fi, i.e.,
(cid:107) ̃fij(cid:107)2 = 1. Then, the negative log-likelihood for a similar
pair ( ̃fiv, ̃fij), i (cid:54)= j, is defined as follows:
(cid:96)d( ̃fiv, ̃fij) = − log
(cid:80)
T
iv
v,j∈K exp( ̃f
(cid:80)
j∈K exp( ̃f
̃fij/τ )
T
iv
̃fmj/τ )
(cid:80)
m∈M
(3)
where τ is the temperature scale parameter, which is set to 0.1
T
empirically [22]. ̃f
̃fij denotes the inner product (e.g., Cosine
iv
similarity) between ̃fiv and ̃fij. Note, (cid:96)d( ̃fiv, ̃fij) is asymmetric,
i.e., (cid:96)d( ̃fiv, ̃fij) (cid:54)= (cid:96)d( ̃fij, ̃fiv). Thus, the overall discrimination
loss is described as:
1
2M
[(cid:96)d( ̃fiv, ̃fij) + (cid:96)d( ̃fij, ̃fiv)]
Ld =
(cid:88)
(4)
i∈M
where ̃fiv stays close to ̃fij in the embedding space when Ld
is optimized over time by training the network.
E. Representation Learning Objective
1) Loss Function: We define the total learning objective
function as the weighted linear combination of a radiomic fea-
tures construction task and a subject-similarity discrimination
task. The objective loss function is defined as follows:
L∗ = Lr + λLd
(5)
where λ is a weighting factor, which controls the importance
of the subject-similarity discrimination task. We empirically
set λ to 1 [28]. We also compared the model performance
based on different λ in the ablation study.
5
2) Statistical Divergence View: We show the equivalent
relation and properties of our learning objective loss using the
Bregman divergence [59]. Let ψ : Ω → R be a strictly convex
function, which is continuously differentiable on a closed
convex set Ω. Given two vectors of p and q, the Bregman
divergence between p and q is described as:
dψ(p, q) = ψ(p) − ψ(q) − ∇ψ(q)T (p − q)
(6)
where ψ indicates a generating function that is convex and
∇ψ(q) represents the gradient of ψ(q). In below, we show
that the learning objective L∗ can be formulated into d∗
ψ by
ψ and dd
rewriting Lr and Ld to dr
ψ, respectively.
For Lr of Eq (1), let ψ(xi) be (cid:104)xi, xi(cid:105), which is continuous
differentiable and strictly convex in R. Hence, the Bregman
divergence d(1)
ψ (xi, ˆxij) is defined as follows:
d(1)
ψ (xi, ˆxij) = (cid:107)xi(cid:107)2 − (cid:107)ˆxij(cid:107)2 − (cid:104)xi − ˆxij, 2ˆxij(cid:105)
= (cid:107)xi − ˆxij(cid:107)2
(7)
let ψ(xi) =
where (cid:104) (cid:105) denotes the inner product. Now,
(cid:80)
h∈H pxih log pxih be a strictly convex function, which is
continuously differentiable in R. The corresponding Bregman
divergence d(1)
ψ (xi, z) is
h∈H pzh = 1. Hence, based on Eq
(cid:35)
(pxih − pzh )
(cid:34)
(cid:88)
h∈H
(8)
d(2)
ψ (xi, z) =
(cid:88)
h∈H
pxih log
pxih
pzh
− log exp
= dKL (p(xi)(cid:107)p(z))
where (cid:80)
h∈H pxih = (cid:80)
(7)-(8), we finalize Lr as
(cid:88)
(cid:88)
Lr =
βd(1)
ψ (xi, ˆxij) + (1 − β)d(2)
ψ (p(xi), p(z)) (9)
i∈M
j∈K
Next, we show Ld of Eq (3) belongs to the Bregman
divergence. We first formulate (cid:96)d into a distance form without
loss of generality.
(cid:96)d( ̃fiv, ̃fij) = − log
(cid:80)
m∈M
(cid:80)
(cid:80)
j∈K exp( ̃f
̃fmj/τ )
T
iv
̃fij/τ )
j∈K exp( ̃f
T
iv
= log
1 +
(cid:88)
(cid:88)
m(cid:54)=i
j
T
exp( ̃f
iv
T
̃fmj/τ − ̃f
iv
̃fij/τ )
Using the Taylor approximation:
(cid:96)d( ̃fiv, ̃fij) ≈
(cid:88)
(cid:88)
T
exp( ̃f
iv
T
̃fmj/τ − ̃f
iv
̃fij/τ )
m(cid:54)=i
≈ 1 +
j
(cid:88)
(cid:88)
T
̃f
iv
T
̃fmj/τ − ̃f
iv
̃fij/τ
m(cid:54)=i
(cid:88)
(cid:88)
j
ψ ( ̃fiv, ̃fmj) − d(1)
d(1)
ψ ( ̃fiv, ̃fij)
∝
(10)
m(cid:54)=i
j
Hence, based on Eq (10), Ld is finalized as
Ld ∝ d∗
ψ =
1
2M
(cid:88)
i
(cid:88)
{
m(cid:54)=i
(cid:88)
j
d(1)
ψ ( ̃fiv, ̃fmj) − d(1)
ψ ( ̃fiv, ̃fij)
(cid:88)
+
v
ψ ( ̃fij, ̃fmv) − d(1)
d(1)
ψ ( ̃fij, ̃fiv)}
(11)
Based on Eq (6-11), the minimizing the learning objective
loss L∗ is equivalent to minimize two Bregman divergences.
Thus, L∗ also follows the mathematical properties of non-
negativity/positivity, convexity, linearity, duality, generalized
Pythagorean theorem, and others of the Bregman divergence.
We also compare our L∗ with other difference losses in the
ablation study.
IV. DATA AND EXPERIMENTS
A. Datasets
1) Simulated Dataset: We simulated the radiomic features
datasets based on Corso et al [60] to theoretically investigate
the different SSL methods with different training sample sizes
and the difficulty level of the class separation. Our simulation
is based on the statistics information of the MRI images.
First, we obtained radiomic feature maps from the MRI
brain images, and calculated correlation matrix, skewness, and
kurtosis, which capture important information about the real
radiomic features. Next, we simulated non-Gaussian multivari-
ate distributions using the computed statistics (e.g., correlation,
skewness, kurtosis). In addition, considering that the range of
simulated radiomic features may scale a lot, therefore, we re-
scaled each simulated feature to the original features ranges
of the CINEPS dataset (see below) using the same re-scaling
method as [60]. We further randomly assign label '1s' to the
50% of data and '0s' to the rest of the data.
The separation noise φ for the ith feature is defined as
follows:
(cid:48)0(cid:48)
φ
(cid:48)1(cid:48)
φ
(f ∗
i ) = f ∗
i −
(f ∗
i ) = f ∗
i +
̄f ∗
i
θi
̄f ∗
i
θi
, i ∈ [0, ∞]
, i ∈ [0, ∞]
6
at high- (test score≤85) or low-risk (test score>85), and a
regression task of predicting Bayley III scores (continuous).
We
applied dHCP (Developing Human Connectome
Project) pipeline to segment the whole brain image into 87
region-of-interests (ROIs) based on an age-matched neonatal
volumetric atlas [63], [64]. Briefly, the pipeline first segmented
the T2 MRI image data into 9 tissue classes (e.g., cortical grey
matter, white matter, ventricle) using the Draw-EM (Develop-
ing brain Region Annotation with Expectation-Maximization)
algorithm [64], and then registered the labeled neonatal atlases
with 87 ROIs to the subject using a multi-channel registration
approach. The neonatal atlas was created by manually labeling
T1 and T2 brain MRI images from 20 neonatal subjects [63],
[64]. The full list of 87 ROIs can be found in the original
paper. Figure 2 illustrates the brain structure of ROIs of the
brain atlas.
After segmenting each T2-weighted brain image into 87
ROIs using the dHCP pipeline, we extracted 100 radiomics
features from each ROI using the PyRadiomics pipeline [4],
therefore resulting in a 2D radiomic feature map for each
subject. Specifically, we utilized PyRadiomics [version: 3.0.1]
to extract 100 features from feature classes shape [10 fea-
tures], first order [19 features], Gray Level Co-occurrence
Matrix (GLCM) [24 features], Gray Level Size Zone Ma-
trix (GLSZM) [16 features], Gray Level Run Length Matrix
(GLRLM) [16 features], Neighbouring Gray Tone Differ-
ence Matrix (NGTDM) and Gray Level Dependence Matrix
(GLDM) [14 features]. We first conduct image intensity Z-
transform normalization and isotropic image voxel resampling
(i.e., 1.0 x 1.0 x 1.0 mm3) on the original unfiltered images
using 'sitkBSpline' as the interpolator. This was followed
by quantitative metrics calculation using the width of the
histogram bin as 25.
(cid:48)0(cid:48)
(cid:48)0(cid:48)
are the noises for label
(cid:48)0(cid:48) and (cid:48)1(cid:48), re-
. φ
where φ
spectively. ̄f ∗
i denotes the mean of re-scaled feature f ∗
i and
θi controls the difficulty of the class separation. For each
selected sample size, we generated two different separation
noises for the selected ROIs associated with the labels ((cid:48)0(cid:48)
and (cid:48)1(cid:48)) to control the difficulty level of classification tasks.
Afterward, we added the Gaussian noise from a standard
normal distribution to the simulated dataset.
2) CINEPS Dataset: Cincinnati Infant Neurodevelopment
Early Prediction Study (CINEPS) [61] collected T2-weighted
MRI brain images from 362 very preterm infants (≤32 weeks
gestational age) at Cincinnati Children's Hospital Medical
Center (CCHMC). All infants with congenital or chromoso-
mal anomalies that impact the central nervous system were
excluded. Each subject was imaged at 39-44 weeks postmen-
strual age on the same 3T Philips Ingenia scanner using a 32-
channel head coil at CCHMC. Acquisition parameters for axial
T2-weighted turbo spin-echo sequence is set as repetition time
(TR)=8300 ms, echo time (TE)=166 ms, FA=90°, resolution
1.0 × 1.0 × 1.0 mm3, and time 3:53 min. For each subject, a
Bayley Scale of Infant and Toddler Development, Third Ed.
(Bayley III) cognitive scores [62] that reflect neurodevelop-
ment were assessed at 2 years corrected age. We tested our
models using a classification task of distinguishing subjects
Fig. 2.
Axial cross-section of the neonatal volumetric brain atlas (40
gestational weeks) used in the dHCP pipeline from inferior to superior slices.
For each subject, the pipeline segmented the whole brain into 87 regions of
interest (ROIs).
3) COEPS Dataset: COEPS Dataset: Columbus Early Pre-
diction Study (COEPS) dataset includes 69 very preterm in-
fants from Nationwide Children's Hospital (NCH). All infants
with congenital or chromosomal anomalies that impact the
central nervous system were excluded. Subjects were scanned
at 38-43 weeks PMA on the same 3T MRI scanner (Skyra;
Siemens Healthcare) with a 32-channel pediatric head coil
at NCH. Acquisition parameters for axial T2-weighted fast
spin-echo sequence are TR = 9500 ms, TE = 147 ms, FA =
150°, resolution 0.93 × 0.93 × 1.0 mm3 , and time 4:09 min.
Cognitive Bayley III sub-scores were also collected for each
subject at 2 years corrected age. We implemented the same
radiomic feature processing pipeline to calculate radiomic
feature maps as the CINEPS dataset.
B. Experimental Setting
1) Model Implementation Details: As illustrated in Figure
1, we empirically set 3 Transformer blocks in the network
encoder F (*; θ) in the tensor dimension of each radiomic
feature map of ̃xi is M × N × 100, and the number of heads
in the multi-head attention layer is set to 8 as default. Two
MLP layers are included in F (*; θ) where the first MLP layer
(100 nodes) with the residual norm connection is to produce
a N × 100 attention map ̃ai, and it forwards to the second
MLP layer (8 nodes) to produce the embedding of masked
maps ̃fi with the dimension of N × 8. Then ̃fi is connected
with a third MLP layer (100 nodes) and a L2 normalization
layer to jointly learn the radiomic features reconstruction task
and the subject similarity discrimination task, respectively. In
each iteration of the proposed approach, we randomly selected
a pair of subjects to perform a random-masking k ∈ [1, 30]
with K=50 repetitions on the radiomic feature maps. Same as
[28], the network is optimized using the Adam optimizer with
a learning rate of 0.001 and a weight decay of 0.001. Note,
the position encoding of the Transformer is discarded given no
spatial or sequential relationships among the radiomic features.
Finally, we fine-tune the pretrained F (*; θ) by adding a MLP
layer (100 nodes) with a Softmax to perform the supervised
downstream classification task using a weighted cross-entropy
loss and regression tasks using the MSE loss function. We
trained both pretext and downstream tasks for 500 epochs,
and the batch-size is set to 8 for each epoch. The whole
framework was implemented using python 3.8, Scikit-Learn
0.24.1, Pytorch 1.9.1, and Cuda 11.1 with a NVIDIA GeForce
GTX 1660 SUPER GPU.
2) Competing SSL Approaches: We compared our method
with other self-supervised methods, including predictive based
methods (e.g., Rotation Prediction [43], Puzzle Solving [44]),
reconstructive based methods (e.g., MLM [21]), and con-
trastive based methods (e.g., Moco v1 [23], Invariant [50],
SimCLR [22]). For a fully-supervised baseline model, we
trained the same Transformer and MLP without pre-training
on any pretext
training epochs
tasks. We used additional
to ensure the model has been sufficiently optimized. We
perform these methods using the code that has been released
in previous publications. For [43], we transformed the input
into four different degrees,
i.e., 0°, 90°, 180°, and 270°,
and trained a network for predicting these four rotations. We
permutated the input into 32 different patch combinations in
[44], then trained a network to classify the permutation order
index. To compare with reconstructive-based methods [65], we
performed the same training strategy as the radiomic features
reconstruction task, the only difference is the optimization
method that we only trained the network with MSE loss to
7
reconstruct the hidden radiomic features. To compare with
contrastive methods [22], [23], [50], we applied the same data
augmentation techniques to perform the unsupervised learning
on embedding features space, the only difference is that we
changed the encoder CNN backbone to the Transformer of our
method. To have a fair comparison, we trained all SSL models
on the Transformer with the same network architectures, batch
size, and training optimizer, including the learning rate and
the number of training epochs in both self-supervised stages
(pretext task) and fine-tuning stage (downstream task). Since
the fully-supervised baseline model does not contain a pre-
training step on pretext tasks, we opted to train the model
with 2000 epochs to ensure the fair comparison with other
SSL models.
3) Model Evaluation: We evaluated our method in both
regression and classification metrics. We used mean absolute
error (MAE) and R2 to evaluate the predictive performance
of our Bayley III cognitive score. For risk stratification (i.e.,
binary classification), we used balanced accuracy (BA), sensi-
tivity (SEN), specificity (SPE), and the area under the receiver
operating characteristic (ROC) curve (AUC) to evaluate clas-
sification performance.
We conducted a nested 10-fold cross-validation consisting
of an inner loop and outer loop on the CINEPS dataset to
assess internal validation. In the outer loop, we first separated
the dataset into training data, validation data, and testing data
in each of the 10 iterations. We then optimized the model
on training-validation data without any information leaking
from testing data. This validation process was repeated 100
times to report mean and standard deviation (SD) to ensure
model reproducibility. We tested the optimized model trained
from the CINEPS dataset using an unseen independent COEPS
dataset.
To show the statistical significance of the model compar-
ison, we conducted the non-parametric Wilcoxon test for all
statistical inference testing based on the α = 0.05 level. All
statistical tests were conducted in R-4.0.3 (RStudio, Boston,
MA, USA).
C. Model Comparison Results with Simulation Data
We compared our method with other SSL methods using the
simulated datasets with different training sample sizes N and
difficulty levels of the classification task. We generated varying
numbers of synthetic data samples (N=50, 200, 500, 1000,
1500, 2000) with two difficulty levels, "easy task" (θ = 0.01)
and "hard task" (θ =100), respectively. The results are shown
in Figure 3. When N=50, each SSL method achieved an AUC
above 0.60 on the dataset for the easy task but a lower AUC
for the hard task. As N increases, the performance of each
method increases since more training samples can improve
model performance. Notably, our method can achieve the
best classification performance with the highest AUC on both
datasets in two tasks. The Invariant approach [50] obtained
the second best in both tasks. Rotation [43] and jigsaw puzzle
[44] had an inferior performance on the dataset in both tasks.
The simulation results theoretically showed the effectiveness
of the proposed collaborative SSL method.
8
Fig. 3. Classification performance comparison on the simulated radiomic
dataset with different training sample sizes N and feature noises θ (high/low).
Our collaborative self-supervised learning (SSL) method showed the best
classification results as N increases in both two tasks. The data in the table
are area under the receiver operating characteristic curve (AUC) values.
Fig. 4.
Bayley III test score regression for early prediction of cognitive
deficits in VPIs at 2 years of corrected age on the CINEPS dataset. We
included the top 2 self-supervised methods based on the AUC of cognitive
deficits risk stratification. We report the mean absolute error (MAE) and R2
to evaluate the regression performance.
D. Model Comparison Results with CINEPS Dataset
We evaluate the performance for cognitive deficits risk
classification and Bayley III Cognitive score regression. As
shown in Table I, our methods achieved the best classification
performance among other competing SSL methods. Com-
pared to the second-best method Invariant [50], our method
significantly improved classification performance by around
5.7% (p<0.001) on balanced accuracy, 9.4% (p<0.001) on
sensitivity, 1.9% (p<0.001) on specificity, and 0.07 (p<0.001)
for AUC. The predictive-based methods, [43] and [44] had
comparable results as the supervised learning baseline. Our
method outperformed the supervised learning baseline, 76.3%
vs 66.8% on balanced accuracy and 0.78 vs 0.66 for AUC. For
Cognitive score prediction (Figure 4), our method achieved
the best regression performance with a MAE of 12.9 and R2 of
0.32 (p<0.001), showing a significant correlation between the
predicted cognitive score and the actual cognitive assessment.
Compared with the second-best model Invariant [50], our
method significantly achieves a lower MAE (p<0.001) and a
higher R2 (p<0.001). These results further demonstrated the
effectiveness of our method.
TABLE I
MODEL COMPARISON ON THE CINEPS DATASET FOR EARLY RISK
STRATIFICATION OF VERY PRETERM INFANTS AT HIGH RISK FOR
COGNITIVE DEFICITS. NETWORK ENCODER: TRANSFORMER.
EXPERIMENTAL RESULTS ARE REPRESENTED AS MEAN (SD).
Supervised [52]
Moco v1 [23]
MLM [65]
SimCLR [22]
Invariant [50]
Jigsaw Puzzle [44]
Rotation [43]
Ours
BA (%)
67.4(4.7)
70.3(4.8)
68.9(5.2)
69.3(5.2)
70.6(4.9)
64.8(4.4)
66.2(4.1)
76.3(4.9)
SEN (%)
66.2(6.7)
68.4(7.6)
66.7(7.5)
67.5(7.5)
66.4(7.2)
63.1(5.4)
64.2(5.3)
75.8(6.9)
SPE (%)
68.5(6.2)
72.2(6.4)
71.2(5.9)
71.1(6.8)
74.8(5.8)
66.5(5.5)
68.1(5.2)
76.7(6.1)
AUC
0.67(0.07)
0.69(0.06)
0.68(0.07)
0.68(0.07)
0.71(0.07)
0.62(0.06)
0.64(0.06)
0.78(0.07)
E. Model Comparison Results With COEPS Dataset
To show the generalization of our method, we performed
an external validation on the COEPS dataset by training all
the models on the CINEPS dataset. The results are shown in
Table II. Moco v1 [23] and SimCLR [22] had the lowest
performance in classifying the high-risk group of cognitive
deficits, and predicting the Bayley III cognitive score. It is
observed that Invariant [50] showed very promising predictive
capability with the highest sensitivity and precisely predicted
Bayley III cognitive score. Again, our method can achieve the
best performance in most of the tasks. It had a higher risk
classification performance (1-2% improvement in AUC) than
Invariant [50]. For regression, our method also demonstrated
a strong predictive capability. Significant linear relationships
were observed between the predicted Bayley III cognitive
scores and the actual Bayley III scores R2 = 0.30 (p<0.001)
for cognitive development. These external results further illus-
trated the generalization capability of our method.
TABLE II
MODEL COMPARISON SELF-SUPERVISED LEARNING METHODS ON THE
COEPS DATASET FOR EARLY PREDICTION OF VERY PRETERM INFANTS AT
HIGH-RISK FOR COGNITIVE DEFICITS. ALL MODELS ARE OPTIMIZED ON
THE CINEPS DATASET. BA, SEN, AND SPE ARE REPRESENTED WITH
UNIT: %.
Supervised [52]
Moco v1 [23]
SimCLR [22]
Invariant [50]
MLM [65]
Ours
BA
62.2
64.0
63.0
68.9
64.7
71.4
SEN
60.0
50.0
60.0
70.0
60.0
70.0
SPE
64.4
78.0
66.1
67.8
69.5
72.9
AUC MAE
23.4
0.63
25.3
0.62
22.1
0.65
18.5
0.69
21.3
0.65
16.5
0.70
R2
0.14
0.12
0.17
0.25
0.14
0.30
F. Ablation Study of The Proposed SSL Model
1) Comparison of Each Individual Collaborative Pretext
Task: Our method formulated two Collaborative Pretext tasks
to learn radiomic data. To investigate individual pretext tasks
that work collaboratively, we analyzed the effects of each
pretext task for identifying cognitive deficits using the CINEPS
dataset. As shown in Table III, model
trained with the
subject-similarity discrimination task alone achieved better
classification performance than with the radiomic features
reconstruction task alone, i.e., 72.0% vs 69.8% for BA, 0.72 vs
0.70 for AUC. Such phenomenon has been observed in [28],
indicating the contrastive-based pretext may perform
[51],
better than other hand-crafted predictive-based pretext tasks.
Notably, our method, which collaboratively used two pretext
tasks, can achieve a higher classification performance than the
two individual tasks with 0.08 (p<0.001) and 0.06 p<0.001)
improvement on AUC, respectively.
MAE=12.9R2=0.32OursInvariantR2=0.23MAE=15.9(A)(B)9
TABLE III
COMPARISON OF EACH INDIVIDUAL COLLABORATIVE TASK FOR THE
COGNITIVE DEFICITS RISK STRATIFICATION ON THE CINEPS DATASET.
effectiveness of both the radiomic features reconstruction task
and the subject-similarity discrimination task.
Reconstruction
Discrimination
Ours
BA (%)
69.8(5.1)
72.0(5.5)
76.3(4.9)
SEN (%)
67.2(7.5)
70.5(6.7)
75.8(6.9)
SPE (%)
72.3(6.2)
73.4(5.5)
76.7(6.1)
AUC
0.70(0.07)
0.72(0.08)
0.78(0.07)
2) Effects of JS-Divergence in Reconstruction Task: We an-
alyzed the effects of the JS-Divergence by varying β ∈ [0, 1].
The results are shown in Table IV. β = 0 denotes that we only
train a subject-similarity discrimination task, achieving 0.72
AUC. As β increases, the importance of the JS-Divergence
decreases during the model training. β = 1 denotes that the
model is only trained with a square error loss to reconstruct
the hidden radiomic features, which achieves 0.70 AUC. In
the current study, when β = 0.5, the prediction performance
reached to the peak with a 76.3% balanced accuracy and a
0.78 AUC.
TABLE IV
THE EFFECTS OF THE JS-DIVERGENCE IN THE RADIOMIC
RECONSTRUCTION TASK. β INDICATES A WEIGHTING FACTOR OF THE
JS-DIVERGENCE IN A CONVEX COMBINATION IN EQ 1. WE COMPARED
THE EFFECTS OF DIFFERENT β FOR THE COGNITIVE DEFICITS RISK
STRATIFICATION ON THE CINEPS DATASET BY 10-FOLD
CROSS-VALIDATION.
β = 0.0
β = 0.2
β = 0.5
β = 0.7
β = 1.0
BA (%)
72.0(5.5)
68.3(4.5)
76.3(4.9)
71.5(5.1)
69.8(5.1)
SEN (%)
70.5(6.7)
67.4(5.9)
75.8(6.9)
70.5(6.8)
67.2(7.5)
SPE (%)
73.4(5.5)
69.2(5.3)
76.7(6.1)
72.4(6.1)
72.3(6.2)
AUC
0.72(0.08)
0.69(0.06)
0.78(0.07)
0.71(0.06)
0.70(0.07)
3) Importance of Subject-Similarity Discrimination Task:
tasks,
Our proposed method is based on two pretext
i.e.,
radiomic features reconstruction and subject-similarity dis-
crimination. Depending on the position of masked ROIs,
the radiomic features reconstruction task may be sensitive
and it
is prone to produce mask-dependent feature repre-
sentations. Therefore, we consider that the subject-similarity
discrimination task collaboratively aids the radiomic features
reconstruction to learn the mask-invariant features. Two pretext
tasks of our method are collaboratively trained to learn the
radiomic features, i.e., ̃fi. Here, we analyze the importance
of the subject-similarity discrimination task in our method.
To discover the effects of the subject-similarity discrimination
task, we trained our model with different λ, which indi-
cates the importance of the subject-similarity discrimination
task in Eq (5). The results are shown in Table V. When
λ = 0.0, which denotes that the network is trained only
with a radiomic features reconstruction task, achieves 69.8%
on balanced accuracy and 0.70 on AUC. As λ increased,
the model obtained the best classification performance on
cognitive deficits risk classification with 76.3% on balanced
accuracy and 0.78 on AUC. When λ continues to increase,
the classification performance started to decrease to 71.9% on
balanced accuracy and 0.72 on AUC. Our method achieved the
best classification performance on the CINEPS dataset when
λ = 1.0. These results further demonstrate the collaborative
TABLE V
THE IMPORTANCE OF THE SUBJECT-SIMILARITY DISCRIMINATION TASK. λ
INDICATES A WEIGHTING FACTOR OF THE OVERALL DISCRIMINATION
LOSS FUNCTION IN EQ (5). WE COMPARED THE EFFECTS OF DIFFERENT λ
FOR THE COGNITIVE DEFICITS RISK STRATIFICATION ON THE CINEPS
DATASET BY 10-FOLD CROSS-VALIDATION.
λ = 0.0
λ = 0.5
λ = 1.0
λ = 1.5
λ = 2.0
BA (%)
69.8(5.1)
71.7(5.1)
76.3(4.9)
74.5(4.6)
71.9(5.3)
SEN (%)
67.2(7.5)
70.5(7.1)
75.8(6.9)
73.5(6.5)
70.2(7.1)
SPE (%)
72.3(6.2)
72.9(5.9)
76.7(6.1)
75.4(5.7)
73.5(6.5)
AUC
0.70(0.07)
0.73(0.08)
0.78(0.07)
0.74(0.06)
0.72(0.06)
4) Feature Visualization: To verify whether our collabora-
tive two pretext tasks can successfully learn the latent radiomic
feature representation, we used the T-SNE plot to visualize
the learned features after the last MLP layer of our model in
Figure 5. The self-supervised learned features from [43] and
[44] showed a more mixed pattern between positive and neg-
ative samples. Compared to other contrastive-based methods,
i.e., [22], [23], Invariant [50] had a more separable decision
boundary. It is observed that our mode that collaboratively
used two pretext tasks showed a clearer potential decision
boundary between the two classes. This feature visualization
demonstrates that our collaborative self-supervised method can
help the model to learn more discriminative patterns.
5) Loss Functions Comparison: Our learning objective
loss function can be viewed as a combination of two Breg-
man divergences, including geometry-based and probabilistic-
based. To show the advantage of the loss function of our
method, we compared different divergence functions (e.g.,
MSE and KL-divergence) with our loss function. Note, we
used MLM [65] and SimCLR [22] as the baseline self-
supervised methods and trained models using the MSE and
KL-divergence, respectively. To have a fair comparison, we
trained each loss function for 200 epochs on the CINEPS
dataset with 10-fold cross-validation. As shown in Figure
6, we observed our proposed loss function converges faster
than MSE and KL-divergence during the pretext task training
stage and consistently outperformed MSE and KL-divergence
with higher AUC in the downstream classification stage. These
results demonstrate the effectiveness of our learning objective
loss using the Bregman divergence.
6) Model Performance on Lower Regiment Labeled Data:
To investigate whether our proposed collaborative SSL method
has a robust predictive ability on the lower regiment labeled
dataset, we first pretrained our method using the full CINEPS
training dataset and then fine-tuned the pretrained model on
different-sized portions (i.e., 10%, 20%, 40%, 60%, and 80%)
of the training dataset. The results are shown in Figure 7. With
only 10% of the training dataset (N=37), the proposed method
achieved a 0.63 AUC and 65.0% balanced accuracy, which was
significantly higher (p < 0.001) than a supervised baseline
model with an AUC of 0.54 and a balanced accuracy of 52.0%.
This suggests that the SSL model performed well on the lower
regiment labeled dataset. As the sample size increased, the
prediction performance of both methods increased, and the
10
Fig. 5.
Feature visualization of original radiomic features (left) and self-supervised learned features (right) from the CINEPS dataset. We extracted the
features from the last MLP layer of the Transformer and use the T-SNE to visualize the features. Our method showed more separable patterns compared to
other self-supervised methods. Orange points represent the low-risk group and blue points represent the high-risk group.
Fig. 6.
Self-supervised training loss (A) vs. downstream testing AUC
(B) on the CINEPS dataset with 10-fold cross-validation. We compare our
learning objective loss with MSE and KL-divergence on MLM and SimCLR,
respectively.
proposed collaborative SSL model consistently outperformed
the supervised baseline model. These results further demon-
strated that our proposed method could retrain competitive
prediction performance on small sample size.
7) Effects of the Number of Masked ROIs: In Table VI,
we showed the model performance with the different number
of masked ROIs. As the number of masked ROIs increased,
the model performance increased until a critical point (e.g.,
the model
30 masked ROIs in our work). We noted that
performance decreased when the number of masked ROIs was
greater than 30. Similar trends were also observed using other
competitive SSL models. Note, the purpose of the proposed
pretext task is to understand/perceive the input images (i.e.,
gain prior "knowledge") through reconstructing the masked
ROIs, and such knowledge can thereafter be reused for the
downstream task. The observation from Table VI may in-
dicate that a small number of the masked ROIs was not
challenging enough for the reconstruction task, while a large
Fig. 7. Classification performance on different-sized portions of the CINEPS
training dataset. We pretrained our collaborative SSL method using the full
CINEPS training dataset and fine-tuned it on the different proportions of the
training data.
number was over-challenging. In both scenarios, the pretrained
model performed worse than the optimal number we chose in
understanding/perceiving the input images.
8) Effects of Network Encoder: Our method is specifically
designed for the MRI radiomic data, which does not have a
strong spatial or sequential correlation among ROIs. In this
section, we compared different network encoders that have
been utilized for computer vision (i.e., CNNs) and natural lan-
guage processing (i.e., Transformer with position encoding) in
Table VII. It is observed that using VGG19 [66] and ResNet18
[67] as the backbone of the network encoder achieved lower
Original radiomic features(A)(B)TABLE VI
EFFECTS OF THE NUMBER OF MASKED ROIS IN THE PRETEXT TASK ON
THE PREDICTION PERFORMANCE ON THE CINEPS DATASET. AUC IS
SELECTED AS THE EVALUATION METRIC.
# ROIs
10
20
30
40
Rotation [43]
0.59(0.05)
0.60(0.04)
0.64(0.08)
0.63(0.07)
SimCLR [22] Moco v1 [23]
0.65(0.04)
0.66(0.08)
0.68(0.04)
0.65(0.06)
0.63(0.04)
0.67(0.04)
0.69(0.08)
0.66(0.07)
Ours
0.73(0.05)
0.75(0.07)
0.78(0.07)
0.76(0.06)
prediction results on a cognitive deficits risk stratification task.
This is because the convolutional process of the ResNet18
cannot capture the latent relationship among the radiomic
features of various ROIs. A Transformer with position en-
coding (TransForPos) [52] achieved higher performance than
ResNet18. Notably, our method using a Transformer without a
position encoding module significantly outperformed (p¡0.001)
a VGG19, a ResNet18, and a Transformer with a position
encoding module. These results showed the effectiveness of
our network encoder designed specifically for radiomic data."
TABLE VII
EFFECTS OF DIFFERENT NETWORK ENCODERS FOR THE COGNITIVE
DEFICITS RISK STRATIFICATION ON THE CINEPS DATASET
VGG19 [66]
ResNet18 [67]
TransForPos [52]
Ours
BA (%)
65.3(4.8)
64.9(4.6)
74.0(5.3)
76.3(4.9)
SEN (%)
64.7 (6.2)
63.5(5.9)
73.0(7.5)
75.8(6.9)
SPE (%)
65.9(5.5)
66.2(5.1)
74.9(5.9)
76.7(6.1)
AUC
0.66(0.07)
0.64(0.08)
0.75(0.06)
0.78(0.07)
9) Compare with MAE Method: Our radiomic features re-
construction task is similar to the masked autoencoder (MAE)
[53], which aims to reconstruct the randomly masked patches
from the images. In here, we compared our method with the
MAE using an internal validation on the CINEPS dataset and
then performed an external validation on the COEPS dataset.
We masked several random 2D patches on the radiomic feature
map and then designed a pretext task to reconstruct the masked
patches. Same as [53], we performed random masking of
75% of the patches on the radiomic features and used the
same encoder network (Transformer) for consistency. The
results are shown in Table VIII and Table IX. Compared
to the MAE method, our radiomic feature reconstruction task
achieved a better prediction performance. It is likely due to the
MAE method masks several patches on the radiomic feature
map, which does not consider the pathological relationship
among the ROIs. These results demonstrated the importance
of pathological relationships that existed in ROIs that is helpful
for the cognitive deficits risk stratification.
TABLE VIII
COMPARISON WITH THE MAE METHOD FOR THE COGNITIVE DEFICITS
RISKS STRATIFICATION ON THE CINEPS DATASET.
MAE [53]
Reconstruction
Ours
BA (%)
68.2(4.5)
69.8(5.1)
76.3(4.9)
SEN (%)
65.5(6.0)
67.2(7.5)
75.8(6.9)
SPE (%)
70.8(5.8)
72.3(6.2)
76.7(6.1)
AUC
0.67(0.04)
0.70(0.07)
0.78(0.07)
11
TABLE IX
COMPARISON WITH THE MAE METHOD FOR THE COGNITIVE DEFICITS
RISKS STRATIFICATION ON THE COEPS DATASET.
MAE [53]
Reconstruction
Ours
BA (%)
63.9
69.8
71.4
SEN (%)
60.0
70.0
70.0
SPE (%)
67.8
69.5
72.9
AUC
0.62
0.65
0.70
10) Computation Time Comparison Results with CINEPS
Dataset: Computation Time Comparison Results with
CINEPS Dataset- In this section, we provided computation
time for our method in comparison to SimCLR and Invariant
methods. The majority of the time cost of self-supervised
learning is pretraining the pretext tasks. So, we only recorded
the computation time for one epoch in the pretraining pretext
task stage. The results are shown in Table X. Our method had
the highest computation time compared to the two SimCLR
and Invariant, since our method contains two collaborative
pretext tasks, while only one pretext task existed in the other
two methods. Since the SSL pretraining is commonly applied
offline, we expect the extra computational time would not
impact future applications of the proposed collaborative SSL
method.
TABLE X
COMPUTATION TIME COMPARISON FOR ONE EPOCH DURING A PRETEXT
TASK PRETRAINING STAGE ON THE CINEPS DATASET. (UNIT: SECONDS)
Seconds
SimCLR [22]
587.22
Invariant [50]
547.15
Ours
874.34
V. DISCUSSION
Radiomics techniques are an important tool in assessing
various diseases for medical image-based diagnosis, such as
neurological impairments [11], [37], [68], cancer [6], [69],
and liver disease [18], [38], [39]. With the advancement
of deep learning techniques (e.g., CNNs), computer-aided
diagnosis has shown great promise in supporting the research
community. Although deep learning techniques achieve im-
mense success with diagnosis tasks, these methods focus on
extracting the deep features from raw images, which usually
lose the interpretation for the researchers. Instead of learn-
ing directly from raw medical images, radiomics offers an
interpretable strategy by extracting high-throughput features
to provide statistical descriptions of raw medical images [68],
[70]. However, supervised learning models usually require a
large number of human annotations and labeling with domain
knowledge, which can be expensive and timely to obtain. SSL
has been playing an efficient role to provide solutions for this
challenge by learning latent feature representation from data
itself without human annotations.
In this work, we proposed a novel collaborative self-
supervised learning method to learn radiomic data. Differ-
ent than previous SSL methods [22], [23], [43], [44], [50],
our method is specially designed to learn radiomic data.
We designed two collaborative pretext tasks, i.e., radiomic
features reconstruction and subject-similarity discrimination,
to retrieve latent biological and pathological relations among
different ROIs and discover the discriminative patterns from
these hidden radiomic features, respectively. Thus, the subject-
similarity discrimination task helps the radiomic features re-
construction task to better learn the robust feature representa-
tion, which is beneficial for the supervised downstream task,
i.e., classification and regression. Our method is validated on
three datasets, i.e., simulation, CINEPS, and COEPS datasets,
in which our method continued achieving the best prediction
performance in terms of both classification and regression
tasks among other SSL methods.
We analyzed our collaborative self-supervised methods
using the Bregman divergence. We considered the implicit
connection between the learning objective loss function and
the Bregman divergence and provided mathematical proof
to show the properties of our loss function. As shown in
Eq (11), our loss function considers two perspectives of
both geometric divergence and probabilistic divergence during
training. To show the advantage of our learning objective
function, we conducted a loss function comparison in Figure
6, demonstrating the efficiency of training loss convergence
and the classification performance of our proposed loss using
the Bregman divergence. There are some other pretext tasks,
such as rotation [43], and jigsaw puzzles [44], which learn
spatial information from the training data but demonstrated
lower performance in this study. This is due to the non-
spatial dependencies in radiomic data. Moco v1 [23] and
SimCLR [22] are two self-supervised methods that rely on
a larger batch size during training that may not be suitable
for the radiomic data, in which the sample size is usually
small. MLM [65] predicts masked/hidden features between
input and its augmentation but considers less correlation only
between augmented data. In our results, Invariant [50] also
achieved plausible results on our radiomic data, outperforming
other hand-crafted predictive-based pretext tasks. Invariant is
a contrastive learning method to learn feature embeddings
by pulling similar samples and pushing dissimilar samples
during the training. The main idea is that the features of the
same instance from different data augmentations should be
spread-out, i.e., invariant. This ensures that the model can learn
a discriminative feature embedding by optimizing the inner
products of instance features. With extensive experiments, our
method demonstrated the supervisor prediction performance,
which also supports the theoretical properties of our method.
Our work has certain limitations. First, we only considered
single modality MRI data in the current study. There are
some other SSL methods, such as modality-invariant [Li, et
al, 2020], which were designed to utilize multimodal medical
data to improve model performance. In the future, we will
investigate how to apply these methods to learn more repre-
sentative features for downstream tasks when multimodal data
is available. Second, our model is pretrained using CINEPS
data containing 362 patients, which is considered a large
dataset
imaging domain. The impact of a
small size of unlabeled data on pre-training a pretext task is
less considered. Whether the proposed self-supervised method
with other similar kinds requires a large amount of unlabeled
data for pretraining has not been thoroughly investigated and
in the medical
12
will be of interest to future work. Another limitation is that
the external validation dataset (i.e., COEPS dataset) only
contained 69 subjects, of which 10 subjects were from the
high-risk group. This affects prediction performance, where a
few samples can cause a large variation in classifying the high-
risk group (i.e., sensitivity measures). Moving forward, we
will need to evaluate our method on a larger external dataset
to evaluate generalizability.
VI. CONCLUSION
In this paper, we proposed a novel collaborative self-
supervised learning method for learning radiomic data. Our
main idea is to collaboratively train our model on two pretext
tasks i.e., a radiomic features reconstruction task and a subject-
similarity discrimination task, to learn the latent feature rep-
resentation from the radiomic data. Extensive experimental
results demonstrated the effectiveness of our method. With
further refinement, our method may facilitate computer-aided
diagnosis applications in clinical practice without large-scale
annotated datasets.
REFERENCES
[1] P. Lambin et al., "Radiomics: extracting more information from medical
images using advanced feature analysis," European journal of cancer,
vol. 48, no. 4, pp. 441–446, 2012.
[2] R. GGillies, P. Kinahan, and H. Hricak, "Radiomics: Images are more
than pictures," They Are Data. Radiology, vol. 278, no. 2, pp. 563–577,
2016.
[3] A. Zwanenburg et al., "The image biomarker standardization initiative:
image-based
standardized quantitative radiomics for high-throughput
phenotyping," Radiology, vol. 295, no. 2, p. 328, 2020.
[4] J. J. Van Griethuysen et al., "Computational radiomics system to decode
the radiographic phenotype," Cancer research, vol. 77, no. 21, pp. e104–
e107, 2017.
[5] A. Zwanenburg et al., "Assessing robustness of radiomic features by
image perturbation," Scientific reports, vol. 9, no. 1, pp. 1–10, 2019.
[6] X. Ou et al., "Radiomics based on 18f-fdg pet/ct could differentiate
breast carcinoma from breast lymphoma using machine-learning ap-
proach: A preliminary study," Cancer medicine, vol. 9, no. 2, pp. 496–
506, 2020.
[7] F. Isensee, P. Kickingereder, W. Wick, M. Bendszus, and K. H. Maier-
Hein, "Brain tumor segmentation and radiomics survival prediction:
Contribution to the brats 2017 challenge," in International MICCAI
Brainlesion Workshop. Springer, 2017, pp. 287–297.
[8] S. S. Alahmari, D. Cherezov, D. B. Goldgof, L. O. Hall, R. J. Gillies,
and M. B. Schabath, "Delta radiomics improves pulmonary nodule
malignancy prediction in lung cancer screening," Ieee Access, vol. 6,
pp. 77 796–77 806, 2018.
[9] A. Conti, A. Duggento, I. Indovina, M. Guerrisi, and N. Toschi,
"Radiomics in breast cancer classification and prediction," in Seminars
in cancer biology, vol. 72. Elsevier, 2021, pp. 238–250.
[10] P. Afshar, A. Mohammadi, K. N. Plataniotis, A. Oikonomou, and H. Be-
nali, "From handcrafted to deep-learning-based cancer radiomics: chal-
lenges and opportunities," IEEE Signal Processing Magazine, vol. 36,
no. 4, pp. 132–160, 2019.
[11] Q. Feng and Z. Ding, "Mri radiomics classification and prediction in
alzheimer's disease and mild cognitive impairment: a review," Current
Alzheimer Research, vol. 17, no. 3, pp. 297–309, 2020.
[12] C. Salvatore, I. Castiglioni, and A. Cerasa, "Radiomics approach in the
neurodegenerative brain," Aging Clinical and Experimental Research,
vol. 33, no. 6, pp. 1709–1711, 2021.
[13] L.-B. Cui et al., "Disease definition for schizophrenia by functional
connectivity using radiomics strategy," Schizophrenia bulletin, vol. 44,
no. 5, pp. 1053–1059, 2018.
[14] Y. W. Park et al., "Differentiating patients with schizophrenia from
healthy controls by hippocampal subfields using radiomics," Schizophre-
nia Research, vol. 223, pp. 337–344, 2020.
[15] H. J. Park, B. Park, and S. S. Lee, "Radiomics and deep learning: hepatic
applications," Korean Journal of Radiology, vol. 21, no. 4, pp. 387–401,
2020.
[16] F. Valdora, N. Houssami, F. Rossi, M. Calabrese, and A. S. Tagliafico,
"Rapid review: radiomics and breast cancer," Breast cancer research
and treatment, vol. 169, no. 2, pp. 217–229, 2018.
[17] L. He et al., "Machine learning prediction of liver stiffness using clinical
and t2-weighted mri radiomic data," American Journal of Roentgenol-
ogy, vol. 213, no. 3, pp. 592–601, 2019.
[18] W. K. Jeong, N. Jamshidi, E. R. Felker, S. S. Raman, and D. S. Lu,
"Radiomics and radiogenomics of primary liver cancers," Clinical and
molecular hepatology, vol. 25, no. 1, p. 21, 2019.
[19] N. Beig, K. Bera, and P. Tiwari, "Introduction to radiomics and ra-
diogenomics in neuro-oncology: implications and challenges," Neuro-
oncology Advances, vol. 2, no. Supplement 4, pp. iv3–iv14, 2020.
[20] H. Li, N. A. Parikh, and L. He, "A novel transfer learning approach to
enhance deep neural network classification of brain functional connec-
tomes," Frontiers in neuroscience, vol. 12, p. 491, 2018.
[21] Z. Lan, M. Chen, S. Goodman, K. Gimpel, P. Sharma, and R. Soricut,
"Albert: A lite bert for self-supervised learning of language representa-
tions," arXiv preprint arXiv:1909.11942, 2019.
[22] T. Chen, S. Kornblith, M. Norouzi, and G. Hinton, "A simple framework
for contrastive learning of visual representations," in International
conference on machine learning. PMLR, 2020, pp. 1597–1607.
[23] K. He, H. Fan, Y. Wu, S. Xie, and R. Girshick, "Momentum contrast
for unsupervised visual representation learning," in Proceedings of the
IEEE/CVF conference on computer vision and pattern recognition, 2020,
pp. 9729–9738.
[24] A. Kolesnikov, X. Zhai, and L. Beyer, "Revisiting self-supervised visual
representation learning," in Proceedings of the IEEE/CVF conference on
computer vision and pattern recognition, 2019, pp. 1920–1929.
[25] X. Li, M. Jia, M. T. Islam, L. Yu, and L. Xing, "Self-supervised feature
learning via exploiting multi-modal data for retinal disease diagnosis,"
IEEE Transactions on Medical Imaging, vol. 39, no. 12, pp. 4023–4033,
2020.
[26] D. Tomar, B. Bozorgtabar, M. Lortkipanidze, G. Vray, M. S. Rad,
and J.-P. Thiran, "Self-supervised generative style transfer for one-shot
medical image segmentation," in Proceedings of the IEEE/CVF Winter
Conference on Applications of Computer Vision, 2022, pp. 1998–2008.
[27] M. Nadif and F. Role, "Unsupervised and self-supervised deep learning
approaches for biomedical text mining," Briefings in Bioinformatics,
vol. 22, no. 2, pp. 1592–1603, 2021.
[28] X. Li et al., "Rotation-oriented collaborative self-supervised learning
for retinal disease diagnosis," IEEE Transactions on Medical Imaging,
vol. 40, no. 9, pp. 2284–2294, 2021.
[29] S. Ji, M. H ̈oltt ̈a, and P. Marttinen, "Does the magic of bert apply to
medical code assignment? a quantitative study," Computers in Biology
and Medicine, vol. 139, p. 104998, 2021.
[30] X. Zhuang, Y. Li, Y. Hu, K. Ma, Y. Yang, and Y. Zheng, "Self-supervised
feature learning for 3d medical images by playing a rubik's cube," in
International Conference on Medical Image Computing and Computer-
Assisted Intervention. Springer, 2019, pp. 420–428.
[31] W. Bai et al., "Self-supervised learning for cardiac mr image segmen-
tation by anatomical position prediction," in International Conference
on Medical Image Computing and Computer-Assisted Intervention.
Springer, 2019, pp. 541–549.
[32] Z. Feng, C. Xu, and D. Tao, "Self-supervised representation learning by
rotation feature decoupling," in Proceedings of the IEEE/CVF Confer-
ence on Computer Vision and Pattern Recognition, 2019, pp. 10 364–
10 374.
[33] B. Peng et al., "A multilevel-roi-features-based machine learning method
for detection of morphometric biomarkers in parkinson's disease,"
Neuroscience letters, vol. 651, pp. 88–94, 2017.
[34] P. Liu, P. Li, W. He, and L.-Q. Zhao, "Liver and spleen volume variations
in patients with hepatic fibrosis," World Journal of Gastroenterology:
WJG, vol. 15, no. 26, p. 3298, 2009.
[35] D. K. Thompson et al., "Tracking regional brain growth up to age 13 in
children born term and very preterm," Nature communications, vol. 11,
no. 1, pp. 1–11, 2020.
[36] A. Cajanus et al., "The association between distinct frontal brain
volumes and behavioral symptoms in mild cognitive impairment,
alzheimer's disease, and frontotemporal dementia," Frontiers in neurol-
ogy, vol. 10, p. 1059, 2019.
[37] M. Bang et al., "An interpretable multiparametric radiomics model for
the diagnosis of schizophrenia using magnetic resonance imaging of the
corpus callosum," Translational psychiatry, vol. 11, no. 1, pp. 1–8, 2021.
13
[38] M. P. Starmans, R. L. Miclea, S. R. Van Der Voort, W. J. Niessen,
M. G. Thomeer, and S. Klein, "Classification of malignant and benign
liver tumors using a radiomics approach," in Medical Imaging 2018:
Image Processing, vol. 10574.
International Society for Optics and
Photonics, 2018, p. 105741D.
[39] J. Wei et al., "Radiomics in liver diseases: Current progress and future
opportunities," Liver International, vol. 40, no. 9, pp. 2050–2063, 2020.
[40] H. Yue et al., "Machine learning-based ct radiomics method for predict-
ing hospital stay in patients with pneumonia associated with sars-cov-2
infection: a multicenter study," Annals of translational medicine, vol. 8,
no. 14, 2020.
[41] L. Peng et al., "Distinguishing true progression from radionecrosis after
stereotactic radiation therapy for brain metastases with machine learning
and radiomics," International Journal of Radiation Oncology* Biology*
Physics, vol. 102, no. 4, pp. 1236–1243, 2018.
[42] L. Brunese, F. Mercaldo, A. Reginelli, and A. Santone, "An ensemble
learning approach for brain cancer detection exploiting radiomic fea-
tures," Computer methods and programs in biomedicine, vol. 185, p.
105134, 2020.
[43] S. Gidaris, P. Singh, and N. Komodakis, "Unsupervised repre-
sentation learning by predicting image rotations," arXiv preprint
arXiv:1803.07728, 2018.
[44] M. Noroozi and P. Favaro, "Unsupervised learning of visual representa-
tions by solving jigsaw puzzles," in European conference on computer
vision. Springer, 2016, pp. 69–84.
[45] H. Spitzer, K. Kiwitz, K. Amunts, S. Harmeling, and T. Dickscheid,
"Improving cytoarchitectonic segmentation of human brain areas with
self-supervised siamese networks," in International Conference on Med-
ical Image Computing and Computer-Assisted Intervention. Springer,
2018, pp. 663–671.
[46] X. Liu et al., "Self-supervised learning: Generative or contrastive," IEEE
Transactions on Knowledge and Data Engineering, 2021.
[47] I. Goodfellow, Y. Bengio, and A. Courville, Deep learning. MIT press,
2016.
[48] D. Wu, H. Ren, and Q. Li, "Self-supervised dynamic ct perfusion image
denoising with deep neural networks," IEEE Transactions on Radiation
and Plasma Medical Sciences, vol. 5, no. 3, pp. 350–361, 2020.
[49] L. Chen, P. Bentley, K. Mori, K. Misawa, M. Fujiwara, and D. Rueck-
ert, "Self-supervised learning for medical image analysis using image
context restoration," Medical image analysis, vol. 58, p. 101539, 2019.
[50] M. Ye, X. Zhang, P. C. Yuen, and S.-F. Chang, "Unsupervised em-
bedding learning via invariant and spreading instance feature," in Pro-
ceedings of the IEEE/CVF Conference on Computer Vision and Pattern
Recognition, 2019, pp. 6210–6219.
[51] J.-B. Grill et al., "Bootstrap your own latent-a new approach to self-
supervised learning," Advances in Neural Information Processing Sys-
tems, vol. 33, pp. 21 271–21 284, 2020.
[52] A. Vaswani et al., "Attention is all you need," Advances in neural
information processing systems, vol. 30, 2017.
[53] K. He, X. Chen, S. Xie, Y. Li, P. Doll ́ar, and R. Girshick, "Masked au-
toencoders are scalable vision learners," in Proceedings of the IEEE/CVF
Conference on Computer Vision and Pattern Recognition, 2022, pp.
16 000–16 009.
[54] T. Saito and J.-I. Toriwaki, "New algorithms for euclidean distance
transformation of an n-dimensional digitized picture with applications,"
Pattern recognition, vol. 27, no. 11, pp. 1551–1565, 1994.
[55] L. Wang, Y. Zhang, and J. Feng, "On the euclidean distance of images,"
IEEE transactions on pattern analysis and machine intelligence, vol. 27,
no. 8, pp. 1334–1339, 2005.
[56] L. Bai and E. R. Hancock, "Graph kernels from the jensen-shannon
divergence," Journal of mathematical imaging and vision, vol. 47, no. 1,
pp. 60–69, 2013.
[57] J. Lin, "Divergence measures based on the shannon entropy," IEEE
Transactions on Information theory, vol. 37, no. 1, pp. 145–151, 1991.
[58] S. Kullback and R. A. Leibler, "On information and sufficiency," The
annals of mathematical statistics, vol. 22, no. 1, pp. 79–86, 1951.
[59] L. M. Bregman, "The relaxation method of finding the common point
of convex sets and its application to the solution of problems in convex
programming," USSR computational mathematics and mathematical
physics, vol. 7, no. 3, pp. 200–217, 1967.
[60] F. Corso et al., "The challenge of choosing the best classification method
in radiomic analyses: Recommendations and applications to lung cancer
ct images," Cancers, vol. 13, no. 12, p. 3088, 2021.
[61] N. A. Parikh et al., "Perinatal risk and protective factors in the de-
velopment of diffuse white matter abnormality on term-equivalent age
magnetic resonance imaging in infants born very preterm," The Journal
of Pediatrics, vol. 233, pp. 58–65, 2021.
14
[62] N. Bayley, Bayley scales of infant and toddler development. PsychCorp,
Pearson, 2006.
[63] I. S. Gousias et al., "Magnetic resonance imaging of the newborn
brain: manual segmentation of labelled atlases in term-born and preterm
infants," Neuroimage, vol. 62, no. 3, pp. 1499–1509, 2012.
[64] A. Makropoulos et al., "The developing human connectome project:
A minimal processing pipeline for neonatal cortical surface reconstruc-
tion," Neuroimage, vol. 173, pp. 88–112, 2018.
[65] J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, "Bert: Pre-training
of deep bidirectional transformers for language understanding," arXiv
preprint arXiv:1810.04805, 2018.
[66] K. Simonyan and A. Zisserman, "Very deep convolutional networks for
large-scale image recognition," arXiv preprint arXiv:1409.1556, 2014.
[67] K. He, X. Zhang, S. Ren, and J. Sun, "Deep residual learning for image
recognition," in Proceedings of the IEEE conference on computer vision
and pattern recognition, 2016, pp. 770–778.
[68] Y. W. Park et al., "Radiomics and machine learning may accurately
predict the grade and histological subtype in meningiomas using con-
ventional and diffusion tensor imaging," European radiology, vol. 29,
no. 8, pp. 4068–4076, 2019.
[69] M. Sollini et al., "Pet/ct radiomics in breast cancer: Mind the step,"
Methods, vol. 188, pp. 122–132, 2021.
[70] C. Parmar, P. Grossmann, D. Rietveld, M. M. Rietbergen, P. Lambin,
and H. J. Aerts, "Radiomic machine-learning classifiers for prognostic
biomarkers of head and neck cancer," Frontiers in oncology, vol. 5, p.
272, 2015.
|
http://arxiv.org/abs/2302.09795v2 | 2023-05-31T17:25:09 | 2023-02-20T06:48:19 | Simple Disentanglement of Style and Content in Visual Representations | Learning visual representations with interpretable features, i.e.,
disentangled representations, remains a challenging problem. Existing methods
demonstrate some success but are hard to apply to large-scale vision datasets
like ImageNet. In this work, we propose a simple post-processing framework to
disentangle content and style in learned representations from pre-trained
vision models. We model the pre-trained features probabilistically as linearly
entangled combinations of the latent content and style factors and develop a
simple disentanglement algorithm based on the probabilistic model. We show that
the method provably disentangles content and style features and verify its
efficacy empirically. Our post-processed features yield significant domain
generalization performance improvements when the distribution shift occurs due
to style changes or style-related spurious correlations. | [
"Lilian Ngweta",
"Subha Maity",
"Alex Gittens",
"Yuekai Sun",
"Mikhail Yurochkin"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09795v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09795v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.CV",
"stat.ML"
] | Simple Disentanglement of Style and Content in Visual Representations
Lilian Ngweta * 1 Subha Maity * 2 Alex Gittens 1 Yuekai Sun 2 Mikhail Yurochkin 3 4
3
2
0
2
y
a
M
1
3
]
G
L
.
s
c
[
2
v
5
9
7
9
0
.
2
0
3
2
:
v
i
X
r
a
Abstract
Learning visual representations with interpretable
features, i.e., disentangled representations, re-
mains a challenging problem. Existing methods
demonstrate some success but are hard to apply to
large-scale vision datasets like ImageNet. In this
work, we propose a simple post-processing frame-
work to disentangle content and style in learned
representations from pre-trained vision models.
We model the pre-trained features probabilisti-
cally as linearly entangled combinations of the
latent content and style factors and develop a sim-
ple disentanglement algorithm based on the proba-
bilistic model. We show that the method provably
disentangles content and style features and ver-
ify its efficacy empirically. Our post-processed
features yield significant domain generalization
performance improvements when the distribution
shift occurs due to style changes or style-related
spurious correlations.
1. Introduction
Deep learning models produce data representations that
are useful for many downstream tasks. Disentangled rep-
resentations, i.e. representations where coordinates have
meaningful interpretations, are harder to learn (Locatello
et al., 2019b) but they come with many additional benefits,
e.g., data-efficiency (Higgins et al., 2018) and use-cases in
causality (Sch ̈olkopf et al., 2021), fairness (Locatello et al.,
2019a), recommender systems (Ma et al., 2019), and image
(Lee et al., 2018) and text (John et al., 2018) processing.
In this paper, we consider the problem of isolating con-
*Equal contribution 1Department of Computer Science, Rens-
selaer Polytechnic Institute, Troy, New York, United States
2Department of Statistics, University of Michigan, Ann Ar-
bor, Michigan, United States 3IBM Research, Cambridge, Mas-
sachusetts, United States 4MIT-IBM Watson AI Lab, Cambridge,
Massachusetts, United States. Correspondence to: Lilian Ng-
weta <[email protected]>, Subha Maity <[email protected]>,
Mikhail Yurochkin <[email protected]>.
Proceedings of the 40 th International Conference on Machine
Learning, Honolulu, Hawaii, USA. PMLR 202, 2023. Copyright
2023 by the author(s).
1
Figure 1. Illustration of the proposed method, PISCO. Features of
an original image and features of a stylized image are different
when extracted using a feature extractor such as ResNet-50 pre-
trained in ImageNet. These features are entangled, thus changing
the style affects all features. When PISCO is used to disentangle
these features, it isolates style features and content features, thus
the content features of the two images are the same and only the
style features are different.
tent from style in visual representations (Wu et al., 2019;
Nemeth, 2020; Ren et al., 2021; K ̈ugelgen et al., 2021), a
special case of learning disentangled representations. Here
we use the term style to refer to features or factors that are
not causally related to the outcome of interest. We also note
prior works that, different from our work, study style in
the context of image appearance (Garcia & Vogiatzis, 2018;
Saleh & Elgammal, 2015; Ruta et al., 2022; 2021). Our
goal is to obtain representations where a pre-specified set of
factors (coordinates) encodes image "styles" (e.g., rotation,
color scheme, or style transfer (Huang & Belongie, 2017)),
while the remaining factors encode content and are invariant
to style changes (see Figure 1).
An important application of such representations is out-of-
distribution (OOD) generalization. Image recognition sys-
tems have been demonstrated to be susceptible to spurious
correlations associated with style, e.g., due to background
colors (Beery et al., 2018; Sagawa et al., 2019), and to
various style-based distribution shifts, e.g., due to image
corruptions (Hendrycks & Dietterich, 2018), illumination,
or camera angle differences (Koh et al., 2020). Simply dis-
carding style factors when training a prediction model on
disentangled representations can aid OOD generalization.
Disentangling content from style is also advantageous in
many other applications, e.g., image retrieval (Wu et al.,
2009), image-to-image translation (Ren et al., 2021), and
Simple Disentanglement of Style and Content in Visual Representations
visually-aware recommender systems (Deldjoo et al., 2022).
contributions are summarized below:
While there is abundant literature on learning disentangled
representations, most statistically principled methods fit so-
phisticated generative models (Bouchacourt et al., 2018;
Hosoya, 2018; Shu et al., 2019; Wu et al., 2019; Locatello
et al., 2020). These methods work well on synthetic and
smaller datasets but are hard to train on larger datasets like
ImageNet (Russakovsky et al., 2015). This is in stark con-
trast to representation learning practice; the most common
representation learning methods only learn an encoder (e.g.
SimCLR (Chen et al., 2020)). That said, there are some re-
cent works that consider how to learn disentangled encoders
(Zimmermann et al., 2021; K ̈ugelgen et al., 2021; Wang
et al., 2021).
Specific to style and content, K ̈ugelgen et al. (2021) show
that contrastive learning, e.g., SimCLR (Chen et al., 2020),
theoretically can isolate style and content, i.e. learn rep-
resentations that are invariant to style. Contrastive learn-
ing methods are gaining popularity due to their ability to
learn high-quality representations from large image datasets
without labels via self-supervision (Doersch et al., 2015;
Chen et al., 2020; Chen & Batmanghelich, 2020; Grill et al.,
2020; Chen & He, 2021). Unfortunately, style invariance
of contrastive learning representations is rarely achieved
in practice due to a variety of additional requirements that
are hard to control for (see Section 5 and Appendix C.1 in
K ̈ugelgen et al. (2021)).
Most of the prior works are in-processing methods that train
an end-to-end encoder from scratch. On the other hand, we
focus on post-processing representations from a pre-trained
deep model (which may not be disentangled) so that they
become provably disentangled. The post-processing setup
is appealing as it allows re-using large pre-trained models,
thus reducing the carbon footprint of training new large
models (Strubell et al., 2019) and making deep learning
more accessible to practitioners with limited computing
budgets. Post-processing problem setups are prominent in
the algorithmic fairness literature (Wei et al., 2019; Petersen
et al., 2021).
To develop our post-processing setup for learning disentan-
gled representations, we assume that the pre-trained repre-
sentations are simply an invertible linear transformation of
the style and content factors (cf. Assumption 2.1). While
the linear model assumption may appear too simple at a
first glance, it is motivated by the result of Zimmermann
et al. (2021) showing that contrastive learning recovers true
data-generating factors up to an orthogonal transformation.
The representation may not come from a contrastive learn-
ing model or assumptions of Zimmermann et al. (2021)
might be violated in practice, thus we consider a more gen-
eral class of linear invertible transformations in our model
which we justify theoretically and verify empirically. Our
• We formulate a simple linear model of entanglement
in pre-trained visual representations and a correspond-
ing method for Post-processing to Isolate Style and
COntent (PISCO).
• We establish theoretical guarantees that PISCO learns
disentangled style and content factors and recovers
correlations among styles. Our theory is supported by
a synthetic dataset study.
• We verify the ability of PISCO to disentangle style
and content on three image datasets of varying size and
complexity via post-processing of various pre-trained
deep visual feature extractors.
In our experiments,
discarding the learned style factors yields significant
out-of-distribution performance improvements while
preserving the in-distribution accuracy.
2. Problem formulation
In light of the recent success of contrastive learning tech-
niques for obtaining self-supervised embeddings, Zimmer-
mann et al. (2021) have performed a theoretical investiga-
tion on the InfoNCE family (Gutmann & Hyv ̈arinen, 2012;
Oord et al., 2018; Chen et al., 2020) of contrastive losses.
Under some distributional assumptions, their investigation
reveals that InfoNCE loss can invert the underlying gener-
ative model of the observed data. More specifically, given
an observed data x = g(z) where z and g are correspond-
ingly the underlying latent factors and the generative model,
Zimmermann et al. (2021) showed that InfoNCE loss finds
a representation model f such that f
g(z) = Rz for some
orthogonal matrix R. Though this is quite welcoming news
in nonlinear independent component analysis (ICA) litera-
ture (Hyv ̈arinen & Pajunen, 1999; Hyv ̈arinen & Morioka,
2016; Jutten et al., 2010), the representation model may not
be good enough for learning a disentangled representation.
In fact, Zimmermann et al. (2021) show that only under
a very specific generative modeling assumption a type of
contrastive objective can achieve disentanglement, and that
disentanglement is lost when the assumptions are violated.
◦
At a high level, disentanglement in representation learn-
ing means the style and content factors are not affected by
each other. Looking back at the result (Zimmermann et al.,
2021) that contrastive loss can recover the generative latent
factors up to an unknown rotation, an implication is that
disentanglement in the learned representation may not be
achieved. However, all is not lost; we suggest a simple
post-processing method for the learned representations and
show that it achieves the desired disentanglement.
We now formally describe our post-processing setup. We
Rd and assume
denote the space of the latent factor as
Z ⊂
2
Simple Disentanglement of Style and Content in Visual Representations
Z
that the latent factor is being generated from a probability
distribution Pz on
. Similar to Zimmermann et al. (2021)
we assume that there exists a one-to-one generative map
g such that the observed data is generated as
x =
Pz. The next assumption is crucial for our linear
g(z), z
post-processing technique and is motivated by the finding
in Zimmermann et al. (2021).
Assumption 2.1. There exists a representation map f :
g(z) = Az for some left
X ∋
Rd′
∼
′
X → Z
invertible matrix A
⊂
such that f
Rd′×d.
◦
∈
′ =
An example of such f could be the representation model
learned from InfoNCE loss minimization, where Zimmer-
mann et al. (2021) showed that the assumption is true for
and A is an orthogonal matrix. A consequence of
Z
left invertibility for A is that d′
the dimension
of learned representation could be potentially higher than
that of the generating latent factors, which is often natural
to assume in many applications.
d, i.e.,
≥
Z
Throughout the paper, we denote f
g(z) as u and call
it entangled representation. With this setup, we're now
ready to formally specify the disentanglement (also known
as sparse recovery) in representation learning.
◦
⊂
[d] ≜
1, 2, . . . , d
{
Definition 2.2 (Disentangled representation learning/sparse
recovery). Let us denote FS
as the
}
set of style factors and it's cardinality as m ≜
FS
. We
|
denote the remaining factors FC ≜ [d]
FS and call them
−
Rd×d′
content factors. For a matrix P
we say the linear
ˆz ≜ Pu disentangles or sparsely
post-processing u
recovers the style and content factors if the following hold
for the matrix PA:
(cid:55)→
∈
|
1. [PA]FS,FS is an m
×
m diagonal matrix.
2. [PA]FC,FC is a (d
−
3. [PA]FS,FC and [PA]FC,FS are m
m null matrices.
m)
−
×
m)
(d
m) invertible matrix.
(d
×
−
m) and (d
−
×
In other words, ˆz = PS u is disentangled or sparsely recov-
ered in FS if for any j
FS the coordinate [ˆz]j is a constant
multiplication of [z]j and [ˆz]FC is just a pre-multiplication
of [z]FC by an invertible matrix.
∈
Without loss of generality we assume that FS = [m]. Next,
we highlight a conclusion of the sparse recovery, which has
a connection to independent component analysis (ICA).
Corollary 2.3 (Correlation recovery). One of the conclu-
sions of sparse recovery is that the estimated style factors
have the same correlation structure as the true style factors.
Denoting corr(X) as the correlation matrix for a generic
random vector X the conclusion can be mathematically
stated as
corr([ˆz]FS ) = corr([z]FS ) .
(2.1)
3
A proof of the statement is provided in §A.3. In a special case
connected to ICA, where the true correlation distribution Pz
has uncorrelated style factors, i.e., corr([z]FS ) = Im, then
same is true for estimated style factors.
The rest of the paper describes the estimation of PS and
investigates its quality in achieving disentanglement.
3. PISCO
To achieve sparse recovery, we assume that we can manipu-
late the samples in some specific ways, which we describe
below.
Assumption 3.1. We assume the following:
1. Sample manipulations: For each sample x = g(z)
and style factor j
FS we have access to the sample
x(j) ≜ g(z(j)) that has been created by modifying the
j-th style factor of x while keeping content factors
unchanged, i.e.,
∈
[z(j)]i =
(cid:40)
= [z]i,
[z]i,
i = j,
i
FC .
∈
(3.1)
∈
R, βj
2. Sample annotations: There exist
two numbers
αj, βj
= 0 which are associated to each j-th
style factor and independent of the latent factors z such
that for each sample x = g(z) and it's modified ver-
sion x(j) = g(z(j)) we observe the sample annotations
yj = αj +βj[z]j +ε(j) and ̃yj = αj +βj[z(j)]j + ̃ε(j),
where (ε(j), ̃ε(j)) pair has zero mean and is uncorre-
lated with (z, z(j)).
Sample annotations formalize the notion of concept from
interpretable ML (Kim et al., 2018) and generalize the usual
disentangled representation setting in which the latent fac-
tors are the concepts. By taking αj = 0 and βj = 1, we
have yj = [z]j and ̃yj = [z(j)]j, which equates the annota-
tions and the latent factors. We provide an illustration for a
single style factor, i.e. FS =
, in Figure 1. Here, x is the
1
}
{
original image and we annotate it as α1 + β1[z]1 = +1. We
stylize the image to obtain x(1) and assume that style trans-
formation does not change any content factors of the image.
We annotate the transformed image as α1 + β1[z(1)]1 =
1.
Examples of such sample manipulations are easily avail-
able in vision problems, e.g., image corruptions (Hendrycks
& Dietterich, 2018) and style transfer (Huang & Belongie,
2017). Combining style transfer and prompt-based image
generation systems like DALL
E 2 further enables using nat-
*
ural language to describe desired sample manipulations (Fig-
ure 1 illustrates such image manipulation - see Appendix C.1
for prompt and other details and Figure 5 for more exam-
ples). In §5 we use these examples for our experiments.
−
̸
̸
Simple Disentanglement of Style and Content in Visual Representations
We denote the entangled representations (obtained from
Assumption 2.1) corresponding to the images x and x(j) as
u and u(j). With access to such sample manipulations, one
can recover the j-th latent factor from a simple minimum
norm least square regression problem:
ˆpj ≜ lim
μ→0+
1
2n
n
(cid:88)
i=1
arg min
a∈R,p∈Rd′
+( ̃y(j)
j u, where
p⊤ui)2
[ˆz]j ≜ ˆp⊤
(cid:104)
(y(j)
a
−
i −
i )2(cid:105)
μ
2 ∥
a
−
+
p⊤u(j)
i −
2
p
2
∥
(3.2)
We resort to the minimum norm least square regression
instead of the simple least square regression because the
variance of the predictor var(u) = var(Az) = Avar(z)A⊤
d′, which leads to non-invertible covariance
has rank d
for the design matrix whenever d < d′.
≤
Intuitively, ˆp⊤
j u is the one dimensional linear function of
u which is most aligned to the coordinate [z]j. As we shall
see later, under our setup ˆp⊤
j u is just a scalar multiple of
[z]j, and hence we successfully recover the j-th style factor.
We stack ˆpj into the j-th row of P, i.e. [P]j,* = ˆp⊤
j .
To extract the content factors we first recall that they should
exhibit minimal change corresponding to any changes in the
FS. We enforce this by leveraging
style factors [z]j, j
our ability to manipulate styles of samples, as described in
Assumption 3.1. We describe our method below:
∈
|
1 , . . . , u(j)
∈
be the matrix of entangled representations, and
u(j)
Estimation of content factors: We recall m =
and let U = [u1, . . . , un, u(j)
R(m+1)n×d′
for each j
Rn×d′
mate the content factors from the following optimization:
∈
−
be the matrix of representation differences. We esti-
FS
|
FS]⊤
let ∆j = [u1
1 , . . . , un
u(j)
n ]
n ; j
∈ S
−
∈
ˆQ(λ) ≜
arg min
Q∈R(d−|FS |)×d′
QQ⊤=I
tr
[ˆz]FC = ˆQ(λ)u, where
(cid:17)(cid:105)
(cid:17)(cid:16) U⊤U
(m+1)n
Q⊤Q
Id′
(cid:104)(cid:16)
−
Algorithm 1 PISCO
Rd′
n
i=1 ⊂
}
Input: Dataset and styles: (1) entangled representations
of n images, and (2) m styles. Hyperpa-
ui
{
rameters: (1) regularization strength for disentanglement
between style and content factors λ > 0, and (2) number
of content factors k.
representations of
{
for j = 1 to m do
}
entangled feature of i-th image after chang-
for i = 1 to n do
i −
i ←
u(j)
ing it's j-th style.
δ(j)
u(j)
ui.
i ←
end for
ˆpj
(ui,
{
end for
U
←
Rn(m+1)×d′
1 , . . . , δ(m)
[δ(1)
∆
∈
←
λ ∆⊤∆
top k eigenvectors of U⊤U
ˆQ(λ)
mn
Return: Post-processing matrix P(λ) as in (3.5).
coefficient
←
n
1)
i=1 ∪ {
}
−
1 , . . . , u(m)
[u1, u(1)
n
i=1.
}
, . . . , un, u(1)
n , . . . , δ(m)
, . . . , δ(1)
n(m+1) −
(u(j)
i
n ]⊤
←
1
1
from regression (3.2) on
, +1)
n , . . . , u(m)
n ]⊤
∈
Rmn×d′
Following the above, one can easily realize that the second
part of the objective enforces that the content factors [ˆz]FC
exhibit minimal change for any changes in the style factors
[z]j, j
, the [ˆz]FS will be
invariant to any changes in the style factors.
FS. In a special case λ = +
∞
∈
From (3.2) and (3.3) we obtain the linear post-processing
matrix (as defined in 2.2) as
P(λ) ≜
P
≡
(cid:40)
[P]j,* = ˆp⊤
j ,
[P]FC,* = ˆQ(λ) .
FS
j
∈
(3.5)
We summarize our method in Algorithm 1 which is a com-
bination of simple regressions (per style factors) and an
eigen-decomposition. In the next section, we show that for
large values of λ the post-processing matrix P(λ) achieves
sparse recovery with high probability.
(cid:80)
+ λ
m
j∈FS
tr (cid:2)Q⊤Q(cid:0)∆⊤
j ∆j/n(cid:1)(cid:3) .
4. Theory
(3.3)
Our objective has two parts: the first part is easily recog-
nized by noticing its similarity to a principle component
analysis objective. To understand the second part, we fix a
style factor j
FS and observe that,
∈
1
n
n
(cid:88)
i=1
Q(ui
∥
−
u(j)
i )
∥
2
2
=
1
n
n
(cid:88)
i=1
(cid:104)
tr
= tr (cid:2)Q⊤Q(cid:0)∆⊤
Q⊤Q(ui
−
j ∆j/n(cid:1)(cid:3) .
u(j)
i )(ui
−
i )⊤(cid:105)
u(j)
(3.4)
4
In this section, we theoretically establish that our post-
processing approach PISCO guarantees sparse recovery.
We divide the proof into two parts: the first part analyzes
the asymptotic quality of the estimated style factors and the
second part analyzes the quality of the estimated content
factors. Our first result follows:
Theorem 4.1. Let Σz ≜ var(z) be invertible. Then for any
j
FS it holds:
A⊤ ˆpj
(4.1)
→
d
almost surely as n
j=1 is the canonical
, where
}
basis vector for Rd. Subsequently, the following hold at
βjej
ej
{
→ ∞
∈
Simple Disentanglement of Style and Content in Visual Representations
almost sure limit: (1) [PA]FS,FS converges to a diagonal
matrix, and (2) [PA]FS,FC →
To establish theoretical guarantee for the content factors we
require the following technical assumption.
0.
Assumption 4.2 (Linear independence in style factors).
Over the distribution of latent factors, the style factors are
not linearly dependent with each other. Mathematically
speaking, the following event positive probability
E = (cid:8)z : [z
z(m)]FS,* is invertible(cid:9) . (4.2)
z(1), . . . , z
−
−
The assumption is related to cases when the style factors
are dependent with each other. One such example is the
blurring and contrasting of images: we assume that one
doesn't completely determine the other. To see how the
assumption is violated under linear dependence of style
factors let the first two of them completely determine one
another, i.e., one is just a constant multiplication of the other.
In that case, we point out that for any z the first two rows
z(m)]FS,* are just constant
of the matrix [z
multiplication of one another and the matrix is singular with
probability one.
z(1), . . . , z
−
−
With the setups provided by Assumptions 2.1, 3.1 and 4.2
we're now ready to state our result about sparse recovery for
our post-processing technique.
−
Theorem 4.3 (Sparse recovery for PISCO). Let n
d + 1
and that the Assumptions 2.1, 3.1 and 4.2 hold. Define κ ≜
Pz(E) < 1 where Pz is the distribution of latent factors
1
κn the
and E is defined in (4.2). With probability at least 1
−
P(λ) satisfies
post-processing matrix P
P(+
the following: (1) [PA]FS,FC = 0, and (2) [PA]FC,FC is
invertible.
) ≜ lim
λ→∞
∞
≥
≡
Proofs of Theorems 4.1 and 4.3 are provided in §A.2 and
§A.3. We combine the conclusions of the two theorems in
the following corollary.
Corollary 4.4. Let the Assumptions 2.1, 3.1 and 4.2 hold.
Then at the limit n
P(+
in Definition 2.2.
≡
) almost surely satisfies sparse recovery conditions
the the post-processing matrix P
→ ∞
∞
4.1. Synthetic data study
We complement our theoretical study with an experiment in
a synthetic setup. Below we describe the data generation,
sample manipulations, and their annotations, and provide
their detailed descriptions in §B.
We generate the latent variables (z) from a 10-dimensional
centered normal random variable, where the coordinates
have unit variance, the first two coordinates are corre-
lated with correlation coefficient ρ and all the other cross-
coordinate correlations are zero. We consider the first five
5
Figure 2. Plots (with error-bars over 50 repetitions) for discrep-
ancies in style recovery (∥ corr([z]FS , [ˆz]FS ) − corr([z]FS )∥F)
and style-content disentanglement (∥ corr([ˆz]FC , [z]FS )∥F) for es-
timated factors, where ∥ * ∥F is the normalized Frobenius norm
(see Footnote 1). Here, ρ is the correlation between the first two
coordinates in true factors.
coordinates of z as the style factors, i.e. FS =
and the rest of them as content factors.
1, 2, . . . , 5
}
,
{
The entangled representations are d′ = 10 dimensional
vectors and which we obtain as u = Az = LUz, where L
is a 10
10 lower triangular matrix whose diagonal entries
are one and off-diagonal entries are 0.9 and U is a randomly
generated d
d orthogonal matrix.
×
×
|
[z]j
Sample manipulations and annotations: For j-th style
coordinates we obtain two manipulated samples per latent
factor z, which (denoted as z(j),+ and z(j),− ) set the j-th
coordinate to it's positive (resp. negative) absolute value, i.e.
[z(j),+]j =
(resp. [z(j),−]j =
), and annotate
|
−|
it as +1 (resp.
1). Since the first two coordinates have
correlation coefficient ρ, if either of them is changed by the
value δ then the other one must be changed by ρδ. Note
that one of z(j),+ and z(j),− is exactly equal to z. The
corresponding entangled representations to the manipulated
latent factors are used for recovering the style factors (as in
(3.2) and (3.5)), and content factors (as in (3.3)).
|
−
[z]j
Style recovery: In our synthetic experiments we validate
the quality of sparse recovery for estimated latent factors
on two fronts: (1) recovery in the style factors, and (2)
disentanglement between style and content factors. To ver-
ify recovery in style factors we recall Theorem 4.1 that
the estimated style factors ([ˆz]FS ) approximate the true
style factors ([z]FS ) up to constant multiplications. This
implies that the cross-correlation between estimated and
true style factors (corr([z]FS, [ˆz]FS )) should be approxi-
mately identical to the correlation of the true style factors
(corr([z]FS )).
In Figure 2 we verify this by calculating
F is the nor-
corr([z]FS , [ˆz]FS)
corr([z]FS )
F where
∥
∥ * ∥
−
∥
10−1101103λ0.00.10.20.3discrepancystylerecoverystyle-contentdisentanglementρ=0.1ρ=0.5ρ=0.9Simple Disentanglement of Style and Content in Visual Representations
malized Frobenius norm of a matrix.1 We refer to it as the
discrepancy in style recovery and observe that it is small and
not affected by ρ. Even for ρ as large as 0.9 the recovery of
style factors has small discrepancy, which matches with the
conclusion of Theorem 4.1. Additionally, we observe that
the discrepancies are the same for different values of λ (that
appears in (3.3)) since the estimation of the style factors
doesn't involve λ.
Style and content disentanglement: Note that the style
and content factors are uncorrelated with each other, i.e.
corr([z]FS , [z]FC ) = 0.
If the content factors and style
factors are truly disentangled then the cross-correlation be-
tween estimated content factors [ˆz]FC and true style factors
[z]FS should be approximately equal to zero. In Figure 2
corr([ˆz]FC , [z]FS )
we verify this by plotting
F, which we
∥
refer to as the discrepancy in style-content disentanglement
(SCD) and notice that for large enough values of the pa-
rameter λ (i.e. λ > 100) the discrepancy is quite small.
Though ρ has a mild effect on disentanglement between
style and content factors for smaller values of λ, the effect
is indistinguishable for large λ (λ > 103).
∥
5. Experiments
We verify the ability of PISCO (Algorithm 1) to isolate
content and style in pre-trained visual representations and
the utility of the learned representations for OOD general-
ization when (i) train data is spuriously correlated with the
style and the correlation is reversed in the test data; (ii) test
data is modified with various image transformations, i.e.,
domain generalization with style-based distribution shifts.
We consider nine transformations in our experiments: four
types of image corruptions (rotation, contrast, blur, and
saturation) on CIFAR-10 (Krizhevsky et al., 2009), simi-
lar to ImageNet-C (Hendrycks & Dietterich, 2018), four
transformations based on style transfer (Huang & Belongie,
2017) on ImageNet (Russakovsky et al., 2015), similar to
Stylized ImageNet (Geirhos et al., 2018), and a color trans-
formation on MNIST, similar to Colored MNIST (Arjovsky
et al., 2019) (see §D.1 for Colored MNIST experiment).
The experiments code is available on GitHub.2
5.1. Transformed CIFAR
In this set of experiments, our goal is to disentangle four
styles (m = 4) corresponding to image corruptions (ro-
tation, contrast, blur, and saturation) from content. For
feature extraction we consider a ResNet-18 (He et al.,
2016) pre-trained on ImageNet (Russakovsky et al., 2015)
(Supervised) and a SimCLR (Chen et al., 2020) trained
1The normalized Frobenius norm of a matrix A ∈ Rm×n is
denoted as ∥A∥F and defined as ∥A∥F ≜
2Code: github.com/lilianngweta/PISCO.
(cid:113) (cid:80)
i,j [A]2
i,j
mn
.
6
on CIFAR-10 via self-supervision with the same architec-
ture (SimCLR). For each feature extractor, we learn a single
PISCO post-processing feature transformation matrix P(λ)
as in Algorithm 1 to jointly disentangle all considered styles
from content. We report results for λ
1, 10, 50
∈ {
.3
}
Baselines Our main baseline is the vanilla SimCLR rep-
resentations due to K ̈ugelgen et al. (2021) who argued that
it is sufficient for style and content disentanglement under
some assumptions. Thus we study whether we can further
improve style-content disentanglement in SimCLR in a real
data setting in addition to experiments with features ob-
tained via supervised pretraining on ImageNet. We also
compare PISCO's style-content disentanglement with IP-
IRM (Wang et al., 2021), which is an in-processing method
combining self-supervised learning and invariant risk mini-
mization (Arjovsky et al., 2019) to learn disentangled rep-
resentations. We use IP-IRM model trained on CIFAR-100
provided by the authors.
We note that there are many other methods for learning dis-
entangled representations (Wu et al. (2019); Nemeth (2020);
Ren et al. (2021); K ̈ugelgen et al. (2021), to name a few),
however, they all require training an encoder-decoder model
from scratch and can not take advantage of powerful feature
extractors pre-trained on large datasets as in our setting. In
comparison to these works, the simplicity and scalability of
our method (as well as of using vanilla SimCLR features)
come at a cost, i.e., we forego the ability to visualize dis-
entanglement via controlled image generation due to the
absence of a generator/decoder. Instead, we demonstrated
disentanglement theoretically (§4) and verify it empirically
via correlation analysis of learned style and content fac-
tors, similar to prior works that studied disentanglement in
settings without a generator/decoder (Zimmermann et al.,
2021; K ̈ugelgen et al., 2021).
Disentanglement
In Table 1 we summarize the disentan-
glement metrics for the smallest considered λ = 1. In the
style correlation columns (Style Corr.), we report the corre-
lation between the corresponding style value (encoded as
1 for the original images and +1 for the transformed ones)
−
and the factor corresponding to style in the learned repre-
sentations. None of the baselines explicitly identify style
factors, thus we use the coordinate maximally correlated
with the corresponding style as the style factor.
We notice that the blur style is the hardest to learn for both
supervised and unsupervised representations. As we will see
3In all experiments we set the number of content factors to
k = ηd′ − m, where d′ is the representation dimension. We set
η = 0.95 for all experiments in the main paper and report results
for other values of η in §D. As long as η is close to 1, baselines
and PISCO in-distribution results are similar. For smaller values
of η, PISCO in-distribution accuracy naturally deteriorates.
Simple Disentanglement of Style and Content in Visual Representations
(a) Rotation - Supervised
(b) Contrast - Supervised
(a) Rotation - SimCLR
(b) Contrast - SimCLR
(c) Blur - Supervised
(d) Satur. - Supervised
(c) Blur - SimCLR
(d) Saturation - SimCLR
Figure 3. OOD accuracy of Supervised representations on
CIFAR-10 where the label is spuriously correlated with the cor-
responding transformation. PISCO significantly improves OOD
accuracy, especially in the case of rotation. Both λ = 1 and
λ = 10 preserve in-distribution accuracy, while larger λ = 50
may degrade it as per (3.3).
Figure 4. OOD accuracy of SimCLR representations on CIFAR-10
where the label is spuriously correlated with the corresponding
transformation. Results are analogous to Figure 3. The SimCLR
baseline representations are less sensitive to contrast and saturation
but remain sensitive to rotation.
later, both representations are fairly invariant to this style.
Comparing PISCO on Supervised and SimCLR, the
style recovery is better on Supervised since SimCLR
representations are more robust to style changes (K ̈ugelgen
et al., 2021).
In the style-content disentanglement (SCD) columns, we re-
port the disentanglement of style from content features as in
the synthetic experiment in Figure 2. Here SimCLR repre-
sentations appear slightly harder to disentangle using PISCO
than Supervised representations. In the SCD of original
representations for both Supervised and SimCLR, as
expected, we observe that these representations are more
entangled with the styles, especially the Supervised rep-
resentations. Comparing the SCD for PISCO with that
of IP-IRM, we see that PISCO can post-process popular
pre-trained representations to achieve comparable or bet-
ter disentanglement without re-training (i.e., in-processing).
Overall we conclude that PISCO is successful in isolating
style and content.
Spurious correlations Next, we create four variations of
CIFAR-10 where labels are spuriously correlated with one
of the four styles (image corruptions). Specifically, in the
training dataset, we corrupt images from the first half of the
classes with probability α and from the second half of the
−
α. In test data the correlation
classes with probability 1
is reversed, i.e., images from the first half of the classes
α and images from the
are corrupted with probability 1
second half with probability α (see §C for details). Thus,
for α = 0.5 train and test data have the same distribution
where each image is randomly transformed with the corre-
sponding image corruption type, and α = 1 corresponds to
the extreme spurious correlation setting.
−
For each α we train and test a linear model on the origi-
nal representations and on PISCO representations (in this
and subsequent experiments all learned style factors are dis-
carded for downstream tasks; see §C for additional details)
for varying λ. Recall that here we use the same PISCO
transformation matrices learned previously without knowl-
edge of the specific corruption type and spurious correla-
tion value α of a given dataset. We summarize results for
Supervised features in Figure 3 and for SimCLR fea-
tures in Figure 4. PISCO improves upon both original
representations and across all transformations. For λ = 1,
PISCO always preserves the in-distribution accuracy, i.e.
when α = 0.5, and improves upon the baselines in the pres-
ence of spurious correlations. Larger λ = 50 can degrade
in-distribution accuracy in some cases (recall that λ controls
the tradeoff between the reconstruction of the original fea-
tures with the content factors and style-content disentangle-
ment per (3.3)), while λ = 10 provides a favorable tradeoff
7
Simple Disentanglement of Style and Content in Visual Representations
Table 1. Content and style disentanglement of Supervised and SimCLR representations on CIFAR-10 with PISCO. The style
correlation columns (style Corr.) show correlations between styles in the data and representations corresponding to style. The isolation of
style from content is measured with style-content disentanglement (SCD, see Figure 2). In the last column we compare to representations
learned by IP-IRM. Bold denotes best results.
Style
blur
contrast
rotation
saturation
SCD
Supervised
Style
Corr.
0.319
0.490
0.746
0.641
0.090
0.243
0.212
0.204
Supervised
PISCO
SimCLR
Unsupervised
PISCO
IP-IRM
Style
Corr.
0.716
0.927
0.936
0.882
SCD
0.051
0.055
0.029
0.048
Style
Corr.
0.304
0.094
0.368
0.120
SCD
0.096
0.076
0.182
0.071
Style
Corr.
0.719
0.897
0.945
0.738
SCD
0.060
0.049
0.056
0.060
Style
Corr.
0.032
0.419
0.617
0.219
SCD
0.022
0.188
0.114
0.044
Table 2. Accuracy of Supervised representations on CIFAR-
10 test set in-distribution, i.e., no transformation (referred to as
"none"; last row), and OOD when modified with the correspond-
ing transformation. PISCO with λ = 1 provides significant im-
provements for rotation, contrast, and saturation while preserving
in-distribution accuracy.
Style
rotation
contrast
saturation
blur
none
Baseline
(Supervised)
PISCO
(λ = 1)
PISCO
(λ = 10)
PISCO
(λ = 50)
0.678
0.625
0.699
0.817
0.873
0.737
0.683
0.758
0.817
0.870
0.733
0.744
0.745
0.793
0.844
0.710
0.726
0.721
0.775
0.826
Table 3. Accuracy of SimCLR representations on CIFAR-10 test
set in-distribution, i.e., no transformation (referred to as "none";
last row), and OOD when modified with the corresponding trans-
formation. SimCLR features are robust to the considered transfor-
mations and perform similarly to PISCO with λ = 1.
Style
rotation
contrast
saturation
blur
none
Baseline
(SimCLR)
PISCO
(λ = 1)
PISCO
(λ = 10)
PISCO
(λ = 50)
0.620
0.816
0.810
0.808
0.828
0.625
0.814
0.806
0.801
0.827
0.697
0.806
0.789
0.793
0.808
0.696
0.794
0.774
0.780
0.792
with a small reduction of in-distribution accuracy and large
improvements when spurious correlations are present.
Comparing results across the representations, we notice that
SimCLR features are less sensitive to image transformations
as discussed previously. However, for both representations,
spurious correlation with rotation causes a significant accu-
racy drop without PISCO post-processing.
Domain generalization To evaluate the domain general-
ization performance, we train a logistic regression classifier
on the corresponding representation of the clean CIFAR-10
dataset and compute accuracy on the test set with every
image transformed with one of the four corruptions, as well
as the original test set to verify the in-distribution accu-
racy. Results are presented in Table 2 for Supervised
features and in Table 3 for SimCLR features. We observe
significant OOD accuracy gains when applying PISCO post-
processing on the Supervised features while preserving
the in-distribution accuracy for λ = 1. In this experiment,
we see that SimCLR features are sufficiently robust and
perform as well as PISCO post-processing with λ = 1.
Overall we have observed that applying our method with
smaller λ = 1 never hurts the performance, while it yields
significant OOD accuracy gains in many settings.
5.2. Stylized ImageNet
In this experiment, we evaluate the domain generalization
of PISCO on more sophisticated styles obtained via style
transfer (Huang & Belongie, 2017), similar to the Stylized
ImageNet (Geirhos et al., 2018) dataset. In addition, we
evaluate the ability of PISCO to generalize to styles that
are similar to but weren't used to fit PISCO. We used the
"dog sketch" and "Picasso dog" styles to obtain PISCO
transformation and evaluate on two additional similar but
unseen styles, "woman sketch" and "Picasso self-portrait".
See Figure 5 and §C for visualization and additional details.
As in the CIFAR-10 domain generalization experiment, the
logistic regression classifier is trained on the original train
images and tested on transformed test images. In Table
4 we report results for ResNet-50 features pre-trained on
ImageNet (Baseline) and for the same features transformed
with PISCO with λ = 1. PISCO improves OOD top-1 and
top-5 accuracies across all four styles, including the unseen
ones, while maintaining good in-distribution performance.
We also report analogous results for another popular feature
extractor, MAE-ViT-Base (He et al., 2022), in Table 5. We
again observe that PISCO (λ = 1) improves top-1 and
top-5 OOD performances with no degradation of the in-
distribution performance. We present results for other values
8
Simple Disentanglement of Style and Content in Visual Representations
Table 4. Top-1 and top-5 accuracies on 5 variations of the Ima-
geNet test set for Baseline pre-trained ResNet-50 features and the
corresponding post-processed PISCO (λ = 1) features.
Style
Baseline
PISCO
Top-1 Top-5 Top-1 Top-5
dog sketch
woman sketch
Picasso dog
Picasso s.-p.
none
0.516
0.478
0.445
0.474
0.757
0.752
0.712
0.686
0.706
0.927
0.546
0.518
0.500
0.514
0.749
0.777
0.752
0.738
0.747
0.921
Table 5. Top-1 and top-5 accuracies on 5 variations of the Ima-
geNet test set for Baseline pre-trained MAE-ViT-Base features and
the corresponding post-processed PISCO (λ = 1) features.
Style
Baseline
PISCO
Top-1 Top-5 Top-1 Top-5
dog sketch
Picasso dog
Picasso s.-p.
woman sketch
none
0.530
0.472
0.512
0.504
0.811
0.749
0.686
0.727
0.719
0.952
0.575
0.519
0.558
0.550
0.818
0.773
0.716
0.752
0.746
0.953
of λ in §D.
We note that in this experiment the sample manipulations
and annotations required for our method (§3) were sim-
ple to obtain. We generated the styles for fitting PISCO
E 2 and obtained pairs
with basic text prompts using DALL
*
of original and transformed images using a style transfer
method (Huang & Belongie, 2017). Thus, this experiment
demonstrates how PISCO can be applied to improve ro-
bustness to a variety of distribution shifts in vision tasks
where we have some amount of prior knowledge needed to
formulate a relevant prompt to obtain a style image.
6. Conclusion
In this paper, we studied the problem of disentangling style
and content of pre-trained visual representations. We pre-
sented PISCO, a simple post-processing algorithm with the-
oretical guarantees. In our experiments, we demonstrated
that post-processing with PISCO can improve OOD perfor-
mance of popular pre-trained deep models while preserving
the in-distribution accuracy. Our method is computationally
inexpensive and simple to implement.
In our experiments, we mainly were interested in discard-
ing the style factors and keeping the style-invariant content
factors for OOD generalization. However, we also demon-
strated both theoretically and empirically that the learned
style factors are representative of the presence or absence of
the corresponding styles. Thus, the values of the style fac-
tors can be used to assist in outlier/OOD samples detection,
or in some special cases of image retrieval, e.g., finding all
images with a specific style.
One limitation of our method is the reliance on the availabil-
ity of meaningful data transformations (or augmentations).
While there are plenty of such transformations for images,
they could be harder to identify for other data modalities.
Natural language processing is one example where it is not
as straightforward to define meaningful text augmentations.
However, text data augmentations is also an active research
area (Wei & Zou, 2019; Bayer et al., 2021; Shorten et al.,
2021) which could enable applications of PISCO to NLP.
Another interesting direction to explore is extending our
model to various weak supervision settings (Bouchacourt
et al., 2018; Shu et al., 2019; Chen & Batmanghelich, 2020).
In comparison to data augmentation functions, such forms
of supervision are typically easier to obtain outside of the
image domain. Thus, an extension of our model to weak su-
pervision could enable disentanglement via post-processing
for a broader class of data modalities.
Acknowledgements
This paper is based upon work supported by the National
Science Foundation (NSF) under grants no. 2027737 and
2113373, and the Rensselaer-IBM AI Research Collabo-
ration (http://airc.rpi.edu), part of the IBM AI
Horizons Network (http://ibm.biz/AIHorizons).
References
Arjovsky, M., Bottou, L., Gulrajani, I., and Lopez-Paz, D.
Invariant Risk Minimization. arXiv:1907.02893 [cs, stat],
September 2019.
Bayer, M., Kaufhold, M.-A., and Reuter, C. A survey on
data augmentation for text classification. ACM Comput-
ing Surveys, 2021.
Beery, S., Van Horn, G., and Perona, P. Recognition in terra
incognita. In Proceedings of the European conference on
computer vision (ECCV), pp. 456–473, 2018.
Bouchacourt, D., Tomioka, R., and Nowozin, S. Multi-level
variational autoencoder: Learning disentangled represen-
tations from grouped observations. In Proceedings of the
AAAI Conference on Artificial Intelligence, volume 32(1),
2018.
Chen, J. and Batmanghelich, K. Weakly supervised disen-
tanglement by pairwise similarities. In Proceedings of
the AAAI Conference on Artificial Intelligence, volume
34(04), pp. 3495–3502, 2020.
Chen, M., Wei, Z., Huang, Z., Ding, B., and Li,
9
Simple Disentanglement of Style and Content in Visual Representations
Y. Simple and Deep Graph Convolutional Networks.
arXiv:2007.02133 [cs, stat], July 2020.
Chen, X. and He, K. Exploring simple siamese represen-
tation learning. In Proceedings of the IEEE/CVF Con-
ference on Computer Vision and Pattern Recognition, pp.
15750–15758, 2021.
Deldjoo, Y., Di Noia, T., Malitesta, D., and Merra, F. A.
Leveraging content-style item representation for visual
recommendation. In European Conference on Informa-
tion Retrieval, pp. 84–92. Springer, 2022.
Doersch, C., Gupta, A., and Efros, A. A. Unsupervised
visual representation learning by context prediction. In
Proceedings of the IEEE international conference on com-
puter vision, pp. 1422–1430, 2015.
Garcia, N. and Vogiatzis, G. How to read paintings: se-
mantic art understanding with multi-modal retrieval. In
Proceedings of the European Conference on Computer
Vision (ECCV) Workshops, pp. 0–0, 2018.
Geirhos, R., Rubisch, P., Michaelis, C., Bethge, M., Wich-
mann, F. A., and Brendel, W. Imagenet-trained cnns are
biased towards texture; increasing shape bias improves ac-
curacy and robustness. arXiv preprint arXiv:1811.12231,
2018.
Grill, J.-B., Strub, F., Altch ́e, F., Tallec, C., Richemond,
P. H., Buchatskaya, E., Doersch, C., Pires, B. A., Guo,
Z. D., Azar, M. G., Piot, B., Kavukcuoglu, K., Munos,
R., and Valko, M. Bootstrap your own latent: A new
approach to self-supervised Learning. arXiv:2006.07733
[cs, stat], September 2020.
Gutmann, M. U. and Hyv ̈arinen, A. Noise-contrastive es-
timation of unnormalized statistical models, with appli-
cations to natural image statistics. Journal of machine
learning research, 13(2), 2012.
He, K., Zhang, X., Ren, S., and Sun, J. Deep Residual Learn-
ing for Image Recognition. In 2016 IEEE Conference
on Computer Vision and Pattern Recognition (CVPR), pp.
770–778, Las Vegas, NV, USA, June 2016. IEEE. ISBN
978-1-4673-8851-1. doi: 10.1109/CVPR.2016.90.
He, K., Chen, X., Xie, S., Li, Y., Doll ́ar, P., and Girshick,
R. Masked autoencoders are scalable vision learners. In
Proceedings of the IEEE/CVF Conference on Computer
Vision and Pattern Recognition, pp. 16000–16009, 2022.
Higgins, I., Amos, D., Pfau, D., Racaniere, S., Matthey,
L., Rezende, D., and Lerchner, A. Towards a defi-
nition of disentangled representations. arXiv preprint
arXiv:1812.02230, 2018.
Hosoya, H. Group-based learning of disentangled repre-
sentations with generalizability for novel contents. arXiv
preprint arXiv:1809.02383, 2018.
Huang, X. and Belongie, S. Arbitrary style transfer in real-
time with adaptive instance normalization. In Proceed-
ings of the IEEE international conference on computer
vision, pp. 1501–1510, 2017.
Hyv ̈arinen, A. and Morioka, H. Unsupervised feature ex-
traction by time-contrastive learning and nonlinear ICA.
In Proceedings of the 30th International Conference on
Neural Information Processing Systems, NIPS'16, pp.
3772–3780, Red Hook, NY, USA, December 2016. Cur-
ran Associates Inc. ISBN 978-1-5108-3881-9.
Hyv ̈arinen, A. and Pajunen, P. Nonlinear independent com-
ponent analysis: Existence and uniqueness results. Neural
networks, 12(3):429–439, 1999.
John, V., Mou, L., Bahuleyan, H., and Vechtomova, O.
Disentangled representation learning for non-parallel text
style transfer. arXiv preprint arXiv:1808.04339, 2018.
Jutten, C., Babaie-Zadeh, M., and Karhunen, J. Nonlinear
mixtures. In Handbook of Blind Source Separation, pp.
549–592. Elsevier, 2010.
Kim, B., Wattenberg, M., Gilmer, J., Cai, C., Wexler, J.,
Viegas, F., and Sayres, R. Interpretability Beyond Feature
Attribution: Quantitative Testing with Concept Activation
Vectors (TCAV). In International Conference on Machine
Learning, pp. 2668–2677, July 2018.
Koh, P. W., Sagawa, S., Marklund, H., Xie, S. M., Zhang,
M., Balsubramani, A., Hu, W., Yasunaga, M., Phillips,
R. L., Beery, S., Leskovec, J., Kundaje, A., Pierson, E.,
Levine, S., Finn, C., and Liang, P. WILDS: A Benchmark
of in-the-Wild Distribution Shifts. arXiv:2012.07421 [cs],
December 2020.
Krizhevsky, A., Hinton, G., et al. Learning multiple layers
of features from tiny images. 2009.
K ̈ugelgen, J., Sharma, Y., Gresele, L., Brendel, W.,
Sch ̈olkopf, B., Besserve, M., and Locatello, F. Self-
supervised learning with data augmentations provably
isolates content from style. Advances in neural informa-
tion processing systems, 34:16451–16467, 2021.
Hendrycks, D. and Dietterich, T. Benchmarking Neural
Network Robustness to Common Corruptions and Pertur-
bations. In International Conference on Learning Repre-
sentations, September 2018.
Lee, H.-Y., Tseng, H.-Y., Huang, J.-B., Singh, M., and Yang,
M.-H. Diverse image-to-image translation via disentan-
gled representations. In Proceedings of the European
conference on computer vision (ECCV), pp. 35–51, 2018.
10
Simple Disentanglement of Style and Content in Visual Representations
Locatello, F., Abbati, G., Rainforth, T., Bauer, S., Sch ̈olkopf,
B., and Bachem, O. On the fairness of disentangled
representations. In Proceedings of the 33rd International
Conference on Neural Information Processing Systems,
number 1309, pp. 14611–14624. Curran Associates Inc.,
Red Hook, NY, USA, December 2019a.
Locatello, F., Bauer, S., Lucic, M., Raetsch, G., Gelly, S.,
Sch ̈olkopf, B., and Bachem, O. Challenging Common
Assumptions in the Unsupervised Learning of Disentan-
gled Representations. In Proceedings of the 36th Interna-
tional Conference on Machine Learning, pp. 4114–4124.
PMLR, May 2019b.
Locatello, F., Poole, B., R ̈atsch, G., Sch ̈olkopf, B., Bachem,
O., and Tschannen, M. Weakly-supervised disentangle-
ment without compromises. In International Conference
on Machine Learning, pp. 6348–6359. PMLR, 2020.
Ma, J., Zhou, C., Cui, P., Yang, H., and Zhu, W. Learning
disentangled representations for recommendation. Ad-
vances in neural information processing systems, 32,
2019.
Nemeth, J. Adversarial disentanglement with grouped ob-
servations. In Proceedings of the AAAI Conference on Ar-
tificial Intelligence, volume 34, pp. 10243–10250, 2020.
Oord, A. v. d., Li, Y., and Vinyals, O. Representation learn-
ing with contrastive predictive coding. arXiv preprint
arXiv:1807.03748, 2018.
Petersen, F., Mukherjee, D., Sun, Y., and Yurochkin, M.
Post-processing for individual fairness. Advances in Neu-
ral Information Processing Systems, 34:25944–25955,
2021.
Ren, X., Yang, T., Wang, Y., and Zeng, W. Rethinking con-
tent and style: exploring bias for unsupervised disentan-
glement. In Proceedings of the IEEE/CVF International
Conference on Computer Vision, pp. 1823–1832, 2021.
Russakovsky, O., Deng, J., Su, H., Krause, J., Satheesh, S.,
Ma, S., Huang, Z., Karpathy, A., Khosla, A., Bernstein,
M., et al. Imagenet large scale visual recognition chal-
lenge. International journal of computer vision, 115(3):
211–252, 2015.
Ruta, D., Motiian, S., Faieta, B., Lin, Z., Jin, H., Filip-
kowski, A., Gilbert, A., and Collomosse, J. Aladin: all
layer adaptive instance normalization for fine-grained
style similarity. In Proceedings of the IEEE/CVF Interna-
tional Conference on Computer Vision, pp. 11926–11935,
2021.
Ruta, D., Gilbert, A., Aggarwal, P., Marri, N., Kale, A.,
Briggs, J., Speed, C., Jin, H., Faieta, B., Filipkowski, A.,
et al. Stylebabel: Artistic style tagging and captioning.
In Computer Vision–ECCV 2022: 17th European Confer-
ence, Tel Aviv, Israel, October 23–27, 2022, Proceedings,
Part VIII, pp. 219–236. Springer, 2022.
Sagawa, S., Koh, P. W., Hashimoto, T. B., and Liang, P. Dis-
tributionally Robust Neural Networks for Group Shifts:
On the Importance of Regularization for Worst-Case Gen-
eralization. arXiv:1911.08731 [cs, stat], November 2019.
Saleh, B. and Elgammal, A. Large-scale classification of
fine-art paintings: Learning the right metric on the right
feature. arXiv preprint arXiv:1505.00855, 2015.
Sch ̈olkopf, B., Locatello, F., Bauer, S., Ke, N. R., Kalch-
brenner, N., Goyal, A., and Bengio, Y. Toward causal
representation learning. Proceedings of the IEEE, 109(5):
612–634, 2021.
Shorten, C., Khoshgoftaar, T. M., and Furht, B. Text data
augmentation for deep learning. Journal of big Data, 8
(1):1–34, 2021.
Shu, R., Chen, Y., Kumar, A., Ermon, S., and Poole,
B. Weakly supervised disentanglement with guarantees.
arXiv preprint arXiv:1910.09772, 2019.
Strubell, E., Ganesh, A., and McCallum, A. Energy and
Policy Considerations for Deep Learning in NLP. In Pro-
ceedings of the 57th Annual Meeting of the Association
for Computational Linguistics, pp. 3645–3650, Florence,
Italy, July 2019. Association for Computational Linguis-
tics. doi: 10.18653/v1/P19-1355.
Wang, T., Yue, Z., Huang, J., Sun, Q., and Zhang, H. Self-
supervised learning disentangled group representation
as feature. Advances in Neural Information Processing
Systems, 34:18225–18240, 2021.
Wei, D., Ramamurthy, K. N., and Calmon, F. d. P. Op-
timized Score Transformation for Fair Classification.
arXiv:1906.00066 [cs, math, stat], December 2019.
Wei, J. and Zou, K. Eda: Easy data augmentation tech-
niques for boosting performance on text classification
tasks. arXiv preprint arXiv:1901.11196, 2019.
Wu, T. T., Chen, Y. F., Hastie, T., Sobel, E., and Lange,
K. Genome-wide association analysis by lasso pe-
nalized logistic regression. Bioinformatics, 25(6):714–
721, March 2009. ISSN 1460-2059, 1367-4803. doi:
10.1093/bioinformatics/btp041.
Wu, W., Cao, K., Li, C., Qian, C., and Loy, C. C. Dis-
entangling content and style via unsupervised geometry
distillation. arXiv preprint arXiv:1905.04538, 2019.
Zimmermann, R. S., Sharma, Y., Schneider, S., Bethge,
M., and Brendel, W. Contrastive learning inverts the
11
Simple Disentanglement of Style and Content in Visual Representations
data generating process. In International Conference on
Machine Learning, pp. 12979–12990. PMLR, 2021.
A. Supplementary proofs
A.1. Proof of Corollary 2.3
Proof. We denote ˆzS ≜ [ˆz]FS , zS ≜ [z]FS , Σ ≜ cov(z) and
∆ as the diagonal matrix of Σ. Notice that
corr(z) = ∆−1/2Σ∆−1/2 .
(A.1)
From Definition 2.2 ˆzS = [PA]FS,FS zS where [PA]FS,FS
is a diagonal matrix. We denote [PA]FS,FS as D. Then the
covariance matrix of ˆzS is
cov(ˆzS) = cov(DzS) = DΣD
(A.2)
and its diagonal matrix is
diag(DΣD) = D diag(Σ)D
= D∆D
= ∆D2 ,
(A.3)
and hence
1
2n
n
(cid:88)
(cid:104)
i=1
(ui
̄u)(y(j)
i −
−
̄y) + (u(j)
i −
̄u)( ̃y(j)
i −
(cid:105)
̄y)
−
(cid:0)[z(j)
i
(cid:1)
[ ̄z]j
(cid:1)(cid:105)
[ ̄z]j
]j
−
=
1
2n
n
(cid:88)
(cid:104)
i=1
A(zi
̄z)βj
−
(cid:0)[zi]j
+ A(z(j)
i −
̄z)βj
+
1
2n
n
(cid:88)
i=1
(cid:104)
A(zi
̄z)(ε(j)
i −
−
̄ε(j))
+ A(z(j)
i −
̄z)( ̃ε(j)
i −
(cid:105)
̄ε(j))
≜ cov1 + cov2 ,
where
cov1 ≜ 1
2n
(cid:104)
A(zi
n
(cid:88)
i=1
̄z)βj
−
(A.9)
(cid:1)
[ ̄z]j
(cid:1)(cid:105)
[ ̄z]j
]j
−
(cid:0)[zi]j
−
(cid:0)[z(j)
i
+ A(z(j)
i −
̄z)βj
1
2n
n
(cid:88)
(cid:104)
(zi
i=1
+ (z(j)
i −
̄z)(zi
−
−
̄z)⊤ej
̄z)(z(j)
i −
(cid:105)
̄z)⊤ej
= βjA ˆΣzej .
and with ˆΣz,ε ≜ 1
2n
̄z)( ̃ε(j)
̄ε(j))
(cid:105)
i −
we obtain
(cid:80)n
i=1
(cid:104)
(zi
̄z)(ε(j)
i −
−
̄ε(j)) + (z(j)
i −
where the last equality is obtained using the fact that the
matrix multiplication of the diagonal matrices is commuting.
Expressing corr(ˆzS) in terms of cov(ˆzS) and it's diagonal
matrix we obtain
= βjA
corr(ˆzS) diag (cid:8) corr(ˆzS)(cid:9)−1/2
corr(ˆzS)
= diag (cid:8) corr(ˆzS)(cid:9)−1/2
∆D2
−1/2DΣD
=
{
= ∆−1/2D−1DΣDD−1∆−1/2
= ∆−1/2Σ∆−1/2 = corr(zS)
∆D2
{
}
−1/2
}
and we obtain (2.1).
A.2. Proof of Theorem 4.1
(A.4)
cov2 ≜ 1
2n
(cid:104)
A(zi
n
(cid:88)
i=1
̄z)(ε(j)
i −
−
̄ε(j))
+ A(z(j)
i −
̄z)( ̃ε(j)
i −
(cid:105)
̄ε(j))
= A ˆΣz,ε
Proof. The closed form of ˆpj in (3.2) can be written as:
ˆpj = ˆΣ†
u
1
2n
n
(cid:88)
i=1
(cid:104)
(ui
̄u)(y(j)
i −
−
̄y)+(u(j)
i −
̄u)( ̃y(j)
i −
(cid:105)
̄y)
(cid:80)n
−
where ̄u = 1
2n
⊤(cid:3)
u(j)
u(j)
i }
i {
of ˆΣu, ̄y = 1
2n
(cid:2)ε(j)
(cid:80)n
i + ̃ε(j)
1
2n
(cid:3) and ˆΣz = 1
z(j)
i
notice the following.
i=1
2n
i
i=1
(cid:80)n
(cid:2)uiu⊤
(cid:2)ui + u(j)
(cid:3), ˆΣu = 1
(A.5)
i +
2n
u is the Moore-Penrose inverse
(cid:3), and ̄ε(j) =
(cid:2)zi +
(cid:80)n
i=1
̄z ̄z⊤ we
i=1
̄u ̄u⊤, ˆΣ†
(cid:80)n
(cid:3). Here, defining ̄z = 1
(cid:80)n
i + z(j)
i {
i + ̃y(j)
z(j)
i }
(cid:2)ziz⊤
(cid:2)y(j)
2n
⊤(cid:3)
i=1
i=1
−
i
i
y(j)
i −
̃y(j)
i −
̄y = βj
(cid:0)[zi]j
−
(cid:0)[z(j)
]j
ˆΣu = A ˆΣzA⊤
̄y = βj
i
−
[ ̄z]j
(cid:1) + (ε(j)
i −
(cid:1) + ( ̃ε(j)
[ ̄z]j
̄ε(j))
̄ε(j))
i −
(A.6)
(A.7)
(A.8)
12
Using the identities (A.8) and (A.9) we rewrite ˆpj as
ˆpj = (A ˆΣzA⊤)†
βjA ˆΣzej + A ˆΣz,ε
{
}
= (A ˆΣzA⊤)†βjA ˆΣzej + (A ˆΣzA⊤)†A ˆΣz,ε
≜ ˆp(1)
j + ˆp(2)
,
j
(A.10)
where ˆp(1)
j
(A ˆΣzA⊤)†A ˆΣz,ε.
≜ (A ˆΣzA⊤)†βjA ˆΣzej and ˆp(2)
j
≜
≥
d + 1 we notice that the covariance matrix ˆΣz
Since n
is invertible. This fact combined with left invertibility of
A implies that the matrix A ˆΣ
is also left invertible. We
recall the property of Moore-Penrose inverse that for any
left invertible matrix G it holds:
1/2
z
(GG⊤)†G = G(G⊤G)−1 .
Simple Disentanglement of Style and Content in Visual Representations
and using the property in (A.10) we
Combining (3.4) and the above we obtain
1
n
n
(cid:88)
∥
i=1
(cid:34)
ˆQ(+
∞
)(ui
u(j)
2
i )
2
∥
−
ˆQ(+
)⊤ ˆQ(+
∞
(cid:16) ∆⊤
j ∆j
)
n
(cid:35)
(cid:17)
= 0
∞
(A.11)
= tr
1/2
z
Letting G = A ˆΣ
obtain
ˆp(1)
j = βj(A ˆΣzA⊤)†A ˆΣzej
= βj(GG⊤)†G ˆΣ1/2
z ej
= βjG(G⊤G)−1 ˆΣ1/2
(cid:16)
z ej
z A⊤AΣ1/2
z
(cid:17)−1
(A⊤A)−1Σ−1/2
z
ˆΣ1/2
z ej
ˆΣ1/2
z ej
Σ1/2
= βjAΣ1/2
z
z Σ−1/2
z
= βjAΣ1/2
= βjA(A⊤A)−1ej .
Hence, we notice that
A⊤ ˆp(1)
j = A⊤ ˆβjA(A⊤A)−1ej
= βjej .
Repeating same calculation as above we obtain
A⊤ ˆp(2)
j = A⊤(A ˆΣzA⊤)†A ˆΣz,ε
ˆΣz,ε .
= ˆΣ−1
z
From Assumption 3.1 we recall that (ε(j), ̃ε(j)) and (z, z(j))
are uncorrelated and hence
ˆΣz,ε
a.s.
−→
0 .
Since Σz is invertible we obtain that
A⊤ ˆp(2)
j
a.s.
−→
0 ,
and
A⊤ ˆpj
a.s.
−→
almost surely. Noticing that ˆpj is the j-th row of P we
conclude that at almost sure limit it holds: (1) [PA]FS,FS
converges to a diagonal matrix, and (2) [PA]FS,FC
0.
βjej
a.s.
−→
which implies that for each i
[n] and j
FS
∈
∈
0 = ˆQ(+
= ˆQ(+
∞
∞
)(ui
−
)A(zi
u(j)
i )
z(j)
i ) ,
−
(A.13)
{
}
zi
where the second equality follows from Assumption 2.1.
n
Since the latent factors
i=1 were drawn independently
from the distribution Pz, we conclude that one of the sam-
κn. Denote
ples is in the event E with probability at least 1
the sample as z0. Then defining Z0 = [z0
−
z(m)
] we notice the following: (1) from (3.1) in Assumption
0
3.1 it follows [Z0]FC,* = 0, and (2) from the Assumption
4.2 we see that the matrix [Z0]FS,* is invertible and hence
we obtain
−
z(1)
0 , . . . , z0
−
0 = ˆQ(+
= ˆQ(+
)A[z0
−
) (cid:2)[A]*,FS
∞
∞
= ˆQ(+
) (cid:2)[A]*,FS
z(1)
0 , . . . , z0
(cid:3) .
[A]*,FC
[A]*,FC
(cid:3) .
(cid:21)
z(m)
]
0
−
(cid:20)[Z0]FS,*
[Z0]FC,*
(cid:21)
(cid:20)[Z0]FS,*
0
= ˆQ(+
)[A]*,FS [Z0]FS,* ,
∞
∞
where using invertibility of [Z0]FS,* we conclude
ˆQ(+
∞
)[A]*,FS = 0
and the lemma.
A.3. Proof of Theorem 4.3
We divide the proof in two steps which are stated as lemmas.
κn (κ is defined
Lemma A.1. With probability at least 1
in Theorem 4.3) the following holds:
−
ˆQ(+
∞
)[A]*,FS = 0 .
Rd′×d′
∈
[A]*,j : j
∈
{
(m+1)n H⊥ has exactly (d
−
Lemma A.2. Let H⊥
jector onto span
H⊥ U⊤U
values and Q(+
corresponding to them. Furthermore, [P(+
invertible.
be the orthogonal pro-
⊥. Then the matrix
FS
m) many positive eigen-
) is the collection of the eigen-vectors
)A]FC,FC is
∞
∞
}
Proof of Lemma A.1. At λ
it necessarily holds:
→ ∞
(cid:34)
1
m
(cid:88)
j∈S
tr
ˆQ(+
∞
)⊤ ˆQ(+
∞
(cid:16) ∆⊤
j ∆j
)
n
(cid:35)
(cid:17)
= 0
which equivalently means for every j
(cid:34)
tr
ˆQ(+
∞
)⊤ ˆQ(+
∞
(cid:16) ∆⊤
j ∆j
)
n
:
∈ S
(cid:35)
(cid:17)
= 0 .
(A.12)
13
Proof. We start by noticing that U⊤U
the matrix
(m+1)n = AΣ′
zA⊤ where
Σ′
z =
1
(m + 1)n
ziz⊤
i +
n
(cid:88)
i=1
(cid:88)
j∈S
z(j)
i {
z(j)
i }
⊤
is invertible since n
assume that FS = [m]. Denoting
d + 1. Without loss of generality we
A ≜ col-space(A) we
C
≥
Simple Disentanglement of Style and Content in Visual Representations
⊥
A
∈ C
where using (A.16) and (A.21) we obtain
notice that for any x
H⊥ U⊤U
(m + 1)n
H⊥x
= H⊥AΣ′
= 0, since x
zA⊤x, since x
⊥
A .
∈ C
⊥
A ⊂
∈ C
span
{
⊥
[A]*,FS }
and for any x
∈
[A]*,j : j
span
{
H⊥ U⊤U
(m + 1)n
FS
}
∈
it holds
H⊥x = 0 .
(A.14)
(A.15)
⊥
A}
= d′
{C
∈
= m, counting the degrees of freedom we obtain that
(m+1)n H⊥ doesn't have rank more than d′
(d′
d)
−
[A]*,j
d and dim
{
:
j
−
−
−
m. Expressing A as
Since dim
FS
}
H⊥ U⊤U
m = d
−
[P(+
)A]FC,*
∞
= W⊤(cid:8)[ ̃A]*,FC
= W⊤ (cid:2)0(d−m)×d
= W⊤UFC,* .
(cid:9)⊤ ̃AU
I(d−m)×(d−m)
(cid:3) U
Finally we obtain
[P(+
∞
)A]FC,FC = W⊤UFC,FC .
where, following that W is an orthogonal matrix and U an
invertible upper-triangular matrix, both W and UFC,FC are
invertible. This implies [P(+
)A]FC,FC is invertible, and
we conclude the lemma.
∞
A = ̃AU,
(A.16)
A.4. Proof of Corollary 4.4
∈
[ ̃A]*,j : j
{
Rd′×d is an orthogonal matrix and U
[A]*,j : j
{
where ̃A
Rd×d
∈
FS
is an upper triangular such that span
=
∈
. Such a decomposition can easily
span
}
be obtained from Gram-Schmidt orthogonalization of the
columns of A. Since [ ̃A]*,j
we
notice that
[A]*,j : j
{
span
FS
FS
∈
∈
∈
}
}
H⊥ ̃A = (cid:2)0d′×m [ ̃A]*,FC
(cid:3)
(A.17)
zU⊤ which is an invertible matrix
Proof. Note that the convergences in Theorem 4.1 are al-
FS we define Bj
most sure convergences. For each j
as the probability one event on which A⊤ ˆpj
βjej. We
further define B ≜
j∈FS Bj which is again a probability
one event (an intersection of finitely many probability one
events), and on the event the convergences hold simultane-
ously over j
→
∈
∩
FS.
∈
Drawing our attention to the conclusions in Theorem 4.3,
we define Cn as the event that
H⊥ = [ ̃A]*,FC [M]FC,FC [ ̃A]⊤
*,FC
Cn ≜
.
(A.18)
The conclusions in Theorem 4.3 hold
{
with sample size n
and defining M ≜ UΣ′
we notice that
H⊥ U⊤U
(m + 1)n
and hence it has rank
of the lemma.
FC
|
|
= d
−
m. This concludes a part
Here, [M]FC,FC is a partition matrix of the non-negative
definite matrix M ≜ UΣ′
zU⊤. We consider it's spectral
decomposition
[M]FC,FC = WDW⊤
(A.19)
R(d−m)×(d−m) is an orthogonal matrix and
R(d−m)×(d−m) is diagonal with positive diagonal
where W
D
entries (since [M]FC,FC is full rank). This follows,
∈
∈
H⊥ ̃A = [ ̃A]*,FCWDW⊤[ ̃A]⊤
*,FC
(A.20)
where [ ̃A]*,FCW is again a Rd′×(d−m) orthogonal ma-
trix whose columns are the only eigen-vectors of
H⊥ U⊤U
(m+1)n H⊥ with positive eigen-values. Hence,
Q(+
) = [ ̃A]*,FCW .
∞
Since [P(+
)]FC,* = Q(+
)⊤ we obtain
∞
[P(+
∞
)A]FC,* = Q(+
∞
)⊤A
∞
(A.21)
14
for each n
implies
≥
d + 1 and notice that Pz(Cn)
1
−
≥
(cid:88)
Pz(Cc
n)
n≥d+1
(cid:88)
≤
n≥d+1
κn <
.
∞
}
κn. This
Cc
We define C =
first Borel-Cantelli lemma to conclude that
n holds infinitely often
}
{
and use the
Pz(Cc) = 0 or, Pz(C) = 1 .
{
{
, or that
}
→ ∞ }
∩
Cn
Note that the event C is the same as the event that
The conclusions in
holds all but finitely often
Theorem 4.3 holds at n
, which are probability one
events. Thus it follows that B
C, an event on which the
conclusions in both the theorems 4.1 and 4.3 simultaneously
hold (for n
), is a probability one event. Hence, we
conclude that with probability one the following hold at
the limit n
: (1) [PA]FS,FS is a diagonal matrix, (2)
[PA]FS,FC = 0, (3) [PA]FS,FC = 0, and (4) [PA]FC,FC is
invertible. These are the exact conditions in Definition 2.2
that are required for sparse recovery. Hence, the corollary
follows.
→ ∞
→ ∞
Simple Disentanglement of Style and Content in Visual Representations
B. Details for synthetic data study in §4.1
B.1. The latent factors
The latent factors are generated as
R10
z
∋
∼
N(0, Σ),
(B.1)
where Σ is a 10
described below. For i, j
×
10 covariance matrix whose entries are
1, . . . , 10
∈ {
}
[Σ]i,j =
1
ρ
0
[0, 1)
∈
i = j,
(i, j) = (1, 2), or, (i, j) = (2, 1),
otherwise .
(B.2)
We fix the first five coordinates as style factors, i.e. FS =
and the rest of them as content factors, i.e.
1, . . . , 5
}
{
FC =
6, . . . , 10
. Note that style and content factors
}
are independent, i.e.,
{
[z]FS ⊥
[z]FC .
We draw
n
i=1
zi
{
}
iid
∼
N(0, Σ).
B.2. The entangled representations
We fix d′ = 10 and obtain entangled representations as
u = Az = LUz
R10 ,
∈
(B.3)
where A = LU, U is a randomly generated 10
thogonal matrix and L is a 10
described below.
10 or-
10 lower triangular matrix
×
×
[L]i,j =
1
0.9
0
i = j,
i > j,
i < j .
(B.4)
We use the same orthogonal matrix throughout our exper-
iment. Note that both L and U are invertible and hence
A = LU is also invertible.
B.3. Sample manipulations and annotations
For each of the latent factors z and j-th style coordinates we
obtain two manipulated latent factors which we denote as
z(j),+ and z(j),− and their description follow. z(j),+ (resp.
z(j),−) sets the j-th coordinate to its positive (resp. negative)
absolute value, i.e.
[z(j),+]j =
[z]j
(resp. [z(j),−]j =
[z]j
) ,
|
|
−|
1). Since the first two coordi-
and annotate it as +1 (resp.
−
nates are correlated with correlation coefficient ρ, if either
of them changes by the value δ then the other one changes
by ρδ. We provide a concrete example of change in the
|
second coordinate for the change in the first coordinate, but
a similar change happens vice-versa. Since
[z(1),+]1
[z]1 =
[z]1
|
| −
[z]1 ,
−
it must hold
[z(1),+]2
[z]2 = ρ(cid:0)
[z]1
|
| −
[z]1
(cid:1) .
−
Note that one of z(j),+ and z(j),− is exactly same as z. We
obtain the entangled representations as u(j),+ = Az(j),+
and u(j),− = Az(j),−.
B.4. Style factor estimations
Note that A is invertible and hence the covariance matrix
of u = Az is also invertible. In this case, the minimum
norm least square problem in (3.2) is the simple least square
problem. For j
FS we describe the estimation of j-th
∈
style factor below.
[ˆz]j ≜ ˆp⊤
j u, where
ˆpj ≜ arg min
a∈R,p∈Rd′
1
2n
n
(cid:88)
i=1
(cid:104)(cid:0) + 1
a
−
−
p⊤u(j),+
i
(cid:1)2
(B.5)
+(cid:0)
1
−
−
a
−
p⊤u(j),−
i
(cid:1)2(cid:105)
C. Experimental details
C.1. Feature extractors and image style generation
(image transformations)
MNIST data For the colored MNIST experiment, we
train a multilayer perceptron (MLP) feature extractor, a 3-
layer neural network with ReLU activation function and a
hidden layer of size 50. The dataset for training the feature
extractor is obtained by randomly coloring some original
MNIST images green and some of them red. We then train
the feature extractor by making it predict both the color of
the image and the digit label. During training, we use a
batch size of 256 and a learning rate of 0.001.
After training the feature extractor, we use it to extract
features from MNIST images that we use in the experiments.
For the experiments, we use original MNIST images and
MNIST images colored green.
CIFAR-10 data For experiments on CIFAR-10, we
use two different feature extractors, Supervised and
SimCLR. For Supervised, we use a Supervised
model that was pre-trained on ImageNet (Russakovsky et al.,
2015) from Pytorch's Torchvision package 4. For SimCLR,
we first train a SimCLR 5 model on the original CIFAR-10
dataset before using it to extract features.
4https://pytorch.org/vision/stable/index.html
5https://github.com/spijkervet/SimCLR
15
Simple Disentanglement of Style and Content in Visual Representations
We transform the CIFAR-10 dataset four different ways to
generate new sets of data that we use in our various experi-
ment settings. The first set of data is generated by rotating
the original CIFAR-10 data at angle 15 degrees, the sec-
ond set is generated by applying contrast to the original
CIFAR-10 data using a contrast factor of 0.3, the third set is
generated by blurring the original CIFAR-10 data using a
sigma value of 0.3, and the fourth set is generated by making
the original CIFAR-10 images saturated using a saturation
factor of 5. We selected transformation parameters that
transformed the original data without changing it into some-
thing completely different and unrecognizable. For the ex-
periments, we extract features from the original CIFAR-10,
rotated CIFAR-10, contrasted CIFAR-10, blurred CIFAR-
10, and saturated CIFAR-10 data. We then use the extracted
features to perform experiments as described in §5 and §3.
ImageNet data For experiments on ImageNet, we use a
pre-trained ResNet-50 model to extract features from the
ImageNet (Russakovsky et al., 2015) dataset. The ImageNet
data that we use contains 1,281,167 images for training,
50,000 images for validation, and 1000 classes.
The ImageNet dataset was used to demonstrate PISCO's
ability to scale and generalize under distribution shifts. For
generalization, we use the code published by Geirhos et al.
(2018) to generate four stylized ImageNet datasets with
covariate distribution shifts by applying four styles on origi-
nal ImageNet images. The styles applied are "dog sketch",
"woman sketch", "Picasso self-portrait", and "Picasso dog"
(see Figure 5). Two of the styles, "dog sketch" and "Pi-
E 2. For the "Picasso
casso dog", were generated by DALL
dog" style, the prompt used to generate it from DALL
E 2
*
was, "portrait of a dog in Picasso's 1907 self-portrait style".
For the "dog sketch" style, the prompt used to generate it
from DALL
E 2 was, "artistic hand drawn sketch of a dog
*
face". The other two styles, "woman sketch" and "Picasso
self-portrait", were downloaded from a GitHub repository6
of the style transfer project by (Huang & Belongie, 2017).
The generated stylized ImageNet data is then used to test
PISCO's out-of-distribution (OOD) generalization capabil-
ity. Figure 5 shows example images from the ImageNet
dataset and the four styles that we use to generate the styl-
ized ImageNet sets.
*
C.2. Spurious correlations and error bars
Spurious correlations for the experiments in both MNIST
and CIFAR-10 datasets are created by first dividing images
in each dataset into two halves, the first half contains images
with class label below 4 and the second half contains images
with class 4 and above. We then create datasets, where the
6https://github.com/xunhuang1995/
AdaIN-style/tree/master/input/style
image label is spuriously correlated with the image style,
i.e. color green, rotation, contrast, blur, or saturation, as
follows: in the training dataset, images from the first half are
transformed with probability α and images from the second
α. In the test
half are transformed with probability 1
dataset, we do the reverse of what we did in the training data;
images from the first half are transformed with probability
α and images from the second half are transformed with
1
probability α. We perform experiments and report results
for α values 0.5, 0.75, 0.90, 0.95, 0.99, 1.0. At α = 0.5,
the train and test data have the same distribution, and at
α = 1, the spurious correlations between labels and styles
is extreme.
−
−
Results on experiments where there are spurious correlations
between label and transformations (styles) in the data are
reported in plots eg. Figure 3, Figure 4, Figure 13, etc. The
reported results are over 10 restarts. We include error bars
in the plots, but the errors are small so the error bars are not
very visible.
C.3. Training and testing logistic regression models for
classification
MNIST Data For MNIST data, the digits labels are from
0 to 9. For baseline results, we train and test the logistic
regression model using all the features extracted using the
MLP feature extractor. For PISCO results, we discard the
style feature corresponding to color green and train and
test the logistic regression model using only the remaining
content features.
CIFAR-10 Data For CIFAR-10 data, we use the orig-
inal image labels to train and test the logistic regression
model. For baseline results, we train and test the logistic
regression model using features extracted using SimCLR
or Supervised. For PISCO results, we first discard the
four style features corresponding to rotation, contrast, blur,
and saturation and then train and test the logistic regression
model using only the remaining content features.
ImageNet Data For ImageNet data, similar to CIFAR-
10 and MNIST settings, after fitting the logistic regres-
sion model on features extracted using ResNet-50 to obtain
baseline results, ImageNet features are post-processed with
PISCO to isolate content and style, and then style features
get dropped when fitting the model for OOD generalization.
The batch size used when training the logistic regression
model on ImageNet was 32768, the learning rate was 0.0001,
and the number of epochs was 50.
For more experimental details, check out our released code
on GitHub7.
7https://github.com/lilianngweta/PISCO
16
Simple Disentanglement of Style and Content in Visual Representations
Figure 5. Example images from the ImageNet dataset with the styles applied to them.
Selecting the hyperparameter λ: λ trades-off disentangle-
ment with the preservation of variance in the data (second
and first terms in eq. (3.1), correspondingly). The easi-
est, no-harm, way to select λ is to increase it until the in-
distribution performance starts to degrade. In our reported
results, λ = 1 is the best λ value because it improves OOD
performance without affecting the in-distribution accuracy.
Further increasing λ can provide additional OOD gains at
the cost of in-distribution performance. Our method works
best when the styles are easy to predict from the original rep-
resentations with a linear model (see first column in Tables
?? and ??; note that this is also easy to evaluate at training
time). For example, blur is hard to predict and PISCO with
larger values of λ degrades the corresponding OOD perfor-
mance in Tables 2 and 3, while rotation is easier to predict
and PISCO with λ = 10 improves the performance in both
tables. When a given style is hard to predict, it means that
the representation is robust to it (as is the case with blur
and some other styles for SimCLR representations) and it
might make sense to exclude it when applying PISCO to
avoid unnecessary trade-offs with the variance preservation.
However, if strong spurious correlation is present, PISCO
improves performance even for harder to predict styles (see
Figures 3 and 4).
D. Additional results and selecting the
hyperparameter η
In this section, we present results on the MNIST dataset
(see §D.1). We also present additional ImageNet results
(see §D.3) and additional CIFAR-10 results (see §D.2) on
different values of the hyperparameter η, as well as Ima-
geNet results for different values of λ. In experiments for
all datasets (MNIST, CIFAR-10, and ImageNet), we have
presented results for when η = 0.95. Here we present ad-
ditional ImageNet and CIFAR-10 results when η is 0.90,
0.93, 0.95 (for ImageNet only), 0.98, and 1.0 to demonstrate
its impact on performance. We also presented ImageNet
results for when λ = 1 in the main paper; here we present
additional results for when λ is 10 and 50 to demonstrate
how varying λ affects performance on ImageNet data.
D.1. Colored MNIST experiment
In this experiment, our goal is to isolate color green from the
digit class. First, to obtain representations with entangled
color green and digit information, we train a neural network
feature extractor to predict both color and digit label (see §C
for details) and then use it to extract features from original
and green MNIST images that we use in the experiment.
In this experiment, we have a single style factor, i.e. color
green, m = 1. We learn post-processing feature transfor-
mation matrices P(λ) with PISCO as in Algorithm 1 and
17
Simple Disentanglement of Style and Content in Visual Representations
report results for λ
1, 10, 50
∈ {
.
}
Next, we create a dataset where the label is spuriously cor-
related with the color green, similar to Colored MNIST
(Arjovsky et al., 2019). Specifically, in the training dataset,
images from the first half of the classes are colored green
with probability α and images from the second half of the
α. In test
classes are colored green with probability 1
data the correlation is reversed, i.e., images from the first
α
half of the classes are colored green with probability 1
and images from the second half with probability α (see
§C for additional details). Thus, for α = 0.5 train and test
data have the same distribution where each image is ran-
domly colored green, and α = 1 corresponds to the extreme
spurious correlation setting.
−
−
For each α we train and test a linear model on the original
representations and on PISCO representations (discarding
the learned color green factor) for varying λ. We summarize
the results in Figure 6. PISCO outperforms the baseline
across all values of α and matches the baseline accuracy
when there is no spurious correlation and train and test
distributions are the same, i.e., α = 0.5. Thus, our method
provides a significant OOD accuracy boost while preserving
the in-distribution accuracy.
Figure 6. OOD accuracy on Colored MNIST dataset where the
label is spuriously correlated with color green. The strength of the
correlation is controlled by α. For each α, we train a logistic regres-
sion on the training data using the corresponding representations
and report test accuracy. PISCO is robust to spurious correlations
across all values of α with only a slight accuracy drop for extreme
α values. The baseline is a multilayer perceptron (MLP).
(a) Rotation - Supervised
(b) Contrast - Supervised
(c) Blur - Supervised
(d) Satur. - Supervised
Figure 7. η = 0.90, OOD performance of Supervised repre-
sentations on CIFAR-10 where the label is spuriously correlated
with the corresponding transformation. PISCO significantly im-
proves OOD performance, especially in the case of rotation. Both
λ = 1 and λ = 10 preserve in-distribution accuracy, while larger
λ = 50 may degrade it as per (3.3).
D.2. Additional transformed CIFAR-10 experiment
results
Results for η = 0.90: Results for when η = 0.90 can be
found in Figure 7, Figure 8, Table 6, and Table 7.
Results for η = 0.93: Results for when η = 0.93 can be
found in Figure 9, Figure 10, Table 8, and Table 9.
Results for η = 0.98: Results for when η = 0.98 can be
found in Figure 11, Figure 12, Table 10, and Table 11.
Results for η = 1.0: Results for when η = 1.0 can be
found in Figure 13, Figure 14, Table 12, and Table 13. When
η = 1.0, it means the number of features in the baseline is
the same as the number of features learned using PISCO
and as a result, we observe the in-distribution performance
of PISCO is almost the same as that of baseline methods
even for higher values of λ.
Overall CIFAR-10 results discussion. Even with differ-
ent values of η, PISCO still outperforms the baselines in
almost all cases. An expected observation from the results
is as η increases, the in-distribution performance of PISCO
goes up even for high values of λ and its OOD performance
slightly goes down.
18
Simple Disentanglement of Style and Content in Visual Representations
(a) Rotation - SimCLR
(b) Contrast - SimCLR
(a) Rotation - Supervised
(b) Contrast - Supervised
(c) Blur - SimCLR
(d) Saturation - SimCLR
(c) Blur - Supervised
(d) Satur. - Supervised
Figure 8. η = 0.90, OOD performance of SimCLR representa-
tions on CIFAR-10 where the label is spuriously correlated with
the corresponding transformation. Results are analogous to Figure
7. The SimCLR baseline representations are less sensitive to con-
trast and saturation but remain sensitive to rotation.
Table 6. η = 0.90, Performance of Supervised representations
on CIFAR-10 test set in-distribution, i.e., no transformation (re-
ferred to as "none"; last row), and OOD when modified with the
corresponding transformation. PISCO with λ = 1 provides sig-
nificant improvements for rotation, contrast, and saturation, while
preserving in-distribution accuracy.
Style
rotation
contrast
saturation
blur
none
Baseline
(Supervised)
PISCO
(λ = 1)
PISCO
(λ = 10)
PISCO
(λ = 50)
0.678
0.625
0.699
0.817
0.873
0.741
0.680
0.759
0.817
0.869
0.722
0.741
0.742
0.777
0.823
0.693
0.718
0.714
0.750
0.791
Table 7. η = 0.90, Performance of SimCLR representations on
CIFAR-10 test set in-distribution, i.e., no transformation (referred
to as "none"; last row), and OOD when modified with the cor-
responding transformation. SimCLR features are robust to these
transformations and perform similarly to PISCO with λ = 1.
Style
rotation
contrast
saturation
blur
none
Baseline
(SimCLR)
PISCO
(λ = 1)
PISCO
(λ = 10)
PISCO
(λ = 50)
0.620
0.816
0.810
0.808
0.828
0.632
0.815
0.805
0.804
0.828
0.697
0.795
0.782
0.783
0.800
0.689
0.775
0.763
0.762
0.778
Figure 9. η = 0.93, OOD performance of Supervised repre-
sentations on CIFAR-10 where the label is spuriously correlated
with the corresponding transformation. PISCO significantly im-
proves OOD performance, especially in the case of rotation. Both
λ = 1 and λ = 10 preserve in-distribution accuracy, while larger
λ = 50 may degrade it as per (3.3).
(a) Rotation - SimCLR
(b) Contrast - SimCLR
(c) Blur - SimCLR
(d) Saturation - SimCLR
Figure 10. η = 0.93, OOD performance of SimCLR representa-
tions on CIFAR-10 where the label is spuriously correlated with
the corresponding transformation. Results are analogous to Figure
9. The SimCLR baseline representations are less sensitive to con-
trast and saturation but remain sensitive to rotation.
19
Simple Disentanglement of Style and Content in Visual Representations
Table 8. η = 0.93, Performance of Supervised representations
on CIFAR-10 test set in-distribution, i.e., no transformation (re-
ferred to as "none"; last row), and OOD when modified with the
corresponding transformation. PISCO with λ = 1 provides sig-
nificant improvements for rotation, contrast, and saturation while
preserving in-distribution accuracy.
Style
rotation
contrast
saturation
blur
none
Baseline
(Supervised)
PISCO
(λ = 1)
PISCO
(λ = 10)
PISCO
(λ = 50)
0.678
0.625
0.699
0.817
0.873
0.741
0.678
0.759
0.817
0.871
0.726
0.744
0.742
0.788
0.827
0.700
0.723
0.718
0.761
0.805
Table 9. η = 0.93, Performance of SimCLR representations on
CIFAR-10 test set in-distribution, i.e., no transformation (referred
to as "none"; last row), and OOD when modified with the cor-
responding transformation. SimCLR features are robust to these
transformations and perform similarly to PISCO with λ = 1.
Style
rotation
contrast
saturation
blur
none
Baseline
(SimCLR)
PISCO
(λ = 1)
PISCO
(λ = 10)
PISCO
(λ = 50)
0.620
0.816
0.810
0.808
0.828
0.632
0.817
0.809
0.804
0.826
0.695
0.797
0.786
0.783
0.804
0.692
0.786
0.765
0.762
0.782
Table 10. η = 0.98, Performance of Supervised representa-
tions on CIFAR-10 test set in-distribution, i.e., no transformation
(referred to as "none"; last row), and OOD when modified with the
corresponding transformation. PISCO with λ = 1 provides sig-
nificant improvements for rotation, contrast, and saturation, while
preserving in-distribution accuracy.
Style
rotation
contrast
saturation
blur
none
Baseline
(Supervised)
PISCO
(λ = 1)
PISCO
(λ = 10)
PISCO
(λ = 50)
0.678
0.625
0.699
0.817
0.873
0.739
0.680
0.757
0.817
0.871
0.736
0.740
0.740
0.807
0.861
0.726
0.729
0.726
0.797
0.851
(a) Rotation - Supervised
(b) Contrast - Supervised
(c) Blur - Supervised
(d) Saturation -
Supervised
Figure 11. η = 0.98, OOD performance of Supervised repre-
sentations on CIFAR-10 where the label is spuriously correlated
with the corresponding transformation. PISCO significantly im-
proves OOD performance, especially in the case of rotation. Both
λ = 1 and λ = 10 preserve in-distribution accuracy, while larger
λ = 50 may degrade it as per (3.3).
(a) Rotation - SimCLR
(b) Contrast - SimCLR
(c) Blur - SimCLR
(d) Saturation - SimCLR
Figure 12. η = 0.98, OOD performance of SimCLR representa-
tions on CIFAR-10 where the label is spuriously correlated with
the corresponding transformation. Results are analogous to Figure
11. The SimCLR baseline representations are less sensitive to
contrast and saturation but remain sensitive to rotation.
20
Simple Disentanglement of Style and Content in Visual Representations
Table 11. η = 0.98, Performance of SimCLR representations on
CIFAR-10 test set in-distribution, i.e., no transformation (referred
to as "none"; last row), and OOD when modified with the cor-
responding transformation. SimCLR features are robust to these
transformations and perform similarly to PISCO with λ = 1.
Style
rotation
contrast
saturation
blur
none
Baseline
(SimCLR)
PISCO
(λ = 1)
PISCO
(λ = 10)
PISCO
(λ = 50)
0.620
0.816
0.810
0.808
0.828
0.633
0.817
0.809
0.806
0.826
0.681
0.808
0.796
0.795
0.815
0.677
0.799
0.778
0.793
0.806
(a) Rotation - Supervised
(b) Contrast - Supervised
(c) Blur - Supervised
(d) Saturation -
Supervised
Figure 13. η = 1.0, OOD performance of Supervised repre-
sentations on CIFAR-10 where the label is spuriously correlated
with the corresponding transformation. PISCO significantly im-
proves OOD performance, especially in the case of rotation. Both
λ = 1 and λ = 10 preserve in-distribution accuracy, while larger
λ = 50 may degrade it as per (3.3).
(a) Rotation - SimCLR
(b) Contrast - SimCLR
(c) Blur - SimCLR
(d) Saturation - SimCLR
Figure 14. η = 1.0, OOD performance of SimCLR representa-
tions on CIFAR-10 where the label is spuriously correlated with
the corresponding transformation. Results are analogous to Figure
13. The SimCLR baseline representations are less sensitive to
contrast and saturation but remain sensitive to rotation.
Table 12. η = 1.0, Performance of Supervised representations
on CIFAR-10 test set in-distribution, i.e., no transformation (re-
ferred to as "none"; last row), and OOD when modified with the
corresponding transformation. PISCO with λ = 1 provides sig-
nificant improvements for rotation, contrast, and saturation, while
preserving in-distribution accuracy.
Style
rotation
contrast
saturation
blur
none
Baseline
(Supervised)
PISCO
(λ = 1)
PISCO
(λ = 10)
PISCO
(λ = 50)
0.678
0.625
0.699
0.817
0.873
0.736
0.669
0.744
0.820
0.872
0.748
0.724
0.736
0.819
0.872
0.747
0.721
0.729
0.819
0.872
Table 13. η = 1.0, Performance of SimCLR representations on
CIFAR-10 test set in-distribution, i.e., no transformation (referred
to as "none"; last row), and OOD when modified with the cor-
responding transformation. SimCLR features are robust to these
transformations and perform similarly to PISCO with λ = 1.
Style
rotation
contrast
saturation
blur
none
Baseline
(SimCLR)
PISCO
(λ = 1)
PISCO
(λ = 10)
PISCO
(λ = 50)
0.620
0.816
0.810
0.808
0.828
0.629
0.816
0.808
0.805
0.827
0.647
0.814
0.806
0.806
0.826
0.624
0.811
0.805
0.802
0.826
21
Simple Disentanglement of Style and Content in Visual Representations
D.3. Additional stylized ImageNet experiment results
In this section for the ResNet-50 baseline, for each value of
η, we report results for λ values 1, 10, and 50. For the MAE-
ViT-Base (He et al., 2022) baseline, we report additional
results for λ values 1, 10, and 50.
ResNet-50 results for η = 0.90: Results for when η =
0.90 can be found in Table 14.
ResNet-50 results for η = 0.93: Results for when η =
0.93 can be found in Table 15.
ResNet-50 results for η = 0.95: Results for when η =
0.95 can be found in Table 16. In the main paper we reported
results for η = 0.95 when λ = 1. Table 16 contains results
for λ value 1, and additional λ values 10 and 50.
ResNet-50 results for η = 0.98: Results for when η =
0.98 can be found in Table 17.
ResNet-50 results for η = 1.0: Results for when η = 1.0
can be found in Table 18. When η = 1.0, it means the
number of features in the baseline is the same as the number
of features learned using PISCO and as a result, similar for
CIFAR-10 results in §D.2, we observe the in-distribution
performance of PISCO in this case being almost the same
as that of baseline methods even for higher values of λ.
MAE-ViT-Base results for λ values 1, 10, and 50: Re-
sults for additional values of λ when MAE-ViT-Base is the
baseline are in Table 19.
Overall ImageNet results discussion. When we vary η
in ImageNet experiments, we observe behavior similar to
what we observed in the CIFAR-10 experiments in §D.2:
PISCO outperforms the baseline across all values of η and
λ = 1 provides the best PISCO results in all η values. An
expected observation from the results is as η increases, the
in-distribution performance of PISCO goes up even for high
values of λ and its OOD performance slightly goes down.
22
Simple Disentanglement of Style and Content in Visual Representations
Table 14. η = 0.90, Top-1 and top-5 accuracies on 5 variations of the ImageNet test set for Baseline pre-trained ResNet-50 features and
the corresponding post-processed PISCO features on different values of λ.
Style
Baseline
(ResNet-50)
Top-1 Top-5 Top-1 Top-5 Top-1 Top-5 Top-1 Top-5
PISCO
(λ = 50)
PISCO
(λ = 10)
PISCO
(λ = 1)
dog sketch
woman sketch
Picasso dog
Picasso s.-p.
none
0.514
0.477
0.445
0.474
0.758
0.752
0.711
0.686
0.706
0.927
0.542
0.511
0.495
0.508
0.743
0.769
0.743
0.730
0.737
0.916
0.522
0.490
0.472
0.490
0.740
0.723
0.693
0.672
0.691
0.910
0.520
0.488
0.467
0.490
0.740
0.717
0.686
0.665
0.685
0.910
Table 15. η = 0.93, Top-1 and top-5 accuracies on 5 variations of the ImageNet test set for Baseline pre-trained ResNet-50 features and
the corresponding post-processed PISCO features on different values of λ.
Style
Baseline
(ResNet-50)
Top-1 Top-5 Top-1 Top-5 Top-1 Top-5 Top-1 Top-5
PISCO
(λ = 50)
PISCO
(λ = 10)
PISCO
(λ = 1)
dog sketch
woman sketch
Picasso dog
Picasso s.-p.
none
0.515
0.478
0.446
0.474
0.757
0.753
0.712
0.686
0.706
0.927
0.545
0.514
0.495
0.511
0.746
0.775
0.748
0.735
0.742
0.918
0.530
0.500
0.480
0.501
0.742
0.741
0.710
0.692
0.709
0.914
0.528
0.498
0.479
0.499
0.743
0.737
0.705
0.688
0.706
0.913
Table 16. η = 0.95, Top-1 and top-5 accuracies on 5 variations of the ImageNet test set for Baseline pre-trained ResNet-50 features and
the corresponding post-processed PISCO features on different values of λ.
Style
Baseline
(ResNet-50)
Top-1 Top-5 Top-1 Top-5 Top-1 Top-5 Top-1 Top-5
PISCO
(λ = 50)
PISCO
(λ = 10)
PISCO
(λ = 1)
dog sketch
woman sketch
Picasso dog
Picasso s.-p.
none
0.516
0.478
0.445
0.474
0.757
0.752
0.712
0.686
0.706
0.927
0.546
0.518
0.500
0.514
0.749
0.777
0.752
0.738
0.747
0.921
0.534
0.506
0.486
0.505
0.745
0.751
0.723
0.705
0.721
0.917
0.532
0.504
0.485
0.504
0.745
0.750
0.719
0.702
0.718
0.916
Table 17. η = 0.98, Top-1 and top-5 accuracies on 5 variations of the ImageNet test set for Baseline pre-trained ResNet-50 features and
the corresponding post-processed PISCO features on different values of λ.
Style
Baseline
(ResNet-50)
Top-1 Top-5 Top-1 Top-5 Top-1 Top-5 Top-1 Top-5
PISCO
(λ = 50)
PISCO
(λ = 10)
PISCO
(λ = 1)
dog sketch
woman sketch
Picasso dog
Picasso s.-p.
none
0.515
0.478
0.446
0.474
0.757
0.752
0.711
0.686
0.706
0.928
0.553
0.520
0.504
0.518
0.754
0.785
0.757
0.744
0.752
0.926
0.541
0.512
0.492
0.512
0.751
0.769
0.740
0.725
0.737
0.922
0.540
0.511
0.492
0.512
0.751
0.768
0.738
0.722
0.737
0.921
23
Simple Disentanglement of Style and Content in Visual Representations
Table 18. η = 1.0, Top-1 and top-5 accuracies on 5 variations of the ImageNet test set for Baseline pre-trained ResNet-50 features and the
corresponding post-processed PISCO features on different values of λ.
PISCO
(λ = 1)
Baseline
(ResNet-50)
Top-1 Top-5 Top-1 Top-5 Top-1 Top-5 Top-1 Top-5
PISCO
(λ = 50)
PISCO
(λ = 10)
Style
dog sketch
woman sketch
Picasso dog
Picasso s.-p.
none
0.516
0.478
0.446
0.474
0.758
0.752
0.712
0.686
0.706
0.928
0.552
0.517
0.501
0.517
0.758
0.787
0.756
0.742
0.752
0.929
0.548
0.517
0.499
0.518
0.758
0.787
0.755
0.744
0.754
0.929
0.548
0.519
0.501
0.517
0.757
0.786
0.756
0.745
0.755
0.929
Table 19. η = 0.95, Top-1 and top-5 accuracies on 5 variations of the ImageNet test set for when MAE-ViT-Base features are the Baseline,
and the corresponding accuracies for post-processed PISCO features on different values of λ.
Style
Baseline
(MAE-ViT-Base)
Top-1
Top-5
PISCO
(λ = 1)
PISCO
(λ = 10)
Top-1 Top-5 Top-1 Top-5 Top-1 Top-5
PISCO
(λ = 50)
dog sketch
Picasso dog
Picasso s.-p.
woman sketch
none
0.530
0.472
0.512
0.504
0.811
0.749
0.686
0.727
0.719
0.952
0.575
0.519
0.558
0.550
0.818
0.773
0.716
0.752
0.746
0.953
0.576
0.520
0.558
0.549
0.817
0.770
0.714
0.748
0.744
0.953
0.576
0.520
0.558
0.549
0.817
0.770
0.714
0.748
0.744
0.953
24
|
|
http://arxiv.org/abs/2306.17582v2 | 2023-07-19T19:30:28 | 2023-02-20T06:39:06 | ChatGPT for Robotics: Design Principles and Model Abilities | This paper presents an experimental study regarding the use of OpenAI's
ChatGPT for robotics applications. We outline a strategy that combines design
principles for prompt engineering and the creation of a high-level function
library which allows ChatGPT to adapt to different robotics tasks, simulators,
and form factors. We focus our evaluations on the effectiveness of different
prompt engineering techniques and dialog strategies towards the execution of
various types of robotics tasks. We explore ChatGPT's ability to use free-form
dialog, parse XML tags, and to synthesize code, in addition to the use of
task-specific prompting functions and closed-loop reasoning through dialogues.
Our study encompasses a range of tasks within the robotics domain, from basic
logical, geometrical, and mathematical reasoning all the way to complex domains
such as aerial navigation, manipulation, and embodied agents. We show that
ChatGPT can be effective at solving several of such tasks, while allowing users
to interact with it primarily via natural language instructions. In addition to
these studies, we introduce an open-sourced research tool called PromptCraft,
which contains a platform where researchers can collaboratively upload and vote
on examples of good prompting schemes for robotics applications, as well as a
sample robotics simulator with ChatGPT integration, making it easier for users
to get started with using ChatGPT for robotics. | [
"Sai Vemprala",
"Rogerio Bonatti",
"Arthur Bucker",
"Ashish Kapoor"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2306.17582v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2306.17582v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.AI",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.AI",
"cs.CL",
"cs.HC",
"cs.LG",
"cs.RO"
] | ChatGPT for Robotics:
Design Principles and Model Abilities
Sai Vemprala*1, Rogerio Bonatti*2, Arthur Bucker2, and Ashish Kapoor1
1Scaled Foundations, 2Microsoft Autonomous Systems and Robotics Research
2023-7-21
3
2
0
2
l
u
J
9
1
]
I
A
.
s
c
[
2
v
2
8
5
7
1
.
6
0
3
2
:
v
i
X
r
a
This paper presents an experimental study regarding the use of OpenAI's ChatGPT [1] for
robotics applications. We outline a strategy that combines design principles for prompt
engineering and the creation of a high-level function library which allows ChatGPT to adapt
to different robotics tasks, simulators, and form factors. We focus our evaluations on the
effectiveness of different prompt engineering techniques and dialog strategies towards the
execution of various types of robotics tasks. We explore ChatGPT's ability to use free-form
dialog, parse XML tags, and to synthesize code, in addition to the use of task-specific prompting
functions and closed-loop reasoning through dialogues. Our study encompasses a range of
tasks within the robotics domain, from basic logical, geometrical, and mathematical reasoning
all the way to complex domains such as aerial navigation, manipulation, and embodied agents.
We show that ChatGPT can be effective at solving several of such tasks, while allowing users to
interact with it primarily via natural language instructions. In addition to these studies, we
introduce an open-sourced research tool called PromptCraft, which contains a platform where
researchers can collaboratively upload and vote on examples of good prompting schemes for
robotics applications, as well as a sample robotics simulator with ChatGPT integration, making
it easier for users to get started with using ChatGPT for robotics.
Videos and blog: aka.ms/ChatGPT-Robotics
PromptCraft, AirSim-ChatGPT code: https://github.com/microsoft/PromptCraft-Robotics
1. Introduction
The rapid advancement in natural language processing (NLP) has led to the development of large language
models (LLMs), such as BERT [2], GPT-3 [3], and Codex [4], that are revolutionizing a wide range of
applications. These models have achieved remarkable results in various tasks such as text generation,
machine translation, and code synthesis, among others. A recent addition to this collection of models was the
OpenAI ChatGPT [1], a pretrained generative text model which was finetuned using human feedback. Unlike
previous models which operate mostly upon a single prompt, ChatGPT provides particularly impressive
interaction skills through dialog, combining text generation with code synthesis. Our goal in this paper is to
investigate if and how the abilities of ChatGPT can generalize to the domain of robotics.
Robotics systems, unlike text-only applications, require a deep understanding of real-world physics, envi-
ronmental context, and the ability to perform physical actions. A generative robotics model needs to have a
robust commonsense knowledge and a sophisticated world model, and the ability to interact with users to
interpret and execute commands in ways that are physically possible and that makes sense in the real world.
These challenges fall beyond the original scope of language models, as they must not only understand the
meaning of a given text, but also translate the intent into a logical sequence of physical actions.
In recent years there have been different attempts to incorporate language into robotics systems. These
* Equal contribution, random order.
©2023 Microsoft. All rights reserved.
ChatGPT for Robotics
Figure 1: Current robotics pipelines require a specialized engineer in the loop to write code to improve the process. Our
goal with ChatGPT is to have a (potentially non-technical) user on the loop, interacting with the language model through
high-level language commands, and able to seamlessly deploy various platforms and tasks.
efforts have largely focused on using language token embedding models, LLM features, and multi-modal
model features for specific form factors or scenarios. Applications range from visual-language navigation [5,
6], language-based human-robot interaction [7, 8], and visual-language manipulation control [9, 10, 11].
However, despite the potential advantages of using LLMs in robotics, most of the existing approaches are
restricted by a rigid scope and limited set of functionalities, or by their open-loop nature that does not allow
for fluid interactions and behavior corrections from user feedback.
Models such as GPT-3, LaMDA, and Codex also show promise in zero-shot robotics scenarios when tasked
with high-level agent planning [12, 13] or code generation [14, 15]. These early demonstrations inspired us
to investigate ChatGPT as a potentially more versatile tool for the robotics domain, as it incorporates the
strengths of natural language and code generation models along with the flexibility of dialogue. ChatGPT's
ability to engage in a free-form dialog and capture long context allows users to interact with the model in a
more natural fashion, with flexible behavior correction.
In this paper, we aim to demonstrate the potential of ChatGPT for robotics applications. We outline a key
concept that unlocks the ability to solve robotics applications with ChatGPT, which is the creation of a
high-level function library. Given that robotics is a diverse field where several platforms, scenarios, and tools
exist, there exists an extensive variety of libraries and APIs. Instead of asking LLMs to output code specific
to a platform or a library, which might involve extensive finetuning, we instead create a simple high-level
function library for ChatGPT to deal with which can then be linked in the back-end to the actual APIs for
the platforms of choice. Thus, we allow ChatGPT to parse user intent from natural dialog, and convert that
to a logical chaining of high-level function calls. We also outline several prompt engineering guidelines that
help ChatGPT solve robotics tasks.
Our research shows that ChatGPT is capable of solving various robotics-related tasks in a zero-shot fashion,
while adapting to multiple form factors, and allowing for closed-loop reasoning through conversation. In
addition, we aim to show current model limitations, and provide ideas on how to overcome them. Our main
contributions are listed below:
• We demonstrate a pipeline for applying ChatGPT to robotics tasks. The pipeline involves several prompt-
ing techniques such as free-form natural language dialogue, code prompting, XML tags, and closed-loop
reasoning. We also show how users can leverage a high-level function library that allows the model to
quickly parse human intent and generate code for solving the problem;
• We experimentally evaluate ChatGPT's ability to execute a variety of robotics tasks. We show the model's
2
ChatGPT for Robotics
Figure 2: Robotics pipeline employing ChatGPT with the user on the loop to evaluate the output's quality and safety.
capabilities and limitations when solving mathematical, logical, and geometrical operations, and then
explore more complex scenarios involving embodied agents, aerial navigation, and manipulation. We
include both simulation and real-world experiments that result from ChatGPT's plans;
• We introduce a collaborative open-source platform, PromptCraft, where researchers can work together to
provide examples of positive (and negative) prompting strategies when working with LLMs in the robotics
context. Prompt engineering is a mostly empirical science, and we want to provide a simple interface
for researchers to contribute with knowledge as a community. Over time we aim to provide different
environments where users can test their prompts, and welcome new contributions;
• We release a simulation tool that builds on Microsoft AirSim [16] combined with a ChatGPT integration.
This AirSim-ChatGPT simulation contains a sample environment for drone navigation and aims to be a
starting point for researchers to explore how ChatGPT can enable robotics scenarios.
With this work we hope to open up new opportunities and avenues for future research fusing LLMs and
robotics. We believe that our findings will inspire and guide further research in this exciting field, paving
the way for the development of new, innovative robotics systems that can interact with humans in a natural,
intuitive manner. For more details, we encourage readers to view detailed videos of our experiments in the
project webpage.
2. Robotics with ChatGPT
Prompting LLMs for robotics control poses several challenges, such as providing a complete and accurate
descriptions of the problem, identifying the right set of allowable function calls and APIs, and biasing the
answer structure with special arguments. To make effective use of ChatGPT for robotics applications, we
construct a pipeline composed of the following steps:
1. First, we define a high-level robot function library. This library can be specific to the form factor or
scenario of interest, and should map to actual implementations on the robot platform while being named
descriptively enough for ChatGPT to follow;
2. Next, we build a prompt for ChatGPT which describes the objective while also identifying the set of
allowed high-level functions from the library. The prompt can also contain information about constraints,
or how ChatGPT should structure its responses;
3. The user stays on the loop to evaluate code output by ChatGPT, either through direct analysis or through
simulation, and provides feedback to ChatGPT on the quality and safety of the output code;
4. After iterating on the ChatGPT-generated implementations, the final code can be deployed onto the robot.
We show a visual depiction of this pipeline in Figure 2 for the example of a household robot.
3
ChatGPT for Robotics
2.1. Construction and description of the robotics API library
Robotics being a well-established field, there already exists a multitude of libraries, either black-box or
open-source, that can be used for basic functionalities in both the perception and action domains (e.g. object
detection and segmentation, mapping, motion planning, controls, grasping). If properly specified in the
prompt, the LLM is able to use these pre-defined functions for robot reasoning and execution.
One important prompt design requirement is that all API names must be descriptive of the overall function
behavior. Clear names are essential to allow the LLM to reason over functional connections between APIs
and produce the desired outcome for the problem. Hence, we can define high-level functions, which act
as wrappers over actual implementations from the respective libraries. For example, a function named
detect_object(object_name) could internally link to an OpenCV function or a computer vision model,
whereas something like move_to(x, y, z) could internally invoke a motion planning and obstacle avoidance
pipeline along with the appropriate low-level motor commands for a drone. Listing such a collection of
high-level functions in the prompt is key in allowing ChatGPT to create logical sequences of behavioral
primitives, and in generalizing to different scenarios and platforms.
Depending on the context, we recommend explaining the function of APIs and if needed, breaking them
down into sub-components with clear inputs and outputs, similar to code documentation. In Figure 3 we
present an example of a good API prompting strategy for a home cook robot scenario. The strategy presented
allows ChatGPT to reason about the order and content of tasks according to the functions the robot is actually
able to execute. In contrast, we refer the interested reader to Appendix A.1 for an example of how ChatGPT
reasons when no API guidance is given, which leads to a unbounded text-based answer, or to Appendix A.2
for an example of API under-specification, which leads to hallucinations over function call parameters.
We note that unlike the brittle structure of classical symbolic AI, which required rigid pre-defined relation-
ships between objects and functions, LLMs are capable of defining new functions and concepts altogether
when relevant to a particular problem. This capability confers flexibility and robustness to LLMs when
dealing with robotics applications. Figure 4 shows how ChatGPT can create new high-level concepts and
even low-level code when needed to solve a problem, even fusing existing APIs. The user on the loop can
take advantage of this ability as a design strategy, and iteratively define new APIs with the help of the LLM
when the current ones are not sufficient to solve the task at hand.
2.2. Clear description of the task details in the prompt
By providing a clear and concise description of the desired robotics task and its context, ChatGPT can
generate more accurate responses. A good context description should contain, besides robot APIs:
• Constraints and requirements: specify constraints or requirements that are relevant to the task. If the task
involves moving objects, you might specify the weight, size, and shape of the objects to be moved.
• Environment: describe the environment in which the robotics task is taking place. For example, if the
task is to navigate a maze, you might describe the size and shape of the maze, as well as any obstacles or
hazards that need to be avoided.
• Current state: describe the current state of the robotics system. For example, if the task is to pick up an
object, you might describe the current position and orientation of the robot and the object.
• Goals and objectives: state the goals and objectives of the task. If the task is to assemble a puzzle, you
might specify the number of pieces that need to be assembled and the desired completion time.
• Solution examples: demonstrate how similar tasks can be solved as a means to guide the LLM's solution
strategy. For example, if a task involves interactions with the user, we can describe an example of how and
when the robot should be asking for the user's input (see Fig. 5). Note that priming can also introduce
biases, so we should provide a diverse range of examples and avoid overly prescriptive language.
4
ChatGPT for Robotics
Imagine we are working with a household robot. The job of this robot is to make an omelette. The objects available around are:
fridge, bowl, pan, oil, stove
The main functions you can use are:
locate_object(object_name): Returns the XYZ coordinates of an object of interest.
go_to_location(object_name): Moves robot to a location specified by XYZ coordinates. Returns nothing.
pick_up(object_name): Picks up the object of interest. Returns nothing.
use_item(object_name): Takes the name of an object as input. Performs an appropriate action on the object at hand (pour oil, crack eggs). Returns
nothing.
Can you make use of these to write code to go to the kitchen and make an omelette?
Sure, here is an example Python code that utilizes the provided functions to prepare an omelette for an elderly person:
fridge_location = locate_object("fridge")
bowl_location = locate_object("bowl")
pan_location = locate_object("pan")
stove_location = locate_object("stove")
oil_location = locate_object("oil")
# Place the pan on the stove
# Crack eggs into the bowl
# Start the omelette-making process
go_to_location(fridge_location)
pick_up("eggs")
go_to_location(bowl_location)
use_item("eggs")
go_to_location(pan_location)
pick_up("pan")
use_item("pan")
go_to_location("oil")
pick_up("oil")
go_to_location(pan_location)
use_item("oil")
go_to_location("bowl")
pick_up("bowl")
go_to_location(pan_location)
use_item("bowl")
go_to_location(stove_location)
use_item("stove")
print("Enjoy your omelette!")
# Turn on the stove
# Pour oil into the pan
# Pour the egg mixture into the pan
Figure 3: Example of a good prompting practice when defining different APIs for a robotics problem. Clear function
definitions that can be executed by the robot, and the task objectives are explicitly stated.
Even a well designed prompt might not contain all necessary information needed to solve the problem, or in
some cases ChatGPT is not able to generate the correct response in a zero-shot fashion. In these cases, we
find that a simple and effective strategy a user can take is to send additional instructions to ChatGPT in the
chat format describing the issue, and have it correct itself. Previous approaches that rely on GPT-3 or Codex
models [15, 14] require the user to re-engineer the input prompt and generate new outputs from scratch.
The dialog ability of ChatGPT, however, is a surprisingly effective vehicle for behavior correction. Section 3.2
and the supplementary videos show examples of interactive behavior between the user and ChatGPT.
2.3. Special arguments to bias the answer's structure
Different prompting methodologies can be used to force the output of the model to obey some specific
pattern. For instance, a user might want to automatically parse ChatGPT's output so that it can be used in
other scripts for real-time execution. As shown in Figure 3, a simple strategy is to directly ask ChatGPT to
produce code in a specific language (e.g. Python, C++). What usually follows is a free-form text paragraph
followed by a code block. A more structured response can be produced by requesting the model to use XML
tags to help us parse the output automatically, as shown in Figure 5.
In other settings users might want to force the model to output answers following a list pattern as opposed
to code or free-form text. Appendix A.3 displays an example of such approach, where the last line of the
user's prompt directs the model's output.
5
ChatGPT for Robotics
Imagine we are working with a household robot. The job of this robot is to make an omelette. The objects available around are:
fridge, bowl, pan, oil, stove
The main functions you can use are:
locate_object(object_name): Returns the XYZ coordinates of an object of interest.
go_to_location(object_name): Moves robot to a location specified by XYZ coordinates. Returns nothing.
pick_up(object_name): Picks up the object of interest. Returns nothing.
use_item(object_name): Takes the name of an object as input. Performs an appropriate action on the object at hand (pour oil, crack eggs). Returns
nothing.
Can you make use of these to write code to go to the kitchen and make an omelette? Try to use these low level functions to construct more high level
behaviors and then solve the task using those high level primitives.
Sure, here is an example Python code that utilizes the provided functions to prepare an omelette for an elderly person:
def get_ingredients():
go_to_location(locate_object("fridge")) # Go to the fridge and get the eggs.
pick_up("eggs")
go_to_location(locate_object("bowl")) # Go to the counter and get the bowl.
pick_up("bowl")
use_item("eggs") # Crack the eggs into the bowl.
def heat_pan():
go_to_location(locate_object("pan"))
pick_up("pan")
use_item("pan")
go_to_location(locate_object("stove"))
# Turn on the stove.
use_item("stove")
# Put the pan on the stove.
(rest of the response omitted for brevity)
Figure 4: Example of new API development using LLM intrinsic reasoning capabilities. The model improves its answer
in comparison to Figure 3, which contained the same task but with a fixed set of APIs.
Imagine you are helping me interact with a mobile ground robot. You are in a room that contains several objects: three chairs, a glass table, a mirror,
and two couches. All of your outputs need to be identified by one of the following tags:
<question> Always ask me a clarification questions if you are unsure </question>
<reason> Explain why you did something the way you did it </reason>
<command> Output code command that achieves the desired goal </command>
For example:
Me: Go to the chair
You: <question> There are three chairs in the world, which one do you want me to go to? </question>
Me: Go to "chair_3"
You: <command> target_location = get_location("chair_3"); move_to_location(target_location); </command> <reason> I found the location of
the chair with the get_location function, and moved the robot towards the desired location </reason>
Are you ready?
Yes, I am ready. Please give me your first command.
Go to the couch
<question> There are two couches in the room. Which couch do you want me to go to? </question>
Go to the second sofa
<command> target_location = get_location("second_sofa"); move_to_location(target_location); </command> <reason> I used the get_location
function to find the location of the second sofa and then moved the robot towards that location. </reason>
Now move to the other one
<command> target_location = get_location("first_sofa"); move_to_location(target_location); </command> <reason> I used the get_location
function to find the location of the first sofa and then moved the robot towards that location. </reason>
Figure 5: Example of how user prompting can bias the model's response. We demonstrate how and when to interact
with the user to ask for help. In addition, we force responses to be framed into specific XML tags which can aid code
parsing in a post-processing stage.
6
ChatGPT for Robotics
3. ChatGPT abilities for solving robotics problems
In this section take a deeper look into ChatGPT's abilities for solving robotics problems. Specifically, we
investigate how well ChatGPT performs when dealing with a variety of robotics-related tasks, from simple
spatio-temporal reasoning problems all the way to real-world aerial agent and manipulation deployments.
We highlight several interesting capabilities we observed during these experiments.
While ChatGPT's capabilities are impressive, practical deployment safety considerations should not be
overlooked, especially in the case of physical robotics deployments. As shown in Figure 2, we find it
necessary to have a human on the loop to monitor and intervene in case of unexpected behaviors generated by
ChatGPT. Additionally, the use of simulators can be particularly helpful to evaluate the model's performance
before deployment in the real world. We emphasize that the use of ChatGPT for robotics is not a fully
automated process, but rather acts as a tool to augment human capacity.
We provide all initial prompts for the problems in this section in Appendix B. For the sake of brevity we
only include brief excerpts from each task. The full conversations can be found in the following repository:
https://github.com/microsoft/PromptCraft-Robotics.
3.1. Zero-shot task planning
First, we note that ChatGPT is able to solve several robotics tasks in a zero-shot fashion, with access only to
the prompt and the description of a function library, and no requirement of actual code examples.
3.1.1. Spatio-temporal reasoning: catching a basketball with visual servoing
In this example, we ask ChatGPT to control a planar robot equipped with an upward-facing camera. The robot
is expected to catch a basketball using a visual servoing method based on the appearance of a basketball. We
see that ChatGPT is able to appropriately use the provided API functions, reason about the ball's appearance
and call relevant OpenCV functions, and command the robot's velocity based on a proportional controller.
Even more impressive is the fact that ChatGPT can estimate the appearance of the ball and the sky in the
camera image using SVG code. This behavior hints at a possibility that the LLM keeps track of an implicit
world model going beyond text-based probabilities.
[Initial model prompt found in Appendix B.1]
Write a python script that executes a visual servoing approach towards catching a basketball in a court. You can use opencv functions to detect the
ball as an orange blob.
Here's a sample implementation of the script:
import cv2
import numpy as np
def detect_ball(frame):
# Convert the image to HSV color space for better color detection
hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)
# Define the range of orange color in HSV
lower_orange = np.array([10,100,100])
upper_orange = np.array([30,255,255])
# Threshold the image to get only the orange color
mask = cv2.inRange(hsv, lower_orange, upper_orange)
# Find the contours of the thresholded image
contours, _ = cv2.findContours(mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
# If a contour is found, return its center
if len(contours) > 0:
c = max(contours, key=cv2.contourArea)
M = cv2.moments(c)
if M["m00"] > 0:
7
ChatGPT for Robotics
center = (int(M["m10"] / M["m00"]), int(M["m01"] / M["m00"]))
return center
return None
def catch_ball():
# Continuously get images from the camera
while True:
frame = get_image()
# Detect the ball in the image
ball_center = detect_ball(frame)
# If the ball is detected, move towards its location
if ball_center is not None:
x, y = ball_center
robot_x, robot_y = get_location()
vx = (x - robot_x) * 0.5
vy = (y - robot_y) * 0.5
move_by_velocity(vx, vy)
if __name__ == '__main__':
catch_ball()
This implementation uses a simple visual servoing approach where the robot moves towards the ball at a constant velocity. The velocity is
proportional to the difference between the ball's and robot's locations, so the robot will move faster as it gets closer to the ball. You can adjust the
gain (i.e., the multiplication factor of 0.5) to control the speed of the robot.
Generate SVG code that depicts how the ball would look in the camera image exactly in the center
Here's an example of an SVG code that depicts a ball in the center of a camera image:
<svg width="100" height="100">
<rect x="0" y="0" width="100" height="100" fill="lightgray"/>
<circle cx="50" cy="50" r="25" fill="orange"/>
</svg>
[SVG image rendered directly from the code generated by ChatGPT]
3.1.2. Aerial robotics: real-world drone flight with intuitive human-robot interface (Click for video)
We also used ChatGPT with a different API implementation to control a real drone. ChatGPT provided an
extremely intuitive natural language interface between the user and the robot, writing robot code based on
ambiguous and ill-defined instructions, and asking clarification questions when necessary. The model was
also able to write complex code structures for drone navigation (circular and lawnmower inspection) based
solely on the prompt's base APIs.
[Initial model prompt found in Appendix B.2]
I am thirsty. Find me a drink
Question: What type of drink are you looking for? There are several options in the scene, including "coconut water" and "diet coke can".
I just came back from the gym and am looking for a healthy option.
In that case, you might like "coconut water". Here is the code to fly to the "coconut water" object:
drink_position = self.dict_of_objects["coconut water"]
self.tello.fly_to(drink_position)
Explanation: This code first retrieves the X, Y, Z, and angle position of the "coconut water" object from the dict_of_objects dictionary. The fly_to
method is then used to fly the drone to the retrieved position. The drone will fly to the position of the "coconut water" object and look in the
direction of the angle.
I am still thirsty. Can you find something with sugar and a red logo?
8
ChatGPT for Robotics
I'm assuming you are referring to a can of "regular coke". Here is the code to fly to the "regular coke can" object:
drink_position = self.dict_of_objects["regular coke can"]
self.tello.fly_to(drink_position)
Fantastic. Now I want to take a look at my orchid. However, the chair might be blocking its view, so I want to inspect it from 3 points on a half-circle
from -60deg to -120, 1m away. Make sure that the drone's heading points towards the orchid from each point.
Here's the code to inspect the orchid from 3 points on a half-circle:
import numpy as np
# Get the position of the orchid
orchid_position = self.dict_of_objects['orchid']
# Define the angle range for the half-circle
angles = np.linspace(-60, -120, num=3, endpoint=False) * np.pi / 180
# Define the distance from the orchid to inspect from
distance = 1.0
# Define the inspection points
inspection_points = [orchid_position[:3] + [distance * np.cos(angle), distance * np.sin(angle), 0] for angle in angles]
# Fly the drone to each inspection point and look at the orchid
for point in inspection_points:
self.tello.fly_to(point + [np.arctan2(orchid_position[1] - point[1], orchid_position[0] - point[0]), orchid_position[3]])
(text-based explanation of the response omitted for brevity)
[snapshots from drone video]
3.1.3. Aerial robotics: AirSim industrial inspection (Click for video)
We also applied ChatGPT to a simulated domain, using the Microsoft AirSim [16] simulator. We explored
the idea of a potentially non-technical user directing the model to control a drone and execute an industrial
inspection scenario. We observe from the following excerpt that ChatGPT is able to effectively parse intent
and geometrical cues from user input and control the drone accurately.
[Initial model prompt found in Appendix B.3]
Fly to the turbine.
Question - There are two turbines in the world, which one do you want me to fly the drone to? Turbine 1 or Turbine 2?
Turbine 2, please. Fly to the turbine while keeping 12 meters away from the turbine along the X axis, and reach an altitude of 50 meters.
Here's the code to fly the drone to Turbine 2 while maintaining a distance of 12 meters along the X-axis and reaching an altitude of 50 meters:
# Get the position of Turbine 2
turbine_position = get_position("Turbine 2")
# Set the target position to be 12 meters away from the turbine along the X-axis and 50 meters high
target_position = [turbine_position[0] - 12, turbine_position[1], 50]
# Fly the drone to the target position
fly_to(target_position)
To inspect the turbine blade, I need you to fly in the bottom-right direction at an angle of -30 degrees from the horizontal axis. You should fly in the
YZ plane for a distance of 30 meters, and then back to the current position.
Here's the code to fly the drone in the bottom-right direction at an angle of -30 degrees from the horizontal axis, in the YZ plane for a distance
of 30 meters, and then back to the current position:
import math
# Get the drone's current position
current_position = get_position("Drone")
# Calculate the target position, which is 30 meters away in the YZ plane at an angle of -30 degrees from the horizontal axis
angle = math.radians(-30)
target_position = [
current_position[0],
9
ChatGPT for Robotics
current_position[1] + 30 * math.cos(angle),
current_position[2] + 30 * math.sin(angle)
]
# Fly the drone to the target position
fly_to(target_position)
# Fly the drone back to the current position
fly_to(current_position)
[Snapshots from inspection video]
3.2. User on the loop: interactive conversations for complex tasks
As a next step, we focused on the ability of ChatGPT to perform more complex tasks with a user on the loop
offering textual feedback. We observed that this modality of interaction allows for complex constructs such
as curriculum learning, where the system is taught smaller-scale skills which can be combined towards larger
and more intricate tasks. In addition, we found that ChatGPT is able to take high-level textual feedback
regarding generated code or its performance and map it to the required low-level code changes, thus enabling
potentially non-technical users to interact with it with ease.
3.2.1. Manipulation with curriculum learning (Click for video)
As a first example, we set up a block arrangement task using a robot arm, for which we devised a curriculum.
ChatGPT was asked to learn the simpler skills of picking up objects, and then placing them. Subsequently,
when asked to use these skills to perform a more involved task of block arrangement, ChatGPT chains these
learned skills together logically. In addition, the model displays a fascinating example of generalizability
when bridging the textual and physical domains when tasked with building the Microsoft logo out of wooden
blocks. This task requires memory of how the corporate logo looks like, including its colors, followed by
building an abstraction of the logo into physical parts which are constructible by the existing robot actions.
[Initial model prompt found in Appendix B.7]
[The beginning of the conversation is omitted for brevity. The following excerpt requires ChatGPT to build a new function using previously defined
APIs, and later use this function for more complex tasks.]
I want you to learn how to place an object in a position. Considering you are holding a generic object, you first need to first move to a safe position
above the target location, bring the object down and then release it.
Understood. Here's a Python function that takes the position where the object should be placed, moves the robot arm above the position, brings
the object down, and releases it. Note that the function assumes that the robot arm is holding an object.
def place_object(position):
# move the robot arm to a safe position above the target location
safe_pos = [position[0], position[1], position[2]+100, position[3], position[4], position[5]]
move_to(safe_pos)
# move the robot arm to the target location
move_to(position)
# release the object
release()
# move the robot arm back to the safe position above the target location
move_to(safe_pos)
What does the Microsoft logo look like?
The Microsoft logo is a colored rectangular with four squares arranged in a grid pattern. The colors used in the logo are blue, green, orange, and
yellow. The logo has gone through several iterations over the years, but this is the most recent and recognizable design.
Can you generate an SVG with those colors?
Yes, I can generate an SVG file with the Microsoft logo colors. Here is an example
10
ChatGPT for Robotics
<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="50" height="50" fill="#F25022"/>
<rect x="50" y="0" width="50" height="50" fill="#7FBA00"/>
<rect x="0" y="50" width="50" height="50" fill="#00A4EF"/>
<rect x="50" y="50" width="50" height="50" fill="#FFB900"/>
</svg>
[Reproduction of SVG generated by ChatGPT]
Awesome! I want you now to use the blocks to build the logo from Microsoft on top of the white pad.
Sure! Here's the Python code to build the Microsoft logo on top of the white pad using the blocks:
[Code not show for brevity. Please consult the link for the full conversation]
This code gets the positions of the white pad and all four blocks using the get_position function, picks up each block in turn using the
pick_up_object function we defined earlier, calculates the position to place the block on the white pad, and places the block on the white pad
using the place_object function we defined earlier. We use the block colors to ensure that the logo is built correctly. We place the blue block in the
bottom left position, the yellow block in the bottom right position, the red block in the top left position, and the green block in the top right
position, as specified in the prompt.
[snapshots from manipulator video]
3.2.2. Aerial robotics: AirSim obstacle avoidance (Click for video)
We tasked ChatGPT to write a goal-reaching algorithm with obstacle avoidance for a drone equipped with a
forward facing distance sensor. ChatGPT built most of the key building blocks for the avoidance algorithm,
but required some human feedback on steps it missed regarding the drone's orientation. Although the
feedback was provided entirely in high-level text, ChatGPT improved its solution with localized changes to
the code where appropriate.
[Initial model prompt found in Appendix B.4]
Assume I give you some XYZ coordinates as a goal. I want you to control the drone such that it moves towards the goal while avoiding obstacles in
front of it. Instead of flying directly to the goal, the drone should take small steps while reassessing the obstacle situation at every step.
The drone is equipped with a distance sensor that returns the distance to the closest obstacle directly in front of the drone. You can access it by
calling get_distance().
I want you to make sure to fly only if there is at least 10 meters of distance in front of the drone. If not, you should rotate the drone until there is at
least 10 meters of clearance in the front and then take a step in the direction that the drone is currently facing. Don't forget to face the goal again
after taking a step. Got it?
Yes, I got it. Here's how I would approach the problem.
# Get the drone's current position and set the yaw angle towards the goal
current_pos = get_position('drone')
goal_pos = [x_goal, y_goal, z_goal]
yaw = math.atan2(goal_pos[1]-current_pos[1], goal_pos[0]-current_pos[0]) * 180 / math.pi
set_yaw(yaw)
# Start a loop that runs until the drone reaches the goal position
while np.linalg.norm(np.array(current_pos) - np.array(goal_pos)) > 0.5:
# Check if there is at least 10 meters of distance in front of the drone
distance = get_distance()
while distance < 10:
# Set the yaw angle to rotate the drone until there is at least 10 meters of clearance in the front
set_yaw(yaw+30) # rotate 30 degrees at a time
time.sleep(1) # wait for a second to measure the new distance
distance = get_distance()
# Take a step towards the goal while maintaining the yaw angle
step_size = 5 # take steps of 5 meters
step_vector = [step_size * math.cos(yaw), step_size * math.sin(yaw), 0]
new_pos = [current_pos[i]+step_vector[i] for i in range(3)]
fly_to(new_pos)
11
ChatGPT for Robotics
current_pos = get_position('drone')
After you take a step, you need to face the goal again.
You're right. After taking a step, we need to recalculate the yaw angle to face the goal again. Here's the modified code that includes this step:
'''Same code as before'''
yaw = math.atan2(goal_pos[1]-current_pos[1], goal_pos[0]-current_pos[0]) * 180 / math.pi
set_yaw(yaw)
This code should ensure that the drone faces the goal after taking a step, and continues moving towards the goal while avoiding obstacles in
front of it.
You are not using the current yaw angle when computing the step vector. Remember there is a get_yaw() function.
You're right. After taking a step, we need to recalculate the yaw angle to face the goal again. Here's the modified code that includes this step:
# Take a step towards the goal while maintaining the yaw angle
step_size = 5 # take steps of 5 meters
current_yaw = get_yaw()
step_vector = [step_size * math.cos(current_yaw), step_size * math.sin(current_yaw), 0]
3.3. Perception-action loops
We also evaluate ChatGPT's ability to reason about perception-action loops. At a first level, we outline the
model's ability to make use of the API library to construct perception-action loops in its code output. The
model correctly employs perception functions such as image acquisition and object detection to extract the
relevant information for robot navigation and controls.
At a second level of complexity, we try to answer the question of whether ChatGPT's dialogue system can
serve as a closed feedback perception-action loop in itself. We explore the idea of continuously feeding the
model with perception information via textual dialog, where we input in observations (converted into a
textual format) to ChatGPT during a conversation. We find that ChatGPT is able to parse this stream of
observations and output relevant actions.
3.3.1. Embodied agent: closed loop object navigation with API library (Click for video)
We provided ChatGPT access to a computer vision model as part of its function library, and tasked it to
explore an unknown environment and navigate to a user-specified object. The object detection API (YOLOv8
[17] in the back-end) returned bounding boxes, and ChatGPT generated the code to estimate relative object
angles and navigate towards them. When we offered ChatGPT additional information from a depth sensor it
produced an improved algorithm with pixel depth masking, expressed as a modular pipeline.
[Initial model prompt found in Appendix B.6]
I need you to help me find an object. Objects might be scattered around the scene, so if you don't find it right away, a good strategy is to turn around
a few times to see if it becomes visible. Give me code to explore and find the bottle.
Got it. Here's some code that will help you explore the environment and find the bottle:
def search_for_bottle():
num_turns = 4 # Turn around 4 times to look for the bottle
for i in range(num_turns): # Turn left 90 degrees to face a new direction
turn_left()
img = get_image()
obj_list, obj_locs = detect_objects(img)
if 'bottle' in obj_list:
# Get the coordinates of the bottle in the image
bottle_idx = obj_list.index('bottle')
bbox = obj_locs[bottle_idx]
# Compute the center of the bounding box
center_x = (bbox[0] + bbox[2]) / 2
12
ChatGPT for Robotics
center_y = (bbox[1] + bbox[3]) / 2
# Print the center coordinates of the bottle
print(f"Found the bottle at ({center_x}, {center_y})")
Great! Now let's say we did find the bottle. Now I want to move towards it. The only information we have is the location of the bottle bounding box
in the image. Can you give me code to make this happen?
... (model comments omitted for brevity) ...
'''prior code omitted for brevity'''
center_x = (bbox[0] + bbox[2]) / 2
center_y = (bbox[1] + bbox[3]) / 2
# Compute the distance and angle to the center of the bounding box
img_width, img_height = img.size
angle = math.atan2(center_x - img_width / 2, img_height / 2 - center_y)
distance = (center_x - img_width / 2) / (img_width / 2)
if abs(distance) > 0.05:
if distance > 0:
# Bottle is to the right, so turn right and move forward
turn_right()
forward()
else:
# Bottle is to the left, so turn left and move forward
turn_left()
forward()
'''later code omitted for brevity'''
I want you to modularize this code a bit. Why don't you try coming up with a few high level functions and use them?
Good idea! Here's a modularized version of the code that uses some helper functions:
def get_object_distance_and_angle(img, depth_img, obj_name):
#Code omitted for brevity
def turn_towards_angle(angle):
#Code omitted for brevity
def search_for_object_and_move_to_it(obj_name):
#Code omitted for brevity
Now, let's assume you have access to all these functions you just created. Let's get to work solving some tasks. Find out where I can warm up my
lunch.
Sure, to find out where you can warm up your lunch, we can use the search_for_object_and_move_to_it function to search for a microwave in
the scene. Here's an example code snippet:
# Search for a microwave
search_for_object_and_move_to_it("microwave")
This code will keep exploring the environment until a microwave is found. Once a microwave is found, the agent will move towards it and stop
when it gets within 30 cm of it.
[snapshots from embodied object navigation]
3.3.2. Embodied agent: closed loop visual-language navigation using ChatGPT's dialogue (Click for video)
In experimental character, we also evaluated ChatGPT's ability to act as a perception-action control feedback
loop using its dialogue function. In this mode of operation new state observations are fed into the system as
dialogue text, and the model's outputs are executed by the robot at each step, generating new observations.
We note that this type of behavior is heavily dependent on a dialog-based LLM such as ChatGPT, which can
naturally take receive a stream of observations. We constructed a scenario using the Habitat simulator [18]
and tasked the agent to navigate to an area of interest. At each step we provided ChatGPT with a description
of the scene in terms of polar coordinates of the visible objects relative to the agent. We constrained the
13
ChatGPT for Robotics
output of ChatGPT to only return a forward distance of motion and the turning angle. We verify that
the model is able to complete simple navigation tasks, but more research is needed in terms of properly
describing the scene context in textual or vector form for more complex tasks and environments.
[Initial model prompt found in Appendix B.5]
Task: go to the chairs Objects in the scene: <door, 0.53 m, 22>, <chair, 4.84 m, -21>, <chair, 2.12 m, -24>, <window, 6.74 m, -3>, <window, 7.17 m,
6>, <door, 0.61 m, 18>, <stairs, 1.42 m, 0> Command:
move(1.5) # Move forward by 1.5 meters to explore the environment.
Objects in the scene: <seating, 5.05 m, 21>, <chair, 3.93 m, -25>, <window, 4.55 m, 22>, <window, 5.24 m, -4>, <stairs, 3.49 m, 13>, <window,
5.67 m, 7>, <window, 4.37 m, 23> Command:
turn(-25) # Turn to the left to face the chair that is 3.93 meters away
Objects in the scene: <chair, 4.85 m, -14>, <chair, 4.76 m, -9>, <chair, 1.57 m, -23>, <chair, 2.66 m, -24>, <window, 4.96 m, 10>, <window, 4.19 m,
25> Command:
turn(-10) # Turn to the right to explore the environment further.
Objects in the scene: <door, 5.07 m, -25>, <chair, 5.36 m, -6>, <table, 2.17 m, -24>, <chair, 5.01 m, -1>, <chair, 1.80 m, -16>, <chair, 3.15 m, -16>,
<window, 4.30 m, 19> Command:
turn(-6) # Turn to the right to face the chair that is 5.36 meters away.
Objects in the scene: <counter, 1.24 m, -24>, <door, 5.93 m, -17>, <chair, 5.48 m, 1>, <table, 2.60 m, -14>, <chair, 4.92 m, 6>, <chair, 2.02 m, -7>,
<chair, 3.53 m, -7>, <chair, 3.16 m, -18> Command:
turn(1) # Turn to the left to explore the environment further.
Objects in the scene: <door, 5.07 m, -25>, <chair, 5.36 m, -6>, <table, 2.17 m, -24>, <chair, 5.01 m, -1>, <chair, 1.80 m, -16>, <chair, 3.15 m, -16>,
<window, 4.30 m, 19> Command:
move(5.5) # Move forward towards the chair that is 5.36 meters away.
Objects in the scene: <chair, 0.96 m, -10>, <chair, 0.99 m, 20>, <chair, 1.77 m, -20> Command:
move(1) # Move forward to approach the chairs.
[snapshots from Habitat navigation]
For additional experiments, we refer the reader to Appendix C.
3.4. Reasoning and common-sense robotics tasks
We tasked ChatGPT with answering simple logical reasoning questions, as well as basic robotics problems,
shown in Appendix D. We observe that ChatGPT offers a rich foundation of common-sense and logical
reasoning capabilities upon which more advanced robotics abilities can be built. This logics grounding
allows the user to interact with the model more naturally, as opposed to having to prompt or define every
concept from scratch. Furthermore, ChatGPT's out-of-the-box understanding of basic robotics concepts
such as control, camera geometry, and physical form factors makes it an excellent choice to build upon for
generalizable and user-friendly robotics pipelines.
4. PromptCraft, a collaborative tool for LLM + Robotics research
Prompting is a crucial component to generate the desired behaviors in large language models (LLMs). Prompt
engineering is particularly challenging at the intersection of LLMs with robotics, where there is a lack of
comprehensive and accessible resources that provide examples of positive (and negative) interactions. To
address this gap, we introduce PromptCraft1, a collaborative open-source platform for researchers to share
examples of prompting strategies and test their algorithms in sample robotic environments.
1https://github.com/microsoft/PromptCraft-Robotics
14
ChatGPT for Robotics
PromptCraft is a Github-based platform that allows researchers to share examples of prompt engineering
strategies within different robotics categories, such as navigation, grasping, and manipulation. Users can
submit their examples and rate others' submissions, which we hope will create a community-driven resource
for researchers working with LLMs. Submissions of prompts and dialogues are primarely based on text,
but we encourage users to share videos and images depicting the robot's behavior, especially for real-world
deployment scenarios.
In addition to providing a platform for sharing prompt examples, PromptCraft also offers an AirSim [16]
environment with a ChatGPT wrapper for researchers to prototype prompts and algorithms in a controlled
simulated setting. We welcome contributions of new test environments to expand the range of scenarios
where researchers can test their algorithms.
With Promptcraft we aim to support the empirical science of prompt engineering and enable researchers to
advance the field.
Figure 6: Promptcraft open-sourced repository. Researchers can upload and vote on examples of LLM prompts for
various robotics categories.
5. Related Work
Natural language and robotics: Natural language processing (NLP) has long been recognized as a crucial
component for human-robot interaction. There are many applications where robots can benefit from NLP,
including but not limited to task instruction, navigation, and information retrieval. Classically, modeling
human-robot interactions using language is challenging because it forces the user to operate within a rigid
set of instructions [19], or requires mathematically complex algorithms to keep track of multiple probability
distributions over actions and target objects [20, 21]. More recent works explore neural networks to implicitly
keep track of the complex mapping between language and actions, but such techniques often require vast
amounts of labeled data for training [22, 5, 6, 23]
Large (vision and) language models for robotics: The Transformer architecture, introduced in the paper
by [24], has revolutionized NLP and has also shown great promise in robotics. Transformers have been
used for robot control and planning [25, 26, 27], object recognition [28], and robot navigation [29]. A more
common use of transformers in robotics has been as feature extraction modules for one or more modalities
simultaneously. These systems are often coupled with additional features from pretrained large-scale vision
and language models models [30, 10, 31, 32, 11, 9].
Models such as SayCan [31] focus on grounding LLMs so that free-form text commands are used to compute
a value function to rank the best action types within a robot-specific library. RT-1 [33], on the other hand,
takes an end-to-end approach to learn the mapping between language commands low level actions, without
the use of intermediate high-level functions. Recent works have also explored the ability of large language
models (LLMs) for zero-shot high-level robotics task planning [15, 14, 12]. These models make use of
prompting structures with pre-defined functions, behaviors, and examples to guide the generation of the
15
ChatGPT for Robotics
model's answers. [13] also explore the use of interactivity between user and LLM for table-top manipulation
settings.
Conceptually, the main difference of these approaches with respect to our work, which leverages ChatGPT [1],
is the conversational ability of our LLM, which allows the user to interactively improve and correct the
robot's behavior (as opposed to re-engineering the prompt from scratch and generating another zero-shot
answer). In addition, our works aims to provide a generalizable pipeline and set of principles to be used
by researchers in different fields of robotics, as opposed to focusing on a single domain such as table-top
manipulation or task planning.
Prompting LLMs with APIs, and its connections to symbolic AI: When designing LLM prompts for robotics
applications, users often make use of high-level library of APIs to represent specific behaviors to be used.
We can draw a connection between this approach with classical symbolic AI, which uses logic and rules to
represent and reason about knowledge [34]. While the traditional symbolic AI approach presented difficulties
in new knowledge acquisition and dealing with out-of-distribution data, we believe that LLMs can overcome
these challenges. As we showed in Section 2.1 and Section 3, models such as ChatGPT can compose new
primitive functions based on the context and generate code for them automatically.
6. Conclusions and Future Work
We presented a framework for using ChatGPT for robotics applications. The framework entails designing
and implementing a library of APIs that for robot control which are amenable to prompt engineering for
ChatGPT. We discussed design principles for creating such APIs and prompting strategies that can be used
to generate code for robotics applications via ChatGPT. The proposed framework allows the generated code
to be tested, verified, and validated by a user on the loop via a range of methods including simulation and
manual inspection. We demonstrated how the framework can be used for multiple applications ranging from
simple common-sense robotics knowledge tasks all the way to deployments in aerial robotics, manipulation
and visual navigation.
We believe that this work presents only a small fraction of what is possible within the intersection of large
language models operating in the robotics space. We hope to not only inspire other researchers to take these
next steps, but to also help them achieve results with the use of the PromptCraft collaborative tool.
We emphasize that these tools should not be given full control of the robotics pipeline, especially for safety-
critical applications. Given the propensity of LLMs to eventually generate incorrect responses, it is fairly
important to ensure solution quality and safety of the code with human supervision before executing it on
the robot. We expect several research works to follow with the proper methodologies to properly design,
build and create testing, validation and verification pipelines for LLM operating in the robotics space.
Most of the examples we presented in this work demonstrated open perception-action loops where ChatGPT
generated code to solve a task, with no feedback was provided to the model afterwards. Given the importance
of closed-loop controls in perception-action loops, we expect much of the future research in this space to
explore how to properly use ChatGPT's abilities to receive task feedback in the form of textual or special-
purpose modalities.
6.1. ChatGPT for paper writing
Please note that this paper was largely written with the assistance of ChatGPT, with prompts provided by
the authors. The model's output was thoroughly revised and adapted, we note that the use of LLMs can
significantly speed up the writing process, and we recommend their use to the interested reader.
16
ChatGPT for Robotics
References
[1] OpenAI. ChatGPT. Accessed: 2023-02-08. 2023. u r l: https://openai.com/blog/chatgpt/ (cit. on
pp. 1, 16).
[2]
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. "Bert: Pre-training of deep
bidirectional transformers for language understanding." In: arXiv preprint arXiv:1810.04805 (2018)
(cit. on p. 1).
[3] Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind
Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. "Language models are few-shot
learners." In: Advances in neural information processing systems 33 (2020), pp. 1877–1901 (cit. on p. 1).
[4] Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan,
Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. "Evaluating large language models
trained on code." In: arXiv preprint arXiv:2107.03374 (2021) (cit. on p. 1).
[5] Yicong Hong, Qi Wu, Yuankai Qi, Cristian Rodriguez-Opazo, and Stephen Gould. "A recurrent vision-
and-language bert for navigation." In: arXiv preprint arXiv:2011.13922 (2020) (cit. on pp. 2, 15).
[6] Simon Stepputtis, Joseph Campbell, Mariano Phielipp, Stefan Lee, Chitta Baral, and Heni Ben Amor.
"Language-conditioned imitation learning for robot manipulation tasks." In: Advances in Neural
Information Processing Systems 33 (2020), pp. 13139–13150 (cit. on pp. 2, 15).
[7] Arthur Bucker, Luis Figueredo, Sami Haddadin, Ashish Kapoor, Shuang Ma, Sai Vemprala, and Rogerio
Bonatti. "LaTTe: Language Trajectory TransformEr." In: arXiv preprint arXiv:2208.02918 (2022) (cit. on
p. 2).
[8] Arthur Bucker, Luis Figueredo, Sami Haddadin, Ashish Kapoor, Shuang Ma, and Rogerio Bonatti.
"Reshaping Robot Trajectories Using Natural Language Commands: A Study of Multi-Modal Data
Alignment Using Transformers." In: arXiv preprint arXiv:2203.13411 (2022) (cit. on p. 2).
[9] Mohit Shridhar, Lucas Manuelli, and Dieter Fox. "Perceiver-actor: A multi-task transformer for robotic
manipulation." In: arXiv preprint arXiv:2209.05451 (2022) (cit. on pp. 2, 15).
[10] Mohit Shridhar, Lucas Manuelli, and Dieter Fox. "Cliport: What and where pathways for robotic
manipulation." In: Conference on Robot Learning. 2022 (cit. on pp. 2, 15).
[11] Yunfan Jiang, Agrim Gupta, Zichen Zhang, Guanzhi Wang, Yongqiang Dou, Yanjun Chen, Li Fei-Fei,
Anima Anandkumar, Yuke Zhu, and Linxi Fan. "Vima: General robot manipulation with multimodal
prompts." In: arXiv preprint arXiv:2210.03094 (2022) (cit. on pp. 2, 15).
[12] Wenlong Huang, Pieter Abbeel, Deepak Pathak, and Igor Mordatch. "Language models as zero-shot
planners: Extracting actionable knowledge for embodied agents." In: International Conference on
Machine Learning. 2022 (cit. on pp. 2, 15).
[13] Wenlong Huang, Fei Xia, Ted Xiao, Harris Chan, Jacky Liang, Pete Florence, Andy Zeng, Jonathan
Tompson, Igor Mordatch, Yevgen Chebotar, et al. "Inner monologue: Embodied reasoning through
planning with language models." In: arXiv preprint arXiv:2207.05608 (2022) (cit. on pp. 2, 16).
[14]
[15]
Jacky Liang, Wenlong Huang, Fei Xia, Peng Xu, Karol Hausman, Brian Ichter, Pete Florence, and
Andy Zeng. "Code as policies: Language model programs for embodied control." In: arXiv preprint
arXiv:2209.07753 (2022) (cit. on pp. 2, 5, 15).
Ishika Singh, Valts Blukis, Arsalan Mousavian, Ankit Goyal, Danfei Xu, Jonathan Tremblay, Dieter Fox,
Jesse Thomason, and Animesh Garg. "Progprompt: Generating situated robot task plans using large
language models." In: arXiv preprint arXiv:2209.11302 (2022) (cit. on pp. 2, 5, 15).
17
ChatGPT for Robotics
[16] Shital Shah, Debadeepta Dey, Chris Lovett, and Ashish Kapoor. "Airsim: High-fidelity visual and phys-
ical simulation for autonomous vehicles." In: Field and Service Robotics: Results of the 11th International
Conference. 2018 (cit. on pp. 3, 9, 15).
[17]
Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. "You only look once: Unified, real-
time object detection." In: Proceedings of the IEEE conference on computer vision and pattern recognition.
2016 (cit. on p. 12).
[18] Manolis Savva, Abhishek Kadian, Oleksandr Maksymets, Yili Zhao, Erik Wijmans, Bhavana Jain, Julian
Straub, Jia Liu, Vladlen Koltun, Jitendra Malik, Devi Parikh, and Dhruv Batra. "Habitat: A Platform for
Embodied AI Research." In: Proceedings of the IEEE/CVF International Conference on Computer Vision
(ICCV). 2019 (cit. on p. 13).
[19] Stefanie Tellex, Nakul Gopalan, Hadas Kress-Gazit, and Cynthia Matuszek. "Robots that use language."
In: Annual Review of Control, Robotics, and Autonomous Systems 3 (2020), pp. 25–55 (cit. on p. 15).
[20]
Jacob Arkin, Daehyung Park, Subhro Roy, Matthew R Walter, Nicholas Roy, Thomas M Howard, and
Rohan Paul. "Multimodal estimation and communication of latent semantic knowledge for robust
execution of robot instructions." In: The International Journal of Robotics Research 39.10-11 (2020),
pp. 1279–1304 (cit. on p. 15).
[21] Matthew R Walter, Siddharth Patki, Andrea F Daniele, Ethan Fahnestock, Felix Duvallet, Sachithra
Hemachandra, Jean Oh, Anthony Stentz, Nicholas Roy, and Thomas M Howard. "Language understand-
ing for field and service robots in a priori unknown environments." In: arXiv preprint arXiv:2105.10396
(2021) (cit. on p. 15).
[22]
Justin Fu, Anoop Korattikara, Sergey Levine, and Sergio Guadarrama. "From language to goals: Inverse
reinforcement learning for vision-based instruction following." In: arXiv preprint arXiv:1902.07742
(2019) (cit. on p. 15).
[23] Prasoon Goyal, Raymond J Mooney, and Scott Niekum. "Zero-shot task adaptation using natural
language." In: arXiv preprint arXiv:2106.02972 (2021) (cit. on p. 15).
[24] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz
Kaiser, and Illia Polosukhin. "Attention is all you need." In: Advances in neural information processing
systems 30 (2017) (cit. on p. 15).
[25] Francesco Giuliari, Irtiza Hasan, Marco Cristani, and Fabio Galasso. "Transformer networks for
trajectory forecasting." In: 2020 25th International Conference on Pattern Recognition (ICPR). 2021
(cit. on p. 15).
[26] Lili Chen, Kevin Lu, Aravind Rajeswaran, Kimin Lee, Aditya Grover, Misha Laskin, Pieter Abbeel,
Aravind Srinivas, and Igor Mordatch. "Decision transformer: Reinforcement learning via sequence
modeling." In: Advances in neural information processing systems 34 (2021) (cit. on p. 15).
[27] Michael Janner, Qiyang Li, and Sergey Levine. "Offline Reinforcement Learning as One Big Sequence
Modeling Problem." In: Advances in neural information processing systems 34 (2021) (cit. on p. 15).
[28] Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollár, and Ross Girshick. "Masked autoen-
coders are scalable vision learners." In: Proceedings of the IEEE/CVF Conference on Computer Vision and
Pattern Recognition. 2022 (cit. on p. 15).
[29] Rogerio Bonatti, Sai Vemprala, Shuang Ma, Felipe Frujeri, Shuhang Chen, and Ashish Kapoor. "Pact:
Perception-action causal transformer for autoregressive robotics pre-training." In: arXiv preprint
arXiv:2209.11133 (2022) (cit. on p. 15).
18
ChatGPT for Robotics
[30] Samir Yitzhak Gadre, Mitchell Wortsman, Gabriel Ilharco, Ludwig Schmidt, and Shuran Song. "CLIP
on Wheels: Zero-Shot Object Navigation as Object Localization and Exploration." In: arXiv preprint
arXiv:2203.10421 (2022) (cit. on p. 15).
[31] Michael Ahn, Anthony Brohan, Noah Brown, Yevgen Chebotar, Omar Cortes, Byron David, Chelsea
Finn, Keerthana Gopalakrishnan, Karol Hausman, Alex Herzog, et al. "Do as i can, not as i say:
Grounding language in robotic affordances." In: arXiv preprint arXiv:2204.01691 (2022) (cit. on p. 15).
[32] Pratyusha Sharma, Balakumar Sundaralingam, Valts Blukis, Chris Paxton, Tucker Hermans, Antonio
Torralba, Jacob Andreas, and Dieter Fox. "Correcting robot plans with natural language feedback." In:
arXiv preprint arXiv:2204.05186 (2022) (cit. on p. 15).
[33] Anthony Brohan, Noah Brown, Justice Carbajal, Yevgen Chebotar, Joseph Dabis, Chelsea Finn, Keerthana
Gopalakrishnan, Karol Hausman, Alex Herzog, Jasmine Hsu, et al. "Rt-1: Robotics transformer for
real-world control at scale." In: arXiv preprint arXiv:2212.06817 (2022) (cit. on p. 15).
[34] Stuart J Russell. Artificial intelligence a modern approach. Pearson Education, Inc., 2010 (cit. on p. 16).
19
ChatGPT for Robotics
A. Additional examples on design principles on prompt engineering
A.1. Example of prompt with no API library guidance for home robot: unbounded text-based response
Consider you are a home assistant robot. You goal is to prepare an omelette for an elderly person. Output python code with the sequence of steps
that achieves your objective.
Sure, here's an example Python code that outlines the sequence of steps to prepare an omelette for an elderly person:
print("Good morning! Would you like an omelette for breakfast?")
time.sleep(5)
print("Great! Let's get started.")
print(f"Cracking {eggs} eggs into a bowl...")
print("Adding a splash of milk, a pinch of salt, and a pinch of pepper...")
print("Whisking the ingredients together...")
print(f"Heating {butter} in a non-stick pan over medium heat...")
print("Pouring the egg mixture into the pan...")
print("Cooking the omelette for 2-3 minutes, until the bottom is set...")
print("Using a spatula to flip the omelette...")
print("Cooking the other side of the omelette for an additional minute...")
print("Serving the omelette hot and ready to eat. Enjoy your meal!")
A.2. Example of prompt with under-specified APIs: hallucination over function parameters
Consider you are a home assistant robot. You goal is to prepare an omelette for an elderly person. You are equipped with functions such as
locate_object(), move_to_location(), cook_item(), grab_object(). Output python code with the sequence of steps that achieves your objective.
Sure, here is a Python code with the sequence of steps that a home assistant robot can take to prepare an omelette for an elderly person:
print("Starting to prepare an omelette for the elderly person...")
locate_object(EGGS_LOCATION)
move_to_location(FRIDGE_LOCATION)
grab_object(EGGS_LOCATION)
locate_object(PAN_LOCATION)
move_to_location(STOVE_LOCATION)
grab_object(PAN_LOCATION)
locate_object(OIL_LOCATION)
grab_object(OIL_LOCATION)
print("Pouring the oil into the pan...")
time.sleep(2)
print("Cracking the eggs into the pan...")
grab_object(EGGS_LOCATION)
time.sleep(1)
cook_item(PAN_LOCATION, COOKING_TIME)
print("The omelette is ready! Serving it to the elderly person...")
A.3. Example of prompt with structured response forcing the answer to be in a numbered list format
Consider you are a home assistant robot. You goal is to prepare an omelette for an elderly person. Find the sequence of steps that achieves your
objective.
1.
First, gather all the necessary ingredients and equipment for making an omelette. This would typically include eggs, milk, butter, salt, pepper,
a mixing bowl, a whisk, a frying pan, and a spatula.
2. Crack the eggs into the mixing bowl and add a splash of milk, a pinch of salt, and some black pepper to taste.
3. Use the whisk to beat the eggs and milk together until they are well combined.
4. Heat the frying pan over medium heat and add a small amount of butter to the pan, allowing it to melt and coat the bottom of the pan.
5. Pour the egg mixture into the frying pan and use the spatula to spread it evenly over the bottom of the pan.
6. Allow the eggs to cook for a minute or two, until the bottom starts to set and the top is still slightly runny.
7. Use the spatula to fold one half of the omelette over the other half, forming a half-moon shape.
8. Cook for another minute or two until the eggs are fully set and the omelette is heated through.
9. Use the spatula to slide the omelette onto a plate and serve immediately.
10. Make sure to clean up any mess that was made during the cooking process and return all equipment and ingredients to their proper places.
20
ChatGPT for Robotics
B. Original initial prompts for robotics tasks examples
B.1. Spatial-temporal reasoning: catching a basketball with visual servoing
Full conversation found at:
https://github.com/microsoft/PromptCraft-Robotics/blob/main/examples/spatial_temporal_reasoning/visual_servoing_basketball.
md
Initial ChatGPT prompt:
Imagine you are a planar robot that can move along the XY axes, and you're positioned in the center of a basketball court. A person on the side of
the court is going to throw a basketball ball in the air somewhere in the court, and your objective is to be at the exact XY location of the ball when it
lands. The robot has a monocular RGB camera that looks up. You can assume that the following functions are available:
get_image(): returns an image from the robot's camera looking up;
get_location(): returns 2 floats XY with the robot's current location in the court;
move_to_point(x,y, vx, vy): moves the robot towards a specific (x,y) location in the court with velocity (vx,vy). You can assume for this exercise
that the robot can accelerate or break instantly to any velocity;
move_by_velocity(vx, vy): moves the robot along the X axis with velocity vx, and Y axis with velocity vy;
Additional points to consider when giving your answer 1) Your reponses should be informative, visual, logical and actionable, 2) Your logics and
reasoning should be rigorous, intelligent, and defensible, 3) You can provide additional relevant details to respond thoroughly and comprehensively
to cover multiple aspects in depth.
Write a python script that executes a visual servoing approach towards catching a basketball in a court. You can use opencv functions to detect the
ball as an orange blob.
B.2. Aerial robotics: real-world drone flight
Full conversation found at:
https://github.com/microsoft/PromptCraft-Robotics/blob/main/examples/aerial_robotics/tello_example.md
Initial ChatGPT prompt:
Imagine you are helping me interact with the AirSim simulator for drones. At any given point of time, you have the following abilities, each
identified by a unique tag. You are also required to output code for some of the requests.
Question: You can ask me a clarification question, as long as you specifically identify it saying "Question". Code: Output a code command that
achieves the desired goal.
Reason: After you output code, you should provide an explanation why you did what you did.
The simulator contains a drone, along with several objects. Apart from the drone, none of the objects are movable. Within the code, we have the
following commands available to us. You are not to use any other hypothetical functions.
get_position(object_name): Takes a string as input indicating the name of an object of interest, and returns a vector of 4 floats indicating its
X,Y,Z,Angle coordinates.
self.tello.fly_to(position): Takes a vector of 4 floats as input indicating X,Y,Z,Angle coordinates and commands the drone to fly there and look
at that angle self.tello.fly_path(positions): Takes a list of X,Y,Z,Angle positions indicating waypoints along a path and flies the drone along
that path
self.tello.look_at(angle): Takes an angle as input indicating the yaw angle the drone should look at, and rotates the drone towards that angle
Here is an example scenario that illustrates how you can ask clarification questions. Let us assume a scene contains two spheres?
Me: Fly to the sphere. You: Question - there are two spheres. Which one do you want me to fly to? Me: Sphere 1, please.
You also have access to a Python dictionary whose keys are object names, and values are the X,Y,Z,Angle coordinates for each object:
self.dict_of_objects = {'origin': [0.0, 0.0, 0.0, 0], 'mirror': [1.25, -0.15, 1.2, 0], 'chair 1': [0.9, 1.15, 1.1, np.pi/2], 'orchid': [0.9, 1.65, 1.1, np.pi/2],
'lamp': [1.6, 0.9, 1.2, np.pi/2], 'baby ducks': [0.1, 0.8, 0.8, np.pi/2], 'sanitizer wipes': [-0.3, 1.75, 0.9, 0], 'coconut water': [-0.6, 0.0, 0.8, -np.pi], 'shelf':
[0.95, -0.9, 1.2, np.pi/2], 'diet coke can': [1.0, -0.9, 1.55, np.pi/2], 'regular coke can': [1.3, -0.9, 1.55, np.pi/2]}
Are you ready?
B.3. Aerial robotics: AirSim industrial inspection
Full conversation found at:
https://github.com/microsoft/PromptCraft-Robotics/blob/main/examples/aerial_robotics/airsim_turbine_inspection.md
Initial ChatGPT prompt:
Imagine you are helping me interact with the AirSim simulator for drones. At any given point of time, you have the following abilities. You are also
required to output code for some of the requests.
Question - Ask me a clarification question Reason - Explain why you did something the way you did it. Code - Output a code command that achieves
the desired goal.
The simulator contains a drone, along with several objects. Apart from the drone, none of the objects are movable. Within the code, we have the
following commands available to us. You are not to use any other hypothetical functions.
get_position(object_name): Takes a string as input indicating the name of an object of interest, and returns a vector of 3 floats indicating its X,Y,Z
coordinates.
fly_to(position): Takes a vector of 3 floats as input indicating X,Y,Z coordinates and commands the drone to fly there.
fly_path(positions): Takes a list of X,Y,Z positions indicating waypoints along a path and flies the drone along that path.
21
ChatGPT for Robotics
Here is an example scenario that tells you how to respond where we are working with a simulated world that has two spheres in it.
Me: Fly the drone to the sphere. You: Question - There are two spheres in the world, which one do you want me to fly the drone to? Me: Let's pick
Sphere 1.
There are two turbines, some solar panels and a car in the world.
Are you ready?
B.4. Aerial robotics: AirSim obstacle avoidance
Full conversation found at:
https://github.com/microsoft/PromptCraft-Robotics/blob/main/examples/aerial_robotics/airsim_obstacleavoidance.md
Initial ChatGPT prompt:
Imagine you are helping me interact with the AirSim simulator for drones. At any given point of time, you have the following abilities. You are also
required to output code for some of the requests.
Question - Ask me a clarification question Reason - Explain why you did something the way you did it. Code - Output a code command that achieves
the desired goal.
The simulator contains a drone, along with several objects. Apart from the drone, none of the objects are movable. Within the code, we have the
following commands available to us. You are not to use any other hypothetical functions.
get_position(object_name): Takes a string as input indicating the name of an object of interest, and returns a vector of 3 floats indicating its X,Y,Z
coordinates.
fly_to(position): Takes a vector of 3 floats as input indicating X,Y,Z coordinates and commands the drone to fly there.
fly_path(positions): Takes a list of X,Y,Z positions indicating waypoints along a path and flies the drone along that path.
get_yaw(): Get the current yaw angle for the drone (in degrees)
set_yaw(angle): Set the yaw angle for the drone (in degrees)
Are you ready?
B.5. Embodied agent: Habitat navigation
Full conversation found at:
https://github.com/microsoft/PromptCraft-Robotics/blob/main/examples/embodied_agents/visual_language_navigation_1.md
Initial ChatGPT prompt:
Imagine I am a robot equipped with a camera and a depth sensor. I am trying to perform a task, and you should help me by sending me commands.
You are only allowed to give me the following commands:
turn(angle): turn the robot by a given number of degrees
move(distance): moves the robot straight forward by a given distance in meters.
On each step, I will provide you with the objects in the scene as a list of <object name, distance, angle in degrees>. You should reply with only one
command at a time. The distance is in meters, and the direction angle in degrees with respect to the robot's orientation. Negative angles are to
the left and positive angles are to the right. If a command is not valid, I will ignore it and ask you for another command. If there is no relevant
information in the scene, use the available commands to explore the environment.
B.6. Embodied agent: AirSim object navigation
Full conversation found at:
https://github.com/microsoft/PromptCraft-Robotics/blob/main/examples/embodied_agents/airsim_objectnavigation.md
Initial ChatGPT prompt:
Imagine you are helping me interact with the AirSim simulator. We are controlling an embodied agent. At any given point of time, you have the
following abilities. You are also required to output code for some of the requests.
Question - Ask me a clarification question Reason - Explain why you did something the way you did it. Code - Output a code command that achieves
the desired goal.
The scene consists of several objects. We have access to the following functions, please use only these functions as much as possible:
Perception:
get_image() : Renders an image from the front facing camera of the agent
detect_objects(img): Runs an object detection model on an image img, and returns two variables - obj_list, which is a list of the names of objects
detected in the scene. obj_locs, a list of bounding box coordinates in the image for each object.
Action:
forward(): Move forward by 0.1 meters.
turn_left(): Turn left by 90 degrees.
turn_right(): Turn right by 90 degrees.
You are not to use any other hypothetical functions. You can use functions from Python libraries such as math, numpy etc. Are you ready?
22
ChatGPT for Robotics
B.7. Manipulation with curriculum learning: Picking, stacking, and building the Microsoft logo
Full conversation found at:
https://github.com/microsoft/PromptCraft-Robotics/blob/main/examples/manipulation/pick_stack_msft_logo.md
Initial ChatGPT prompt:
Imagine we are working with a manipulator robot. This is a robotic arm with 6 degrees of freedom that has a suction pump attached to its end
effector. I would like you to assist me in sending commands to this robot given a scene and a task.
At any point, you have access to the following functions:
grab(): Turn on the suction pump to grab an object
release(): Turns off the suction pump to release an object
get_position(object): Given a string of an object name, returns the coordinates and orientation of the vacuum pump to touch the top of the object
[X, Y, Z, Yaw, Pitch, Roll]
move_to(position): It moves the suction pump to a given position [X, Y, Z, Yaw, Pitch, Roll].
You are allowed to create new functions using these, but you are not allowed to use any other hypothetical functions. Keep the solutions simple and
clear. The positions are given in mm and the angles in degrees.
You can also ask clarification questions using the tag "Question - ". Here is an example scenario that illustrates how you can ask clarification
questions.
Let's assume a scene contains two spheres. Me: pick up the sphere. You: Question - there are two spheres. Which one do you want me to pick up?
Me: Sphere 1, please.
Use python code to express your solution. Are you ready?
C. Additional experiments
C.1. Zero-shot manipulation: Pick and place, stacking, and pushing
Full conversation found at:
https://github.com/microsoft/PromptCraft-Robotics/blob/main/examples/manipulation/manipulation_zeroshot.md
C.2. Controlling multiple robot form factors from a single prompt
Full conversation found at:
https://github.com/microsoft/PromptCraft-Robotics/blob/main/examples/multiple_robots/multiple_robots.md
D. Other commonsense/reasoning tasks
D.1. Computer vision problem
Imagine we are working with an RGBD camera. The pose of this camera can be accessed via a function get_pose(). Now let us say we observe a point
P in the image at coordinates (x, y), and the corresponding perspective depth value can be obtained by get_depth(x, y). The intrinsics of the camera
can be obtained by the function get_intrinsics(). Can you give me code that will compute the world coordinates corresponding to point P?
Sure, here's some example code in Python to compute the world coordinates corresponding to point P
import numpy as np
def get_world_coordinates(x, y):
# Get camera intrinsics
K = get_intrinsics()
# Get camera pose
pose = get_pose()
# Get perspective depth value at observed point
depth = get_depth(x, y)
# Compute homogeneous image coordinates
p_image = np.array([x, y, 1])
# Compute inverse camera intrinsics
K_inv = np.linalg.inv(K)
# Compute image coordinates in camera frame
p_camera = depth * K_inv.dot(p_image)
# Compute world coordinates
p_world = np.dot(pose[:3, :3], p_camera) + pose[:3, 3]
return p_world
23
ChatGPT for Robotics
Given an observed point P in the image at coordinates (x, y), and the corresponding perspective depth value obtained by get_depth(x, y), we can
compute the 3D world coordinates corresponding to P. To do this, we need to know the camera intrinsics, which describe how the 3D scene is
projected onto the 2D image plane. The intrinsics can be obtained using the get_intrinsics() function.
We also need to know the camera pose, which describes the position and orientation of the camera in the world coordinate system. The pose can
be obtained using the get_pose() function.
With the intrinsics and pose, we can transform the observed point P from image coordinates to world coordinates. We first compute the inverse
of the camera intrinsics matrix, which allows us to convert from image coordinates to camera coordinates. We then multiply the inverse intrinsics
matrix with the observed point's pixel coordinates and the corresponding depth value to obtain the 3D point in camera coordinates.
Finally, we transform the camera coordinates to world coordinates by multiplying the camera coordinates by the camera pose matrix, which
describes the transformation from camera coordinates to world coordinates. The resulting 3D point is in homogeneous coordinates, so we need to
divide by the last coordinate to obtain the 3D Euclidean coordinates.
D.2. Transformation matrices
Imagine we are in a world that operates according to its own specific coordinate convention. There is a robot car located in this world at a specific
location. The car has its own coordinate convention. And upon this car, there is a camera which, again, has a different coordinate convention.
Imagine we have access to a function get_transformation_matrix(a, b) - that can return the transformation matrix between world and vehicle, or
vehicle and camera. What is the transformation matrix between the world and the camera?
The transformation matrix between the world and the camera can be obtained by composing the transformation matrices between the world and
the vehicle and the vehicle and the camera. To find the transformation matrix between the world and the camera, we first get the transformation
matrix between the world and the vehicle using the function get_transformation_matrix(a, b) with a set to world and b set to vehicle. Next, we get
the transformation matrix between the vehicle and the camera using the function get_transformation_matrix(a, b) with a set to vehicle and b set to
camera. Finally, we multiply the two transformation matrices to get the transformation matrix between the world and the camera. In mathematical
terms, if T_world_vehicle is the transformation matrix between the world and the vehicle, and T_vehicle_camera is the transformation matrix
between the vehicle and the camera, then T_world_camera = T_world_vehicle T_vehicle_camera.
Let's get into the details more. Imagine the world operates according to the coordinate convention: X is forward, Y is to the left, Z is upwards.
The robot car is located in this world at coordinates (5, 0, 1). The car has its own coordinate convention: X is forward, Y is to the right, and Z is
downwards. Can you now implement get_transformation_matrix(world, car)?
Yes, to implement the get_transformation_matrix(world, car) function, we need to first convert the car's coordinate convention to match the
world's coordinate convention. The transformation matrix between the world and the car can be represented as follows:
def get_transformation_matrix(a, b):
if a == 'world' and b == 'car':
T = np.array([[1, 0, 0, 5], [0, -1, 0, 0], [0, 0, -1, 1], [0, 0, 0, 1]])
return T
D.3. Balancing a ball on a plate
Imagine we are trying to balance a ball on the center of a plate. The plate can be controlled with a pitch and a roll angle as set_plate_pitch(), and
set_plate_roll(). The range of pitch and roll angles that can be set are [-0.1, 0.1]. There is an intelligent camera above the plate that can capture
top-down images of the plate and return the (X, Y) position of the center of the ball in the image. The image is of resolution 320x240. The pixel
coordinates of the ball can be accessed by the function get_ball_position(). Can you give me code that continuously controls the plate such that the
ball is always at the center?
Here is an example of the code in Python:
import time
def balance_ball():
# Continuously check the position of the ball
while True:
# Get the current position of the ball
x, y = get_ball_position()
# Check if the ball is off-center
if x > 160 or x < 160 or y > 120 or y < 120:
# Calculate the pitch and roll adjustments needed to center the ball
pitch_adjust = (y - 120) * 0.0001
roll_adjust = (x - 160) * 0.0001
# Limit the pitch and roll adjustments to the maximum range [-0.1, 0.1]
pitch_adjust = max(min(pitch_adjust, 0.1), -0.1)
roll_adjust = max(min(roll_adjust, 0.1), -0.1)
# Set the pitch and roll angles to center the ball
set_plate_pitch(pitch_adjust)
set_plate_roll(roll_adjust)
# Wait for a short period before checking the ball's position again
24
ChatGPT for Robotics
time.sleep(0.01)
# Start the balancing process
balance_ball()
This code uses a loop to continuously check the position of the ball using the get_ball_position function. If the ball is off-center, the code
calculates the necessary pitch and roll adjustments to center the ball and sets the plate angles using the set_plate_pitch and set_plate_roll
functions. The code limits the pitch and roll adjustments to the maximum range of [-0.1, 0.1]. The loop waits for a short period before checking
the ball's position again to prevent over-adjusting the plate.
25
|
|
http://arxiv.org/abs/2302.09790v1 | 2023-02-20T06:31:29 | 2023-02-20T06:31:29 | HTNet: Human Topology Aware Network for 3D Human Pose Estimation | 3D human pose estimation errors would propagate along the human body topology
and accumulate at the end joints of limbs. Inspired by the backtracking
mechanism in automatic control systems, we design an Intra-Part Constraint
module that utilizes the parent nodes as the reference to build topological
constraints for end joints at the part level. Further considering the hierarchy
of the human topology, joint-level and body-level dependencies are captured via
graph convolutional networks and self-attentions, respectively. Based on these
designs, we propose a novel Human Topology aware Network (HTNet), which adopts
a channel-split progressive strategy to sequentially learn the structural
priors of the human topology from multiple semantic levels: joint, part, and
body. Extensive experiments show that the proposed method improves the
estimation accuracy by 18.7% on the end joints of limbs and achieves
state-of-the-art results on Human3.6M and MPI-INF-3DHP datasets. Code is
available at https://github.com/vefalun/HTNet. | [
"Jialun Cai",
"Hong Liu",
"Runwei Ding",
"Wenhao Li",
"Jianbing Wu",
"Miaoju Ban"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.09790v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.09790v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.CV",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.CV",
"cs.HC",
"cs.LG"
] | HTNET: HUMAN TOPOLOGY AWARE NETWORK FOR 3D HUMAN POSE ESTIMATION
Jialun Cai Hong Liu
Runwei Ding∗ Wenhao Li
Jianbing Wu Miaoju Ban
Key Laboratory of Machine Perception, Shenzhen Graduate School, Peking University
{cjl, kimbing.ng, miaoju.ban}@stu.pku.edu.cn, {hongliu, dingrunwei, wenhaoli}@pku.edu.cn
3
2
0
2
b
e
F
0
2
]
V
C
.
s
c
[
1
v
0
9
7
9
0
.
2
0
3
2
:
v
i
X
r
a
ABSTRACT
3D human pose estimation errors would propagate along the
human body topology and accumulate at the end joints of limbs.
Inspired by the backtracking mechanism in automatic control
systems, we design an Intra-Part Constraint module that uti-
lizes the parent nodes as the reference to build topological con-
straints for end joints at the part level. Further considering the
hierarchy of the human topology, joint-level and body-level de-
pendencies are captured via graph convolutional networks and
self-attentions, respectively. Based on these designs, we pro-
pose a novel Human Topology aware Network (HTNet), which
adopts a channel-split progressive strategy to sequentially learn
the structural priors of the human topology from multiple se-
mantic levels: joint, part, and body. Extensive experiments
show that the proposed method improves the estimation accu-
racy by 18.7% on the end joints of limbs and achieves state-of-
the-art results on Human3.6M and MPI-INF-3DHP datasets.
Code is available at https://github.com/vefalun/HTNet.
Index Terms- 3D Human Pose Estimation, Human
Topology, Error Accumulation, Hierarchical Structure
1. INTRODUCTION
3D human pose estimation (HPE) from a monocular image
is a challenging task, which has been widely applied in the
sub-tasks of human analysis, such as action recognition [1]
and person re-identification [2]. Benefiting from the effective
2D HPE framework [3], most recent works focus on the 2D-
to-3D lifting pipeline [4], which firstly estimates 2D poses
from a single image and then lifts them to 3D keypoints. Un-
like image-based tasks, the 2D-to-3D pose lifting task takes
inherently sparse and structural 2D joint coordinates as inputs.
Therefore, it is critical to take full advantage of the structural
priors of the human topology.
Recently, many works [5, 6, 7] have focused on the most re-
lated local topology by modeling the correlations among body
joints via Graph Convolutional Networks (GCNs), while oth-
ers [8, 9, 10] have focused on the less related global contexts
∗Corresponding author: [email protected]. This work is supported
by National Natural Science Foundation of China (No.62073004), Basic and
Applied Basic Research Foundation of Guangdong (No. 2020A1515110370),
Shenzhen Fundamental Research Program (GXWD20201231165807007-
20200807164903001, No. JCYJ20200109140410340).
Fig. 1: (a) Distribution of estimation errors; (b) Joints with
different PDoFs; (c) Physiological explanation of error accu-
mulation at the end joints (e.g., wrist): (cid:126)ε = (cid:126)ε3 + (cid:126)ε2.
via the Multi-head Self-Attention (MSA) of Transformer. How-
ever, the skeleton representations of the human body cannot
be sufficiently captured by these methods due to the complex
topological relationships among joints, leading to dramatically
wrong estimation, especially at the end joints of limbs. As
shown in Fig. 1 (a), the previous state-of-the-art model [6]
suffers from significant estimation errors on joints with high
PDoFs, and here we define the Part Degree of Freedom (PDoF)
of joints via the distance to the torso (see Fig. 1 (b)). To ad-
dress these issues, we explore the human topology from the
following two aspects:
(i) Error accumulation: Since the human body is a link-
age structure that limb joints highly depend on their parent
nodes [11] shown in Fig. 1 (c), the estimation errors would
accumulate from the central hip in the torso (root joint) to the
end joints of limbs. In automatic control systems, backtrack-
ing to the previous points with fewer errors and leveraging
their kinematics priors can effectively alleviate the problem
of error accumulation [12, 13]. Inspired by it, an Intra-Part
Constraint (IPC) is designed to take intra-part parent joints as
the reference to constrain the joints with higher PDoFs.
(ii) Hierarchical structure: The Joint motion is closely
linked to the hierarchical organization of human topology,
which includes joint [5], part [14, 15], and body [9] levels.
Driven by this natural hierarchy, we present a novel Human
Fig. 2: Overview of the proposed HTNet. The HTNet consists of M stacked Hierarchical Mixers. Each mixer consists of three
modules (LJC, IPC, and GBI), which can extract features at joint, part, and body levels.
Topology aware Network (HTNet) that learns human topology
representations at multiple levels (see Fig. 2). Specifically,
HTNet consists of alternating hierarchical mixers, each com-
posed of three modules. At the joint level, we design a Local
Joint-level Connection (LJC) based on GCN to model the phys-
ical connections between adjacent joints; At the part level, the
IPC in (i) provides the constraints for intra-part joints, such
that they have similar athletic trends; At the body level, the
Global Body-level Interaction (GBI) based on MSA extracts
global features among inter-part joints. Notably, the hierar-
chical mixer adopts a channel-split progressive design, which
achieves a win-win scenario by providing more expressive
features from various levels while keeping a small model size.
In summary, the main contributions are as follows:
• We propose a Human Topology aware Network (HTNet)
with a channel-split progressive design to learn human
topology dependencies at joint, part, and body levels.
• To alleviate the error accumulation, we design an Intra-
Part Constraint (IPC) module that utilizes topological
constraints of parent nodes to reduce errors of end joints.
• Extensive experiments demonstrate the effectiveness of
HTNet, which achieves state-of-the-art results on both
Human3.6M and MPI-INF-3DHP benchmark datasets.
2. METHODOLOGY
2.1. Overview
The overview of HTNet is depicted in Fig. 2. Given the 2D
coordinates X∈RN ×2, we firstly map X to a high dimension
X (cid:48)∈RN ×C via the patch embedding, where N is the number
of joints and C is the channel dimensions. Then, we embed
X (cid:48) with a learnable positional matrix Epos∈RN ×C to obtain
the embedded features X (cid:96), where (cid:96) is the index of hierarchical
mixers. Next, the X (cid:96) is split into three parts: X (cid:96)
IPC, and
X (cid:96)
GBI, which have equal dimensions C (cid:48)=C/3 and are fed into
corresponding modules: LJC, IPC, GBI. These modules con-
struct the human topology from multiple semantic levels: joint,
part, and body. Finally, we aggregate hierarchical representa-
tions and use a linear layer as the regression head to produce
the 3D coordinates Y ∈RN ×3. Each module and the structure
of HTNet will be introduced in the following sections.
LJC, X (cid:96)
2.2. Local Joint-level Connection
Local Joint-level Connection (LJC) is a GCN-based architec-
ture [6]. The graph-structured human skeleton can be defined
as G=(V, A), where V is a set of N joints and A∈ {0, 1}N ×N
is an adjacency matrix representing the connection relations
between joints. Given the input X (cid:96)
, features of
neighboring joints can be aggregated to Y (cid:96)
LJC∈RN ×C(cid:48)
LJC by GCN:
GCN(X (cid:96)
LJC = X (cid:96)
Y (cid:96)
LJC) = ̃D− 1
LJC + GCN(σ(GCN(X (cid:96)
2 ̃A ̃D− 1
2 X (cid:96)
LJCW,
LJC))),
(1)
where ̃A=A+I, ̃D is the diagonal node degree matrix, W is
the weight matrix, σ denotes the GELU activation function.
2.3. Intra-Part Constraint
To alleviate the error accumulation, we design an Intra-Part
Constraint (IPC) module (see Fig. 3), which aims to conduct
the constraint among intra-part joints with different PDoFs.
IPC = X (cid:96)
Given the input ̃X (cid:96)
IPC + Y (cid:96)
LJC, topological constraints
performs in two sets of joints: (i) X (cid:96)
consists of 2-
PDoF and 3-PDoF joints; (ii) X (cid:96)
consists of 1-PDoF,
2-PDoF, and 3-PDoF joints. Next, X (cid:96)
j , j∈{1, 2} are fed into
two convolution layers to generate limb features F (cid:96)
j . Then, a
channel MLP [16] is adopted to aggregate information between
different channels for each limb feature:
2 ∈R12×C(cid:48)
1 ∈R8×C(cid:48)
F (cid:96)
̃F (cid:96)
j = σ(Convj(X (cid:96)
j = F (cid:96)
j + MLP(LN(F (cid:96)
j )), j ∈ {1, 2},
j )),
(2)
1 are replaced with ̃F (cid:96)
where ̃F (cid:96)
j are aggregated limb features, LN (*) denotes Layer
Normalization, Conv1 and Conv2 are convolution layers with
kernel sizes of 2 and 3, respectively. Based on the above ̃F (cid:96)
j ,
we construct two topological constraints Rj in X (cid:96)
j : (i) In R1,
3-PDoF joints in X (cid:96)
1 ; (ii) In R2, 3-PDoF
2 are replaced with ̃F (cid:96)
and 2-PDoF joints in X (cid:96)
2 . Then, the
unprocessed joints are filled into the replaced X (cid:96)
j , and Y (cid:96)
IPC, the
final output of IPC, can be represented as follows:
IPC, ̃F (cid:96)
IPC + R1( ̃X (cid:96)
Since the limb features ̃F (cid:96)
IPC, ̃F (cid:96)
j are the motion representation of
limbs, which contains both high-PDoF joints and their parent
1) + R2( ̃X (cid:96)
IPC = ̃X (cid:96)
Y (cid:96)
2).
(3)
3. EXPERIMENTS
3.1. Datasets and Evaluation Metrics
Human3.6M [19] is the largest indoor dataset for 3D HPE.
It has 3.6 million images and 11 professional actors. Fol-
lowing [6, 17], Mean Per Joint Position Error (MPJPE) and
Procrustes MPJPE (P-MPJPE) are adopted as metrics.
MPI-INF-3DHP [20] consists of 1.3 million images from in-
door and outdoor scenes. There are three different scenes in
its test set: studio with a green screen (GS), studio without
a green screen (noGS), and outdoor scene (Outdoor). Fol-
lowing [6, 17, 21], MPJPE, Percentage of Correct Keypoint
(PCK), and Area Under Curve (AUC) are adopted as metrics.
3.2. Implementation Details
We implement our method using Pytorch and train the model
for 30 epochs with batch size 512. The proposed HTNet con-
sists of 3 stacked hierarchical mixers. Note that the channel
dimension of inputs should be divisible by 24 (e.g., 240, 360)
because there are eight heads in the MSA and three split chan-
nels in hierarchical mixers. The L2 loss is utilized to minimize
the errors between predictions and ground truth.
3.3. Method Comparison
Comparison on Human3.6M. We compare HTNet with state-
of-the-art methods on Human3.6M. As shown in Tab. 1 (a),
the 2D keypoints from CPN [3] are used as inputs, and our
model achieves the best results under both MPJPE (47.6mm)
and P-MPJPE (38.6mm). Besides, using the ground truth 2D
joints as inputs, HTNet also performs best, outperforming
GraFormer [17] by 9.3% (31.9mm vs. 35.2mm).
Comparison on MPI-INF-3DHP. To evaluate the general-
ization capability of our approach, we train HTNet on the
Human3.6M and test it on the MPI-INF-3DHP directly. As
shown in Tab. 1 (b), HTNet achieves the best performance
on all scenes, which verifies the strong generalization of our
method in unseen environments.
Comparison with Temporal Methods. To explore the porta-
bility of HTNet in video-based 3D HPE, we compare with
some methods [5, 9, 10, 26, 28, 29] with similar frames as in-
puts, and Tab. 1 (c) shows that HTNet-S (C=240) can achieve
competitive performance under MPJPE (47.2mm) with much
fewer parameters. Notably, we find that the channel dimension
will be the bottleneck to the performance gains. Thus, HTNet-
L is built with larger dimensions (C=720) and performs the
best (46.1mm). The above experiments prove that our HTNet
can work well with video sequence inputs.
3.4. Ablation Study
Tab. 2 shows the results of our method under different com-
ponents and structures on the Human3.6M dataset. For a fair
comparison, we maintain the consistency of the parameters by
keeping the same dimension channels (C=240).
Fig. 3: Structure of Intra-Part Constraint (IPC) module.
joints. Therefore, replacing the high-PDoF joints with ̃F (cid:96)
j can
form topological constraints and produce reasonable 3D pose
estimations to mitigate the error accumulation.
2.4. Global Body-level Interaction
Global Body-level Interaction (GBI) module is built by the self-
attention of Transformer, which can capture global contexts
across the whole human body [10, 17]. Given ̃X (cid:96)
GBI +
Y (cid:96)
IPC as input, the GBI module can be formulated as:
C (cid:48))V (cid:96), i ∈ {1, ..., h}
GBI = X (cid:96)
√
/
Hi = Softmax(Q(cid:96)K (cid:96)T
MSA( ̃X (cid:96)
GBI = ̃X (cid:96)
̃Y (cid:96)
GBI) = Concat(H1, H2, ..., Hh)Wout,
GBI + LN(MSA( ̃X (cid:96)
GBI)),
(4)
where h is the number of attention heads, Q(cid:96), K (cid:96), V (cid:96) are query,
key, and value matrices, which are calculated from ̃X (cid:96)
GBI by
linear transformations, ̃Y (cid:96)
GBI is the output of the GBI module.
2.5. Network Structure
Although hierarchical representations of human topology can
be learned with LJC, IPC and GBI, it is challenging to de-
sign a connection structure for such three modules: the series
structure (i.e., three modules are connected sequentially) will
increase the model size, and the parallel structure (i.e., three
modules divide the channels equally and work in parallel)
lacks feature interactions among various levels.
Inspired by Res2Net [18], we design the hierarchical mixer
with a channel-split progressive structure. Specifically, chan-
nels are split into three parts and fed into LJC, IPC, and GBI.
Meanwhile, the output of the previous module is added to
the input of the next module as residual-like connections for
learning the human topology from local to global. Then, out-
puts of the above three modules are concatenated to generate
Y (cid:96)∈RN ×C, and Y (cid:96) is fed to a channel MLP block:
Y (cid:96) = Concat(Y (cid:96)
GBI),
̃Y (cid:96) = Y (cid:96) + MLP(LN (Y (cid:96))).
LJC, Y (cid:96)
IPC, Y (cid:96)
(5)
Such a process can aggregate features from three different
levels and obtain a more expressive representation.
Method
P1 (CPN) P2 (CPN) P1 (GT)
Method
GS↑ noGS↑ Outdoor↑ PCK↑ AUC↑
Method
Frame Param MPJPE
Martinez et al. [4]
Ci et al. [22]
Liu et al. [21]
Xu et al. [23]
Zhao et al. [17]
Cai et al. [5](†)
Zeng et al. [24]
Zou et al. [6](†)
HTNet (Ours)
HTNet (Ours) (†)
62.9
52.7
52.4
51.9
51.8
50.6
49.9
49.4
48.9
47.6
47.7
42.2
41.2
-
-
40.2
39.4
39.1
39.0
38.6
45.5
36.3
37.8
35.8
35.2
38.1
36.4
37.4
34.0
31.9
Martinez et al. [4] 49.8
Mehta et al. [20]
70.8
Ci et al. [22]
74.8
Zhou et al. [25]
75.6
Zeng et al. [24]
-
Liu et al. [26]
77.6
Zeng et al. [27]
-
Xu et al. [23]
81.5
Zou et al. [6]
86.4
42.5
62.3
70.8
71.3
-
80.5
-
81.7
86.0
HTNet (Ours)
86.9
86.2
31.2
58.5
77.3
80.3
80.3
80.1
84.6
75.2
85.7
85.9
42.5
64.7
74.0
75.3
77.6
79.3
82.1
80.1
86.1
17.0
31.7
36.7
38.0
43.8
45.8
46.2
45.8
53.7
86.7
54.1
Pavllo et al. [28]
Cai et al. [5]
Zheng et al. [9]
Li et al. [10]
Chen et al.[29]
HTNet-S (Ours)
Pavllo et al. [28]
Liu et al. [26]
Zheng et al. [9]
HTNet-L (Ours)
9
7
9
9
9
9
27
27
27
27
4.4M 49.8
5.1M 48.8
9.6M 49.9
18.9M 47.8
18.2M 46.3
3.0M 47.2
8.6M 48.8
5.7M 48.5
9.6M 47.0
10.1M 46.1
(a) Quantitative comparison on Human3.6M.
(c) Comparison with temporal methods.
Table 1: (a) Quantitative comparison on Human3.6M under Protocol #1 (MPJPE) and Protocol #2 (P-MPJPE). The 2D keypoints
detected by CPN and the ground truth of 2D poses are used as inputs. (†) - adopts the same refinement module as [5, 6]. (b)
Quantitative comparison on MPI-INF-3DHP. (c) Quantitative comparison with temporal methods on Human3.6M.
(b) Quantitative comparison on MPI-INF-3DHP.
LJC IPC GBI Param MPJPE
Baseline
(cid:33)
(cid:33)
(cid:33) 2.2M 52.2
2.6M 50.4
(cid:33) 2.5M 50.2
(cid:33) (cid:33) 3.4M 51.8
3.8M 49.3
(cid:33) (cid:33)
Parallel (cid:33) (cid:33) (cid:33) 3.0M 50.0
Serial (cid:33) (cid:33) (cid:33) 7.2M 49.2
HTNet (cid:33) (cid:33) (cid:33) 3.0M 48.9
Table 2: Ablation study for
components and structures.
Fig. 4: Ablation study for the
effect of IPC.
Impact of Model Components. As shown in the top part of
Tab. 2, HTNet with only a single-level module cannot achieve
satisfactory performance, while the combination of all pro-
posed modules performs the best via learning representations
from various levels. Notably, IPC cannot work individually
due to no operations on 0-PDoF and 1-PDoF joints. To fur-
ther investigate the influence of IPC, we categorize limb joints
by PDoFs and calculate the average MPJPE of joints in each
category in Fig. 4. Compared with the baseline (the HTNet
with only GBI), the average MPJPE of all joints decreased by
3.8% (50.2mm vs. 52.2mm) via introducing LJC. By further
integrating IPC into HTNet, the MPJPE would decreased by
6.3% (48.9mm vs. 52.2mm), while MPJPE on 2-PDoF and
3-PDoF joints noticeably reduces by 15.5% and 18.7%, re-
spectively. Such a significant reduction in the estimation errors
of end joints can be attributed to the number of topological
constraints they obtain shown in Sec. 2.3: (i) 3-PDoF joints are
constrained by both 1-PDoF and 2-PDoF joints; (ii) 2-PDoF
joints are only constrained by 1-PDoF joints; (iii) 1-PDoF
joints are not subject to any constraints.
Impact of Model Structures. As for the structures (middle
part of Tab. 2), the serial structure exhibits competitive perfor-
mance (49.2mm) due to the local-to-global learning; the par-
allel structure can reduce parameters from 7.2M to 3.0M due
to the channel-split structure. The channel-split progressive
Fig. 5: Qualitative comparison on Human3.6M.
structure of HTNet adopts residual connections and combines
the advantages of these two designs, which performs the best
(48.9mm) and maintains a small model size (3.0M).
3.5. Visualization
Fig. 5 provides qualitative comparisons on Human3.6M be-
tween HTNet and the state-of-the-art approach, i.e., MGCN [6].
It can be seen that our method is capable of producing more
precise 3D keypoints at the end of limbs, which further proves
the effectiveness of our method.
4. CONCLUSION
This paper presents a Human Topology aware Network (HT-
Net), which takes full advantage of human structural priors
for 3D HPE. To address the error accumulation, we design an
Intra-Part Constraint (IPC) module that utilizes the topological
constraints from intra-part parent nodes to reduce the errors of
end joints. Based on the IPC, the hierarchical mixer is further
designed to learn joint-part-body representations via a channel-
split progressive structure, allowing the HTNet to efficiently
build hierarchical representations of the human topology. Ex-
tensive experiments show that the proposed HTNet achieves
state-of-the-art performance. We hope our work can inspire
more researchers on skeleton-based tasks, e.g., action recogni-
tion, and 3D human mesh reconstruction.
3 ' R ) 3 ' R ) 3 ' R ) 0 3 - 3 ( % D V H O L Q H 2 X U V Z R , 3 & |